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

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

440757_Music_Catch___533x400.swf

This is the info page for
Flash #20204

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


ActionScript [AS3]
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 = new Array(); var _local3:int = (_arg1.length * 8); var _local4 = 0xFF; var _local5:int; 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 = (((_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 _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local2 = 1732584193; var _local3 = -271733879; var _local4 = -1732584194; var _local5 = 271733878; var _local10:Array = createBlocks(_arg1); var _local11:int = _local10.length; var _local12:int; 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 _local4:int; var _local5:int; var _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 = (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
//Transitions (com.boostworthy.animation.easing.Transitions) package com.boostworthy.animation.easing { public final class Transitions { public static const SINE_OUT:String = "sineOut"; public static const QUAD_IN_AND_OUT:String = "quadInAndOut"; private static const ELASTIC_PERIOD:Number = 400; public static const QUART_OUT:String = "quartOut"; public static const BOUNCE:String = "bounce"; public static const EXPO_IN:String = "expoIn"; public static const SINE_IN:String = "sineIn"; public static const CUBIC_OUT:String = "cubicOut"; public static const QUINT_OUT:String = "quintOut"; public static const QUAD_IN:String = "quadIn"; public static const QUINT_IN_AND_OUT:String = "quintInAndOut"; public static const ELASTIC_OUT:String = "elasticOut"; public static const LINEAR:String = "linear"; public static const QUART_IN_AND_OUT:String = "quartInAndOut"; public static const QUAD_OUT:String = "quadOut"; public static const QUINT_IN:String = "quintIn"; public static const CUBIC_IN_AND_OUT:String = "cubicInAndOut"; public static const QUART_IN:String = "quartIn"; public static const DEFAULT_TRANSITION:String = "linear"; private static const BACK_OVERSHOOT:Number = 1.70158; public static const BACK_OUT:String = "backOut"; private static const ELASTIC_AMPLITUDE:Number = undefined; public static const CUBIC_IN:String = "cubicIn"; public static const ELASTIC_IN_AND_OUT:String = "elasticInAndOut"; public static const EXPO_OUT:String = "expoOut"; public static const BACK_IN_AND_OUT:String = "backInAndOut"; public static const ELASTIC_IN:String = "elasticIn"; public static const EXPO_IN_AND_OUT:String = "expoInAndOut"; public static const BACK_IN:String = "backIn"; public static const SINE_IN_AND_OUT:String = "sineInAndOut"; public static function quadOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function expoOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1)==_arg4) ? (_arg2 + _arg3) : ((_arg3 * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2)); } public static function expoInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2)); }; --_arg1; return ((((_arg3 / 2) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2)); } public static function quintOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function cubicIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2)); } public static function sineIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2) + _arg3)); } public static function sineOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } public static function quartOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2)); } public static function sineInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) / 2) * (Math.cos(((_arg1 / _arg4) * Math.PI)) - 1)) + _arg2)); } public static function bounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function backInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number = BACK_OVERSHOOT; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ _local5 = (_local5 * 1.525); return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local5 + 1) * _arg1) - _local5))) + _arg2)); }; _arg1 = (_arg1 - 2); _local5 = (_local5 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local5 + 1) * _arg1) + _local5)) + 2)) + _arg2)); } public static function expoIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1)==0) ? _arg2 : ((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2)); } public static function cubicOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function linear(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function quadIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function quintIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function elasticOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local7:Number; var _local5:Number = ELASTIC_AMPLITUDE; var _local6:Number = ELASTIC_PERIOD; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (!_local6){ _local6 = (_arg4 * 0.3); }; if (((!(_local5)) || ((_local5 < Math.abs(_arg3))))){ _local5 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local5))); }; return (((((_local5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2)); } public static function quartInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2)); } public static function quartIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function quadInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } public static function quintInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } public static function elasticIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local7:Number; var _local5:Number = ELASTIC_AMPLITUDE; var _local6:Number = ELASTIC_PERIOD; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (!_local6){ _local6 = (_arg4 * 0.3); }; if (((!(_local5)) || ((_local5 < Math.abs(_arg3))))){ _local5 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local5))); }; --_arg1; return ((-(((_local5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); } public static function cubicInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2)); } public static function backOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number = BACK_OVERSHOOT; _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * (((_local5 + 1) * _arg1) + _local5)) + 1)) + _arg2)); } public static function elasticInAndOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local7:Number; var _local5:Number = ELASTIC_AMPLITUDE; var _local6:Number = ELASTIC_PERIOD; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; if (!_local6){ _local6 = (_arg4 * (0.3 * 1.5)); }; if (((!(_local5)) || ((_local5 < Math.abs(_arg3))))){ _local5 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local5))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_local5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); }; --_arg1; return ((((((_local5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2)); } public static function backIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number = BACK_OVERSHOOT; _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * (((_local5 + 1) * _arg1) - _local5)) + _arg2)); } } }//package com.boostworthy.animation.easing
Section 4
//Renderer (com.boostworthy.animation.rendering.Renderer) package com.boostworthy.animation.rendering { import flash.events.*; import flash.utils.*; import flash.display.*; import com.boostworthy.utils.logger.*; import com.boostworthy.core.*; public class Renderer extends EventDispatcher implements IDisposable { protected var m_objTimer:Timer; protected var m_fncOnTimer:Function; protected var m_objStage:Stage; protected var m_fncOnEnterFrame:Function; protected var m_objLog:ILog; public function Renderer(_arg1:Function, _arg2:Function, _arg3:Number){ if (_arg1 != null){ m_fncOnEnterFrame = _arg1; m_objStage = Global.stage; }; if (_arg2 != null){ m_fncOnTimer = _arg2; m_objTimer = new Timer(_arg3, 0); m_objTimer.addEventListener(TimerEvent.TIMER, m_fncOnTimer); }; m_objLog = LogFactory.getInstance().getLog("Renderer"); } public function start(_arg1:Number):void{ if (_arg1 == RenderMethod.ENTER_FRAME){ startEnterFrame(); } else { if (_arg1 == RenderMethod.TIMER){ startTimer(); }; }; } protected function startTimer():void{ m_objTimer.start(); } public function startAll():void{ startEnterFrame(); startTimer(); } public function stop(_arg1:Number):void{ if (_arg1 == RenderMethod.ENTER_FRAME){ stopEnterFrame(); } else { if (_arg1 == RenderMethod.TIMER){ stopTimer(); }; }; } protected function stopTimer():void{ m_objTimer.stop(); } public function stopAll():void{ stopEnterFrame(); stopTimer(); } protected function startEnterFrame():void{ if (!m_objStage){ m_objStage = Global.stage; }; if (m_objStage){ m_objStage.addEventListener(Event.ENTER_FRAME, m_fncOnEnterFrame); } else { m_objLog.warning("startEnterFrame :: Unable to add a listener to the enter frame event because a global stage reference does not exist."); }; } protected function stopEnterFrame():void{ if (m_objStage){ m_objStage.removeEventListener(Event.ENTER_FRAME, m_fncOnEnterFrame); }; } public function dispose():void{ if (((!((m_fncOnEnterFrame == null))) && (!((m_objStage == null))))){ m_objStage.removeEventListener(Event.ENTER_FRAME, m_fncOnEnterFrame); }; if (m_objTimer != null){ m_objTimer.removeEventListener(TimerEvent.TIMER, m_fncOnTimer); }; m_fncOnEnterFrame = null; m_objTimer = null; m_fncOnTimer = null; m_objStage = null; } } }//package com.boostworthy.animation.rendering
Section 5
//RenderMethod (com.boostworthy.animation.rendering.RenderMethod) package com.boostworthy.animation.rendering { public final class RenderMethod { public static const TIMER:uint = 2; public static const ENTER_FRAME:uint = 1; } }//package com.boostworthy.animation.rendering
Section 6
//Action (com.boostworthy.animation.sequence.tweens.Action) package com.boostworthy.animation.sequence.tweens { public class Action implements ITween { protected const PROPERTY:String = "action"; protected var m_aParamsForward:Array; protected var m_uPreviousFrame:uint; protected var m_uLastFrame:uint; protected var m_fncReverse:Function; protected var m_uFirstFrame:uint; protected var m_aParamsReverse:Array; protected var m_fncForward:Function; public function Action(_arg1:Function, _arg2:Array, _arg3:Function, _arg4:Array, _arg5:uint){ m_fncForward = _arg1; m_aParamsForward = _arg2; m_fncReverse = _arg3; m_aParamsReverse = _arg4; m_uFirstFrame = _arg5; m_uLastFrame = _arg5; m_uPreviousFrame = 1; } public function get target():Object{ return (null); } public function get property():String{ return (PROPERTY); } public function get firstFrame():uint{ return (m_uFirstFrame); } public function clone():ITween{ return (new Action(m_fncForward, m_aParamsForward, m_fncReverse, m_aParamsReverse, m_uFirstFrame)); } public function get lastFrame():uint{ return (m_uLastFrame); } public function renderFrame(_arg1:uint):void{ if (_arg1 == m_uFirstFrame){ if (m_uPreviousFrame > _arg1){ m_fncReverse.apply(null, m_aParamsReverse); } else { m_fncForward.apply(null, m_aParamsForward); }; }; m_uPreviousFrame = _arg1; } } }//package com.boostworthy.animation.sequence.tweens
Section 7
//ITween (com.boostworthy.animation.sequence.tweens.ITween) package com.boostworthy.animation.sequence.tweens { public interface ITween { function get target():Object; function clone():ITween; function get property():String; function get lastFrame():uint; function get firstFrame():uint; function renderFrame(_arg1:uint):void; } }//package com.boostworthy.animation.sequence.tweens
Section 8
//Tween (com.boostworthy.animation.sequence.tweens.Tween) package com.boostworthy.animation.sequence.tweens { import com.boostworthy.animation.easing.*; public class Tween implements ITween { protected const DEFAULT_TRANSITION:String = "linear"; protected var m_objToTween:Object; protected var m_strTransition:String; protected var m_bIsDirty:Boolean; protected var m_strProperty:String; protected var m_uFirstFrame:uint; protected var m_uLastFrame:uint; protected var m_nTargetValue:Number; protected var m_nChangeValue:Number; protected var m_nStartValue:Number; protected var m_fncTransition:Function; public function Tween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:uint, _arg5:uint, _arg6:String="linear"){ m_objToTween = _arg1; m_strProperty = _arg2; m_nTargetValue = _arg3; m_uFirstFrame = _arg4; m_uLastFrame = _arg5; m_strTransition = _arg6; m_fncTransition = Transitions[m_strTransition]; } public function renderFrame(_arg1:uint):void{ var _local2:Number; if ((((_arg1 < m_uFirstFrame)) && (!(isNaN(m_nStartValue))))){ m_objToTween[m_strProperty] = m_nStartValue; m_bIsDirty = true; } else { if ((((_arg1 >= m_uFirstFrame)) && ((_arg1 <= m_uLastFrame)))){ _local2 = ((_arg1 - m_uFirstFrame) / (m_uLastFrame - m_uFirstFrame)); if (((isNaN(m_nStartValue)) && ((_arg1 == m_uFirstFrame)))){ m_nStartValue = m_objToTween[m_strProperty]; m_nChangeValue = (m_nTargetValue - m_nStartValue); }; m_objToTween[m_strProperty] = m_fncTransition(_local2, m_nStartValue, m_nChangeValue, 1); m_bIsDirty = true; } else { if ((((_arg1 > m_uLastFrame)) && (m_bIsDirty))){ m_objToTween[m_strProperty] = m_nTargetValue; m_bIsDirty = false; }; }; }; } public function get target():Object{ return (m_objToTween); } public function get property():String{ return (m_strProperty); } public function get lastFrame():uint{ return (m_uLastFrame); } public function clone():ITween{ return (new Tween(m_objToTween, m_strProperty, m_nTargetValue, m_uFirstFrame, m_uLastFrame, m_strTransition)); } public function get firstFrame():uint{ return (m_uFirstFrame); } } }//package com.boostworthy.animation.sequence.tweens
Section 9
//Timeline (com.boostworthy.animation.sequence.Timeline) package com.boostworthy.animation.sequence { import flash.events.*; import com.boostworthy.animation.sequence.tweens.*; import com.boostworthy.collections.iterators.*; import com.boostworthy.animation.rendering.*; import com.boostworthy.core.*; import com.boostworthy.animation.*; import com.boostworthy.events.*; public class Timeline extends EventDispatcher implements IDisposable { protected const DEFAULT_LOOP:Boolean = false; protected const DEFAULT_RENDER_METHOD:uint = 2; protected const DEFAULT_FRAME_RATE:Number = 60; protected var m_uFrameRate:uint; protected var m_uFrame:uint; protected var m_uRenderMethod:uint; protected var m_nRefreshRate:Number; protected var m_objTweenStack:TweenStack; protected var m_bLoop:Boolean; protected var m_uLength:uint; protected var m_objRendererPrev:Renderer; protected var m_objRendererNext:Renderer; public function Timeline(_arg1:uint=2, _arg2:Number=60){ init(_arg1, _arg2); } protected function computeFrameData(_arg1:uint, _arg2:uint):void{ var _local5:ITween; var _local3:IIterator = m_objTweenStack.getIterator(IteratorType.ARRAY_REVERSE); var _local4:int = _arg1; while (_local4 <= _arg2) { while (_local3.hasNext()) { _local5 = (_local3.next() as ITween); if (!(_local5 is Action)){ _local5.renderFrame(_local4); }; }; _local3.reset(); _local4++; }; render(); } public function prevFrame():void{ setFrame((m_uFrame - 1)); } protected function onNextFrameEF(_arg1:Event):void{ nextFrame(); } public function gotoAndPlay(_arg1:uint):void{ stop(); setFrame(_arg1); play(); } public function stop():void{ m_objRendererPrev.stop(m_uRenderMethod); m_objRendererNext.stop(m_uRenderMethod); dispatchEvent(new AnimationEvent(AnimationEvent.STOP)); } public function playReverse():void{ stop(); dispatchEvent(new AnimationEvent(AnimationEvent.START)); m_objRendererPrev.start(m_uRenderMethod); } public function set loop(_arg1:Boolean):void{ m_bLoop = _arg1; } protected function init(_arg1:uint, _arg2:Number):void{ BoostworthyAnimation.log(); setFrameRate(_arg2); m_uRenderMethod = _arg1; m_objRendererPrev = new Renderer(onPrevFrameEF, onPrevFrameT, m_nRefreshRate); m_objRendererNext = new Renderer(onNextFrameEF, onNextFrameT, m_nRefreshRate); m_objTweenStack = new TweenStack(); m_uFrame = (m_uLength = 1); loop = DEFAULT_LOOP; } public function gotoAndStop(_arg1:uint):void{ stop(); setFrame(_arg1); } protected function onPrevFrameT(_arg1:TimerEvent):void{ prevFrame(); _arg1.updateAfterEvent(); } public function nextFrame():void{ setFrame((m_uFrame + 1)); } protected function render(_arg1:Boolean=false):void{ var _local2:IIterator = m_objTweenStack.getIterator((_arg1) ? IteratorType.ARRAY_REVERSE : IteratorType.ARRAY_FORWARD); while (_local2.hasNext()) { _local2.next().renderFrame(m_uFrame); }; } public function get loop():Boolean{ return (m_bLoop); } public function get length():Number{ return (m_uLength); } public function setFrameRate(_arg1:Number):void{ m_uFrameRate = ((_arg1)>0) ? _arg1 : DEFAULT_FRAME_RATE; m_nRefreshRate = Math.floor((1000 / m_uFrameRate)); } public function addTween(_arg1:ITween):void{ var _local2:ITween = _arg1.clone(); m_uLength = ((_local2.lastFrame)>m_uLength) ? _local2.lastFrame : m_uLength; m_objTweenStack.addElement(_local2); computeFrameData(_local2.firstFrame, _local2.lastFrame); } public function dispose():void{ stop(); m_objRendererPrev.dispose(); m_objRendererNext.dispose(); m_objTweenStack.dispose(); m_uRenderMethod = NaN; m_uFrameRate = NaN; m_nRefreshRate = NaN; m_uFrame = NaN; m_uLength = NaN; m_bLoop = false; } protected function onNextFrameT(_arg1:TimerEvent):void{ nextFrame(); _arg1.updateAfterEvent(); } protected function setFrame(_arg1:Number):void{ var _local2:Boolean; var _local3:Boolean; if (_arg1 > m_uLength){ if (m_bLoop){ _arg1 = 1; } else { _local3 = true; }; }; if (_arg1 < 1){ if (m_bLoop){ _arg1 = m_uLength; _local2 = true; } else { _local3 = true; }; }; m_uFrame = Math.min(Math.max(1, _arg1), m_uLength); if (!_local3){ render(_local2); }; dispatchEvent(new AnimationEvent(AnimationEvent.CHANGE)); if (_local3){ stop(); dispatchEvent(new AnimationEvent(AnimationEvent.FINISH)); }; } public function gotoAndPlayReverse(_arg1:uint):void{ stop(); setFrame(_arg1); playReverse(); } public function play():void{ stop(); dispatchEvent(new AnimationEvent(AnimationEvent.START)); m_objRendererNext.start(m_uRenderMethod); } protected function onPrevFrameEF(_arg1:Event):void{ prevFrame(); } } }//package com.boostworthy.animation.sequence
Section 10
//TweenStack (com.boostworthy.animation.sequence.TweenStack) package com.boostworthy.animation.sequence { import com.boostworthy.animation.sequence.tweens.*; import com.boostworthy.collections.iterators.*; import com.boostworthy.collections.*; public class TweenStack extends Stack { override public function addElement(_arg1:Object):void{ var _local7:ITween; var _local2:ITween = (_arg1 as ITween); var _local3:Array = new Array(); var _local4:IIterator = getIterator(); while (_local4.hasNext()) { _local7 = (_local4.next() as ITween); if ((((_local7.target == _local2.target)) && ((_local7.property == _local2.property)))){ if (_local7.firstFrame > _local2.firstFrame){ _local3.push(_local7.clone()); removeElement(_local7); }; }; }; super.addElement(_local2); var _local5:int = _local3.length; var _local6:int; while (_local6 < _local5) { super.addElement(_local3[_local6]); _local6++; }; } } }//package com.boostworthy.animation.sequence
Section 11
//BoostworthyAnimation (com.boostworthy.animation.BoostworthyAnimation) package com.boostworthy.animation { import com.boostworthy.utils.logger.*; public final class BoostworthyAnimation { public static const VERSION:String = "2.1"; public static const AUTHOR:String = "Copyright (c) 2007 Ryan Taylor | http://www.boostworthy.com"; public static const NAME:String = "Boostworthy Animation System"; public static const DATE:String = "06.07.2007"; private static var c_bIsLogged:Boolean; public static function log():void{ if (!c_bIsLogged){ LogFactory.getInstance().getLog(NAME).info(((("Version " + VERSION) + " :: ") + AUTHOR)); c_bIsLogged = true; }; } } }//package com.boostworthy.animation
Section 12
//ForwardArrayIterator (com.boostworthy.collections.iterators.ForwardArrayIterator) package com.boostworthy.collections.iterators { public class ForwardArrayIterator implements IIterator { private var m_aData:Array; private var m_uIndex:uint; public function ForwardArrayIterator(_arg1:Array){ m_aData = _arg1; reset(); } public function reset():void{ m_uIndex = 0; } public function next():Object{ return (m_aData[m_uIndex++]); } public function hasNext():Boolean{ return ((m_uIndex < m_aData.length)); } } }//package com.boostworthy.collections.iterators
Section 13
//IIterator (com.boostworthy.collections.iterators.IIterator) package com.boostworthy.collections.iterators { public interface IIterator { function next():Object; function hasNext():Boolean; function reset():void; } }//package com.boostworthy.collections.iterators
Section 14
//IteratorType (com.boostworthy.collections.iterators.IteratorType) package com.boostworthy.collections.iterators { public final class IteratorType { public static const NULL:uint = 1; public static const ARRAY_REVERSE:uint = 4; public static const ARRAY_FORWARD:uint = 2; } }//package com.boostworthy.collections.iterators
Section 15
//ReverseArrayIterator (com.boostworthy.collections.iterators.ReverseArrayIterator) package com.boostworthy.collections.iterators { public class ReverseArrayIterator implements IIterator { private var m_aData:Array; private var m_uIndex:uint; public function ReverseArrayIterator(_arg1:Array){ m_aData = _arg1; reset(); } public function reset():void{ m_uIndex = m_aData.length; } public function next():Object{ return (m_aData[--m_uIndex]); } public function hasNext():Boolean{ return ((m_uIndex > 0)); } } }//package com.boostworthy.collections.iterators
Section 16
//HashMap (com.boostworthy.collections.HashMap) package com.boostworthy.collections { import com.boostworthy.collections.iterators.*; import com.boostworthy.core.*; public class HashMap implements ICollection, IDisposable { protected var m_aKeys:Array; protected var m_aValues:Array; public function HashMap(_arg1:Object=null){ init(_arg1); } public function containsKey(_arg1:Object):Boolean{ return (!((searchForKey(_arg1) == Global.NULL_INDEX))); } public function remove(_arg1:Object):void{ var _local2:int = searchForKey(_arg1); if (_local2 != Global.NULL_INDEX){ m_aKeys.splice(_local2, 1); m_aValues.splice(_local2, 1); }; } public function getValueIterator(_arg1:uint=2):IIterator{ if (_arg1 == IteratorType.ARRAY_FORWARD){ return (new ForwardArrayIterator(m_aValues.concat())); }; if (_arg1 == IteratorType.ARRAY_REVERSE){ return (new ReverseArrayIterator(m_aValues.concat())); }; return (new ForwardArrayIterator(m_aValues.concat())); } public function getIterator(_arg1:uint=2):IIterator{ return (getValueIterator(_arg1)); } public function putMap(_arg1:Object):void{ var _local2:String; for (_local2 in _arg1) { put(_local2, _arg1[_local2]); }; } public function put(_arg1:Object, _arg2:Object):void{ remove(_arg1); m_aKeys.push(_arg1); m_aValues.push(_arg2); } protected function init(_arg1:Object):void{ dispose(); if (_arg1 != null){ putMap(_arg1); }; } public function get length():uint{ return (m_aKeys.length); } public function get(_arg1:Object):Object{ var _local2:int = searchForKey(_arg1); if (_local2 != Global.NULL_INDEX){ return (m_aValues[_local2]); }; return (null); } public function getKeyIterator(_arg1:uint=2):IIterator{ if (_arg1 == IteratorType.ARRAY_FORWARD){ return (new ForwardArrayIterator(m_aKeys.concat())); }; if (_arg1 == IteratorType.ARRAY_REVERSE){ return (new ReverseArrayIterator(m_aKeys.concat())); }; return (new ForwardArrayIterator(m_aKeys.concat())); } public function clone():HashMap{ var _local1:HashMap = new HashMap(); var _local2:int = m_aKeys.length; var _local3:int; while (_local3 < _local2) { _local1.put(m_aKeys[_local3], m_aValues[_local3]); _local3++; }; return (_local1); } protected function searchForKey(_arg1:Object):int{ var _local2:int = m_aKeys.length; var _local3:int; while (_local3 < _local2) { if (m_aKeys[_local3] === _arg1){ return (_local3); }; _local3++; }; return (Global.NULL_INDEX); } public function dispose():void{ m_aKeys = new Array(); m_aValues = new Array(); } } }//package com.boostworthy.collections
Section 17
//ICollection (com.boostworthy.collections.ICollection) package com.boostworthy.collections { import com.boostworthy.collections.iterators.*; public interface ICollection { function getIterator(_arg1:uint=2):IIterator; } }//package com.boostworthy.collections
Section 18
//Stack (com.boostworthy.collections.Stack) package com.boostworthy.collections { import com.boostworthy.collections.iterators.*; import com.boostworthy.core.*; public class Stack implements ICollection, IDisposable { protected var m_aData:Array; public function Stack(){ dispose(); } public function getIterator(_arg1:uint=2):IIterator{ if (_arg1 == IteratorType.ARRAY_FORWARD){ return (new ForwardArrayIterator(m_aData.concat())); }; if (_arg1 == IteratorType.ARRAY_REVERSE){ return (new ReverseArrayIterator(m_aData.concat())); }; return (new ForwardArrayIterator(m_aData.concat())); } private function getElementIndex(_arg1:Object):int{ var _local2:int; while (_local2 < m_aData.length) { if (m_aData[_local2] === _arg1){ return (_local2); }; _local2++; }; return (Global.NULL_INDEX); } public function get length():uint{ return (m_aData.length); } public function removeElement(_arg1:Object):void{ var _local2:int = getElementIndex(_arg1); if (_local2 != Global.NULL_INDEX){ m_aData.splice(_local2, 1); }; } public function addElement(_arg1:Object):void{ m_aData.unshift(_arg1); } public function dispose():void{ m_aData = new Array(); } } }//package com.boostworthy.collections
Section 19
//Global (com.boostworthy.core.Global) package com.boostworthy.core { import flash.display.*; public final class Global { private static var c_objStage:Stage; public static var NULL_INDEX:int = -1; public function Global(){ throw (new Error("ERROR -> Global :: Constructor :: The 'Global' class is not meant to be instantiated.")); } public static function set stage(_arg1:Stage):void{ c_objStage = _arg1; } public static function get stage():Stage{ return (c_objStage); } } }//package com.boostworthy.core
Section 20
//IDisposable (com.boostworthy.core.IDisposable) package com.boostworthy.core { public interface IDisposable { function dispose():void; } }//package com.boostworthy.core
Section 21
//AnimationEvent (com.boostworthy.events.AnimationEvent) package com.boostworthy.events { import flash.events.*; public class AnimationEvent extends Event { protected var m_strProperty:String; protected var m_objTarget:Object; public static const CHANGE:String = "animationChange"; public static const STOP:String = "animationStop"; public static const START:String = "animationStart"; public static const FINISH:String = "animationFinish"; public function AnimationEvent(_arg1:String, _arg2:Object=null, _arg3:String=""){ super(_arg1); m_objTarget = _arg2; m_strProperty = _arg3; } public function get animTarget():Object{ return (m_objTarget); } public function get animProperty():String{ return (m_strProperty); } } }//package com.boostworthy.events
Section 22
//ILog (com.boostworthy.utils.logger.ILog) package com.boostworthy.utils.logger { public interface ILog { function getName():String; function setLevel(_arg1:uint):void; function debug(_arg1:String):void; function severe(_arg1:String):void; function getLevel():uint; function warning(_arg1:String):void; function info(_arg1:String):void; } }//package com.boostworthy.utils.logger
Section 23
//Log (com.boostworthy.utils.logger.Log) package com.boostworthy.utils.logger { public class Log implements ILog { protected var m_strName:String; protected var m_uLevel:uint; public function Log(_arg1:String, _arg2:uint){ init(_arg1, _arg2); } protected function output(_arg1:String, _arg2:uint):void{ if (((!((m_uLevel & LogLevel.OFF))) && ((m_uLevel >= _arg2)))){ trace(createOutputMessage(_arg1, _arg2)); }; } public function getName():String{ return (m_strName); } public function setLevel(_arg1:uint):void{ m_uLevel = _arg1; } protected function createOutputMessage(_arg1:String, _arg2:uint):String{ return ((((((m_strName + " (") + getLevelName(_arg2)) + ") :: ") + _arg1) + "\n")); } public function getLevel():uint{ return (m_uLevel); } protected function init(_arg1:String, _arg2:uint):void{ m_strName = _arg1; m_uLevel = _arg2; } protected function getLevelName(_arg1:uint):String{ switch (_arg1){ case LogLevel.OFF: return ("OFF"); case LogLevel.SEVERE: return ("SEVERE"); case LogLevel.WARNING: return ("WARNING"); case LogLevel.INFO: return ("INFO"); case LogLevel.DEBUG: return ("DEBUG"); default: return (""); }; } public function debug(_arg1:String):void{ output(_arg1, LogLevel.DEBUG); } public function severe(_arg1:String):void{ output(_arg1, LogLevel.SEVERE); } public function warning(_arg1:String):void{ output(_arg1, LogLevel.WARNING); } public function info(_arg1:String):void{ output(_arg1, LogLevel.INFO); } } }//package com.boostworthy.utils.logger
Section 24
//LogFactory (com.boostworthy.utils.logger.LogFactory) package com.boostworthy.utils.logger { import com.boostworthy.collections.iterators.*; import com.boostworthy.collections.*; import com.boostworthy.core.*; public class LogFactory implements IDisposable { private var m_uLevel:uint; private var m_objLogHash:HashMap; private static var c_objInstance:LogFactory; public function LogFactory(_arg1:SingletonEnforcer){ init(); } protected function init():void{ m_uLevel = LogSettings.DEFAULT_LOG_LEVEL; m_objLogHash = new HashMap(); } public function getLog(_arg1:String):ILog{ if (m_objLogHash.containsKey(_arg1)){ return ((m_objLogHash.get(_arg1) as ILog)); }; m_objLogHash.put(_arg1, new Log(_arg1, m_uLevel)); return ((m_objLogHash.get(_arg1) as ILog)); } public function setLevel(_arg1:uint):void{ m_uLevel = _arg1; var _local2:IIterator = m_objLogHash.getValueIterator(); while (_local2.hasNext()) { _local2.next().setLevel(m_uLevel); }; } public function getLevel():uint{ return (m_uLevel); } public function dispose():void{ m_objLogHash.dispose(); } public static function getInstance():LogFactory{ if (c_objInstance == null){ c_objInstance = new LogFactory(new SingletonEnforcer()); }; return (c_objInstance); } } }//package com.boostworthy.utils.logger class SingletonEnforcer { private function SingletonEnforcer(){ } }
Section 25
//LogLevel (com.boostworthy.utils.logger.LogLevel) package com.boostworthy.utils.logger { public final class LogLevel { public static const SEVERE:uint = 2; public static const INFO:uint = 8; public static const DEBUG:uint = 16; public static const WARNING:uint = 4; public static const OFF:uint = 1; } }//package com.boostworthy.utils.logger
Section 26
//LogSettings (com.boostworthy.utils.logger.LogSettings) package com.boostworthy.utils.logger { public final class LogSettings { public static const DEFAULT_LOG_LEVEL:uint = LogLevel.DEBUG; } }//package com.boostworthy.utils.logger
Section 27
//ReflexiveAPI (com.reflexive.ReflexiveAPI) package com.reflexive { import flash.events.*; import flash.utils.*; import flash.display.*; import flash.net.*; public class ReflexiveAPI extends Sprite { private var connected:Boolean; private var connectionString:String; private var scoreTimer:Timer; private var useAPI:Boolean; private var oldMouseY:Number; private var lastScore;// = null private var oldMouseX:Number; private var updateActivity:Boolean;// = false private var conn:LocalConnection; private var activityTimer:Timer; private static var obj:ReflexiveAPI; public function ReflexiveAPI(){ addEventListener(Event.ADDED_TO_STAGE, onLoad); } public function setMedalSchedule(_arg1:String, _arg2, _arg3, _arg4, _arg5):void{ if (useAPI){ if (!connected){ setTimeout(setMedalSchedule, 500, _arg1, _arg2, _arg3, _arg4, _arg5); } else { conn.send(connectionString, "setMedalSchedule", _arg1, _arg2, _arg3, _arg4, _arg5); }; }; } private function initConnection():void{ if (useAPI){ if (!connected){ conn.send(connectionString, "initToolbar"); setTimeout(initConnection, 500); }; }; } public function setIsActive():void{ if (useAPI){ if (!connected){ setTimeout(setIsActive, 500); } else { conn.send(connectionString, "setIsActive", null); }; }; } private function onLoad(_arg1:Event):void{ connected = false; useAPI = (int(root.loaderInfo.parameters.useReflexiveAPI) == 1); if (useAPI){ connectionString = root.loaderInfo.parameters.connectionString; conn = new LocalConnection(); conn.addEventListener(StatusEvent.STATUS, onStatus); conn.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError); initConnection(); root.addEventListener(Event.ENTER_FRAME, checkActivity); scoreTimer = new Timer(1000); scoreTimer.addEventListener(TimerEvent.TIMER, submitScoreHelper); scoreTimer.start(); activityTimer = new Timer(5000); activityTimer.addEventListener(TimerEvent.TIMER, sendActivity); activityTimer.start(); }; } private function submitScoreHelper(_arg1:TimerEvent):void{ if (((((useAPI) && (connected))) && (!((lastScore == null))))){ conn.send(connectionString, "submitScore", lastScore); lastScore = null; }; } public function submitScore(_arg1):void{ if (useAPI){ lastScore = _arg1; }; } private function onAsyncError(_arg1:AsyncErrorEvent):void{ } private function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "status": connected = true; break; case "error": break; }; } private function checkActivity(_arg1:Event):void{ if (((!((mouseX == oldMouseX))) || (!((mouseY == oldMouseY))))){ oldMouseX = mouseX; oldMouseY = mouseY; updateActivity = true; }; } private function sendActivity(_arg1:TimerEvent):void{ if (updateActivity){ setIsActive(); }; updateActivity = false; } public static function getInstance():ReflexiveAPI{ if (obj == null){ obj = new (ReflexiveAPI); }; return (obj); } } }//package com.reflexive
Section 28
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.0.0.0"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 29
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 30
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.0.0.0"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.left = _arg1; this.top = _arg2; this.right = _arg3; this.bottom = _arg4; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 31
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 32
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexMovieClip(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 33
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 34
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 35
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 36
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 37
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 38
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function MovieClipAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 39
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset) package mx.core { import flash.events.*; import flash.utils.*; import flash.display.*; import flash.system.*; public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject { protected var initialHeight:Number;// = 0 private var loader:Loader;// = null private var initialized:Boolean;// = false protected var initialWidth:Number;// = 0 private var requestedHeight:Number; private var requestedWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function MovieClipLoaderAsset(){ var _local1:LoaderContext = new LoaderContext(); _local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in _local1)){ _local1["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.loadBytes(movieClipData, _local1); addChild(loader); } override public function get width():Number{ if (!initialized){ return (initialWidth); }; return (super.width); } override public function set width(_arg1:Number):void{ if (!initialized){ requestedWidth = _arg1; } else { loader.width = _arg1; }; } override public function get measuredHeight():Number{ return (initialHeight); } private function completeHandler(_arg1:Event):void{ initialized = true; initialWidth = loader.width; initialHeight = loader.height; if (!isNaN(requestedWidth)){ loader.width = requestedWidth; }; if (!isNaN(requestedHeight)){ loader.height = requestedHeight; }; dispatchEvent(_arg1); } override public function set height(_arg1:Number):void{ if (!initialized){ requestedHeight = _arg1; } else { loader.height = _arg1; }; } override public function get measuredWidth():Number{ return (initialWidth); } override public function get height():Number{ if (!initialized){ return (initialHeight); }; return (super.height); } public function get movieClipData():ByteArray{ return (null); } } }//package mx.core
Section 40
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 41
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 42
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.0.0.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local4:String; var _local5:Array; var _local3:DisplayObject = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 43
//Cursor (Cursor) package { import flash.text.*; import flash.utils.*; import flash.display.*; import flash.filters.*; public class Cursor extends Sprite { public var size:Number; private var defaultSize:Number; public var cursorText:TextField; private var shape:Sprite; public var isHighlight:Boolean;// = false public var defaultTextColor:int;// = 6710835 public function Cursor(_arg1:Number){ this.defaultSize = _arg1; cursorText = new TextField(); cursorText.defaultTextFormat = new TextFormat("MyVerdana", 9, defaultTextColor); cursorText.autoSize = "center"; cursorText.embedFonts = true; cursorText.antiAliasType = "advanced"; cursorText.selectable = false; addChild(cursorText); shape = new Sprite(); shape.filters = [new BlurFilter(5, 5, 1)]; addChild(shape); } public function pulseBad():void{ if (cursorText.textColor == defaultTextColor){ setTimeout(setTextColor, 0, 6697779); setTimeout(setTextColor, 100, 0x660000); setTimeout(setTextColor, 500, 6697779); setTimeout(setTextColor, 600, defaultTextColor); }; } public function pulseGood():void{ if (cursorText.textColor == defaultTextColor){ setTimeout(setTextColor, 0, 13421670); setTimeout(setTextColor, 100, 16777130); setTimeout(setTextColor, 500, 13421670); setTimeout(setTextColor, 600, defaultTextColor); }; } public function setTextColor(_arg1:int):void{ cursorText.textColor = _arg1; } public function updateCursor(_arg1:Number, _arg2:String):void{ this.size = _arg1; shape.graphics.clear(); if (isHighlight){ shape.graphics.lineStyle(2, 11206570); shape.graphics.beginFill(11206570, 0.5); shape.graphics.drawRoundRect(-(_arg1), -(_arg1), (_arg1 * 2), (_arg1 * 2), (_arg1 / 2), (_arg1 / 2)); } else { shape.graphics.lineStyle(2, 16777130); shape.graphics.beginFill(16777130, 0.5); shape.graphics.drawCircle(0, 0, _arg1); }; cursorText.text = _arg2; cursorText.scaleX = (_arg1 / defaultSize); cursorText.scaleY = (_arg1 / defaultSize); cursorText.x = (-(cursorText.width) / 2); cursorText.y = (-(cursorText.height) / 2); } } }//package
Section 44
//MochiAd (MochiAd) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiAd { public static function getVersion():String{ return ("2.3"); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function load(_arg1:Object):MovieClip{ var clip:Object; var mc:MovieClip; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var f:Function; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; var depth:Number = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.parent._mochiad_ctr_failed){ options.ad_failed(); _local3 = true; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _loadCommunicator(_arg1:Object):MovieClip{ var mc:MovieClip; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; var DEFAULTS:Object = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); var clip:Object = options.clip; var clipname:String = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; var server:String = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; var depth:Number = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); var lv:URLVariables = new URLVariables(); for (k in options) { lv[k] = options[k]; }; lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ _arg1 = parseInt(_arg1.toString()); var _local3:Array = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; var _local4:Array = []; var _local5:Number = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; var _local6:Object = _local3[1]; var _local7:Object = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local5:Array; mc._endpoint = _arg1; var _local2:Array = mc._queue; delete mc._queue; var _local3:Function = mc.doSend; var _local4:Number = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); var _local5:Number = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; var _local6:LocalConnection = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){ options.ad_started(); options.ad_finished(); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); bar.x = 10; bar.y = (h - 20); var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local7:Number = ((100 * _local6) / _local5); var _local8:Number = ((100 * _local3) / chk.ad_msec); var _local9:Object = this._mochiad_bar._inside; var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ options.ad_failed(); _local4 = true; }; }; }; if (this.parent._mochiad_ctr_failed){ options.ad_failed(); _local4 = true; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 45
//MochiBot (MochiBot) package { import flash.display.*; import flash.system.*; import flash.net.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4 = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 46
//MusicGame (MusicGame) package { import flash.events.*; import flash.geom.*; import flash.text.*; import flash.utils.*; import com.boostworthy.animation.sequence.tweens.*; import com.reflexive.*; import flash.display.*; import com.boostworthy.animation.sequence.*; import flash.media.*; import com.boostworthy.animation.rendering.*; import com.boostworthy.core.*; import com.adobe.crypto.*; import com.boostworthy.animation.easing.*; import flash.net.*; import flash.ui.*; import flash.filters.*; public class MusicGame extends Sprite { private var introMovieTimer:Timer; private var maxCombo:int;// = 1 private var bandWidth:int;// = 16 public var verdana:Class; private var maxRadius:int;// = 15 private var score:Number; private var credits:TextField; private var combo:int;// = 1 private var objTimeline:Timeline; private var referrer:String;// = "MusicCatch" private var frameCount:int;// = 0 private var stateCounter:int;// = 0 private var position:int; private var mainMenu:TextField; private var cursorDefaultSize:Number;// = 10 private var scoreName:TextField; private var ba:ByteArray; private var introMovieClass:Class; private var copyright:TextField; private var channelLength:int;// = 0x0100 private var suctionTimeout:uint; private var putGameOnSite:TextField; private var sc:SoundChannel; private var musicClass:Class; private var textContainer:Sprite; private var reflexiveAPI:ReflexiveAPI; private var title:TextField; private var suction:Boolean;// = false private var gravity:Number;// = -0.2 private var scoreText:TextField; private var playArea:Sprite; private var cursor:Cursor; private var s:Sound; private var pause:TextField; private var cursorSize:Number; private var skip:TextField; public function MusicGame(){ sc = new SoundChannel(); ba = new ByteArray(); musicClass = MusicGame_musicClass; verdana = MusicGame_verdana; introMovieClass = MusicGame_introMovieClass; super(); addEventListener("Preloader Finished", init); } private function showPause(_arg1:MouseEvent):void{ removeEventListener(Event.ENTER_FRAME, onEnterFrame); position = sc.position; sc.stop(); credits.visible = false; putGameOnSite.visible = false; mainMenu.visible = false; pause.visible = false; stateCounter++; showText("Resume", 3000, 16777164, NaN, 150, 40, clearPause, stateCounter); showText("End Game", 3000, 16764108, NaN, 200, 40, showMainMenu, stateCounter); } private function updateCursor():void{ cursor.updateCursor(cursorSize, ("x" + combo.toString())); } private function onEnterFrame(_arg1:Event):void{ frameCount++; if ((frameCount % 3) == 0){ processMusic(); frameCount = 0; }; updateRainDrops(); var _local2:Matrix = playArea.transform.matrix; rotateAroundExternalPoint(_local2, (stage.stageWidth / 2), (stage.stageHeight / 2), 0.1); playArea.transform.matrix = _local2; } private function updateRainDrops():void{ var _local1:RainDrop; var _local3:Point; var _local2:int = (playArea.numChildren - 1); while (_local2 >= 0) { _local1 = (playArea.getChildAt(_local2) as RainDrop); _local3 = playArea.globalToLocal(new Point(cursor.x, cursor.y)); if ((((((((_local1.type == "powerDown")) && (((Math.abs((_local3.x - _local1.x)) - (0.8 * cursorSize)) <= 0)))) && (((Math.abs((_local3.y - _local1.y)) - (0.8 * cursorSize)) <= 0)))) || (((((!((_local1.type == "powerDown"))) && ((((Math.abs((_local3.x - _local1.x)) - cursorSize) - _local1.radius) <= 0)))) && ((((Math.abs((_local3.y - _local1.y)) - cursorSize) - _local1.radius) <= 0)))))){ collectRainDrop(_local1); } else { _local1.updateRainDrop(maxRadius, gravity, stage.stageWidth); if (((suction) && (!((_local1.type == "powerDown"))))){ _local1.x = (_local1.x + ((_local3.x - _local1.x) / 6)); _local1.y = (_local1.y + ((_local3.y - _local1.y) / 6)); }; if (_local1.y < -(_local1.radius)){ playArea.removeChildAt(_local2); }; }; _local2--; }; } private function clearGame():void{ removeEventListener(Event.ENTER_FRAME, onEnterFrame); if (sc != null){ sc.stop(); }; clearPlayArea(); } private function init(_arg1:Event):void{ var e = _arg1; reflexiveAPI = ReflexiveAPI.getInstance(); addChild(reflexiveAPI); reflexiveAPI.setMedalSchedule("Points", 5000, 100000, 500000, 1500000); var introMovie:MovieClip = new introMovieClass(); introMovie.buttonMode = true; introMovie.addEventListener(MouseEvent.CLICK, function ():void{ navigateToURL(new URLRequest((("http://www.reflexive.com/index.php?PAGE=WebGameHome&REFERRER=" + referrer) + "&SOURCE=IntroMovie"))); }); addChild(introMovie); introMovieTimer = new Timer(7000, 0); introMovieTimer.addEventListener(TimerEvent.TIMER, initGame); introMovieTimer.start(); } private function clearText():void{ removeChild(textContainer); textContainer = new Sprite(); addChild(textContainer); } public function cursorFollow(_arg1:MouseEvent):void{ cursor.x = stage.mouseX; cursor.y = stage.mouseY; cursor.visible = true; _arg1.updateAfterEvent(); } private function addToScore(_arg1:Number):void{ score = Math.round((score + _arg1)); scoreText.text = score.toString(); reflexiveAPI.submitScore(score); } private function initGame(_arg1:TimerEvent):void{ var e = _arg1; introMovieTimer.stop(); Global.stage = stage; Font.registerFont(verdana); clearPlayArea(); cursor = new Cursor(cursorDefaultSize); addChild(cursor); cursorSize = cursorDefaultSize; stage.addEventListener(Event.MOUSE_LEAVE, cursorHide); stage.addEventListener(MouseEvent.MOUSE_MOVE, cursorFollow); cursorHide(null); Mouse.hide(); updateCursor(); textContainer = new Sprite(); addChild(textContainer); title = new TextField(); title.defaultTextFormat = new TextFormat("MyVerdana", 60, 16777164, true); title.text = "Music Catch"; title.autoSize = "left"; title.embedFonts = true; title.antiAliasType = "advanced"; title.x = Math.floor(((stage.stageWidth - title.textWidth) / 2)); title.y = 50; title.selectable = false; title.visible = true; title.filters = [new BlurFilter(5, 5, 1)]; addChild(title); skip = new TextField(); skip.defaultTextFormat = new TextFormat("MyVerdana", 12, 0xAAAAAA); skip.text = "Skip"; skip.autoSize = "left"; skip.embedFonts = true; skip.antiAliasType = "advanced"; skip.x = 5; skip.y = 380; skip.selectable = false; skip.visible = false; skip.addEventListener(MouseEvent.CLICK, startGame); skip.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); skip.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); addChild(skip); credits = new TextField(); credits.defaultTextFormat = new TextFormat("MyVerdana", 14, 0xAAAAAA); credits.text = "Credits"; credits.autoSize = "left"; credits.embedFonts = true; credits.antiAliasType = "advanced"; credits.x = Math.floor(((stage.stageWidth - credits.textWidth) / 2)); credits.y = 375; credits.selectable = false; credits.addEventListener(MouseEvent.CLICK, showCredits); credits.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); credits.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); credits.filters = [new BlurFilter(1, 1, 1)]; addChild(credits); copyright = new TextField(); copyright.defaultTextFormat = new TextFormat("MyVerdana", 10, 0xAAAAAA); copyright.text = "© Reflexive.com"; copyright.autoSize = "left"; copyright.embedFonts = true; copyright.antiAliasType = "advanced"; copyright.x = ((stage.stageWidth - copyright.textWidth) - 5); copyright.y = 380; copyright.selectable = false; copyright.addEventListener(MouseEvent.CLICK, function ():void{ navigateToURL(new URLRequest((("http://www.reflexive.com/index.php?PAGE=WebGameHome&REFERRER=" + referrer) + "&SOURCE=MainMenuCopyright"))); }); copyright.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); copyright.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); addChild(copyright); putGameOnSite = new TextField(); putGameOnSite.defaultTextFormat = new TextFormat("MyVerdana", 10, 0xAAAAAA); putGameOnSite.text = "Put this game on your website"; putGameOnSite.autoSize = "left"; putGameOnSite.embedFonts = true; putGameOnSite.antiAliasType = "advanced"; putGameOnSite.x = 5; putGameOnSite.y = 380; putGameOnSite.selectable = false; putGameOnSite.addEventListener(MouseEvent.CLICK, function ():void{ navigateToURL(new URLRequest((("http://www.reflexive.com/index.php?PAGE=WebGameForMySite&REFERRER=" + referrer) + "&SOURCE=MainMenu"))); }); putGameOnSite.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); putGameOnSite.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); addChild(putGameOnSite); mainMenu = new TextField(); mainMenu.defaultTextFormat = new TextFormat("MyVerdana", 12, 0xAAAAAA); mainMenu.text = "Main Menu"; mainMenu.autoSize = "left"; mainMenu.embedFonts = true; mainMenu.antiAliasType = "advanced"; mainMenu.x = 5; mainMenu.y = 380; mainMenu.selectable = false; mainMenu.visible = false; mainMenu.addEventListener(MouseEvent.CLICK, showMainMenu); mainMenu.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); mainMenu.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); addChild(mainMenu); pause = new TextField(); pause.defaultTextFormat = new TextFormat("MyVerdana", 12, 0xAAAAAA); pause.text = "Pause"; pause.autoSize = "left"; pause.embedFonts = true; pause.antiAliasType = "advanced"; pause.x = 5; pause.y = 380; pause.selectable = false; pause.visible = false; pause.addEventListener(MouseEvent.CLICK, showPause); pause.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); pause.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); addChild(pause); scoreName = new TextField(); scoreName.defaultTextFormat = new TextFormat("MyVerdana", 20, 0xFFFFFF); scoreName.text = "Points:"; scoreName.autoSize = "left"; scoreName.embedFonts = true; scoreName.antiAliasType = "advanced"; scoreName.x = 200; scoreName.y = 370; scoreName.selectable = false; scoreName.visible = false; scoreName.filters = [new BlurFilter(2, 2, 1)]; addChild(scoreName); scoreText = new TextField(); scoreText.defaultTextFormat = new TextFormat("MyVerdana", 20, 13434828); scoreText.text = "0"; scoreText.autoSize = "left"; scoreText.embedFonts = true; scoreText.antiAliasType = "advanced"; scoreText.x = 280; scoreText.y = 370; scoreText.selectable = false; scoreText.visible = false; addChild(scoreText); showMainMenu(null); } private function highlightCursor(_arg1:Boolean):void{ cursor.isHighlight = _arg1; updateCursor(); } public function rotateAroundExternalPoint(_arg1:Matrix, _arg2:Number, _arg3:Number, _arg4:Number):void{ _arg1.translate(-(_arg2), -(_arg3)); _arg1.rotate((_arg4 * (Math.PI / 180))); _arg1.translate(_arg2, _arg3); } private function clearPause(_arg1:MouseEvent):void{ clearText(); pause.visible = true; sc = s.play(position, 0); sc.addEventListener(Event.SOUND_COMPLETE, endGame); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function playGame(_arg1:MouseEvent):void{ var e = _arg1; clearText(); maxCombo = 1; combo = 1; cursorSize = cursorDefaultSize; updateCursor(); title.visible = false; credits.visible = false; putGameOnSite.visible = false; mainMenu.visible = false; skip.visible = true; pause.visible = false; scoreText.visible = false; scoreName.visible = false; score = 0; scoreText.text = score.toString(); stateCounter++; setTimeout(showText, 0, "Collect the shapes", 3000, 0xFFFFFF, NaN, 150, 40, null, stateCounter); setTimeout(showText, 0, "to earn points!", 3000, 0xFFFFFF, NaN, 200, 40, null, stateCounter); setTimeout(function (_arg1:int):void{ if (_arg1 == stateCounter){ scoreText.visible = true; scoreName.visible = true; }; }, 1500, stateCounter); setTimeout(showText, 3000, "Yellow shapes are good!", 2000, 0xFFFF00, NaN, NaN, 40, null, stateCounter); setTimeout(showText, 5000, "Red shapes are bad!", 2000, 0xFF0000, NaN, NaN, 40, null, stateCounter); setTimeout(showText, 7000, "Get Ready!", 2000, 0xFFFFFF, NaN, NaN, 40, null, stateCounter); setTimeout(function (_arg1:int):void{ if (_arg1 == stateCounter){ startGame(null); }; }, 10000, stateCounter); } private function showText(_arg1:String, _arg2:int, _arg3:int=0xFFFFFF, _arg4:Number=NaN, _arg5:Number=NaN, _arg6:int=40, _arg7:Function=null, _arg8:Number=NaN, _arg9:Boolean=false):TextField{ var text = _arg1; var duration = _arg2; var color = _arg3; var xPos = _arg4; var yPos = _arg5; var fontSize = _arg6; var clickCallback = _arg7; var state = _arg8; var keepAround = _arg9; if (((!(isNaN(state))) && (!((state == stateCounter))))){ return (null); }; var frames:int = int(((duration / 1000) * stage.frameRate)); var msg:TextField = new TextField(); msg.defaultTextFormat = new TextFormat("MyVerdana", fontSize, color); msg.text = text; msg.embedFonts = true; msg.alpha = 0; msg.antiAliasType = "advanced"; msg.autoSize = "left"; msg.selectable = false; msg.filters = [new BlurFilter(2, 2, 1)]; if (isNaN(xPos)){ xPos = Math.floor(((stage.stageWidth - msg.width) / 2)); }; if (isNaN(yPos)){ yPos = Math.floor(((stage.stageHeight - msg.height) / 2)); }; msg.x = xPos; msg.y = 0; textContainer.addChild(msg); var objTimeline:Timeline = new Timeline(RenderMethod.ENTER_FRAME); if (clickCallback != null){ msg.addEventListener(MouseEvent.CLICK, clickCallback); msg.addEventListener(MouseEvent.MOUSE_OVER, function ():void{ highlightCursor(true); }); msg.addEventListener(MouseEvent.MOUSE_OUT, function ():void{ highlightCursor(false); }); }; if (((!((clickCallback == null))) || (keepAround))){ objTimeline.addTween(new Tween(msg, "alpha", 1, 0, frames, Transitions.CUBIC_OUT)); objTimeline.addTween(new Tween(msg, "y", yPos, 0, frames, Transitions.ELASTIC_OUT)); } else { objTimeline.addTween(new Tween(msg, "alpha", 1, 0, int((frames / 2)), Transitions.CUBIC_OUT)); objTimeline.addTween(new Tween(msg, "y", yPos, 0, int((frames / 2)), Transitions.ELASTIC_OUT)); objTimeline.addTween(new Tween(msg, "alpha", 0, int((frames / 2)), frames, Transitions.CUBIC_IN)); objTimeline.addTween(new Tween(msg, "y", stage.stageHeight, int((frames / 2)), frames, Transitions.ELASTIC_IN)); setTimeout(textContainer.removeChild, (duration + 1000), msg); }; objTimeline.play(); return (msg); } public function cursorHide(_arg1:Event):void{ cursor.visible = false; } private function showMainMenu(_arg1:MouseEvent):void{ var e = _arg1; clearText(); clearGame(); title.visible = true; mainMenu.visible = false; credits.visible = true; putGameOnSite.visible = true; skip.visible = false; scoreName.visible = false; scoreText.visible = false; cursorSize = cursorDefaultSize; updateCursor(); stateCounter++; showText("Play", 1000, 0xFFFFFF, NaN, 150, 40, playGame, stateCounter); showText("More Games", 1000, 16777164, NaN, 250, 20, function ():void{ navigateToURL(new URLRequest((("http://www.reflexive.com/index.php?PAGE=WebGameHome&REFERRER=" + referrer) + "&SOURCE=MainMenu"))); }); } private function addRainDrop(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String=""):void{ var _local7:int; var _local5:int = (_arg3 * 12); var _local6:RainDrop = new RainDrop(); _local6.x = _arg1; _local6.y = _arg2; _local6.size = _arg3; _local6.yVelocity = _local5; _local6.originalYVelocity = _local5; _local6.type = "normal"; if (_arg3 > 0.5){ _local7 = int((Math.random() * 600)); if (_local7 < 10){ _local6.type = "powerUp"; } else { if (_local7 < 20){ _local6.type = "powerDown"; } else { if ((((_local7 == 21)) && (!(suction)))){ _local6.type = "suction"; _arg4 = "plus"; }; }; }; }; if (_arg4 == ""){ _arg4 = getRandomShape(); }; _local6.shape = _arg4; playArea.addChild(_local6); } private function endGame(_arg1:Event):void{ var e = _arg1; pause.visible = false; clearText(); clearGame(); var comboBonus:Number = (maxCombo * 1000); setTimeout(showText, 0, ("Max Combo: " + maxCombo.toString()), 3000, 6710988, NaN, 150); setTimeout(showText, 0, ("Combo Bonus: " + comboBonus.toString()), 3000, 6710988, NaN, 200); maxCombo = 1; combo = 1; var sizeBonus:Number = (Math.round(cursorSize) * 1000); setTimeout(showText, 3000, ("Size Bonus: " + sizeBonus.toString()), 2000, 10066380); cursorSize = cursorDefaultSize; setTimeout(updateCursor, 4000); addToScore((sizeBonus + comboBonus)); setTimeout(showText, 5000, ("Total Points: " + Math.round(score).toString()), 3000, 14540287); setTimeout(showText, 8000, "Play Again?", 1000, 0xFFFFFF, NaN, 150, 40, playGame); if (((!((loaderInfo.parameters.adKey == "1"))) || (!(loaderInfo.url.match("reflexive.com"))))){ setTimeout(showText, 8000, "Submit Score", 1000, 16777164, NaN, 250, 25, function ():void{ navigateToURL(new URLRequest((((((("http://www.reflexive.com/index.php?PAGE=WebGameSubmitScore&SCORE=" + Math.round(score).toString()) + "&KEY=") + MD5.hash(("23kd8P" + Math.round(score).toString()))) + "&REFERRER=") + referrer) + "&SOURCE=EndGame"))); }); }; setTimeout(showText, 8000, "More Games", 1000, 16777164, NaN, 300, 20, function ():void{ navigateToURL(new URLRequest((("http://www.reflexive.com/index.php?PAGE=WebGameHome&REFERRER=" + referrer) + "&SOURCE=EndGame"))); }); setTimeout(function ():void{ mainMenu.visible = true; }, 8000); } private function getRandomShape():String{ var _local1:Array = ["circle", "sqaure", "triangle", "plus", "other"]; return (_local1[Math.floor((Math.random() * _local1.length))]); } private function startGame(_arg1:MouseEvent):void{ clearText(); stateCounter++; skip.visible = false; pause.visible = true; scoreText.visible = true; scoreName.visible = true; s = new musicClass(); sc = s.play(0, 0); sc.addEventListener(Event.SOUND_COMPLETE, endGame); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function showCredits(_arg1:MouseEvent):void{ var e = _arg1; clearText(); title.visible = false; credits.visible = false; putGameOnSite.visible = false; mainMenu.visible = true; stateCounter++; setTimeout(showText, 0, "Developed By:", 3000, 0xFFFFFF, NaN, 150, 20, null, stateCounter); setTimeout(showText, 0, "Reflexive Entertainment", 3000, 16777164, NaN, 200, 40, null, stateCounter); setTimeout(showText, 0, "www.reflexive.com", 3000, 13434828, NaN, 250, 30, null, stateCounter); setTimeout(showText, 3000, "Programming & Music:", 3000, 0xFFFFFF, NaN, 150, 20, null, stateCounter); setTimeout(showText, 3000, "Isaac Shepard", 3000, 16777164, NaN, 200, 40, null, stateCounter); setTimeout(showText, 6000, "Additional Design & Testing:", 3000, 0xFFFFFF, NaN, 100, 20, null, stateCounter); setTimeout(showText, 6000, "Brian Fisher", 3000, 16777164, NaN, 150, 40, null, stateCounter); setTimeout(showText, 6000, "Simon Hallam", 3000, 16777164, NaN, 200, 40, null, stateCounter); setTimeout(showText, 6000, "Lars Brubaker", 3000, 16777164, NaN, 250, 40, null, stateCounter); setTimeout(function (_arg1:int):void{ if (_arg1 == stateCounter){ showMainMenu(null); }; }, 10000, stateCounter); } private function setCursorSize():void{ cursorSize = (cursorDefaultSize + combo); if (cursorSize < 3){ cursorSize = 3; } else { if (cursorSize > 50){ cursorSize = 50; }; }; updateCursor(); } private function clearPlayArea():void{ if (playArea != null){ removeChild(playArea); }; playArea = new Sprite(); playArea.graphics.lineStyle(6, 0xFFFFFF, 0.1); playArea.graphics.lineTo(stage.stageWidth, 0); playArea.graphics.lineStyle(2, 0xFFFFFF, 0.2); playArea.graphics.moveTo(0, 0); playArea.graphics.lineTo(stage.stageWidth, 0); addChild(playArea); } private function collectRainDrop(_arg1:RainDrop):void{ var textList:Array; var rd = _arg1; var amount:Number = Math.max(1, (maxRadius - rd.size)); if (rd.type == "powerUp"){ combo++; if (combo > 99){ combo = 99; }; if (combo > maxCombo){ maxCombo = combo; }; cursor.pulseGood(); setCursorSize(); textList = ["Yeah!", "Great!", "Good job!", "Super!", "Woohoo!", "Fabulous!", "Excellent!", "Wow!", "Amazing!", "Superb!", "Terrific!", "Fantastic!", "Splendid!", "Wonderful!", "Yes!"]; showText(textList[Math.floor((Math.random() * textList.length))], 500, 0xCCCC00, 50, NaN, 30); } else { if (rd.type == "powerDown"){ combo = Math.ceil((combo / 2)); cursor.pulseBad(); setCursorSize(); textList = ["Oops!", "Uh oh!", "Ouch!", "Oh no!", "Zowee!", "Yikes!", "Bummer!", "Shucks!"]; showText(textList[Math.floor((Math.random() * textList.length))], 500, 0xCC0000, (stage.stageWidth - 200), NaN, 30); } else { if (rd.type == "suction"){ showText("Purple Power!", 2000, 0xFF00FF, NaN, 50, 30); if (((suction) && (!(isNaN(suctionTimeout))))){ clearTimeout(suctionTimeout); }; suction = true; suctionTimeout = setTimeout(function ():void{ suction = false; }, 3000); }; }; }; addToScore((amount * combo)); playArea.removeChild(rd); } private function processMusic():void{ var _local1:Number; var _local4:int; var _local2:Number = 0; var _local3:Array = []; if (SoundMixer.areSoundsInaccessible()){ showPause(null); showText("Sound Conflict!", 3000, 16737894, NaN, 25, 14, clearPause, stateCounter); showText("You have another web page open with Flash that is emitting sound.", 3000, 16737894, NaN, 50, 14, clearPause, stateCounter); showText("Please close all other Flash windows and then click 'Resume'.", 3000, 16737894, NaN, 75, 14, clearPause, stateCounter); return; }; SoundMixer.computeSpectrum(ba, true, 0); _local4 = 0; while (_local4 < channelLength) { _local1 = ba.readFloat(); if (_local1 > 0.2){ _local3.push([_local4, _local1]); if (_local1 > _local2){ _local2 = _local1; }; }; _local4 = (_local4 + bandWidth); }; _local4 = 0; while (_local4 < _local3.length) { if (_local3[_local4][1] >= (0.9 * _local2)){ addRainDrop((((stage.stageWidth / 2) + ((_local3[_local4][0] / channelLength) * (stage.stageWidth / 2))) + (Math.random() * bandWidth)), 0, _local3[_local4][1]); addRainDrop((((stage.stageWidth / 2) - ((_local3[_local4][0] / channelLength) * (stage.stageWidth / 2))) + (Math.random() * bandWidth)), 0, _local3[_local4][1]); }; _local4++; }; } } }//package
Section 47
//MusicGame_introMovieClass (MusicGame_introMovieClass) package { import mx.core.*; import flash.utils.*; public class MusicGame_introMovieClass extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function MusicGame_introMovieClass(){ dataClass = MusicGame_introMovieClass_dataClass; super(); initialWidth = (10660 / 20); initialHeight = (8000 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package
Section 48
//MusicGame_introMovieClass_dataClass (MusicGame_introMovieClass_dataClass) package { import mx.core.*; public class MusicGame_introMovieClass_dataClass extends ByteArrayAsset { } }//package
Section 49
//MusicGame_musicClass (MusicGame_musicClass) package { import mx.core.*; public class MusicGame_musicClass extends SoundAsset { } }//package
Section 50
//MusicGame_verdana (MusicGame_verdana) package { import mx.core.*; public class MusicGame_verdana extends FontAsset { } }//package
Section 51
//Preloader (Preloader) package { import flash.events.*; import flash.display.*; import flash.utils.*; public dynamic class Preloader extends MovieClip { private var realHeight:int;// = 400 private var realWidth:int;// = 533 private var logo:Bitmap; private var gameName:String;// = "MusicGame" private var LogoClass:Class; private var logoBG:Bitmap; private var logoHeight:int;// = 68 private var logoMask:Sprite; private var logoWidth:int;// = 150 public function Preloader(){ var mochiClip:MovieClip; LogoClass = Preloader_LogoClass; super(); stop(); loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ }); MochiBot.track(this, "f1e3e96d"); if (loaderInfo.parameters.adKey != "1"){ mochiClip = new MovieClip(); addChild(mochiClip); MochiAd.showPreGameAd({id:"a054dcba3f9d2cf1", res:"533x400", clip:mochiClip, ad_finished:start}); } else { init(); }; } private function start(_arg1:TimerEvent=null):void{ var _local3:DisplayObject; nextFrame(); var _local2:Class = Class(getDefinitionByName(gameName)); if (_local2){ _local3 = new (_local2); addChild(_local3); _local3.dispatchEvent(new Event("Preloader Finished")); }; } private function showLoader(_arg1:Number):void{ var _local2:Number = Math.round((logoWidth * _arg1)); logoMask.graphics.clear(); logoMask.graphics.beginFill(0xFFFFFF, 1); logoMask.graphics.drawRect(0, 39, logoWidth, (logoHeight - 39)); logoMask.graphics.beginFill(0xFFFFFF, 1); logoMask.graphics.drawRect(0, 0, _local2, 38); logoMask.graphics.endFill(); } public function init():void{ logoBG = new LogoClass(); logoBG.alpha = 0.3; logoBG.x = Math.floor(((realWidth - logoWidth) / 2)); logoBG.y = Math.floor(((realHeight - logoHeight) / 2)); addChild(logoBG); logoMask = new Sprite(); logoMask.x = Math.floor(((realWidth - logoWidth) / 2)); logoMask.y = Math.floor(((realHeight - logoHeight) / 2)); addChild(logoMask); logo = new LogoClass(); logo.mask = logoMask; logo.x = Math.floor(((realWidth - logoWidth) / 2)); logo.y = Math.floor(((realHeight - logoHeight) / 2)); addChild(logo); addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function onEnterFrame(_arg1:Event):void{ var _local2:Timer; var _local3:Number; graphics.clear(); if (framesLoaded == totalFrames){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); _local2 = new Timer(100, 10); _local2.addEventListener(TimerEvent.TIMER, fadeOut); _local2.addEventListener(TimerEvent.TIMER_COMPLETE, start); _local2.start(); removeChild(logoBG); } else { _local3 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal); showLoader(_local3); }; } private function fadeOut(_arg1:TimerEvent):void{ var _local2:Timer = (_arg1.currentTarget as Timer); logo.alpha = ((10 - _local2.currentCount) / 10); } } }//package
Section 52
//Preloader_LogoClass (Preloader_LogoClass) package { import mx.core.*; public class Preloader_LogoClass extends BitmapAsset { } }//package
Section 53
//RainDrop (RainDrop) package { import flash.display.*; import flash.filters.*; public class RainDrop extends Sprite { public var size:Number; public var originalYVelocity:Number; public var shape:String; public var radius:Number; public var yVelocity:Number; public var type:String; public function RainDrop(){ filters = [new BlurFilter(2, 2, 1)]; } public function updateRainDrop(_arg1:int, _arg2:Number, _arg3:Number):void{ var _local6:int; var _local7:Number; graphics.clear(); var _local4:Number = (_arg3 / 2); var _local5:Number = ((originalYVelocity == 0)) ? 1 : Math.max(-1, (yVelocity / originalYVelocity)); radius = (((size * size) * size) * _arg1); radius = ((radius / 2) + ((radius / 2) * _local5)); if (type == "powerUp"){ radius = Math.max(5, radius); if ((((_local5 < 0)) && ((y < 50)))){ _local6 = ((0x111100 | ((y * 3) << 16)) | ((y * 3) << 8)); } else { _local6 = 0xDDDD00; }; graphics.lineStyle(2, _local6); graphics.beginFill(_local6, 0.8); } else { if (type == "powerDown"){ radius = Math.max(5, radius); if ((((_local5 < 0)) && ((y < 50)))){ _local6 = (0x110000 | ((y * 3) << 16)); } else { _local6 = 0xDD0000; }; graphics.lineStyle(2, _local6); graphics.beginFill(_local6, 0.8); } else { if (type == "suction"){ radius = Math.max(10, radius); if ((((_local5 < 0)) && ((y < 50)))){ _local6 = ((0x110011 | ((y * 3) << 16)) | ((y * 3) << 8)); } else { _local6 = 0xFF00FF; }; graphics.lineStyle(2, _local6); graphics.beginFill(_local6, 0.8); } else { _local6 = ((0x1111 | ((110 + (_local5 * 110)) << 8)) | (size * 180)); graphics.lineStyle(2, _local6); graphics.beginFill(_local6, 0.5); }; }; }; if (shape == "circle"){ graphics.drawCircle(0, 0, radius); } else { if (shape == "square"){ graphics.drawRoundRect(-(radius), -(radius), (radius * 2), (radius * 2), (radius / 2), (radius / 2)); } else { if (shape == "plus"){ graphics.drawRoundRect(-(radius), (-(radius) / 3), (radius * 2), ((2 * radius) / 3), (radius / 2), (radius / 2)); graphics.drawRoundRect((-(radius) / 3), -(radius), ((2 * radius) / 3), (radius * 2), (radius / 2), (radius / 2)); } else { if (shape == "triangle"){ graphics.moveTo(0, -(radius)); graphics.lineTo(-(radius), radius); graphics.lineTo(radius, radius); graphics.lineTo(0, -(radius)); } else { graphics.drawCircle(0, 0, radius); graphics.drawRect((-(radius) / 2), (-(radius) / 2), radius, radius); }; }; }; }; if (shape != "circle"){ _local7 = (Math.random() * 3); if (x < _local4){ rotation = (rotation + _local7); } else { rotation = (rotation - _local7); }; }; y = (y + yVelocity); yVelocity = (yVelocity + _arg2); if (_local5 < 0){ if (x < _local4){ x = (x - (2 * _local5)); } else { x = (x + (2 * _local5)); }; }; } } }//package

Library Items

Symbol 1 Bitmap {Preloader_LogoClass}
Symbol 2 Sound {MusicGame_musicClass} [MusicGame_musicClass]
Symbol 3 BinaryData {MusicGame_introMovieClass_dataClass}
Symbol 4 MovieClip {MusicGame_introMovieClass}
Symbol 5 Font {MusicGame_verdana}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 2 as "MusicGame_musicClass"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"two"Frame 2




http://swfchan.com/5/20204/info.shtml
Created: 29/5 -2019 08:17:35 Last modified: 29/5 -2019 08:17:35 Server time: 05/11 -2024 04:19:55