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

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

deadmau5_ghosts.swf

This is the info page for
Flash #87847

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


Text
<p align="center"><font face="HelveticaNeueLT Std Blk" size="22" color="#000000" letterSpacing="-1.900000" kerning="1">play now</font></p>

<p align="left"><font face="Arial Black" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1">textButton</font></p>

<p align="left"></p>

<p align="left"><font face="Arial" size="10" color="#333333" letterSpacing="0.000000" kerning="1">Refresh map</font></p>

<p align="right"><font face="Arial Rounded MT Bold" size="16" color="#20e7fd" letterSpacing="0.000000" kerning="1">bestField</font></p>

<p align="right"><font face="Arial Rounded MT Bold" size="12" color="#20e7fd" letterSpacing="0.000000" kerning="1">88/88</font></p>

<p align="left"><font face="Arial Rounded MT Bold" size="16" color="#20e7fd" letterSpacing="0.000000" kerning="1">pointsField</font></p>

<p align="left"><font face="Arial" size="8" color="#ff0000" letterSpacing="0.000000" kerning="1">debugField</font></p><p align="left"></p>

<p align="center"><font face="Arial Black" size="49" color="#000000" letterSpacing="0.000000" kerning="1">Level88</font></p>

<p align="left"><font face="Arial Black" size="16" color="#20e7fd" letterSpacing="0.000000" kerning="1">TitleField</font></p>

<p align="left"><font face="Arial Rounded MT Bold" size="13" color="#ffffff" letterSpacing="0.000000" kerning="1">MessageField</font></p>

<p align="center"></p>

<p align="center"></p>

Your name

Your email

<p align="left"><font face="Arial Black" size="20" color="#20e7fd" letterSpacing="0.000000" kerning="1">TitleField</font></p>

<p align="left"><font face="Arial Rounded MT Bold" size="13" color="#ffffff" letterSpacing="0.000000" kerning="1">MessageField</font></p>

<p align="center"><font face="Arial Rounded MT Bold" size="16" color="#000000" letterSpacing="0.000000" kerning="1">fdsafdsa</font></p>

<p align="center"><font face="Arial Black" size="14" color="#ffffff" letterSpacing="0.000000" kerning="1">8888</font></p>

Loading...

<p align="center"><font face="Arial Black" size="14" color="#000000" letterSpacing="-1.900000" kerning="1">XXXX</font></p>

ActionScript [AS3]

