Section 1
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import com.adobe.utils.*;
public class MD5 {
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32)));
_local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3;
return (_local2);
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
}
}//package com.adobe.crypto
Section 2
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 3
//Tracker (com.memecounter.Tracker)
package com.memecounter {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class Tracker {
private static var ori_dom:String;
private static var lurl:String;
public static var _isReady:Boolean = false;
public static var a:uint = 0;
public static var root:DisplayObject;
public static var c:uint;
public static var d:String = "";
private static var _isInited:Boolean = false;
public static var fpv:String = "";
private static var l:Loader;
private static var tracker:MovieClip;
public static var da:Array = ["distralytics.com", "distralytics.co.uk"];
private static function loadError(_arg1:Event):void{
a++;
lc();
}
public static function init(_arg1:uint, _arg2:DisplayObject):void{
var _local3:uint;
if (!_isInited){
_isInited = true;
c = _arg1;
root = _arg2;
_local3 = 0;
while (_local3 < da.length) {
Security.allowDomain(da[_local3], ((c + ".c.") + da[_local3]), ("*." + da[_local3]));
_local3++;
};
ori_dom = (root.loaderInfo.parameters.hasOwnProperty("ori_dom")) ? root.loaderInfo.parameters.ori_dom : "";
d = ((ori_dom)!="") ? ori_dom : ((root.loaderInfo.loaderURL.split("/")[0].indexOf("http"))==-1) ? "Local" : root.loaderInfo.loaderURL.split("/")[2].split("?")[0];
fpv = Capabilities.version.split(" ")[1].split(",")[0];
lurl = ((((((((("/control/tracking/trackerAS3.swf" + "?c=") + c) + "&r=") + Math.floor((Math.random() * 10000000000))) + "&d=") + d) + "&p=") + fpv) + "&as=3");
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.INIT, loadComplete);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
lc();
};
}
public static function get isReady():Boolean{
return (isReady);
}
public static function kvClick(_arg1:uint):void{
if (_isReady){
tracker.kvClick(_arg1);
};
}
public static function kvCountry():String{
if (_isReady){
return (tracker.kvCountry());
};
return ("");
}
public static function kvEvent(_arg1:uint):void{
if (_isReady){
tracker.kvEvent(_arg1);
};
}
private static function lc():void{
var _local1:String;
_local1 = (((("http://" + c) + ".c.") + da[(a % da.length)]) + lurl);
Security.allowDomain(_local1);
l.load(new URLRequest(_local1));
}
private static function loadComplete(_arg1:Event):void{
tracker = _arg1.target.content;
tracker.init(getDefinitionByName("com.memecounter.Tracker"), root);
_isReady = true;
}
}
}//package com.memecounter
Section 4
//ArrayUtils (com.stampy.arrays.ArrayUtils)
package com.stampy.arrays {
public class ArrayUtils {
public static function arrayContains(_arg1:Array, _arg2):Boolean{
var _local3:uint;
var _local4:int;
_local3 = _arg1.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg1[_local4] == _arg2){
return (true);
};
_local4++;
};
return (false);
}
public static function randomArray(_arg1:Array):Array{
var _local2:Array;
_local2 = new Array();
while (_arg1.length > 0) {
_local2.push(_arg1.splice(Math.floor((Math.random() * _arg1.length)), 1));
};
return (_local2);
}
}
}//package com.stampy.arrays
Section 5
//Cookie (com.stampy.cookies.Cookie)
package com.stampy.cookies {
import flash.net.*;
import flash.utils.*;
public class Cookie {
public static function addCookieUser(_arg1:String, _arg2:String, _arg3:Object):void{
var _local4:SharedObject;
var _local5:Boolean;
_local4 = getCookie(_arg1);
_local5 = _local4.data.hasOwnProperty("users");
if (_local5){
_local4.data.users[_arg2] = _arg3;
flushCookie(_local4);
} else {
addCookieUserStore(_arg1);
addCookieUser(_arg1, _arg2, _arg3);
};
}
public static function addCookieUserStore(_arg1:String):void{
var _local2:SharedObject;
_local2 = getCookie(_arg1);
_local2.data.users = new Dictionary();
flushCookie(_local2);
}
public static function getCookieUser(_arg1:String, _arg2:String=""):Object{
var _local3:SharedObject;
var _local4:Boolean;
var _local5:Object;
_local3 = getCookie(_arg1);
_local4 = _local3.data.hasOwnProperty("users");
if (_local4){
_local5 = _local3.data.users[_arg2];
} else {
addCookieUserStore(_arg1);
};
return (_local5);
}
public static function addCookieLastUser(_arg1:String, _arg2:String=""):void{
var _local3:SharedObject;
_local3 = getCookie((_arg1 + "Last"));
_local3.data.LastUser = _arg2;
flushCookie(_local3);
}
private static function flushCookie(_arg1:SharedObject):void{
var soCookie = _arg1;
try {
soCookie.flush();
} catch(e:Error) {
};
}
public static function getCookie(_arg1:String):SharedObject{
var _local2:SharedObject;
_local2 = SharedObject.getLocal(_arg1);
return (_local2);
}
public static function getCookieLastUser(_arg1:String):Object{
var _local2:SharedObject;
var _local3:Boolean;
var _local4:String;
var _local5:Object;
_local2 = getCookie((_arg1 + "Last"));
_local3 = _local2.data.hasOwnProperty("LastUser");
if (_local3){
_local4 = _local2.data.LastUser;
_local5 = getCookieUser(_arg1, _local4);
};
return (_local5);
}
}
}//package com.stampy.cookies
Section 6
//FlashCookie (com.stampy.cookies.FlashCookie)
package com.stampy.cookies {
public class FlashCookie {
private var _strCookieName:String;// = "none"
private var _cookie:Object;
public function FlashCookie(_arg1:String, _arg2:Object, _arg3:String="guestUser"):void{
_strCookieName = "none";
super();
_strCookieName = _arg1;
_cookie = Cookie.getCookieUser(_strCookieName, _arg3);
if (_cookie == null){
Cookie.addCookieUser(_strCookieName, _arg3, _arg2);
};
}
public function getFromCookie(_arg1:String, _arg2:String="guestUser"){
var _local3:String;
_cookie = getCookie(_arg2);
for (_local3 in _cookie) {
if (_local3 == _arg1){
return (_cookie[_local3]);
};
};
return (null);
}
public function updateCookieVar(_arg1:String, _arg2, _arg3:String="guestUser"):void{
var _local4:String;
_cookie = getCookie(_arg3);
for (_local4 in _cookie) {
if (_local4 == _arg1){
_cookie[_local4] = _arg2;
};
};
updateCookie(_cookie, _arg3);
}
public function updateCookie(_arg1:Object, _arg2:String="guestUser"):void{
Cookie.addCookieUser(_strCookieName, _arg2, _arg1);
}
public function get cookieName():String{
return (_strCookieName);
}
public function getCookie(_arg1:String="guestUser"):Object{
_cookie = Cookie.getCookieUser(_strCookieName, _arg1);
return (_cookie);
}
}
}//package com.stampy.cookies
Section 7
//DispatchGlobal (com.stampy.events.DispatchGlobal)
package com.stampy.events {
import flash.events.*;
public class DispatchGlobal {
private static var _debug:Boolean = false;
protected static var _dispatch:EventDispatcher;
public static var EVENT:Object = {};
public static function dispatchEvent(_arg1:String):void{
if (_debug){
};
if (_dispatch == null){
return;
};
_dispatch.dispatchEvent(new Event(EVENT[_arg1]));
}
public static function set debug(_arg1:Boolean):void{
_debug = _arg1;
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatch == null){
return;
};
_dispatch.removeEventListener(_arg1, _arg2, _arg3);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatch == null){
_dispatch = new EventDispatcher();
};
_dispatch.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function get debug():Boolean{
return (_debug);
}
public static function createCustomEvent(_arg1:String, _arg2:String):void{
EVENT[_arg1] = _arg2;
if (_debug){
};
}
}
}//package com.stampy.events
Section 8
//SubmitForm (com.stampy.forms.SubmitForm)
package com.stampy.forms {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import com.stampy.submit.*;
public class SubmitForm extends EventDispatcher {
private var _submitSuccess:Function;
private var _urlScript:String;
private var _submitFail:Function;
private var _urlData:Dictionary;
public static const INVALID:String = "Invalid";
public static const COMPLETE:String = "Complete";
public static const IO_ERROR:String = "IOError";
public function SubmitForm(_arg1:String):void{
_urlData = new Dictionary(true);
super();
_urlScript = _arg1;
}
public function getURLVars():String{
return (Post.getURLVars());
}
private function dispatch(_arg1:String):void{
dispatchEvent(new Event(_arg1));
}
public function submit():void{
var _local1:URLVariables;
var _local2:Object;
var _local3:Post;
_local1 = new URLVariables();
for (_local2 in _urlData) {
_local1[_local2] = _urlData[_local2];
};
_local3 = new Post();
_local3.addEventListener(Post.COMPLETE, submit_complete);
_local3.addEventListener(Post.IO_ERROR, submit_fail);
_local3.post_data(_urlScript, _local1);
}
public function addField(_arg1:String, _arg2):void{
_urlData[_arg1] = _arg2;
}
private function submit_fail(_arg1:Event):void{
_arg1.target.removeEventListener(Post.IO_ERROR, submit_fail);
dispatch(IO_ERROR);
delete ??getglobalscope
[this];
}
private function submit_complete(_arg1:Event):void{
_arg1.target.removeEventListener(Post.COMPLETE, submit_complete);
dispatch(COMPLETE);
delete ??getglobalscope
[this];
}
public function getVar(_arg1:String){
if (Post.getVar(_arg1) != null){
return (Post.getVar(_arg1));
};
return (null);
}
}
}//package com.stampy.forms
Section 9
//FrameUtils (com.stampy.frames.FrameUtils)
package com.stampy.frames {
import flash.display.*;
public class FrameUtils {
public static function removeOnEnterFrame(_arg1, _arg2, _arg3:Function):void{
if ((_arg2 is MovieClip)){
if ((_arg1 is uint)){
_arg2.addFrameScript((_arg1 - 1), _arg3, false, false);
} else {
if ((_arg1 is String)){
_arg2.addFrameScript((frameNumByLabel(_arg1, _arg2) - 1), _arg3, false, false);
};
};
};
}
public static function onEveryFrame(_arg1, _arg2:Function):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
_local3 = _arg1.framesLoaded;
if ((_arg1 is MovieClip)){
_local4 = 1;
while (_local4 <= _local3) {
onEnterFrame(_local4, _arg1, _arg2);
_local4++;
};
} else {
if ((_arg1 is Array)){
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
onEveryFrame(_arg1[_local6], _arg2);
_local6++;
};
};
};
}
public static function onEnterFrame(_arg1, _arg2, _arg3:Function, ... _args):void{
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
if ((_arg2 is MovieClip)){
if ((_arg1 is uint)){
_arg2.addFrameScript((_arg1 - 1), _arg3);
} else {
if ((_arg1 is String)){
_arg2.addFrameScript((frameNumByLabel(_arg1, _arg2) - 1), _arg3);
} else {
if ((_arg1 is Array)){
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
onEnterFrame(_arg1[_local6], _arg2, _arg3);
_local6++;
};
};
};
};
};
if ((_arg2 is Array)){
_local7 = _arg2.length;
_local8 = 0;
while (_local8 < _local7) {
onEnterFrame(_arg1, _arg2[_local8], _arg3);
_local8++;
};
};
}
public static function frameNumByLabel(_arg1:String, _arg2:MovieClip):Number{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.currentLabels.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2.currentLabels[_local4].name == _arg1){
return (_arg2.currentLabels[_local4].frame);
};
_local4++;
};
return (1);
}
}
}//package com.stampy.frames
Section 10
//PowerLoader (com.stampy.preloader.PowerLoader)
package com.stampy.preloader {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.stampy.random.*;
import flash.media.*;
public class PowerLoader extends EventDispatcher {
private var _streamOpen:Boolean;// = false
private var _sound:Sound;
private var _urlLoader:URLLoader;
private var _method:String;
private var _loader:Loader;
private var _id;
public function PowerLoader(){
_streamOpen = false;
super();
}
private function loadError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
}
public function get id(){
return (_id);
}
public function cancel():void{
if (_streamOpen){
switch (_method){
case "_urlLoader":
_urlLoader.close();
break;
case "_loader":
_loader.close();
break;
case "_sound":
_sound.close();
break;
};
};
}
public function getLoader(){
switch (_method){
case "_urlLoader":
return (this[_method]);
case "_loader":
return (this[_method]);
};
return (null);
}
public function load(_arg1:String, _arg2:Boolean=false){
var _local3:String;
_local3 = (_arg2) ? ("?" + Random.range(1, 999).toString()) : "";
switch (getFileExtension(_arg1)){
case "xml":
default:
_method = "_urlLoader";
_urlLoader = new URLLoader();
_urlLoader.addEventListener(Event.COMPLETE, loadComplete);
_urlLoader.addEventListener(ProgressEvent.PROGRESS, loadProgress);
_urlLoader.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_urlLoader.load(new URLRequest((_arg1 + _local3)));
_streamOpen = true;
break;
case "jpg":
case "bmp":
case "gif":
case "png":
case "swf":
_method = "_loader";
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_loader.load(new URLRequest((_arg1 + _local3)));
_streamOpen = true;
break;
case "mp3":
_method = "_sound";
_sound = new Sound();
_sound.addEventListener(Event.COMPLETE, loadComplete);
_sound.addEventListener(ProgressEvent.PROGRESS, loadProgress);
_sound.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_sound.load(new URLRequest((_arg1 + _local3)));
_streamOpen = true;
break;
};
}
private function loadProgress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
public function set id(_arg1):void{
_id = _arg1;
}
public function get content(){
switch (_method){
case "_urlLoader":
return (this[_method].data);
case "_loader":
return (this[_method].content);
case "_sound":
return (_sound);
};
return (null);
}
private function getFileExtension(_arg1:String):String{
var _local2:String;
var _local3:int;
_local2 = ".";
if (_arg1 == null){
return ("");
};
_local3 = _arg1.lastIndexOf(_local2);
if (_local3 == -1){
return ("");
};
_local3 = (_local3 + _local2.length);
return (_arg1.substr(_local3));
}
private function loadComplete(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package com.stampy.preloader
Section 11
//Random (com.stampy.random.Random)
package com.stampy.random {
import com.stampy.arrays.*;
public class Random {
public static function boolean():Boolean{
return (((range(1, 2))==1) ? true : false);
}
public static function range(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
public static function rangeWithExceptions(_arg1:Number, _arg2, _arg3:Array):Number{
var _local4:Number;
_local4 = 0;
do {
_local4 = range(_arg1, _arg2);
} while (ArrayUtils.arrayContains(_arg3, _local4));
return (_local4);
}
}
}//package com.stampy.random
Section 12
//Post (com.stampy.submit.Post)
package com.stampy.submit {
import flash.events.*;
import flash.net.*;
public class Post extends EventDispatcher {
private var urlLoad:URLLoader;
public static const COMPLETE:String = "compelte";
public static const IO_ERROR:String = "io_error";
private static var _loadedVars:URLVariables;
public function post_data(_arg1:String, _arg2:URLVariables):void{
var _local3:URLRequest;
var _local4:URLLoader;
_local3 = new URLRequest(_arg1);
_local3.data = _arg2;
_local3.method = URLRequestMethod.POST;
_local4 = new URLLoader();
_local4.addEventListener(Event.COMPLETE, post_complete);
_local4.addEventListener(IOErrorEvent.IO_ERROR, post_fail);
_local4.load(_local3);
}
private function post_fail(_arg1:IOErrorEvent):void{
_arg1.target.removeEventListener(IOErrorEvent.IO_ERROR, post_fail);
dispatchEvent(new Event(Post.IO_ERROR));
}
private function post_complete(_arg1:Event):void{
_arg1.target.removeEventListener(Event.COMPLETE, post_complete);
_loadedVars = new URLVariables(_arg1.target.data);
dispatchEvent(new Event(Post.COMPLETE));
}
public static function getURLVars():String{
return (_loadedVars.toString());
}
public static function getVar(_arg1:String){
if (_loadedVars[_arg1]){
return (_loadedVars[_arg1]);
};
return (null);
}
}
}//package com.stampy.submit
Section 13
//BitmapSequence (console.bitmapAnimation.BitmapSequence)
package console.bitmapAnimation {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class BitmapSequence extends Bitmap {
private var _frameWidth:Number;
private var _isFramerateUpdated;// = false
private var _bitmapData:BitmapData;
private var _interval:uint;
private var _isPlaying;// = false
private var _frameHeight:Number;
private var _finalFrame:uint;
private var _bitmapSequence:Array;
private var _currentFrame:int;// = 0
private var _frameRate:uint;
private var _looping:Boolean;// = true
private var _lastFrameInLoop:uint;
private var _frameStop:Dictionary;
private var _cropArea:Rectangle;
private var _lastFrame:uint;
public function BitmapSequence(_arg1:Array, _arg2, _arg3:Rectangle=null){
_currentFrame = 0;
_looping = true;
_isPlaying = false;
_isFramerateUpdated = false;
_bitmapSequence = new Array();
_frameStop = new Dictionary();
super();
_cropArea = _arg3;
_frameRate = _arg2;
_bitmapSequence = _arg1;
_finalFrame = _bitmapSequence.length;
_lastFrameInLoop = (_finalFrame - 1);
}
public function stop():void{
_isPlaying = false;
clearInterval(_interval);
}
public function play():void{
_isPlaying = true;
_interval = setInterval(update, Math.round((1000 / _frameRate)));
}
public function nextFrame():void{
update();
}
public function set loop(_arg1:Boolean):void{
_looping = _arg1;
}
override public function getRect(_arg1:DisplayObject):Rectangle{
return (new Rectangle(this.x, this.y, _frameWidth, _frameHeight));
}
public function gotoAndPlayBetween(_arg1:uint, _arg2:uint):void{
stopOnFrame(_arg2);
gotoAndPlay(_arg1);
}
public function get frame():uint{
return ((_currentFrame + 1));
}
override public function get bitmapData():BitmapData{
var _local1:BitmapData;
var _local2:BitmapData;
if (_cropArea == null){
return (_bitmapSequence[_currentFrame]);
};
_local1 = new BitmapData(_cropArea.width, _cropArea.height);
_local2 = _bitmapSequence[_currentFrame];
_local1.copyPixels(_local2, _cropArea, new Point());
return (_local1);
}
public function get currentFrame():int{
return ((_currentFrame + 1));
}
public function stopOnFrame(_arg1:uint):void{
_frameStop[(_arg1 - 1)] = true;
}
public function gotoAndStop(_arg1:uint):void{
stop();
this.frame = _arg1;
}
public function get loop():Boolean{
return (_looping);
}
public function get isPlaying():Boolean{
return (_isPlaying);
}
public function gotoAndPlay(_arg1:uint):void{
this.frame = _arg1;
play();
}
private function update():void{
if (_frameStop[_currentFrame] == null){
if (_currentFrame < _lastFrameInLoop){
_currentFrame++;
} else {
if (_looping){
_currentFrame = 0;
} else {
stop();
};
};
if (_isFramerateUpdated){
_isFramerateUpdated = false;
stop();
play();
};
} else {
stop();
delete _frameStop[_currentFrame];
};
}
public function playOnce():void{
gotoAndPlayBetween(1, _finalFrame);
}
public function set frameRate(_arg1:uint):void{
_frameRate = _arg1;
_isFramerateUpdated = true;
}
public function set frame(_arg1:uint):void{
if ((((_arg1 >= 0)) && ((_arg1 <= _finalFrame)))){
_currentFrame = _arg1;
update();
};
}
public function get frameRate():uint{
return (_frameRate);
}
public function prevFrame():void{
_currentFrame = (((_currentFrame - 2))>=0) ? (_currentFrame - 2) : (_finalFrame - _currentFrame);
update();
}
}
}//package console.bitmapAnimation
Section 14
//BitmapSequenceBuilder (console.bitmapAnimation.BitmapSequenceBuilder)
package console.bitmapAnimation {
import flash.display.*;
import flash.geom.*;
public class BitmapSequenceBuilder {
public static function sequence(_arg1:BitmapData, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:Boolean=true):Array{
var _local6:Array;
var _local7:*;
var _local8:BitmapData;
var _local9:uint;
var _local10:int;
_local6 = [];
_local7 = new Rectangle(0, 0, _arg2, _arg3);
_local9 = Math.floor((_arg1.width / _arg2));
_local10 = 0;
while (_local10 < _arg4) {
_local7.x = ((_local10 % _local9) * _arg2);
_local7.y = (Math.floor((_local10 / _local9)) * _arg3);
_local8 = new BitmapData(_arg2, _arg3, _arg5, 0);
_local8.copyPixels(_arg1, _local7, new Point(), null, null, _arg5);
_local6[_local6.length] = _local8;
_local10++;
};
return (_local6);
}
public static function resequenceScale(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Boolean=true):Array{
var _local5:Array;
var _local6:int;
_local5 = _arg1.concat();
_local6 = 0;
while (_local6 < _arg1.length) {
_local5[_local6] = BitmapUtils.scale(_local5[_local6].clone(), _arg2, _arg3, _arg4);
_local6++;
};
return (_local5);
}
public static function resequenceRotation(_arg1:Array, _arg2:Number, _arg3:Boolean=true):Array{
var _local4:Array;
var _local5:int;
_local4 = _arg1.concat();
_local5 = 0;
while (_local5 < _arg1.length) {
_local4[_local5] = BitmapUtils.rotation(_local4[_local5].clone(), _arg2, _arg3);
_local5++;
};
return (_local4);
}
public static function resequenceAlpha(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
var _local4:int;
_local3 = _arg1.concat();
_local4 = 0;
while (_local4 < _arg1.length) {
_local3[_local4] = BitmapUtils.alpha(_local3[_local4].clone(), _arg2);
_local4++;
};
return (_local3);
}
public static function resequenceTint(_arg1:Array, _arg2:uint, _arg3:Number):Array{
var _local4:Array;
var _local5:int;
_local4 = _arg1.concat();
_local5 = 0;
while (_local5 < _arg1.length) {
_local4[_local5] = BitmapUtils.tint(_local4[_local5].clone(), _arg2, _arg3);
_local5++;
};
return (_local4);
}
public static function resequenceColor(_arg1:Array, _arg2:uint):Array{
var _local3:Array;
var _local4:int;
_local3 = _arg1.concat();
_local4 = 0;
while (_local4 < _arg1.length) {
_local3[_local4] = BitmapUtils.color(_local3[_local4].clone(), _arg2);
_local4++;
};
return (_local3);
}
}
}//package console.bitmapAnimation
Section 15
//BitmapUtils (console.bitmapAnimation.BitmapUtils)
package console.bitmapAnimation {
import flash.display.*;
import flash.geom.*;
import fl.motion.*;
public class BitmapUtils {
public static function tint(_arg1:BitmapData, _arg2:uint, _arg3:Number):BitmapData{
var _local4:Color;
_local4 = new Color();
_local4.setTint(_arg2, _arg3);
_arg1.colorTransform(_arg1.rect, _local4);
return (_arg1);
}
public static function scale(_arg1:BitmapData, _arg2:Number, _arg3:Number, _arg4:Boolean=true):BitmapData{
var _local5:BitmapData;
var _local6:*;
var _local7:*;
_local5 = new BitmapData((_arg1.width * Math.abs(_arg2)), (_arg1.height * Math.abs(_arg3)), true, 0);
_local6 = 0;
_local7 = 0;
if (_arg2 < 0){
_local6 = _arg1.width;
};
if (_arg3 < 0){
_local7 = _arg1.height;
};
_local5.draw(_arg1, new Matrix(_arg2, 0, 0, _arg3, _local6, _local7), null, null, null, _arg4);
return (_local5);
}
public static function color(_arg1:BitmapData, _arg2:uint):BitmapData{
var _local3:ColorTransform;
_local3 = new ColorTransform();
_local3.color = _arg2;
_arg1.colorTransform(_arg1.rect, _local3);
return (_arg1);
}
public static function alpha(_arg1:BitmapData, _arg2:Number):BitmapData{
_arg1.colorTransform(_arg1.rect, new Color(1, 1, 1, _arg2, 0, 0, 0, 0));
return (_arg1);
}
public static function rotation(_arg1:BitmapData, _arg2:Number, _arg3:Boolean=true):BitmapData{
var _local4:*;
var _local5:*;
var _local6:Matrix;
var _local7:BitmapData;
_local4 = (_arg1.width / 2);
_local5 = (_arg1.height / 2);
_local6 = new Matrix();
_local6.translate(-(_local4), -(_local5));
_local6.rotate(((Math.PI * 2) * (_arg2 / 360)));
_local6.translate(_local4, _local5);
_local7 = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local7.draw(_arg1, _local6, null, null, null, _arg3);
return (_local7);
}
}
}//package console.bitmapAnimation
Section 16
//Countdown (console.clock.Countdown)
package console.clock {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Countdown {
private var _intTimeLeft:int;
private var _intTimeStart:int;
private var _intTimeAllowed:int;
private var _intPauseTimeAllowed:int;
private var _isPaused:Boolean;
private var _intPauseTimeStart:int;
private var _countDownMC:MovieClip;
private var _intTimePaused:int;
private var _intPauseTimeCount:int;
public function Countdown(_arg1:int, _arg2:Boolean=false){
_countDownMC = new MovieClip();
_intTimeAllowed = (_arg1 * 1000);
if (_arg2){
startCountdown();
};
}
public function stop():void{
stopCountdown();
}
public function delay(_arg1:int){
pauseTimer(_arg1);
}
public function getTimeAsString(_arg1:String="FULL"):String{
return (Time.returnPreFormattedTimeFromNumber(_intTimeLeft, _arg1));
}
public function addTime(_arg1:int){
_intTimeAllowed = (_intTimeAllowed + (_arg1 * 1000));
}
private function stopCountdown(){
if (_isPaused){
_countDownMC.removeEventListener(Event.ENTER_FRAME, countPauseTime);
} else {
_countDownMC.removeEventListener(Event.ENTER_FRAME, countDownTimer);
};
}
private function countPauseTime(_arg1:Event){
_intPauseTimeCount = (getTimer() - _intPauseTimeStart);
if (((!((_intPauseTimeAllowed == 0))) && ((_intPauseTimeCount >= _intPauseTimeAllowed)))){
pauseTimer();
};
}
public function start(){
startCountdown();
}
private function startCountdown(){
_intTimeStart = getTimer();
_intTimePaused = 0;
_countDownMC.addEventListener(Event.ENTER_FRAME, countDownTimer);
}
public function removeTime(_arg1:int){
_intTimeAllowed = (_intTimeAllowed - (_arg1 * 1000));
}
private function countDownTimer(_arg1:Event){
_intTimeLeft = (_intTimeAllowed - (getTimer() - (_intTimeStart + _intTimePaused)));
if (_intTimeLeft <= 0){
_intTimeLeft = 0;
stopCountdown();
};
}
private function pauseTimer(_arg1:int=0){
if (_isPaused){
_intTimePaused = (_intTimePaused + (getTimer() - _intPauseTimeStart));
_isPaused = false;
_countDownMC.removeEventListener(Event.ENTER_FRAME, countPauseTime);
_countDownMC.addEventListener(Event.ENTER_FRAME, countDownTimer);
} else {
_isPaused = true;
_intPauseTimeAllowed = (_arg1 * 1000);
_intPauseTimeCount = 0;
_intPauseTimeStart = getTimer();
_countDownMC.removeEventListener(Event.ENTER_FRAME, countDownTimer);
_countDownMC.addEventListener(Event.ENTER_FRAME, countPauseTime);
};
}
public function get timeLeft():int{
return (_intTimeLeft);
}
public function pause(){
pauseTimer();
}
}
}//package console.clock
Section 17
//Time (console.clock.Time)
package console.clock {
import flash.utils.*;
public class Time {
private static var _intMilliSeconds:int = 0;
private static var _intHundSeconds:int = 0;
private static var _intSeconds:int = 0;
private static var _intMinutes:int = 0;
private static var _intHours:int = 0;
public static function get intHours():int{
return (_intHours);
}
public static function get intMilliSeconds():int{
return (_intMilliSeconds);
}
public static function formatTimeHMSM(_arg1:int=0):String{
return (calcualteTimeStr(_arg1, "FULL MILLISECONDS"));
}
public static function formatTimeS(_arg1:int=0):String{
return (calcualteTimeStr(_arg1, "SECONDS"));
}
public static function calcualteTimeStr(_arg1, _arg2):String{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:String;
time = _arg1;
_local3 = intHours.toString();
_local4 = intMinutes.toString();
_local5 = intSeconds.toString();
_local6 = intMilliSeconds.toString();
_local7 = intHundSeconds.toString();
if ((intHours < 10)){
_local3 = ("0" + intHours.toString());
//unresolved jump
};
if ((intMinutes < 10)){
_local4 = ("0" + intMinutes.toString());
//unresolved jump
};
if ((intSeconds < 10)){
_local5 = ("0" + intSeconds.toString());
//unresolved jump
};
if ((intMilliSeconds < 100)){
_local6 = ("0" + intMilliSeconds.toString());
//unresolved jump
};
if ((intMilliSeconds < 10)){
_local6 = ("00" + intMilliSeconds.toString());
//unresolved jump
};
if ((intHundSeconds < 10)){
_local7 = ("0" + intHundSeconds.toString());
//unresolved jump
};
if ((intHundSeconds > 99)){
_local7 = "99";
//unresolved jump
};
_local8 = "";
switch (_arg2){
case "FULL":
_local8 = ((((_local3 + ":") + _local4) + ":") + _local5);
break;
case "MINUTES":
_local8 = ((_local4 + ":") + _local5);
break;
case "SECONDS":
_local8 = _local5;
break;
case "FULL MILLISECONDS":
_local8 = ((((_local4 + ":") + _local5) + ":") + _local6);
break;
case "FULL HUNDRETHS":
_local8 = ((((_local4 + ":") + _local5) + ":") + _local7);
break;
};
return (_local8);
}
public static function formatTimeMS(_arg1:int=0):String{
return (calcualteTimeStr(_arg1, "MINUTES"));
}
public static function formatTimeHMSH(_arg1:int=0):String{
return (calcualteTimeStr(_arg1, "FULL HUNDRETHS"));
}
public static function get intMinutes():int{
return (_intMinutes);
}
public static function formatTimeHMS(_arg1:int=0):String{
return (calcualteTimeStr(_arg1, "FULL"));
}
public static function get intHundSeconds():int{
return (_intHundSeconds);
}
public static function get intSeconds():int{
return (_intSeconds);
}
public static function set time(_arg1):void{
_intHours = Math.floor((((_arg1 / 1000) / 60) / 60));
_intMinutes = (Math.floor(((_arg1 / 1000) / 60)) - (intHours * 60));
_intSeconds = ((Math.floor((_arg1 / 1000)) - (intMinutes * 60)) - (intHours * 3600));
_intMilliSeconds = Math.ceil((((_arg1 / 1000) - Math.floor((_arg1 / 1000))) * 1000));
_intHundSeconds = Math.ceil((intMilliSeconds / 10));
}
public static function returnPreFormattedTimeFromNumber(_arg1:int=0, _arg2:String="FULL"):String{
var _local3:*;
_local3 = calcualteTimeStr(_arg1, _arg2);
return (_local3);
}
public static function returnPreFormattedTime(_arg1:int=0, _arg2:String="FULL"):String{
var _local3:*;
var _local4:*;
_local3 = (getTimer() - _arg1);
_local4 = calcualteTimeStr(_local3, _arg2);
return (_local4);
}
}
}//package console.clock
Section 18
//URLEvent (console.events.URLEvent)
package console.events {
import flash.events.*;
public class URLEvent extends Event {
public static const OPEN_URL:String = "open_url";
private static var _strURL = "";
public function URLEvent(_arg1:String, _arg2:String){
_strURL = _arg2;
super(_arg1, true, false);
}
public function get url():String{
return (_strURL);
}
}
}//package console.events
Section 19
//Delegate (console.functions.Delegate)
package console.functions {
public class Delegate {
public static function create(_arg1:Function, ... _args):Function{
var handler = _arg1;
var args = _args;
return (function (... _args):void{
handler.apply(this, _args.concat(args));
});
}
}
}//package console.functions
Section 20
//SendReceiveData (console.loaders.SendReceiveData)
package console.loaders {
import flash.events.*;
import flash.net.*;
public class SendReceiveData extends EventDispatcher {
public var _loader:URLLoader;
public var _errorMessage:String;
public static const DATA_LOADED:String = "Data Loaded";
public static const DATA_ERROR:String = "Data Error";
public function onError(_arg1:IOErrorEvent){
_errorMessage = _arg1.text;
dispatchEvent(new Event(SendReceiveData.DATA_ERROR));
}
public function sendData(_arg1:String, _arg2:URLVariables):void{
var _local3:URLRequest;
_local3 = new URLRequest(_arg1);
_local3.data = _arg2;
_local3.method = URLRequestMethod.POST;
_loader = new URLLoader();
_loader.addEventListener(Event.COMPLETE, onComplete);
_loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
_loader.load(_local3);
}
public function onComplete(_arg1:Event){
dispatchEvent(new Event(SendReceiveData.DATA_LOADED));
}
}
}//package console.loaders
Section 21
//OpenURL (console.loadurl.OpenURL)
package console.loadurl {
import flash.net.*;
import flash.external.*;
public class OpenURL {
public static function loadURL(_arg1:String, _arg2:String="_blank"):void{
var WINDOW_OPEN_FUNCTION:String;
var url = _arg1;
var window = _arg2;
WINDOW_OPEN_FUNCTION = "window.open";
if (ExternalInterface.available){
try {
ExternalInterface.call(WINDOW_OPEN_FUNCTION, url, window);
} catch(e:Error) {
navigateToURL(new URLRequest(url), window);
};
//unresolved jump
};
}
public static function navigateURL_JS(_arg1:String):void{
var _local2:*;
var _local3:*;
_local2 = (("window.open('" + _arg1) + "', 'PopUpWindow');");
_local3 = new URLRequest((("javascript:" + _local2) + "void(0);"));
navigateToURL(_local3);
}
public static function navigateURL(_arg1:String, _arg2:String="_blank"):void{
navigateToURL(new URLRequest(_arg1), _arg2);
}
}
}//package console.loadurl
Section 22
//Trig (console.math.Trig)
package console.math {
import flash.geom.*;
public class Trig {
public static function findAngle(_arg1, _arg2, _arg3, _arg4):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
_local7 = Math.atan2(_local6, _local5);
return (_local7);
}
public static function escapeVectorX(_arg1:Number):Number{
return (((180 - _arg1) + 180));
}
public static function escapeVectorY(_arg1:Number):Number{
return (((180 - (_arg1 * 2)) + _arg1));
}
public static function findOppositeLength(_arg1, _arg2):Number{
var _local3:*;
_local3 = (Math.sin(_arg1) * _arg2);
return (_local3);
}
public static function findNewXY(_arg1, _arg2, _arg3, _arg4):Point{
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
_local5 = findAdjascentLength(_arg3, _arg4);
_local6 = findOppositeLength(_arg3, _arg4);
_local7 = (_arg1 + _local5);
_local8 = (_arg2 + _local6);
_local9 = new Point(_local7, _local8);
return (_local9);
}
public static function findHypotenuseLength(_arg1:Number, _arg2:Number):Number{
var _local3:*;
_local3 = Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2)));
return (_local3);
}
public static function convertToDegree(_arg1:Number){
var _local2:*;
_local2 = ((_arg1 * 180) / Math.PI);
return (_local2);
}
public static function findAdjascentLength(_arg1, _arg2):Number{
var _local3:*;
_local3 = (Math.cos(_arg1) * _arg2);
return (_local3);
}
public static function convertToRadian(_arg1:Number){
var _local2:*;
_local2 = ((_arg1 * Math.PI) / 180);
return (_local2);
}
}
}//package console.math
Section 23
//Ranking (console.scores.Ranking)
package console.scores {
import flash.events.*;
public class Ranking {
protected static var _disp:EventDispatcher;
private static var _rankList:XMLList;
private static var _rank:uint = 0;
private static var _rankXML:Scores;
private static var _score:Number;
private static var _debug:Boolean;
public static function dispatchEvent(_arg1:Event):void{
if (_disp == null){
return;
};
_disp.dispatchEvent(_arg1);
}
public static function findRank(_arg1:Number, _arg2:String, _arg3:Boolean=false):void{
_debug = _arg3;
message("---------------- FIND RANK -----------------");
message(("Score:" + _arg1));
message(("URL:" + _arg2));
_score = _arg1;
_rankXML = new Scores();
_rankXML.addEventListener(Event.COMPLETE, gotRankXML);
_rankXML.load(_arg2);
}
private static function message(_arg1):void{
if (_debug){
};
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_disp == null){
return;
};
_disp.removeEventListener(_arg1, _arg2, _arg3);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_disp == null){
_disp = new EventDispatcher();
};
_disp.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
private static function setRank(_arg1:uint):void{
message(("set rank:" + _arg1));
if (_rank == 0){
_rank = _arg1;
dispatchEvent(new Event(Event.COMPLETE));
};
}
private static function detectRank():void{
var _local1:uint;
var _local2:*;
var _local3:*;
var _local4:int;
message("detecting rank");
_rank = 0;
_local1 = _rankList.length();
if (_score < int(_rankList[(_local1 - 1)].@player_score)){
setRank((int(_rankList[(_local1 - 1)].@player_rank) + 1));
} else {
if (_score > int(_rankList[0].@player_score)){
if (int(_rankList[0].@player_rank) > 1){
setRank((int(_rankList[0].@player_rank) - 1));
} else {
setRank(int(_rankList[0].@player_rank));
};
} else {
_local4 = (_local1 - 1);
while (_local4 > 0) {
_local2 = _rankList[_local4];
_local3 = _rankList[(_local4 - 1)];
if (_score == int(_local2.@player_score)){
setRank(int(_local2.@player_rank));
} else {
if (_score == int(_local3.@player_score)){
setRank(int(_local3.@player_rank));
} else {
if ((((_score > int(_local2.@player_score))) && ((_score < int(_local3.@player_score))))){
calculateBetweenRank(_score, _local2, _local3);
};
};
};
_local4--;
};
};
};
}
private static function calculateBetweenRank(_arg1:Number, _arg2, _arg3):void{
var _local4:*;
var _local5:*;
var _local6:uint;
var _local7:int;
var _local8:Number;
var _local9:Number;
_local4 = (int(_arg3.@player_score) - int(_arg2.@player_score));
_local5 = (int(_arg2.@player_rank) - int(_arg3.@player_rank));
_local6 = Math.round((_local4 / _local5));
message(((((("calculate between rank:" + _arg2.@player_rank) + ":") + _arg3.@player_rank) + " rank score segment value:") + _local6));
if (_local5 == 1){
message("no difference in rank");
setRank(int(_arg2.@player_rank));
} else {
if (_local5 == 2){
setRank((int(_arg3.@player_rank) + 1));
} else {
message("checking each segment for a match");
_local7 = 1;
while (_local7 < (_local5 + 1)) {
_local8 = (int(_arg3.@player_score) - (_local6 * (_local7 - 1)));
_local9 = (int(_arg3.@player_score) - (_local6 * _local7));
message(("is score less than or equal to " + _local8.toString()));
message(("and is score greater than or equal to " + _local9.toString()));
if ((((_arg1 <= _local8)) && ((_arg1 >= _local9)))){
setRank((int(_arg3.@player_rank) + _local7));
};
_local7++;
};
};
};
}
public static function get rank():uint{
return (_rank);
}
private static function gotRankXML(_arg1:Event):void{
message("XML Recieved");
message("------- XML ------");
message(_rankXML.data);
_rankXML.removeEventListener(Event.COMPLETE, gotRankXML);
_rankList = new XMLList(_rankXML.data);
detectRank();
}
}
}//package console.scores
Section 24
//Scores (console.scores.Scores)
package console.scores {
import flash.events.*;
import com.stampy.preloader.*;
public class Scores extends EventDispatcher {
private var _scoresXML_loader:PowerLoader;
private var _xmlFile:XMLList;
public function load(_arg1:String){
_scoresXML_loader = new PowerLoader();
_scoresXML_loader.addEventListener(Event.COMPLETE, load_complete);
_scoresXML_loader.addEventListener(ProgressEvent.PROGRESS, load_progress);
_scoresXML_loader.addEventListener(IOErrorEvent.IO_ERROR, load_error);
_scoresXML_loader.load(_arg1);
}
public function get data():XMLList{
return (new XMLList(_xmlFile[0].scores.entry));
}
private function load_progress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
public function set xml(_arg1:XMLList):void{
_xmlFile = _arg1;
}
private function load_error(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
}
private function load_complete(_arg1:Event):void{
_xmlFile = XMLList(_arg1.target.content);
dispatchEvent(_arg1);
}
}
}//package console.scores
Section 25
//Token (console.security.Token)
package console.security {
import flash.events.*;
import flash.net.*;
import com.adobe.crypto.*;
import console.loaders.*;
public class Token {
public static const TOKEN_GENERATED:String = "Token Generated";
private static var _success:Function;
private static var _strAction:String = "request_token";
private static var _strOriginalToken:String;
private static var _requestToken:SendReceiveData;
private static var _strUrl:String;
private static var _isDebugging:Boolean = true;
private static var _retry:uint = 0;
private static var _loadedVars:URLVariables;
private static var _loadToken:URLLoader;
private static var _strFinalToken:String;
private static function loadError(_arg1:Error):void{
if (_retry == 0){
_retry++;
request(_strUrl, _success, _isDebugging);
//unresolved jump
};
}
public static function get encypted():String{
return (_strFinalToken);
}
private static function debug(_arg1):void{
if (_isDebugging){
};
}
public static function md5Token(_arg1:String):String{
var _local2:String;
_local2 = MD5.hash(_arg1);
return (_local2);
}
public static function request(_arg1:String, _arg2:Function, _arg3:Boolean=true){
var _local4:URLVariables;
_strUrl = _arg1;
_isDebugging = _arg3;
debug(("DEBUG: Token.request | strURL = " + _arg1));
_success = _arg2;
_local4 = new URLVariables();
_local4.action = _strAction;
_requestToken = new SendReceiveData();
_requestToken.sendData(_arg1, _local4);
_requestToken.addEventListener(SendReceiveData.DATA_LOADED, load);
_requestToken.addEventListener(SendReceiveData.DATA_ERROR, loadError);
}
private static function load(_arg1:Event):void{
_loadToken = URLLoader(_arg1.target._loader);
_loadedVars = new URLVariables(_loadToken.data);
_strOriginalToken = _loadedVars.token;
debug(("DEBUG: Token.load | original token = " + _strOriginalToken));
_strFinalToken = encrypt(_strOriginalToken);
_success();
}
public static function getVar(_arg1:String){
if (_loadedVars[_arg1]){
return (_loadedVars[_arg1]);
};
return (null);
}
public static function get original():String{
return (_strOriginalToken);
}
public static function secret(_arg1, _arg2:Boolean=true):String{
var _local3:String;
var _local4:String;
var _local5:String;
_isDebugging = _arg2;
if (((!((_arg1 == null))) && (!((_strOriginalToken == null))))){
_local3 = _arg1.toString();
_local4 = (_strOriginalToken + _local3);
_local5 = MD5.hash(_local4);
debug(("DEBUG: Token.secret | encrypted secret = " + _local5));
return (_local5);
};
return ("");
}
public static function encrypt(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:String;
_local2 = _arg1.substr(28, 8);
_local3 = MD5.hash(_local2);
_local4 = Math.ceil((Math.random() * 1000000));
_local5 = Math.ceil((Math.random() * 1000000));
_local6 = Math.ceil((Math.random() * 1000000));
_local7 = (((MD5.hash(_local4) + MD5.hash(_local5)) + _local3) + MD5.hash(_local6));
debug(("DEBUG: Token.encrypt | encrypted token = " + _local7));
return (_local7);
}
}
}//package console.security
Section 26
//SoundObject (console.sounds.SoundObject)
package console.sounds {
import flash.events.*;
import gs.*;
import flash.utils.*;
import flash.media.*;
public class SoundObject extends EventDispatcher {
private var _isMute:Boolean;// = false
private var _sndSound;
private var _linkage:String;
private var _isPlaying:Boolean;// = false
private var _intLastPosition:Number;// = 0
private var _isLooping:Boolean;// = false
private var _onCompleteParams;
private var _channel:SoundChannel;
private var _intMaxVolume:Number;// = 1
private var _onCompleteFunction:Function;
private var _intVolume:Number;// = 1
private var _intLoopCount:uint;// = 0
private var _intPrevVolume:Number;// = 1
public function SoundObject(_arg1:String):void{
var _local2:Class;
_intVolume = 1;
_isMute = false;
_intPrevVolume = 1;
_intLastPosition = 0;
_isLooping = false;
_intLoopCount = 0;
_isPlaying = false;
_intMaxVolume = 1;
super();
_linkage = _arg1;
_local2 = (getDefinitionByName(_arg1) as Class);
_sndSound = new (_local2);
_channel = new SoundChannel();
}
public function addComplete(_arg1:Function, ... _args):void{
_onCompleteFunction = _arg1;
_onCompleteParams = _args;
_channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
}
public function stop(_arg1:Event=null):void{
var evt = _arg1;
try {
_channel.removeEventListener(Event.SOUND_COMPLETE, stop);
_isPlaying = false;
_intLastPosition = _channel.position;
_channel.stop();
} catch(evt:Error) {
};
}
public function muteOff(_arg1:Number):void{
if (_isMute){
volume = _intPrevVolume;
_isMute = false;
};
}
public function get mute():Boolean{
return (_isMute);
}
public function get volume():Number{
return (_intVolume);
}
private function modifyVolume(_arg1:Number):void{
var intValue:Number;
var mod1:SoundTransform;
var value = _arg1;
intValue = (value * _intMaxVolume);
try {
mod1 = new SoundTransform();
mod1.volume = intValue;
_channel.soundTransform = mod1;
} catch(evt:Error) {
};
}
public function get isPlaying():Boolean{
return (_isPlaying);
}
public function resume():void{
if (!_isPlaying){
play(_isLooping, _intLoopCount, _intLastPosition, false);
};
}
public function play(_arg1:Boolean, _arg2:uint, _arg3:uint, _arg4:Boolean=false):void{
var intRepeatCount:*;
var newChannel:*;
var isLooping = _arg1;
var intLoopCount = _arg2;
var intStartTime = _arg3;
var isTempChannel = _arg4;
_isLooping = isLooping;
_intLoopCount = intLoopCount;
_isPlaying = true;
intRepeatCount = (isLooping) ? intLoopCount : 0;
try {
if (isTempChannel){
newChannel = new SoundChannel();
newChannel = _sndSound.play(intStartTime, intRepeatCount);
} else {
_channel = _sndSound.play(intStartTime, intRepeatCount);
};
modifyVolume(volume);
_channel.addEventListener(Event.SOUND_COMPLETE, stop);
} catch(evt:Error) {
};
}
public function set volume(_arg1:Number):void{
if (!_isMute){
_intVolume = _arg1;
modifyVolume(_intVolume);
};
}
public function set maxVolume(_arg1:Number):void{
if ((((_arg1 >= 0)) && ((_arg1 <= 1)))){
_intMaxVolume = _arg1;
volume = _intVolume;
};
}
public function get currentPosition():Number{
return (_channel.position);
}
public function get linkage():String{
return (_linkage);
}
public function muteOn(_arg1:Number=0):void{
if (!_isMute){
_intPrevVolume = volume;
volume = 0;
_isMute = true;
};
}
public function removeComplete():void{
_onCompleteFunction = null;
_onCompleteParams = null;
if (_channel.hasEventListener(Event.SOUND_COMPLETE)){
_channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
};
}
public function get length():Number{
return (_sndSound.length);
}
private function soundComplete(_arg1:Event):void{
_arg1.target.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
_onCompleteFunction.apply(null, _onCompleteParams);
}
public function fade(_arg1:Number, _arg2:Number):void{
if (!_isMute){
TweenLite.to(_channel, _arg2, {volume:_arg1});
};
}
}
}//package console.sounds
Section 27
//SoundUtils (console.sounds.SoundUtils)
package console.sounds {
import gs.*;
import flash.utils.*;
import flash.media.*;
public class SoundUtils {
private static var _dictMusic:Dictionary = new Dictionary();
private static var _dictSFX:Dictionary = new Dictionary();
private static var _maxMusicVolume = 1;
private static var _sfxChannelVolume:Number = 1;
private static var _maxSFXVolume = 1;
private static var _musicMute:Boolean = false;
private static var _rememberValue:Boolean = true;
private static var _musicChannelVolume:Number = 1;
private static var _globalMute:Boolean = false;
private static var _sfxMute:Boolean = false;
public static function addMusic(_arg1:String, _arg2:Number=1):void{
var _local3:SoundObject;
_local3 = new SoundObject(_arg1);
_local3.volume = _arg2;
_dictMusic[_arg1] = _local3;
}
public static function fadeAll(_arg1:Number, _arg2:Number):void{
fadeSFXChannel(_arg1, _arg2);
fadeMusicChannel(_arg1, _arg2);
}
public static function getVolumeSFXChannel():Number{
return (_sfxChannelVolume);
}
public static function setVolumeMusicChannel(_arg1:Number):void{
var _local2:SoundObject;
for each (_local2 in _dictMusic) {
_local2.volume = _arg1;
};
}
public static function fadeMusic(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].fade(_arg2, _arg3);
};
}
public static function fadeSFXStop(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].fade(_arg2, _arg3);
TweenLite.to(_arg1, _arg3, {onComplete:stopSFX, onCompleteParams:[_arg1]});
};
}
public static function muteMusic(_arg1:String, _arg2:Number=0):void{
var _local3:*;
if ((_dictMusic[_arg1] is SoundObject)){
_local3 = _dictMusic[_arg1];
if (_local3.mute){
_local3.muteOff(_arg2);
} else {
_local3.muteOn(_arg2);
};
};
}
public static function isMusicPlaying(_arg1:String):Boolean{
return (_dictMusic[_arg1].isPlaying);
}
public static function resumeSFX(_arg1:String):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].resume();
};
}
public static function setMaxVolumeMusicChannel(_arg1:Number):void{
var _local2:SoundObject;
if (_rememberValue){
_musicChannelVolume = _arg1;
};
_maxMusicVolume = _arg1;
for each (_local2 in _dictMusic) {
_local2.maxVolume = _arg1;
};
}
public static function muteGlobal():void{
if (!_globalMute){
try {
_globalMute = true;
SoundMixer.soundTransform = new SoundTransform(0);
} catch(evt:Error) {
};
} else {
_globalMute = false;
try {
SoundMixer.soundTransform = new SoundTransform(1);
} catch(evt:Error) {
};
};
}
public static function isMusicChannelMute():Boolean{
return (_musicMute);
}
public static function stopSFX(_arg1:String):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].stop();
};
}
public static function addSFX(_arg1:String, _arg2:Number=1):void{
var _local3:SoundObject;
_local3 = new SoundObject(_arg1);
_local3.volume = _arg2;
_dictSFX[_arg1] = _local3;
}
public static function get isGlobalMute():Boolean{
return (_globalMute);
}
public static function getLengthMusic(_arg1:String):Number{
var _local2:Number;
_local2 = 0;
if ((_dictMusic[_arg1] is SoundObject)){
_local2 = _dictMusic[_arg1].length;
};
return (_local2);
}
public static function fadeMusicStop(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].fade(_arg2, _arg3);
TweenLite.to(_dictMusic[_arg1], _arg3, {onComplete:stopMusic, onCompleteParams:[_arg1]});
};
}
public static function muteSFX(_arg1:String, _arg2:Number=0):void{
var _local3:*;
if ((_dictSFX[_arg1] is SoundObject)){
_local3 = _dictSFX[_arg1];
if (_local3.mute){
_local3.muteOff(_arg2);
} else {
_local3.muteOn(_arg2);
};
};
}
public static function getMaxVolumeMusicChannel():Number{
return (_maxMusicVolume);
}
public static function playSFX(_arg1:String, _arg2:Boolean=false, _arg3:uint=999999, _arg4:uint=0, _arg5:Boolean=false):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].play(_arg2, _arg3, _arg4, _arg5);
};
}
public static function isSFXPlaying(_arg1:String):Boolean{
return (_dictSFX[_arg1].isPlaying);
}
public static function setMaxVolumeSFX(_arg1:String, _arg2:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].maxVolume = _arg2;
};
}
public static function muteSFXChannel(_arg1:Number=0):void{
var _local2:SoundObject;
var _local3:SoundObject;
if (!_sfxMute){
_sfxMute = true;
for each (_local2 in _dictSFX) {
_local2.muteOn(_arg1);
};
} else {
_sfxMute = false;
for each (_local3 in _dictSFX) {
_local3.muteOff(_arg1);
};
};
}
public static function setMaxVolumeMusic(_arg1:String, _arg2:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].maxVolume = _arg2;
};
}
public static function removeSFXComplete(_arg1:String){
_dictSFX[_arg1].removeComplete();
}
public static function fadeSFXPlay(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:uint=999999, _arg6:uint=0, _arg7:Boolean=false):void{
if ((_dictSFX[_arg1] is SoundObject)){
setVolumeSFX(_arg1, 0);
playSFX(_arg1, _arg4, _arg5, _arg6, _arg7);
fadeSFX(_arg1, _arg2, _arg3);
};
}
public static function stopMusicChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictMusic) {
_local1.stop();
};
}
public static function isSFXChannelMuted():Boolean{
return (_sfxMute);
}
public static function getPositionMusic(_arg1:String):Number{
var _local2:Number;
_local2 = 0;
if ((_dictMusic[_arg1] is SoundObject)){
_local2 = _dictMusic[_arg1].currentPosition;
};
return (_local2);
}
public static function TrackChannelLastVolume(_arg1:Boolean):void{
_rememberValue = _arg1;
}
public static function fadeMusicChannel(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictMusic) {
_local3.fade(_arg1, _arg2);
};
}
public static function resumeSFXChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictSFX) {
_local1.resume();
};
}
public static function getMaxVolumeSFXChannel():Number{
return (_maxSFXVolume);
}
public static function getVolumeMusicChannel():Number{
return (_musicChannelVolume);
}
public static function muteAll(_arg1:Number=0):void{
muteSFXChannel(_arg1);
muteMusicChannel(_arg1);
}
public static function setVolumeSFX(_arg1:String, _arg2:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].volume = _arg2;
};
}
public static function playMusic(_arg1:String, _arg2:Boolean=false, _arg3:uint=999999, _arg4:uint=0):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].play(_arg2, _arg3, _arg4);
};
}
public static function stopMusic(_arg1:String):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].stop();
};
}
public static function getVolumeSFX(_arg1:String):Number{
return (_dictSFX[_arg1].volume);
}
public static function fadeMusicChannelStop(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictMusic) {
_local3.fade(_arg1, _arg2);
TweenLite.to(_local3, _arg2, {onComplete:stopMusic, onCompleteParams:[_local3.linkage]});
};
}
public static function addMusicComplete(_arg1:String, _arg2:Function, ... _args){
_args.splice(0, 0, _arg2);
_dictMusic[_arg1].addComplete.apply(null, _args);
}
public static function muteMusicChannel(_arg1:Number=0):void{
var _local2:SoundObject;
var _local3:SoundObject;
if (!_musicMute){
_musicMute = true;
for each (_local2 in _dictMusic) {
_local2.muteOn(_arg1);
};
} else {
_musicMute = false;
for each (_local3 in _dictMusic) {
_local3.muteOff(_arg1);
};
};
}
public static function removeMusicComplete(_arg1:String){
_dictMusic[_arg1].removeComplete();
}
public static function fadeMusicPlay(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:uint=999999, _arg6:uint=0):void{
if ((_dictMusic[_arg1] is SoundObject)){
setVolumeMusic(_arg1, 0);
playMusic(_arg1, _arg4, _arg5, _arg6);
fadeMusic(_arg1, _arg2, _arg3);
};
}
public static function stopSFXChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictSFX) {
_local1.stop();
};
}
public static function fadeSFX(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].fade(_arg2, _arg3);
};
}
public static function resumeMusicChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictMusic) {
_local1.resume();
};
}
public static function setVolumeMusic(_arg1:String, _arg2:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].volume = _arg2;
};
}
public static function fadeSFXChannel(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictSFX) {
_local3.fade(_arg1, _arg2);
};
}
public static function setMaxVolumeSFXChannel(_arg1:Number):void{
var _local2:SoundObject;
if (_rememberValue){
_sfxChannelVolume = _arg1;
};
_maxSFXVolume = _arg1;
for each (_local2 in _dictSFX) {
_local2.maxVolume = _arg1;
};
}
public static function getVolumeMusic(_arg1:String):Number{
return (_dictMusic[_arg1].volume);
}
public static function resumeMusic(_arg1:String):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].resume();
};
}
public static function setVolumeSFXChannel(_arg1:Number):void{
var _local2:SoundObject;
for each (_local2 in _dictSFX) {
_local2.volume = _arg1;
};
}
public static function fadeSFXChannelStop(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictSFX) {
_local3.fade(_arg1, _arg2);
TweenLite.to(_local3, _arg2, {onComplete:stopSFX, onCompleteParams:[_local3.linkage]});
};
}
public static function addSFXComplete(_arg1:String, _arg2:Function, ... _args){
_args.splice(0, 0, _arg2);
_dictSFX[_arg1].addComplete.apply(null, _args);
}
}
}//package console.sounds
Section 28
//MochiBot (console.trackers.MochiBot)
package console.trackers {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package console.trackers
Section 29
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintMultiplier:Number;// = 0
private var _tintColor: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){
_tintColor = 0;
_tintMultiplier = 0;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setTint(_arg1:uint, _arg2:Number):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
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));
}
private function deriveTintColor():uint{
var _local1:Number;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
_local1 = (1 / this.tintMultiplier);
_local2 = Math.round((this.redOffset * _local1));
_local3 = Math.round((this.greenOffset * _local1));
_local4 = Math.round((this.blueOffset * _local1));
_local5 = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set brightness(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
_local2 = (1 - Math.abs(_arg1));
_local3 = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
private function parseXML(_arg1:XML=null):Color{
var _local2:XML;
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
_local2 = _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 static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
_local4 = (1 - _arg3);
_local5 = ((_arg1 >> 24) & 0xFF);
_local6 = ((_arg1 >> 16) & 0xFF);
_local7 = ((_arg1 >> 8) & 0xFF);
_local8 = (_arg1 & 0xFF);
_local9 = ((_arg2 >> 24) & 0xFF);
_local10 = ((_arg2 >> 16) & 0xFF);
_local11 = ((_arg2 >> 8) & 0xFF);
_local12 = (_arg2 & 0xFF);
_local13 = ((_local5 * _local4) + (_local9 * _arg3));
_local14 = ((_local6 * _local4) + (_local10 * _arg3));
_local15 = ((_local7 * _local4) + (_local11 * _arg3));
_local16 = ((_local8 * _local4) + (_local12 * _arg3));
_local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number;
var _local5:ColorTransform;
_local4 = (1 - _arg3);
_local5 = 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 30
//Back (gs.easing.Back)
package gs.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package gs.easing
Section 31
//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 32
//OverwriteManager (gs.OverwriteManager)
package gs {
import flash.utils.*;
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 = 0.96;
public static var mode:int;
public static var enabled:Boolean;
public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array, _arg4:Array, _arg5:Array):void{
var _local6:int;
var _local7:String;
_local6 = (_arg4.length - 1);
while (_local6 > -1) {
if (_arg1[_arg4[_local6].name] != undefined){
_arg4.splice(_local6, 1);
};
_local6--;
};
_local6 = (_arg3.length - 1);
while (_local6 > -1) {
if (_arg1[_arg3[_local6].name] != undefined){
_arg3.splice(_local6, 1);
};
_local6--;
};
_local6 = (_arg5.length - 1);
while (_local6 > -1) {
if (_arg1[_arg5[_local6].name] != undefined){
_arg5.splice(_local6, 1);
};
_local6--;
};
for (_local7 in _arg1) {
delete _arg2[_local7];
};
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Dictionary):void{
var _local3:Object;
var _local4:int;
var _local5:Object;
var _local6:Number;
var _local7:Array;
var _local8:int;
var _local9:Object;
var _local10:String;
_local3 = _arg1.vars;
_local4 = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite);
if (_local4 < 2){
return;
};
_local6 = _arg1.startTime;
_local7 = [];
for each (_local5 in _arg2) {
if (((!((_local5 == _arg1))) && ((_local5.startTime <= _local6)))){
_local7[_local7.length] = _local5;
};
};
if (_local7.length == 0){
return;
};
if (_local4 == AUTO){
if (_local3.isTV == true){
_local3 = _local3.exposedProps;
};
_local9 = {};
for (_local10 in _local3) {
if ((((((((((((((((((((((((((((((((((((((_local10 == "ease")) || ((_local10 == "delay")))) || ((_local10 == "overwrite")))) || ((_local10 == "onComplete")))) || ((_local10 == "onCompleteParams")))) || ((_local10 == "runBackwards")))) || ((_local10 == "persist")))) || ((_local10 == "onUpdate")))) || ((_local10 == "onUpdateParams")))) || ((_local10 == "timeScale")))) || ((_local10 == "onStart")))) || ((_local10 == "onStartParams")))) || ((_local10 == "renderOnStart")))) || ((_local10 == "proxiedEase")))) || ((_local10 == "easeParams")))) || ((_local10 == "onCompleteAll")))) || ((_local10 == "onCompleteAllParams")))) || ((_local10 == "yoyo")))) || ((_local10 == "loop")))){
} else {
_local9[_local10] = 1;
};
};
_local8 = (_local7.length - 1);
while (_local8 > -1) {
_local7[_local8].killVars(_local9);
_local8--;
};
} else {
_local8 = (_local7.length - 1);
while (_local8 > -1) {
_arg2[_local7[_local8]] = null;
delete _arg2[_local7[_local8]];
_local8--;
};
};
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 8.14){
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
}
}//package gs
Section 33
//TweenFilterLite (gs.TweenFilterLite)
package gs {
import flash.filters.*;
public class TweenFilterLite extends TweenLite {
protected var _endMatrix:Array;
protected var _hf:Boolean;// = false
protected var _clrsa:Array;
protected var _filters:Array;
protected var _originalEase:Function;
protected var _matrix:Array;
protected var _cmf:ColorMatrixFilter;
public static var removeTween:Function = TweenLite.removeTween;
public static var defaultEase:Function = TweenLite.defaultEase;
private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
private static var _lumB:Number = 0.072169;
public static var version:Number = 8.16;
public static var delayedCall:Function = TweenLite.delayedCall;
public static var killTweensOf:Function = TweenLite.killTweensOf;
private static var _lumG:Number = 0.71516;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _lumR:Number = 0.212671;
public function TweenFilterLite(_arg1:Object, _arg2:Number, _arg3:Object){
_hf = false;
_filters = [];
super(_arg1, _arg2, _arg3);
_originalEase = this.vars.ease;
if (TweenLite.version < 8.15){
};
if (_arg3.type != undefined){
};
}
override public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:Array;
_local2 = (((_arg1 - this.startTime) / 1000) * _timeScale);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((_originalEase == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hf){
_local5 = (_clrsa.length - 1);
while (_local5 > -1) {
_local4 = _clrsa[_local5];
_local6 = (_local4.sr + (_local3 * _local4.cr));
_local7 = (_local4.sg + (_local3 * _local4.cg));
_local8 = (_local4.sb + (_local3 * _local4.cb));
_local4.f[_local4.p] = (((_local6 << 16) | (_local7 << 8)) | _local8);
_local5--;
};
if (_cmf != null){
ColorMatrixFilter(_cmf).matrix = _matrix;
};
_local10 = this.target.filters;
_local5 = 0;
while (_local5 < _filters.length) {
_local9 = (_local10.length - 1);
while (_local9 > -1) {
if ((_local10[_local9] is _filters[_local5].type)){
_local10.splice(_local9, 1, _filters[_local5].filter);
break;
};
_local9--;
};
_local5++;
};
this.target.filters = _local10;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function get timeScale():Number{
return (_timeScale);
}
public function set timeScale(_arg1:Number):void{
if (((_initted) && ((_curTime > (this.initTime + (this.delay * 1000)))))){
this.initTime = ((_curTime - (((_curTime - (this.initTime + (this.delay * 1000))) * _timeScale) * (1 / _arg1))) - (this.delay * 1000));
if (this.startTime != 99999999999){
this.startTime = (this.initTime + (this.delay * 1000));
};
};
_timeScale = _arg1;
}
override public function killVars(_arg1:Object):void{
if (TweenLite.overwriteManager.enabled){
TweenLite.overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, _filters);
};
}
override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:int;
var _local4:Object;
var _local5:Object;
var _local6:Object;
if (((((!(_arg1)) && (!((this.delay == 0))))) && (TweenLite.overwriteManager.enabled))){
TweenLite.overwriteManager.manageOverwrites(this, _all[this.target]);
};
_clrsa = [];
_filters = [];
_matrix = _idMatrix.slice();
_arg2 = (_arg2 + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter ");
if (_isDisplayObject){
if (this.vars.blurFilter != null){
_local4 = this.vars.blurFilter;
addFilter("blurFilter", _local4, BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, ((_local4.quality) || (2))));
};
if (this.vars.glowFilter != null){
_local4 = this.vars.glowFilter;
addFilter("glowFilter", _local4, GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((_local4.strength) || (1)), ((_local4.quality) || (2)), _local4.inner, _local4.knockout));
};
if (this.vars.colorMatrixFilter != null){
_local4 = this.vars.colorMatrixFilter;
_local5 = addFilter("colorMatrixFilter", _local4, ColorMatrixFilter, [], new ColorMatrixFilter(_matrix));
_cmf = _local5.filter;
_matrix = ColorMatrixFilter(_cmf).matrix;
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_endMatrix = _local4.matrix;
} else {
if (_local4.relative == true){
_endMatrix = _matrix.slice();
} else {
_endMatrix = _idMatrix.slice();
};
_endMatrix = setBrightness(_endMatrix, _local4.brightness);
_endMatrix = setContrast(_endMatrix, _local4.contrast);
_endMatrix = setHue(_endMatrix, _local4.hue);
_endMatrix = setSaturation(_endMatrix, _local4.saturation);
_endMatrix = setThreshold(_endMatrix, _local4.threshold);
if (!isNaN(_local4.colorize)){
_endMatrix = colorize(_endMatrix, _local4.colorize, _local4.amount);
} else {
if (!isNaN(_local4.color)){
_endMatrix = colorize(_endMatrix, _local4.color, _local4.amount);
};
};
};
_local3 = 0;
while (_local3 < _endMatrix.length) {
if (((!((_matrix[_local3] == _endMatrix[_local3]))) && (!((_matrix[_local3] == undefined))))){
this.tweens[this.tweens.length] = {o:_matrix, p:_local3.toString(), s:_matrix[_local3], c:(_endMatrix[_local3] - _matrix[_local3]), name:"colorMatrixFilter"};
};
_local3++;
};
};
if (this.vars.dropShadowFilter != null){
_local4 = this.vars.dropShadowFilter;
addFilter("dropShadowFilter", _local4, DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_local4.quality) || (2)), _local4.inner, _local4.knockout, _local4.hideObject));
};
if (this.vars.bevelFilter != null){
_local4 = this.vars.bevelFilter;
addFilter("bevelFilter", _local4, BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_local4.quality) || (2))));
};
if (this.vars.runBackwards == true){
_local3 = (_clrsa.length - 1);
while (_local3 > -1) {
_local6 = _clrsa[_local3];
_clrsa[_local3].sr = (_local6.sr + _local6.cr);
_local6.cr = (_local6.cr * -1);
_local6.sg = (_local6.sg + _local6.cg);
_local6.cg = (_local6.cg * -1);
_local6.sb = (_local6.sb + _local6.cb);
_local6.cb = (_local6.cb * -1);
_local6.f[_local6.p] = (((_local6.sr << 16) | (_local6.sg << 8)) | _local6.sb);
_local3--;
};
};
super.initTweenVals(true, _arg2);
} else {
super.initTweenVals(_arg1, _arg2);
};
}
private function addFilter(_arg1:String, _arg2:Object, _arg3:Class, _arg4:Array, _arg5:BitmapFilter):Object{
var _local6:Object;
var _local7:Array;
var _local8:int;
var _local9:String;
var _local10:Number;
var _local11:Object;
var _local12:Object;
_local6 = {type:_arg3, name:_arg1};
_local7 = this.target.filters;
_local8 = 0;
while (_local8 < _local7.length) {
if ((_local7[_local8] is _arg3)){
_local6.filter = _local7[_local8];
break;
};
_local8++;
};
if (_local6.filter == undefined){
_local6.filter = _arg5;
_local7[_local7.length] = _local6.filter;
this.target.filters = _local7;
};
_local8 = 0;
while (_local8 < _arg4.length) {
_local9 = _arg4[_local8];
if (_arg2[_local9] != undefined){
if ((((((_local9 == "color")) || ((_local9 == "highlightColor")))) || ((_local9 == "shadowColor")))){
_local11 = HEXtoRGB(_local6.filter[_local9]);
_local12 = HEXtoRGB(_arg2[_local9]);
_clrsa[_clrsa.length] = {f:_local6.filter, p:_local9, sr:_local11.rb, cr:(_local12.rb - _local11.rb), sg:_local11.gb, cg:(_local12.gb - _local11.gb), sb:_local11.bb, cb:(_local12.bb - _local11.bb)};
} else {
if ((((((((_local9 == "quality")) || ((_local9 == "inner")))) || ((_local9 == "knockout")))) || ((_local9 == "hideObject")))){
_local6.filter[_local9] = _arg2[_local9];
} else {
if (typeof(_arg2[_local9]) == "number"){
_local10 = (_arg2[_local9] - _local6.filter[_local9]);
} else {
_local10 = Number(_arg2[_local9]);
};
this.tweens[this.tweens.length] = {o:_local6.filter, p:_local9, s:_local6.filter[_local9], c:_local10, name:_arg1};
};
};
};
_local8++;
};
_filters[_filters.length] = _local6;
_hf = true;
return (_local6);
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
_local3 = [_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));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
_local4 = (((_arg2 >> 16) & 0xFF) / 0xFF);
_local5 = (((_arg2 >> 8) & 0xFF) / 0xFF);
_local6 = ((_arg2 & 0xFF) / 0xFF);
_local7 = (1 - _arg3);
_local8 = [(_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 setSaturation(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = (1 - _arg2);
_local4 = (_local3 * _lumR);
_local5 = (_local3 * _lumG);
_local6 = (_local3 * _lumB);
_local7 = [(_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 applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
_local3 = [];
_local4 = 0;
_local5 = 0;
_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 from(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{
_arg3.runBackwards = true;
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
public static function HEXtoRGB(_arg1:Number):Object{
return ({rb:(_arg1 >> 16), gb:((_arg1 >> 8) & 0xFF), bb:(_arg1 & 0xFF)});
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = [(_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 to(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
_local3 = Math.cos(_arg2);
_local4 = Math.sin(_arg2);
_local5 = [((_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));
}
}
}//package gs
Section 34
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _subTweens:Array;
protected var _initted:Boolean;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _isDisplayObject:Boolean;
protected var _active:Boolean;
public var vars:Object;
public var tweens:Array;
public var initTime:int;
protected var _timeScale:Number;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 8.15;
protected static var _all:Dictionary = new Dictionary();
private static var _sprite:Sprite = new Sprite();
protected static var _curTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:int;
var _local5:*;
super();
if (_arg1 == null){
return;
};
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_classInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
_timeScale = ((_arg3.timeScale) || (1));
_active = (((_arg2 == 0)) && ((this.delay == 0)));
this.target = _arg1;
_isDisplayObject = (_arg1 is DisplayObject);
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = (this.vars.alpha > 0);
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
this.initTime = _curTime;
this.startTime = (this.initTime + (this.delay * 1000));
_local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if ((((_all[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){
delete _all[_arg1];
_all[_arg1] = new Dictionary(true);
} else {
if ((((_local4 > 1)) && ((this.delay == 0)))){
overwriteManager.manageOverwrites(this, _all[_arg1]);
};
};
_all[_arg1][this] = this;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
_local5 = this.vars.visible;
if (this.vars.isTV == true){
_local5 = this.vars.exposedProps.visible;
};
if (((((!((_local5 == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = Boolean(_local5);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{
var _local6:Object;
var _local7:String;
_local6 = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5};
_subTweens[_subTweens.length] = _local6;
for (_local7 in _arg4) {
if (typeof(_arg4[_local7]) == "number"){
this.tweens[this.tweens.length] = {o:_arg3, p:_local7, s:_arg3[_local7], c:(_arg4[_local7] - _arg3[_local7]), sub:_local6, name:_arg1};
} else {
this.tweens[this.tweens.length] = {o:_arg3, p:_local7, s:_arg3[_local7], c:Number(_arg4[_local7]), sub:_local6, name:_arg1};
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local5:Object;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Object;
_local5 = this.vars;
if (_local5.isTV == true){
_local5 = _local5.exposedProps;
};
if (((((!(_arg1)) && (!((this.delay == 0))))) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(this, _all[this.target]);
};
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local4 = 0;
while (_local4 < _local6.length) {
if (((!((this.target[_local4] == _local6[_local4]))) && (!((this.target[_local4] == undefined))))){
this.tweens[this.tweens.length] = {o:this.target, p:_local4.toString(), s:this.target[_local4], c:(_local6[_local4] - this.target[_local4]), name:_local4.toString()};
};
_local4++;
};
} else {
if (((((!((typeof(_local5.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (_local5.alpha != undefined){
_local8.alphaMultiplier = _local5.alpha;
delete _local5.alpha;
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((_local5.tint == null))) && (!((_local5.tint == ""))))) || ((_local5.tint == 0)))))){
_local8.color = _local5.tint;
};
addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
};
if (((!((_local5.frame == null))) && (_isDisplayObject))){
addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_local5.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
for (_local3 in _local5) {
if ((((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((_local3 == "timeScale")))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(_local5[_local3]) == "number"){
this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:(_local5[_local3] - this.target[_local3]), name:_local3};
} else {
this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:Number(_local5[_local3]), name:_local3};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local4 = (this.tweens.length - 1);
while (_local4 > -1) {
_local9 = this.tweens[_local4];
this.tweens[_local4].s = (_local9.s + _local9.c);
_local9.c = (_local9.c * -1);
_local4--;
};
};
if ((((_local5.visible == true)) && (_isDisplayObject))){
this.target.visible = true;
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (_curTime >= this.startTime){
_active = true;
if (!_initted){
initTweenVals();
} else {
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = 1;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(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.vars, this.tweens, _subTweens, []);
};
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - ((this.duration * 1000) / _timeScale));
render(_curTime);
return;
};
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
if (((!(isNaN(this.vars.autoAlpha))) && ((this.target.alpha == 0)))){
this.target.visible = false;
} else {
if (this.vars.runBackwards != true){
this.target.visible = this.vars.visible;
};
};
};
if (this.vars.persist != true){
removeTween(this);
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
_all[_arg1.target][_arg1] = null;
delete _all[_arg1.target][_arg1];
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
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 from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Object;
var _local5:Object;
_local2 = (_curTime = getTimer());
if (_listening){
_local3 = _all;
for each (_local4 in _local3) {
for (_local5 in _local4) {
if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
};
};
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local2:uint;
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
_local2 = 0;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Object;
_local2 = _arg1.target.progress;
_local3 = (1 - _local2);
_local4 = _arg1.info.color;
_local5 = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 35
//TweenMax (gs.TweenMax)
package gs {
import flash.events.*;
import flash.utils.*;
import gs.events.*;
public class TweenMax extends TweenFilterLite implements IEventDispatcher {
protected var _isProcessingComplete:Boolean;
protected var _dispatcher:EventDispatcher;
protected var _callbacks:Object;
protected var _pauseTime:int;
protected static const _RAD2DEG:Number = 57.2957795130823;
public static var removeTween:Function = TweenLite.removeTween;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init();
;
public static var defaultEase:Function = TweenLite.defaultEase;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var version:Number = 2.19;
public static var killDelayedCallsTo:Function = TweenLite.killDelayedCallsTo;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
_pauseTime = -1;
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
if ((((_arg2 == 0)) && ((this.delay == 0)))){
onUpdateDispatcher();
onCompleteDispatcher();
};
};
if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){
this.vars.persist = true;
};
if (TweenFilterLite.version < 8.16){
};
}
override public function get active():Boolean{
if (_active){
return (true);
};
if (_pauseTime != -1){
return (false);
};
if (_curTime >= this.startTime){
_active = true;
if (!_initted){
initTweenVals();
} else {
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function get paused():Boolean{
if (_pauseTime != -1){
return (true);
};
return (false);
}
public function resume():void{
var _local1:Boolean;
var _local2:Number;
if (_pauseTime != -1){
_local1 = (_pauseTime > (this.initTime + (this.delay * 1000)));
_local2 = (_curTime - _pauseTime);
this.initTime = (this.initTime + _local2);
this.startTime = (this.initTime + (this.delay * 1000));
_pauseTime = -1;
if (((!(_local1)) && ((_curTime >= this.startTime)))){
_local1 = this.active;
} else {
_active = _local1;
};
};
}
protected function adjustStartValues():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
_local1 = this.progress;
if (_local1 != 0){
_local2 = (1 / (1 - this.vars.ease((_local1 * this.duration), 0, 1, this.duration)));
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local3 = (_local4.s + _local4.c);
_local4.c = ((_local3 - _local4.o[_local4.p]) * _local2);
_local4.s = (_local3 - _local4.c);
_local5--;
};
};
}
override public function complete(_arg1:Boolean=false):void{
if (!_isProcessingComplete){
_isProcessingComplete = true;
if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){
if (this.vars.yoyo == true){
reverse(false);
};
this.startTime = _curTime;
this.initTime = (this.startTime - (this.delay * 1000));
render(_curTime);
} else {
if (this.vars.persist == true){
pause();
};
};
super.complete(_arg1);
_isProcessingComplete = false;
};
}
public function invalidate(_arg1:Boolean=true):void{
var _local2:Number;
if (_initted){
_local2 = this.progress;
if (((!(_arg1)) && (!((_local2 == 0))))){
this.progress = 0;
};
this.tweens = [];
_subTweens = [];
initTweenVals();
if (_local2 != 0){
if (_arg1){
adjustStartValues();
} else {
this.progress = _local2;
};
};
};
}
public function willTrigger(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.willTrigger(_arg1));
}
public function get progress():Number{
var _local1:Number;
_local1 = (((((((_curTime - this.initTime) / 1000) - this.delay) / this.duration) * _timeScale)) || (0));
if (_local1 > 1){
return (1);
};
return (_local1);
}
public function dispatchEvent(_arg1:Event):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.dispatchEvent(_arg1));
}
override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local5:Object;
var _local6:Object;
var _local7:Array;
var _local8:Function;
_arg2 = (_arg2 + " hexColors bezier bezierThrough orientToBezier quaternions onCompleteAll onCompleteAllParams yoyo loop onCompleteListener onUpdateListener onStartListener ");
if (((((!(_arg1)) && (!((this.delay == 0))))) && (TweenLite.overwriteManager.enabled))){
TweenLite.overwriteManager.manageOverwrites(this, _all[this.target]);
};
_local8 = bezierProxy;
if (this.vars.orientToBezier == true){
this.vars.orientToBezier = [["x", "y", "rotation", 0]];
_local8 = bezierProxy2;
} else {
if ((this.vars.orientToBezier is Array)){
_local8 = bezierProxy2;
};
};
if (((!((this.vars.bezier == undefined))) && ((this.vars.bezier is Array)))){
_local6 = {};
_local7 = this.vars.bezier;
_local4 = 0;
while (_local4 < _local7.length) {
for (_local3 in _local7[_local4]) {
if (_local6[_local3] == undefined){
_local6[_local3] = [this.target[_local3]];
};
if (typeof(_local7[_local4][_local3]) == "number"){
_local6[_local3].push(_local7[_local4][_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3])));
};
};
_local4++;
};
for (_local3 in _local6) {
if (typeof(this.vars[_local3]) == "number"){
_local6[_local3].push(this.vars[_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(this.vars[_local3])));
};
delete this.vars[_local3];
};
addSubTween("bezier", _local8, {t:0}, {t:1}, {props:parseBeziers(_local6, false), target:this.target, orientToBezier:this.vars.orientToBezier});
};
if (((!((this.vars.bezierThrough == undefined))) && ((this.vars.bezierThrough is Array)))){
_local6 = {};
_local7 = this.vars.bezierThrough;
_local4 = 0;
while (_local4 < _local7.length) {
for (_local3 in _local7[_local4]) {
if (_local6[_local3] == undefined){
_local6[_local3] = [this.target[_local3]];
};
if (typeof(_local7[_local4][_local3]) == "number"){
_local6[_local3].push(_local7[_local4][_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3])));
};
};
_local4++;
};
for (_local3 in _local6) {
if (typeof(this.vars[_local3]) == "number"){
_local6[_local3].push(this.vars[_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(this.vars[_local3])));
};
delete this.vars[_local3];
};
addSubTween("bezierThrough", _local8, {t:0}, {t:1}, {props:parseBeziers(_local6, true), target:this.target, orientToBezier:this.vars.orientToBezier});
};
if (((!((this.vars.hexColors == undefined))) && ((typeof(this.vars.hexColors) == "object")))){
for (_local3 in this.vars.hexColors) {
addSubTween("hexColors", hexColorsProxy, {r:(this.target[_local3] >> 16), g:((this.target[_local3] >> 8) & 0xFF), b:(this.target[_local3] & 0xFF)}, {r:(this.vars.hexColors[_local3] >> 16), g:((this.vars.hexColors[_local3] >> 8) & 0xFF), b:(this.vars.hexColors[_local3] & 0xFF)}, {prop:_local3, target:this.target});
};
};
super.initTweenVals(true, _arg2);
}
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 _local4:Number;
var _local5:Object;
var _local6:int;
var _local7:Object;
var _local8:Array;
var _local9:Array;
_local4 = this.progress;
if (((!((this.vars[_arg1] == undefined))) && (_initted))){
if (((!(_arg3)) && (!((_local4 == 0))))){
_local6 = (this.tweens.length - 1);
while (_local6 > -1) {
if (this.tweens[_local6].name == _arg1){
this.tweens[_local6].o[this.tweens[_local6].p] = this.tweens[_local6].s;
};
_local6--;
};
};
_local5 = {};
_local5[_arg1] = 1;
killVars(_local5);
};
this.vars[_arg1] = _arg2;
if (_initted){
_local7 = this.vars;
_local8 = this.tweens;
_local9 = _subTweens;
this.vars = {};
this.tweens = [];
_subTweens = [];
this.vars[_arg1] = _arg2;
initTweenVals();
if (((_arg3) && (!((_local4 == 0))))){
this.vars.ease = _local7.ease;
adjustStartValues();
};
this.vars = _local7;
this.tweens = _local8.concat(this.tweens);
_subTweens = _local9.concat(_subTweens);
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function restart():void{
this.progress = 0;
resume();
}
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};
_local1 = {};
for (_local2 in this.vars) {
_local1[_local2] = this.vars[_local2];
};
this.vars = _local1;
this.vars.onStart = onStartDispatcher;
this.vars.onUpdate = onUpdateDispatcher;
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);
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
};
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher != null){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function killProperties(_arg1:Array):void{
var _local2:Object;
var _local3:int;
_local2 = {};
_local3 = (_arg1.length - 1);
while (_local3 > -1) {
if (this.vars[_arg1[_local3]] != null){
_local2[_arg1[_local3]] = 1;
};
_local3--;
};
killVars(_local2);
}
public function set progress(_arg1:Number):void{
var _local2:Number;
var _local3:Boolean;
var _local4:*;
_local2 = (_curTime - ((this.duration * _arg1) * 1000));
this.initTime = (_local2 - (this.delay * 1000));
this.startTime = _local2;
_local3 = this.active;
render(_curTime);
if (_pauseTime != -1){
this.startTime = 99999999999;
};
_local4 = this.vars.visible;
if (this.vars.isTV == true){
_local4 = this.vars.exposedProps.visible;
};
if (((((!((_local4 == null))) && (_isDisplayObject))) && ((_arg1 < 1)))){
this.target.visible = Boolean(_local4);
};
}
public function reverse(_arg1:Boolean=true):void{
this.vars.ease = ((this.vars.ease)==_originalEase) ? reverseEase : _originalEase;
if (((_arg1) && ((_curTime > (this.initTime + (this.delay * 1000)))))){
this.initTime = ((_curTime - ((((1 - this.progress) * this.duration) * 1000) / _timeScale)) - (this.delay * 1000));
if (_pauseTime == -1){
this.startTime = (this.initTime + (this.delay * 1000));
};
};
resume();
}
public function set paused(_arg1:Boolean):void{
if (_arg1){
this.pause();
} else {
this.resume();
};
}
protected function onUpdateDispatcher(... _args):void{
if (_callbacks.onUpdate != null){
_callbacks.onUpdate.apply(null, this.vars.onUpdateParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
}
public function hasEventListener(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.hasEventListener(_arg1));
}
public function pause():void{
if (_pauseTime == -1){
_pauseTime = _curTime;
this.startTime = 99999999999;
_active = false;
};
}
public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (_originalEase((_arg4 - _arg1), _arg2, _arg3, _arg4));
}
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 sequence(_arg1:Object, _arg2:Array):Array{
var _local3:uint;
_local3 = 0;
while (_local3 < _arg2.length) {
_arg2[_local3].target = _arg1;
_local3++;
};
return (multiSequence(_arg2));
}
public static function hexColorsProxy(_arg1:Object):void{
_arg1.info.target[_arg1.info.prop] = uint((((_arg1.target.r << 16) | (_arg1.target.g << 8)) | _arg1.target.b));
}
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;
_local7 = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = {s:_local4[0], cp:(_local4[1] - ((_local4[2] - _local4[0]) / 4)), e:_local4[1]};
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = {s:_local4[_local3], cp:(_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)].cp)), e:_local4[(_local3 + 1)]};
_local3++;
};
} else {
_local5[_local5.length] = {s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]};
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = {s:_local4[0], cp:_local4[1], e:((_local4[1] + _local4[2]) / 2)};
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5.push({s:_local5[(_local3 - 2)].e, cp:_local4[_local3], e:((_local4[_local3] + _local4[(_local3 + 1)]) / 2)});
_local3++;
};
_local5[_local5.length] = {s:_local5[(_local5.length - 1)].e, cp:_local4[(_local4.length - 2)], e:_local4[(_local4.length - 1)]};
} else {
if (_local4.length == 3){
_local5[_local5.length] = {s:_local4[0], cp:_local4[1], e:_local4[2]};
} else {
if (_local4.length == 2){
_local5[_local5.length] = {s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]};
};
};
};
};
};
return (_local7);
}
public static function bezierProxy2(_arg1:Object):void{
var _local2:Object;
var _local3:Object;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local9:Number;
var _local10:uint;
bezierProxy(_arg1);
_local2 = {};
_local3 = _arg1.info.target;
_arg1.info.target = _local2;
_arg1.target.t = (_arg1.target.t + 0.01);
bezierProxy(_arg1);
_local4 = _arg1.info.orientToBezier;
_local10 = 0;
while (_local10 < _local4.length) {
_local8 = _local4[_local10];
_local9 = ((_local8[3]) || (0));
_local6 = (_local2[_local8[0]] - _local3[_local8[0]]);
_local7 = (_local2[_local8[1]] - _local3[_local8[1]]);
_local3[_local8[2]] = ((Math.atan2(_local7, _local6) * _RAD2DEG) + _local9);
_local10++;
};
_arg1.info.target = _local3;
_arg1.target.t = (_arg1.target.t - 0.01);
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(true, _arg1, _arg2);
}
public static function getTweensOf(_arg1:Object):Array{
var _local2:Dictionary;
var _local3:Array;
var _local4:Object;
_local2 = _all[_arg1];
_local3 = [];
if (_local2 != null){
for (_local4 in _local2) {
if (_local2[_local4].tweens != undefined){
_local3[_local3.length] = _local2[_local4];
};
};
};
return (_local3);
}
public static function multiSequence(_arg1:Array):Array{
var _local2:Dictionary;
var _local3:Array;
var _local4:int;
var _local5:Number;
var _local6:Object;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:uint;
var _local11:Object;
var _local12:String;
_local2 = new Dictionary();
_local3 = [];
_local4 = TweenLite.overwriteManager.mode;
_local5 = 0;
_local10 = 0;
while (_local10 < _arg1.length) {
_local6 = _arg1[_local10];
_local9 = ((_local6.time) || (0));
_local11 = {};
for (_local12 in _local6) {
_local11[_local12] = _local6[_local12];
};
delete _local11.time;
_local8 = ((_local11.delay) || (0));
_local11.delay = (_local5 + _local8);
_local7 = _local11.target;
delete _local11.target;
if (_local4 == 1){
if (_local2[_local7] == undefined){
_local2[_local7] = _local11;
} else {
_local11.overwrite = 2;
};
};
_local3[_local3.length] = new TweenMax(_local7, _local9, _local11);
_local5 = (_local5 + (_local9 + _local8));
_local10++;
};
return (_local3);
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:Array;
var _local3:int;
_local2 = getTweensOf(_arg1);
_local3 = (_local2.length - 1);
while (_local3 > -1) {
if (_local2[_local3].active){
return (true);
};
_local3--;
};
return (false);
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:int;
_local4 = getAllTweens();
_local5 = (_local4.length - 1);
while (_local5 > -1) {
if (((((_local4[_local5].target is Function) == _arg3)) || (!(((_local4[_local5].target is Function) == _arg2))))){
if (_arg1){
_local4[_local5].complete();
} else {
TweenLite.removeTween(_local4[_local5]);
};
};
_local5--;
};
}
public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local4:Array;
var _local5:int;
_local4 = getAllTweens();
_local5 = (_local4.length - 1);
while (_local5 > -1) {
if ((((_local4[_local5] is TweenMax)) && (((((_local4[_local5].target is Function) == _arg3)) || (!(((_local4[_local5].target is Function) == _arg2))))))){
_local4[_local5].paused = _arg1;
};
_local5--;
};
}
public static function bezierProxy(_arg1:Object):void{
var _local2:Number;
var _local3:Object;
var _local4:Object;
var _local5:int;
var _local6:String;
var _local7:Object;
var _local8:Number;
var _local9:uint;
_local2 = _arg1.target.t;
_local3 = _arg1.info.props;
_local4 = _arg1.info.target;
if (_local2 == 1){
for (_local6 in _local3) {
_local5 = (_local3[_local6].length - 1);
_local4[_local6] = _local3[_local6][_local5].e;
};
} else {
for (_local6 in _local3) {
_local9 = _local3[_local6].length;
if (_local2 < 0){
_local5 = 0;
} else {
if (_local2 >= 1){
_local5 = (_local9 - 1);
} else {
_local5 = int((_local9 * _local2));
};
};
_local8 = ((_local2 - (_local5 * (1 / _local9))) * _local9);
_local7 = _local3[_local6][_local5];
_local4[_local6] = (_local7.s + (_local8 * (((2 * (1 - _local8)) * (_local7.cp - _local7.s)) + (_local8 * (_local7.e - _local7.s)))));
};
};
}
public static function callbackProxy(_arg1:Array, _arg2:Array=null):void{
var _local3:uint;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3] != undefined){
_arg1[_local3].apply(null, _arg2[_local3]);
};
_local3++;
};
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object):Array{
_arg3.runBackwards = true;
return (allTo(_arg1, _arg2, _arg3));
}
public static function killAllDelayedCalls(_arg1:Boolean=false):void{
killAll(_arg1, false, true);
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function killAllTweens(_arg1:Boolean=false):void{
killAll(_arg1, true, false);
}
public static function getAllTweens():Array{
var _local1:Dictionary;
var _local2:Array;
var _local3:Object;
var _local4:Object;
_local1 = _all;
_local2 = [];
for (_local3 in _local1) {
for (_local4 in _local1[_local3]) {
if (_local1[_local3][_local4] != undefined){
_local2[_local2.length] = _local1[_local3][_local4];
};
};
};
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));
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object):Array{
var _local4:int;
var _local5:Object;
var _local6:String;
var _local7:Number;
var _local8:Object;
var _local9:Array;
var _local10:Number;
if (_arg1.length == 0){
return ([]);
};
_local9 = [];
_local10 = ((_arg3.delayIncrement) || (0));
delete _arg3.delayIncrement;
if (_arg3.onCompleteAll == undefined){
_local8 = _arg3;
} else {
_local8 = {};
for (_local6 in _arg3) {
_local8[_local6] = _arg3[_local6];
};
_local8.onCompleteParams = [[_arg3.onComplete, _arg3.onCompleteAll], [_arg3.onCompleteParams, _arg3.onCompleteAllParams]];
_local8.onComplete = TweenMax.callbackProxy;
delete _arg3.onCompleteAll;
};
delete _arg3.onCompleteAllParams;
if (_local10 == 0){
_local4 = 0;
while (_local4 < (_arg1.length - 1)) {
_local5 = {};
for (_local6 in _arg3) {
_local5[_local6] = _arg3[_local6];
};
_local9[_local9.length] = new TweenMax(_arg1[_local4], _arg2, _local5);
_local4++;
};
} else {
_local7 = ((_arg3.delay) || (0));
_local4 = 0;
while (_local4 < (_arg1.length - 1)) {
_local5 = {};
for (_local6 in _arg3) {
_local5[_local6] = _arg3[_local6];
};
_local5.delay = (_local7 + (_local4 * _local10));
_local9[_local9.length] = new TweenMax(_arg1[_local4], _arg2, _local5);
_local4++;
};
_local8.delay = (_local7 + ((_arg1.length - 1) * _local10));
};
_local9[_local9.length] = new TweenMax(_arg1[(_arg1.length - 1)], _arg2, _local8);
if ((_arg3.onCompleteAllListener is Function)){
_local9[(_local9.length - 1)].addEventListener(TweenEvent.COMPLETE, _arg3.onCompleteAllListener);
};
return (_local9);
}
}
}//package gs
Section 36
//game_TopBar_74 (worldofconfusion_organicBlank_fla.game_TopBar_74)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_TopBar_74 extends MovieClip {
public var totalBods:TextField;
public var bodsLeft:TextField;
public var time:TextField;
public var inkBar_mc:MovieClip;
}
}//package worldofconfusion_organicBlank_fla
Section 37
//levelOverRatingStar_47 (worldofconfusion_organicBlank_fla.levelOverRatingStar_47)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class levelOverRatingStar_47 extends MovieClip {
public function levelOverRatingStar_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 38
//levelSelectMenu_29 (worldofconfusion_organicBlank_fla.levelSelectMenu_29)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class levelSelectMenu_29 extends MovieClip {
public var addToFacebook_btn:SimpleButton;
public var inviteFriends_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 39
//LevelSelectRollover_11 (worldofconfusion_organicBlank_fla.LevelSelectRollover_11)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelSelectRollover_11 extends MovieClip {
public var whackyMode_mc:MovieClip;
public var whackyMode_btn:SimpleButton;
public var whackyStatus:TextField;
public var normalMode_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 40
//menu_EnterYourName_57 (worldofconfusion_organicBlank_fla.menu_EnterYourName_57)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menu_EnterYourName_57 extends MovieClip {
public var playerName:TextField;
public var continueName_btn:SimpleButton;
public var err:TextField;
}
}//package worldofconfusion_organicBlank_fla
Section 41
//menu_highscoreLocation_37 (worldofconfusion_organicBlank_fla.menu_highscoreLocation_37)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class menu_highscoreLocation_37 extends MovieClip {
public function menu_highscoreLocation_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 42
//menu_HighScores_30 (worldofconfusion_organicBlank_fla.menu_HighScores_30)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menu_HighScores_30 extends MovieClip {
public var scores10:TextField;
public var hs7_mc:MovieClip;
public var playerNames2:TextField;
public var playerNames3:TextField;
public var playerNames4:TextField;
public var playerNames5:TextField;
public var scores1:TextField;
public var scores2:TextField;
public var scores3:TextField;
public var scores4:TextField;
public var scores5:TextField;
public var scores6:TextField;
public var scores7:TextField;
public var scores8:TextField;
public var scores9:TextField;
public var playerNames6:TextField;
public var playerNames7:TextField;
public var playerNames8:TextField;
public var playerNames9:TextField;
public var playerNames1:TextField;
public var highscoresDaily_btn:SimpleButton;
public var hs2_mc:MovieClip;
public var highscoresAllTime_btn:SimpleButton;
public var addToFacebook_btn:SimpleButton;
public var hs8_mc:MovieClip;
public var hs3_mc:MovieClip;
public var hs9_mc:MovieClip;
public var highscoresMonthly_btn:SimpleButton;
public var home_btn:SimpleButton;
public var hs4_mc:MovieClip;
public var position:TextField;
public var playerNames10:TextField;
public var menuMask_mc:MovieClip;
public var hs5_mc:MovieClip;
public var hozBar_mc:MovieClip;
public var hs10_mc:MovieClip;
public var addToFacebookLarge_btn:SimpleButton;
public var hs6_mc:MovieClip;
public var hs1_mc:MovieClip;
public var share_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 43
//menu_LevelOver_46 (worldofconfusion_organicBlank_fla.menu_LevelOver_46)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menu_LevelOver_46 extends MovieClip {
public var buttons_mc:MovieClip;
public var star2_mc:MovieClip;
public var bannerAd_mc:MovieClip;
public var bodsSaved:TextField;
public var star3_mc:MovieClip;
public var timeLeft:TextField;
public var totalScore:TextField;
public var star1_mc:MovieClip;
public var continue_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 44
//menu_LevelOverFailed_55 (worldofconfusion_organicBlank_fla.menu_LevelOverFailed_55)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menu_LevelOverFailed_55 extends MovieClip {
public var buttons_mc:MovieClip;
public var bannerAd_mc:MovieClip;
public var continueFailed_btn:SimpleButton;
public var richList:TextField;
}
}//package worldofconfusion_organicBlank_fla
Section 45
//menu_LevelSelect_24 (worldofconfusion_organicBlank_fla.menu_LevelSelect_24)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menu_LevelSelect_24 extends MovieClip {
public var home_btn:SimpleButton;
public var buttons_mc:MovieClip;
public var LevelButtonHolder_mc:MovieClip;
public var rightArrow_btn:SimpleButton;
public var totalScore:TextField;
public var worldRank:TextField;
public var leftArrow_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 46
//menu_LevelSelectPlayButton_8 (worldofconfusion_organicBlank_fla.menu_LevelSelectPlayButton_8)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class menu_LevelSelectPlayButton_8 extends MovieClip {
public function menu_LevelSelectPlayButton_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 47
//menu_MainMenu_16 (worldofconfusion_organicBlank_fla.menu_MainMenu_16)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class menu_MainMenu_16 extends MovieClip {
public var enterCompetition_btn:SimpleButton;
public var share_btn:SimpleButton;
public var playGame_btn:SimpleButton;
public var playMoreGames_btn:SimpleButton;
public var addToFacebook_btn:SimpleButton;
public var highScores_btn:SimpleButton;
public var logo_mc:MovieClip;
public var playGame1_btn:SimpleButton;
public var inviteFriends_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 48
//menu_ShareGame_38 (worldofconfusion_organicBlank_fla.menu_ShareGame_38)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class menu_ShareGame_38 extends MovieClip {
public var home_btn:SimpleButton;
public var shareMySpace_btn:SimpleButton;
public var shareTwitter_btn:SimpleButton;
public var shareDigg_btn:SimpleButton;
public var addToFacebook_btn:SimpleButton;
public var highScores_btn:SimpleButton;
public var shareStumbleUpon_btn:SimpleButton;
public var addToFacebookLarge_btn:SimpleButton;
public var shareDelicious_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 49
//menu_Transition_60 (worldofconfusion_organicBlank_fla.menu_Transition_60)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class menu_Transition_60 extends MovieClip {
public function menu_Transition_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 50
//menus_GameOverlay_68 (worldofconfusion_organicBlank_fla.menus_GameOverlay_68)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class menus_GameOverlay_68 extends MovieClip {
public var mute_btn:MovieClip;
public var visitConfusedBig_btn:SimpleButton;
public var visitKoko_btn:SimpleButton;
public var visitConfused_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 51
//MOV_MENU_LEVELINTRO_56 (worldofconfusion_organicBlank_fla.MOV_MENU_LEVELINTRO_56)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MOV_MENU_LEVELINTRO_56 extends MovieClip {
public var bodsToSave:TextField;
public var continueGame_btn:SimpleButton;
public var level:TextField;
public var bodPoints:TextField;
}
}//package worldofconfusion_organicBlank_fla
Section 52
//mov_popup_banners_51 (worldofconfusion_organicBlank_fla.mov_popup_banners_51)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class mov_popup_banners_51 extends MovieClip {
public var addToFacebook_btn:SimpleButton;
public var visitConfused1_btn:SimpleButton;
public var bookmark_btn:SimpleButton;
public function mov_popup_banners_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 53
//MOV_POPUP_BUTTONS_49 (worldofconfusion_organicBlank_fla.MOV_POPUP_BUTTONS_49)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class MOV_POPUP_BUTTONS_49 extends MovieClip {
public var replayLevel_btn:SimpleButton;
public var enterCompetition_btn:SimpleButton;
public var addToFacebook_btn:SimpleButton;
public var share1_btn:SimpleButton;
public var inviteFriends_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 54
//mutebtn_73 (worldofconfusion_organicBlank_fla.mutebtn_73)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class mutebtn_73 extends MovieClip {
public function mutebtn_73(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 55
//quitConfirmation_62 (worldofconfusion_organicBlank_fla.quitConfirmation_62)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class quitConfirmation_62 extends MovieClip {
public var yes_btn:SimpleButton;
public var no_btn:SimpleButton;
}
}//package worldofconfusion_organicBlank_fla
Section 56
//spriteDump_4 (worldofconfusion_organicBlank_fla.spriteDump_4)
package worldofconfusion_organicBlank_fla {
import flash.display.*;
public dynamic class spriteDump_4 extends MovieClip {
public function spriteDump_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package worldofconfusion_organicBlank_fla
Section 57
//BearTrap (BearTrap)
package {
import flash.display.*;
public dynamic class BearTrap extends BitmapData {
public function BearTrap(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 58
//BlueBodFalling (BlueBodFalling)
package {
import flash.display.*;
public dynamic class BlueBodFalling extends BitmapData {
public function BlueBodFalling(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 59
//BlueBodPop (BlueBodPop)
package {
import flash.display.*;
public dynamic class BlueBodPop extends BitmapData {
public function BlueBodPop(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 60
//BlueBodTeleport (BlueBodTeleport)
package {
import flash.display.*;
public dynamic class BlueBodTeleport extends BitmapData {
public function BlueBodTeleport(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 61
//BlueBodWalking (BlueBodWalking)
package {
import flash.display.*;
public dynamic class BlueBodWalking extends BitmapData {
public function BlueBodWalking(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 62
//BlueExit (BlueExit)
package {
import flash.display.*;
public dynamic class BlueExit extends BitmapData {
public function BlueExit(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 63
//Bod (Bod)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import console.bitmapAnimation.*;
import console.sounds.*;
public class Bod extends MovieClip {
private var _intFallingCount:int;// = 0
private var _intMaxSpeedY;// = 6
private var _intDelay:int;
private var _intSpeedX:Number;// = 3
private var _arrCollisionColours;
private var _bmpSequenceTeleportInLeft:BitmapSequence;
private var _intSpeedY;// = 0
private var _isFalling:Boolean;// = false
private var _bmpSequenceTeleportOutRight:BitmapSequence;
private var _bmpSequenceTeleportInRight:BitmapSequence;
private var _bmpSequenceFallRight:BitmapSequence;
private var _isBlown:Boolean;// = false
private var _bmpWalkSequenceLeft:BitmapSequence;
private var _intWallHeightOffset:int;// = 8
private var _bodColour:BodAnimation;
private var _strTeleportColour:String;
private var _isBodTeleportAllowed:Boolean;// = true
private var _isTeleportingIn:Boolean;// = false
private var _isTeleportingOut:Boolean;// = false
private var _bmpSequenceTeleportOutLeft:BitmapSequence;
private var _bmpSequencePerishRight:BitmapSequence;
private var _arrCollisionColoursFan;
private var _intColourID:int;// = 1
private var _isTeleporting:Boolean;// = false
private var _intTeleportCount:int;// = 0
private var _arrWalkSequence:Array;
private var _bmpWalkSequenceRight:BitmapSequence;
private var _intTempX:Number;// = 0
private var _intTempY:Number;// = 0
private var _classCollisionDetection:CollisionDetection;
private var _isDead:Boolean;// = false
private var _bmpSequenceFallLeft:BitmapSequence;
private var _bmpSequencePerishLeft:BitmapSequence;
private var _collisonBlit:BitmapData;
private var _intTimer:int;
private var _bmpWalkData:BitmapData;
private static var _intBodsKilled:int = 0;
private static var _bmpBodsData:BitmapData;
private static var _intGravity:Number = 1;
private static var _strButtonFiredColour = "";
private static var _intTotalNeeded:int = 0;
private static var _isPaused:Boolean = false;
private static var _intSpeedXStart:Number = 3;
private static var _intTriggerFiredColour = "";
private static var _intTotalBods:int = 0;
private static var _isAllBodsKilled:Boolean = false;
private static var _intBodsSaved:int = 0;
private static var _intTeleportPoint1:Point;
private static var _intTeleportPoint2:Point;
private static var _intTeleportPoint3:Point;
private static var _intTeleportPoint4:Point;
public function Bod(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6):void{
_arrCollisionColours = new Array("0", "ff0000");
_arrCollisionColoursFan = new Array("0");
_classCollisionDetection = new CollisionDetection();
_intTempX = 0;
_intTempY = 0;
_intSpeedY = 0;
_intMaxSpeedY = 6;
_intWallHeightOffset = 8;
_intSpeedX = 3;
_isFalling = false;
_intFallingCount = 0;
_isDead = false;
_intColourID = 1;
_isBodTeleportAllowed = true;
_isTeleporting = false;
_isTeleportingOut = false;
_isTeleportingIn = false;
_isBlown = false;
_intTeleportCount = 0;
super();
_intSpeedX = _intSpeedXStart;
if (Math.random() > 0.5){
_intSpeedX = (_intSpeedX * -1);
};
_bodColour = _arg6;
_intColourID = _bodColour.colourID;
_bmpBodsData = _arg2;
_bmpWalkSequenceRight = new BitmapSequence(_bodColour.arrWalkSequenceRight, 60);
_bmpWalkSequenceLeft = new BitmapSequence(_bodColour.arrWalkSequenceLeft, 60);
_bmpSequenceFallRight = new BitmapSequence(_bodColour.arrSequenceFallingRight, 60);
_bmpSequenceFallLeft = new BitmapSequence(_bodColour.arrSequenceFallingLeft, 60);
_bmpSequencePerishLeft = new BitmapSequence(_bodColour.arrSequencePerishLeft, 30);
_bmpSequencePerishRight = new BitmapSequence(_bodColour.arrSequencePerishRight, 30);
_bmpSequenceTeleportOutLeft = new BitmapSequence(_bodColour.arrSequenceTeleportOutLeft, 30);
_bmpSequenceTeleportOutRight = new BitmapSequence(_bodColour.arrSequenceTeleportOutRight, 30);
_bmpSequenceTeleportInLeft = new BitmapSequence(_bodColour.arrSequenceTeleportInLeft, 30);
_bmpSequenceTeleportInRight = new BitmapSequence(_bodColour.arrSequenceTeleportInRight, 30);
_intDelay = _arg3;
_collisonBlit = _arg1;
_intTempX = (this.x = _arg4);
_intTempY = (this.y = _arg5);
_classCollisionDetection.collisionBlitMap = _collisonBlit;
addEventListener(Event.ENTER_FRAME, releaseBod);
}
private function reAllowTeleport(_arg1:Event){
if (!Main.isPaused){
_intTeleportCount++;
};
if (_intTeleportCount > 90){
_isBodTeleportAllowed = true;
removeEventListener(Event.ENTER_FRAME, reAllowTeleport);
};
}
public function moveBod(_arg1:Event):void{
if (((((!(Main.isPaused)) && (!(_isDead)))) && (!(_isTeleporting)))){
if (_intSpeedY < _intMaxSpeedY){
_intSpeedY = (_intSpeedY + _intGravity);
};
if ((((_intSpeedY < 0)) && (!(_isBlown)))){
_intSpeedY = 0;
};
_intTempX = (_intTempX + _intSpeedX);
_intTempY = (_intTempY + _intSpeedY);
checkCollisions();
checkAlternativeCollisions();
this.x = _intTempX;
this.y = _intTempY;
if (this.y < 0){
killBod();
};
};
if (_isAllBodsKilled){
killBod();
};
animateBod();
}
public function releaseBod(_arg1:Event){
if (!Main.isPaused){
_intTimer++;
if (_intTimer >= (_intDelay + 20)){
removeEventListener(Event.ENTER_FRAME, releaseBod);
addEventListener(Event.ENTER_FRAME, moveBod);
};
};
if (_isAllBodsKilled){
removeEventListener(Event.ENTER_FRAME, releaseBod);
};
}
private function teleportBod(){
var _local1:Point;
SoundUtils.playSFX("sfxTeleportOut", false, 0, 0, true);
switch (_strTeleportColour){
case "9900ff":
_local1 = _intTeleportPoint1;
break;
case "9933ff":
_local1 = _intTeleportPoint2;
break;
case "9966ff":
_local1 = _intTeleportPoint3;
break;
case "9999ff":
_local1 = _intTeleportPoint4;
break;
};
_intTempX = _local1.x;
_intTempY = _local1.y;
this.x = _local1.x;
this.y = _local1.y;
_isTeleportingIn = true;
_isTeleportingOut = false;
_intTeleportCount = 0;
addEventListener(Event.ENTER_FRAME, reAllowTeleport, false, 0, true);
}
private function checkCollisions():void{
var _local1:*;
var _local2:*;
var _local3:Point;
var _local4:Point;
var _local5:*;
var _local6:*;
var _local7:Point;
var _local8:Point;
var _local9:Point;
var _local10:*;
_local1 = true;
_local2 = true;
if (_intSpeedX < 0){
_local1 = false;
};
if (_intSpeedY < 0){
_local2 = false;
};
_local3 = _classCollisionDetection.checkCollisionYAxis(this.x, (this.y - 2), _intTempY, _arrCollisionColours, _local2);
if (_local3.y != 0.1){
_intFallingCount = 0;
_isFalling = false;
_local4 = _classCollisionDetection.checkCollisionXAxis((_local3.y - 1), this.x, _intTempX, _arrCollisionColours, _local1);
_intTempY = _local3.y;
if (_local4.x != 0.1){
_intTempX = _local4.x;
_local5 = (_intTempY - _intWallHeightOffset);
_local6 = _classCollisionDetection.getColourAtPoint(new Point(_intTempX, _local5));
if (((!((_local6 == "0"))) && ((_intSpeedY >= 0)))){
_local7 = _classCollisionDetection.checkCollisionYAxis(_intTempX, _local5, _intTempY, _arrCollisionColours);
_intTempY = _local7.y;
_isBlown = false;
_intSpeedY = 0;
} else {
_intSpeedX = (_intSpeedX * -1);
_intTempX = (_intTempX + _intSpeedX);
};
};
} else {
if (!_isBlown){
if (_intFallingCount >= 6){
_isFalling = true;
};
_intFallingCount++;
_intTempX = this.x;
} else {
_local8 = _classCollisionDetection.checkCollisionYAxis(this.x, (this.y - 50), (_intTempY - 70), _arrCollisionColoursFan, false);
_local9 = _classCollisionDetection.checkCollisionYAxis(_intTempX, (this.y - 50), (_intTempY - 70), _arrCollisionColoursFan, false);
if (_local8.y != 0.1){
if (_local9.y > (_local8.y + 2)){
_intSpeedX = (_intSpeedX * -1);
_intTempX = (_intTempX + _intSpeedX);
};
_intTempY = (_local8.y + 70);
};
_local10 = _classCollisionDetection.getColourAtPoint(new Point(_intTempX, (_intTempY - 60)));
if (_local10 == "ff0000"){
killBod();
};
};
};
}
private function playAnimation(_arg1:BitmapSequence, _arg2:Array){
var _local3:*;
var _local4:*;
checkAnimationPlaying(_arg1, _arg2);
_local3 = _arg1.bitmapData;
_local4 = new Point((_intTempX - 22), ((_intTempY - _local3.height) + 3));
_bmpBodsData.copyPixels(_local3, _local3.rect, _local4, null, null, true);
}
private function checkAlternativeCollisions():void{
var _local1:*;
var _local2:*;
_local1 = _classCollisionDetection.getColourAtPoint(new Point(_intTempX, (_intTempY - 2)));
_local2 = _classCollisionDetection.getColourAtPoint(new Point(_intTempX, (_intTempY + 1)));
switch (_local1){
case "ffcc00":
if (_intColourID == 1){
saveBod();
};
break;
case "cc0000":
if (_intColourID == 2){
saveBod();
};
break;
case "3300ff":
if (_intColourID == 3){
saveBod();
};
break;
case "33cc66":
if (_intColourID == 4){
saveBod();
};
break;
case "9900ff":
case "9933ff":
case "9966ff":
case "9999ff":
if (_isBodTeleportAllowed){
SoundUtils.playSFX("sfxTeleportIn", false, 0, 0, true);
_strTeleportColour = _local1;
_isBodTeleportAllowed = false;
_isTeleportingOut = true;
_isTeleporting = true;
};
break;
case "3366ff":
case "3366cc":
case "336699":
case "336666":
SoundUtils.playSFX("sfxSwitchOn");
_intTriggerFiredColour = _local1;
break;
case "9900cc":
case "9933cc":
SoundUtils.playSFX("sfxSwitchOn");
_strButtonFiredColour = _local1;
break;
case "ccff00":
_intSpeedY = -10;
_isBlown = true;
break;
};
switch (_local2){
case "ff0000":
killBod();
break;
};
}
private function saveBod():void{
var _local1:int;
_local1 = Math.ceil((Math.random() * 2));
SoundUtils.playSFX(("sfxYipee" + _local1), false, 0, 0, true);
_intBodsSaved++;
destroy();
}
private function stopAllAnimations(){
_bmpWalkSequenceRight.stop();
_bmpWalkSequenceLeft.stop();
_bmpSequenceFallLeft.stop();
_bmpSequenceFallRight.stop();
_bmpSequencePerishLeft.stop();
_bmpSequencePerishRight.stop();
_bmpSequenceTeleportInLeft.stop();
_bmpSequenceTeleportInRight.stop();
_bmpSequenceTeleportOutLeft.stop();
_bmpSequenceTeleportOutRight.stop();
}
private function animateBod(){
if (((!(_isDead)) && (!(_isTeleporting)))){
if (((_isFalling) || (_isBlown))){
if (_intSpeedX >= 0){
playAnimation(_bmpSequenceFallRight, _bodColour.arrSequenceFallingRight);
} else {
playAnimation(_bmpSequenceFallLeft, _bodColour.arrSequenceFallingLeft);
};
};
if ((((((_intSpeedX >= 0)) && (!(_isFalling)))) && (!(_isBlown)))){
playAnimation(_bmpWalkSequenceRight, _bodColour.arrWalkSequenceRight);
} else {
if ((((((_intSpeedX < 0)) && (!(_isFalling)))) && (!(_isBlown)))){
playAnimation(_bmpWalkSequenceLeft, _bodColour.arrWalkSequenceLeft);
};
};
} else {
if (_intSpeedX >= 0){
if (_isDead){
playAnimation(_bmpSequencePerishRight, _bodColour.arrSequencePerishRight);
} else {
if (_isTeleportingOut){
playAnimation(_bmpSequenceTeleportOutRight, _bodColour.arrSequenceTeleportOutRight);
} else {
if (_isTeleportingIn){
playAnimation(_bmpSequenceTeleportInRight, _bodColour.arrSequenceTeleportInRight);
};
};
};
} else {
if (_isDead){
playAnimation(_bmpSequencePerishLeft, _bodColour.arrSequencePerishLeft);
} else {
if (_isTeleportingOut){
playAnimation(_bmpSequenceTeleportOutLeft, _bodColour.arrSequenceTeleportOutLeft);
} else {
if (_isTeleportingIn){
playAnimation(_bmpSequenceTeleportInLeft, _bodColour.arrSequenceTeleportInLeft);
};
};
};
};
};
}
private function endTeleport(){
_isTeleportingIn = false;
_isTeleporting = false;
}
private function checkAnimationPlaying(_arg1:BitmapSequence, _arg2){
var _local3:*;
if (Main.isPaused){
stopAllAnimations();
} else {
if (!_arg1.isPlaying){
stopAllAnimations();
_local3 = Math.ceil((Math.random() * _arg2.length));
if (((_isDead) || (_isTeleporting))){
if (_isDead){
if ((_arg1.currentFrame == 1)){
_arg1.playOnce();
} else {
destroy();
};
};
if (_isTeleporting){
_arg1.playOnce();
};
} else {
_arg1.gotoAndPlay(_local3);
};
};
if (((_isTeleportingOut) && ((_arg1.currentFrame == _arg2.length)))){
teleportBod();
} else {
if (((_isTeleportingIn) && ((_arg1.currentFrame == _arg2.length)))){
endTeleport();
};
};
};
}
private function killBod():void{
SoundUtils.playSFX("sfxCharacterDie", false, 0, 0, true);
_isDead = true;
_intBodsKilled++;
destroy();
}
private function destroy():void{
stopAllAnimations();
removeEventListener(Event.ENTER_FRAME, moveBod);
}
public static function set strFireTriggerColour(_arg1):void{
_intTriggerFiredColour = _arg1;
}
public static function set speed(_arg1):void{
_intSpeedXStart = _arg1;
}
public static function set teleportPoint1(_arg1:Point){
_intTeleportPoint1 = _arg1;
}
public static function get intKilled():int{
return (_intBodsKilled);
}
public static function set intTotalNeeded(_arg1):void{
_intTotalNeeded = _arg1;
}
public static function get intTotal():int{
return (_intTotalBods);
}
public static function set killAllBods(_arg1):void{
_isAllBodsKilled = _arg1;
}
public static function set teleportPoint2(_arg1:Point){
_intTeleportPoint2 = _arg1;
}
public static function set teleportPoint3(_arg1:Point){
_intTeleportPoint3 = _arg1;
}
public static function get strFireTriggerColour():String{
return (_intTriggerFiredColour);
}
public static function set teleportPoint4(_arg1:Point){
_intTeleportPoint4 = _arg1;
}
public static function set intKilled(_arg1):void{
_intBodsKilled = _arg1;
}
public static function get intTotalNeeded():int{
return (_intTotalNeeded);
}
public static function get strButtonFiredColour():String{
return (_strButtonFiredColour);
}
public static function get intSaved():int{
return (_intBodsSaved);
}
public static function set strButtonFiredColour(_arg1):void{
_strButtonFiredColour = _arg1;
}
public static function set intSaved(_arg1):void{
_intBodsSaved = _arg1;
}
public static function set intTotal(_arg1):void{
_intTotalBods = _arg1;
}
}
}//package
Section 64
//BodAnimation (BodAnimation)
package {
import flash.display.*;
import console.bitmapAnimation.*;
public class BodAnimation {
private var _bmpFallData:BitmapData;
private var _arrSequenceTeleportInRight:Array;
private var _arrSequencePerishLeft:Array;
private var _arrSequenceTeleportOutLeft:Array;
private var _arrWalkSequenceRight:Array;
private var _arrWalkSequenceLeft:Array;
private var _arrSequencePerishRight:Array;
private var _bmpTeleportData:BitmapData;
private var _arrSequenceTeleportOutRight:Array;
private var _arrSequenceFallingLeft:Array;
private var _bmpPopData:BitmapData;
private var _arrSequenceFallingRight:Array;
private var _bmpWalkData:BitmapData;
private var _arrSequenceTeleportInLeft:Array;
private var _intColourID;// = 1
public function BodAnimation(){
_intColourID = 1;
super();
}
public function get arrSequencePerishRight():Array{
return (_arrSequencePerishRight);
}
public function get arrSequenceTeleportInRight():Array{
return (_arrSequenceTeleportInRight);
}
public function get arrSequenceFallingRight():Array{
return (_arrSequenceFallingRight);
}
public function get arrSequenceTeleportInLeft():Array{
return (_arrSequenceTeleportInLeft);
}
public function get arrSequencePerishLeft():Array{
return (_arrSequencePerishLeft);
}
public function get arrSequenceFallingLeft():Array{
return (_arrSequenceFallingLeft);
}
public function get arrWalkSequenceLeft():Array{
return (_arrWalkSequenceLeft);
}
public function buildBodAnimation(_arg1){
_intColourID = _arg1;
switch (_arg1){
case 1:
_bmpWalkData = new YellowBodWalking(0, 0);
_bmpFallData = new YellowBodFalling(0, 0);
_bmpPopData = new YellowBodPop(0, 0);
_bmpTeleportData = new YellowBodTeleport(0, 0);
break;
case 2:
_bmpWalkData = new RedBodWalking(0, 0);
_bmpFallData = new RedBodFalling(0, 0);
_bmpPopData = new RedBodPop(0, 0);
_bmpTeleportData = new RedBodTeleport(0, 0);
break;
case 3:
_bmpWalkData = new BlueBodWalking(0, 0);
_bmpFallData = new BlueBodFalling(0, 0);
_bmpPopData = new BlueBodPop(0, 0);
_bmpTeleportData = new BlueBodTeleport(0, 0);
break;
case 4:
_bmpWalkData = new GreenBodWalking(0, 0);
_bmpFallData = new GreenBodFalling(0, 0);
_bmpPopData = new GreenBodPop(0, 0);
_bmpTeleportData = new GreenBodTeleport(0, 0);
break;
};
_arrWalkSequenceRight = BitmapSequenceBuilder.sequence(_bmpWalkData, 45, 70, 32);
_arrWalkSequenceLeft = BitmapSequenceBuilder.resequenceScale(_arrWalkSequenceRight, -1, 1);
_arrSequenceFallingRight = BitmapSequenceBuilder.sequence(_bmpFallData, 45, 70, 6);
_arrSequenceFallingLeft = BitmapSequenceBuilder.resequenceScale(_arrSequenceFallingRight, -1, 1);
_arrSequencePerishRight = BitmapSequenceBuilder.sequence(_bmpPopData, 45, 70, 10);
_arrSequencePerishLeft = BitmapSequenceBuilder.resequenceScale(_arrSequencePerishRight, -1, 1);
_arrSequenceTeleportOutRight = BitmapSequenceBuilder.sequence(_bmpTeleportData, 45, 70, 10);
_arrSequenceTeleportOutLeft = BitmapSequenceBuilder.resequenceScale(_arrSequenceTeleportOutRight, -1, 1);
_arrSequenceTeleportInRight = _arrSequenceTeleportOutRight.concat().reverse();
_arrSequenceTeleportInLeft = _arrSequenceTeleportOutLeft.concat().reverse();
}
public function get colourID():int{
return (_intColourID);
}
public function get arrSequenceTeleportOutLeft():Array{
return (_arrSequenceTeleportOutLeft);
}
public function get arrWalkSequenceRight():Array{
return (_arrWalkSequenceRight);
}
public function get arrSequenceTeleportOutRight():Array{
return (_arrSequenceTeleportOutRight);
}
}
}//package
Section 65
//Brush (Brush)
package {
import flash.display.*;
public dynamic class Brush extends BitmapData {
public function Brush(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 66
//ButtonOff (ButtonOff)
package {
import flash.display.*;
public dynamic class ButtonOff extends BitmapData {
public function ButtonOff(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 67
//ButtonOn (ButtonOn)
package {
import flash.display.*;
public dynamic class ButtonOn extends BitmapData {
public function ButtonOn(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 68
//CollisionBearTrap (CollisionBearTrap)
package {
import flash.display.*;
public dynamic class CollisionBearTrap extends BitmapData {
public function CollisionBearTrap(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 69
//CollisionDetection (CollisionDetection)
package {
import flash.display.*;
import flash.geom.*;
public class CollisionDetection extends Sprite {
private var _localMC:DisplayObject;
private var _isPointConverted:Boolean;// = false
private var _isDebug:Boolean;// = false
private var _collisionBlitMap:BitmapData;
private var _targetMC:DisplayObject;
private var _debugShape:Shape;
public function CollisionDetection(){
_debugShape = new Shape();
_isDebug = false;
_isPointConverted = false;
super();
addChild(_debugShape);
}
public function getColourAtPoint(_arg1:Point):String{
var _local2:String;
var _local3:*;
var _local4:*;
_local2 = "";
if (_isPointConverted){
_local3 = _localMC.localToGlobal(_arg1);
_local4 = _targetMC.globalToLocal(_local3);
_local2 = _collisionBlitMap.getPixel(_local4.x, _local4.y).toString(16);
} else {
_local2 = _collisionBlitMap.getPixel(_arg1.x, _arg1.y).toString(16);
};
return (_local2);
}
public function set collisionBlitMap(_arg1):void{
_collisionBlitMap = _arg1;
}
public function checkCollisionXAxis(_arg1:Number, _arg2:int, _arg3:int, _arg4:Array, _arg5:Boolean=true):Point{
var _local6:Boolean;
var _local7:Point;
var _local8:int;
_local6 = false;
_local7 = null;
_local8 = _arg2;
if (_arg5){
_local8 = _arg2;
while (_local8 < _arg3) {
if (!_local6){
_local7 = new Point(_local8, _arg1);
_local6 = checkPointCollision(_local7, _arg4);
};
_local8++;
};
} else {
_local8 = _arg2;
while (_local8 > _arg3) {
if (!_local6){
_local7 = new Point(_local8, _arg1);
_local6 = checkPointCollision(_local7, _arg4);
};
_local8--;
};
};
if (!_local6){
_local7 = new Point(0.1, 0.1);
};
return (_local7);
}
public function set localMC(_arg1):void{
_localMC = _arg1;
}
public function set debug(_arg1):void{
_isDebug = _arg1;
_debugShape.graphics.clear();
}
public function checkPointCollision(_arg1:Point, _arg2:Array):Object{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = false;
_local4 = _arg2.length;
_local5 = getColourAtPoint(_arg1);
_local6 = 0;
while (_local6 < _local4) {
if (_local5 == _arg2[_local6]){
if (_isDebug){
_debugShape.graphics.beginFill(0xFF0000);
_debugShape.graphics.drawCircle(_arg1.x, _arg1.y, 2);
_debugShape.graphics.endFill();
};
_local3 = true;
};
_local6++;
};
return (_local3);
}
public function set targetMC(_arg1):void{
_targetMC = _arg1;
}
public function checkCollisionYAxis(_arg1:Number, _arg2:int, _arg3:int, _arg4:Array, _arg5:Boolean=true):Point{
var _local6:Boolean;
var _local7:Point;
var _local8:int;
_local6 = false;
_local7 = null;
_local8 = _arg2;
if (_arg5){
_local8 = _arg2;
while (_local8 < _arg3) {
if (!_local6){
_local7 = new Point(_arg1, _local8);
_local6 = checkPointCollision(_local7, _arg4);
};
_local8++;
};
} else {
_local8 = _arg2;
while (_local8 > _arg3) {
if (!_local6){
_local7 = new Point(_arg1, _local8);
_local6 = checkPointCollision(_local7, _arg4);
};
_local8--;
};
};
if (!_local6){
_local7 = new Point(0.1, 0.1);
};
return (_local7);
}
}
}//package
Section 70
//CollisionExitBlue (CollisionExitBlue)
package {
import flash.display.*;
public dynamic class CollisionExitBlue extends BitmapData {
public function CollisionExitBlue(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 71
//CollisionExitGreen (CollisionExitGreen)
package {
import flash.display.*;
public dynamic class CollisionExitGreen extends BitmapData {
public function CollisionExitGreen(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 72
//CollisionExitRed (CollisionExitRed)
package {
import flash.display.*;
public dynamic class CollisionExitRed extends BitmapData {
public function CollisionExitRed(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 73
//CollisionExitYellow (CollisionExitYellow)
package {
import flash.display.*;
public dynamic class CollisionExitYellow extends BitmapData {
public function CollisionExitYellow(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 74
//CollisionFire (CollisionFire)
package {
import flash.display.*;
public dynamic class CollisionFire extends BitmapData {
public function CollisionFire(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 75
//CollisionSaw (CollisionSaw)
package {
import flash.display.*;
public dynamic class CollisionSaw extends BitmapData {
public function CollisionSaw(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 76
//CollisionSpikes (CollisionSpikes)
package {
import flash.display.*;
public dynamic class CollisionSpikes extends BitmapData {
public function CollisionSpikes(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 77
//CollisionTeleport1 (CollisionTeleport1)
package {
import flash.display.*;
public dynamic class CollisionTeleport1 extends BitmapData {
public function CollisionTeleport1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 78
//CollisionTeleport2 (CollisionTeleport2)
package {
import flash.display.*;
public dynamic class CollisionTeleport2 extends BitmapData {
public function CollisionTeleport2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 79
//CollisionTeleport3 (CollisionTeleport3)
package {
import flash.display.*;
public dynamic class CollisionTeleport3 extends BitmapData {
public function CollisionTeleport3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 80
//CollisionTeleport4 (CollisionTeleport4)
package {
import flash.display.*;
public dynamic class CollisionTeleport4 extends BitmapData {
public function CollisionTeleport4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 81
//CollisionWater (CollisionWater)
package {
import flash.display.*;
public dynamic class CollisionWater extends BitmapData {
public function CollisionWater(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 82
//Fan (Fan)
package {
import flash.display.*;
public dynamic class Fan extends BitmapData {
public function Fan(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 83
//Fire (Fire)
package {
import flash.display.*;
public dynamic class Fire extends BitmapData {
public function Fire(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 84
//GreenBodFalling (GreenBodFalling)
package {
import flash.display.*;
public dynamic class GreenBodFalling extends BitmapData {
public function GreenBodFalling(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 85
//GreenBodPop (GreenBodPop)
package {
import flash.display.*;
public dynamic class GreenBodPop extends BitmapData {
public function GreenBodPop(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 86
//GreenBodTeleport (GreenBodTeleport)
package {
import flash.display.*;
public dynamic class GreenBodTeleport extends BitmapData {
public function GreenBodTeleport(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 87
//GreenBodWalking (GreenBodWalking)
package {
import flash.display.*;
public dynamic class GreenBodWalking extends BitmapData {
public function GreenBodWalking(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 88
//GreenExit (GreenExit)
package {
import flash.display.*;
public dynamic class GreenExit extends BitmapData {
public function GreenExit(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 89
//Ink (Ink)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import console.math.*;
public class Ink extends Sprite {
private var _intBrushSize:int;// = 2
private var _bmpBrush:BitmapData;
private var _intY:int;
private var _intBrushOffset:Number;// = 1
private var _bmpInk:BitmapData;
private var _intX:int;
private var _bmpInkBlit:BitmapData;
private var _arrDrawPoints;
private var _intDiffY:Number;
private var _intDiffX:Number;
private var _bmpBrushAlias:BitmapData;
private var _inkCountdown;// = 0
private var _classCollisionDetection:CollisionDetection;
private var _intStrokePosition;// = 0
private static var _maxInkLevel = 1000;
private static var _inkTime = 450;
private static var _arrInkStrokes:Array;
private static var _inkLevel = 0;
public function Ink(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8):void{
_intBrushOffset = 1;
_intBrushSize = 2;
_arrDrawPoints = new Array();
_inkCountdown = 0;
_intStrokePosition = 0;
super();
_classCollisionDetection = _arg7;
_bmpInkBlit = _arg1;
_bmpInk = _arg2;
_intX = _arg3;
_intY = _arg4;
_intDiffX = _arg5;
_intDiffY = _arg6;
_bmpBrush = new BitmapData(_intBrushSize, _intBrushSize, false, 0);
_bmpBrushAlias = new Brush(0, 0);
drawStroke(true, true);
addEventListener(Event.ENTER_FRAME, inkCountdown, false, 0, true);
_arrInkStrokes.push(this);
}
private function removeStroke(){
var _local1:*;
var _local2:int;
var _local3:*;
_local1 = _arrDrawPoints.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = _arrDrawPoints[_local2];
render(_local3.x, _local3.y, false);
if (_inkLevel > 0){
_inkLevel--;
};
_local2++;
};
}
private function redrawStroke(_arg1:Event=null){
var _local2:*;
var _local3:int;
var _local4:*;
_local2 = _arrDrawPoints.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = _arrDrawPoints[_local3];
render(_local4.x, _local4.y, true);
_local3++;
};
}
private function render(_arg1, _arg2, _arg3){
_bmpInkBlit.copyPixels(_bmpBrush, _bmpBrush.rect, new Point(_arg1, _arg2));
_bmpInk.copyPixels(_bmpBrushAlias, _bmpBrushAlias.rect, new Point((_arg1 - 1), (_arg2 - 1)), null, null, _arg3);
}
private function removeInk():void{
_arrInkStrokes.splice(0, 1);
_bmpBrush = new BitmapData(_intBrushSize, _intBrushSize, true, 0xFF0000);
_bmpBrushAlias = new BitmapData(5, 5, true, 0);
removeStroke();
_bmpBrush = null;
_bmpBrushAlias = null;
_arrDrawPoints = null;
removeEventListener(Event.ENTER_FRAME, inkCountdown);
}
private function drawStroke(_arg1, _arg2):void{
var _local3:Number;
var _local4:*;
var _local5:int;
var _local6:*;
var _local7:*;
var _local8:Point;
var _local9:Point;
var _local10:*;
var _local11:*;
_local3 = Trig.findHypotenuseLength(_intDiffX, _intDiffY);
_local4 = Math.abs(_local3);
_local5 = 0;
while (_local5 <= _local4) {
_local6 = ((_intX + ((_intDiffX / _local4) * _local5)) - _intBrushOffset);
_local7 = ((_intY + ((_intDiffY / _local4) * _local5)) - _intBrushOffset);
_local8 = new Point((_local6 + _intBrushSize), (_local7 + _intBrushSize));
_local9 = new Point(_local6, _local7);
_local10 = _classCollisionDetection.getColourAtPoint(_local8);
_local11 = _classCollisionDetection.getColourAtPoint(_local9);
if (((((!((_local10 == "0"))) || (!((_local11 == "0"))))) || (!(_arg2)))){
if (_inkLevel < _maxInkLevel){
_inkLevel++;
render(_local6, _local7, _arg1);
_arrDrawPoints.push(new Point(_local6, _local7));
};
};
_local5++;
};
}
private function inkCountdown(_arg1:Event){
redrawStroke();
if (!Main.isPaused){
_inkCountdown++;
if (_inkCountdown >= _inkTime){
removeInk();
};
};
}
public static function set maxInkLevel(_arg1:int):void{
_maxInkLevel = _arg1;
}
public static function get maxInkLevel():int{
return (_maxInkLevel);
}
public static function buildInkStrokes(){
_arrInkStrokes = new Array();
}
public static function set inkLevel(_arg1:int):void{
_inkLevel = _arg1;
}
public static function get inkLevel():int{
return (_inkLevel);
}
}
}//package
Section 90
//Level1 (Level1)
package {
import flash.display.*;
public dynamic class Level1 extends BitmapData {
public function Level1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 91
//Level10 (Level10)
package {
import flash.display.*;
public dynamic class Level10 extends BitmapData {
public function Level10(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 92
//Level11 (Level11)
package {
import flash.display.*;
public dynamic class Level11 extends BitmapData {
public function Level11(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 93
//Level12 (Level12)
package {
import flash.display.*;
public dynamic class Level12 extends BitmapData {
public function Level12(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 94
//Level13 (Level13)
package {
import flash.display.*;
public dynamic class Level13 extends BitmapData {
public function Level13(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 95
//Level14 (Level14)
package {
import flash.display.*;
public dynamic class Level14 extends BitmapData {
public function Level14(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 96
//Level15 (Level15)
package {
import flash.display.*;
public dynamic class Level15 extends BitmapData {
public function Level15(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 97
//Level2 (Level2)
package {
import flash.display.*;
public dynamic class Level2 extends BitmapData {
public function Level2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 98
//Level3 (Level3)
package {
import flash.display.*;
public dynamic class Level3 extends BitmapData {
public function Level3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 99
//Level4 (Level4)
package {
import flash.display.*;
public dynamic class Level4 extends BitmapData {
public function Level4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 100
//Level5 (Level5)
package {
import flash.display.*;
public dynamic class Level5 extends BitmapData {
public function Level5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 101
//Level6 (Level6)
package {
import flash.display.*;
public dynamic class Level6 extends BitmapData {
public function Level6(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 102
//Level7 (Level7)
package {
import flash.display.*;
public dynamic class Level7 extends BitmapData {
public function Level7(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 103
//Level8 (Level8)
package {
import flash.display.*;
public dynamic class Level8 extends BitmapData {
public function Level8(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 104
//Level9 (Level9)
package {
import flash.display.*;
public dynamic class Level9 extends BitmapData {
public function Level9(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 105
//LevelBackground1 (LevelBackground1)
package {
import flash.display.*;
public dynamic class LevelBackground1 extends BitmapData {
public function LevelBackground1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 106
//LevelBackground10 (LevelBackground10)
package {
import flash.display.*;
public dynamic class LevelBackground10 extends BitmapData {
public function LevelBackground10(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 107
//LevelBackground11 (LevelBackground11)
package {
import flash.display.*;
public dynamic class LevelBackground11 extends BitmapData {
public function LevelBackground11(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 108
//LevelBackground12 (LevelBackground12)
package {
import flash.display.*;
public dynamic class LevelBackground12 extends BitmapData {
public function LevelBackground12(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 109
//LevelBackground13 (LevelBackground13)
package {
import flash.display.*;
public dynamic class LevelBackground13 extends BitmapData {
public function LevelBackground13(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 110
//LevelBackground14 (LevelBackground14)
package {
import flash.display.*;
public dynamic class LevelBackground14 extends BitmapData {
public function LevelBackground14(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 111
//LevelBackground15 (LevelBackground15)
package {
import flash.display.*;
public dynamic class LevelBackground15 extends BitmapData {
public function LevelBackground15(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 112
//LevelBackground2 (LevelBackground2)
package {
import flash.display.*;
public dynamic class LevelBackground2 extends BitmapData {
public function LevelBackground2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 113
//LevelBackground3 (LevelBackground3)
package {
import flash.display.*;
public dynamic class LevelBackground3 extends BitmapData {
public function LevelBackground3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 114
//LevelBackground4 (LevelBackground4)
package {
import flash.display.*;
public dynamic class LevelBackground4 extends BitmapData {
public function LevelBackground4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 115
//LevelBackground5 (LevelBackground5)
package {
import flash.display.*;
public dynamic class LevelBackground5 extends BitmapData {
public function LevelBackground5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 116
//LevelBackground6 (LevelBackground6)
package {
import flash.display.*;
public dynamic class LevelBackground6 extends BitmapData {
public function LevelBackground6(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 117
//LevelBackground7 (LevelBackground7)
package {
import flash.display.*;
public dynamic class LevelBackground7 extends BitmapData {
public function LevelBackground7(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 118
//LevelBackground8 (LevelBackground8)
package {
import flash.display.*;
public dynamic class LevelBackground8 extends BitmapData {
public function LevelBackground8(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 119
//LevelBackground9 (LevelBackground9)
package {
import flash.display.*;
public dynamic class LevelBackground9 extends BitmapData {
public function LevelBackground9(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 120
//LevelBlitmap1 (LevelBlitmap1)
package {
import flash.display.*;
public dynamic class LevelBlitmap1 extends BitmapData {
public function LevelBlitmap1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 121
//LevelBlitmap10 (LevelBlitmap10)
package {
import flash.display.*;
public dynamic class LevelBlitmap10 extends BitmapData {
public function LevelBlitmap10(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 122
//LevelBlitmap11 (LevelBlitmap11)
package {
import flash.display.*;
public dynamic class LevelBlitmap11 extends BitmapData {
public function LevelBlitmap11(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 123
//LevelBlitmap12 (LevelBlitmap12)
package {
import flash.display.*;
public dynamic class LevelBlitmap12 extends BitmapData {
public function LevelBlitmap12(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 124
//LevelBlitmap13 (LevelBlitmap13)
package {
import flash.display.*;
public dynamic class LevelBlitmap13 extends BitmapData {
public function LevelBlitmap13(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 125
//LevelBlitmap14 (LevelBlitmap14)
package {
import flash.display.*;
public dynamic class LevelBlitmap14 extends BitmapData {
public function LevelBlitmap14(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 126
//LevelBlitmap15 (LevelBlitmap15)
package {
import flash.display.*;
public dynamic class LevelBlitmap15 extends BitmapData {
public function LevelBlitmap15(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 127
//LevelBlitmap2 (LevelBlitmap2)
package {
import flash.display.*;
public dynamic class LevelBlitmap2 extends BitmapData {
public function LevelBlitmap2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 128
//LevelBlitmap3 (LevelBlitmap3)
package {
import flash.display.*;
public dynamic class LevelBlitmap3 extends BitmapData {
public function LevelBlitmap3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 129
//LevelBlitmap4 (LevelBlitmap4)
package {
import flash.display.*;
public dynamic class LevelBlitmap4 extends BitmapData {
public function LevelBlitmap4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 130
//LevelBlitmap5 (LevelBlitmap5)
package {
import flash.display.*;
public dynamic class LevelBlitmap5 extends BitmapData {
public function LevelBlitmap5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 131
//LevelBlitmap6 (LevelBlitmap6)
package {
import flash.display.*;
public dynamic class LevelBlitmap6 extends BitmapData {
public function LevelBlitmap6(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 132
//LevelBlitmap7 (LevelBlitmap7)
package {
import flash.display.*;
public dynamic class LevelBlitmap7 extends BitmapData {
public function LevelBlitmap7(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 133
//LevelBlitmap8 (LevelBlitmap8)
package {
import flash.display.*;
public dynamic class LevelBlitmap8 extends BitmapData {
public function LevelBlitmap8(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 134
//LevelBlitmap9 (LevelBlitmap9)
package {
import flash.display.*;
public dynamic class LevelBlitmap9 extends BitmapData {
public function LevelBlitmap9(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 135
//LevelElement (LevelElement)
package {
import flash.display.*;
import flash.geom.*;
import console.bitmapAnimation.*;
public class LevelElement {
private static var _arrLevelElements = new Array();
private static var _bmpCollisionBearTrap:BitmapData;
private static var _bmpBearTrapData:BitmapData;
private static var _arrSequenceBlueExit:Array;
private static var _bmpCollisionSaw:BitmapData;
private static var _bmpWaterData:BitmapData;
private static var _arrSequenceRedExit:Array;
private static var _bmpWind1Data:BitmapData;
private static var _bmpBlueExitData:BitmapData;
private static var _arrSequenceWater:Array;
private static var _bmpWind3Data:BitmapData;
private static var _arrSequenceFire:Array;
private static var _bmpTeleportData:BitmapData;
private static var _bmpCollisionExitYellow:BitmapData;
private static var _bmpCollisionSpikes:BitmapData;
private static var _bmpCollisionFire:BitmapData;
private static var _bmpLeverOn:BitmapData;
private static var _arrSequenceWind1:Array;
private static var _arrSequenceWind2:Array;
private static var _arrSequenceWind3:Array;
private static var _bmpCollisionWater:BitmapData;
private static var _arrSequenceSaw:Array;
private static var _bmpLeverOff:BitmapData;
private static var _arrSequenceGreenExit:Array;
private static var _bmpSawData:BitmapData;
private static var _arrSequenceYellowExit:Array;
private static var _arrSequenceFan:Array;
private static var _arrSequenceSpikes:Array;
private static var _arrSequenceBearTrap:Array;
private static var _bmpTeleportOff:BitmapData;
private static var _bmpTrapDoorData:BitmapData;
private static var _bmpFanData:BitmapData;
private static var _bmpCollisionTeleport2:BitmapData;
private static var _bmpCollisionTeleport3:BitmapData;
private static var _bmpCollisionTeleport4:BitmapData;
private static var _bmpButtonOff:BitmapData;
private static var _bmpCollisionTeleport1:BitmapData;
private static var _bmpCollisionExitBlue:BitmapData;
private static var _arrSequenceTrapDoor1:Array;
private static var _arrSequenceTrapDoor2:Array;
private static var _arrSequenceTeleport:Array;
private static var _arrSequenceTrapDoor4:Array;
private static var _bmpCollisionExitGreen:BitmapData;
private static var _arrSequenceTrapDoor3:Array;
private static var _bmpYellowExitData:BitmapData;
private static var _bmpSpikesData:BitmapData;
private static var _bmpCollisionExitRed:BitmapData;
private static var _bmpButtonOn:BitmapData;
private static var _bmpGreenExitData:BitmapData;
private static var _bmpFireData:BitmapData;
private static var _bmpWind2Data:BitmapData;
private static var _bmpRedExitData:BitmapData;
public function preBuildElements(){
_bmpBearTrapData = new BearTrap(0, 0);
_bmpYellowExitData = new YellowExit(0, 0);
_bmpRedExitData = new RedExit(0, 0);
_bmpBlueExitData = new BlueExit(0, 0);
_bmpGreenExitData = new GreenExit(0, 0);
_bmpFanData = new Fan(0, 0);
_bmpFireData = new Fire(0, 0);
_bmpSawData = new Saw(0, 0);
_bmpSpikesData = new Spikes(0, 0);
_bmpTeleportData = new Teleport(0, 0);
_bmpTrapDoorData = new Trapdoor(0, 0);
_bmpWaterData = new Water(0, 0);
_bmpLeverOff = new LeverOff(0, 0);
_bmpLeverOn = new LeverOn(0, 0);
_bmpTeleportOff = new TeleportOff(0, 0);
_bmpButtonOff = new ButtonOff(0, 0);
_bmpButtonOn = new ButtonOn(0, 0);
_bmpWind1Data = new Wind1(0, 0);
_bmpWind2Data = new Wind2(0, 0);
_bmpWind3Data = new Wind3(0, 0);
_arrSequenceBearTrap = BitmapSequenceBuilder.sequence(_bmpBearTrapData, 80, 48, 30);
_arrSequenceYellowExit = BitmapSequenceBuilder.sequence(_bmpYellowExitData, 80, 100, 8);
_arrSequenceRedExit = BitmapSequenceBuilder.sequence(_bmpRedExitData, 80, 100, 8);
_arrSequenceBlueExit = BitmapSequenceBuilder.sequence(_bmpBlueExitData, 80, 100, 8);
_arrSequenceGreenExit = BitmapSequenceBuilder.sequence(_bmpGreenExitData, 80, 100, 8);
_arrSequenceFan = BitmapSequenceBuilder.sequence(_bmpFanData, 58, 55, 14);
_arrSequenceFire = BitmapSequenceBuilder.sequence(_bmpFireData, 35, 45, 16);
_arrSequenceSaw = BitmapSequenceBuilder.sequence(_bmpSawData, 70, 70, 41);
_arrSequenceSpikes = BitmapSequenceBuilder.sequence(_bmpSpikesData, 40, 44, 100);
_arrSequenceTeleport = BitmapSequenceBuilder.sequence(_bmpTeleportData, 100, 110, 100);
_arrSequenceTrapDoor1 = BitmapSequenceBuilder.sequence(_bmpTrapDoorData, 155, 120, 27);
_arrSequenceTrapDoor2 = BitmapSequenceBuilder.sequence(_bmpTrapDoorData, 155, 120, 27);
_arrSequenceTrapDoor3 = BitmapSequenceBuilder.sequence(_bmpTrapDoorData, 155, 120, 27);
_arrSequenceTrapDoor4 = BitmapSequenceBuilder.sequence(_bmpTrapDoorData, 155, 120, 27);
_arrSequenceWater = BitmapSequenceBuilder.sequence(_bmpWaterData, 165, 18, 21);
_arrSequenceWind1 = BitmapSequenceBuilder.sequence(_bmpWind1Data, 15, 345, 40);
_arrSequenceWind2 = BitmapSequenceBuilder.sequence(_bmpWind2Data, 15, 345, 40);
_arrSequenceWind3 = BitmapSequenceBuilder.sequence(_bmpWind3Data, 15, 345, 40);
_bmpCollisionWater = new CollisionWater(0, 0);
_bmpCollisionTeleport1 = new CollisionTeleport1(0, 0);
_bmpCollisionTeleport2 = new CollisionTeleport2(0, 0);
_bmpCollisionTeleport3 = new CollisionTeleport3(0, 0);
_bmpCollisionTeleport4 = new CollisionTeleport4(0, 0);
_bmpCollisionSpikes = new CollisionSpikes(0, 0);
_bmpCollisionSaw = new CollisionSaw(0, 0);
_bmpCollisionExitYellow = new CollisionExitYellow(0, 0);
_bmpCollisionExitRed = new CollisionExitRed(0, 0);
_bmpCollisionExitGreen = new CollisionExitGreen(0, 0);
_bmpCollisionExitBlue = new CollisionExitBlue(0, 0);
_bmpCollisionBearTrap = new CollisionBearTrap(0, 0);
_bmpCollisionFire = new CollisionFire(0, 0);
}
public function clearElements(){
_arrLevelElements = new Array();
}
public function addWater(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Rectangle;
var _local9:Rectangle;
_local4 = Math.ceil((_arg3 / 165));
if (_arg3 >= 165){
_local5 = 0;
while (_local5 < _local4) {
_local6 = (_arg3 - (_local5 * 165));
_local7 = (_arg1 + (_local5 * 165));
if (_local6 >= 165){
addElementToLevel(12, _local7, _arg2);
} else {
_local8 = new Rectangle(0, 0, _local6, 18);
addElementToLevel(12, _local7, _arg2, false, true, null, _local8);
};
_local5++;
};
} else {
_local9 = new Rectangle(0, 0, _arg3, 18);
addElementToLevel(12, _arg1, _arg2, false, true, null, _local9);
};
}
public function addTeleport(_arg1, _arg2:int, _arg3:int){
var _local4:*;
addElementToLevel(10, _arg2, _arg3, false, false);
_local4 = (_arrLevelElements.length - 1);
_arrLevelElements[_local4].teleportID = _arg1;
switch (_arg1){
case 1:
Bod.teleportPoint2 = new Point((_arg2 + 50), (_arg3 + 105));
break;
case 2:
Bod.teleportPoint1 = new Point((_arg2 + 50), (_arg3 + 105));
break;
case 3:
Bod.teleportPoint4 = new Point((_arg2 + 50), (_arg3 + 105));
break;
case 4:
Bod.teleportPoint3 = new Point((_arg2 + 50), (_arg3 + 105));
break;
};
}
public function enableTeleport(_arg1){
var _local2:*;
_local2 = 0;
while (_local2 < _arrLevelElements.length) {
if (_arrLevelElements[_local2].teleportID == _arg1){
_arrLevelElements[_local2].bmpSequence = new BitmapSequence(_arrSequenceTeleport, 50);
_arrLevelElements[_local2].bmpSequence.gotoAndPlay(1);
switch (_arg1){
case 1:
_arrLevelElements[_local2].collisionMap = _bmpCollisionTeleport1;
break;
case 2:
_arrLevelElements[_local2].collisionMap = _bmpCollisionTeleport2;
break;
case 3:
_arrLevelElements[_local2].collisionMap = _bmpCollisionTeleport3;
break;
case 4:
_arrLevelElements[_local2].collisionMap = _bmpCollisionTeleport4;
break;
};
};
_local2++;
};
}
public function playTrapDoor(_arg1){
var _local2:*;
_local2 = 0;
while (_local2 < _arrLevelElements.length) {
if (_arrLevelElements[_local2].tid == _arg1){
_arrLevelElements[_local2].bmpSequence.playOnce();
};
if (_arrLevelElements[_local2].leverID == _arg1){
_arrLevelElements[_local2].bmpSequence.bitmapData = _bmpLeverOn;
_arrLevelElements[_local2].collisionMap = new BitmapData(37, 30, false, 0xFFFFFF);
};
_local2++;
};
}
public function addTrapDoorSwitch(_arg1, _arg2, _arg3){
var _local4:BitmapData;
var _local5:*;
switch (_arg1){
case 1:
_local4 = new BitmapData(37, 30, false, 3368703);
break;
case 2:
_local4 = new BitmapData(37, 30, false, 3368652);
break;
case 3:
_local4 = new BitmapData(37, 30, false, 3368601);
break;
case 4:
_local4 = new BitmapData(37, 30, false, 3368550);
break;
};
addElementToLevel(11, _arg2, _arg3, false, false, _local4);
_local5 = (_arrLevelElements.length - 1);
_arrLevelElements[_local5].leverID = _arg1;
}
public function switchTeleportButton(_arg1){
var _local2:*;
_local2 = 0;
while (_local2 < _arrLevelElements.length) {
if (_arrLevelElements[_local2].buttonID == _arg1){
_arrLevelElements[_local2].bmpSequence.bitmapData = _bmpButtonOn;
_arrLevelElements[_local2].collisionMap = new BitmapData(48, 25, false, 0xFFFFFF);
switch (_arg1){
case 1:
enableTeleport(1);
enableTeleport(2);
break;
case 2:
enableTeleport(3);
enableTeleport(4);
break;
};
};
_local2++;
};
}
public function addFan(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local7 = new BitmapData(_arg3, _arg4, false, 0xCCFF00);
addElementToLevel(18, _arg1, _arg2, false, false, _local7);
addElementToLevel(6, _arg5, _arg6, true);
_local8 = Math.floor((_arg3 / 15));
_local9 = 0;
while (_local9 < _local8) {
_local10 = (_arg1 + (_local9 * 15));
if (_arg4 < 345){
_local11 = (345 - _arg4);
_local12 = new Rectangle(0, _local11, 15, _arg4);
addElementToLevel(19, _local10, _arg2, false, true, null, _local12);
addElementToLevel(20, _local10, _arg2, false, true, null, _local12);
addElementToLevel(21, _local10, _arg2, false, true, null, _local12);
} else {
_local13 = (_arg6 - 345);
addElementToLevel(19, _local10, _local13);
addElementToLevel(20, _local10, _local13);
addElementToLevel(21, _local10, _local13);
};
_local9++;
};
}
public function addElementToLevel(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean=false, _arg5:Boolean=true, _arg6:BitmapData=null, _arg7:Rectangle=null){
var _local8:Object;
var _local9:BitmapData;
var _local10:*;
var _local11:BitmapData;
_local8 = new Object();
_local9 = _arg6;
_local8.sound = "";
_local8.tid = 0;
_local8.leverID = 0;
_local8.isFire = false;
_local8.isWater = false;
_local8.isFan = false;
_local10 = 1;
switch (_arg1){
case 1:
_local8.bmpSequence = new BitmapSequence(_arrSequenceBearTrap, 30);
_local9 = _bmpCollisionBearTrap;
break;
case 2:
_arg3 = (_arg3 - 22);
_local8.bmpSequence = new BitmapSequence(_arrSequenceYellowExit, 30);
_local9 = _bmpCollisionExitYellow;
break;
case 3:
_arg3 = (_arg3 - 22);
_local8.bmpSequence = new BitmapSequence(_arrSequenceRedExit, 30);
_local9 = _bmpCollisionExitRed;
break;
case 4:
_arg3 = (_arg3 - 22);
_local8.bmpSequence = new BitmapSequence(_arrSequenceBlueExit, 30);
_local9 = _bmpCollisionExitBlue;
break;
case 5:
_arg3 = (_arg3 - 22);
_local8.bmpSequence = new BitmapSequence(_arrSequenceGreenExit, 30);
_local9 = _bmpCollisionExitGreen;
break;
case 6:
_local8.bmpSequence = new BitmapSequence(_arrSequenceFan, 55);
_local8.isFan = true;
break;
case 7:
_local10 = Math.ceil((Math.random() * _arrSequenceFire.length));
_local8.bmpSequence = new BitmapSequence(_arrSequenceFire, 30);
_local8.isFire = true;
_local9 = _bmpCollisionFire;
break;
case 8:
_local8.bmpSequence = new BitmapSequence(_arrSequenceSaw, 50);
_local9 = _bmpCollisionSaw;
break;
case 9:
_local10 = Math.ceil((Math.random() * _arrSequenceSpikes.length));
_local8.bmpSequence = new BitmapSequence(_arrSequenceSpikes, 30);
_local9 = _bmpCollisionSpikes;
break;
case 10:
_local8.bmpSequence = new Object();
_local8.bmpSequence.bitmapData = _bmpTeleportOff;
break;
case 11:
_local8.bmpSequence = new Object();
_local8.bmpSequence.bitmapData = _bmpLeverOff;
break;
case 12:
_local8.bmpSequence = new BitmapSequence(_arrSequenceWater, 30, _arg7);
_local8.isWater = true;
if (_arg7 == null){
_local9 = _bmpCollisionWater;
} else {
_local11 = new BitmapData(_arg7.width, _arg7.height);
_local11.copyPixels(_bmpCollisionWater, _arg7, new Point());
_local9 = _local11;
};
break;
case 13:
_local8.bmpSequence = new BitmapSequence(_arrSequenceTrapDoor1, 30);
_local8.tid = 1;
break;
case 14:
_local8.bmpSequence = new BitmapSequence(_arrSequenceTrapDoor2, 30);
_local8.tid = 2;
break;
case 15:
_local8.bmpSequence = new BitmapSequence(_arrSequenceTrapDoor3, 30);
_local8.tid = 3;
break;
case 16:
_local8.bmpSequence = new BitmapSequence(_arrSequenceTrapDoor4, 30);
_local8.tid = 4;
break;
case 17:
_local8.bmpSequence = new Object();
_local8.bmpSequence.bitmapData = _bmpButtonOff;
break;
case 18:
_local8.bmpSequence = new Object();
_local8.bmpSequence.bitmapData = new BitmapData(1, 1, true, 0);
break;
case 19:
_local8.bmpSequence = new BitmapSequence(_arrSequenceWind1, 30, _arg7);
_local10 = Math.ceil((Math.random() * _arrSequenceWind1.length));
break;
case 20:
_local8.bmpSequence = new BitmapSequence(_arrSequenceWind2, 30, _arg7);
_local10 = Math.ceil((Math.random() * _arrSequenceWind2.length));
break;
case 21:
_local8.bmpSequence = new BitmapSequence(_arrSequenceWind3, 30, _arg7);
_local10 = Math.ceil((Math.random() * _arrSequenceWind3.length));
break;
};
_local8.x = _arg2;
_local8.y = _arg3;
_local8.isForeGround = _arg4;
_local8.collisionMap = _local9;
if (_arg5){
_local8.bmpSequence.gotoAndPlay(_local10);
};
_arrLevelElements.push(_local8);
}
public function addFire(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
_local4 = Math.ceil((_arg3 / 30));
_local5 = 0;
while (_local5 < _local4) {
_local6 = (_arg1 + (_local5 * 30));
addElementToLevel(7, _local6, _arg2);
_local5++;
};
}
public function get arrElements():Array{
return (_arrLevelElements);
}
public function addTrapDoor(_arg1, _arg2, _arg3){
switch (_arg1){
case 1:
addElementToLevel(13, _arg2, _arg3, true, false);
break;
case 2:
addElementToLevel(14, _arg2, _arg3, true, false);
break;
case 3:
addElementToLevel(15, _arg2, _arg3, true, false);
break;
case 4:
addElementToLevel(16, _arg2, _arg3, true, false);
break;
};
}
public function addSpikes(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
_local4 = Math.ceil((_arg3 / 30));
_local5 = 0;
while (_local5 < _local4) {
_local6 = (_arg1 + (_local5 * 30));
addElementToLevel(9, _local6, _arg2);
_local5++;
};
}
public function addTeleportButton(_arg1, _arg2, _arg3){
var _local4:BitmapData;
var _local5:*;
switch (_arg1){
case 1:
_local4 = new BitmapData(48, 25, false, 0x9900CC);
break;
case 2:
_local4 = new BitmapData(48, 25, false, 10040268);
break;
};
addElementToLevel(17, _arg2, _arg3, false, false, _local4);
_local5 = (_arrLevelElements.length - 1);
_arrLevelElements[_local5].buttonID = _arg1;
}
}
}//package
Section 136
//Levels (Levels)
package {
import com.memecounter.*;
public class Levels {
private var _bodsGreen:BodAnimation;
private var _bodsYellow:BodAnimation;
private var _bodsBlue:BodAnimation;
private var _bodsRed:BodAnimation;
private static var _objBodGroupGreen:Object = new Object();
private static var _objBodGroupRed:Object = new Object();
private static var _arrTonneWeights:Array = new Array();
private static var _objBodGroupYellow:Object = new Object();
private static var _objBodGroupBlue:Object = new Object();
private static var _levelElements:LevelElement = new LevelElement();
public function get tonneWeights():Array{
return (_arrTonneWeights);
}
public function get bodsRed():Object{
return (_objBodGroupRed);
}
public function get bodsBlue():Object{
return (_objBodGroupBlue);
}
private function createBodAnimations(){
_bodsYellow = new BodAnimation();
_bodsYellow.buildBodAnimation(1);
_bodsRed = new BodAnimation();
_bodsRed.buildBodAnimation(2);
_bodsBlue = new BodAnimation();
_bodsBlue.buildBodAnimation(3);
_bodsGreen = new BodAnimation();
_bodsGreen.buildBodAnimation(4);
_objBodGroupYellow.ani = _bodsYellow;
_objBodGroupRed.ani = _bodsRed;
_objBodGroupBlue.ani = _bodsBlue;
_objBodGroupGreen.ani = _bodsGreen;
}
public function get bodsGreen():Object{
return (_objBodGroupGreen);
}
public function get bodsYellow():Object{
return (_objBodGroupYellow);
}
private function addBodsTrapdoor(_arg1, _arg2, _arg3){
var _local4:Object;
switch (_arg1){
case 1:
_local4 = _objBodGroupYellow;
break;
case 2:
_local4 = _objBodGroupRed;
break;
case 3:
_local4 = _objBodGroupBlue;
break;
case 4:
_local4 = _objBodGroupGreen;
break;
};
_local4.x = (_arg2 + 75);
_local4.y = (_arg3 + 96);
_levelElements.addTrapDoor(_arg1, _arg2, _arg3);
}
public function addWeights(_arg1){
switch (_arg1){
case 2:
_arrTonneWeights.push(new TonneWeight(610, 300, 30));
_arrTonneWeights.push(new TonneWeight(1637, 195, 30));
break;
case 4:
_arrTonneWeights.push(new TonneWeight(900, 315, 30));
_arrTonneWeights.push(new TonneWeight(1045, 310, 30));
break;
case 7:
_arrTonneWeights.push(new TonneWeight(1425, 210, 30));
_arrTonneWeights.push(new TonneWeight(1292, 275, 30));
break;
case 9:
_arrTonneWeights.push(new TonneWeight(362, 338, 30));
_arrTonneWeights.push(new TonneWeight(455, 338, 30, 30));
_arrTonneWeights.push(new TonneWeight(565, 345, 30, 60));
_arrTonneWeights.push(new TonneWeight(780, 352, 30));
_arrTonneWeights.push(new TonneWeight(872, 355, 30, 30));
_arrTonneWeights.push(new TonneWeight(980, 348, 30, 60));
break;
case 8:
_arrTonneWeights.push(new TonneWeight(245, 575, 30));
break;
case 12:
_arrTonneWeights.push(new TonneWeight(570, 30, 30));
_arrTonneWeights.push(new TonneWeight(760, 20, 30));
_arrTonneWeights.push(new TonneWeight(487, 245, 30));
_arrTonneWeights.push(new TonneWeight(572, 245, 30, 60));
break;
case 11:
_arrTonneWeights.push(new TonneWeight(0x0505, 385, 30, 30));
_arrTonneWeights.push(new TonneWeight(1500, 385, 30));
_arrTonneWeights.push(new TonneWeight(1400, 85, 30));
break;
case 10:
_arrTonneWeights.push(new TonneWeight(1005, 360, 30));
_arrTonneWeights.push(new TonneWeight(1100, 360, 30, 30));
_arrTonneWeights.push(new TonneWeight(670, 45, 30));
_arrTonneWeights.push(new TonneWeight(560, 45, 30, 30));
break;
case 15:
_arrTonneWeights.push(new TonneWeight(205, 90, 30));
_arrTonneWeights.push(new TonneWeight(590, 35, 30));
_arrTonneWeights.push(new TonneWeight(735, 45, 30, 30));
_arrTonneWeights.push(new TonneWeight(1460, 310, 30));
_arrTonneWeights.push(new TonneWeight(1922, 400, 30));
_arrTonneWeights.push(new TonneWeight(2015, 397, 30, 30));
break;
case 6:
_arrTonneWeights.push(new TonneWeight(670, 138, 30));
_arrTonneWeights.push(new TonneWeight(1970, 65, 30));
_arrTonneWeights.push(new TonneWeight(2065, 65, 30, 20));
_arrTonneWeights.push(new TonneWeight(2168, 65, 30, 40));
break;
case 5:
_arrTonneWeights.push(new TonneWeight(163, 90, 30));
_arrTonneWeights.push(new TonneWeight(1660, 200, 30));
break;
case 13:
_arrTonneWeights.push(new TonneWeight(52, 670, 30));
_arrTonneWeights.push(new TonneWeight(262, 70, 30, 30));
_arrTonneWeights.push(new TonneWeight(353, 70, 30));
break;
case 14:
_arrTonneWeights.push(new TonneWeight(365, 183, 30));
_arrTonneWeights.push(new TonneWeight(467, 183, 30, 30));
_arrTonneWeights.push(new TonneWeight(586, 93, 30, 40));
_arrTonneWeights.push(new TonneWeight(683, 38, 30, 50));
_arrTonneWeights.push(new TonneWeight(897, 70, 30, 60));
break;
};
}
public function addBods(_arg1, _arg2=false){
createBodAnimations();
switch (_arg1){
case 1:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 2;
_objBodGroupYellow.numberOfBods = 5;
_objBodGroupYellow.releaseDelay = 30;
addBodsTrapdoor(1, 70, 130);
Tracker.kvEvent(8296);
break;
case 2:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 5;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 40;
addBodsTrapdoor(1, 50, 230);
Tracker.kvEvent(8297);
break;
case 3:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 7;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 30;
addBodsTrapdoor(1, 80, 450);
Tracker.kvEvent(8298);
break;
case 4:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 10;
_objBodGroupYellow.numberOfBods = 8;
_objBodGroupYellow.releaseDelay = 30;
addBodsTrapdoor(1, 50, 0);
_objBodGroupRed.numberOfBods = 8;
_objBodGroupRed.releaseDelay = 30;
addBodsTrapdoor(2, 600, 260);
Tracker.kvEvent(8299);
break;
case 5:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 6;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 20, 205);
Tracker.kvEvent(8308);
break;
case 6:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 7;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 85, 145);
Tracker.kvEvent(8307);
break;
case 7:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 12;
_objBodGroupYellow.numberOfBods = 9;
_objBodGroupYellow.releaseDelay = 30;
addBodsTrapdoor(1, 240, 35);
_objBodGroupBlue.numberOfBods = 9;
_objBodGroupBlue.releaseDelay = 30;
addBodsTrapdoor(3, 1055, 280);
Tracker.kvEvent(8300);
break;
case 8:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 15;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 25;
addBodsTrapdoor(1, 60, 0);
_objBodGroupGreen.numberOfBods = 10;
_objBodGroupGreen.releaseDelay = 25;
addBodsTrapdoor(4, 695, 575);
Tracker.kvEvent(8302);
break;
case 9:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 15;
_objBodGroupYellow.numberOfBods = 8;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 25, 0);
_objBodGroupBlue.numberOfBods = 4;
_objBodGroupBlue.releaseDelay = 80;
addBodsTrapdoor(3, 35, 290);
_objBodGroupGreen.numberOfBods = 8;
_objBodGroupGreen.releaseDelay = 25;
addBodsTrapdoor(4, 55, 575);
Tracker.kvEvent(8301);
break;
case 10:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 12;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 30;
addBodsTrapdoor(1, 40, 0);
_objBodGroupBlue.numberOfBods = 10;
_objBodGroupBlue.releaseDelay = 30;
addBodsTrapdoor(3, 1720, 295);
Tracker.kvEvent(8305);
break;
case 11:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 8;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 55, 460);
Tracker.kvEvent(8304);
break;
case 12:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 8;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 60, 1125);
Tracker.kvEvent(8303);
break;
case 13:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 8;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 80, 1050);
Tracker.kvEvent(8309);
break;
case 14:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 12;
_objBodGroupYellow.numberOfBods = 10;
_objBodGroupYellow.releaseDelay = 20;
addBodsTrapdoor(1, 80, 455);
_objBodGroupGreen.numberOfBods = 10;
_objBodGroupGreen.releaseDelay = 20;
addBodsTrapdoor(4, 1200, 65);
Tracker.kvEvent(8310);
break;
case 15:
Ink.maxInkLevel = 1000;
Bod.intTotalNeeded = 18;
_objBodGroupYellow.numberOfBods = 8;
_objBodGroupYellow.releaseDelay = 25;
addBodsTrapdoor(1, 65, 180);
_objBodGroupRed.numberOfBods = 8;
_objBodGroupRed.releaseDelay = 25;
addBodsTrapdoor(2, 750, 0xFF);
_objBodGroupGreen.numberOfBods = 8;
_objBodGroupGreen.releaseDelay = 25;
addBodsTrapdoor(4, 2010, 190);
Tracker.kvEvent(8306);
break;
};
if (_arg2){
Bod.speed = 4;
_objBodGroupYellow.numberOfBods = 50;
_objBodGroupRed.numberOfBods = 50;
_objBodGroupBlue.numberOfBods = 50;
_objBodGroupGreen.numberOfBods = 50;
_objBodGroupYellow.releaseDelay = 10;
_objBodGroupRed.releaseDelay = 10;
_objBodGroupBlue.releaseDelay = 10;
_objBodGroupGreen.releaseDelay = 10;
} else {
Bod.speed = 2;
};
}
public function addElements(_arg1){
switch (_arg1){
case 1:
_levelElements.addWater(600, 585, 260);
_levelElements.addFire(1150, 520, 120);
_levelElements.addElementToLevel(2, 1830, 640);
_levelElements.addFire(1335, 525, 120);
break;
case 2:
_levelElements.addFire(238, 430, 90);
_levelElements.addElementToLevel(12, 800, 635);
_levelElements.addTeleport(1, 1270, 520);
_levelElements.addTeleport(2, 1228, 300);
_levelElements.addTeleportButton(1, 1075, 600);
_levelElements.addElementToLevel(2, 1870, 540);
break;
case 3:
_levelElements.addFan(830, 210, 100, 545, 832, 705);
_levelElements.addFan(350, 50, 65, 338, 352, 338);
_levelElements.addSpikes(505, 145, 250);
_levelElements.addSpikes(180, 260, 125);
_levelElements.addSpikes(20, 50, 410);
_levelElements.addElementToLevel(12, 325, 735);
_levelElements.addElementToLevel(2, 80, 132);
break;
case 4:
_levelElements.addFan(435, 50, 65, 365, 437, 365);
_levelElements.addSpikes(410, 50, 175);
_levelElements.addSpikes(965, 45, 180);
_levelElements.addFire(1040, 230, 150);
_levelElements.addWater(210, 330, 140);
_levelElements.addElementToLevel(2, 1415, 470);
_levelElements.addElementToLevel(3, 1300, 470);
_levelElements.addWater(1115, 580, 150);
_levelElements.addTrapDoorSwitch(2, 640, 210);
break;
case 7:
_levelElements.addFan(115, 95, 65, 440, 117, 485);
_levelElements.addFan(1760, 135, 65, 345, 1767, 430);
_levelElements.addSpikes(20, 90, 175);
_levelElements.addSpikes(940, 55, 310);
_levelElements.addSpikes(1745, 130, 170);
_levelElements.addFire(400, 265, 90);
_levelElements.addWater(405, 575, 595);
_levelElements.addWater(1570, 510, 130);
_levelElements.addTeleport(1, 795, 440);
_levelElements.addTeleport(2, 835, 150);
_levelElements.addTrapDoorSwitch(3, 1175, 230);
_levelElements.addTeleportButton(1, 250, 540);
_levelElements.addElementToLevel(2, 40, 230);
_levelElements.addElementToLevel(4, 1835, 235);
break;
case 9:
_levelElements.addSpikes(440, 85, 30);
_levelElements.addSpikes(910, 70, 130);
_levelElements.addSpikes(1175, 105, 30);
_levelElements.addSpikes(200, 395, 30);
_levelElements.addSpikes(660, 350, 90);
_levelElements.addSpikes(1155, 420, 30);
_levelElements.addSpikes(230, 590, 30);
_levelElements.addSpikes(440, 595, 90);
_levelElements.addSpikes(645, 605, 120);
_levelElements.addSpikes(910, 620, 120);
_levelElements.addSpikes(1315, 670, 30);
_levelElements.addFire(315, 275, 120);
_levelElements.addFire(625, 280, 150);
_levelElements.addFire(1000, 280, 150);
_levelElements.addWater(280, 795, 245);
_levelElements.addWater(710, 790, 265);
_levelElements.addElementToLevel(2, 1250, 225);
_levelElements.addElementToLevel(4, 1250, 507);
_levelElements.addElementToLevel(5, 1250, 725);
_levelElements.addTrapDoorSwitch(3, 180, 250);
_levelElements.addTrapDoorSwitch(4, 685, 542);
break;
case 8:
_levelElements.addFan(885, 405, 85, 460, 903, 815);
_levelElements.addFan(630, 130, 65, 345, 637, 425);
_levelElements.addSpikes(620, 130, 120);
_levelElements.addSpikes(860, 405, 120);
_levelElements.addWater(330, 470, 200);
_levelElements.addFire(54, 565, 30);
_levelElements.addFire(265, 785, 60);
_levelElements.addElementToLevel(2, 555, 760);
_levelElements.addElementToLevel(5, 870, 185);
_levelElements.addTrapDoorSwitch(4, 450, 800);
break;
case 12:
_levelElements.addFan(210, 920, 87, 435, 242, 1305);
_levelElements.addFan(760, 615, 65, 515, 767, 1080);
_levelElements.addFan(230, 25, 80, 390, 262, 365);
_levelElements.addSpikes(210, 925, 300);
_levelElements.addSpikes(560, 915, 180);
_levelElements.addSpikes(465, 620, 390);
_levelElements.addWater(450, 1110, 180);
_levelElements.addWater(35, 875, 135);
_levelElements.addFire(640, 1070, 90);
_levelElements.addFire(555, 820, 120);
_levelElements.addFire(535, 170, 150);
_levelElements.addTeleport(1, 240, 510);
_levelElements.addTeleport(2, 40, 290);
_levelElements.addTeleportButton(1, 75, 695);
_levelElements.addElementToLevel(2, 730, 470);
break;
case 11:
_levelElements.addFan(1665, 110, 115, 590, 1700, 650);
_levelElements.addFan(870, 35, 80, 290, 880, 275);
_levelElements.addSpikes(805, 385, 150);
_levelElements.addSpikes(1645, 110, 150);
_levelElements.addSpikes(755, 35, 300);
_levelElements.addFire(755, 625, 270);
_levelElements.addFire(265, 260, 150);
_levelElements.addWater(315, 680, 130);
_levelElements.addWater(1390, 680, 110);
_levelElements.addElementToLevel(2, 60, 230);
break;
case 10:
_levelElements.addFan(575, 360, 75, 285, 582, 595);
_levelElements.addSpikes(440, 360, 220);
_levelElements.addWater(425, 655, 120);
_levelElements.addWater(1625, 655, 145);
_levelElements.addWater(705, 335, 165);
_levelElements.addTeleport(1, 1435, 525);
_levelElements.addTeleport(2, 50, 395);
_levelElements.addTeleportButton(1, 1805, 610);
_levelElements.addFire(295, 285, 150);
_levelElements.addFire(750, 600, 60);
_levelElements.addElementToLevel(2, 1765, 215);
_levelElements.addElementToLevel(4, 0x0500, 570);
_levelElements.addTrapDoorSwitch(3, 935, 110);
break;
case 15:
_levelElements.addFan(1125, 415, 65, 240, 1128, 605);
_levelElements.addFan(1235, 415, 75, 240, 1243, 605);
_levelElements.addFan(1750, 270, 95, 340, 1767, 560);
_levelElements.addFan(2660, 30, 75, 400, 2665, 380);
_levelElements.addFan(2285, 30, 75, 350, 2294, 330);
_levelElements.addFan(1862, 30, 75, 295, 1869, 275);
_levelElements.addSpikes(1100, 415, 210);
_levelElements.addSpikes(1770, 270, 30);
_levelElements.addSpikes(2205, 410, 210);
_levelElements.addSpikes(2285, 30, 450);
_levelElements.addSpikes(1870, 30, 30);
_levelElements.addWater(400, 420, 285);
_levelElements.addWater(1060, 285, 280);
_levelElements.addWater(1900, 610, 195);
_levelElements.addWater(2455, 625, 295);
_levelElements.addFire(2325, 550, 90);
_levelElements.addTeleport(1, 775, 530);
_levelElements.addTeleport(2, 1640, 110);
_levelElements.addTeleportButton(1, 1565, 600);
_levelElements.addTrapDoorSwitch(2, 880, 220);
_levelElements.addTrapDoorSwitch(4, 2020, 155);
_levelElements.addElementToLevel(2, 1470, 165);
_levelElements.addElementToLevel(3, 2135, 110);
_levelElements.addElementToLevel(5, 1620, 330);
break;
case 6:
_levelElements.addFan(985, 170, 75, 355, 994, 475);
_levelElements.addSpikes(905, 70, 30);
_levelElements.addSpikes(970, 170, 90);
_levelElements.addSpikes(1058, 247, 90);
_levelElements.addSpikes(1457, 260, 120);
_levelElements.addWater(560, 520, 340);
_levelElements.addWater(1350, 535, 375);
_levelElements.addFire(270, 465, 90);
_levelElements.addFire(2345, 490, 120);
_levelElements.addElementToLevel(2, 2615, 460);
break;
case 5:
_levelElements.addFire(855, 250, 90);
_levelElements.addSpikes(400, 220, 150);
_levelElements.addSpikes(640, 385, 90);
_levelElements.addSpikes(660, 130, 90);
_levelElements.addSpikes(850, 140, 90);
_levelElements.addSpikes(1090, 210, 30);
_levelElements.addSpikes(1070, 390, 90);
_levelElements.addSpikes(1370, 260, 30);
_levelElements.addWater(280, 540, 370);
_levelElements.addWater(785, 525, 245);
_levelElements.addWater(1200, 530, 410);
_levelElements.addElementToLevel(2, 1765, 425);
break;
case 13:
_levelElements.addFan(845, 450, 110, 560, 882, 960);
_levelElements.addFan(500, 825, 100, 500, 532, 1275);
_levelElements.addSpikes(490, 825, 330);
_levelElements.addSpikes(550, 450, 420);
_levelElements.addSpikes(30, 465, 300);
_levelElements.addWater(355, 1320, 125);
_levelElements.addWater(510, 650, 150);
_levelElements.addWater(620, 365, 340);
_levelElements.addTeleport(1, 285, 900);
_levelElements.addTeleport(2, 55, 300);
_levelElements.addTeleportButton(1, 80, 605);
_levelElements.addElementToLevel(2, 850, 160);
break;
case 14:
_levelElements.addFan(1115, 460, 65, 280, 1119, 690);
_levelElements.addFan(130, 30, 95, 410, 157, 390);
_levelElements.addSpikes(345, 530, 220);
_levelElements.addSpikes(25, 30, 300);
_levelElements.addSpikes(1120, 455, 250);
_levelElements.addWater(450, 675, 165);
_levelElements.addWater(835, 630, 105);
_levelElements.addElementToLevel(2, 1270, 645);
_levelElements.addElementToLevel(5, 45, 125);
_levelElements.addTrapDoorSwitch(4, 695, 670);
break;
};
}
}
}//package
Section 137
//LevelSelectBtn (LevelSelectBtn)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelSelectBtn extends MovieClip {
public var bestScore:TextField;
public var star2_mc:MovieClip;
public var levelName:TextField;
public var padlock_mc:MovieClip;
public var star3_mc:MovieClip;
public var play_mc:MovieClip;
public var levelThumbs_mc:MovieClip;
public var rollOver_mc:MovieClip;
public var star1_mc:MovieClip;
}
}//package
Section 138
//LeverOff (LeverOff)
package {
import flash.display.*;
public dynamic class LeverOff extends BitmapData {
public function LeverOff(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 139
//LeverOn (LeverOn)
package {
import flash.display.*;
public dynamic class LeverOn extends BitmapData {
public function LeverOn(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 140
//Main (Main)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import gs.*;
import flash.net.*;
import flash.utils.*;
import console.trackers.*;
import console.clock.*;
import console.sounds.*;
import console.scores.*;
import com.memecounter.*;
import com.stampy.events.*;
import console.events.*;
import flash.system.*;
import flash.ui.*;
public class Main extends MovieClip {
private const MOUSEY_OFFSET:int = 50;
private const STAGE_WIDTH:int = 650;
private const STAGE_HEIGHT:int = 450;
private const MOUSEX_OFFSET:int = 50;
private var _objBodGroupYellow:Object;
private var _intWorldHeight:int;
private var _bmpForeGroundData:BitmapData;
private var _bmpCollisionBlit:BitmapData;
private var _bmpLevelElementsBlit:BitmapData;
private var _arrTonneWeights:Array;
private var _bmpLevelBackground:BitmapData;
private var _intBodsLost;// = 0
private var _bmpWorldData:BitmapData;
private var _bmpBodsData:BitmapData;
private var _brushNextPoint:Point;
private var _bmpBackgroundData:BitmapData;
private var _bmpWorldVisible:Bitmap;
private var _bmpWorldLevel:BitmapData;
private var _levels:Levels;
private var _bmpWeightsData:BitmapData;
private var _levelElements:LevelElement;
private var _intWorldWidth:int;
private var _isMouseVisible;// = true
public var logo_mc:MovieClip;
private var _intDrawInk:int;
private var _strSecureSession:String;
private var _isGameOver:Boolean;// = false
private var _countDown:Countdown;
public var topBar_mc:MovieClip;
private var _intBodsSaved;// = 0
private var _intBrushSize:int;// = 5
private var _bmpInkBlittingData:BitmapData;
public var loaderbar_mc:PreloadDisplay;
private var _bmpInkData:BitmapData;
private var _objBodGroupRed:Object;
private var _brushPrevPoint:Point;
private var _bmpWorldVisibleData:BitmapData;
private var _arrStoredBods;
private var _mouseIcon:MovieClip;
private var _intScore:int;// = 0
private var _intLevelPlaying:int;
private var _objBodGroupGreen:Object;
private var _isPainting:Boolean;// = false
private var _intTotalBods;// = 0
public var backgroundOverlay_mc:MovieClip;
private var _bmpBodsBlankData:BitmapData;
private var _isWacky:Boolean;
private var _classCollisionDetection:CollisionDetection;
private var _bmpCollisionWhiteData:BitmapData;
private var _objBodGroupBlue:Object;
private var _facebookUID:String;// = "0"
private var _mouseScrollSpeed:int;// = 15
private static var _isPaused:Boolean = false;
private static var _worldPosition:Point = new Point();
public static var _inkLevel = 0;
public static var _menu:Menus;
public function Main():void{
_mouseScrollSpeed = 15;
_bmpWorldVisibleData = new BitmapData(STAGE_WIDTH, STAGE_HEIGHT);
_classCollisionDetection = new CollisionDetection();
_brushPrevPoint = new Point(0, 0);
_brushNextPoint = new Point(0, 0);
_intBrushSize = 5;
_intBodsSaved = 0;
_intBodsLost = 0;
_intTotalBods = 0;
_arrStoredBods = new Array();
_isGameOver = false;
_isPainting = false;
_facebookUID = "0";
_objBodGroupYellow = new Object();
_objBodGroupRed = new Object();
_objBodGroupBlue = new Object();
_objBodGroupGreen = new Object();
_intScore = 0;
_isMouseVisible = true;
super();
addFrameScript(0, frame1, 4, frame5);
if (stage){
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, init);
};
}
private function controlMenuBar():void{
var _local1:*;
_local1 = (1 - (Ink.inkLevel / Ink.maxInkLevel));
topBar_mc.inkBar_mc.scaleX = _local1;
topBar_mc.time.text = _countDown.getTimeAsString("MINUTES");
topBar_mc.bodsLeft.text = Bod.intSaved;
topBar_mc.totalBods.text = Bod.intTotalNeeded;
}
public function leaveScreen(_arg1:Event):void{
stopPainting();
}
private function controlWorld(_arg1:Event){
checkBodTriggers();
controlWorldPosition();
controlMenuBar();
checkGameOver();
drawWorld();
moveMouse();
}
public function get rank():int{
return (Ranking.rank);
}
public function fireBodSwitch(_arg1){
switch (_arg1){
case "3366ff":
_menu.showTrapDoorOpenMessage();
addBodsToLevel(_objBodGroupYellow);
_levelElements.playTrapDoor(1);
break;
case "3366cc":
_menu.showTrapDoorOpenMessage();
addBodsToLevel(_objBodGroupRed);
_levelElements.playTrapDoor(2);
break;
case "336699":
_menu.showTrapDoorOpenMessage();
addBodsToLevel(_objBodGroupBlue);
_levelElements.playTrapDoor(3);
break;
case "336666":
_menu.showTrapDoorOpenMessage();
addBodsToLevel(_objBodGroupGreen);
_levelElements.playTrapDoor(4);
break;
case "9900cc":
_menu.showTeleportMessage();
_levelElements.switchTeleportButton(1);
break;
case "9933cc":
_menu.showTeleportMessage();
_levelElements.switchTeleportButton(2);
break;
};
}
public function setSounds(){
SoundUtils.addSFX("sfxCharacterDie");
SoundUtils.addSFX("sfxYipee1");
SoundUtils.addSFX("sfxYipee2");
SoundUtils.addSFX("sfxHazardBearTrap");
SoundUtils.addSFX("sfxHazardFan");
SoundUtils.addSFX("sfxHazardFire");
SoundUtils.addSFX("sfxHazardSaw");
SoundUtils.addSFX("sfxTeleportIn", 0.5);
SoundUtils.addSFX("sfxTeleportOut", 0.5);
SoundUtils.addSFX("sfxHazardWater");
SoundUtils.addSFX("sfxPencilDraw", 3);
SoundUtils.addSFX("sfxPencilDrawRelease", 3);
SoundUtils.addSFX("sfxGameOver");
SoundUtils.addSFX("sfxLevelChanger");
SoundUtils.addSFX("sfxLevelSuccess");
SoundUtils.addSFX("sfxLevelSelect");
SoundUtils.addSFX("sfxPanelSlideIn");
SoundUtils.addSFX("sfxPlayGame");
SoundUtils.addSFX("sfxRollOver");
SoundUtils.addSFX("sfxScoreTally");
SoundUtils.addSFX("sfxCreekyDoor");
SoundUtils.addSFX("sfxSwitchOn");
SoundUtils.addSFX("sfxWeightDrop", 0.2);
SoundUtils.addMusic("musicLoop1");
SoundUtils.addMusic("musicLoop2");
}
private function buildNewLevel(_arg1:int, _arg2:Boolean){
_arrStoredBods = new Array();
Bod.intSaved = 0;
Bod.intKilled = 0;
Bod.intTotal = 0;
Bod.killAllBods = false;
_isGameOver = false;
_isWacky = _arg2;
rebuildWorldBitmaps(_arg1);
_intLevelPlaying = _arg1;
_levelElements.clearElements();
_arrTonneWeights = new Array();
_levels = new Levels();
_levels.addBods(_arg1, _arg2);
_levels.addElements(_arg1);
_levels.addWeights(_arg1);
_objBodGroupYellow = _levels.bodsYellow;
_objBodGroupRed = _levels.bodsRed;
_objBodGroupBlue = _levels.bodsBlue;
_objBodGroupGreen = _levels.bodsGreen;
_arrTonneWeights = _levels.tonneWeights;
_worldPosition.x = ((0 - _objBodGroupYellow.x) + 325);
_worldPosition.y = ((0 - _objBodGroupYellow.y) + 225);
if (_worldPosition.x > 0){
_worldPosition.x = 0;
};
if (_worldPosition.y > 0){
_worldPosition.y = 0;
};
if (_worldPosition.y < (0 - (_bmpWorldLevel.height - STAGE_HEIGHT))){
_worldPosition.y = (0 - (_bmpWorldLevel.height - STAGE_HEIGHT));
};
if (_worldPosition.x < (0 - (_bmpWorldLevel.width - STAGE_WIDTH))){
_worldPosition.x = (0 - (_bmpWorldLevel.width - STAGE_WIDTH));
};
stage.addEventListener(Event.ENTER_FRAME, controlGameStart);
_menu.showLevelBegin(_arg1, Bod.intTotalNeeded, (_arg1 * 10));
}
public function beginLevel(_arg1, _arg2):void{
buildNewLevel(_arg1, _arg2);
}
function frame5(){
beginLoadedGame();
stop();
}
public function checkBodTriggers(){
if (Bod.strFireTriggerColour != ""){
fireBodSwitch(Bod.strFireTriggerColour);
Bod.strFireTriggerColour = "";
};
if (Bod.strButtonFiredColour != ""){
fireBodSwitch(Bod.strButtonFiredColour);
Bod.strButtonFiredColour = "";
};
}
function frame1(){
MochiBot.track(this, "a7d3e661");
Tracker.init(0x0300, root);
addEventListener(Event.ENTER_FRAME, preloader);
loaderbar_mc.bar_mc.scaleX = 0;
Security.loadPolicyFile("http://www.viral-game.co.uk/crossdomain.xml");
Security.loadPolicyFile("http://confused.viral-game.co.uk/crossdomain.xml");
Security.allowDomain("*");
stop();
}
public function inviteFriends():void{
dispatchEvent(new Event("INVITE_FRIENDS"));
}
public function preloader(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:Number;
var _local5:*;
_local2 = loaderInfo.bytesTotal;
_local3 = loaderInfo.bytesLoaded;
_local4 = (_local3 / _local2);
_local5 = ((_local4 - 0.08) / 0.92);
loaderbar_mc.percentage.text = (Math.ceil((_local5 * 100)) + "%");
TweenMax.to(loaderbar_mc.bar_mc, 0.5, {overwrite:1, scaleX:_local4});
if (_local4 >= 1){
removeEventListener(Event.ENTER_FRAME, preloader);
gotoAndPlay(2);
};
}
public function startLevel(){
_menu.quit_btn.visible = true;
hideMouse();
addBodsToLevel(_objBodGroupYellow);
_levelElements.playTrapDoor(1);
_countDown = new Countdown(300, true);
Ink.inkLevel = 0;
stage.removeEventListener(Event.ENTER_FRAME, controlGameStart);
stage.addEventListener(MouseEvent.MOUSE_DOWN, startPainting);
stage.addEventListener(MouseEvent.MOUSE_UP, stopPainting);
stage.addEventListener(Event.ENTER_FRAME, controlWorld);
stage.addEventListener(Event.MOUSE_LEAVE, leaveScreen);
TweenMax.to(topBar_mc, 0.5, {y:0});
}
public function hideMouse(){
if (_isMouseVisible){
stopPainting();
_isMouseVisible = false;
_mouseIcon.visible = true;
Mouse.hide();
};
}
private function controlWorldPosition(){
var _local1:*;
var _local2:*;
if (_menu.areYouSure_mc.visible){
_isPaused = true;
} else {
_isPaused = false;
};
_local1 = "";
_local2 = "";
if ((((mouseX > (STAGE_WIDTH - MOUSEX_OFFSET))) && ((_worldPosition.x > ((0 - _intWorldWidth) + STAGE_WIDTH))))){
_isPaused = true;
_worldPosition.x = (_worldPosition.x - _mouseScrollSpeed);
if (_worldPosition.x < ((0 - _intWorldWidth) + STAGE_WIDTH)){
_worldPosition.x = ((0 - _intWorldWidth) + STAGE_WIDTH);
};
_local1 = "RIGHT";
} else {
if ((((mouseX < (0 + MOUSEX_OFFSET))) && ((_worldPosition.x < 0)))){
_isPaused = true;
_worldPosition.x = (_worldPosition.x + _mouseScrollSpeed);
if (_worldPosition.x > 0){
_worldPosition.x = 0;
};
_local1 = "LEFT";
};
};
if ((((mouseY > (STAGE_HEIGHT - MOUSEY_OFFSET))) && ((_worldPosition.y > ((0 - _intWorldHeight) + STAGE_HEIGHT))))){
_isPaused = true;
_worldPosition.y = (_worldPosition.y - _mouseScrollSpeed);
if (_worldPosition.y < ((0 - _intWorldHeight) + STAGE_HEIGHT)){
_worldPosition.y = ((0 - _intWorldHeight) + STAGE_HEIGHT);
};
_local2 = "DOWN";
} else {
if ((((mouseY < (0 + MOUSEY_OFFSET))) && ((_worldPosition.y < 0)))){
_isPaused = true;
_worldPosition.y = (_worldPosition.y + _mouseScrollSpeed);
if (_worldPosition.y > 0){
_worldPosition.y = 0;
};
_local2 = "UP";
};
};
if (_local1 == "LEFT"){
_mouseIcon.gotoAndStop(13);
if (_local2 == "UP"){
_mouseIcon.gotoAndStop(16);
};
if (_local2 == "DOWN"){
_mouseIcon.gotoAndStop(17);
};
} else {
if (_local1 == "RIGHT"){
_mouseIcon.gotoAndStop(11);
if (_local2 == "UP"){
_mouseIcon.gotoAndStop(15);
};
if (_local2 == "DOWN"){
_mouseIcon.gotoAndStop(14);
};
} else {
if (_local2 == "UP"){
_mouseIcon.gotoAndStop(10);
} else {
if (_local2 == "DOWN"){
_mouseIcon.gotoAndStop(12);
} else {
if (_isPainting){
_mouseIcon.gotoAndStop(2);
} else {
_mouseIcon.gotoAndStop(1);
};
};
};
};
};
}
public function get score():String{
return (_intScore.toString());
}
private function drawWorld():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:Rectangle;
var _local7:Rectangle;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
_local1 = _levelElements.arrElements.length;
_local2 = false;
_local3 = false;
_local4 = false;
_local5 = 0;
while (_local5 < _local1) {
_local8 = _levelElements.arrElements[_local5];
_local9 = _local8.bmpSequence.bitmapData;
_local10 = _local8.sound;
_local11 = _local8.collisionMap;
_local12 = (_local8.x + worldPosition.x);
_local13 = (_local8.y + worldPosition.y);
_bmpWorldVisibleData.lock();
if (((((_local8.isFire) || (_local8.isFan))) || (_local8.isWater))){
if ((((((((_local12 > (0 - _local9.width))) && ((_local12 < 650)))) && ((_local13 > (0 - _local9.height))))) && ((_local13 < 450)))){
if (_local8.isFire){
_local2 = true;
};
if (_local8.isFan){
_local3 = true;
};
if (_local8.isWater){
_local4 = true;
};
};
};
if ((((((((_local12 > (0 - _local9.width))) && ((_local12 < 650)))) && ((_local13 > (0 - _local9.height))))) && ((_local13 < 450)))){
if (_local8.isForeGround){
_bmpForeGroundData.copyPixels(_local9, _local9.rect, new Point(_local8.x, _local8.y), null, null, true);
} else {
_bmpBackgroundData.copyPixels(_local9, _local9.rect, new Point(_local8.x, _local8.y), null, null, true);
};
};
if (_local11 != null){
_bmpLevelElementsBlit.copyPixels(_local11, _local11.rect, new Point(_local8.x, _local8.y), null, null, true);
};
_local5++;
};
if (((_local2) && (!(SoundUtils.isSFXPlaying("sfxHazardFire"))))){
SoundUtils.fadeSFXPlay("sfxHazardFire", 0.3, 1, true);
};
if (((!(_local2)) && (SoundUtils.isSFXPlaying("sfxHazardFire")))){
SoundUtils.fadeSFXStop("sfxHazardFire", 0, 1);
};
if (((_local3) && (!(SoundUtils.isSFXPlaying("sfxHazardFan"))))){
SoundUtils.fadeSFXPlay("sfxHazardFan", 0.3, 1, true);
};
if (((!(_local3)) && (SoundUtils.isSFXPlaying("sfxHazardFan")))){
SoundUtils.fadeSFXStop("sfxHazardFan", 0, 1);
};
if (((_local4) && (!(SoundUtils.isSFXPlaying("sfxHazardWater"))))){
SoundUtils.fadeSFXPlay("sfxHazardWater", 0.3, 1, true);
};
if (((!(_local4)) && (SoundUtils.isSFXPlaying("sfxHazardWater")))){
SoundUtils.fadeSFXStop("sfxHazardWater", 0, 1);
};
_local6 = new Rectangle(Math.abs(_worldPosition.x), Math.abs(_worldPosition.y), STAGE_WIDTH, STAGE_HEIGHT);
_local7 = new Rectangle((Math.abs(_worldPosition.x) - 15), (Math.abs(_worldPosition.y) - 15), (STAGE_WIDTH + 30), (STAGE_HEIGHT + 30));
_bmpWorldVisibleData.lock();
_bmpWorldVisibleData.copyPixels(_bmpLevelBackground, _local6, new Point());
_bmpWorldVisibleData.copyPixels(_bmpBackgroundData, _local6, new Point(), null, null, true);
_bmpWorldVisibleData.copyPixels(_bmpWeightsData, _local6, new Point(), null, null, true);
_bmpWorldVisibleData.copyPixels(_bmpWorldData, _local6, new Point(), null, null, true);
_bmpWorldVisibleData.copyPixels(_bmpInkData, _local6, new Point(), null, null, true);
_bmpWorldVisibleData.copyPixels(_bmpBodsData, _local6, new Point(), null, null, true);
_bmpWorldVisibleData.copyPixels(_bmpForeGroundData, _local6, new Point(), null, null, true);
_bmpWorldVisibleData.unlock();
_bmpCollisionBlit.lock();
_bmpCollisionBlit.copyPixels(_bmpCollisionWhiteData, _bmpCollisionWhiteData.rect, new Point());
_bmpCollisionBlit.copyPixels(_bmpLevelElementsBlit, _bmpLevelElementsBlit.rect, new Point(), null, null, true);
_bmpCollisionBlit.copyPixels(_bmpWorldLevel, _bmpWorldLevel.rect, new Point(), null, null, true);
_bmpCollisionBlit.copyPixels(_bmpInkBlittingData, _bmpInkBlittingData.rect, new Point(), null, null, true);
_bmpCollisionBlit.unlock();
_bmpBodsData.fillRect(_local7, 0);
_bmpBackgroundData.fillRect(_local7, 0);
_bmpForeGroundData.fillRect(_local7, 0);
_bmpWeightsData.fillRect(_local7, 0);
_bmpLevelElementsBlit.fillRect(_bmpLevelElementsBlit.rect, 0);
}
private function controlGameStart(_arg1:Event){
drawWorld();
}
public function openURL(_arg1):void{
dispatchEvent(new URLEvent("open_url", _arg1));
}
public function showRank():void{
dispatchEvent(new Event("RANK_UPDATE"));
}
public function animateConfusedButton(_arg1:int, _arg2){
TweenMax.to(backgroundOverlay_mc.visitConfusedBig_btn, 0.5, {scaleX:_arg1, scaleY:_arg1, ease:_arg2});
}
private function stopPainting(_arg1:Event=null):void{
_isPainting = false;
_mouseIcon.gotoAndStop(1);
SoundUtils.stopSFX("sfxPencilDraw");
if (SoundUtils.isSFXPlaying("sfxPencilDraw")){
SoundUtils.playSFX("sfxPencilDrawRelease");
};
_brushPrevPoint = new Point();
_brushNextPoint = new Point();
clearInterval(_intDrawInk);
}
private function rebuildWorldBitmaps(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
backgroundOverlay_mc.visible = false;
_local2 = (getDefinitionByName(("LevelBlitmap" + _arg1)) as Class);
_bmpWorldLevel = new _local2(0, 0);
_local3 = (getDefinitionByName(("Level" + _arg1)) as Class);
_bmpWorldData = new _local3(0, 0);
_local4 = (getDefinitionByName(("LevelBackground" + _arg1)) as Class);
_bmpLevelBackground = new _local4(0, 0);
_bmpWorldVisible = new Bitmap(_bmpWorldVisibleData);
addChildAt(_bmpWorldVisible, (this.numChildren - 4));
_worldPosition = new Point();
_intWorldWidth = _bmpWorldData.width;
_intWorldHeight = _bmpWorldData.height;
_bmpInkBlittingData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
_bmpInkData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
_bmpLevelElementsBlit = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
_bmpCollisionBlit = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true);
_bmpCollisionWhiteData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, false, 0xFFFFFF);
_bmpForeGroundData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
_bmpBackgroundData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
_bmpBodsData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true);
_bmpBodsBlankData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
_classCollisionDetection.collisionBlitMap = _bmpCollisionBlit;
_bmpWeightsData = new BitmapData(_bmpWorldLevel.width, _bmpWorldLevel.height, true, 0);
TonneWeight.setBlitMaps(_bmpCollisionBlit, _bmpLevelElementsBlit, _bmpWeightsData);
}
public function checkGameOver(_arg1=false):void{
if (((((((Bod.intKilled + Bod.intSaved) == Bod.intTotal)) && (!(_isGameOver)))) || (_arg1))){
_menu.quit_btn.visible = false;
if (_isPainting){
stopPainting();
};
_isGameOver = true;
_countDown.stop();
setTimeout(destroyWorld, 500, _arg1);
_mouseIcon.gotoAndStop(1);
};
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, init);
}
public function updateBookmark(){
dispatchEvent(new Event("BOOKMARK_UPDATE"));
}
public function updateMessage(_arg1){
_intScore = _arg1;
dispatchEvent(new Event("MESSAGE_UPDATE"));
}
private function addBodsToLevel(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
Bod.intTotal = (Bod.intTotal + _arg1.numberOfBods);
SoundUtils.playSFX("sfxCreekyDoor");
_local2 = 0;
while (_local2 < _arg1.numberOfBods) {
_local3 = (_arg1.releaseDelay * _local2);
_local4 = new Bod(_bmpCollisionBlit, _bmpBodsData, _local3, _arg1.x, _arg1.y, _arg1.ani);
_arrStoredBods.push(_local4);
_local2++;
};
}
private function beginLoadedGame(){
var _local1:Sprite;
DispatchGlobal.createCustomEvent("RANK_UPDATE", "rankUpdate");
setSounds();
SoundUtils.fadeMusicPlay("musicLoop2", 1, 1, true);
Ink.buildInkStrokes();
_local1 = new Sprite();
_local1.graphics.beginFill(0xFF0000);
_local1.graphics.drawRect(0, 0, 650, 57);
_local1.mouseEnabled = false;
addChild(_local1);
topBar_mc.mask = _local1;
_menu = new Menus(this);
_menu.facebookUID = _facebookUID;
_menu.secureSession = _strSecureSession;
_menu.buildMenus();
addChild(_menu);
_levelElements = new LevelElement();
_levelElements.preBuildElements();
_mouseIcon = new mouseIcon();
_mouseIcon.gotoAndStop(1);
_mouseIcon.mouseEnabled = false;
_mouseIcon.visible = false;
addChild(_mouseIcon);
}
public function updateScore(_arg1){
_intScore = _arg1;
dispatchEvent(new Event("SCORE_UPDATE"));
}
public function set facebookSS(_arg1:String):void{
_strSecureSession = _arg1;
if (_menu != null){
_menu.secureSession = _arg1;
};
}
private function startPainting(_arg1:MouseEvent):void{
_isPainting = true;
_mouseIcon.gotoAndStop(2);
SoundUtils.stopSFX("sfxPencilDraw");
SoundUtils.playSFX("sfxPencilDraw", true);
clearInterval(_intDrawInk);
_intDrawInk = setInterval(paintLines, 10);
}
private function moveMouse(){
_mouseIcon.x = mouseX;
_mouseIcon.y = mouseY;
if ((((((((mouseX > 0)) && ((mouseX < STAGE_WIDTH)))) && ((mouseY > 0)))) && ((mouseY < STAGE_HEIGHT)))){
hideMouse();
} else {
showMouse();
};
}
private function paintLines(_arg1:MouseEvent=null):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = (Math.abs(_worldPosition.x) + mouseX);
_local3 = (Math.abs(_worldPosition.y) + mouseY);
if (_brushPrevPoint.x != 0){
_local4 = (_brushNextPoint.x - _brushPrevPoint.x);
_local5 = (_brushNextPoint.y - _brushPrevPoint.y);
_local6 = new Ink(_bmpInkBlittingData, _bmpInkData, _brushPrevPoint.x, _brushPrevPoint.y, _local4, _local5, _classCollisionDetection, _inkLevel);
};
if (_brushNextPoint.x != 0){
_brushPrevPoint = _brushNextPoint;
};
_brushNextPoint = new Point(_local2, _local3);
if (Ink.inkLevel == Ink.maxInkLevel){
stopPainting();
};
}
public function removeLevel(){
removeChild(_bmpWorldVisible);
}
public function endLevel(_arg1:Boolean=true, _arg2=true){
if (_arg2){
_menu.unlockLevel(_intLevelPlaying);
};
backgroundOverlay_mc.visible = true;
removeChild(_bmpWorldVisible);
if (_arg1){
_menu.showChooseLevelScreen();
} else {
_menu.showShare();
};
}
public function set facebookUID(_arg1:String):void{
_facebookUID = _arg1;
if (_menu != null){
_menu.facebookUID = _arg1;
};
}
public function showLoadResult(_arg1:Event){
}
public function get facebookUID():String{
return (_facebookUID.toString());
}
public function showMouse(){
if (!_isMouseVisible){
_isMouseVisible = true;
_mouseIcon.visible = false;
Mouse.show();
};
}
private function destroyWorld(_arg1):void{
var _local2:*;
SoundUtils.stopSFXChannel();
showMouse();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, startPainting);
stage.removeEventListener(MouseEvent.MOUSE_UP, stopPainting);
stage.removeEventListener(Event.MOUSE_LEAVE, leaveScreen);
stage.removeEventListener(Event.ENTER_FRAME, controlWorld);
_local2 = 0;
while (_local2 < _arrTonneWeights.length) {
_arrTonneWeights[_local2].destroy();
_local2++;
};
if (!_arg1){
if (Bod.intSaved >= Bod.intTotalNeeded){
TweenMax.to(topBar_mc, 0.5, {y:-51});
_menu.showWellDoneScreen(_intLevelPlaying, _countDown.timeLeft);
} else {
TweenMax.to(topBar_mc, 0.5, {y:-51});
_menu.showGameOverScreen();
};
} else {
TweenMax.to(topBar_mc, 0.5, {y:-51});
_menu.failLevel();
};
}
public function enterCompetition():void{
dispatchEvent(new Event("COMPETITION_COMPLETE"));
}
public function scoreComplete(){
dispatchEvent(new Event("SCORE_COMPLETE"));
}
public function showPreloader(_arg1:Event){
stop();
}
public static function get worldPosition():Point{
return (_worldPosition);
}
public static function get isPaused():Boolean{
return (_isPaused);
}
}
}//package
Section 141
//Menus (Menus)
package {
import flash.display.*;
import flash.events.*;
import gs.*;
import flash.utils.*;
import console.clock.*;
import com.stampy.cookies.*;
import console.sounds.*;
import console.scores.*;
import com.memecounter.*;
import gs.easing.*;
import console.security.*;
import console.loadurl.*;
import com.stampy.frames.*;
import console.functions.*;
import com.stampy.forms.*;
import flash.text.*;
import flash.system.*;
public class Menus extends MovieClip {
private const ACTION:String = "/data.php";
private const ACTION_TOKEN:String = "/data.php?action=request_token";
private const DOMAIN:String = "http://confused.viral-game.co.uk";
private const CROSSDOMAIN_A:String = "http://confused.viral-game.co.uk/crossdomain.xml";
private const CROSSDOMAIN_B:String = "http://www.viral-game.co.uk/crossdomain.xml";
private var _arrLevelBest:Array;
private var _intLevelSelectX:int;
public var LevelStart_mc:MovieClip;
private var _levelButton;
private var _arrLevel11Points;
public var ShareGame_mc:MovieClip;
private var _arrLevel5Points;
public var areYouSure_mc:MovieClip;
public var MainMenu_mc:MovieClip;
private var _isFacebookVarsLoaded:Boolean;// = false
private var _isPlayMorGamesShown:Boolean;// = false
private var _intCountdownTimeLeft:int;
public var quit_btn:SimpleButton;
private var _arrLevel2Points;
public var WellDone_mc:MovieClip;
private var _arrLevel13Points;
private var _cookieName:String;// = "WorldOfConfusionCookie22"
public var LevelSelect_mc:MovieClip;
private var _arrLevel7Points;
private var _intCountdownCount:int;// = 0
private var _strWindowMode;// = "_blank"
public var transition_mc:MovieClip;
private var _strSecureSession;// = ""
private var _isPlayGameClickAllowed:Boolean;// = true
public var HighScores_mc:MovieClip;
private var _arrLevel10Points;
private var _arrLevel4Points;
private var _token:String;
private var _strGUID;// = ""
public var Teleport_mc:MovieClip;
private var _intCountdownBodScore:int;
private var _isClickHomeAllowed:Boolean;// = true
private var _intCountdownLevel:int;
private var _intCountdownBodSaved:int;
private var _arrLevel1Points;
private var _arrLevel9Points;
private var _scores:Scores;
private var _debug:Boolean;// = true
private var _arrLevel12Points;
private var _cookieFacebook:String;// = "WorldOfConfusionFacebook3"
private var _arrLevelTotal:Array;
private var _arrLevel6Points;
private var _cookie:FlashCookie;
private var _intLevelSelectPosition:int;// = 0
private var _mainGameEngine;
private var _intCountdownBodPoints:int;
private var _arrLevel3Points;
public var TrapDoor_mc:MovieClip;
private var _cookieData:Object;
private var _intCountdownTimePoints:int;
public var LevelFailed_mc:MovieClip;
private var _intCountdownTimeLeftTotal:int;
private var _isLevelDebug:Boolean;// = false
private var _intNumberOfLevels:int;// = 15
private var _arrLevel14Points;
private var _intCountdownTimeScore:int;
public var EnterName_mc:MovieClip;
private var _arrLevel0Points;
private var _arrLevel8Points;
private static var _strFacebookUID:String = "0";
private static var _intWhackyBonus:int = 0;
public function Menus(_arg1){
_isLevelDebug = false;
_intNumberOfLevels = 15;
_intLevelSelectPosition = 0;
_cookieName = "WorldOfConfusionCookie22";
_cookieFacebook = "WorldOfConfusionFacebook3";
_cookieData = {dataName:"", dataTotalScore:0, playerName:"", guid:""};
_debug = true;
_arrLevel0Points = new Array(1, 240, 300);
_arrLevel1Points = new Array(1, 530, 660);
_arrLevel2Points = new Array(1, 820, 1020);
_arrLevel3Points = new Array(1, 1240, 1550);
_arrLevel4Points = new Array(1, 1345, 1680);
_arrLevel5Points = new Array(1, 1545, 1930);
_arrLevel6Points = new Array(1, 2075, 2590);
_arrLevel7Points = new Array(1, 2680, 3350);
_arrLevel8Points = new Array(1, 2760, 3450);
_arrLevel9Points = new Array(1, 2985, 3730);
_arrLevel10Points = new Array(1, 2895, 3620);
_arrLevel11Points = new Array(1, 3000, 3750);
_arrLevel12Points = new Array(1, 3120, 3900);
_arrLevel13Points = new Array(1, 4720, 5900);
_arrLevel14Points = new Array(1, 3875, 4840);
_strWindowMode = "_blank";
_intCountdownCount = 0;
_isPlayMorGamesShown = false;
_strGUID = "";
_strSecureSession = "";
_isClickHomeAllowed = true;
_isPlayGameClickAllowed = true;
_isFacebookVarsLoaded = false;
super();
transition_mc.mouseEnabled = false;
transition_mc.mouseChildren = false;
transition_mc.buttonMode = false;
this.mouseEnabled = false;
setupLevelData();
loadCookie();
security();
crossDomain();
_mainGameEngine = _arg1;
_mainGameEngine.addEventListener(MouseEvent.CLICK, handleMouseClick);
addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
MainMenu_mc.playGame_btn.scaleX = (MainMenu_mc.playGame_btn.scaleY = 0);
MainMenu_mc.addToFacebook_btn.scaleX = (MainMenu_mc.addToFacebook_btn.scaleY = 0);
MainMenu_mc.highScores_btn.scaleX = (MainMenu_mc.highScores_btn.scaleY = 0);
MainMenu_mc.share_btn.scaleX = (MainMenu_mc.share_btn.scaleY = 0);
MainMenu_mc.playMoreGames_btn.scaleX = (MainMenu_mc.playMoreGames_btn.scaleY = 0);
MainMenu_mc.playGame1_btn.scaleX = (MainMenu_mc.playGame1_btn.scaleY = 0);
MainMenu_mc.enterCompetition_btn.scaleX = (MainMenu_mc.enterCompetition_btn.scaleY = 0);
MainMenu_mc.inviteFriends_btn.scaleX = (MainMenu_mc.inviteFriends_btn.scaleY = 0);
_mainGameEngine.backgroundOverlay_mc.mute_btn.buttonMode = true;
areYouSure_mc.visible = false;
LevelSelect_mc.scaleX = (LevelSelect_mc.scaleY = 0);
HighScores_mc.scaleX = (HighScores_mc.scaleY = 0);
WellDone_mc.scaleX = (WellDone_mc.scaleY = 0);
LevelFailed_mc.scaleX = (LevelFailed_mc.scaleY = 0);
ShareGame_mc.scaleX = (ShareGame_mc.scaleY = 0);
EnterName_mc.scaleX = (EnterName_mc.scaleY = 0);
LevelStart_mc.scaleX = (LevelStart_mc.scaleY = 0);
Teleport_mc.scaleX = (Teleport_mc.scaleY = 0);
TrapDoor_mc.scaleX = (TrapDoor_mc.scaleY = 0);
quit_btn.visible = false;
}
public function handleMouseClick(_arg1:MouseEvent){
var _local2:*;
var _local3:String;
_local2 = 0.5;
switch (_arg1.target.name){
case "playGame_btn":
case "playGame1_btn":
case "continueGameOver_btn":
animateAllMenusOut();
if ((((_cookieData.playerName == "")) && ((_strFacebookUID == "0")))){
TweenMax.to(MainMenu_mc.logo_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
EnterName_mc.playerName.text = "";
TweenMax.to(EnterName_mc, _local2, {delay:0.8, scaleX:1, scaleY:1, ease:Back.easeOut});
} else {
showLevelSelectMenu();
};
break;
case "continueName_btn":
if (EnterName_mc.playerName.text != ""){
_cookieData.playerName = EnterName_mc.playerName.text;
_cookie.updateCookie(_cookieData);
animateAllMenusOut();
showLevelSelectMenu();
} else {
EnterName_mc.err.text = "You must enter your name";
};
break;
case "leftArrow_btn":
moveLevelSelectButtons(-3);
SoundUtils.playSFX("sfxLevelChanger");
SoundUtils.playSFX("sfxPanelSlideIn", false, 0, 0, true);
break;
case "rightArrow_btn":
moveLevelSelectButtons(3);
SoundUtils.playSFX("sfxLevelChanger");
SoundUtils.playSFX("sfxPanelSlideIn", false, 0, 0, true);
break;
case "home_btn":
animateAllMenusOut();
animateMainMenu(1, Back.easeOut);
break;
case "share_btn":
animateAllMenusOut();
TweenMax.to(ShareGame_mc, _local2, {delay:0.8, scaleX:1, scaleY:1, ease:Back.easeOut});
SoundUtils.playSFX("sfxPlayGame");
break;
case "highScores_btn":
HighScores_mc.hozBar_mc.y = -145;
HighScores_mc.menuMask_mc.y = -145;
animateAllMenusOut();
TweenMax.to(HighScores_mc, _local2, {delay:0.8, scaleX:1, scaleY:1, ease:Back.easeOut});
loadHighScores("scores_daily_xml");
SoundUtils.playSFX("sfxPlayGame");
Tracker.kvEvent(8316);
break;
case "highscoresDaily_btn":
TweenMax.to(HighScores_mc.hozBar_mc, 0.5, {y:-145});
TweenMax.to(HighScores_mc.menuMask_mc, 0.5, {y:-145});
loadHighScores("scores_daily_xml");
Tracker.kvEvent(8322);
break;
case "highscoresMonthly_btn":
TweenMax.to(HighScores_mc.hozBar_mc, 0.5, {y:-115});
TweenMax.to(HighScores_mc.menuMask_mc, 0.5, {y:-115});
loadHighScores("scores_monthly_xml");
Tracker.kvEvent(8323);
break;
case "highscoresAllTime_btn":
TweenMax.to(HighScores_mc.hozBar_mc, 0.5, {y:-85});
TweenMax.to(HighScores_mc.menuMask_mc, 0.5, {y:-85});
loadHighScores("scores_alltime_xml");
Tracker.kvEvent(8324);
break;
case "continue_btn":
animateAllMenusOut();
transition_mc.gotoAndPlay(2);
FrameUtils.onEnterFrame("LOCKED", transition_mc, _mainGameEngine.endLevel);
break;
case "continueFailed_btn":
failLevel();
break;
case "visitConfused_btn":
case "visitConfusedBig_btn":
_local3 = ((DOMAIN + ACTION) + "?action=goto_client_link_1");
if ((_strFacebookUID == "0")){
OpenURL.navigateURL(_local3, _strWindowMode);
} else {
_mainGameEngine.openURL(_local3);
};
Tracker.kvClick(1321);
break;
case "visitConfused1_btn":
_local3 = ((DOMAIN + ACTION) + "?action=goto_client_link_2");
if ((_strFacebookUID == "0")){
OpenURL.navigateURL(_local3, _strWindowMode);
} else {
_mainGameEngine.openURL(_local3);
};
Tracker.kvClick(1322);
break;
case "addToFacebook_btn":
case "addToFacebookLarge_btn":
OpenURL.navigateURL(((DOMAIN + ACTION) + "?action=goto_client_link_3"), _strWindowMode);
Tracker.kvClick(1323);
break;
case "visitKoko_btn":
_local3 = ((DOMAIN + ACTION) + "?action=goto_koko_link_1");
if ((_strFacebookUID == "0")){
OpenURL.navigateURL(_local3, _strWindowMode);
} else {
_mainGameEngine.openURL(_local3);
};
Tracker.kvClick(1324);
break;
case "playMoreGames_btn":
_local3 = ((DOMAIN + ACTION) + "?action=goto_client_link_4");
if ((_strFacebookUID == "0")){
OpenURL.navigateURL(_local3, _strWindowMode);
} else {
_mainGameEngine.openURL(_local3);
};
Tracker.kvClick(1325);
break;
case "shareTwitter_btn":
OpenURL.navigateURL(((DOMAIN + ACTION) + "?action=goto_share_twitter"), _strWindowMode);
Tracker.kvEvent(8311);
break;
case "shareMySpace_btn":
OpenURL.navigateURL(((DOMAIN + ACTION) + "?action=goto_share_myspace"), _strWindowMode);
Tracker.kvEvent(8312);
break;
case "shareDigg_btn":
OpenURL.navigateURL(((DOMAIN + ACTION) + "?action=goto_share_digg"), _strWindowMode);
Tracker.kvEvent(8313);
break;
case "shareDelicious_btn":
OpenURL.navigateURL(((DOMAIN + ACTION) + "?action=goto_share_delicious"), _strWindowMode);
Tracker.kvEvent(8314);
break;
case "shareStumbleUpon_btn":
OpenURL.navigateURL(((DOMAIN + ACTION) + "?action=goto_share_stumbleupon"), _strWindowMode);
Tracker.kvEvent(8315);
break;
case "normalMode_btn":
beginNewLevel(_arg1.target.parent.parent);
Tracker.kvEvent(8295);
break;
case "whackyMode_btn":
beginNewLevel(_arg1.target.parent.parent, true);
Tracker.kvEvent(8317);
break;
case "inviteFriends_btn":
_mainGameEngine.inviteFriends();
Tracker.kvEvent(8320);
break;
case "enterCompetition_btn":
_mainGameEngine.enterCompetition();
break;
case "bookmark_btn":
_mainGameEngine.updateBookmark();
break;
case "replayLevel_btn":
_mainGameEngine.removeLevel();
beginNewLevel(_levelButton);
Tracker.kvEvent(8319);
break;
case "share1_btn":
animateAllMenusOut();
transition_mc.gotoAndPlay(2);
FrameUtils.onEnterFrame("LOCKED", transition_mc, Delegate.create(_mainGameEngine.endLevel, false, false));
break;
case "continueGame_btn":
if (_isPlayGameClickAllowed){
_isPlayGameClickAllowed = false;
animateAllMenusOut();
_mainGameEngine.startLevel();
};
break;
case "quit_btn":
areYouSure_mc.visible = true;
break;
case "yes_btn":
areYouSure_mc.visible = false;
Bod.killAllBods = true;
_mainGameEngine.checkGameOver(true);
break;
case "no_btn":
areYouSure_mc.visible = false;
break;
case "mute_btn":
if (_arg1.target.currentFrame == 1){
_arg1.target.gotoAndStop(2);
SoundUtils.muteGlobal();
Tracker.kvEvent(8321);
} else {
_arg1.target.gotoAndStop(1);
SoundUtils.muteGlobal();
};
};
}
public function set secureSession(_arg1):void{
_strSecureSession = _arg1;
}
public function showWellDoneScreen(_arg1:int, _arg2:int){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_isPlayGameClickAllowed = true;
SoundUtils.fadeMusicStop("musicLoop1", 0, 1);
SoundUtils.fadeMusicPlay("musicLoop2", 1, 1, true, 999999);
SoundUtils.playSFX("sfxLevelSuccess");
TweenMax.to(WellDone_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
_local3 = Math.floor((_arg2 / 1000));
_local4 = (_local3 * _arg1);
_local5 = ((Bod.intSaved * _arg1) * 10);
_local6 = (_local4 + _local5);
_intCountdownLevel = _arg1;
_intCountdownTimeScore = _local4;
_intCountdownBodScore = _local5;
_intCountdownBodSaved = Bod.intSaved;
_intCountdownTimeLeft = (_intCountdownTimeLeftTotal = _arg2);
_intCountdownCount = 0;
updateScoreCookie(_arg1, _local6);
submitScores();
WellDone_mc.bodsSaved.text = Bod.intSaved;
WellDone_mc.timeLeft.text = Time.returnPreFormattedTimeFromNumber(_arg2, "MINUTES");
WellDone_mc.continue_btn.scaleX = (WellDone_mc.continue_btn.scaleY = 0);
WellDone_mc.totalScore.text = (unescape("%A3") + 0);
WellDone_mc.star1_mc.gotoAndStop(1);
WellDone_mc.star2_mc.gotoAndStop(1);
WellDone_mc.star3_mc.gotoAndStop(1);
_intCountdownBodPoints = 0;
_intCountdownTimePoints = 0;
if (_strFacebookUID == "0"){
WellDone_mc.buttons_mc.gotoAndStop("portal_success");
WellDone_mc.bannerAd_mc.gotoAndStop("portal_success");
} else {
WellDone_mc.buttons_mc.gotoAndStop("facebook_success");
WellDone_mc.bannerAd_mc.gotoAndStop("facebook_success");
};
TweenMax.to(this, 1, {onComplete:addEventListener, onCompleteParams:[Event.ENTER_FRAME, countDownScore]});
}
public function showLevelSelectMenu(){
if (((!(_isFacebookVarsLoaded)) && (!((_strFacebookUID == "0"))))){
addEventListener(Event.ENTER_FRAME, loadFacebookData);
} else {
_isPlayGameClickAllowed = true;
if (_strFacebookUID == "0"){
LevelSelect_mc.buttons_mc.gotoAndStop(2);
} else {
LevelSelect_mc.buttons_mc.gotoAndStop(1);
};
buildLevelSelectButtons();
moveLevelSelectButtons(0);
myRank();
TweenMax.to(LevelSelect_mc, 0.5, {delay:0.8, scaleX:1, scaleY:1, ease:Back.easeOut});
SoundUtils.playSFX("sfxPlayGame");
};
}
public function showGameOverScreen(){
_isPlayGameClickAllowed = true;
LevelFailed_mc.richList.text = (("Total Rich List Score: " + unescape("%A3")) + _cookieData.dataTotalScore);
SoundUtils.fadeMusicStop("musicLoop1", 0, 1);
SoundUtils.fadeMusicPlay("musicLoop2", 1, 1, true);
SoundUtils.playSFX("sfxGameOver");
TweenMax.to(LevelFailed_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
if (_strFacebookUID == "0"){
LevelFailed_mc.buttons_mc.gotoAndStop("portal_failure");
LevelFailed_mc.bannerAd_mc.gotoAndStop("portal_failure");
} else {
_mainGameEngine.updateMessage(_cookieData.dataTotalScore);
LevelFailed_mc.buttons_mc.gotoAndStop("facebook_failure");
LevelFailed_mc.bannerAd_mc.gotoAndStop("facebook_failure");
};
}
public function submitScores(_arg1:Boolean=false){
var _local2:String;
var _local3:SubmitForm;
var _local4:Array;
var _local5:Array;
var _local6:*;
_local2 = Token.secret(new int(_cookieData.dataTotalScore));
if (_strFacebookUID == "0"){
_local3 = new SubmitForm(((DOMAIN + ACTION) + "?action=scores_submit"));
_local3.addField("token", _token);
_local3.addField("player_full_name", _cookieData.playerName);
_local3.addField("secure_player_score", _local2);
_local3.addField("player_score", new int(_cookieData.dataTotalScore));
_local3.addField("player_guid", _cookieData.guid);
_local3.submit();
} else {
_local3 = new SubmitForm(((DOMAIN + ACTION) + "?action=facebook_submitscore"));
_local3.addField("token", _token);
_local3.addField("player_full_name", _cookieData.playerName);
_local3.addField("secure_player_score", _local2);
_local3.addField("player_score", new int(_cookieData.dataTotalScore));
_local3.addField("player_guid", _cookieData.guid);
_local3.addField("player_facebook_id", _strFacebookUID);
_local3.addField("uid", _strFacebookUID);
_local3.addField("ss", _strSecureSession);
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < _intNumberOfLevels) {
_local5.push(_cookieData[("bestLevelScore" + _local6)]);
_local4.push(_cookieData[("totalLevelScore" + _local6)]);
_local6++;
};
_local3.addField("player_facebook_levels", _local4.toString());
_local3.addField("player_facebook_best", _local5.toString());
_local3.submit();
};
}
public function showLevelBegin(_arg1, _arg2, _arg3){
LevelStart_mc.level.text = ("Level " + _arg1);
LevelStart_mc.bodsToSave.text = _arg2;
LevelStart_mc.bodPoints.text = (unescape("%A3") + _arg3);
TweenMax.to(LevelStart_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
}
public function levelSelectOver(_arg1:MouseEvent){
if (_arg1.target.buttonMode){
_arg1.target.play_mc.gotoAndStop(2);
};
}
public function getFacebookVars(){
var _local1:*;
_local1 = new SubmitForm(((DOMAIN + ACTION) + "?action=invitecount"));
_local1.addEventListener(SubmitForm.COMPLETE, setFacebookVars);
_local1.addField("player_facebook_id", _strFacebookUID);
_local1.addField("ss", _strSecureSession);
_local1.submit();
}
public function showTrapDoorOpenMessage(){
TweenMax.to(TrapDoor_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
TweenMax.to(TrapDoor_mc, 0.5, {delay:1.5, scaleX:0, scaleY:0, ease:Back.easeIn});
}
public function allowHomeClick(){
_isClickHomeAllowed = true;
}
public function animateMainMenu(_arg1:int, _arg2){
var _local3:*;
_local3 = 0.5;
if (_strFacebookUID == "0"){
TweenMax.to(MainMenu_mc.logo_mc, _local3, {scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.playGame_btn, _local3, {delay:0.3, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.addToFacebook_btn, _local3, {delay:0.4, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.highScores_btn, _local3, {delay:0.5, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.share_btn, _local3, {delay:0.6, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
} else {
TweenMax.to(MainMenu_mc.logo_mc, _local3, {scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.playGame1_btn, _local3, {delay:0.3, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.enterCompetition_btn, _local3, {delay:0.4, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
TweenMax.to(MainMenu_mc.inviteFriends_btn, _local3, {delay:0.5, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
};
_mainGameEngine.animateConfusedButton(_arg1, _arg2);
TweenMax.to(_mainGameEngine.backgroundOverlay_mc.mute_btn, _local3, {scaleX:_arg1, scaleY:_arg1, ease:_arg2});
if (_isPlayMorGamesShown){
TweenMax.to(MainMenu_mc.playMoreGames_btn, _local3, {delay:0.7, scaleX:_arg1, scaleY:_arg1, ease:_arg2});
};
if (_arg1 == 1){
setTimeout(SoundUtils.playSFX, 300, "sfxCharacterDie", false, 0, 0, true);
setTimeout(SoundUtils.playSFX, 400, "sfxCharacterDie", false, 0, 0, true);
setTimeout(SoundUtils.playSFX, 500, "sfxCharacterDie", false, 0, 0, true);
if (_strFacebookUID == "0"){
setTimeout(SoundUtils.playSFX, 600, "sfxCharacterDie", false, 0, 0, true);
};
};
}
private function countDownScore(_arg1:Event){
var _local2:*;
var _local3:int;
var _local4:Array;
var _local5:*;
var _local6:*;
_intCountdownCount++;
_local2 = (_intCountdownTimeScore + _intCountdownBodScore);
if ((((_intCountdownCount > 3)) && ((_intCountdownBodSaved > 0)))){
SoundUtils.playSFX("sfxScoreTally", false, 0, 0, true);
_intCountdownCount = 0;
_intCountdownBodSaved--;
_local5 = (Bod.intSaved - _intCountdownBodSaved);
_intCountdownBodPoints = ((_local5 * _intCountdownLevel) * 10);
WellDone_mc.bodsSaved.text = _intCountdownBodSaved;
} else {
if ((((((_intCountdownCount > 3)) && ((_intCountdownBodSaved <= 0)))) && ((_intCountdownTimeLeft > 0)))){
SoundUtils.playSFX("sfxScoreTally", false, 0, 0, true);
_intCountdownTimeLeft = (_intCountdownTimeLeft - 3100);
if (_intCountdownTimeLeft <= 0){
_intCountdownTimeLeft = 0;
};
_local6 = (_intCountdownTimeLeftTotal - _intCountdownTimeLeft);
_intCountdownTimePoints = (Math.floor((_local6 / 1000)) * _intCountdownLevel);
WellDone_mc.timeLeft.text = Time.returnPreFormattedTimeFromNumber(_intCountdownTimeLeft, "MINUTES");
};
};
if ((((_intCountdownTimeLeft == 0)) && ((_intCountdownBodSaved == 0)))){
removeEventListener(Event.ENTER_FRAME, countDownScore);
_mainGameEngine.scoreComplete();
TweenMax.to(WellDone_mc.continue_btn, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
};
_local3 = (_intCountdownBodPoints + _intCountdownTimePoints);
_mainGameEngine.updateScore(((_cookieData.dataTotalScore - _local2) + _local3));
WellDone_mc.totalScore.text = (unescape("%A3") + _local3);
_local4 = this[(("_arrLevel" + (_intCountdownLevel - 1)) + "Points")];
if (_local3 > _local4[0]){
WellDone_mc.star1_mc.gotoAndStop(2);
};
if (_local3 > _local4[1]){
WellDone_mc.star2_mc.gotoAndStop(2);
};
if (_local3 > _local4[2]){
WellDone_mc.star3_mc.gotoAndStop(2);
};
}
public function unlockLevel(_arg1){
if (_arg1 <= _intNumberOfLevels){
_cookieData[("isLocked" + _arg1)] = false;
_cookie.updateCookie(_cookieData);
buildLevelSelectButtons();
};
}
public function handleMouseOut(_arg1:MouseEvent){
if (!(_arg1.target is TextField)){
if ((((_arg1.target is SimpleButton)) || (_arg1.target.buttonMode))){
switch (_arg1.target.name){
case "playGame_btn":
case "addToFacebook_btn":
case "highScores_btn":
case "share_btn":
case "highscoresDaily_btn":
case "highscoresMonthly_btn":
case "highscoresAllTime_btn":
case "addToFacebookLarge_btn":
case "playGame1_btn":
case "enterCompetition_btn":
case "inviteFriends_btn":
break;
default:
TweenMax.to(_arg1.target, 0.2, {scaleX:1, scaleY:1, ease:Back.easeOut});
break;
};
};
};
}
private function showRank(_arg1:Event):void{
Ranking.removeEventListener(Event.COMPLETE, showRank);
LevelSelect_mc.worldRank.text = Ranking.rank;
_mainGameEngine.showRank();
}
public function buildLevelSelectButtons(){
var _local1:*;
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:Sprite;
var _local6:MovieClip;
var _local7:*;
var _local8:int;
var _local9:Array;
var _local10:*;
myRank();
_local1 = LevelSelect_mc.LevelButtonHolder_mc;
if (LevelSelect_mc.LevelButtonHolder_mc.numChildren == 0){
_local4 = 0;
while (_local4 < _intNumberOfLevels) {
_local6 = new LevelSelectBtn();
_local6.x = (_local4 * 160);
_local6.level = (_local4 + 1);
_local6.addEventListener(MouseEvent.CLICK, showOptions);
_local6.addEventListener(MouseEvent.MOUSE_OVER, levelSelectOver);
_local6.addEventListener(MouseEvent.MOUSE_OUT, levelSelectOut);
_local1.addChild(_local6);
_local4++;
};
_local5 = new Sprite();
_local5.graphics.beginFill(0xFF0000);
_local5.graphics.drawRect(_local1.x, _local1.y, 470, 220);
_local5.mouseEnabled = false;
LevelSelect_mc.addChild(_local5);
_local1.mask = _local5;
_intLevelSelectX = _local1.x;
};
_local2 = new Array("Introduction", "Beam me Up", "Fan-tastic", "More Friends", "Don't Stop", "Keep Up", "Fire in the Hole", "Switch & Go", "Three's a Crowd", "Weight There", "Back to Front", "Push the Button", "Aim High", "Hanging Around", "Hard as Nails");
_local3 = 0;
while (_local3 < _local1.numChildren) {
_local7 = _local1.getChildAt(_local3);
_local7.levelName.text = (((_local3 + 1) + ". ") + _local2[_local3]);
_local7.star1_mc.gotoAndStop(1);
_local7.star1_mc.mouseEnabled = false;
_local7.star2_mc.gotoAndStop(1);
_local7.star2_mc.mouseEnabled = false;
_local7.star3_mc.gotoAndStop(1);
_local7.star3_mc.mouseEnabled = false;
_local7.play_mc.mouseEnabled = false;
_local7.mouseChildren = false;
_local8 = _cookieData[("bestLevelScore" + _local3)];
_local9 = this[(("_arrLevel" + _local3) + "Points")];
if (_local8 > _local9[0]){
_local7.star1_mc.gotoAndStop(2);
};
if (_local8 > _local9[1]){
_local7.star2_mc.gotoAndStop(2);
};
if (_local8 > _local9[2]){
_local7.star3_mc.gotoAndStop(2);
};
_local7.levelThumbs_mc.gotoAndStop((_local3 + 1));
_local7.levelThumbs_mc.mouseEnabled = false;
_local7.alpha = 1;
_local7.buttonMode = true;
_local7.rollOver_mc.y = -200;
_local7.rollOver_mc.whackyMode_btn.visible = false;
_local7.rollOver_mc.whackyMode_mc.visible = true;
_local7.rollOver_mc.whackyStatus.text = "* available on Facebook";
_local7.rollOver_mc.visible = true;
if (_strFacebookUID != "0"){
if (Math.floor((_intWhackyBonus / 5)) >= (_local3 + 1)){
_local7.rollOver_mc.whackyMode_btn.visible = true;
_local7.rollOver_mc.whackyMode_mc.visible = false;
_local7.rollOver_mc.whackyStatus.text = "";
} else {
_local7.rollOver_mc.whackyStatus.text = (("* invite " + ((_local3 + 1) * 5)) + " friends");
};
};
_local7.padlock_mc.visible = false;
_local7.play_mc.visible = true;
_local7.bestScore.text = (("Best Score: " + unescape("%A3")) + _local8);
if (((_cookieData[("isLocked" + _local3)]) && (!(_isLevelDebug)))){
_local7.buttonMode = false;
_local7.blendMode = "layer";
_local7.alpha = 0.5;
_local7.bestScore.text = "Level Locked";
_local7.padlock_mc.visible = true;
_local7.play_mc.visible = false;
_local7.rollOver_mc.visible = false;
} else {
_local10 = (_local1.numChildren - 1);
if (((_cookieData[("isLocked" + _local10)]) && (!(_isLevelDebug)))){
_intLevelSelectPosition = (_local3 - 1);
};
moveLevelSelectButtons(0);
};
_local3++;
};
}
public function animateAllMenusOut(){
var _local1:*;
if (_isClickHomeAllowed){
_isClickHomeAllowed = false;
_local1 = 0.5;
if (MainMenu_mc.logo_mc.scaleX > 0){
animateMainMenu(0, Back.easeIn);
};
TweenMax.to(LevelSelect_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
TweenMax.to(HighScores_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
TweenMax.to(WellDone_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
TweenMax.to(LevelFailed_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
TweenMax.to(ShareGame_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
TweenMax.to(EnterName_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
TweenMax.to(LevelStart_mc, _local1, {scaleX:0, scaleY:0, ease:Back.easeIn});
setTimeout(allowHomeClick, 600);
};
}
public function showOptions(_arg1:MouseEvent){
var _local2:*;
var _local3:int;
var _local4:*;
_local2 = LevelSelect_mc.LevelButtonHolder_mc;
_local3 = 0;
while (_local3 < _local2.numChildren) {
_local4 = _local2.getChildAt(_local3);
_local4.buttonMode = true;
_local4.play_mc.mouseEnabled = false;
_local4.play_mc.gotoAndStop(1);
_local4.mouseChildren = false;
TweenMax.to(_local4.rollOver_mc, 0.2, {y:-200});
_local3++;
};
_arg1.target.buttonMode = false;
_arg1.target.mouseChildren = true;
TweenMax.to(_arg1.target.rollOver_mc, 0.2, {y:9});
}
public function showShare(){
TweenMax.to(ShareGame_mc, 0.5, {delay:0.8, scaleX:1, scaleY:1, ease:Back.easeOut});
}
public function loadCookie():void{
if ((_strFacebookUID == "0")){
_cookie = new FlashCookie(_cookieName, _cookieData);
} else {
_cookie = new FlashCookie(_cookieFacebook, _cookieData);
};
_cookieData = _cookie.getCookie();
}
public function showChooseLevelScreen(){
TweenMax.to(LevelSelect_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
}
public function failLevel(){
_isPlayGameClickAllowed = true;
animateAllMenusOut();
transition_mc.gotoAndPlay(2);
FrameUtils.onEnterFrame("LOCKED", transition_mc, Delegate.create(_mainGameEngine.endLevel, true, false));
}
public function updateScoreCookie(_arg1:int, _arg2:int){
var _local3:*;
var _local4:*;
_local3 = (_arg1 - 1);
_local4 = (_cookieData[("totalLevelScore" + _local3)] + _arg2);
if (_arg2 > _cookieData[("bestLevelScore" + _local3)]){
_cookieData[("bestLevelScore" + _local3)] = _arg2;
};
_cookieData[("totalLevelScore" + _local3)] = _local4;
calculateTotalScore();
}
public function buildMenus(){
animateMainMenu(1, Back.easeOut);
buildLevelSelectButtons();
}
private function crossDomain():void{
Security.allowDomain("*");
try {
Security.loadPolicyFile(CROSSDOMAIN_A);
} catch(e:Error) {
};
try {
Security.loadPolicyFile(CROSSDOMAIN_B);
} catch(e:Error) {
};
}
private function security():void{
var randomNumber:*;
randomNumber = Math.ceil((Math.random() * 1000000));
try {
Token.request((((DOMAIN + ACTION_TOKEN) + "&rand=") + randomNumber), secure, _debug);
} catch(e:Error) {
};
}
public function setupLevelData():void{
var _local1:*;
_local1 = 0;
while (_local1 < _intNumberOfLevels) {
_cookieData[("bestLevelScore" + _local1)] = 0;
_cookieData[("totalLevelScore" + _local1)] = 0;
if ((_local1 == 0)){
_cookieData[("isLocked" + _local1)] = false;
} else {
_cookieData[("isLocked" + _local1)] = true;
};
_local1++;
};
}
public function set facebookUID(_arg1):void{
_strFacebookUID = _arg1;
if (_arg1 != "0"){
getFacebookVars();
Tracker.kvEvent(8318);
};
}
public function moveLevelSelectButtons(_arg1){
var _local2:*;
var _local3:*;
_local2 = LevelSelect_mc.LevelButtonHolder_mc;
_intLevelSelectPosition = (_intLevelSelectPosition + _arg1);
LevelSelect_mc.leftArrow_btn.visible = true;
LevelSelect_mc.rightArrow_btn.visible = true;
if (_intLevelSelectPosition <= 0){
_intLevelSelectPosition = 0;
LevelSelect_mc.leftArrow_btn.visible = false;
};
if (_intLevelSelectPosition >= (_intNumberOfLevels - 3)){
_intLevelSelectPosition = (_intNumberOfLevels - 3);
LevelSelect_mc.rightArrow_btn.visible = false;
};
_local3 = (_intLevelSelectX - (_intLevelSelectPosition * 160));
TweenMax.to(_local2, 0.8, {x:_local3, ease:Back.easeInOut});
}
private function showScores(_arg1:Event):void{
var _local2:XMLList;
var _local3:int;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
HighScores_mc.position.text = "";
_local2 = _scores.data;
_local3 = 0;
_local3 = 1;
while (_local3 <= 10) {
HighScores_mc[("playerNames" + _local3)].text = "";
HighScores_mc[("scores" + _local3)].text = "";
_local5 = HighScores_mc[(("hs" + _local3) + "_mc")];
_local5.visible = false;
_local3++;
};
_local3 = 0;
for each (_local4 in _local2) {
_local3++;
_local6 = HighScores_mc[(("hs" + _local3) + "_mc")];
_local7 = _local4.@player_name.toUpperCase();
_local6.visible = true;
HighScores_mc[("playerNames" + _local3)].text = _local7;
HighScores_mc[("scores" + _local3)].text = (unescape("%A3") + _local4.@player_score);
HighScores_mc.position.appendText((_local3 + "\n"));
if ((new int(_local4.@player_fb_id) > 0)){
_local6.gotoAndStop(2);
} else {
_local6.gotoAndStop(1);
};
};
}
public function levelSelectOut(_arg1:MouseEvent){
if (_arg1.target.buttonMode){
_arg1.target.play_mc.gotoAndStop(1);
};
}
public function beginNewLevel(_arg1, _arg2:Boolean=false){
_levelButton = _arg1;
SoundUtils.playSFX("sfxLevelSelect");
SoundUtils.fadeMusicStop("musicLoop2", 0, 1);
SoundUtils.fadeMusicPlay("musicLoop1", 0.5, 1, true);
animateAllMenusOut();
transition_mc.gotoAndPlay(2);
FrameUtils.onEnterFrame("LOCKED", transition_mc, Delegate.create(_mainGameEngine.beginLevel, _arg1.level, _arg2));
}
public function loadFacebookData(_arg1:Event){
if (_isFacebookVarsLoaded){
removeEventListener(Event.ENTER_FRAME, loadFacebookData);
showLevelSelectMenu();
};
}
public function showTeleportMessage(){
TweenMax.to(Teleport_mc, 0.5, {scaleX:1, scaleY:1, ease:Back.easeOut});
TweenMax.to(Teleport_mc, 0.5, {delay:1.5, scaleX:0, scaleY:0, ease:Back.easeIn});
}
public function setFacebookVars(_arg1:Event){
var _local2:String;
var _local3:String;
var _local4:*;
var _local5:*;
var _local6:*;
_isFacebookVarsLoaded = true;
loadCookie();
_intWhackyBonus = new int(_arg1.target.getVar("bonuscount"));
_local2 = _arg1.target.getVar("bestarray");
_local3 = _arg1.target.getVar("levelsarray");
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < _intNumberOfLevels) {
_cookieData[("bestLevelScore" + _local6)] = 0;
_cookieData[("totalLevelScore" + _local6)] = 0;
if ((_local6 == 0)){
_cookieData[("isLocked" + _local6)] = false;
} else {
_cookieData[("isLocked" + _local6)] = true;
};
if ((_local6 == 0)){
_cookieData[("isLocked" + _local6)] = false;
} else {
_cookieData[("isLocked" + _local6)] = true;
};
_local4.push(0);
_local5.push(0);
_local6++;
};
if (((!((_local2 == null))) && (!((_local3 == null))))){
_arrLevelBest = _local2.split(",");
_arrLevelTotal = _local3.split(",");
} else {
_arrLevelBest = _local5;
_arrLevelTotal = _local4;
};
setupFacebookLevels();
}
public function setupFacebookLevels():void{
var _local1:*;
_local1 = 0;
while (_local1 < _intNumberOfLevels) {
if (_local1 == 0){
_cookieData[("isLocked" + _local1)] = false;
};
if (((!((_local1 == 0))) && (!((new int(_arrLevelTotal[(_local1 - 1)]) == 0))))){
_cookieData[("isLocked" + _local1)] = false;
} else {
if (_local1 != 0){
_cookieData[("isLocked" + _local1)] = true;
};
};
_cookieData[("bestLevelScore" + _local1)] = new int(_arrLevelBest[_local1]);
_cookieData[("totalLevelScore" + _local1)] = new int(_arrLevelTotal[_local1]);
_local1++;
};
calculateTotalScore();
}
public function submitWorldRank(){
}
public function calculateTotalScore(){
var _local1:int;
var _local2:*;
_local1 = 0;
_local2 = 0;
while (_local2 < _intNumberOfLevels) {
_local1 = (_local1 + _cookieData[("totalLevelScore" + _local2)]);
_local2++;
};
_cookieData.dataTotalScore = _local1;
_cookie.updateCookie(_cookieData);
if (_cookieData.dataEmail != ""){
};
myRank();
}
private function secure():void{
_token = Token.encypted;
_strGUID = Token.getVar("player_guid");
if (_cookieData.guid == ""){
_cookieData.guid = _strGUID;
_cookie.updateCookie(_cookieData);
};
_isPlayMorGamesShown = new Boolean(new int(Token.getVar("cl4")));
if (_isPlayMorGamesShown){
TweenMax.to(MainMenu_mc.playMoreGames_btn, 0.5, {delay:0.7, scaleX:1, scaleY:1, ease:Back.easeOut});
};
}
public function handleMouseOver(_arg1:MouseEvent){
if (!(_arg1.target is TextField)){
if ((((_arg1.target is SimpleButton)) || (_arg1.target.buttonMode))){
SoundUtils.playSFX("sfxRollOver", false, 0, 0, true);
};
if ((_arg1.target is SimpleButton)){
switch (_arg1.target.name){
case "playGame_btn":
case "addToFacebook_btn":
case "highScores_btn":
case "share_btn":
case "highscoresDaily_btn":
case "highscoresMonthly_btn":
case "highscoresAllTime_btn":
case "addToFacebookLarge_btn":
case "playGame1_btn":
case "enterCompetition_btn":
case "inviteFriends_btn":
break;
default:
TweenMax.to(_arg1.target, 0.2, {scaleX:1.07, scaleY:1.07, ease:Back.easeIn});
break;
};
};
};
}
public function loadHighScores(_arg1){
var _local2:*;
_local2 = Math.ceil((Math.random() * 1000000));
_scores = new Scores();
_scores.addEventListener(Event.COMPLETE, showScores);
_scores.load((((((DOMAIN + ACTION) + "?action=") + _arg1) + "&antiCache=") + _local2));
}
private function myRank():void{
var _local1:Number;
LevelSelect_mc.totalScore.text = (unescape("%A3") + _cookieData.dataTotalScore);
_local1 = _cookieData.dataTotalScore;
Ranking.addEventListener(Event.COMPLETE, showRank);
Ranking.findRank(_local1, ((DOMAIN + ACTION) + "?action=worldrank"));
}
}
}//package
Section 142
//mouseIcon (mouseIcon)
package {
import flash.display.*;
public dynamic class mouseIcon extends MovieClip {
}
}//package
Section 143
//musicLoop1 (musicLoop1)
package {
import flash.media.*;
public dynamic class musicLoop1 extends Sound {
}
}//package
Section 144
//musicLoop2 (musicLoop2)
package {
import flash.media.*;
public dynamic class musicLoop2 extends Sound {
}
}//package
Section 145
//PreloadDisplay (PreloadDisplay)
package {
import flash.display.*;
import flash.text.*;
public dynamic class PreloadDisplay extends MovieClip {
public var bar_mc:MovieClip;
public var percentage:TextField;
}
}//package
Section 146
//RedBodFalling (RedBodFalling)
package {
import flash.display.*;
public dynamic class RedBodFalling extends BitmapData {
public function RedBodFalling(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 147
//RedBodPop (RedBodPop)
package {
import flash.display.*;
public dynamic class RedBodPop extends BitmapData {
public function RedBodPop(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 148
//RedBodTeleport (RedBodTeleport)
package {
import flash.display.*;
public dynamic class RedBodTeleport extends BitmapData {
public function RedBodTeleport(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 149
//RedBodWalking (RedBodWalking)
package {
import flash.display.*;
public dynamic class RedBodWalking extends BitmapData {
public function RedBodWalking(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 150
//RedExit (RedExit)
package {
import flash.display.*;
public dynamic class RedExit extends BitmapData {
public function RedExit(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 151
//Saw (Saw)
package {
import flash.display.*;
public dynamic class Saw extends BitmapData {
public function Saw(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 152
//sfxCharacterDie (sfxCharacterDie)
package {
import flash.media.*;
public dynamic class sfxCharacterDie extends Sound {
}
}//package
Section 153
//sfxCreekyDoor (sfxCreekyDoor)
package {
import flash.media.*;
public dynamic class sfxCreekyDoor extends Sound {
}
}//package
Section 154
//sfxGameOver (sfxGameOver)
package {
import flash.media.*;
public dynamic class sfxGameOver extends Sound {
}
}//package
Section 155
//sfxHazardBearTrap (sfxHazardBearTrap)
package {
import flash.media.*;
public dynamic class sfxHazardBearTrap extends Sound {
}
}//package
Section 156
//sfxHazardFan (sfxHazardFan)
package {
import flash.media.*;
public dynamic class sfxHazardFan extends Sound {
}
}//package
Section 157
//sfxHazardFire (sfxHazardFire)
package {
import flash.media.*;
public dynamic class sfxHazardFire extends Sound {
}
}//package
Section 158
//sfxHazardSaw (sfxHazardSaw)
package {
import flash.media.*;
public dynamic class sfxHazardSaw extends Sound {
}
}//package
Section 159
//sfxHazardWater (sfxHazardWater)
package {
import flash.media.*;
public dynamic class sfxHazardWater extends Sound {
}
}//package
Section 160
//sfxLevelChanger (sfxLevelChanger)
package {
import flash.media.*;
public dynamic class sfxLevelChanger extends Sound {
}
}//package
Section 161
//sfxLevelSelect (sfxLevelSelect)
package {
import flash.media.*;
public dynamic class sfxLevelSelect extends Sound {
}
}//package
Section 162
//sfxLevelSuccess (sfxLevelSuccess)
package {
import flash.media.*;
public dynamic class sfxLevelSuccess extends Sound {
}
}//package
Section 163
//sfxPanelSlideIn (sfxPanelSlideIn)
package {
import flash.media.*;
public dynamic class sfxPanelSlideIn extends Sound {
}
}//package
Section 164
//sfxPencilDraw (sfxPencilDraw)
package {
import flash.media.*;
public dynamic class sfxPencilDraw extends Sound {
}
}//package
Section 165
//sfxPencilDrawRelease (sfxPencilDrawRelease)
package {
import flash.media.*;
public dynamic class sfxPencilDrawRelease extends Sound {
}
}//package
Section 166
//sfxPlayGame (sfxPlayGame)
package {
import flash.media.*;
public dynamic class sfxPlayGame extends Sound {
}
}//package
Section 167
//sfxRollOver (sfxRollOver)
package {
import flash.media.*;
public dynamic class sfxRollOver extends Sound {
}
}//package
Section 168
//sfxScoreTally (sfxScoreTally)
package {
import flash.media.*;
public dynamic class sfxScoreTally extends Sound {
}
}//package
Section 169
//sfxSwitchOn (sfxSwitchOn)
package {
import flash.media.*;
public dynamic class sfxSwitchOn extends Sound {
}
}//package
Section 170
//sfxTeleportIn (sfxTeleportIn)
package {
import flash.media.*;
public dynamic class sfxTeleportIn extends Sound {
}
}//package
Section 171
//sfxTeleportOut (sfxTeleportOut)
package {
import flash.media.*;
public dynamic class sfxTeleportOut extends Sound {
}
}//package
Section 172
//sfxWeightDrop (sfxWeightDrop)
package {
import flash.media.*;
public dynamic class sfxWeightDrop extends Sound {
}
}//package
Section 173
//sfxYipee1 (sfxYipee1)
package {
import flash.media.*;
public dynamic class sfxYipee1 extends Sound {
}
}//package
Section 174
//sfxYipee2 (sfxYipee2)
package {
import flash.media.*;
public dynamic class sfxYipee2 extends Sound {
}
}//package
Section 175
//Spikes (Spikes)
package {
import flash.display.*;
public dynamic class Spikes extends BitmapData {
public function Spikes(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 176
//Teleport (Teleport)
package {
import flash.display.*;
public dynamic class Teleport extends BitmapData {
public function Teleport(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 177
//TeleportOff (TeleportOff)
package {
import flash.display.*;
public dynamic class TeleportOff extends BitmapData {
public function TeleportOff(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 178
//TonneWeight (TonneWeight)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import console.sounds.*;
public class TonneWeight extends MovieClip {
private var _intGravity;// = 1
private var _intRaiseSpeed;// = 5
private var _intWeightHeight:int;
private var _yCurrent:int;
private var _intFallTime:int;
private var _arrCollisionColours;
private var _intSpeedY;// = 0
private var _bmpTonneWeightChain:BitmapData;
private var _intStartDelay:int;
private var _yStart:int;
private var _bmpTonneWeightChainCollision;
private var _intCounter:int;
private var _bmpTonneWeight:BitmapData;
private var _classCollisionDetection:CollisionDetection;
private var _bmpTonneWeightCollision:BitmapData;
private var _intWeightWidth:int;
private var _xStart:int;
private var _intSpeedMax;// = 15
private var _bmpTonneWeightTop:BitmapData;
private static var _bmpWeightDisplay:BitmapData;
private static var _bmpWeightCollisionMap:BitmapData;
private static var _bmpCollisionBlitMap:BitmapData;
public function TonneWeight(_arg1:int, _arg2:int, _arg3:int, _arg4:int=0){
_arrCollisionColours = new Array("0");
_classCollisionDetection = new CollisionDetection();
_bmpTonneWeight = new TonneWeightBmp(0, 0);
_bmpTonneWeightCollision = new TonneWeightCollision(0, 0);
_bmpTonneWeightChain = new TonneWeightChain(0, 0);
_bmpTonneWeightTop = new TonneWeightTop(0, 0);
_bmpTonneWeightChainCollision = new BitmapData((_bmpTonneWeight.width - 10), _bmpTonneWeight.height, false, 0);
_intSpeedY = 0;
_intSpeedMax = 15;
_intGravity = 1;
_intRaiseSpeed = 5;
super();
_xStart = _arg1;
_yStart = (_yCurrent = _arg2);
_intStartDelay = _arg4;
_classCollisionDetection.collisionBlitMap = _bmpCollisionBlitMap;
_intFallTime = _arg3;
_intWeightHeight = _bmpTonneWeight.height;
_intWeightWidth = _bmpTonneWeight.width;
addEventListener(Event.ENTER_FRAME, countDownDelay);
addEventListener(Event.ENTER_FRAME, drawWeights);
}
public function destroy(){
removeEventListener(Event.ENTER_FRAME, drawWeights);
removeEventListener(Event.ENTER_FRAME, fallTonneWeight);
removeEventListener(Event.ENTER_FRAME, raiseTonneWeight);
}
private function drawWeights(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
_local2 = Main.worldPosition;
_local3 = (_xStart + _local2.x);
_local4 = (_yCurrent + _local2.y);
if ((((((((_local3 > (0 - _bmpTonneWeight.width))) && ((_local3 < 650)))) && ((_local4 > (0 - _bmpTonneWeight.height))))) && ((_local4 < 450)))){
_bmpWeightDisplay.copyPixels(_bmpTonneWeight, _bmpTonneWeight.rect, new Point(_xStart, _yCurrent), null, null, true);
};
_local5 = (Math.ceil(((_yCurrent - _yStart) / 25)) + 1);
_local6 = 0;
while (_local6 < _local5) {
_local8 = (_local6 * 25);
_local9 = (_xStart + 28);
_local10 = (_yCurrent - _local8);
_local3 = (_local9 + _local2.x);
_local4 = (_local10 + _local2.y);
if ((((((((_local3 > (0 - _bmpTonneWeightChain.width))) && ((_local3 < 650)))) && ((_local4 > (0 - _bmpTonneWeightChain.height))))) && ((_local4 < 450)))){
_bmpWeightDisplay.copyPixels(_bmpTonneWeightChain, _bmpTonneWeightChain.rect, new Point(_local9, _local10), null, null, true);
};
_bmpWeightCollisionMap.copyPixels(_bmpTonneWeightChainCollision, _bmpTonneWeightChainCollision.rect, new Point((_xStart + 5), (_yCurrent - _local8)), null, null, true);
_local6++;
};
_local7 = (_xStart + 15);
_local3 = (_local7 + _local2.x);
_local4 = (_yStart + _local2.y);
if ((((((((_local3 > (0 - _bmpTonneWeightTop.width))) && ((_local3 < 650)))) && ((_local4 > (0 - _bmpTonneWeightTop.height))))) && ((_local4 < 450)))){
_bmpWeightDisplay.copyPixels(_bmpTonneWeightTop, _bmpTonneWeightTop.rect, new Point(_local7, _yStart));
};
_bmpWeightCollisionMap.copyPixels(_bmpTonneWeightCollision, _bmpTonneWeightCollision.rect, new Point(_xStart, _yCurrent), null, null, true);
}
private function playTonneSound(){
var _local1:*;
var _local2:*;
_local1 = (_xStart + Main.worldPosition.x);
_local2 = (_yCurrent + Main.worldPosition.y);
if ((((((((_local1 > 0)) && ((_local1 < 650)))) && ((_local2 > 0)))) && ((_local2 < 450)))){
SoundUtils.playSFX("sfxWeightDrop", false, 0, 0, true);
};
}
private function countDownDelay(_arg1:Event){
if (!Main.isPaused){
_intCounter++;
if (_intCounter >= _intStartDelay){
_intCounter = 0;
removeEventListener(Event.ENTER_FRAME, countDownDelay);
addEventListener(Event.ENTER_FRAME, fallTonneWeight);
};
};
}
private function raiseTonneWeight(_arg1:Event){
if (!Main.isPaused){
_intCounter++;
if (_intCounter >= (_intFallTime / 2)){
_yCurrent = (_yCurrent - _intRaiseSpeed);
if ((_yCurrent - _yStart) <= _intRaiseSpeed){
_yCurrent = _yStart;
_intCounter = 0;
removeEventListener(Event.ENTER_FRAME, raiseTonneWeight);
addEventListener(Event.ENTER_FRAME, fallTonneWeight);
};
};
};
}
private function fallTonneWeight(_arg1:Event){
var _local2:*;
var _local3:Point;
if (!Main.isPaused){
_intCounter++;
if (_intCounter >= _intFallTime){
if (_intSpeedY < _intSpeedMax){
_intSpeedY = (_intSpeedY + _intGravity);
};
_local2 = _yCurrent;
_local2 = (_local2 + _intSpeedY);
_local3 = _classCollisionDetection.checkCollisionYAxis((_xStart + (_intWeightWidth / 2)), (_yCurrent + _intWeightHeight), (_local2 + _intWeightHeight), _arrCollisionColours);
if (_local3.y != 0.1){
_local2 = (_local3.y - _intWeightHeight);
removeEventListener(Event.ENTER_FRAME, fallTonneWeight);
addEventListener(Event.ENTER_FRAME, raiseTonneWeight);
_intCounter = 0;
_intSpeedY = 0;
playTonneSound();
};
_yCurrent = _local2;
};
};
}
public static function setBlitMaps(_arg1, _arg2, _arg3){
_bmpCollisionBlitMap = _arg1;
_bmpWeightCollisionMap = _arg2;
_bmpWeightDisplay = _arg3;
}
}
}//package
Section 179
//TonneWeightBmp (TonneWeightBmp)
package {
import flash.display.*;
public dynamic class TonneWeightBmp extends BitmapData {
public function TonneWeightBmp(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 180
//TonneWeightChain (TonneWeightChain)
package {
import flash.display.*;
public dynamic class TonneWeightChain extends BitmapData {
public function TonneWeightChain(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 181
//TonneWeightCollision (TonneWeightCollision)
package {
import flash.display.*;
public dynamic class TonneWeightCollision extends BitmapData {
public function TonneWeightCollision(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 182
//TonneWeightTop (TonneWeightTop)
package {
import flash.display.*;
public dynamic class TonneWeightTop extends BitmapData {
public function TonneWeightTop(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 183
//Trapdoor (Trapdoor)
package {
import flash.display.*;
public dynamic class Trapdoor extends BitmapData {
public function Trapdoor(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 184
//Water (Water)
package {
import flash.display.*;
public dynamic class Water extends BitmapData {
public function Water(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 185
//Wind1 (Wind1)
package {
import flash.display.*;
public dynamic class Wind1 extends BitmapData {
public function Wind1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 186
//Wind2 (Wind2)
package {
import flash.display.*;
public dynamic class Wind2 extends BitmapData {
public function Wind2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 187
//Wind3 (Wind3)
package {
import flash.display.*;
public dynamic class Wind3 extends BitmapData {
public function Wind3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 188
//YellowBodFalling (YellowBodFalling)
package {
import flash.display.*;
public dynamic class YellowBodFalling extends BitmapData {
public function YellowBodFalling(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 189
//YellowBodPop (YellowBodPop)
package {
import flash.display.*;
public dynamic class YellowBodPop extends BitmapData {
public function YellowBodPop(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 190
//YellowBodTeleport (YellowBodTeleport)
package {
import flash.display.*;
public dynamic class YellowBodTeleport extends BitmapData {
public function YellowBodTeleport(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 191
//YellowBodWalking (YellowBodWalking)
package {
import flash.display.*;
public dynamic class YellowBodWalking extends BitmapData {
public function YellowBodWalking(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 192
//YellowExit (YellowExit)
package {
import flash.display.*;
public dynamic class YellowExit extends BitmapData {
public function YellowExit(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package