Section 1
//AbstractController (com.mbxgames.framework.AbstractController) package com.mbxgames.framework { import flash.events.*; import flash.media.*; import flash.display.*; import flash.utils.*; public class AbstractController implements IController { private var container:MovieClip; public var callback:Function; private var blockerSprite:Sprite; public var view:MovieClip; public var main:Main; public var viewType:String; public static const PAGE_DEPTH:uint = 2; public static const OVERLAY_DEPTH:uint = 3; public static const VIEW_TYPE_OVERLAY:String = "overlay"; public static const VIEW_TYPE_PAGE:String = "page"; public function AbstractController(){ main = Main.instance; container = main.container; } public function stopMusic():void{ main.stopMusic(); } public function enableInteractions():void{ if (blockerSprite){ view.removeChild(blockerSprite); blockerSprite.graphics.clear(); blockerSprite = null; }; } public function destroyView():void{ destroyAbstractController(); } public function attachViewAsPage(_arg1:String):void{ viewType = VIEW_TYPE_PAGE; attachView(_arg1, PAGE_DEPTH); } public function outro():void{ } public function attachViewAsOverlay(_arg1:String):void{ viewType = VIEW_TYPE_OVERLAY; attachView(_arg1, OVERLAY_DEPTH); } public function playMusic(_arg1:String, _arg2:int=2000):void{ main.playMusic(_arg1, _arg2); } private function attachView(_arg1:String, _arg2:Number):void{ var _local3:Class = (getDefinitionByName(_arg1) as Class); view = new (_local3); container.addChild(view); intro(); } public function disableInteractions():void{ enableInteractions(); blockerSprite = new Sprite(); blockerSprite.graphics.lineStyle(); blockerSprite.graphics.beginFill(0, 0); blockerSprite.graphics.drawRect(0, 0, main.sw, main.sh); blockerSprite.graphics.endFill(); view.addChild(blockerSprite); } public function intro():void{ } public function setButton(_arg1:String, _arg2:MovieClip, _arg3:Function):void{ _arg2.label = _arg1; _arg2.addEventListener(MouseEvent.CLICK, _arg3, false, 0, true); } public function muteSound(_arg1:Boolean):void{ main.muteSound(_arg1); } public function destroyAbstractController():void{ trace(("removeing view :: " + view)); main.container.removeChild(view); } public function playSound(_arg1:String, _arg2:uint=0, _arg3:Function=null):SoundChannel{ return (main.playSound(_arg1, _arg2, _arg3)); } } }//package com.mbxgames.framework
Section 2
//AbstractMain (com.mbxgames.framework.AbstractMain) package com.mbxgames.framework { import com.mbxgames.sound.*; import flash.media.*; import flash.display.*; import flash.geom.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.external.*; public class AbstractMain extends MovieClip { public var container:MovieClip; public var overlay:AbstractController; public var sh:uint; public var debugMode:Boolean; public var controller:AbstractController; public var sw:uint; private var debugField:TextField; public function AbstractMain(){ container = new MovieClip(); addChild(container); } public function stopMusic(_arg1:int=2000):void{ Opera.instance.stopMusic(_arg1); } public function registerSound(_arg1:String):void{ var _local2:Class = (getDefinitionByName(_arg1) as Class); Opera.instance.registerSound(_arg1, new (_local2)); } public function playSound(_arg1:String, _arg2:uint=0, _arg3:Function=null):SoundChannel{ return (Opera.instance.playSound(_arg1, _arg2, 1, _arg3)); } public function trackEvent(_arg1:String, _arg2:uint=1):void{ var _local3:URLVariables = new URLVariables(); _local3.r = int((Math.random() * 9999)); _local3.t = "t"; _local3.d = _arg2; _local3.c = _arg1; var _local4:URLRequest = new URLRequest(); _local4.url = "http://ext.mbxgames.com/api/"; _local4.data = _local3; var _local5:URLLoader = new URLLoader(); _local5.load(_local4); trace(((("TRACKING EVENT : " + _local4.url) + "?") + _local4.data.toString())); } public function playMusic(_arg1:String, _arg2:int=2000):void{ Opera.instance.playMusic(_arg1, 1, _arg2); } public function debug(_arg1:String):void{ if (!debugMode){ return; }; if (!debugField){ debugField = new TextField(); debugField.selectable = false; debugField.defaultTextFormat = new TextFormat(null, null, 0xFF0000); addChild(debugField); }; debugField.parent.setChildIndex(debugField, (debugField.parent.numChildren - 1)); debugField.appendText((_arg1 + "\n")); debugField.scrollV = debugField.maxScrollV; } public function changePage(_arg1:String, _arg2:Function=null):void{ if (!container.scrollRect){ container.scrollRect = new Rectangle(0, 0, sw, sh); }; removeOverlay(); removePage(); var _local3:Class = (getDefinitionByName((_arg1 + "Controller")) as Class); controller = new (_local3); if (_arg2 != null){ controller.callback = _arg2; }; } public function goNewLocation(_arg1:String, _arg2:String="_self"):void{ var _local4:String; var _local3:URLRequest = new URLRequest(_arg1); if (!ExternalInterface.available){ navigateToURL(_local3, _arg2); } else { _local4 = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase(); if (((!((_local4.indexOf("firefox") == -1))) || (((!((_local4.indexOf("msie") == -1))) && ((uint(_local4.substr((_local4.indexOf("msie") + 5), 3)) >= 7)))))){ ExternalInterface.call("window.open", _local3.url, _arg2); } else { navigateToURL(_local3, _arg2); }; }; } public function addOverlay(_arg1:String, _arg2:Function=null):void{ var overlayClass:Class; var ref = _arg1; var callback = _arg2; removeOverlay(); try { overlayClass = (getDefinitionByName((ref + "Controller")) as Class); overlay = new (overlayClass); if (callback != null){ overlay.callback = callback; }; } catch(e:Error) { trace(":: Overlay ERROR"); trace(((":: Problem creating controller instance '" + ref) + "'")); trace(e.message); }; } private function removePage():void{ if (!controller){ return; }; controller.destroyView(); controller = null; } public function muteSound(_arg1:Boolean):void{ Opera.instance.globalMute = _arg1; } public function removeOverlay():void{ if (!overlay){ return; }; overlay.destroyView(); overlay = null; } } }//package com.mbxgames.framework
Section 3
//Cookie (com.mbxgames.framework.Cookie) package com.mbxgames.framework { import flash.net.*; public class Cookie { private var so:SharedObject; private var cName:String; public static var instance:Cookie; function CookieClass(){ instance = this; } public function setItem(_arg1:String, _arg2:String):void{ so.data[_arg1] = _arg2; } public function initialise(_arg1:String):void{ so = SharedObject.getLocal(_arg1, "/"); } public function getItem(_arg1:String){ var _local2:String = ((so.data[_arg1])!=undefined) ? so.data[_arg1] : ""; return (_local2); } public function eraseAll():void{ var _local1:String; for (_local1 in so.data) { so.data[_local1] = ""; }; } public function getAllItems():Array{ var _local2:String; var _local1:Array = []; for (_local2 in so.data) { _local1[_local2] = ((so.data[_local2])!=undefined) ? so.data[_local2] : ""; }; return (_local1); } public static function getInstance():Cookie{ if (instance == null){ instance = new (Cookie); }; return (instance); } } }//package com.mbxgames.framework
Section 4
//IController (com.mbxgames.framework.IController) package com.mbxgames.framework { interface IController { function destroyView():void; } }//package com.mbxgames.framework
Section 5
//ClearSpring (com.mbxgames.services.thirdparty.ClearSpring) package com.mbxgames.services.thirdparty { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; import flash.net.*; import flash.system.*; public class ClearSpring extends MovieClip { private var debugField:TextField; private var allowDebug:Boolean; private var closeCallback:Function; public var kernelLoader:Loader; private var wid:String; private var pos:Point; private var nfo:Object;// = null private var flashVars:Object;// = null public var kernel:Object;// = null public function ClearSpring(_arg1:String, _arg2:Point, _arg3:Boolean=true){ this.wid = _arg1; this.pos = _arg2; this.allowDebug = _arg3; Security.allowDomain("bin.clearspring.com"); Security.allowDomain("widgets.clearspring.com"); LoadClearspring(_arg1); } private function debug(_arg1:String):void{ if (allowDebug){ if (!debugField){ debugField = new TextField(); debugField.autoSize = "left"; debugField.text = ""; addChild(debugField); }; debugField.appendText((_arg1 + "\n")); }; } public function LoadClearspring(_arg1:String){ debug("STARTING LOAD OF CLEARSPRING"); var _local2 = (("http://widgets.clearspring.com/o/" + _arg1) + "/-/-TRK/1/lib.v3.as3.swf?onLoad=onLibLoad"); kernelLoader = new Loader(); kernelLoader.addEventListener("on_ready", onClearspringLoad); kernelLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, gotErr); kernelLoader.visible = false; addChild(kernelLoader); kernelLoader.load(new URLRequest(_local2), new LoaderContext(false, ApplicationDomain.currentDomain, SecurityDomain.currentDomain)); } private function onClearspringLoad(_arg1){ var _local2:Object = new Object(); debug("LOADED CLEARSPRING"); kernel = Object(kernelLoader.content).kernel; kernel.track.event("Kernel loaded"); debug((("You have viewed this widget " + kernel.context.user.WIDGET_VIEWS) + " times")); debug(("You seem to be in " + kernel.context.user.geo.getCountry())); if (flashVars){ kernel.menu.configure(flashVars); }; _local2["global"] = {height:300, width:250}; if (nfo){ if (nfo.config.linkurl){ _local2["customHomepage"] = nfo.config.linkurl; }; }; kernel.menu.setOptions(_local2); showClearspring(false); kernel.menu.addEventListener(kernel.menu.event.CLOSE, gotClearspringClose); debug("COMPLETED CLEARSPRING CONFIG"); } private function gotClearspringClose(_arg1=null){ dispatchEvent(new Event("closed")); } private function gotErr(_arg1){ debug("ERROR LOADING CLEARSPRING"); } public function showClearspring(_arg1){ if (kernel){ kernel.menu.show(null, {x:pos.x, y:pos.y}); }; if (_arg1){ kernelLoader.visible = true; }; } } }//package com.mbxgames.services.thirdparty
Section 6
//Opera (com.mbxgames.sound.Opera) package com.mbxgames.sound { import flash.events.*; import flash.media.*; import flash.display.*; import flash.utils.*; public class Opera extends EventDispatcher { private var m_musicMute:Boolean; private var m_musicVolume:Number; private var m_shape:Shape; private var m_sounds:Dictionary; private var m_channels:Array; private var m_globalMute:Boolean; private var m_globalVolume:Number; private var m_musicChannel:OperaChannel; private var m_timer:uint; private var m_soundMute:Boolean; private var m_soundVolume:Number; private static var m_instance:Opera; public function Opera(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false){ if (m_instance != null){ throw (new Error("Opera has already been created")); }; m_sounds = new Dictionary(); m_channels = new Array(); m_globalVolume = _arg1; m_musicVolume = _arg3; m_soundVolume = _arg2; m_globalMute = _arg4; m_musicMute = _arg5; revolume(); m_shape = new Shape(); m_shape.addEventListener(Event.ENTER_FRAME, update); m_timer = getTimer(); } public function set globalVolume(_arg1:Number):void{ m_globalVolume = Math.min(1, Math.max(0, _arg1)); revolume(); } public function playSound(_arg1, _arg2:uint=0, _arg3:Number=1, _arg4:Function=null):SoundChannel{ var _local5:Sound; var _local6:SoundChannel; if ((_arg1 is String)){ _local5 = m_sounds[_arg1]; } else { if ((_arg1 is Sound)){ _local5 = _arg1; }; }; if (_local5 != null){ _local6 = _local5.play(0, _arg2, new SoundTransform((_arg3 * soundVolume))); m_channels.push(new OperaChannel(_local5, _local6, _arg3, true, _arg4, null)); return (_local6); }; return (null); } public function stopMusic(_arg1:uint=0, _arg2:Number=0):void{ if (m_musicChannel != null){ if (_arg1 <= 0){ stopSoundChannel(m_musicChannel.soundChannel); } else { setTransform(m_musicChannel, new SoundTransform(m_musicChannel.volume), new SoundTransform(0, _arg2), _arg1); m_musicChannel.transform.update(0, musicVolume); m_musicChannel.volume = 0; m_musicChannel.transformOnly = true; }; m_musicChannel = null; }; } public function getChannel(_arg1:SoundChannel):OperaChannel{ var _local3:OperaChannel; var _local2:int = (m_channels.length - 1); while (_local2 >= 0) { _local3 = m_channels[_local2]; if (_local3.soundChannel == _arg1){ return (_local3); }; _local2--; }; return (null); } public function get globalVolumeIgnoreMute():Number{ return (m_globalVolume); } private function update(_arg1:Event):void{ var _local5:OperaChannel; var _local6:Boolean; var _local2:uint = getTimer(); var _local3:uint = (_local2 - m_timer); m_timer = _local2; var _local4:int = (m_channels.length - 1); while (_local4 >= 0) { _local5 = m_channels[_local4]; if (_local5.transform != null){ _local6 = false; if (_local5.isSound){ _local5.transform.update(_local3, soundVolume); } else { _local5.transform.update(_local3, musicVolume); }; if (_local6){ _local5.transform.dispose(); _local5.transform = null; }; } else { if (((((_local5.isSound) && ((_local5.soundChannel.position >= _local5.sound.length)))) || (_local5.transformOnly))){ if (_local5.callBack != null){ _local5.soundChannel.removeEventListener(Event.SOUND_COMPLETE, _local5.callBack); }; m_channels.splice(_local4, 1); }; }; _local4--; }; } public function get musicVolumeIgnoreMute():Number{ return (m_musicVolume); } public function registerSound(_arg1:String, _arg2:Sound):void{ if (m_sounds[_arg1] == null){ m_sounds[_arg1] = _arg2; } else { throw (new Error("Opera.registerSound: Sound already exists on that id")); }; } public function get soundVolume():Number{ return ((m_soundMute) ? 0 : m_soundVolume); } public function playMusic(_arg1, _arg2:Number=1, _arg3:uint=0, _arg4:Number=0):void{ var _local5:Sound; var _local6:SoundChannel; var _local7:OperaTransform; if ((_arg1 is String)){ _local5 = m_sounds[_arg1]; } else { if ((_arg1 is Sound)){ _local5 = _arg1; }; }; if (((!((m_musicChannel == null))) && ((m_musicChannel.sound == _local5)))){ return; }; stopMusic(_arg3, -(_arg4)); if (_local5 != null){ _local6 = _local5.play(0, 999999999, new SoundTransform((_arg2 * musicVolume))); if (_arg3 > 0){ _local7 = new OperaTransform(_local6, new SoundTransform(0, _arg4), new SoundTransform(_arg2), _arg3); _local7.update(0, musicVolume); }; m_musicChannel = new OperaChannel(_local5, _local6, _arg2, false, null, _local7); m_channels.push(m_musicChannel); }; } public function set soundVolume(_arg1:Number):void{ m_soundVolume = Math.min(1, Math.max(0, _arg1)); revolume(); } public function revolume():void{ var _local2:OperaChannel; var _local1:SoundTransform = SoundMixer.soundTransform; _local1.volume = globalVolume; SoundMixer.soundTransform = _local1; for each (_local2 in m_channels) { if (_local2.isSound){ if (_local2.transform != null){ _local2.transform.update(0, soundVolume); } else { _local1 = _local2.soundChannel.soundTransform; _local1.volume = (_local2.volume * soundVolume); _local2.soundChannel.soundTransform = _local1; }; } else { if (_local2.transform != null){ _local2.transform.update(0, musicVolume); } else { _local1 = _local2.soundChannel.soundTransform; _local1.volume = (_local2.volume * musicVolume); _local2.soundChannel.soundTransform = _local1; }; }; }; } public function get soundMute():Boolean{ return (m_soundMute); } public function get globalVolume():Number{ return ((m_globalMute) ? 0 : m_globalVolume); } public function get musicVolume():Number{ return ((m_musicMute) ? 0 : m_musicVolume); } public function get globalMute():Boolean{ return (m_globalMute); } public function set soundMute(_arg1:Boolean):void{ m_soundMute = _arg1; revolume(); } private function setTransform(_arg1:OperaChannel, _arg2:SoundTransform, _arg3:SoundTransform, _arg4:int):OperaTransform{ _arg1.transform = new OperaTransform(_arg1.soundChannel, _arg2, _arg3, _arg4); return (_arg1.transform); } public function get musicMute():Boolean{ return (m_musicMute); } public function playSoundTransformed(_arg1, _arg2:SoundTransform, _arg3:SoundTransform, _arg4:uint=4294967295, _arg5:Function=null):SoundChannel{ var _local6:Sound; var _local7:SoundChannel; var _local8:OperaTransform; if ((_arg1 is String)){ _local6 = m_sounds[_arg1]; } else { if ((_arg1 is Sound)){ _local6 = _arg1; }; }; if (_local6 != null){ _local7 = _local6.play(0, 0); if (_arg4 > _local6.length){ _arg4 = _local6.length; }; _local8 = new OperaTransform(_local7, _arg2, _arg3, _arg4); _local8.update(0, soundVolume); m_channels.push(new OperaChannel(_local6, _local7, 1, true, _arg5, _local8)); }; return (null); } public function get soundVolumeIgnoreMute():Number{ return (m_soundVolume); } public function set globalMute(_arg1:Boolean):void{ m_globalMute = _arg1; revolume(); } public function stopSoundChannel(_arg1:SoundChannel):void{ var _local3:OperaChannel; var _local2:int = (m_channels.length - 1); while (_local2 >= 0) { _local3 = m_channels[_local2]; if (_local3.soundChannel == _arg1){ _local3.soundChannel.stop(); m_channels.splice(_local2, 1); return; }; _local2--; }; } public function set musicMute(_arg1:Boolean):void{ m_musicMute = _arg1; revolume(); } public function set musicVolume(_arg1:Number):void{ m_musicVolume = Math.min(1, Math.max(0, _arg1)); revolume(); } public static function get instance():Opera{ if (m_instance == null){ m_instance = new (Opera); }; return (m_instance); } } }//package com.mbxgames.sound import flash.events.*; import flash.media.*; class OperaTransform { private var length:uint; private var startTransform:SoundTransform; private var time:uint; private var endTransform:SoundTransform; private var soundChannel:SoundChannel; private var soundTransform:SoundTransform; private function OperaTransform(_arg1:SoundChannel, _arg2:SoundTransform, _arg3:SoundTransform, _arg4:uint){ soundChannel = _arg1; soundTransform = soundChannel.soundTransform; startTransform = _arg2; endTransform = _arg3; length = _arg4; } public function update(_arg1:uint, _arg2:Number):Boolean{ time = (time + _arg1); if (time > length){ time = length; }; var _local3:Number = (time / length); soundTransform.volume = (startTransform.volume + ((endTransform.volume - startTransform.volume) * _local3)); soundTransform.volume = (soundTransform.volume * _arg2); soundTransform.pan = (startTransform.pan + ((endTransform.pan - startTransform.pan) * _local3)); soundChannel.soundTransform = soundTransform; return ((time == length)); } public function dispose():void{ soundChannel = null; soundTransform = null; startTransform = null; endTransform = null; } } class OperaChannel { private var isSound:Boolean; private var transform:OperaTransform; private var sound:Sound; private var volume:Number; private var soundChannel:SoundChannel; private var callBack:Function; private var transformOnly:Boolean; private function OperaChannel(_arg1:Sound, _arg2:SoundChannel, _arg3:Number, _arg4:Boolean, _arg5:Function=null, _arg6:OperaTransform=null, _arg7:Boolean=false){ sound = _arg1; soundChannel = _arg2; transform = _arg6; isSound = _arg4; volume = _arg3; if (_arg5 != null){ callBack = _arg5; soundChannel.addEventListener(Event.SOUND_COMPLETE, callBack); }; transformOnly = _arg7; } }
Section 7
//KeyboardHandler (com.mbxgames.utils.KeyboardHandler) package com.mbxgames.utils { import flash.events.*; import flash.display.*; public class KeyboardHandler { private static var initialized:Boolean = false; private static var keysDown:Object = new Object(); private static var _stage:Stage; private static function clearKeys(_arg1:Event):void{ keysDown = new Object(); } private static function keyPressed(_arg1:KeyboardEvent):void{ keysDown[_arg1.keyCode] = true; } public static function isDown(_arg1:uint):Boolean{ if (!initialized){ throw (new Error("Key class has yet been initialized.")); }; return (Boolean((_arg1 in keysDown))); } public static function initialize(_arg1:Stage){ if (!initialized){ _stage = _arg1; _stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased); _stage.addEventListener(Event.DEACTIVATE, clearKeys); initialized = true; }; } public static function deactivate(){ if (initialized){ _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased); _stage.removeEventListener(Event.DEACTIVATE, clearKeys); initialized = false; }; } private static function keyReleased(_arg1:KeyboardEvent):void{ if ((_arg1.keyCode in keysDown)){ delete keysDown[_arg1.keyCode]; }; } } }//package com.mbxgames.utils
Section 8
//NumberUtils (com.mbxgames.utils.NumberUtils) package com.mbxgames.utils { public class NumberUtils { public static var srclist:Array = []; public static var destlist:Array = []; public static function round2dp(_arg1:Number):Number{ return ((int((_arg1 * 100)) / 100)); } public static function randRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1); return (_local3); } public static function padZero(_arg1:Number, _arg2:int):String{ var _local3:String = _arg1.toString(); while (_local3.length < _arg2) { _local3 = ("0" + _local3); }; return (_local3); } public static function uniqueRandom(_arg1:Number):Number{ var _local4:uint; if (srclist.length <= 0){ srclist = []; _local4 = 0; while (_local4 < _arg1) { srclist[_local4] = _local4; _local4++; }; destlist = []; }; var _local2:int = int((Math.random() * srclist.length)); var _local3:Number = srclist.splice(_local2, 1)[0]; destlist.push(_local3); return (_local3); } public static function getTwoDigits(_arg1:Number):String{ if (_arg1 < 10){ return (("0" + _arg1)); }; return ((_arg1 + "")); } public static function returnTime(_arg1:Number, _arg2:Boolean=false):String{ var _local3:* = Math.floor((_arg1 / 60)); var _local4:* = (_arg1 % 60); var _local5:* = (_local3 % 60); var _local6:* = Math.floor((_local3 / 60)); var _local7:Number = Math.floor(((_local4 - Math.floor(_local4)) * 100)); _local4 = Math.floor(_local4); if (_arg2){ return ((((((getTwoDigits(_local6) + "hr ") + getTwoDigits(_local5)) + "min ") + getTwoDigits(_local4)) + "sec")); }; return (((getTwoDigits(_local5) + ":") + getTwoDigits(_local4))); } } }//package com.mbxgames.utils
Section 9
//backBtn_9 (deadmau5_ghosts_fla.backBtn_9) package deadmau5_ghosts_fla { import flash.display.*; import flash.text.*; public dynamic class backBtn_9 extends MovieClip { public var field:TextField; public var padlock:MovieClip; public function backBtn_9(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package deadmau5_ghosts_fla
Section 10
//backBtnBg_11 (deadmau5_ghosts_fla.backBtnBg_11) package deadmau5_ghosts_fla { import flash.display.*; public dynamic class backBtnBg_11 extends MovieClip { public function backBtnBg_11(){ addFrameScript(16, frame17); } function frame17(){ stop(); } } }//package deadmau5_ghosts_fla
Section 11
//btn_bg_gfx_7 (deadmau5_ghosts_fla.btn_bg_gfx_7) package deadmau5_ghosts_fla { import flash.display.*; public dynamic class btn_bg_gfx_7 extends MovieClip { public function btn_bg_gfx_7(){ addFrameScript(14, frame15); } function frame15(){ stop(); } } }//package deadmau5_ghosts_fla
Section 12
//ghost_eyes_34 (deadmau5_ghosts_fla.ghost_eyes_34) package deadmau5_ghosts_fla { import flash.display.*; public dynamic class ghost_eyes_34 extends MovieClip { public function ghost_eyes_34(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package deadmau5_ghosts_fla
Section 13
//speaker_gfx_2 (deadmau5_ghosts_fla.speaker_gfx_2) package deadmau5_ghosts_fla { import flash.display.*; public dynamic class speaker_gfx_2 extends MovieClip { public function speaker_gfx_2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package deadmau5_ghosts_fla
Section 14
//Color (fl.motion.Color) package fl.motion { import flash.display.*; import flash.geom.*; public class Color extends ColorTransform { private var _tintColor:Number;// = 0 private var _tintMultiplier:Number;// = 0 public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } private function deriveTintColor():uint{ var _local1:Number = (1 / this.tintMultiplier); var _local2:uint = Math.round((this.redOffset * _local1)); var _local3:uint = Math.round((this.greenOffset * _local1)); var _local4:uint = Math.round((this.blueOffset * _local1)); var _local5:uint = (((_local2 << 16) | (_local3 << 8)) | _local4); return (_local5); } public function set brightness(_arg1:Number):void{ if (_arg1 > 1){ _arg1 = 1; } else { if (_arg1 < -1){ _arg1 = -1; }; }; var _local2:Number = (1 - Math.abs(_arg1)); var _local3:Number = 0; if (_arg1 > 0){ _local3 = (_arg1 * 0xFF); }; this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2)); this.redOffset = (this.greenOffset = (this.blueOffset = _local3)); } private function parseXML(_arg1:XML=null):Color{ var _local3:XML; var _local4:String; var _local5:uint; if (!_arg1){ return (this); }; var _local2:XML = _arg1.elements()[0]; if (!_local2){ return (this); }; for each (_local3 in _local2.attributes()) { _local4 = _local3.localName(); if (_local4 == "tintColor"){ _local5 = (Number(_local3.toString()) as uint); this.tintColor = _local5; } else { this[_local4] = Number(_local3.toString()); }; }; return (this); } public function get tintColor():uint{ return (this._tintColor); } public function set tintColor(_arg1:uint):void{ this.setTint(_arg1, this.tintMultiplier); } public function get brightness():Number{ return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1)); } public function set tintMultiplier(_arg1:Number):void{ this.setTint(this.tintColor, _arg1); } public function get tintMultiplier():Number{ return (this._tintMultiplier); } public function setTint(_arg1:uint, _arg2:Number):void{ this._tintColor = _arg1; this._tintMultiplier = _arg2; this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2))); var _local3:uint = ((_arg1 >> 16) & 0xFF); var _local4:uint = ((_arg1 >> 8) & 0xFF); var _local5:uint = (_arg1 & 0xFF); this.redOffset = Math.round((_local3 * _arg2)); this.greenOffset = Math.round((_local4 * _arg2)); this.blueOffset = Math.round((_local5 * _arg2)); } public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{ var _local4:Number = (1 - _arg3); var _local5:uint = ((_arg1 >> 24) & 0xFF); var _local6:uint = ((_arg1 >> 16) & 0xFF); var _local7:uint = ((_arg1 >> 8) & 0xFF); var _local8:uint = (_arg1 & 0xFF); var _local9:uint = ((_arg2 >> 24) & 0xFF); var _local10:uint = ((_arg2 >> 16) & 0xFF); var _local11:uint = ((_arg2 >> 8) & 0xFF); var _local12:uint = (_arg2 & 0xFF); var _local13:uint = ((_local5 * _local4) + (_local9 * _arg3)); var _local14:uint = ((_local6 * _local4) + (_local10 * _arg3)); var _local15:uint = ((_local7 * _local4) + (_local11 * _arg3)); var _local16:uint = ((_local8 * _local4) + (_local12 * _arg3)); var _local17:uint = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16); return (_local17); } public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{ var _local4:Number = (1 - _arg3); var _local5:ColorTransform = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3))); return (_local5); } public static function fromXML(_arg1:XML):Color{ return (Color(new (Color).parseXML(_arg1))); } } }//package fl.motion
Section 15
//TweenEvent (gs.events.TweenEvent) package gs.events { import flash.events.*; public class TweenEvent extends Event { public var info:Object; public static const UPDATE:String = "update"; public static const START:String = "start"; public static const version:Number = 0.9; public static const COMPLETE:String = "complete"; public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.info = _arg2; } override public function clone():Event{ return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable)); } } }//package gs.events
Section 16
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin) package gs.plugins { import gs.*; import flash.display.*; public class AutoAlphaPlugin extends TweenPlugin { protected var _tweenVisible:Boolean; protected var _target:Object; protected var _visible:Boolean; protected var _tween:TweenLite; public static const VERSION:Number = 1; public static const API:Number = 1; public function AutoAlphaPlugin(){ this.propName = "autoAlpha"; this.overwriteProps = ["alpha", "visible"]; this.onComplete = onCompleteTween; } override public function killProps(_arg1:Object):void{ super.killProps(_arg1); _tweenVisible = !(Boolean(("visible" in _arg1))); } public function onCompleteTween():void{ if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){ _target.visible = _visible; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _visible = Boolean(!((_arg2 == 0))); _tweenVisible = true; addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); if (((!((_target.visible == true))) && (_tweenVisible))){ _target.visible = true; }; } } }//package gs.plugins
Section 17
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.filters.*; public class BevelFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BevelFilterPlugin(){ this.propName = "bevelFilter"; this.overwriteProps = ["bevelFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BevelFilter; initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 18
//BezierPlugin (gs.plugins.BezierPlugin) package gs.plugins { import gs.*; import gs.utils.tween.*; public class BezierPlugin extends TweenPlugin { protected var _future:Object; protected var _orient:Boolean; protected var _orientData:Array; protected var _target:Object; protected var _beziers:Object; protected static const _RAD2DEG:Number = 57.2957795130823; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function BezierPlugin(){ _future = {}; super(); this.propName = "bezier"; this.overwriteProps = []; } override public function killProps(_arg1:Object):void{ var _local2:String; for (_local2 in _beziers) { if ((_local2 in _arg1)){ delete _beziers[_local2]; }; }; super.killProps(_arg1); } protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{ var _local5:int; var _local6:String; _target = _arg1.target; if (_arg1.exposedVars.orientToBezier == true){ _orientData = [["x", "y", "rotation", 0]]; _orient = true; } else { if ((_arg1.exposedVars.orientToBezier is Array)){ _orientData = _arg1.exposedVars.orientToBezier; _orient = true; }; }; var _local4:Object = {}; _local5 = 0; while (_local5 < _arg2.length) { for (_local6 in _arg2[_local5]) { if (_local4[_local6] == undefined){ _local4[_local6] = [_arg1.target[_local6]]; }; if (typeof(_arg2[_local5][_local6]) == "number"){ _local4[_local6].push(_arg2[_local5][_local6]); } else { _local4[_local6].push((_arg1.target[_local6] + Number(_arg2[_local5][_local6]))); }; }; _local5++; }; for (_local6 in _local4) { this.overwriteProps[this.overwriteProps.length] = _local6; if (_arg1.exposedVars[_local6] != undefined){ if (typeof(_arg1.exposedVars[_local6]) == "number"){ _local4[_local6].push(_arg1.exposedVars[_local6]); } else { _local4[_local6].push((_arg1.target[_local6] + Number(_arg1.exposedVars[_local6]))); }; delete _arg1.exposedVars[_local6]; _local5 = (_arg1.tweens.length - 1); while (_local5 > -1) { if (_arg1.tweens[_local5].name == _local6){ _arg1.tweens.splice(_local5, 1); }; _local5--; }; }; }; _beziers = parseBeziers(_local4, _arg3); } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), false); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:String; var _local4:Object; var _local5:Number; var _local6:uint; var _local7:Number; var _local8:int; var _local9:Object; var _local10:Boolean; var _local11:Number; var _local12:Number; var _local13:Array; var _local14:Number; if (_arg1 == 1){ for (_local3 in _beziers) { _local2 = (_beziers[_local3].length - 1); _target[_local3] = _beziers[_local3][_local2][2]; }; } else { for (_local3 in _beziers) { _local6 = _beziers[_local3].length; if (_arg1 < 0){ _local2 = 0; } else { if (_arg1 >= 1){ _local2 = (_local6 - 1); } else { _local2 = int((_local6 * _arg1)); }; }; _local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6); _local4 = _beziers[_local3][_local2]; if (this.round){ _local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); _local8 = ((_local7)<0) ? -1 : 1; _target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7); } else { _target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); }; }; }; if (_orient){ _local9 = _target; _local10 = this.round; _target = _future; this.round = false; _orient = false; this.changeFactor = (_arg1 + 0.01); _target = _local9; this.round = _local10; _orient = true; _local2 = 0; while (_local2 < _orientData.length) { _local13 = _orientData[_local2]; _local14 = ((_local13[3]) || (0)); _local11 = (_future[_local13[0]] - _target[_local13[0]]); _local12 = (_future[_local13[1]] - _target[_local13[1]]); _target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14); _local2++; }; }; } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]]; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]]; _local3++; }; } else { _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)]; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)]; _local3++; }; _local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]]; } else { if (_local4.length == 3){ _local5[_local5.length] = [_local4[0], _local4[1], _local4[2]]; } else { if (_local4.length == 2){ _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; }; }; }; return (_local7); } } }//package gs.plugins
Section 19
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin) package gs.plugins { import gs.*; public class BezierThroughPlugin extends BezierPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BezierThroughPlugin(){ this.propName = "bezierThrough"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), true); return (true); } } }//package gs.plugins
Section 20
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.filters.*; public class BlurFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BlurFilterPlugin(){ this.propName = "blurFilter"; this.overwriteProps = ["blurFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BlurFilter; initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 21
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.filters.*; public class ColorMatrixFilterPlugin extends FilterPlugin { protected var _matrix:Array; protected var _matrixTween:EndArrayPlugin; public static const API:Number = 1; public static const VERSION:Number = 1.01; protected static var _lumG:Number = 0.71516; protected static var _lumR:Number = 0.212671; protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; protected static var _lumB:Number = 0.072169; public function ColorMatrixFilterPlugin(){ this.propName = "colorMatrixFilter"; this.overwriteProps = ["colorMatrixFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = ColorMatrixFilter; var _local4:Object = _arg2; initFilter({}, new ColorMatrixFilter(_idMatrix.slice())); _matrix = ColorMatrixFilter(_filter).matrix; var _local5:Array = []; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _local5 = _local4.matrix; } else { if (_local4.relative == true){ _local5 = _matrix.slice(); } else { _local5 = _idMatrix.slice(); }; _local5 = setBrightness(_local5, _local4.brightness); _local5 = setContrast(_local5, _local4.contrast); _local5 = setHue(_local5, _local4.hue); _local5 = setSaturation(_local5, _local4.saturation); _local5 = setThreshold(_local5, _local4.threshold); if (!isNaN(_local4.colorize)){ _local5 = colorize(_local5, _local4.colorize, _local4.amount); }; }; _matrixTween = new EndArrayPlugin(); _matrixTween.init(_matrix, _local5); return (true); } override public function set changeFactor(_arg1:Number):void{ _matrixTween.changeFactor = _arg1; ColorMatrixFilter(_filter).matrix = _matrix; super.changeFactor = _arg1; } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Number = (1 - _arg2); var _local4:Number = (_local3 * _lumR); var _local5:Number = (_local3 * _lumG); var _local6:Number = (_local3 * _lumB); var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function setHue(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); var _local3:Number = Math.cos(_arg2); var _local4:Number = Math.sin(_arg2); var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; var _local3:Array = []; var _local4:int; var _local5:int; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF); var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF); var _local6:Number = ((_arg2 & 0xFF) / 0xFF); var _local7:Number = (1 - _arg3); var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } } }//package gs.plugins
Section 22
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.filters.*; public class DropShadowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function DropShadowFilterPlugin(){ this.propName = "dropShadowFilter"; this.overwriteProps = ["dropShadowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = DropShadowFilter; initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject)); return (true); } } }//package gs.plugins
Section 23
//EndArrayPlugin (gs.plugins.EndArrayPlugin) package gs.plugins { import gs.*; import flash.display.*; import gs.utils.tween.*; public class EndArrayPlugin extends TweenPlugin { protected var _a:Array; protected var _info:Array; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function EndArrayPlugin(){ _info = []; super(); this.propName = "endArray"; this.overwriteProps = ["endArray"]; } public function init(_arg1:Array, _arg2:Array):void{ _a = _arg1; var _local3:int = (_arg2.length - 1); while (_local3 > -1) { if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){ _info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3])); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (false); }; init((_arg1 as Array), _arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:ArrayTweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _a[_local3.index] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } } }//package gs.plugins
Section 24
//FilterPlugin (gs.plugins.FilterPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.filters.*; import gs.utils.tween.*; public class FilterPlugin extends TweenPlugin { protected var _remove:Boolean; protected var _target:Object; protected var _index:int; protected var _filter:BitmapFilter; protected var _type:Class; public static const VERSION:Number = 1.03; public static const API:Number = 1; public function onCompleteTween():void{ var _local1:int; var _local2:Array; if (_remove){ _local2 = _target.filters; if (!(_local2[_index] is _type)){ _local1 = (_local2.length - 1); while (_local1 > -1) { if ((_local2[_local1] is _type)){ _local2.splice(_local1, 1); break; }; _local1--; }; } else { _local2.splice(_index, 1); }; _target.filters = _local2; }; } protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{ var _local4:String; var _local5:int; var _local6:HexColorsPlugin; var _local3:Array = _target.filters; _index = -1; if (_arg1.index != null){ _index = _arg1.index; } else { _local5 = (_local3.length - 1); while (_local5 > -1) { if ((_local3[_local5] is _type)){ _index = _local5; break; }; _local5--; }; }; if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){ _index = ((_arg1.index)!=null) ? _arg1.index : _local3.length; _local3[_index] = _arg2; _target.filters = _local3; }; _filter = _local3[_index]; _remove = Boolean((_arg1.remove == true)); if (_remove){ this.onComplete = onCompleteTween; }; var _local7:Object = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1; for (_local4 in _local7) { if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){ } else { if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){ _local6 = new HexColorsPlugin(); _local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]); _tweens[_tweens.length] = new TweenInfo(_local6, "changeFactor", 0, 1, _local4, false); } else { if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){ _filter[_local4] = _local7[_local4]; } else { addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4); }; }; }; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:TweenInfo; var _local4:Array = _target.filters; _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; if (!(_local4[_index] is _type)){ _index = (_local4.length - 1); _local2 = (_local4.length - 1); while (_local2 > -1) { if ((_local4[_local2] is _type)){ _index = _local2; break; }; _local2--; }; }; _local4[_index] = _filter; _target.filters = _local4; } } }//package gs.plugins
Section 25
//FramePlugin (gs.plugins.FramePlugin) package gs.plugins { import gs.*; import flash.display.*; public class FramePlugin extends TweenPlugin { protected var _target:MovieClip; public var frame:int; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function FramePlugin(){ this.propName = "frame"; this.overwriteProps = ["frame"]; this.round = true; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){ return (false); }; _target = (_arg1 as MovieClip); this.frame = _target.currentFrame; addTween(this, "frame", this.frame, _arg2, "frame"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.gotoAndStop(this.frame); } } }//package gs.plugins
Section 26
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.filters.*; public class GlowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function GlowFilterPlugin(){ this.propName = "glowFilter"; this.overwriteProps = ["glowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = GlowFilter; initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout)); return (true); } } }//package gs.plugins
Section 27
//HexColorsPlugin (gs.plugins.HexColorsPlugin) package gs.plugins { import gs.*; import flash.display.*; public class HexColorsPlugin extends TweenPlugin { protected var _colors:Array; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function HexColorsPlugin(){ this.propName = "hexColors"; this.overwriteProps = []; _colors = []; } override public function killProps(_arg1:Object):void{ var _local2:int = (_colors.length - 1); while (_local2 > -1) { if (_arg1[_colors[_local2][1]] != undefined){ _colors.splice(_local2, 1); }; _local2--; }; super.killProps(_arg1); } public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{ var _local5:Number; var _local6:Number; var _local7:Number; if (_arg3 != _arg4){ _local5 = (_arg3 >> 16); _local6 = ((_arg3 >> 8) & 0xFF); _local7 = (_arg3 & 0xFF); _colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)]; this.overwriteProps[this.overwriteProps.length] = _arg2; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:Array; _local2 = (_colors.length - 1); while (_local2 > -1) { _local3 = _colors[_local2]; _local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7]))); _local2--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; for (_local4 in _arg2) { initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4])); }; return (true); } } }//package gs.plugins
Section 28
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin) package gs.plugins { public class RemoveTintPlugin extends TintPlugin { public static const VERSION:Number = 1.01; public static const API:Number = 1; public function RemoveTintPlugin(){ this.propName = "removeTint"; } } }//package gs.plugins
Section 29
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin) package gs.plugins { import gs.*; import flash.display.*; public class RoundPropsPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function RoundPropsPlugin(){ this.propName = "roundProps"; this.overwriteProps = []; this.round = true; } public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 30
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin) package gs.plugins { import gs.*; import flash.display.*; public class ShortRotationPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function ShortRotationPlugin(){ this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; if (typeof(_arg2) == "number"){ trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})"); return (false); }; for (_local4 in _arg2) { initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]); }; return (true); } public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ var _local5:Number = ((_arg4 - _arg3) % 360); if (((_arg4 - _arg3) % 360) != (_local5 % 180)){ _local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360); }; addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 31
//TintPlugin (gs.plugins.TintPlugin) package gs.plugins { import gs.*; import flash.display.*; import flash.geom.*; import gs.utils.tween.*; public class TintPlugin extends TweenPlugin { protected var _target:DisplayObject; protected var _ct:ColorTransform; protected var _ignoreAlpha:Boolean; public static const VERSION:Number = 1.1; public static const API:Number = 1; protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"]; public function TintPlugin(){ this.propName = "tint"; this.overwriteProps = ["tint"]; } public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{ var _local3:int; var _local4:String; _target = _arg1; _ct = _target.transform.colorTransform; _local3 = (_props.length - 1); while (_local3 > -1) { _local4 = _props[_local3]; if (_ct[_local4] != _arg2[_local4]){ _tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg1 is DisplayObject)){ return (false); }; var _local4:ColorTransform = new ColorTransform(); if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){ _local4.color = uint(_arg2); }; _ignoreAlpha = true; init((_arg1 as DisplayObject), _local4); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:ColorTransform; updateTweens(_arg1); if (_ignoreAlpha){ _local2 = _target.transform.colorTransform; _ct.alphaMultiplier = _local2.alphaMultiplier; _ct.alphaOffset = _local2.alphaOffset; }; _target.transform.colorTransform = _ct; } } }//package gs.plugins
Section 32
//TweenPlugin (gs.plugins.TweenPlugin) package gs.plugins { import gs.*; import gs.utils.tween.*; public class TweenPlugin { public var overwriteProps:Array; protected var _tweens:Array; public var propName:String; public var onComplete:Function; public var round:Boolean; protected var _changeFactor:Number;// = 0 public static const VERSION:Number = 1.03; public static const API:Number = 1; public function TweenPlugin(){ _tweens = []; super(); } protected function updateTweens(_arg1:Number):void{ var _local2:int; var _local3:TweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _changeFactor = _arg1; } protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{ var _local6:Number; if (_arg4 != null){ _local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4); if (_local6 != 0){ _tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false); }; }; } public function killProps(_arg1:Object):void{ var _local2:int; _local2 = (this.overwriteProps.length - 1); while (_local2 > -1) { if ((this.overwriteProps[_local2] in _arg1)){ this.overwriteProps.splice(_local2, 1); }; _local2--; }; _local2 = (_tweens.length - 1); while (_local2 > -1) { if ((_tweens[_local2].name in _arg1)){ _tweens.splice(_local2, 1); }; _local2--; }; } public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName); return (true); } public function get changeFactor():Number{ return (_changeFactor); } public static function activate(_arg1:Array):Boolean{ var _local2:int; var _local3:Object; _local2 = (_arg1.length - 1); while (_local2 > -1) { _local3 = new (_arg1[_local2]); TweenLite.plugins[_local3.propName] = _arg1[_local2]; _local2--; }; return (true); } } }//package gs.plugins
Section 33
//VisiblePlugin (gs.plugins.VisiblePlugin) package gs.plugins { import gs.*; import flash.display.*; public class VisiblePlugin extends TweenPlugin { protected var _target:Object; protected var _visible:Boolean; protected var _tween:TweenLite; public static const VERSION:Number = 1; public static const API:Number = 1; public function VisiblePlugin(){ this.propName = "visible"; this.overwriteProps = ["visible"]; this.onComplete = onCompleteTween; } public function onCompleteTween():void{ if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){ _target.visible = _visible; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _visible = Boolean(_arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ if (_target.visible != true){ _target.visible = true; }; } } }//package gs.plugins
Section 34
//VolumePlugin (gs.plugins.VolumePlugin) package gs.plugins { import gs.*; import flash.media.*; import flash.display.*; public class VolumePlugin extends TweenPlugin { protected var _target:Object; protected var _st:SoundTransform; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function VolumePlugin(){ this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){ return (false); }; _target = _arg1; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, _arg2, "volume"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.soundTransform = _st; } } }//package gs.plugins
Section 35
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo) package gs.utils.tween { public class ArrayTweenInfo { public var change:Number; public var start:Number; public var index:uint; public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){ this.index = _arg1; this.start = _arg2; this.change = _arg3; } } }//package gs.utils.tween
Section 36
//TweenInfo (gs.utils.tween.TweenInfo) package gs.utils.tween { public class TweenInfo { public var start:Number; public var name:String; public var change:Number; public var target:Object; public var property:String; public var isPlugin:Boolean; public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; } } }//package gs.utils.tween
Section 37
//OverwriteManager (gs.OverwriteManager) package gs { import flash.utils.*; import gs.utils.tween.*; import flash.errors.*; public class OverwriteManager { public static const ALL:int = 1; public static const NONE:int = 0; public static const AUTO:int = 2; public static const CONCURRENT:int = 3; public static const version:Number = 3.12; public static var mode:int; public static var enabled:Boolean; public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array):void{ var _local4:int; var _local5:String; var _local6:TweenInfo; _local4 = (_arg3.length - 1); while (_local4 > -1) { _local6 = _arg3[_local4]; if ((_local6.name in _arg1)){ _arg3.splice(_local4, 1); } else { if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){ _local6.target.killProps(_arg1); if (_local6.target.overwriteProps.length == 0){ _arg3.splice(_local4, 1); }; }; }; _local4--; }; for (_local5 in _arg1) { delete _arg2[_local5]; }; } public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{ var _local7:int; var _local8:TweenLite; var _local10:Array; var _local11:Object; var _local12:int; var _local13:TweenInfo; var _local14:Array; var _local3:Object = _arg1.vars; var _local4:int = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite); if ((((_local4 < 2)) || ((_arg2 == null)))){ return; }; var _local5:Number = _arg1.startTime; var _local6:Array = []; var _local9 = -1; _local7 = (_arg2.length - 1); while (_local7 > -1) { _local8 = _arg2[_local7]; if (_local8 == _arg1){ _local9 = _local7; } else { if ((((((_local7 < _local9)) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){ _local6[_local6.length] = _local8; }; }; _local7--; }; if ((((_local6.length == 0)) || ((_arg1.tweens.length == 0)))){ return; }; if (_local4 == AUTO){ _local10 = _arg1.tweens; _local11 = {}; _local7 = (_local10.length - 1); while (_local7 > -1) { _local13 = _local10[_local7]; if (_local13.isPlugin){ if (_local13.name == "_MULTIPLE_"){ _local14 = _local13.target.overwriteProps; _local12 = (_local14.length - 1); while (_local12 > -1) { _local11[_local14[_local12]] = true; _local12--; }; } else { _local11[_local13.name] = true; }; _local11[_local13.target.propName] = true; } else { _local11[_local13.name] = true; }; _local7--; }; _local7 = (_local6.length - 1); while (_local7 > -1) { killVars(_local11, _local6[_local7].exposedVars, _local6[_local7].tweens); _local7--; }; } else { _local7 = (_local6.length - 1); while (_local7 > -1) { _local6[_local7].enabled = false; _local7--; }; }; } public static function init(_arg1:int=2):int{ if (TweenLite.version < 10.09){ trace("TweenLite warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."); }; TweenLite.overwriteManager = OverwriteManager; mode = _arg1; enabled = true; return (mode); } } }//package gs
Section 38
//TweenLite (gs.TweenLite) package gs { import flash.events.*; import flash.display.*; import flash.utils.*; import gs.utils.tween.*; import gs.plugins.*; public class TweenLite { public var started:Boolean; public var delay:Number; protected var _hasUpdate:Boolean; protected var _hasPlugins:Boolean; public var initted:Boolean; public var active:Boolean; public var startTime:Number; public var target:Object; public var duration:Number; public var gc:Boolean; public var tweens:Array; public var vars:Object; public var ease:Function; public var exposedVars:Object; public var initTime:Number; public var combinedTimeScale:Number; public static const version:Number = 10.09; private static var _timer:Timer = new Timer(2000); public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var currentTime:uint; public static var masterList:Dictionary = new Dictionary(false); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1}; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public static var timingSprite:Sprite = new Sprite(); public static var overwriteManager:Object; private static var _tlInitted:Boolean; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ if (_arg1 == null){ return; }; if (!_tlInitted){ TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]); currentTime = getTimer(); timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; _timer.addEventListener("timer", killGarbage, false, 0, true); _timer.start(); _tlInitted = true; }; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); this.combinedTimeScale = ((_arg3.timeScale) || (1)); this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0)))); this.target = _arg1; if (typeof(this.vars.ease) != "function"){ this.vars.ease = defaultEase; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; this.ease = this.vars.ease; this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars; this.tweens = []; this.initTime = currentTime; this.startTime = (this.initTime + (this.delay * 1000)); var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); if (((!((_arg1 in masterList))) || ((_local4 == 1)))){ masterList[_arg1] = [this]; } else { masterList[_arg1].push(this); }; if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){ initTweenVals(); if (this.active){ render((this.startTime + 1)); } else { render(this.startTime); }; if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){ this.target.visible = this.exposedVars.visible; }; }; } public function get enabled():Boolean{ return ((this.gc) ? false : true); } public function set enabled(_arg1:Boolean):void{ var _local2:Array; var _local3:Boolean; var _local4:int; if (_arg1){ if (!(this.target in masterList)){ masterList[this.target] = [this]; } else { _local2 = masterList[this.target]; _local4 = (_local2.length - 1); while (_local4 > -1) { if (_local2[_local4] == this){ _local3 = true; break; }; _local4--; }; if (!_local3){ _local2[_local2.length] = this; }; }; }; this.gc = (_arg1) ? false : true; if (this.gc){ this.active = false; } else { this.active = this.started; }; } public function clear():void{ this.tweens = []; this.vars = (this.exposedVars = {ease:this.vars.ease}); _hasUpdate = false; } public function render(_arg1:uint):void{ var _local3:Number; var _local4:TweenInfo; var _local5:int; var _local2:Number = ((_arg1 - this.startTime) * 0.001); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change)); _local5--; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } public function activate():void{ this.started = (this.active = true); if (!this.initted){ initTweenVals(); }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; } public function initTweenVals():void{ var _local1:String; var _local2:int; var _local3:*; var _local4:TweenInfo; if (((!((this.exposedVars.timeScale == undefined))) && ((this.target is TweenLite)))){ this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false); }; for (_local1 in this.exposedVars) { if ((_local1 in _reservedProps)){ } else { if ((_local1 in plugins)){ _local3 = new (plugins[_local1]); if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){ this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false); } else { this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true); _hasPlugins = true; }; } else { this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false); }; }; }; if (this.vars.runBackwards == true){ _local2 = (this.tweens.length - 1); while (_local2 > -1) { _local4 = this.tweens[_local2]; this.tweens[_local2].start = (_local4.start + _local4.change); _local4.change = -(_local4.change); _local2--; }; }; if (this.vars.onUpdate != null){ _hasUpdate = true; }; if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){ overwriteManager.manageOverwrites(this, masterList[this.target]); }; this.initted = true; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function killVars(_arg1:Object):void{ if (overwriteManager.enabled){ overwriteManager.killVars(_arg1, this.exposedVars, this.tweens); }; } public function complete(_arg1:Boolean=false):void{ var _local2:int; if (!_arg1){ if (!this.initted){ initTweenVals(); }; this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale)); render(currentTime); return; }; if (_hasPlugins){ _local2 = (this.tweens.length - 1); while (_local2 > -1) { if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){ this.tweens[_local2].target.onComplete(); }; _local2--; }; }; if (this.vars.persist != true){ this.enabled = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public static function updateAll(_arg1:Event=null):void{ var _local4:Array; var _local5:int; var _local6:TweenLite; var _local2:uint = (currentTime = getTimer()); var _local3:Dictionary = masterList; for each (_local4 in _local3) { _local5 = (_local4.length - 1); while (_local5 > -1) { _local6 = _local4[_local5]; if (_local6.active){ _local6.render(_local2); } else { if (_local6.gc){ _local4.splice(_local5, 1); } else { if (_local2 >= _local6.startTime){ _local6.activate(); _local6.render(_local2); }; }; }; _local5--; }; }; } public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{ if (_arg1 != null){ if (_arg2){ _arg1.clear(); }; _arg1.enabled = false; }; } public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; var _local5:TweenLite; if (((!((_arg1 == null))) && ((_arg1 in masterList)))){ _local3 = masterList[_arg1]; _local4 = (_local3.length - 1); while (_local4 > -1) { _local5 = _local3[_local4]; if (((_arg2) && (!(_local5.gc)))){ _local5.complete(false); }; _local5.clear(); _local4--; }; delete masterList[_arg1]; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } protected static function killGarbage(_arg1:TimerEvent):void{ var _local3:Object; var _local2:Dictionary = masterList; for (_local3 in _local2) { if (_local2[_local3].length == 0){ delete _local2[_local3]; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0})); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 39
//TweenMax (gs.TweenMax) package gs { import flash.events.*; import flash.utils.*; import gs.utils.tween.*; import gs.plugins.*; import gs.events.*; public class TweenMax extends TweenLite implements IEventDispatcher { protected var _dispatcher:EventDispatcher; protected var _callbacks:Object; public var pauseTime:Number; protected var _repeatCount:Number; protected var _timeScale:Number; public static const version:Number = 10.1; public static var removeTween:Function = TweenLite.removeTween; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(); ; protected static var _pausedTweens:Dictionary = new Dictionary(false); protected static var _globalTimeScale:Number = 1; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]); public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ super(_arg1, _arg2, _arg3); if (TweenLite.version < 10.09){ trace("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."); }; if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenMax)))){ _timeScale = 1; this.combinedTimeScale = _globalTimeScale; } else { _timeScale = this.combinedTimeScale; this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale); }; if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){ this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); if ((((_arg2 == 0)) && ((this.delay == 0)))){ onUpdateDispatcher(); onCompleteDispatcher(); }; }; _repeatCount = 0; if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){ this.vars.persist = true; }; if ((((this.delay == 0)) && (!((this.exposedVars.startAt == null))))){ this.exposedVars.startAt.overwrite = 0; new TweenMax(this.target, 0, this.exposedVars.startAt); }; } public function dispatchEvent(_arg1:Event):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.dispatchEvent(_arg1)); } public function get reversed():Boolean{ return ((this.ease == reverseEase)); } public function set reversed(_arg1:Boolean):void{ if (this.reversed != _arg1){ reverse(); }; } public function get progress():Number{ var _local1:Number = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime; var _local2:Number = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale); if (_local2 > 1){ return (1); }; if (_local2 < 0){ return (0); }; return (_local2); } override public function set enabled(_arg1:Boolean):void{ if (!_arg1){ _pausedTweens[this] = null; delete _pausedTweens[this]; }; super.enabled = _arg1; if (_arg1){ this.combinedTimeScale = (_timeScale * _globalTimeScale); }; } protected function onStartDispatcher(... _args):void{ if (_callbacks.onStart != null){ _callbacks.onStart.apply(null, this.vars.onStartParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local5:int; var _local6:TweenInfo; var _local7:Object; var _local8:Object; var _local9:Array; var _local10:Boolean; var _local11:Array; var _local12:Object; var _local4:Number = this.progress; if (this.initted){ if (!_arg3){ _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local6 = this.tweens[_local5]; if (_local6.name == _arg1){ _local6.target[_local6.property] = _local6.start; }; _local5--; }; }; _local7 = this.vars; _local8 = this.exposedVars; _local9 = this.tweens; _local10 = _hasPlugins; this.tweens = []; this.vars = (this.exposedVars = {}); this.vars[_arg1] = _arg2; initTweenVals(); if (((!((this.ease == reverseEase))) && ((_local7.ease is Function)))){ this.ease = _local7.ease; }; if (((_arg3) && (!((_local4 == 0))))){ adjustStartValues(); }; _local11 = this.tweens; this.vars = _local7; this.exposedVars = _local8; this.tweens = _local9; _local12 = {}; _local12[_arg1] = true; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local6 = this.tweens[_local5]; if (_local6.name == _arg1){ this.tweens.splice(_local5, 1); } else { if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){ _local6.target.killProps(_local12); if (_local6.target.overwriteProps.length == 0){ this.tweens.splice(_local5, 1); }; }; }; _local5--; }; this.tweens = this.tweens.concat(_local11); _hasPlugins = Boolean(((_local10) || (_hasPlugins))); }; this.vars[_arg1] = (this.exposedVars[_arg1] = _arg2); } override public function initTweenVals():void{ var _local1:int; var _local2:int; var _local3:String; var _local4:String; var _local5:Array; var _local6:Object; var _local7:TweenInfo; if (((!((this.exposedVars.startAt == null))) && (!((this.delay == 0))))){ this.exposedVars.startAt.overwrite = 0; new TweenMax(this.target, 0, this.exposedVars.startAt); }; super.initTweenVals(); if ((((this.exposedVars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){ _local5 = this.exposedVars.roundProps; _local1 = (_local5.length - 1); while (_local1 > -1) { _local3 = _local5[_local1]; _local2 = (this.tweens.length - 1); while (_local2 > -1) { _local7 = this.tweens[_local2]; if (_local7.name == _local3){ if (_local7.isPlugin){ _local7.target.round = true; } else { if (_local6 == null){ _local6 = new TweenLite.plugins.roundProps(); _local6.add(_local7.target, _local3, _local7.start, _local7.change); _hasPlugins = true; this.tweens[_local2] = new TweenInfo(_local6, "changeFactor", 0, 1, _local3, true); } else { _local6.add(_local7.target, _local3, _local7.start, _local7.change); this.tweens.splice(_local2, 1); }; }; } else { if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){ _local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " "); if (_local4.indexOf(((" " + _local3) + " ")) != -1){ _local7.target.round = true; }; }; }; _local2--; }; _local1--; }; }; } public function restart(_arg1:Boolean=false):void{ if (_arg1){ this.initTime = currentTime; this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale))); } else { this.startTime = currentTime; this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale))); }; _repeatCount = 0; if (this.target != this.vars.onComplete){ render(this.startTime); }; this.pauseTime = NaN; _pausedTweens[this] = null; delete _pausedTweens[this]; this.enabled = true; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if ((((_arg1 == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){ this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } protected function adjustStartValues():void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:TweenInfo; var _local6:int; var _local1:Number = this.progress; if (_local1 != 0){ _local2 = this.ease(_local1, 0, 1, 1); _local3 = (1 / (1 - _local2)); _local6 = (this.tweens.length - 1); while (_local6 > -1) { _local5 = this.tweens[_local6]; _local4 = (_local5.start + _local5.change); if (_local5.isPlugin){ _local5.change = ((_local4 - _local2) * _local3); } else { _local5.change = ((_local4 - _local5.target[_local5.property]) * _local3); }; _local5.start = (_local4 - _local5.change); _local6--; }; }; } override public function render(_arg1:uint):void{ var _local3:Number; var _local4:TweenInfo; var _local5:int; var _local2:Number = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change)); _local5--; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } protected function initDispatcher():void{ var _local1:Object; var _local2:String; if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); _callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete}; if (this.vars.isTV == true){ this.vars = this.vars.clone(); } else { _local1 = {}; for (_local2 in this.vars) { _local1[_local2] = this.vars[_local2]; }; this.vars = _local1; }; this.vars.onStart = onStartDispatcher; this.vars.onComplete = onCompleteDispatcher; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; }; } public function willTrigger(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.willTrigger(_arg1)); } public function set progress(_arg1:Number):void{ this.startTime = (currentTime - ((this.duration * _arg1) * 1000)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); if (!this.started){ activate(); }; render(currentTime); if (!isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.active = false; }; } public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; var _local3:Number = this.progress; if (((_arg1) && ((_local3 > 0)))){ this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); }; if (_arg2 != false){ if (_local3 < 1){ resume(); } else { restart(); }; }; } protected function onUpdateDispatcher(... _args):void{ if (_callbacks.onUpdate != null){ _callbacks.onUpdate.apply(null, this.vars.onUpdateParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); } public function set paused(_arg1:Boolean):void{ if (_arg1){ pause(); } else { resume(); }; } public function resume():void{ this.enabled = true; if (!isNaN(this.pauseTime)){ this.initTime = (this.initTime + (currentTime - this.pauseTime)); this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); this.pauseTime = NaN; if (((!(this.started)) && ((currentTime >= this.startTime)))){ activate(); } else { this.active = this.started; }; _pausedTweens[this] = null; delete _pausedTweens[this]; }; } public function get paused():Boolean{ return (!(isNaN(this.pauseTime))); } public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4)); } public function killProperties(_arg1:Array):void{ var _local3:int; var _local2:Object = {}; _local3 = (_arg1.length - 1); while (_local3 > -1) { _local2[_arg1[_local3]] = true; _local3--; }; killVars(_local2); } public function hasEventListener(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.hasEventListener(_arg1)); } public function pause():void{ if (isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.enabled = false; _pausedTweens[this] = this; }; } override public function complete(_arg1:Boolean=false):void{ if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){ _repeatCount++; if (!isNaN(this.vars.yoyo)){ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; }; this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime; this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); } else { if (this.vars.persist == true){ pause(); }; }; super.complete(_arg1); } public function set timeScale(_arg1:Number):void{ if (_arg1 < 1E-5){ _arg1 = (_timeScale = 1E-5); } else { _timeScale = _arg1; _arg1 = (_arg1 * _globalTimeScale); }; this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1))); if (this.startTime != 999999999999999){ this.startTime = (this.initTime + (this.delay * (1000 / _arg1))); }; this.combinedTimeScale = _arg1; } public function invalidate(_arg1:Boolean=true):void{ var _local2:Number; if (this.initted){ _local2 = this.progress; if (((!(_arg1)) && (!((_local2 == 0))))){ this.progress = 0; }; this.tweens = []; _hasPlugins = false; this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars; initTweenVals(); _timeScale = ((this.vars.timeScale) || (1)); this.combinedTimeScale = (_timeScale * _globalTimeScale); this.delay = ((this.vars.delay) || (0)); if (isNaN(this.pauseTime)){ this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale)); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ if (_dispatcher != null){ this.vars.onStart = _callbacks.onStart; this.vars.onUpdate = _callbacks.onUpdate; this.vars.onComplete = _callbacks.onComplete; _dispatcher = null; }; initDispatcher(); }; if (_local2 != 0){ if (_arg1){ adjustStartValues(); } else { this.progress = _local2; }; }; }; } public function get timeScale():Number{ return (_timeScale); } protected function onCompleteDispatcher(... _args):void{ if (_callbacks.onComplete != null){ _callbacks.onComplete.apply(null, this.vars.onCompleteParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } public static function set globalTimeScale(_arg1:Number):void{ setGlobalTimeScale(_arg1); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(true, _arg1, _arg2); } public static function killAllDelayedCalls(_arg1:Boolean=false):void{ killAll(_arg1, false, true); } public static function setGlobalTimeScale(_arg1:Number):void{ var _local3:int; var _local4:Array; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; var _local2:Dictionary = masterList; _globalTimeScale = _arg1; for each (_local4 in _local2) { _local3 = (_local4.length - 1); while (_local3 > -1) { if ((_local4[_local3] is TweenMax)){ _local4[_local3].timeScale = (_local4[_local3].timeScale * 1); }; _local3--; }; }; } public static function get globalTimeScale():Number{ return (_globalTimeScale); } public static function getTweensOf(_arg1:Object):Array{ var _local4:TweenLite; var _local5:int; var _local2:Array = masterList[_arg1]; var _local3:Array = []; if (_local2 != null){ _local5 = (_local2.length - 1); while (_local5 > -1) { if (!_local2[_local5].gc){ _local3[_local3.length] = _local2[_local5]; }; _local5--; }; }; for each (_local4 in _pausedTweens) { if (_local4.target == _arg1){ _local3[_local3.length] = _local4; }; }; return (_local3); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, persist:_arg4, overwrite:0})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array = getTweensOf(_arg1); var _local3:int = (_local2.length - 1); while (_local3 > -1) { if (((((_local2[_local3].active) || ((_local2[_local3].startTime == currentTime)))) && (!(_local2[_local3].gc)))){ return (true); }; _local3--; }; return (false); } public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local5:Boolean; var _local4:Array = getAllTweens(); var _local6:int = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){ _local4[_local6].paused = _arg1; }; _local6--; }; } public static function killAllTweens(_arg1:Boolean=false):void{ killAll(_arg1, true, false); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local5:Boolean; var _local6:int; var _local4:Array = getAllTweens(); _local6 = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ if (_arg1){ _local4[_local6].complete(false); _local4[_local6].clear(); } else { TweenLite.removeTween(_local4[_local6], true); }; }; _local6--; }; } public static function getAllTweens():Array{ var _local3:Array; var _local4:int; var _local5:TweenLite; var _local1:Dictionary = masterList; var _local2:Array = []; for each (_local3 in _local1) { _local4 = (_local3.length - 1); while (_local4 > -1) { if (!_local3[_local4].gc){ _local2[_local2.length] = _local3[_local4]; }; _local4--; }; }; for each (_local5 in _pausedTweens) { _local2[_local2.length] = _local5; }; return (_local2); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(false, _arg1, _arg2); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } } }//package gs
Section 40
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showClickAwayAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; var sendHostProgress:Boolean; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var clip:Object; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; var depth:Number = options.depth; delete options.depth; var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array = _arg2.split("."); var _local4:Number = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var bar:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }, progress_override:function (_arg1:Object):Number{ return (NaN); }, bar_offset:0}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = (10 + options.bar_offset); bar.y = (h - 20); }; var bar_w:Number = ((w - bar.x) - 10); var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo(bar_w, 0); backing.lineTo(bar_w, 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo(bar_w, 0); inside.lineTo(bar_w, 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo(bar_w, 0); outline.lineTo(bar_w, 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var progress:Number = Math.min(1, options.progress_override(clip)); var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; if (!isNaN(progress)){ complete = (progress == 1); } else { if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){ complete = true; } else { if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local12:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; var _local7:Number = Math.min(1, options.progress_override(_local1)); if (_local7 == 1){ complete = true; }; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local8:Number = ((100 * _local6) / _local5); if (!isNaN(_local7)){ _local8 = (100 * _local7); }; var _local9:Number = ((100 * _local3) / chk.ad_msec); var _local10:Object = this._mochiad_bar._inside; var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9)); _local11 = Math.max(this.last_pcnt, _local11); this.last_pcnt = _local11; _local10.scaleX = (_local11 * 0.01); options.ad_progress(_local11); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8}); if (_local8 >= 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local12 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (unloaded){ MochiAd.unload(_local1); } else { if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 41
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const LOGGED_IN:String = "LoggedIn"; public static const STORE_ITEMS:String = "StoreItems"; public static const NO_USER:String = "NoUser"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const ITEM_NEW:String = "ItemNew"; public static const USER_INFO:String = "UserInfo"; public static const IO_ERROR:String = "IOError"; public static const ITEM_OWNED:String = "ItemOwned"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const ERROR:String = "Error"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_HIDE:String = "LoginHide"; public static const LOGIN_SHOW:String = "LoginShow"; public static const STORE_SHOW:String = "StoreShow"; public static const PROFILE_HIDE:String = "ProfileHide"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static function showItem(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("coins_saveUserProperties", _arg1); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showLoginWidget", {options:_arg1}); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showStore(_arg1:Object=null):void{ MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getUserInfo():void{ MochiServices.send("coins_getUserInfo"); } public static function hideLoginWidget():void{ MochiServices.send("coins_hideLoginWidget"); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function showVideo(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } } }//package mochi.as3
Section 42
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function reencode():void{ var _local1:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function set value(_arg1:Number):void{ setValue(_arg1); } public function toString():String{ var _local1:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 43
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ eventTable = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ return; }; for (_local3 in eventTable[_arg1]) { var _local6 = eventTable[_arg1]; _local6[_local3](_arg2); }; } public function removeEventListener(_arg1:String, _arg2:Function):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ eventTable[_arg1] = []; return; }; for (_local3 in eventTable[_arg1]) { if (eventTable[_arg1][_local3] != _arg2){ } else { eventTable[_arg1].splice(Number(_local3), 1); }; }; } public function addEventListener(_arg1:String, _arg2:Function):void{ removeEventListener(_arg1, _arg2); eventTable[_arg1].push(_arg2); } } }//package mochi.as3
Section 44
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function startSession(_arg1:String):void{ MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{ var _local4:Object; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; _local3.clip = _arg1; MochiServices.send("events_setNotifications", _local3, null, null); } public static function endGame():void{ var _local1:Number = (new Date().time - gameStart); trigger("end_game", {time:_local1}); } public static function startGame():void{ gameStart = new Date().time; trigger("start_game"); } public static function trigger(_arg1:String, _arg2:Object=null):void{ if (_arg2 == null){ _arg2 = {}; } else { if (_arg2["kind"] != undefined){ trace("WARNING: optional arguements package contains key 'id', it will be overwritten"); _arg2["kind"] = _arg1; }; }; MochiServices.send("events_triggerEvent", {eventObject:_arg2}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startLevel():void{ levelStart = new Date().time; trigger("start_level"); } public static function endLevel():void{ var _local1:Number = (new Date().time - levelStart); trigger("end_level", {time:_local1}); } } }//package mochi.as3
Section 45
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ delete options.clip; MochiServices.setContainer(); MochiServices.bringToTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.warnID(options.boardID, true); trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; var _local2:Object = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiServices.warnID(_arg1, true); MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 46
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; public static var servicesSync:MochiSync = new MochiSync(); private static var _clip:MovieClip; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _loader:Loader; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = _clip._callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete _clip._callbacks[cb]; } public static function get childClip():Object{ return (_clip); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local4:int; var _local14:Loader; var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var _local6:Array = [0, 64, 0, 0, 0]; var _local7:MovieClip = new MovieClip(); var _local8:LocalConnection = new LocalConnection(); var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); var _local10:ByteArray = new ByteArray(); var _local11:ByteArray = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); var _local12:uint = ((_local3.length + _local11.length) + 4); var _local13:uint = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); var _local2:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function warnID(_arg1:String, _arg2:Boolean):void{ _arg1 = _arg1.toLowerCase(); if (_arg1.length != 16){ trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (_arg1 == "1e113c7239048b3f"){ if (_arg2){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (_arg1 == "84993a1de4031cd8"){ if (_arg2){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; var _local3:Number = 0; while (_local3 < _arg1.length) { switch (_arg1.charAt(_local3)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + _arg1)); return; }; _local3++; }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _mochiLocalConnection.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.3 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_clip._queue))){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(_arg1:Object):void{ var _local2:String = _arg1.target; var _local3:String = _arg1.event; switch (_local2){ case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "sync": servicesSync.triggerEvent(_arg1.event, _arg1.args); break; }; } private static function urlOptions(_arg1:Object):Object{ var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; var _local2:Object = {}; if (_arg1.stage){ _local3 = _arg1.stage.loaderInfo.parameters.mochiad_options; } else { _local3 = _arg1.loaderInfo.parameters.mochiad_options; }; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function loadError(_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_clip._queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function loadLCBridge(_arg1:Object):void{ var loader:Loader; var clip = _arg1; loader = new Loader(); var mochiLCURL:String = (_servURL + _mochiLC); var req:URLRequest = new URLRequest(mochiLCURL); var complete:Function = function (_arg1:Object):void{ _mochiLocalConnection = MovieClip(loader.content); listen(); }; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var _local3:String = ("_mochiservices_com_" + _arg1); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; var _local4:String = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local4 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(_local4); _clip = createEmptyMovieClip(_arg2, _local3, 10336, false); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); var _local5:URLRequest = new URLRequest(_local4); var _local6:URLVariables = new URLVariables(); _local6.listenLC = _listenChannelName; _local6.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local6.api_version = getVersion(); if (widget){ _local6.widget = true; }; _local5.data = _local6; _loader.load(_local5); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; warnID(id, false); if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function bringToTop(_arg1:Event=null):void{ var e = _arg1; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 47
//MochiSync (mochi.as3.MochiSync) package mochi.as3 { import flash.utils.*; public dynamic class MochiSync extends Proxy { private var _syncContainer:Object; public static var SYNC_PROPERTY:String = "UpdateProperty"; public static var SYNC_REQUEST:String = "SyncRequest"; public function MochiSync():void{ _syncContainer = {}; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ if (_syncContainer[_arg1] == _arg2){ return; }; var _local3:String = _arg1.toString(); _syncContainer[_local3] = _arg2; MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ return (_syncContainer[_arg1]); } public function triggerEvent(_arg1:String, _arg2:Object):void{ switch (_arg1){ case SYNC_REQUEST: MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY: _syncContainer[_arg2.name] = _arg2.value; break; }; } } }//package mochi.as3
Section 48
//Actor (Actor) package { import flash.events.*; import flash.display.*; import flash.utils.*; public class Actor extends MovieClip { public var spriteSheetBitmapBaseName:String;// = "" private var freezeClip:MovieClip; private var _currentTile:Tile; public var moveOptions:Array; private var _zDepth:int; public var count:uint;// = 0 private var animHeight:Number;// = 32 public var eventRef:String; public var passive:Boolean; public var snapThresh:Number;// = 1 private var animWidth:Number;// = 32 private var currAnimRef:String; public var removeMe:Boolean; private var ssExtension:String;// = "" public var spawnTile:Tile; private var _frozen:Boolean; private var tileSize:Number;// = 12 private var _ydir:int;// = 0 private var trailTile:Tile; public var health:int;// = 100 public var trailLinkage:String;// = "" private var animTickCount:int;// = 0 private var currAnim:SpriteSheet; public var queuedMove:Object; public var speedX:Number;// = 0 public var maxMoveSpeed:Number;// = 10 private var _xdir:int;// = 0 private var _moveSpeed:Number; public var speedY:Number;// = 0 private var lastTile:Tile; public var currentMoveSpeed:Number; public static var effectsLayer:MovieClip; public static var useTrails:Boolean = false; public static var numCols:int; public static var list:Array = []; public static var numRows:int; public function Actor(){ list.push(this); zDepth = 0; } public function die():void{ queuedMove = null; health = 0; xdir = (ydir = (speedX = (speedY = 0))); removeCurrentAnimation(); dispatchEvent(new Event("onDeath")); } public function distanceBetweenTiles(_arg1:Tile, _arg2:Tile):Number{ return (getDistance(_arg2.x, _arg2.y, _arg1.x, _arg1.y)); } public function spawn():void{ currAnimRef = ""; gotoAndStop("idle"); setAnimation("idle"); health = 100; passive = false; poorlySick(false); snapToSpawnTile(); stopCurrentMove(); } public function checkJunction():void{ var _local1:Tile; var _local2:Tile; var _local3:Tile; var _local4:Tile; var _local5:Boolean; if (((!((currentTile == lastTile))) && (nextTile))){ moveOptions = []; if (canWalkToTile(nextTile)){ moveOptions.push({x:xdir, y:ydir}); }; if (xdir != 0){ _local1 = Tile.getTileInstance((currentTile.rowID - 1), currentTile.colID); _local2 = Tile.getTileInstance((currentTile.rowID + 1), currentTile.colID); if (canWalkToTile(_local1)){ moveOptions.push({x:0, y:-1}); }; if (canWalkToTile(_local2)){ moveOptions.push({x:0, y:1}); }; } else { if (ydir != 0){ _local3 = Tile.getTileInstance(currentTile.rowID, (currentTile.colID - 1)); _local4 = Tile.getTileInstance(currentTile.rowID, (currentTile.colID + 1)); if (canWalkToTile(_local3)){ moveOptions.push({x:-1, y:0}); }; if (canWalkToTile(_local4)){ moveOptions.push({x:1, y:0}); }; }; }; if (moveOptions.length >= 1){ _local5 = false; if (moveOptions.length == 1){ if ((((moveOptions[0].x == xdir)) || ((moveOptions[0].y == ydir)))){ } else { _local5 = true; }; } else { _local5 = true; }; if (_local5){ onJunctionMet(); }; }; if (currentTile == spawnTile){ onSpawnTileMet(); }; lastTile = currentTile; }; } public function canWalkToTile(_arg1:Tile):Boolean{ return (_arg1.walkable); } public function snapToSpawnTile():void{ setPosition(spawnTile.rowID, spawnTile.colID); } public function onJunctionMet():void{ } public function stopCurrentMove():void{ xdir = (ydir = 0); speedX = (speedY = 0); snapToCurrentTile(); setAnimation("idle"); } public function get useSpriteSheet():Boolean{ return (!((spriteSheetBitmapBaseName == ""))); } public function poorlySick(_arg1:Boolean=true):void{ if (_arg1){ ssExtension = "2"; currentMoveSpeed = (moveSpeed * 0.6); } else { ssExtension = ""; currentMoveSpeed = moveSpeed; }; updateSpriteSheetDirection(true); } public function get xdir():int{ return (_xdir); } private function onSpriteSheetAnimationComplete(_arg1:Event):void{ switch (currAnimRef){ }; } public function distanceFromTile(_arg1:Tile):Number{ return (getDistance((x + speedX), (y + speedY), (_arg1.x + (tileSize / 2)), (_arg1.y + (tileSize / 2)))); } public function tick():void{ var _local1:Number; if (((isAlive) && (!(frozen)))){ if (currentTile){ _local1 = distanceFromTile(currentTile); if (_local1 < (tileSize / 2)){ if (_local1 < snapThresh){ if ((this is Enemy)){ checkJunction(); }; }; if ((this is Player)){ collectItemFromCurrentTile(); }; }; if (nextTile){ if (!canWalkToTile(nextTile)){ if (_local1 < snapThresh){ stopCurrentMove(); }; }; }; addTrail(); } else { if ((x + speedX) < -(tileSize)){ x = (numCols * tileSize); } else { if ((x + speedX) > ((numCols * tileSize) + tileSize)){ x = -(tileSize); }; }; }; x = (x + speedX); y = (y + speedY); if ((count % 2) == 0){ checkCollisions(); }; if (((((count % 30) == 0)) && (queuedMove))){ queuedMove = null; }; }; if (((currAnim) && (((animTickCount % 5) == 0)))){ currAnim.tick(); }; animTickCount++; count++; } public function snapToCurrentTile():void{ setPosition(currentTile.rowID, currentTile.colID); } public function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:* = (_arg3 - _arg1); var _local6:* = (_arg4 - _arg2); return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))); } public function checkCollisions():void{ } public function set xdir(_arg1:int):void{ _xdir = _arg1; } public function setPosition(_arg1:int, _arg2:int):void{ x = ((_arg2 * tileSize) + (tileSize / 2)); y = ((_arg1 * tileSize) + (tileSize / 2)); if (!spawnTile){ spawnTile = Tile.getTileInstance(_arg1, _arg2); }; } public function get frozen():Boolean{ return (_frozen); } private function removeCurrentAnimation():void{ if (currAnim){ currAnim.removeEventListener("onSpriteSheetAnimationComplete", onSpriteSheetAnimationComplete); currAnim.destroy(); removeChild(currAnim); currAnim = null; }; } public function set frozen(_arg1:Boolean):void{ if (_arg1){ if (!freezeClip){ freezeClip = new Freeze(); addChild(freezeClip); }; } else { if (freezeClip){ removeChild(freezeClip); freezeClip = null; }; }; _frozen = _arg1; } public function get nextTile():Tile{ var _local1:Tile; if (currentTile){ _local1 = Tile.getTileInstance((currentTile.rowID + ydir), (currentTile.colID + xdir)); if (_local1){ return (_local1); }; }; return (null); } public function get isAlive():Boolean{ return ((health > 0)); } private function onTrailComplete(_arg1:Event):void{ var _local2:Trail = Trail(_arg1.target); if (effectsLayer.contains(_local2)){ effectsLayer.removeChild(_local2); }; } public function collectItemFromCurrentTile():void{ if (passive){ return; }; if (currentTile.item){ if ((currentTile.item is Dot)){ eventRef = "dot"; } else { if ((currentTile.item is Pill)){ eventRef = GameController.PICKUP_MODE_PILL; } else { if ((currentTile.item is Powerup)){ eventRef = GameController.PICKUP_MODE_POWERUP; } else { if ((currentTile.item is Portal)){ eventRef = GameController.PICKUP_MODE_PORTAL; } else { if ((currentTile.item is Freeze)){ eventRef = GameController.PICKUP_MODE_FREEZE; }; }; }; }; }; currentTile.removeItem(); dispatchEvent(new Event("onCollect")); }; } private function setAnimation(_arg1:String, _arg2:Boolean=false):void{ if (!_arg2){ if ((((currAnimRef == _arg1)) || (!(useSpriteSheet)))){ return; }; }; currAnimRef = _arg1; removeCurrentAnimation(); var _local3 = 3; switch (_arg1){ case "idle": currAnim = new SpriteSheet(1, _local3, animWidth, animHeight, "stop", 0, 1, true); currAnim.initialise([((spriteSheetBitmapBaseName + "_front") + ssExtension)]); break; case "up": currAnim = new SpriteSheet(1, _local3, animWidth, animHeight, "pingpong", 0, 1, true); currAnim.initialise([((spriteSheetBitmapBaseName + "_back") + ssExtension)]); break; case "down": currAnim = new SpriteSheet(1, _local3, animWidth, animHeight, "pingpong", 0, 1, true); currAnim.initialise([((spriteSheetBitmapBaseName + "_front") + ssExtension)]); break; case "left": currAnim = new SpriteSheet(1, _local3, animWidth, animHeight, "pingpong", 0, 1, true); currAnim.initialise([((spriteSheetBitmapBaseName + "_side") + ssExtension)]); break; case "right": currAnim = new SpriteSheet(1, _local3, animWidth, animHeight, "pingpong", 0, 1, true); currAnim.initialise([((spriteSheetBitmapBaseName + "_side") + ssExtension)]); currAnim.scaleX = (currAnim.scaleX * -1); currAnim.x = (currAnim.x + (currAnim.width / _local3)); break; }; currAnim.x = (currAnim.x - (animWidth / 2)); currAnim.y = (currAnim.y - (animHeight / 2)); currAnim.addEventListener("onSpriteSheetAnimationComplete", onSpriteSheetAnimationComplete); addChild(currAnim); } public function set zDepth(_arg1:int):void{ _zDepth = _arg1; scaleX = (scaleY = (1 + (_arg1 * 0.5))); } public function get currentTile():Tile{ var _local1:uint = Math.floor(((x / (tileSize * numCols)) * numCols)); var _local2:uint = Math.floor(((y / (tileSize * numRows)) * numRows)); if (Tile(Tile.list[_local2][_local1])){ _currentTile = Tile(Tile.list[_local2][_local1]); } else { _currentTile = null; }; return (_currentTile); } public function onSpawnTileMet():void{ } public function setMove(_arg1:int, _arg2:int):void{ var _local3:Tile; if (currentTile){ _local3 = Tile.getTileInstance((currentTile.rowID + _arg2), (currentTile.colID + _arg1)); if (_local3){ if (canWalkToTile(_local3)){ if (distanceFromTile(currentTile) < snapThresh){ xdir = _arg1; ydir = _arg2; speedX = (currentMoveSpeed * xdir); speedY = (currentMoveSpeed * ydir); updateSpriteSheetDirection(); snapToCurrentTile(); }; } else { queuedMove = {x:_arg1, y:_arg2}; count = 1; }; }; } else { queuedMove = null; }; } public function destroy():void{ removeCurrentAnimation(); } public function addTrail():void{ var _local1:Class; var _local2:Trail; var _local3:Number; if (((!((trailLinkage == ""))) && (useTrails))){ if (trailTile != currentTile){ _local1 = (getDefinitionByName(trailLinkage) as Class); _local2 = new (_local1); _local3 = ((maxMoveSpeed - currentMoveSpeed) / 20); _local2.initialise(_local3); _local2.x = currentTile.x; _local2.y = currentTile.y; effectsLayer.addChild(_local2); _local2.addEventListener("complete", onTrailComplete, false, 0, true); trailTile = currentTile; }; }; } public function get zDepth():int{ return (_zDepth); } public function set moveSpeed(_arg1:Number):void{ _moveSpeed = _arg1; currentMoveSpeed = _arg1; } public function set ydir(_arg1:int):void{ _ydir = _arg1; } private function updateSpriteSheetDirection(_arg1:Boolean=false):void{ if (speedX > 0){ setAnimation("right", _arg1); } else { if (speedX < 0){ setAnimation("left", _arg1); }; }; if (speedY > 0){ setAnimation("down", _arg1); } else { if (speedY < 0){ setAnimation("up", _arg1); }; }; } public function get moveSpeed():Number{ return (_moveSpeed); } public function get ydir():int{ return (_ydir); } public static function globalTick():void{ var _local2:Actor; var _local1:uint; while (_local1 < list.length) { _local2 = Actor(list[_local1]); if (_local2.removeMe){ _local2.destroy(); _local2.parent.removeChild(_local2); list.splice(_local1, 1); } else { _local2.tick(); }; _local1++; }; } public static function initClass(_arg1:int, _arg2:int):void{ numRows = _arg1; numCols = _arg2; list = []; } public static function removeAll():void{ var _local2:Actor; var _local1:uint; while (_local1 < list.length) { _local2 = Actor(list[_local1]); _local2.destroy(); _local1++; }; list = []; } } }//package
Section 49
//blue_particle (blue_particle) package { import flash.display.*; public dynamic class blue_particle extends BitmapData { public function blue_particle(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 50
//Button1 (Button1) package { import flash.display.*; import flash.text.*; public dynamic class Button1 extends MovieClip { public var field:TextField; public var padlock:MovieClip; public function Button1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 51
//Button2 (Button2) package { import flash.display.*; import flash.text.*; public class Button2 extends MovieClip { public var field:TextField; public var bg:MovieClip; public function Button2(){ addFrameScript(0, frame1); buttonMode = true; mouseChildren = false; } public function set label(_arg1:String):void{ field.autoSize = TextFieldAutoSize.LEFT; field.htmlText = _arg1; var _local2:* = new TextFormat(); _local2.letterSpacing = -1.1; field.htmlText = field.htmlText; field.setTextFormat(_local2); bg.width = (field.width * 1.05); bg.height = (field.height * 1.05); bg.alpha = 0; } function frame1(){ stop(); } } }//package
Section 52
//ClearSpringAPI (ClearSpringAPI) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class ClearSpringAPI extends MovieClip { private const kernelUrl:String = "http://widgets.clearspring.com/o/4ab8df0754376300/4ab8df0754376300/-/-TRK/1/lib.v3.as3.swf"; private var kernelLoader:Loader; private var isOpen:Boolean;// = false private var kernel:Object; public function ClearSpringAPI(){ Security.allowDomain("bin.clearspring.com"); Security.allowDomain("widgets.clearspring.com"); kernelLoader = new Loader(); kernelLoader.addEventListener("on_ready", onApiLoad); addChild(kernelLoader); kernelLoader.load(new URLRequest(kernelUrl), new LoaderContext(false, ApplicationDomain.currentDomain, SecurityDomain.currentDomain)); } private function onApiLoad(_arg1:Event):void{ var e = _arg1; kernel = Object(kernelLoader.content).kernel; kernel.track.event("Kernel loaded"); trace((("You have viewed this widget " + kernel.context.user.WIDGET_VIEWS) + " times")); trace(("You seem to be in " + kernel.context.user.geo.getCountry())); kernel.menu.addEventListener(kernel.menu.event.OPEN, onMenuEvent); kernel.menu.addEventListener(kernel.menu.event.CLOSE, onMenuEvent); stage.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ if (((!(isOpen)) && ((_arg1.target == stage)))){ kernel.menu.show(); }; }); } public function shareCallback(_arg1:Number, _arg2:Object):void{ if (_arg1){ trace(("An error occurred: " + _arg1)); } else { if (_arg2.tag){ trace(("Got embed tag: " + escape(_arg2.tag))); } else { trace("No embed tag returned"); }; }; } public function show():void{ kernel.menu.show(); } public function onMenuEvent(_arg1:Event):void{ switch (_arg1.type){ case kernel.menu.event.OPEN: isOpen = true; trace("Menu opened!"); break; case kernel.menu.event.CLOSE: isOpen = false; dispatchEvent(new Event("closed")); trace("Menu closed."); break; default: trace(("Got a menu event: " + _arg1)); }; } } }//package
Section 53
//CloseButton (CloseButton) package { import flash.display.*; public dynamic class CloseButton extends MovieClip { } }//package
Section 54
//DataCaptureController (DataCaptureController) package { import flash.events.*; import flash.net.*; public class DataCaptureController extends GenericController { private var scriptURL:String;// = "http://www.deadmau5.com/ghosts/flash/signup.php" public function DataCaptureController(){ attachViewAsPage("dataCaptureView"); view.field0.tabIndex = 1; view.field1.tabIndex = 2; view.tabEnabled = false; view.stage.focus = view.field0; initialise(); } private function validate():void{ if ((((view.field0.text.length > 0)) && (!((String(view.field1.text).indexOf("@") == -1))))){ submit(view.field0.text, view.field1.text); removeMe(); }; } private function buttonCallback(_arg1:MouseEvent):void{ switch (_arg1.target){ case view.btn0: removeMe(); break; case view.btn1: validate(); break; }; } private function removeMe():void{ main.removeOverlay(); callback(); } private function initialise():void{ view.titleField.htmlText = "Signup for mau5mail here"; view.messageField.htmlText = "Enter your email address to get Deadmau5 updates"; initButton(view.btn0, "No thanks", buttonCallback); initButton(view.btn1, "Okay", buttonCallback); } public function submit(_arg1:String, _arg2:String):void{ var _local3:URLVariables = new URLVariables(); _local3.name = _arg1; _local3.email = _arg2; _local3.r = int((Math.random() * 9999)); var _local4:URLRequest = new URLRequest(); _local4.url = scriptURL; _local4.data = _local3; var _local5:URLLoader = new URLLoader(); _local5.load(_local4); } } }//package
Section 55
//dataCaptureView (dataCaptureView) package { import flash.display.*; import flash.text.*; public dynamic class dataCaptureView extends MovieClip { public var titleField:TextField; public var messageField:TextField; public var btn0:Button1; public var btn1:Button1; public var field0:TextField; public var field1:TextField; } }//package
Section 56
//Dot (Dot) package { import flash.display.*; public dynamic class Dot extends MovieClip { } }//package
Section 57
//DownloadController (DownloadController) package { import flash.events.*; import flash.display.*; public class DownloadController extends GenericOverlay { public function DownloadController(){ attachViewAsOverlay("downloadView"); initialise(); } private function buttonCallback(_arg1:MouseEvent):void{ var _local2:MovieClip = MovieClip(_arg1.target); switch (_local2){ case view.btn0: main.goDownloadContent("itunes"); break; case view.btn1: main.goDownloadContent("exclusive"); break; case view.backBtn: main.removeOverlay(); break; }; } private function initialise():void{ initButton(view.btn0, "<font size='-7'>buy deadmau5 stuff</font><br/><font size='-5'>from iTunes</font>", buttonCallback); if (main.gameCompleted){ initButton(view.btn1, "<font size='-4'>exclusive track</font><br/><font size='-7'>( asdfghjkl )</font>", buttonCallback); } else { initButton(view.btn1, "<font size='-4'>exclusive track</font><br/><font size='-7'>( complete the game )</font>"); }; initButton(view.backBtn, "back", buttonCallback); } } }//package
Section 58
//downloadView (downloadView) package { import flash.display.*; public dynamic class downloadView extends MovieClip { public var btn0:Button1; public var btn1:Button1; public var backBtn:MovieClip; } }//package
Section 59
//EditorOutputPanel (EditorOutputPanel) package { import flash.events.*; import flash.display.*; import flash.text.*; public class EditorOutputPanel extends MovieClip { public var refreshBtn:MovieClip; public var bg:MovieClip; public var field:TextField; private var _contents:String; public function EditorOutputPanel(){ super(); bg.addEventListener(MouseEvent.MOUSE_DOWN, function (){ startDrag(); }); bg.addEventListener(MouseEvent.MOUSE_UP, function (){ stopDrag(); }); refreshBtn.mouseChildren = false; refreshBtn.buttonMode = true; refreshBtn.addEventListener(MouseEvent.CLICK, onRefresh, false, 0, true); } public function get contents():String{ return (_contents); } public function set contents(_arg1:String):void{ _contents = _arg1; field.text = _arg1; } private function onRefresh(_arg1:MouseEvent):void{ dispatchEvent(new Event("refreshMap")); } } }//package
Section 60
//Enemy (Enemy) package { import gs.*; import flash.events.*; import flash.display.*; import flash.utils.*; public class Enemy extends Actor { public var eaten:Boolean; private var firstScare:Boolean; private var captureMe:Boolean; private var _edible:Boolean;// = false public var targetTile:Tile; private var cageTopRow:int; public var eyes:MovieClip; private var caged:Boolean; public var aggression:Number;// = 0.2 private var releaseMe:Boolean; public function Enemy(){ addFrameScript(9, frame10, 10, frame11); super(); } override public function stopCurrentMove():void{ if (releaseMe){ return; }; snapToCurrentTile(); if (captureMe){ xdir = 0; ydir = 1; speedX = 0; speedY = 0.6; targetTile.alpha = 0.2; } else { xdir = (ydir = 0); speedX = (speedY = 0); }; } public function onCageEntered():void{ initInCage((3 + int((Math.random() * 3)))); } function frame10(){ gotoAndPlay(1); } public function onCageLeft():void{ edible = true; eaten = false; releaseMe = false; caged = false; currentMoveSpeed = moveSpeed; snapToCurrentTile(); beginSearching(); } public function beginSearching():void{ var _local1:int = ((Math.random())<0.5) ? -1 : 1; currentMoveSpeed = moveSpeed; gotoAndPlay(1); edible = false; eaten = false; setMove(_local1, 0); } override public function onSpawnTileMet():void{ if (releaseMe){ onCageLeft(); return; }; if (eaten){ enterCage(); }; } function frame11(){ stop(); } private function onReleaseTimerComplete(_arg1:TimerEvent):void{ releaseMe = true; targetTile = spawnTile; } override public function onJunctionMet():void{ var newDir:Object; if (captureMe){ if (currentTile == targetTile){ onCageEntered(); }; return; }; if (releaseMe){ if (canWalkToTile(nextTile)){ if (moveOptions.length == 1){ return; }; }; targetTile = spawnTile; decideQuickestRouteTo(spawnTile); newDir = moveOptions[0]; } else { if (!eaten){ if (edible){ try { if (Player.instance.currentTile){ decideFurthestRouteTo(Player.instance.currentTile); }; } catch(e:Error) { trace("enemy was edible, unable to find player currenttile??"); }; } else { try { targetTile = Player.instance.currentTile; if (((targetTile) && ((Math.random() < aggression)))){ decideQuickestRouteTo(targetTile); }; } catch(e:Error) { trace("enemy wasnt edible, unable to find player currenttile??"); }; }; } else { decideQuickestRouteTo(spawnTile, false); }; newDir = moveOptions[int((Math.random() * moveOptions.length))]; }; if (((!((xdir == newDir.x))) || (!((ydir == newDir.y))))){ snapToCurrentTile(); xdir = newDir.x; ydir = newDir.y; speedX = (xdir * currentMoveSpeed); speedY = (ydir * currentMoveSpeed); if (xdir == 1){ eyes.gotoAndStop("right"); } else { if (xdir == -1){ eyes.gotoAndStop("left"); }; }; if (ydir == 1){ eyes.gotoAndStop("down"); } else { if (ydir == -1){ eyes.gotoAndStop("up"); }; }; }; } public function decideFurthestRouteTo(_arg1:Tile, _arg2:Boolean=false):void{ var _local7:Tile; var _local8:Number; var _local3:Object = {x:xdir, y:ydir}; var _local4:Number = 0; var _local5:Array = []; var _local6:uint; while (_local6 < moveOptions.length) { _local7 = Tile.getTileInstance((currentTile.rowID + moveOptions[_local6].y), (currentTile.colID + moveOptions[_local6].x)); _local8 = distanceBetweenTiles(_local7, _arg1); if (_local8 > _local4){ _local4 = _local8; _local5 = [{x:moveOptions[_local6].x, y:moveOptions[_local6].y, dist:_local8}]; }; _local6++; }; moveOptions = _local5; } public function decideQuickestRouteTo(_arg1:Tile, _arg2:Boolean=true):void{ var _local5:Array; var _local7:Tile; var _local8:Number; var _local3:Object = {x:xdir, y:ydir}; var _local4:Number = 99999; var _local6:uint; while (_local6 < moveOptions.length) { _local7 = Tile.getTileInstance((currentTile.rowID + moveOptions[_local6].y), (currentTile.colID + moveOptions[_local6].x)); _local8 = distanceBetweenTiles(_local7, _arg1); if (_local8 < _local4){ _local4 = _local8; _local5 = [{x:moveOptions[_local6].x, y:moveOptions[_local6].y, dist:_local8}]; }; _local6++; }; if (!_arg2){ _local5[{x:(xdir * -1), y:(ydir * -1)}]; }; _local5.sortOn("dist", Array.NUMERIC); moveOptions = _local5; } public function set edible(_arg1:Boolean):void{ _edible = _arg1; if (_edible){ alpha = 0.5; } else { alpha = 1; }; } public function releaseFromCage(_arg1:int=1):void{ var _local2:Timer = new Timer((_arg1 * 1000), 1); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, onReleaseTimerComplete, false, 0, true); _local2.start(); } public function transitionTo(_arg1:Number, _arg2:Number, _arg3:Function, _arg4:Number=0):void{ TweenLite.to(this, 1, {x:_arg1, y:_arg2, onComplete:_arg3, delay:_arg4}); } public function get edible():Boolean{ return (_edible); } public function enterCage():void{ snapToCurrentTile(); captureMe = true; caged = true; targetTile = Tile.getTileInstance((spawnTile.rowID + 3), spawnTile.colID); } public function initInCage(_arg1:Number):void{ captureMe = false; releaseMe = false; caged = true; cageTopRow = (spawnTile.rowID + 1); setPosition((spawnTile.rowID + 3), spawnTile.colID); stopCurrentMove(); beginSearching(); releaseFromCage(_arg1); } public function beginReturn():void{ eaten = true; edible = false; currentMoveSpeed = (moveSpeed * 1.5); gotoAndStop("died"); } override public function canWalkToTile(_arg1:Tile):Boolean{ var _local2:Boolean; if (caged){ if (releaseMe){ _local2 = Boolean(((_arg1.walkable) || (_arg1.isCageTile))); } else { if (captureMe){ _local2 = Boolean(_arg1.isCageTile); } else { _local2 = Boolean(((_arg1.isCageTile) && ((_arg1.rowID > cageTopRow)))); }; }; } else { _local2 = _arg1.walkable; }; return (_local2); } public static function freezeAll(_arg1:Boolean=true):void{ var _local2:*; var _local3:Enemy; for (_local2 in list) { if ((list[_local2] is Enemy)){ _local3 = Enemy(list[_local2]); _local3.frozen = _arg1; }; }; } } }//package
Section 61
//EnemyTrail (EnemyTrail) package { public dynamic class EnemyTrail extends Trail { } }//package
Section 62
//FlyupPoints (FlyupPoints) package { import gs.*; import flash.events.*; import flash.display.*; import flash.text.*; public class FlyupPoints extends MovieClip { public var field:TextField; private function onComplete():void{ dispatchEvent(new Event("complete")); } public function initialise(_arg1:String, _arg2:Number, _arg3:Number):void{ x = _arg2; y = _arg3; field.htmlText = _arg1; TweenMax.to(this, 0.8, {y:(_arg3 - 20), alpha:0.5, onComplete:onComplete}); } } }//package
Section 63
//Freeze (Freeze) package { import flash.display.*; public dynamic class Freeze extends MovieClip { } }//package
Section 64
//GameController (GameController) package { import gs.*; import flash.events.*; import flash.display.*; import flash.filters.*; import flash.text.*; import com.mbxgames.utils.*; import flash.utils.*; import gs.easing.*; public class GameController extends GenericController { private var _points:int; private var maxLives:int;// = 3 private var _lives:int; private var worldContainer:MovieClip; private var pickupSpawnCount:uint;// = 0 private var enemies:Array; private var tripScaleDir:int; private var keyIsDown:Function; private var tripBitmapContainer:Sprite; private var sh:uint; private var currentPickup:Pickup; private var sw:uint; private var tripMode:Boolean; private var pickupDefinitions:Array; private var gameOn:Boolean; private var debugMode:Boolean;// = false private var tickTimer:Timer; private var tripBitmap:Bitmap; private var levelPowerups:Array; private var currMap:Array; private var editorOutputPanel:EditorOutputPanel; private var gridContainer:Sprite; private var powerupFrequency:int;// = 900 private var gh:uint; private var tripCount:int; private var pickupCount:uint;// = 0 private var gw:uint; private var mouseIsDown:Boolean; private var player:Player; private var pauseLayer:PauseLayer; private var hud:Hud; public static const PICKUP_MODE_PORTAL:String = "portal"; public static const PICKUP_MODE_POWERUP:String = "powerup"; public static const PICKUP_MODE_FREEZE:String = "freeze"; public static const GAME_STATUS_PLAYING:String = "playing"; public static const PICKUP_MODE_PILL:String = "pill"; public static const GAME_STATUS_EDITING:String = "editing"; public static var GAME_STATUS:String; public static var currentRoundID:uint = 2; public static var currPoints:int; public static var gameOverStatus:String; public function GameController(){ levelPowerups = []; super(); sw = main.sw; sh = main.sh; gw = (sw - 10); gh = (sh - 20); levelPowerups[0] = [PICKUP_MODE_POWERUP]; levelPowerups[1] = [PICKUP_MODE_POWERUP]; levelPowerups[2] = [PICKUP_MODE_POWERUP, PICKUP_MODE_PORTAL]; levelPowerups[3] = [PICKUP_MODE_POWERUP, PICKUP_MODE_PORTAL, PICKUP_MODE_FREEZE]; levelPowerups[4] = [PICKUP_MODE_POWERUP, PICKUP_MODE_PORTAL, PICKUP_MODE_FREEZE]; attachViewAsPage("gameView"); Pickup.definitionList = []; new Pickup(PICKUP_MODE_PILL, 450); new Pickup(PICKUP_MODE_POWERUP, 450); TweenMax.from(view, 0.5, {tint:0}); trace("------------------------GameController---------------------"); initialise(); tickTimer = new Timer((1000 / 60)); tickTimer.addEventListener(TimerEvent.TIMER, tick); tickTimer.start(); debug(("tickTimer = " + tickTimer)); KeyboardHandler.initialize(view.stage); keyIsDown = KeyboardHandler.isDown; view.stage.focus = null; } private function playerCollectHandler(_arg1:Event):void{ var _local2:int; var _local3:ParticleFountain; var _local4:Enemy; switch (Player(_arg1.target).eventRef){ case "dot": Tile.numDots--; points++; _local3 = new ParticleFountain(["orange_particle"], 10, 20, 0.5); _local3.x = player.x; _local3.y = player.y; worldContainer.addChild(_local3); playSound("snd_dot"); if (Tile.numDots <= 0){ endRound("success"); }; break; case PICKUP_MODE_PILL: playSound("snd_pickup"); tintGridCheese(); _local2 = 100; initPickup(PICKUP_MODE_PILL); break; case PICKUP_MODE_POWERUP: playSound("snd_pickup"); _local2 = 500; initPickup(PICKUP_MODE_POWERUP); break; case PICKUP_MODE_PORTAL: playSound("snd_pickup"); _local2 = 150; _local3 = new ParticleFountain(["green_particle"], 10, 40, 3); _local3.x = player.x; _local3.y = player.y; worldContainer.addChild(_local3); initPickup(PICKUP_MODE_PORTAL); break; case PICKUP_MODE_FREEZE: playSound("snd_pickup"); _local2 = 150; _local3 = new ParticleFountain(["blue_particle"], 10, 40, 3); _local3.x = player.x; _local3.y = player.y; worldContainer.addChild(_local3); initPickup(PICKUP_MODE_FREEZE); break; case "gotEnemy": _local4 = Player(_arg1.target).enemyEaten; if (_local4.edible){ _local2 = 250; _local4.beginReturn(); }; break; }; if (_local2){ points = (points + _local2); flyUpPoints(player, _local2); }; } private function get lives():int{ return (_lives); } private function mouseUpHandler(_arg1:MouseEvent):void{ mouseIsDown = false; Tile.makeAllEditable(); } private function set lives(_arg1:int):void{ _lives = _arg1; hud.setLives(lives, maxLives); } private function initPlayer():void{ player = new Player(); player.moveSpeed = 1.2; player.spawnTile = Tile.getTileInstance(17, 19); player.addEventListener("onDeath", playerDeathHandler, false, 0, true); player.addEventListener("onCollect", playerCollectHandler, false, 0, true); player.spawn(); worldContainer.addChild(player); } private function onFlyupComplete(_arg1:Event):void{ var _local2:FlyupPoints = FlyupPoints(_arg1.target); if (worldContainer.contains(_local2)){ worldContainer.removeChild(_local2); }; } private function tintGridCheese():void{ tintGrid(111554); } private function tintGridDefault():void{ tintGrid(16763955); } private function trippify(_arg1:Boolean=true):void{ var _local2:BitmapData; removeTripBitmap(); if (_arg1){ player.poorlySick(true); player.passive = true; tripMode = true; tripCount = 0; _local2 = new BitmapData(main.sw, main.sh, true, 0xFFFFFF); _local2.draw(gridContainer); tripBitmapContainer = new Sprite(); tripBitmapContainer.x = (main.sw / 2); tripBitmapContainer.y = (main.sh / 2); tripBitmap = new Bitmap(_local2, "never", true); tripBitmap.x = (-(main.sw) / 2); tripBitmap.y = (-(main.sh) / 2); tripBitmapContainer.addChild(tripBitmap); tripBitmapContainer.blendMode = BlendMode.OVERLAY; worldContainer.addChild(tripBitmapContainer); tripScaleDir = 1; tintGridRed(); } else { player.poorlySick(false); player.passive = false; tintGridDefault(); tripMode = false; }; } private function endPickup():void{ currentPickup = null; pickupCount = 0; unFrightenEnemies(); Enemy.freezeAll(false); } private function clearGrid():void{ if (worldContainer){ view.removeChild(worldContainer); worldContainer = null; }; } private function addItemToTile(_arg1:Tile, _arg2:String){ if (((_arg1.item) && ((_arg1.item is Dot)))){ Tile.numDots--; }; _arg1.removeItem(); _arg1.addItem(_arg2); } private function isEmpty(_arg1:Tile=null):Boolean{ return (Boolean((((_arg1 == null)) || (!(_arg1.solid))))); } public function debug(_arg1:String):void{ var _local2:TextField = hud.debugField; if (debugMode){ _local2.appendText((_arg1 + "\n")); _local2.scrollV = _local2.maxScrollV; } else { if (_local2.visible){ _local2.visible = false; }; }; } private function removeTripBitmap():void{ if (tripBitmap){ tripBitmapContainer.parent.removeChild(tripBitmapContainer); tripBitmap.bitmapData.dispose(); tripBitmap = null; }; } private function captureKeys():void{ if (keyIsDown(37)){ player.setMove(-1, 0); } else { if (keyIsDown(39)){ player.setMove(1, 0); }; }; if (keyIsDown(38)){ player.setMove(0, -1); } else { if (keyIsDown(40)){ player.setMove(0, 1); }; }; if (keyIsDown(83)){ if ((count % 4) == 0){ toggleElementsForScreenShot(); }; }; } private function initRound():void{ trace(("currentRoundID = " + currentRoundID)); currMap = LevelData.maps[currentRoundID]; Actor.initClass(numRows, numCols); Tile.initClass(); buildGrid(); renderGrid(); renderGrid(); switch (GAME_STATUS){ case GAME_STATUS_EDITING: worldContainer.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); worldContainer.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); editorOutputPanel = new EditorOutputPanel(); editorOutputPanel.x = (sw - 20); editorOutputPanel.y = (sh - 20); view.addChild(editorOutputPanel); break; case GAME_STATUS_PLAYING: hud = new Hud(); hud.addEventListener("pause", pauseHandler, false, 0, true); view.addChild(hud); points = currPoints; lives = maxLives; hud.setLevel((currentRoundID + 1), LevelData.maps.length); hud.showGetReady((currentRoundID + 1), roundReady); Tile.addDotsToAll(); initPlayer(); spawnPickups(PICKUP_MODE_PILL); initEnemies(); tintGridDefault(); break; }; var _local1:MovieClip = new Button1(); initButton(_local1, "Quit", onQuitButton); view.addChild(_local1); _local1.visible = ((GAME_STATUS == GAME_STATUS_EDITING)) ? true : false; } private function tickTrip():void{ var _local1:Number = 1.09; var _local2:Number = 0.95; var _local3:Number = 0.005; var _local4:Number = tripBitmapContainer.scaleX; if (tripScaleDir == 1){ if (_local4 < _local1){ tripBitmapContainer.scaleX = (tripBitmapContainer.scaleX + _local3); tripBitmapContainer.scaleY = (tripBitmapContainer.scaleY + _local3); } else { tripBitmapContainer.scaleX = (tripBitmapContainer.scaleY = _local1); tripScaleDir = -1; }; } else { if (_local4 > _local2){ tripBitmapContainer.scaleX = (tripBitmapContainer.scaleX - _local3); tripBitmapContainer.scaleY = (tripBitmapContainer.scaleY - _local3); } else { tripBitmapContainer.scaleX = (tripBitmapContainer.scaleY = _local2); tripScaleDir = 1; }; }; } private function mouseDownHandler(_arg1:MouseEvent):void{ mouseIsDown = true; } private function endRound(_arg1:String):void{ var outcome = _arg1; trace("---------------END OF ROUND----------------"); gameOn = false; switch (outcome){ case "success": trace("---LEVEL CLEARED!"); gameOverStatus = "success"; break; case "died": gameOverStatus = "fail"; trace("---LEVEL FAILED!"); break; }; currPoints = points; setTimeout(function (){ main.goGameSummary(); }, 1000); } private function pauseHandler(_arg1:Event):void{ pauseLayer = new PauseLayer(); pauseLayer.addEventListener("clicked", pauseLayerHandler, false, 0, true); hud.addChild(pauseLayer); gameOn = false; } private function resetLevel():void{ gameOn = true; resetEnemies(); player.spawn(); tintGridDefault(); } private function spawnPickups(_arg1:String):void{ var _local2:Array; var _local4:int; var _local5:uint; var _local3:Boolean; switch (_arg1){ case PICKUP_MODE_PILL: _local2 = Tile.pillSpawnTiles; _local3 = true; break; case PICKUP_MODE_POWERUP: _local2 = Tile.powerupSpawnTiles; break; case PICKUP_MODE_PORTAL: _local2 = Tile.powerupSpawnTiles; break; case PICKUP_MODE_FREEZE: _local2 = Tile.powerupSpawnTiles; break; }; if (!_local3){ _local4 = int((Math.random() * _local2.length)); addItemToTile(_local2[_local4], _arg1); } else { _local5 = 0; while (_local5 < _local2.length) { addItemToTile(_local2[_local5], _arg1); _local5++; }; }; } private function get numRows():uint{ return (int((gh / Tile.SIZE))); } private function toggleElementsForScreenShot():void{ var _local1:uint; var _local2 = !(hud.visible); hud.visible = _local2; player.visible = _local2; _local1 = 0; while (_local1 < enemies.length) { enemies[_local1].instance.visible = _local2; _local1++; }; Actor.useTrails = _local2; } private function frightenEnemies():void{ var _local2:Enemy; var _local1:uint; while (_local1 < enemies.length) { _local2 = enemies[_local1].instance; _local2.edible = true; _local1++; }; } private function get numCols():uint{ return (int((gw / Tile.SIZE))); } private function tick(_arg1:TimerEvent):void{ debug(("tick :: " + count)); switch (GAME_STATUS){ case GAME_STATUS_PLAYING: if (gameOn){ if (tripMode){ tripCount++; tickTrip(); if (tripCount > 400){ trippify(false); }; }; captureKeys(); Actor.globalTick(); if (pickupSpawnCount >= powerupFrequency){ spawnPickups(levelPowerups[currentRoundID][int((Math.random() * levelPowerups[currentRoundID].length))]); pickupSpawnCount = 0; }; pickupSpawnCount++; if (currentPickup){ if (pickupCount >= currentPickup.duration){ tintGridDefault(); endPickup(); }; pickupCount++; }; }; break; case GAME_STATUS_EDITING: captureMouse(); if ((count % 2) == 0){ renderGrid(); }; if ((count % 20) == 0){ generateGridData(); }; break; }; count++; } private function onQuitButton(_arg1:MouseEvent):void{ main.goHome(); } private function generateGridData():void{ var _local3:uint; var _local4:Tile; count = 0; var _local1 = "["; var _local2:uint; while (_local2 < numRows) { _local1 = (_local1 + "["); _local3 = 0; while (_local3 < numCols) { _local4 = Tile.getTileInstance(_local2, _local3); if (_local3 > 0){ _local1 = (_local1 + ","); }; _local1 = (_local1 + _local4.gfxID); _local3++; }; _local1 = (_local1 + "]"); if (_local2 < (numRows - 1)){ _local1 = (_local1 + ","); }; _local1 = (_local1 + "\n"); _local2++; }; _local1 = (_local1 + "]"); editorOutputPanel.contents = _local1; } private function unFrightenEnemies():void{ var _local2:Enemy; var _local1:uint; while (_local1 < enemies.length) { _local2 = enemies[_local1].instance; _local2.edible = false; _local1++; }; } private function initPickup(_arg1:String):void{ endPickup(); currentPickup = Pickup.getDefinition(_arg1); switch (_arg1){ case PICKUP_MODE_PILL: frightenEnemies(); break; case PICKUP_MODE_POWERUP: trippify(); break; case PICKUP_MODE_PORTAL: player.snapToSpawnTile(); player.stopCurrentMove(); break; case PICKUP_MODE_FREEZE: Enemy.freezeAll(); break; }; trace(("started pickup :: " + _arg1)); pickupCount = 0; } private function roundReady():void{ playMusic("music_game", 0); gameOn = true; } private function playerDeathHandler(_arg1:Event):void{ var _local2:ParticleFountain; lives--; playSound("snd_death"); _local2 = new ParticleFountain(["red_particle"], 20, 40, 3); _local2.x = player.x; _local2.y = player.y; worldContainer.addChild(_local2); if (lives > 0){ gameOn = false; setTimeout(resetLevel, 1500); } else { endRound("died"); }; } override public function destroyView():void{ destroyAbstractController(); if (worldContainer.hasEventListener(MouseEvent.MOUSE_DOWN)){ worldContainer.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); worldContainer.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); }; if (GAME_STATUS == GAME_STATUS_PLAYING){ removeTripBitmap(); Actor.removeAll(); }; tickTimer.removeEventListener(TimerEvent.TIMER, tick); } private function initialise():void{ initRound(); } private function set points(_arg1:int):void{ _points = _arg1; if (_arg1 > Number(main.cookie.getItem("best"))){ main.cookie.setItem("best", ("" + _arg1)); hud.best = _arg1; } else { hud.best = Number(main.cookie.getItem("best")); }; hud.points = _points; } private function editorRefreshMap(_arg1:Event):void{ trace("now we load pasted data from the editor window"); } private function resetEnemies():void{ var _local2:Enemy; var _local1:uint; while (_local1 < enemies.length) { _local2 = enemies[_local1].instance; _local2.setPosition(9, 19); _local2.initInCage(((_local1 + 1) * 1)); _local1++; }; endPickup(); } private function pauseLayerHandler(_arg1:Event):void{ switch (PauseLayer(_arg1.target).evtRef){ case "resume": gameOn = true; break; case "quit": stopMusic(); main.goHome(); return; }; pauseLayer.removeEventListener("clicked", pauseLayerHandler); hud.removeChild(pauseLayer); pauseLayer = null; view.stage.focus = null; } private function tintGrid(_arg1:uint):void{ setColor(gridContainer, _arg1, 0.6); } private function buildGrid():void{ var _local5:uint; var _local6:Tile; var _local7:int; var _local8:int; clearGrid(); worldContainer = new MovieClip(); view.addChild(worldContainer); gridContainer = new Sprite(); worldContainer.addChild(gridContainer); var _local1:MovieClip = new MovieClip(); worldContainer.addChild(_local1); Actor.effectsLayer = _local1; Tile.editMode = Boolean((GAME_STATUS == GAME_STATUS_EDITING)); trace(("numRows :" + numRows)); trace(("numCols :" + numCols)); var _local2:uint; while (_local2 < numRows) { _local5 = 0; while (_local5 < numCols) { _local6 = new Tile(); _local6.initInGrid(_local2, _local5); _local7 = currMap[_local2][_local5]; _local8 = ((_local7)==0) ? 0 : 1; _local6.setID(_local8); _local6.setGfx(_local7); gridContainer.addChild(_local6); _local5++; }; _local2++; }; worldContainer.x = ((sw / 2) - (worldContainer.width / 2)); worldContainer.y = (sh - worldContainer.height); var _local3:GlowFilter = new GlowFilter(); _local3.color = 0xFFFFFF; _local3.alpha = 1; _local3.blurX = 4; _local3.blurY = 4; _local3.strength = 4; var _local4:DropShadowFilter = new DropShadowFilter(); _local4.alpha = 0.2; _local4.color = 0xCCCCCC; _local4.distance = 5; _local4.blurX = 8; _local4.blurY = 8; _local4.angle = 45; _local4.quality = 3; gridContainer.filters = [_local4, _local3]; } private function tintGridRed():void{ tintGrid(0xFF0000); } private function flyUpPoints(_arg1:Actor, _arg2:int):void{ var _local3:FlyupPoints = new FlyupPoints(); _local3.addEventListener("complete", onFlyupComplete, false, 0, true); _local3.initialise(("+" + _arg2), _arg1.x, (_arg1.y - (_arg1.height / 2))); worldContainer.addChild(_local3); } private function get points():int{ return (_points); } private function renderGrid():void{ var _local2:uint; var _local3:int; var _local4:Tile; var _local5:uint; var _local6:uint; var _local7:Tile; var _local8:Tile; var _local9:Tile; var _local10:Tile; var _local11:Tile; var _local1:uint; while (_local1 < numRows) { _local2 = 0; while (_local2 < numCols) { _local3 = 0; _local4 = Tile.getTileInstance(_local1, _local2); _local5 = _local4.rowID; _local6 = _local4.colID; if (_local4){ if (_local4.solid){ _local7 = Tile.getTileInstance(_local5, (_local6 - 1)); _local8 = Tile.getTileInstance(_local5, (_local6 + 1)); _local9 = Tile.getTileInstance((_local5 - 1), _local6); _local10 = Tile.getTileInstance((_local5 + 1), _local6); if (isEmpty(_local7)){ _local3 = (_local3 + 8); }; if (isEmpty(_local8)){ _local3 = (_local3 + 2); }; if (isEmpty(_local9)){ _local3 = (_local3 + 1); }; if (isEmpty(_local10)){ _local3 = (_local3 + 4); }; if (_local3 == 0){ _local11 = Tile.getTileInstance((_local5 - 1), (_local6 + 1)); if (isEmpty(_local11)){ _local3 = 20; }; _local11 = Tile.getTileInstance((_local5 + 1), (_local6 + 1)); if (isEmpty(_local11)){ _local3 = 21; }; _local11 = Tile.getTileInstance((_local5 + 1), (_local6 - 1)); if (isEmpty(_local11)){ _local3 = 22; }; _local11 = Tile.getTileInstance((_local5 - 1), (_local6 - 1)); if (isEmpty(_local11)){ _local3 = 23; }; }; if (_local3 == 0){ _local3 = 15; }; }; _local4.setGfx(_local3); _local4.render(); }; _local2++; }; _local1++; }; } private function initEnemies():void{ var _local2:Enemy; enemies = []; enemies.push({aggression:0.1, speed:1.11}); enemies.push({aggression:0.2, speed:1.15}); enemies.push({aggression:0.6, speed:0.92}); enemies.push({aggression:0.8, speed:1.1}); var _local1:uint; while (_local1 < enemies.length) { _local2 = new Enemy(); enemies[_local1].instance = _local2; _local2.aggression = enemies[_local1].aggression; _local2.moveSpeed = enemies[_local1].speed; worldContainer.addChild(_local2); _local1++; }; resetEnemies(); } private function captureMouse():void{ var _local1:uint; var _local2:uint; var _local3:Tile; if (mouseIsDown){ _local1 = int((worldContainer.mouseY / Tile.SIZE)); _local2 = int((worldContainer.mouseX / Tile.SIZE)); _local3 = Tile.getTileInstance(_local1, _local2); if (_local3){ if (keyIsDown(16)){ _local3.toggleOob(); } else { if (keyIsDown(80)){ _local3.togglePillSpawn(); } else { if (keyIsDown(67)){ _local3.toggleCage(); } else { if (keyIsDown(85)){ _local3.togglePowerupSpawn(); } else { _local3.cycle(); }; }; }; }; }; }; } } }//package class Pickup { public var ref:String; public var duration:int; public static var definitionList:Array; private function Pickup(_arg1:String, _arg2:int){ this.duration = _arg2; this.ref = _arg1; if (!definitionList){ definitionList = []; }; definitionList.push(this); } public static function getRandom():Pickup{ return (Pickup(definitionList[int((Math.random() * definitionList.length))])); } public static function getDefinition(_arg1:String):Pickup{ var _local2:*; for (_local2 in definitionList) { if (definitionList[_local2].ref == _arg1){ }; return (Pickup(definitionList[_local2])); }; return (null); } }
Section 65
//GameSummaryController (GameSummaryController) package { import flash.events.*; public class GameSummaryController extends GenericOverlay { public function GameSummaryController(){ attachViewAsOverlay("gameSummaryView"); initialise(); } private function clickSubmitHighscore1(_arg1:MouseEvent):void{ initButton(view.submitBtn, "Submit", clickSubmitHighscore2); view.field.text = main.cookie.getItem("name"); view.gotoAndStop(2); } private function clickSubmitHighscore2(_arg1:MouseEvent):void{ if (view.field.text.length > 1){ main.cookie.setItem("name", view.field.text); main.goHome(); HighscoresController.doSubmit = true; main.goHighscores(); }; } private function addEndGameElements():void{ view.btn1.visible = true; view.outerFrame.visible = true; initButton(view.btn1, "Submit score", clickSubmitHighscore1); } private function initialise():void{ view.btn1.visible = false; view.outerFrame.visible = false; switch (GameController.gameOverStatus){ case "success": view.titleField.htmlText = "Well Done"; if ((LevelData.maps.length - 1) > GameController.currentRoundID){ view.messageField.htmlText = "Level completed"; initButton(view.btn0, "Next Level", clickAdvanceToNextLevel); } else { view.messageField.htmlText = "Game completed"; main.cookie.setItem("completed", "1"); initButton(view.btn0, "Next", clickGoHome); addEndGameElements(); }; break; case "fail": view.titleField.htmlText = "Unlucky"; view.messageField.htmlText = "All lives lost"; initButton(view.btn0, "Main Menu", clickGoHome); addEndGameElements(); break; }; formatText(view.titleField); } private function clickAdvanceToNextLevel(_arg1:MouseEvent):void{ GameController.currentRoundID++; main.goPlay(); } private function clickGoHome(_arg1:MouseEvent):void{ GameController.currentRoundID = 0; main.goHome(); } } }//package
Section 66
//gameSummaryView (gameSummaryView) package { import flash.display.*; import flash.text.*; public dynamic class gameSummaryView extends MovieClip { public var titleField:TextField; public var outerFrame:OuterFrame; public var messageField:TextField; public var btn0:Button1; public var btn1:Button1; public var field:TextField; public var submitBtn:Button1; public function gameSummaryView(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 67
//gameView (gameView) package { import flash.display.*; public dynamic class gameView extends MovieClip { } }//package
Section 68
//GenericController (GenericController) package { import com.mbxgames.framework.*; import flash.events.*; import flash.display.*; import fl.motion.*; import flash.text.*; public class GenericController extends AbstractController { public var count:uint;// = 0 public static var textFormat:TextFormat; public function GenericController(){ if (!textFormat){ textFormat = new TextFormat(); textFormat.letterSpacing = -1.9; }; } public function setColor(_arg1:DisplayObject, _arg2:uint, _arg3:Number=1):void{ var _local4:Color = new Color(); _local4.setTint(_arg2, _arg3); _arg1.blendMode = BlendMode.SCREEN; _arg1.transform.colorTransform = _local4; } private function btnClickSound(_arg1:MouseEvent):void{ playSound("snd_btn_click"); } public function formatText(_arg1:TextField):void{ _arg1.htmlText = _arg1.htmlText; _arg1.setTextFormat(textFormat); } public function initButton(_arg1:MovieClip, _arg2:String, _arg3:Function=null):void{ _arg1.buttonMode = true; _arg1.mouseChildren = false; var _local4:TextField = TextField(_arg1.field); _local4.autoSize = TextFieldAutoSize.CENTER; _local4.htmlText = _arg2; formatText(_local4); _local4.y = (-(_local4.height) * 0.55); if (_arg3 != null){ _arg1.padlock.visible = false; _arg1.addEventListener(MouseEvent.MOUSE_OVER, btnOverSound, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, btnClickSound, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_UP, _arg3, false, 0, true); } else { _arg1.padlock.visible = true; _arg1.buttonMode = false; setColor(_arg1, 0, 0.2); _arg1.blendMode = BlendMode.NORMAL; }; } private function btnOverSound(_arg1:MouseEvent):void{ playSound("snd_btn_over"); } } }//package
Section 69
//GenericOverlay (GenericOverlay) package { import flash.events.*; import flash.display.*; public class GenericOverlay extends GenericController { public function closeButtonHandler(_arg1:MouseEvent):void{ _arg1.target.visible = false; callback = main.removeOverlay; outro(); } public function setGradText(_arg1:MovieClip, _arg2:String):void{ _arg1.fieldMC.field.htmlText = _arg2; } public function setTitle(_arg1:String):void{ setGradText(view.titleClip, _arg1.toUpperCase()); } } }//package
Section 70
//green_particle (green_particle) package { import flash.display.*; public dynamic class green_particle extends BitmapData { public function green_particle(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 71
//HighscoresController (HighscoresController) package { import flash.display.*; import mochi.as3.*; public class HighscoresController extends GenericOverlay { public static var boardID:String; public static var doSubmit:Boolean; public static var mochiRoot:MovieClip; public function HighscoresController(){ var _local1:Object; var _local2:*; super(); attachViewAsOverlay("highscoresView"); _local1 = {}; _local1.res = ((main.sw + "x") + main.sh); _local1.onClose = closeMe; _local1.onError = onError; _local1.name = main.cookie.getItem("name"); if (doSubmit){ _local1.score = Number(main.cookie.getItem("best")); }; trace("-------leaderboardObject-------"); for (_local2 in _local1) { trace(((_local2 + " : ") + _local1[_local2])); }; if (!boardID){ boardID = main.mochiLeaderboardID; MochiScores.setBoardID(boardID); }; mochiRoot.x = (mochiRoot.y = 0); mochiRoot.parent.setChildIndex(mochiRoot, (main.numChildren - 1)); MochiScores.showLeaderboard(_local1); } private function closeMe():void{ main.removeOverlay(); } private function onError():void{ trace("error loading leaderboard!"); } } }//package
Section 72
//highscoresView (highscoresView) package { import flash.display.*; public dynamic class highscoresView extends MovieClip { public function highscoresView(){ addFrameScript(4, frame5); } function frame5(){ stop(); } } }//package
Section 73
//HomeController (HomeController) package { import gs.*; import flash.events.*; import flash.display.*; public class HomeController extends GenericController { private var clickedButtonName:String; public function HomeController(){ attachViewAsPage("homeView"); initialise(); } private function outroView():void{ var _local2:Object; view.gotoAndPlay("outro"); view.addEventListener("onComplete", animComplete, false, 0, true); var _local1:uint; while (_local1 < 3) { _local2 = {alpha:0}; TweenLite.to(view[("btn" + _local1)], 0.3, _local2); _local1++; }; } private function buttonCallback(_arg1:MouseEvent):void{ clickedButtonName = MovieClip(_arg1.target).name; switch (clickedButtonName){ case "btn1": HighscoresController.doSubmit = false; main.goHighscores(); break; case "btn2": main.goDownload(); break; case "btnEdit": case "btn0": outroView(); break; }; } private function animComplete(_arg1:Event):void{ switch (clickedButtonName){ case "btn0": main.goPlay(); break; case "btnEdit": main.goEdit(); break; }; } private function initialise():void{ initButton(view.btn0, "Play Now", buttonCallback); initButton(view.btn1, "Highscores", buttonCallback); initButton(view.btn2, "Downloads", buttonCallback); initButton(view.btnEdit, "Edit", buttonCallback); var _local1:uint; while (_local1 < 3) { TweenLite.from(view[("btn" + _local1)], 0.3, {tint:0, y:(0 + (_local1 * 2))}); _local1++; }; view.btnEdit.visible = main.editorEnabled; } } }//package
Section 74
//homeView (homeView) package { public dynamic class homeView extends HomeView { public function homeView(){ addFrameScript(29, frame30, 30, frame31, 49, frame50); } function frame50(){ stop(); onComplete(); } function frame30(){ stop(); } function frame31(){ play(); } } }//package
Section 75
//HomeView (HomeView) package { import flash.events.*; import flash.display.*; public class HomeView extends MovieClip { public var btn0:Button1; public var btn1:Button1; public var btn2:Button1; public var btnEdit:Button1; public function onComplete():void{ dispatchEvent(new Event("onComplete")); } } }//package
Section 76
//Hud (Hud) package { import flash.events.*; import flash.display.*; import flash.text.*; import com.mbxgames.utils.*; import flash.utils.*; public class Hud extends MovieClip { private var callback:Function; public var pauseBtn:MovieClip; private var _lives:int; private var livesHolder:MovieClip; public var levelField:TextField; public var pointsField:TextField; private var livesClips:Array; public var getReadyClip:MovieClip; public var debugField:TextField; public var bestField:TextField; public var livesContainer:MovieClip; public function Hud(){ pauseBtn.mouseChildren = false; pauseBtn.buttonMode = true; pauseBtn.addEventListener(MouseEvent.MOUSE_DOWN, pauseBtnHandler, false, 0, true); } public function setLevel(_arg1:int, _arg2:int):void{ levelField.htmlText = ((("lvl:" + _arg1) + "/") + _arg2); } private function getReadyComplete(_arg1:TimerEvent):void{ getReadyClip.visible = false; callback(); } public function set best(_arg1:Number):void{ bestField.htmlText = ("hiscore: " + NumberUtils.padZero(_arg1, 6)); } public function showGetReady(_arg1:uint, _arg2:Function):void{ callback = _arg2; getReadyClip.field.htmlText = ("level " + _arg1); applyStyle(getReadyClip.field); getReadyClip.visible = true; var _local3:Timer = new Timer(1500, 1); _local3.addEventListener(TimerEvent.TIMER_COMPLETE, getReadyComplete, false, 0, true); _local3.start(); } public function setLives(_arg1:int, _arg2:int):void{ var _local5:int; var _local6:*; _lives = _arg1; var _local3:* = 32; if (!livesHolder){ livesClips = []; livesHolder = new MovieClip(); livesContainer.addChild(livesHolder); _local5 = _arg2; while (_local5 > 0) { _local6 = new livesIcon(); _local6.x = ((_local5 - 1) * _local3); livesClips.push(_local6); livesHolder.addChild(_local6); _local5--; }; livesHolder.x = (-(livesHolder.width) / 2); livesHolder.y = (-(livesHolder.height) / 2); }; var _local4:uint; while (_local4 < _arg2) { if (_arg1 > _local4){ livesClips[_local4].gotoAndStop(1); } else { livesClips[_local4].gotoAndStop(2); }; _local4++; }; } public function set points(_arg1:Number):void{ pointsField.htmlText = ("score: " + NumberUtils.padZero(_arg1, 6)); } private function applyStyle(_arg1:TextField):void{ var _local2:TextFormat = new TextFormat(); _local2.letterSpacing = -1.9; _arg1.setTextFormat(_local2); } private function pauseBtnHandler(_arg1:MouseEvent):void{ dispatchEvent(new Event("pause")); } } }//package
Section 77
//LevelData (LevelData) package { public class LevelData { public static var maps:Array = [[[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 30, 30, 30, 30, 30, 30, 30, 30], [30, 9, 5, 5, 5, 5, 5, 5, 6, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 5, 5, 5, 5, 5, 5, 3, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 3, 0, 8, 15, 15, 15, 2, 0, 8, 15, 15, 15, 15, 15, 2, 0, 8, 15, 15, 15, 2, 0, 9, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 31, 8, 21, 4, 4, 4, 6, 0, 8, 15, 15, 15, 2, 0, 12, 4, 4, 4, 4, 4, 6, 0, 8, 15, 15, 15, 2, 0, 12, 4, 4, 4, 22, 2, 31, 10, 30], [30, 10, 0, 8, 2, 0, 0, 0, 0, 0, 8, 15, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 15, 15, 15, 2, 0, 0, 0, 0, 0, 8, 2, 0, 10, 30], [30, 10, 0, 12, 6, 0, 9, 1, 1, 1, 23, 15, 15, 15, 2, 0, 9, 1, 1, 1, 1, 1, 3, 0, 8, 15, 15, 15, 20, 1, 1, 1, 3, 0, 12, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 8, 21, 4, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 4, 22, 2, 0, 0, 0, 0, 10, 30], [30, 12, 5, 5, 3, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 8, 2, 0, 9, 5, 5, 6, 30], [30, 30, 30, 30, 10, 0, 8, 2, 0, 9, 1, 1, 1, 1, 3, 0, 9, 1, 1, 32, 1, 1, 3, 0, 9, 1, 1, 1, 1, 3, 0, 8, 2, 0, 10, 30, 30, 30, 30], [13, 5, 5, 5, 6, 0, 12, 6, 0, 8, 15, 15, 15, 15, 2, 0, 8, 32, 32, 32, 32, 32, 2, 0, 8, 15, 15, 15, 15, 2, 0, 12, 6, 0, 12, 5, 5, 5, 7], [0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 15, 15, 15, 15, 2, 0, 8, 32, 32, 32, 32, 32, 2, 0, 8, 15, 15, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [13, 5, 5, 5, 3, 0, 9, 3, 0, 12, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 6, 0, 9, 3, 0, 9, 5, 5, 5, 7], [30, 30, 30, 30, 10, 0, 8, 2, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 10, 30, 30, 30, 30], [30, 9, 5, 5, 6, 0, 8, 20, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 23, 2, 0, 12, 5, 5, 3, 30], [30, 10, 0, 0, 0, 0, 8, 15, 15, 15, 15, 15, 2, 0, 8, 15, 21, 4, 4, 4, 4, 4, 22, 15, 2, 0, 8, 15, 15, 15, 15, 15, 2, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 23, 15, 15, 15, 15, 15, 2, 0, 8, 15, 2, 0, 0, 0, 0, 0, 8, 15, 2, 0, 8, 15, 15, 15, 15, 15, 20, 1, 1, 3, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 12, 4, 6, 0, 9, 5, 3, 0, 12, 4, 6, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 31, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 0, 0, 0, 0, 10, 30, 10, 0, 0, 0, 0, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 31, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 9, 5, 5, 5, 6, 30, 12, 5, 5, 5, 3, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 10, 30, 30, 30, 30, 30, 30, 30, 30, 30, 10, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 10, 30], [30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30, 30, 30, 30, 30, 30, 30, 30, 30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]], [[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 30, 30, 30, 30, 30, 30, 30, 30], [13, 5, 5, 5, 5, 5, 5, 5, 6, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 5, 5, 5, 5, 5, 5, 5, 7], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 3, 0, 9, 3, 0, 9, 3, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0], [13, 3, 0, 9, 1, 1, 1, 1, 3, 0, 8, 15, 15, 15, 2, 0, 8, 15, 15, 15, 15, 15, 2, 0, 8, 2, 0, 8, 2, 0, 9, 1, 1, 1, 1, 3, 0, 9, 7], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 21, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 6, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 12, 4, 4, 22, 15, 2, 0, 8, 2, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 2, 0, 8, 15, 21, 4, 4, 6, 0, 10, 30], [30, 10, 31, 0, 0, 0, 8, 21, 6, 0, 12, 6, 0, 8, 21, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 22, 2, 0, 0, 0, 31, 10, 30], [30, 12, 5, 5, 3, 0, 8, 2, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 9, 5, 5, 6, 30], [30, 30, 30, 30, 10, 0, 8, 2, 0, 9, 1, 3, 0, 8, 2, 0, 9, 1, 1, 32, 1, 1, 3, 0, 9, 3, 0, 9, 1, 3, 0, 8, 2, 0, 10, 30, 30, 30, 30], [30, 30, 30, 30, 10, 0, 8, 2, 0, 8, 15, 2, 0, 8, 2, 0, 8, 32, 32, 32, 32, 32, 2, 0, 8, 2, 0, 8, 15, 2, 0, 12, 6, 0, 10, 30, 30, 30, 30], [30, 30, 30, 30, 10, 0, 8, 2, 0, 8, 15, 2, 0, 8, 2, 0, 8, 32, 32, 32, 32, 32, 2, 0, 8, 2, 33, 8, 15, 2, 0, 0, 0, 0, 10, 30, 30, 30, 30], [30, 30, 30, 30, 10, 0, 12, 6, 0, 12, 4, 6, 0, 8, 2, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 6, 0, 12, 4, 6, 0, 9, 3, 0, 10, 30, 30, 30, 30], [30, 30, 30, 30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 10, 30, 30, 30, 30], [30, 9, 5, 5, 6, 0, 9, 1, 1, 1, 1, 3, 0, 0, 0, 0, 9, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 23, 2, 0, 12, 5, 5, 3, 30], [30, 10, 31, 0, 0, 0, 8, 15, 15, 15, 15, 20, 1, 1, 1, 1, 23, 21, 4, 4, 4, 6, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 0, 0, 31, 10, 30], [30, 10, 0, 9, 1, 1, 23, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 0, 0, 0, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 20, 1, 1, 3, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 21, 4, 4, 4, 4, 6, 0, 9, 5, 3, 0, 12, 4, 4, 22, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 0, 0, 0, 0, 0, 10, 30, 10, 0, 0, 0, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 10, 30], [13, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 9, 5, 5, 5, 5, 6, 30, 12, 5, 5, 3, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 7], [0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 10, 30, 30, 30, 30, 30, 30, 30, 30, 30, 10, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0], [13, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30, 30, 30, 30, 30, 30, 30, 30, 30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]], [[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 30, 30], [30, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 9, 1, 1, 1, 1, 3, 0, 9, 3, 0, 0, 9, 3, 0, 9, 1, 1, 1, 1, 1, 3, 0, 10, 30, 30], [30, 10, 31, 9, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 0, 8, 2, 0, 8, 15, 21, 4, 4, 4, 6, 0, 10, 30, 30], [30, 10, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 31, 8, 2, 0, 8, 15, 2, 31, 0, 0, 0, 33, 10, 30, 30], [30, 10, 0, 8, 21, 4, 4, 22, 21, 4, 4, 22, 2, 0, 8, 21, 4, 4, 22, 2, 0, 8, 2, 0, 0, 8, 2, 0, 8, 15, 2, 0, 0, 0, 0, 9, 6, 30, 30], [30, 10, 0, 8, 2, 0, 0, 8, 2, 0, 0, 8, 2, 0, 8, 2, 0, 31, 8, 2, 0, 8, 20, 1, 1, 23, 2, 0, 8, 15, 20, 1, 1, 3, 0, 10, 30, 30, 30], [13, 6, 0, 12, 6, 0, 0, 12, 6, 0, 0, 12, 6, 0, 12, 6, 0, 0, 12, 6, 0, 12, 4, 4, 4, 4, 6, 0, 12, 4, 4, 22, 15, 2, 0, 12, 5, 5, 7], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 15, 2, 0, 0, 0, 0, 0], [13, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 32, 1, 1, 3, 0, 9, 1, 1, 3, 0, 0, 0, 8, 21, 6, 0, 9, 5, 5, 7], [30, 10, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 8, 32, 32, 32, 32, 32, 2, 0, 8, 15, 15, 2, 0, 9, 1, 23, 2, 0, 0, 10, 30, 30, 30], [30, 10, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 32, 32, 32, 32, 32, 2, 0, 8, 15, 15, 2, 0, 12, 4, 4, 6, 0, 9, 6, 30, 30, 30], [30, 12, 5, 3, 0, 9, 1, 1, 1, 1, 3, 0, 9, 1, 3, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 22, 15, 2, 0, 0, 0, 0, 0, 0, 10, 30, 30, 30, 30], [30, 30, 30, 10, 0, 8, 15, 15, 21, 4, 6, 0, 8, 15, 2, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 12, 4, 6, 0, 9, 1, 1, 3, 0, 10, 30, 30, 30, 30], [30, 9, 5, 6, 0, 12, 4, 4, 6, 0, 0, 0, 8, 15, 20, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 8, 15, 15, 2, 0, 12, 5, 5, 3, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 23, 15, 15, 15, 21, 4, 4, 4, 4, 4, 22, 2, 0, 9, 1, 1, 1, 23, 15, 15, 2, 0, 0, 0, 33, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 3, 0, 8, 15, 15, 15, 15, 15, 2, 0, 0, 0, 0, 0, 8, 2, 0, 8, 15, 15, 15, 15, 15, 15, 20, 1, 1, 3, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 15, 21, 4, 4, 4, 6, 0, 9, 5, 3, 0, 12, 6, 0, 12, 22, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 15, 2, 0, 0, 0, 0, 0, 10, 30, 10, 0, 0, 0, 0, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 31, 12, 4, 4, 4, 4, 6, 0, 12, 4, 6, 0, 9, 5, 5, 5, 6, 30, 12, 5, 5, 5, 3, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 6, 31, 10, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 10, 30, 30, 30, 30, 30, 30, 30, 30, 30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30], [30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30, 30, 30, 30, 30, 30, 30, 30, 30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]], [[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 30], [30, 10, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 22, 15, 15, 15, 15, 15, 21, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 4, 4, 4, 4, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 9, 1, 1, 32, 1, 1, 3, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 8, 32, 32, 32, 32, 32, 2, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 8, 32, 32, 32, 32, 32, 2, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 10, 30], [13, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 7], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [13, 3, 0, 9, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 3, 0, 9, 7], [30, 10, 0, 12, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 9, 5, 5, 5, 3, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 10, 30, 30, 30, 10, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 31, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30, 30, 30, 10, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 31, 10, 30], [30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30, 30, 30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]], [[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 30], [30, 10, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 1, 3, 0, 9, 1, 1, 1, 3, 0, 9, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 6, 0, 8, 15, 15, 15, 2, 0, 8, 15, 15, 15, 15, 15, 2, 0, 8, 15, 15, 15, 2, 0, 12, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 0, 0, 33, 0, 0, 8, 21, 4, 4, 6, 0, 12, 4, 4, 4, 4, 4, 6, 0, 12, 4, 4, 22, 2, 0, 0, 33, 0, 0, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 3, 0, 8, 2, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 8, 2, 0, 9, 1, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 8, 21, 4, 4, 4, 4, 4, 4, 4, 4, 4, 22, 2, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 4, 6, 0, 8, 2, 0, 12, 6, 0, 9, 1, 1, 32, 1, 1, 3, 0, 12, 6, 0, 8, 2, 0, 12, 4, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 33, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 8, 32, 32, 32, 32, 32, 2, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 33, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 1, 3, 0, 8, 2, 0, 9, 3, 0, 8, 32, 32, 32, 32, 32, 2, 0, 9, 3, 0, 8, 2, 0, 9, 1, 1, 1, 1, 3, 0, 10, 30], [13, 6, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 8, 2, 0, 12, 4, 4, 4, 4, 4, 6, 0, 8, 2, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 12, 7], [0, 0, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 8, 2, 0, 0, 0, 0, 31, 0, 0, 0, 0, 8, 2, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 0, 0], [13, 3, 0, 8, 15, 15, 15, 15, 2, 0, 8, 2, 0, 8, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 2, 0, 8, 2, 0, 8, 15, 15, 15, 15, 2, 0, 9, 7], [30, 10, 0, 8, 15, 15, 15, 21, 6, 0, 8, 2, 0, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 8, 2, 0, 12, 22, 15, 15, 15, 2, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 6, 0, 0, 8, 2, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 8, 2, 0, 0, 12, 4, 4, 4, 6, 0, 10, 30], [30, 10, 0, 0, 0, 33, 0, 0, 0, 9, 23, 20, 1, 1, 1, 3, 0, 9, 5, 5, 5, 3, 0, 9, 1, 1, 1, 23, 20, 3, 0, 0, 0, 33, 0, 0, 0, 10, 30], [30, 10, 0, 9, 1, 1, 1, 3, 0, 8, 21, 4, 4, 4, 4, 6, 0, 10, 30, 30, 30, 10, 0, 12, 4, 4, 4, 4, 22, 2, 0, 9, 1, 1, 1, 3, 0, 10, 30], [30, 10, 0, 12, 4, 4, 4, 6, 0, 12, 6, 0, 33, 0, 0, 0, 0, 10, 30, 30, 30, 10, 0, 0, 0, 0, 33, 0, 12, 6, 0, 12, 4, 4, 4, 6, 0, 10, 30], [30, 10, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 5, 5, 5, 5, 6, 30, 30, 30, 12, 5, 5, 5, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 10, 30], [30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]]]; } }//package
Section 78
//livesIcon (livesIcon) package { import flash.display.*; public dynamic class livesIcon extends MovieClip { public function livesIcon(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 79
//Main (Main) package { import com.mbxgames.framework.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; import mochi.as3.*; import com.mbxgames.services.thirdparty.*; import flash.system.*; public class Main extends AbstractMain { public var gameCompleted:Boolean; private var csAPI:ClearSpringAPI; public var adRoot:MovieClip; public var location:String; public var mochiLeaderboardID:String;// = "1cd1d28580ff2db4" public var sndBtn:MovieClip; public var clearSpring:ClearSpring; private var highscores:HighscoresController; private var domain:String; private var dload:DownloadController; private var gameSummary:GameSummaryController; public var soundOn:Boolean; var _mochiads_game_id:String;// = "20d955a83fd944b2" private var share:ShareController; private var splash:SplashController; public var cookie:Cookie; private var dcap:DataCaptureController; public var mochiGameID:String;// = "20d955a83fd944b2" private var home:HomeController; public var lbRoot:MovieClip; private var game:GameController; public static var instance:Main; public function Main(){ Security.allowDomain("*"); stage.scaleMode = StageScaleMode.SHOW_ALL; location = loaderInfo.url; instance = this; sw = 480; sh = 320; cookie = new Cookie(); cookie.initialise("pacmau5"); scrollRect = new Rectangle(0, 0, sw, sh); var _local1:LocalConnection = new LocalConnection(); domain = _local1.domain; if (domain != "localhost"){ csAPI = new ClearSpringAPI(); csAPI.addEventListener("closed", clearSpringCloseHandler); }; registerSound("music_menus"); registerSound("music_game"); registerSound("snd_death"); registerSound("snd_dot"); registerSound("snd_pickup"); registerSound("snd_btn_click"); registerSound("snd_btn_over"); addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function clearSpringCloseHandler(_arg1:Event):void{ removeOverlay(); } public function goDownload():void{ addOverlay("Download"); } public function goEdit():void{ GameController.currentRoundID = 4; GameController.GAME_STATUS = GameController.GAME_STATUS_EDITING; changePage("Game"); zOrderSoundBtn(); } public function setSoundOn(_arg1:Boolean):void{ soundOn = _arg1; if (soundOn){ sndBtn.gotoAndStop(2); } else { sndBtn.gotoAndStop(1); }; muteSound(!(soundOn)); } public function goDataCaptureGate(_arg1:Function):void{ if (!dataCaptured){ dataCaptured = true; addOverlay("DataCapture", _arg1); } else { _arg1(); }; } public function toggleSound(_arg1:MouseEvent):void{ if (soundOn){ setSoundOn(false); } else { setSoundOn(true); }; } public function get editorEnabled():Boolean{ return (!((location.indexOf("mbxgames/fivebyfive/deadmau5") == -1))); } public function goMainSite():void{ goNewLocation("http://www.deadmau5.com/?r=widget", "_blank"); } private function get dataCaptured():Boolean{ return (Boolean((cookie.getItem("dataCaptureDisplayed") == "1"))); } public function goPlay():void{ GameController.GAME_STATUS = GameController.GAME_STATUS_PLAYING; var _local1:* = []; _local1[0] = "5b7cfedf"; _local1[1] = "f7a1b19f"; _local1[2] = "e6adf5a9"; _local1[3] = "52d64180"; _local1[4] = "c4b21089"; MochiBot.track(this, _local1[GameController.currentRoundID]); stopMusic(2000); changePage("Game"); zOrderSoundBtn(); } public function goDownloadContent(_arg1:String):void{ var ref = _arg1; if (!dataCaptured){ goDataCaptureGate(function (){ goDownloadContent(ref); }); } else { switch (ref){ case "itunes": goNewLocation("http://www.itunes.com/deadmau5", "_blank"); break; case "exclusive": MochiBot.track(this, "dbc44979"); goNewLocation("http://www.deadmau5.com/ghosts/download.php?f=exclusive", "_blank"); break; }; }; } public function goHighscores():void{ if (HighscoresController.doSubmit){ if (!dataCaptured){ goDataCaptureGate(goHighscores); return; }; }; addOverlay("Highscores"); } public function goGameSummary():void{ playMusic("music_menus", 2000); addOverlay("GameSummary"); } private function set dataCaptured(_arg1:Boolean):void{ if (_arg1){ cookie.setItem("dataCaptureDisplayed", "1"); } else { cookie.setItem("dataCaptureDisplayed", ""); }; } public function goMyspace():void{ goNewLocation("http://www.myspace.com/deadmau5", "_blank"); } public function goShare():void{ if (!dataCaptured){ goDataCaptureGate(goShare); return; }; addOverlay("Share"); } private function zOrderSoundBtn():void{ setChildIndex(sndBtn, (numChildren - 1)); } private function onAdded(_arg1:Event):void{ HighscoresController.mochiRoot = lbRoot; MochiServices.connect(mochiGameID, lbRoot); setSoundOn(true); sndBtn.buttonMode = true; sndBtn.mouseChildren = false; sndBtn.addEventListener(MouseEvent.MOUSE_DOWN, toggleSound); MochiAd.showPreGameAd({clip:adRoot, id:mochiGameID, res:"480x320", no_bg:true, background:0, ad_finished:onAdFinished, color:0xB4B4, outline:854794, no_bg:false}); } public function goSplash():void{ changePage("Splash"); } public function onAdFinished():void{ goSplash(); } public function showClearSpring(_arg1:MovieClip):void{ if (domain != "localhost"){ _arg1.addChild(csAPI); csAPI.show(); }; } public function goHome():void{ gameCompleted = ((cookie.getItem("completed") == "1")) ? true : false; playMusic("music_menus", 5000); GameController.currentRoundID = 0; GameController.currPoints = 0; changePage("Home"); zOrderSoundBtn(); } } }//package
Section 80
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4 = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 81
//music_game (music_game) package { import flash.media.*; public dynamic class music_game extends Sound { } }//package
Section 82
//music_menus (music_menus) package { import flash.media.*; public dynamic class music_menus extends Sound { } }//package
Section 83
//orange_particle (orange_particle) package { import flash.display.*; public dynamic class orange_particle extends BitmapData { public function orange_particle(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 84
//OuterFrame (OuterFrame) package { import flash.events.*; import flash.display.*; public class OuterFrame extends MovieClip { public var btn0:Button2; public var btn1:Button2; public var btn2:Button2; private var main:Main; public var bg:MovieClip; public function OuterFrame(){ main = Main.instance; mouseEnabled = false; bg.mouseEnabled = false; btn0.label = "visit deadmau5.com"; btn1.label = "myspace.com/deadmau5"; btn2.label = "share deadmau5 ghosts"; btn0.addEventListener(MouseEvent.CLICK, btnHandler, false, 0, true); btn1.addEventListener(MouseEvent.CLICK, btnHandler, false, 0, true); btn2.addEventListener(MouseEvent.CLICK, btnHandler, false, 0, true); } private function btnHandler(_arg1:MouseEvent):void{ switch (_arg1.target){ case btn0: main.goMainSite(); break; case btn1: main.goMyspace(); break; case btn2: main.goShare(); break; }; } } }//package
Section 85
//ParticleFountain (ParticleFountain) package { import flash.events.*; import flash.display.*; public class ParticleFountain extends MovieClip { private var loop:Boolean; private var particles:Array; private var gravity:Number; private var count:uint;// = 0 private var radius:Number; private var moveSpeed:Number; public function ParticleFountain(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Boolean=false){ var _local8:String; var _local9:Particle; super(); this.radius = _arg3; this.gravity = _arg5; this.loop = _arg6; this.moveSpeed = _arg4; particles = []; var _local7:uint; while (_local7 < _arg2) { _local8 = _arg1[int((Math.random() * _arg1.length))]; _local9 = new Particle(_local8); particles.push(_local9); _local7++; }; initialise(); } private function destroySelf():void{ removeEventListener(Event.ENTER_FRAME, tick); var _local1:uint; while (_local1 < particles.length) { particles[_local1].destroy(); particles[_local1] = null; _local1++; }; particles = []; if (parent){ if (parent.contains(this)){ parent.removeChild(this); }; }; } public function tick(_arg1:Event):void{ var _local3:Particle; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:*; var _local2:uint; while (_local2 < particles.length) { _local3 = Particle(particles[_local2]); _local4 = ((_local3.rot * Math.PI) / 180); _local5 = (Math.cos(_local4) * _local3.speed); _local6 = (Math.sin(_local4) * _local3.speed); _local3.x = (_local3.x + _local5); _local3.y = (_local3.y + _local6); _local3.rotation = (_local3.rotation + (_local5 * 2)); _local3.y = (_local3.y + gravity); _local7 = Math.sqrt(((_local3.x * _local3.x) + (_local3.y * _local3.y))); if (_local7 > radius){ if (loop){ initParticle(_local3); } else { particles.splice(_local2, 1); _local3.destroy(); if ((((particles.length <= 0)) || ((alpha <= 0)))){ destroySelf(); return; }; }; }; _local2++; }; alpha = (alpha - 0.02); } private function initialise():void{ var _local1:*; var _local2:Particle; for (_local1 in particles) { _local2 = Particle(particles[_local1]); addChild(_local2); initParticle(_local2); }; addEventListener(Event.ENTER_FRAME, tick, false, 0, true); } private function randRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1); return (_local3); } private function initParticle(_arg1:Particle):void{ _arg1.speed = randRange((moveSpeed * 0.55), moveSpeed); _arg1.rot = randRange(0, 360); _arg1.x = (_arg1.y = 0); } } }//package import flash.display.*; import flash.utils.*; class Particle extends Bitmap { public var rot:Number; public var speed:Number; private function Particle(_arg1:String){ var _local2:Class = (getDefinitionByName(_arg1) as Class); bitmapData = (new _local2(0, 0) as BitmapData); } public function destroy():void{ bitmapData.dispose(); } }
Section 86
//PauseLayer (PauseLayer) package { import gs.*; import flash.events.*; import flash.display.*; import flash.text.*; public class PauseLayer extends MovieClip { public var btn0:MovieClip; public var btn1:MovieClip; public var evtRef:String; public function PauseLayer(){ var _local4:MovieClip; super(); var _local1:Array = ["resume", "quit to menu"]; var _local2:TextFormat = new TextFormat(); _local2.letterSpacing = -1.9; var _local3:uint; while (_local3 < 2) { _local4 = MovieClip(this[("btn" + _local3)]); _local4.id = _local3; _local4.field.htmlText = _local1[_local3]; _local4.field.setTextFormat(_local2); _local4.padlock.visible = false; _local4.buttonMode = true; _local4.mouseChildren = false; _local4.addEventListener(MouseEvent.CLICK, btnClickHandler, false, 0, true); TweenLite.from(_local4, 0.5, {tint:0xFFFFFF}); _local3++; }; } private function btnClickHandler(_arg1:MouseEvent):void{ switch (_arg1.target.id){ case 0: evtRef = "resume"; break; case 1: evtRef = "quit"; break; }; dispatchEvent(new Event("clicked")); } } }//package
Section 87
//Pill (Pill) package { import flash.display.*; public dynamic class Pill extends MovieClip { } }//package
Section 88
//Player (Player) package { import flash.events.*; public class Player extends Actor { public var enemyEaten:Enemy; public static var instance:Player; public function Player(){ instance = this; spriteSheetBitmapBaseName = "ss_player"; } override public function checkCollisions():void{ var _local2:Actor; if (passive){ return; }; var _local1:uint; while (_local1 < list.length) { _local2 = Actor(list[_local1]); if ((_local2 is Enemy)){ if (!Enemy(_local2).eaten){ if (getDistance(x, y, _local2.x, _local2.y) < Tile.SIZE){ if (Enemy(_local2).edible){ eventRef = "gotEnemy"; enemyEaten = Enemy(_local2); dispatchEvent(new Event("onCollect")); } else { die(); }; return; }; }; }; _local1++; }; } override public function onJunctionMet():void{ if (queuedMove){ setMove(queuedMove.x, queuedMove.y); queuedMove = null; }; } } }//package
Section 89
//PlayerTrail (PlayerTrail) package { public dynamic class PlayerTrail extends Trail { } }//package
Section 90
//Portal (Portal) package { public class Portal extends SpriteSheet { public function Portal(){ super(3, 5, 26, 26, "loop", 99999); initialise(["portal"]); } } }//package
Section 91
//portal (portal) package { import flash.display.*; public dynamic class portal extends BitmapData { public function portal(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 92
//Powerup (Powerup) package { import flash.display.*; public dynamic class Powerup extends MovieClip { } }//package
Section 93
//red_particle (red_particle) package { import flash.display.*; public dynamic class red_particle extends BitmapData { public function red_particle(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 94
//ShareController (ShareController) package { import flash.events.*; public class ShareController extends GenericController { public function ShareController(){ attachViewAsPage("shareView"); initialise(); } private function buttonCallback(_arg1:MouseEvent):void{ switch (_arg1.target){ case view.btn0: main.removeOverlay(); break; }; } private function initialise():void{ main.showClearSpring(view); initButton(view.btn0, "Back", buttonCallback); } } }//package
Section 95
//shareView (shareView) package { import flash.display.*; public dynamic class shareView extends MovieClip { public var btn0:Button1; } }//package
Section 96
//snd_btn_click (snd_btn_click) package { import flash.media.*; public dynamic class snd_btn_click extends Sound { } }//package
Section 97
//snd_btn_over (snd_btn_over) package { import flash.media.*; public dynamic class snd_btn_over extends Sound { } }//package
Section 98
//snd_death (snd_death) package { import flash.media.*; public dynamic class snd_death extends Sound { } }//package
Section 99
//snd_dot (snd_dot) package { import flash.media.*; public dynamic class snd_dot extends Sound { } }//package
Section 100
//snd_pickup (snd_pickup) package { import flash.media.*; public dynamic class snd_pickup extends Sound { } }//package
Section 101
//SplashController (SplashController) package { import flash.events.*; public class SplashController extends GenericController { public function SplashController(){ attachViewAsPage("splashView"); view.addEventListener("onComplete", onViewComplete, false, 0, true); } private function onViewComplete(_arg1:Event):void{ main.goHome(); } } }//package
Section 102
//splashView (splashView) package { public dynamic class splashView extends SplashView { public function splashView(){ addFrameScript(68, frame69, 86, frame87); } function frame69(){ stop(); onReady(); } function frame87(){ stop(); onComplete(); } } }//package
Section 103
//SplashView (SplashView) package { import flash.events.*; import flash.display.*; import flash.utils.*; public class SplashView extends MovieClip { private var timer:Timer; public function onReady():void{ timer = new Timer(2000, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete, false, 0, true); timer.start(); } public function onComplete():void{ dispatchEvent(new Event("onComplete")); } private function onTimerComplete(_arg1:TimerEvent):void{ play(); } } }//package
Section 104
//SpriteSheet (SpriteSheet) package { import flash.events.*; import flash.display.*; import fl.motion.*; import flash.geom.*; import flash.utils.*; public class SpriteSheet extends MovieClip { public var dispatchDelay:int;// = 0 private var frameIncrement:int; private var cellWidth:Number; private var centrex:Number;// = 0 private var disabled:Boolean; private var rows:uint; private var contents:Sprite; private var playbackMode:String; private var tickMethod:Function; private var cellHeight:Number; private var totalCells:uint; private var numLoops:int; private var cols:uint; public var bitmapList:Array; private var cellID:uint; private var centrey:Number;// = 0 public function SpriteSheet(_arg1:uint, _arg2:uint, _arg3:Number, _arg4:Number, _arg5:String, _arg6:int=0, _arg7:int=1, _arg8:Boolean=false){ this.rows = _arg1; this.cols = _arg2; this.cellWidth = _arg3; this.cellHeight = _arg4; this.playbackMode = _arg5; this.numLoops = _arg6; this.frameIncrement = _arg7; totalCells = (_arg1 * _arg2); cellID = (_arg8) ? int((Math.random() * totalCells)) : 0; scrollRect = new Rectangle(0, 0, _arg3, _arg4); tickMethod = fwd; } private function onLoopCycle():void{ if (numLoops > 0){ numLoops--; } else { numLoops = 0; dispatchComplete(); }; } public function destroy():void{ var _local1:uint; while (_local1 < bitmapList.length) { bitmapList[_local1].bitmapData.dispose(); bitmapList[_local1] = null; _local1++; }; bitmapList = []; removeChild(contents); contents = null; scrollRect = null; } public function tick():void{ if (!disabled){ tickMethod(); }; } public function centralise():void{ x = (x - (cellWidth / 2)); y = (y - (cellHeight / 2)); } public function fwd():void{ updatePosition(); if ((cellID + frameIncrement) < totalCells){ cellID = (cellID + frameIncrement); } else { switch (playbackMode){ case "stop": default: disabled = true; dispatchComplete(); break; case "pingpong": tickMethod = rev; cellID--; break; case "loop": onLoopCycle(); cellID = 0; break; }; }; } private function dispatchComplete():void{ var timer:Timer = new Timer(dispatchDelay, 1); timer.addEventListener(TimerEvent.TIMER_COMPLETE, function (){ dispatchEvent(new Event("onSpriteSheetAnimationComplete")); }, false, 0, true); timer.start(); } public function rev():void{ updatePosition(); if ((cellID - frameIncrement) > -1){ cellID = (cellID - frameIncrement); } else { switch (playbackMode){ case "stop": default: dispatchComplete(); break; case "pingpong": onLoopCycle(); tickMethod = fwd; cellID++; break; case "loop": onLoopCycle(); cellID = totalCells; break; }; }; } public function setColor(_arg1:uint, _arg2:uint, _arg3:Number=1):void{ var _local4:Color = new Color(); _local4.setTint(_arg2, _arg3); var _local5:Bitmap = bitmapList[_arg1]; _local5.blendMode = BlendMode.MULTIPLY; _local5.transform.colorTransform = _local4; } public function initialise(_arg1:Array):void{ var _local3:Class; contents = new Sprite(); bitmapList = []; var _local2:uint; while (_local2 < _arg1.length) { if ((_arg1[_local2] is BitmapData)){ bitmapList[_local2] = new Bitmap(_arg1[_local2]); } else { if ((_arg1[_local2] is String)){ _local3 = (getDefinitionByName(_arg1[_local2]) as Class); bitmapList[_local2] = new Bitmap(new _local3(0, 0)); }; }; contents.addChild(bitmapList[_local2]); _local2++; }; addChild(contents); } private function updatePosition():void{ contents.x = (-((cellID % cols)) * cellWidth); contents.y = (-(cellHeight) * Math.floor((cellID / cols))); contents.x = (contents.x + centrex); contents.y = (contents.y + centrey); } } }//package
Section 105
//ss_player_back (ss_player_back) package { import flash.display.*; public dynamic class ss_player_back extends BitmapData { public function ss_player_back(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 106
//ss_player_back2 (ss_player_back2) package { import flash.display.*; public dynamic class ss_player_back2 extends BitmapData { public function ss_player_back2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 107
//ss_player_front (ss_player_front) package { import flash.display.*; public dynamic class ss_player_front extends BitmapData { public function ss_player_front(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 108
//ss_player_front2 (ss_player_front2) package { import flash.display.*; public dynamic class ss_player_front2 extends BitmapData { public function ss_player_front2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 109
//ss_player_side (ss_player_side) package { import flash.display.*; public dynamic class ss_player_side extends BitmapData { public function ss_player_side(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 110
//ss_player_side2 (ss_player_side2) package { import flash.display.*; public dynamic class ss_player_side2 extends BitmapData { public function ss_player_side2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 111
//Tile (Tile) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class Tile extends MovieClip { public var baseClip:MovieClip; private var total:uint;// = 2 public var isCage:Boolean; public var containsPowerup:Boolean; public var oob:Boolean; public var item:MovieClip; public var gfxID:int;// = 0 public var colID:uint; private var id:uint;// = 0 private var gfxClip:MovieClip; public var edited:Boolean; public var rowID:uint; public var containsPill:Boolean; public static const SIZE:Number = 12; public static const PILL_SPAWN_ID:int = 31; public static const CAGE_GRAPHIC_ID:int = 32; public static const POWERUP_SPAWN_ID:int = 33; public static const OOB_GRAPHIC_ID:int = 30; public static const PORTAL_SPAWN_ID:int = 34; public static var powerupSpawnTiles:Array = []; public static var editMode:Boolean; public static var pillSpawnTiles:Array = []; public static var list:Array = []; public static var numDots:int; public function Tile(){ addFrameScript(0, frame1); gfxClip = new TileGfx(); addChild(gfxClip); total = totalFrames; width = (height = SIZE); scrollRect = new Rectangle(0, 0, SIZE, SIZE); } private function setOob():void{ if (oob){ gfxID = OOB_GRAPHIC_ID; } else { gfxID = 0; }; id = 0; } public function togglePillSpawn():void{ if (!edited){ containsPill = !(containsPill); if (containsPill){ trace("setting pill"); gfxID = PILL_SPAWN_ID; } else { trace("setting empty"); gfxID = 0; }; id = 0; edited = true; }; } public function toggleOob():void{ if (!edited){ oob = !(oob); setOob(); edited = true; }; } public function render():void{ baseClip.visible = editMode; gotoAndStop((id + 1)); gfxClip.gotoAndStop(("t_" + gfxID)); } private function spriteSheetTick(_arg1:Event):void{ var _local2:* = _arg1.target; if (_local2.parent){ if (_local2.parent.contains(_local2)){ _local2.tick(); }; } else { _local2.removeEventListener(Event.ENTER_FRAME, spriteSheetTick); }; } public function get outOfBounds():Boolean{ return (oob); } public function setID(_arg1:int):void{ id = _arg1; } public function addItem(_arg1:String):void{ switch (_arg1){ case "dot": item = new Dot(); break; case GameController.PICKUP_MODE_PILL: item = new Pill(); break; case GameController.PICKUP_MODE_POWERUP: item = new Powerup(); trace("adding a powerup"); break; case GameController.PICKUP_MODE_FREEZE: item = new Freeze(); trace("adding a FREEZE"); break; case GameController.PICKUP_MODE_PORTAL: item = new Portal(); item.addEventListener(Event.ENTER_FRAME, spriteSheetTick); break; }; if ((item is SpriteSheet)){ item.x = (x - (SIZE / 2)); item.y = (y - (SIZE / 2)); } else { item.x = (x + (SIZE / 2)); item.y = (y + (SIZE / 2)); }; parent.parent.addChild(item); } public function setGfx(_arg1:int):void{ if (containsPowerup){ return; }; if (containsPill){ return; }; if (isCage){ return; }; if (oob){ return; }; if (_arg1 == PILL_SPAWN_ID){ containsPill = true; gfxID = _arg1; id = 0; if (pillSpawnTiles.length < 10){ pillSpawnTiles.push(this); if (!editMode){ gfxID = 0; id = 0; }; }; return; }; if ((((_arg1 == POWERUP_SPAWN_ID)) || ((_arg1 == PORTAL_SPAWN_ID)))){ containsPowerup = true; gfxID = _arg1; id = 0; powerupSpawnTiles.push(this); if (!editMode){ gfxID = 0; id = 0; }; return; }; gfxID = _arg1; if (gfxID == OOB_GRAPHIC_ID){ gfxClip.visible = editMode; oob = true; setOob(); }; if (gfxID == CAGE_GRAPHIC_ID){ isCage = true; gfxClip.visible = editMode; id = 1; }; } public function get solid():Boolean{ return (!((currentFrame == 1))); } public function get isCageTile():Boolean{ return (Boolean((gfxID == CAGE_GRAPHIC_ID))); } public function cycle(_arg1:int=1):void{ if (!edited){ id = (id + _arg1); if (id > (total - 1)){ id = 0; } else { if (id < 0){ id = (total - 1); }; }; edited = true; }; } public function togglePowerupSpawn():void{ if (!edited){ containsPowerup = !(containsPowerup); if (containsPowerup){ trace("setting powerup"); gfxID = POWERUP_SPAWN_ID; } else { trace("setting empty"); gfxID = 0; }; id = 0; edited = true; }; } public function get walkable():Boolean{ return (Boolean(((((!(solid)) && (!(outOfBounds)))) && (!(isCage))))); } public function initInGrid(_arg1:uint, _arg2:uint):void{ if (!list){ list = []; }; if (!list[_arg1]){ list[_arg1] = []; }; list[_arg1][_arg2] = this; rowID = _arg1; colID = _arg2; x = (colID * SIZE); y = (rowID * SIZE); } function frame1(){ stop(); } public function removeItem():void{ if (item){ if ((item is SpriteSheet)){ SpriteSheet(item).destroy(); }; item.parent.removeChild(item); item = null; }; } public function toggleCage():void{ if (!edited){ isCage = !(isCage); if (isCage){ trace("setting cage"); oob = false; gfxID = CAGE_GRAPHIC_ID; } else { trace("setting cage NOT"); oob = true; gfxID = 0; }; id = 1; edited = true; }; } public static function initClass():void{ pillSpawnTiles = []; powerupSpawnTiles = []; list = []; numDots = 0; } public static function makeAllEditable():void{ var _local1:*; var _local2:*; for (_local1 in list) { for (_local2 in list[_local1]) { Tile(list[_local1][_local2]).edited = false; }; }; } public static function getTileInstance(_arg1:int, _arg2:int):Tile{ var r = _arg1; var c = _arg2; try { return (Tile(list[r][c])); } catch(e:Error) { return (null); }; return (null); } public static function addDotsToAll():void{ var _local3:uint; var _local4:Tile; var _local1:uint = 2; var _local2:uint; while (_local2 < list.length) { _local3 = _local1; while (_local3 < (list[_local2].length - _local1)) { _local4 = Tile(list[_local2][_local3]); if (((!(_local4.solid)) && (!(_local4.outOfBounds)))){ _local4.addItem("dot"); numDots++; }; _local3++; }; _local2++; }; } } }//package
Section 112
//TileGfx (TileGfx) package { import flash.display.*; public dynamic class TileGfx extends MovieClip { public function TileGfx(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 113
//Trail (Trail) package { import gs.*; import flash.events.*; import flash.display.*; public class Trail extends MovieClip { private function complete():void{ dispatchEvent(new Event("complete")); } public function initialise(_arg1:Number):void{ TweenLite.to(this, _arg1, {delay:0.1, alpha:0, onComplete:complete}); } } }//package

Library Items

Symbol 1 Sound {snd_pickup}
Symbol 2 Sound {snd_dot}
Symbol 3 Sound {snd_death}
Symbol 4 Sound {snd_btn_over}
Symbol 5 Sound {snd_btn_click}
Symbol 6 Sound {music_menus}
Symbol 7 Sound {music_game}
Symbol 8 Bitmap {ss_player_side2}
Symbol 9 Bitmap {ss_player_side}
Symbol 10 Bitmap {ss_player_front2}
Symbol 11 Bitmap {ss_player_front}Used by:129
Symbol 12 Bitmap {ss_player_back2}
Symbol 13 Bitmap {ss_player_back}
Symbol 14 Bitmap {red_particle}
Symbol 15 Bitmap {portal}
Symbol 16 Bitmap {orange_particle}
Symbol 17 Bitmap {green_particle}
Symbol 18 Bitmap {blue_particle}
Symbol 19 GraphicUsed by:20 46 112
Symbol 20 MovieClip {gameView}Uses:19
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:23  Timeline
Symbol 23 MovieClipUses:22Used by:54 154
Symbol 24 BitmapUsed by:25
Symbol 25 GraphicUses:24Used by:28
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:28 128
Symbol 28 MovieClipUses:25 27Used by:54
Symbol 29 BitmapUsed by:30
Symbol 30 GraphicUses:29Used by:31
Symbol 31 MovieClipUses:30Used by:37 38
Symbol 32 FontUsed by:33
Symbol 33 EditableTextUses:32Used by:38
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:36
Symbol 36 MovieClipUses:35Used by:38 165
Symbol 37 MovieClip {deadmau5_ghosts_fla.btn_bg_gfx_7}Uses:31Used by:38
Symbol 38 MovieClip {Button1}Uses:31 33 36 37Used by:54 106 107 114 166 167
Symbol 39 BitmapUsed by:40
Symbol 40 GraphicUses:39Used by:41
Symbol 41 MovieClipUses:40Used by:54
Symbol 42 GraphicUsed by:50
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:45
Symbol 45 MovieClipUses:44Used by:50
Symbol 46 MovieClipUses:19Used by:49
Symbol 47 FontUsed by:48 94 99 110 138 163
Symbol 48 EditableTextUses:47Used by:49
Symbol 49 MovieClip {Button2}Uses:46 48Used by:50
Symbol 50 MovieClip {OuterFrame}Uses:42 45 49Used by:54 114
Symbol 51 BitmapUsed by:52
Symbol 52 GraphicUses:51Used by:53
Symbol 53 MovieClipUses:52Used by:54 154
Symbol 54 MovieClip {homeView}Uses:23 28 38 41 50 53
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:63 64
Symbol 57 GraphicUsed by:63
Symbol 58 GraphicUsed by:63
Symbol 59 GraphicUsed by:63 77
Symbol 60 GraphicUsed by:63
Symbol 61 GraphicUsed by:63
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClip {TileGfx}Uses:56 57 58 59 60 61 62
Symbol 64 MovieClip {Tile}Uses:56
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClip {CloseButton}Uses:65
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClipUses:67Used by:75
Symbol 69 FontUsed by:70 72 88
Symbol 70 EditableTextUses:69Used by:75
Symbol 71 GraphicUsed by:73
Symbol 72 EditableTextUses:69Used by:73
Symbol 73 MovieClipUses:71 72Used by:75
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClip {EditorOutputPanel}Uses:68 70 73 74
Symbol 76 MovieClip {Player}
Symbol 77 MovieClip {EnemyTrail}Uses:59
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClip {PlayerTrail}Uses:78
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClip {Dot}Uses:80
Symbol 82 BitmapUsed by:83
Symbol 83 GraphicUses:82Used by:96
Symbol 84 FontUsed by:85 86 87 100 102 103 104 105 111 113 142
Symbol 85 EditableTextUses:84Used by:96
Symbol 86 EditableTextUses:84Used by:96
Symbol 87 EditableTextUses:84Used by:96
Symbol 88 EditableTextUses:69Used by:96
Symbol 89 MovieClipUsed by:96  Timeline
Symbol 90 BitmapUsed by:91
Symbol 91 GraphicUses:90Used by:92
Symbol 92 MovieClipUses:91Used by:96
Symbol 93 GraphicUsed by:95 106 107 114 143 166 167
Symbol 94 EditableTextUses:47Used by:95
Symbol 95 MovieClipUses:93 94Used by:96
Symbol 96 MovieClip {Hud}Uses:83 85 86 87 88 89 92 95
Symbol 97 GraphicUsed by:98
Symbol 98 MovieClipUses:97Used by:106
Symbol 99 EditableTextUses:47Used by:106
Symbol 100 EditableTextUses:84Used by:106
Symbol 101 GraphicUsed by:106 114
Symbol 102 EditableTextUses:84Used by:106
Symbol 103 EditableTextUses:84Used by:106
Symbol 104 TextUses:84Used by:106
Symbol 105 TextUses:84Used by:106
Symbol 106 MovieClip {dataCaptureView}Uses:93 98 99 100 101 102 103 104 105 38
Symbol 107 MovieClip {shareView}Uses:93 38
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClipUses:108Used by:114
Symbol 110 EditableTextUses:47Used by:114
Symbol 111 EditableTextUses:84Used by:114
Symbol 112 MovieClipUses:19Used by:114
Symbol 113 EditableTextUses:84Used by:114
Symbol 114 MovieClip {gameSummaryView}Uses:93 109 38 110 111 112 101 113 50
Symbol 115 GraphicUsed by:128
Symbol 116 BitmapUsed by:117
Symbol 117 GraphicUses:116Used by:118
Symbol 118 MovieClipUses:117Used by:128
Symbol 119 BitmapUsed by:120
Symbol 120 GraphicUses:119Used by:127
Symbol 121 BitmapUsed by:122
Symbol 122 GraphicUses:121Used by:127
Symbol 123 BitmapUsed by:124
Symbol 124 GraphicUses:123Used by:127
Symbol 125 BitmapUsed by:126
Symbol 126 GraphicUses:125Used by:127
Symbol 127 MovieClip {deadmau5_ghosts_fla.ghost_eyes_34}Uses:120 122 124 126Used by:128
Symbol 128 MovieClip {Enemy}Uses:27 115 118 127
Symbol 129 GraphicUses:11Used by:130
Symbol 130 MovieClipUses:129Used by:131
Symbol 131 MovieClip {livesIcon}Uses:130
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:134
Symbol 134 MovieClip {Powerup}Uses:133
Symbol 135 BitmapUsed by:136
Symbol 136 GraphicUses:135Used by:137
Symbol 137 MovieClip {Pill}Uses:136
Symbol 138 EditableTextUses:47Used by:139
Symbol 139 MovieClip {FlyupPoints}Uses:138
Symbol 140 GraphicUsed by:141
Symbol 141 MovieClipUses:140Used by:143
Symbol 142 TextUses:84Used by:143
Symbol 143 MovieClip {highscoresView}Uses:93 141 142
Symbol 144 BitmapUsed by:145
Symbol 145 GraphicUses:144Used by:146
Symbol 146 MovieClipUses:145Used by:154
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:149
Symbol 149 MovieClipUses:148Used by:150
Symbol 150 MovieClipUses:149Used by:154
Symbol 151 BitmapUsed by:152
Symbol 152 GraphicUses:151Used by:153
Symbol 153 MovieClipUses:152Used by:154
Symbol 154 MovieClip {splashView}Uses:23 53 146 150 153
Symbol 155 BitmapUsed by:156
Symbol 156 GraphicUses:155Used by:157
Symbol 157 MovieClip {Freeze}Uses:156
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:166
Symbol 160 BitmapUsed by:161
Symbol 161 GraphicUses:160Used by:162
Symbol 162 MovieClipUses:161Used by:164 165
Symbol 163 EditableTextUses:47Used by:165
Symbol 164 MovieClip {deadmau5_ghosts_fla.backBtnBg_11}Uses:162Used by:165
Symbol 165 MovieClip {deadmau5_ghosts_fla.backBtn_9}Uses:162 163 36 164Used by:166
Symbol 166 MovieClip {downloadView}Uses:93 159 38 165
Symbol 167 MovieClip {PauseLayer}Uses:93 38
Symbol 168 GraphicUsed by:170
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClip {deadmau5_ghosts_fla.speaker_gfx_2}Uses:168 169Used by:Timeline

Instance Names

"lbRoot"Frame 1Symbol 89 MovieClip
"adRoot"Frame 1Symbol 89 MovieClip
"sndBtn"Frame 1Symbol 170 MovieClip {deadmau5_ghosts_fla.speaker_gfx_2}
"field"Symbol 38 MovieClip {Button1} Frame 1Symbol 33 EditableText
"padlock"Symbol 38 MovieClip {Button1} Frame 1Symbol 36 MovieClip
"bg"Symbol 49 MovieClip {Button2} Frame 1Symbol 46 MovieClip
"field"Symbol 49 MovieClip {Button2} Frame 1Symbol 48 EditableText
"bg"Symbol 50 MovieClip {OuterFrame} Frame 1Symbol 45 MovieClip
"btn0"Symbol 50 MovieClip {OuterFrame} Frame 1Symbol 49 MovieClip {Button2}
"btn1"Symbol 50 MovieClip {OuterFrame} Frame 1Symbol 49 MovieClip {Button2}
"btn2"Symbol 50 MovieClip {OuterFrame} Frame 1Symbol 49 MovieClip {Button2}
"btn0"Symbol 54 MovieClip {homeView} Frame 1Symbol 38 MovieClip {Button1}
"btnEdit"Symbol 54 MovieClip {homeView} Frame 1Symbol 38 MovieClip {Button1}
"btn1"Symbol 54 MovieClip {homeView} Frame 1Symbol 38 MovieClip {Button1}
"btn2"Symbol 54 MovieClip {homeView} Frame 1Symbol 38 MovieClip {Button1}
"baseClip"Symbol 64 MovieClip {Tile} Frame 1Symbol 56 MovieClip
"bg"Symbol 75 MovieClip {EditorOutputPanel} Frame 1Symbol 68 MovieClip
"field"Symbol 75 MovieClip {EditorOutputPanel} Frame 1Symbol 70 EditableText
"refreshBtn"Symbol 75 MovieClip {EditorOutputPanel} Frame 1Symbol 73 MovieClip
"field"Symbol 95 MovieClip Frame 1Symbol 94 EditableText
"bestField"Symbol 96 MovieClip {Hud} Frame 1Symbol 85 EditableText
"levelField"Symbol 96 MovieClip {Hud} Frame 1Symbol 86 EditableText
"pointsField"Symbol 96 MovieClip {Hud} Frame 1Symbol 87 EditableText
"debugField"Symbol 96 MovieClip {Hud} Frame 1Symbol 88 EditableText
"livesContainer"Symbol 96 MovieClip {Hud} Frame 1Symbol 89 MovieClip
"pauseBtn"Symbol 96 MovieClip {Hud} Frame 1Symbol 92 MovieClip
"getReadyClip"Symbol 96 MovieClip {Hud} Frame 1Symbol 95 MovieClip
"titleField"Symbol 106 MovieClip {dataCaptureView} Frame 1Symbol 99 EditableText
"messageField"Symbol 106 MovieClip {dataCaptureView} Frame 1Symbol 100 EditableText
"field0"Symbol 106 MovieClip {dataCaptureView} Frame 1Symbol 102 EditableText
"field1"Symbol 106 MovieClip {dataCaptureView} Frame 1Symbol 103 EditableText
"btn0"Symbol 106 MovieClip {dataCaptureView} Frame 1Symbol 38 MovieClip {Button1}
"btn1"Symbol 106 MovieClip {dataCaptureView} Frame 1Symbol 38 MovieClip {Button1}
"btn0"Symbol 107 MovieClip {shareView} Frame 1Symbol 38 MovieClip {Button1}
"btn0"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 38 MovieClip {Button1}
"btn1"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 38 MovieClip {Button1}
"titleField"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 110 EditableText
"messageField"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 111 EditableText
"field"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 113 EditableText
"submitBtn"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 38 MovieClip {Button1}
"outerFrame"Symbol 114 MovieClip {gameSummaryView} Frame 1Symbol 50 MovieClip {OuterFrame}
"eyes"Symbol 128 MovieClip {Enemy} Frame 1Symbol 127 MovieClip {deadmau5_ghosts_fla.ghost_eyes_34}
"field"Symbol 139 MovieClip {FlyupPoints} Frame 1Symbol 138 EditableText
"field"Symbol 165 MovieClip {deadmau5_ghosts_fla.backBtn_9} Frame 1Symbol 163 EditableText
"padlock"Symbol 165 MovieClip {deadmau5_ghosts_fla.backBtn_9} Frame 1Symbol 36 MovieClip
"btn0"Symbol 166 MovieClip {downloadView} Frame 1Symbol 38 MovieClip {Button1}
"btn1"Symbol 166 MovieClip {downloadView} Frame 1Symbol 38 MovieClip {Button1}
"backBtn"Symbol 166 MovieClip {downloadView} Frame 1Symbol 165 MovieClip {deadmau5_ghosts_fla.backBtn_9}
"btn0"Symbol 167 MovieClip {PauseLayer} Frame 1Symbol 38 MovieClip {Button1}
"btn1"Symbol 167 MovieClip {PauseLayer} Frame 1Symbol 38 MovieClip {Button1}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 11284 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmln ..."
Protect (24)Timeline Frame 10 bytes ""

Labels

"_up"Symbol 38 MovieClip {Button1} Frame 1
"_over"Symbol 38 MovieClip {Button1} Frame 2
"_up"Symbol 49 MovieClip {Button2} Frame 1
"_over"Symbol 49 MovieClip {Button2} Frame 2
"outro"Symbol 54 MovieClip {homeView} Frame 31
"t_0"Symbol 63 MovieClip {TileGfx} Frame 1
"t_15"Symbol 63 MovieClip {TileGfx} Frame 2
"t_9"Symbol 63 MovieClip {TileGfx} Frame 3
"t_3"Symbol 63 MovieClip {TileGfx} Frame 4
"t_6"Symbol 63 MovieClip {TileGfx} Frame 5
"t_12"Symbol 63 MovieClip {TileGfx} Frame 6
"t_5"Symbol 63 MovieClip {TileGfx} Frame 7
"t_7"Symbol 63 MovieClip {TileGfx} Frame 8
"t_13"Symbol 63 MovieClip {TileGfx} Frame 9
"t_1"Symbol 63 MovieClip {TileGfx} Frame 10
"t_4"Symbol 63 MovieClip {TileGfx} Frame 11
"t_10"Symbol 63 MovieClip {TileGfx} Frame 12
"t_11"Symbol 63 MovieClip {TileGfx} Frame 13
"t_14"Symbol 63 MovieClip {TileGfx} Frame 14
"t_8"Symbol 63 MovieClip {TileGfx} Frame 15
"t_2"Symbol 63 MovieClip {TileGfx} Frame 16
"t_20"Symbol 63 MovieClip {TileGfx} Frame 17
"t_21"Symbol 63 MovieClip {TileGfx} Frame 18
"t_22"Symbol 63 MovieClip {TileGfx} Frame 19
"t_23"Symbol 63 MovieClip {TileGfx} Frame 20
"t_30"Symbol 63 MovieClip {TileGfx} Frame 33
"t_31"Symbol 63 MovieClip {TileGfx} Frame 34
"t_32"Symbol 63 MovieClip {TileGfx} Frame 35
"t_33"Symbol 63 MovieClip {TileGfx} Frame 36
"idle"Symbol 76 MovieClip {Player} Frame 1
"up"Symbol 127 MovieClip {deadmau5_ghosts_fla.ghost_eyes_34} Frame 1
"down"Symbol 127 MovieClip {deadmau5_ghosts_fla.ghost_eyes_34} Frame 2
"left"Symbol 127 MovieClip {deadmau5_ghosts_fla.ghost_eyes_34} Frame 3
"right"Symbol 127 MovieClip {deadmau5_ghosts_fla.ghost_eyes_34} Frame 4
"died"Symbol 128 MovieClip {Enemy} Frame 11
"_up"Symbol 165 MovieClip {deadmau5_ghosts_fla.backBtn_9} Frame 1
"_over"Symbol 165 MovieClip {deadmau5_ghosts_fla.backBtn_9} Frame 2




http://swfchan.com/18/87847/info.shtml
Created: 29/3 -2019 19:26:44 Last modified: 29/3 -2019 19:26:44 Server time: 27/04 -2024 12:22:07