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

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

Preview.swf

This is the info page for
Flash #169145

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


Text
<p align="left"><font face="Myriad Pro Bold" size="12" color="#e7e8e9" letterSpacing="0.000000" kerning="1">Song Name</font></p>

<p align="left"><font face="Myriad Pro Bold" size="14" color="#e7e8e9" letterSpacing="0.000000" kerning="1">Artist Name</font></p>

ActionScript [AS3]

Section 1
//ColorShortcuts (caurina.transitions.properties.ColorShortcuts) package caurina.transitions.properties { import caurina.transitions.*; import flash.filters.*; import flash.geom.*; public class ColorShortcuts { private static var LUMINANCE_B:Number = 0.072169; private static var LUMINANCE_G:Number = 0.71516; private static var LUMINANCE_R:Number = 0.212671; public function ColorShortcuts(){ trace("This is an static class and should not be instantiated."); } public static function _color_splitter(_arg1, _arg2:Array):Array{ var _local3:Array = new Array(); if (_arg1 == null){ _local3.push({name:"_color_redMultiplier", value:1}); _local3.push({name:"_color_redOffset", value:0}); _local3.push({name:"_color_greenMultiplier", value:1}); _local3.push({name:"_color_greenOffset", value:0}); _local3.push({name:"_color_blueMultiplier", value:1}); _local3.push({name:"_color_blueOffset", value:0}); } else { _local3.push({name:"_color_redMultiplier", value:0}); _local3.push({name:"_color_redOffset", value:AuxFunctions.numberToR(_arg1)}); _local3.push({name:"_color_greenMultiplier", value:0}); _local3.push({name:"_color_greenOffset", value:AuxFunctions.numberToG(_arg1)}); _local3.push({name:"_color_blueMultiplier", value:0}); _local3.push({name:"_color_blueOffset", value:AuxFunctions.numberToB(_arg1)}); }; return (_local3); } public static function _contrast_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:Number; var _local6:Number; _local5 = (_arg2 + 1); _local6 = Math.round((_arg2 * -128)); var _local7:ColorTransform = new ColorTransform(_local5, _local5, _local5, 1, _local6, _local6, _local6, 0); _arg1.transform.colorTransform = _local7; } public static function _brightness_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ var _local4:Boolean = _arg2[0]; var _local5:ColorTransform = _arg1.transform.colorTransform; var _local6:Number = (1 - (((_local5.redMultiplier + _local5.greenMultiplier) + _local5.blueMultiplier) / 3)); var _local7:Number = (((_local5.redOffset + _local5.greenOffset) + _local5.blueOffset) / 3); if (_local4){ return (((_local7 > 0)) ? (_local7 / 0xFF) : -(_local6)); //unresolved jump }; return ((_local7 / 100)); } public static function _saturation_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ var _local4:Array = getObjectMatrix(_arg1); var _local5:Boolean = _arg2[0]; var _local6:Number = (_local5) ? (1 / 3) : LUMINANCE_R; var _local7:Number = (_local5) ? (1 / 3) : LUMINANCE_G; var _local8:Number = (_local5) ? (1 / 3) : LUMINANCE_B; var _local9:Number = (((((_local4[0] - _local6) / (1 - _local6)) + ((_local4[6] - _local7) / (1 - _local7))) + ((_local4[12] - _local8) / (1 - _local8))) / 3); var _local10:Number = (1 - (((((((_local4[1] / _local7) + (_local4[2] / _local8)) + (_local4[5] / _local6)) + (_local4[7] / _local8)) + (_local4[10] / _local6)) + (_local4[11] / _local7)) / 6)); return (((_local9 + _local10) / 2)); } public static function _oldColor_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return ((_arg1.transform.colorTransform[_arg2[0]] * 100)); } public static function _brightness_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local6:Number; var _local7:Number; var _local5:Boolean = _arg3[0]; if (_local5){ _local6 = (1 - Math.abs(_arg2)); _local7 = ((_arg2 > 0)) ? Math.round((_arg2 * 0xFF)) : 0; } else { _local6 = 1; _local7 = Math.round((_arg2 * 100)); }; var _local8:ColorTransform = new ColorTransform(_local6, _local6, _local6, 1, _local7, _local7, _local7, 0); _arg1.transform.colorTransform = _local8; } public static function _saturation_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:Boolean = _arg3[0]; var _local6:Number = (_local5) ? (1 / 3) : LUMINANCE_R; var _local7:Number = (_local5) ? (1 / 3) : LUMINANCE_G; var _local8:Number = (_local5) ? (1 / 3) : LUMINANCE_B; var _local9:Number = _arg2; var _local10:Number = (1 - _local9); var _local11:Number = (_local6 * _local10); var _local12:Number = (_local7 * _local10); var _local13:Number = (_local8 * _local10); var _local14:Array = [(_local11 + _local9), _local12, _local13, 0, 0, _local11, (_local12 + _local9), _local13, 0, 0, _local11, _local12, (_local13 + _local9), 0, 0, 0, 0, 0, 1, 0]; setObjectMatrix(_arg1, _local14); } private static function getObjectMatrix(_arg1:Object):Array{ var _local2:Number = 0; while (_local2 < _arg1.filters.length) { if ((_arg1.filters[_local2] is ColorMatrixFilter)){ return (_arg1.filters[_local2].matrix.concat()); }; _local2++; }; return ([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]); } public static function getHueDistance(_arg1:Array, _arg2:Array):Number{ return (((Math.abs((_arg1[0] - _arg2[0])) + Math.abs((_arg1[1] - _arg2[1]))) + Math.abs((_arg1[2] - _arg2[2])))); } public static function _hue_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ setObjectMatrix(_arg1, getHueMatrix(_arg2)); } public static function _hue_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ var _local6:Number; var _local8:Number; var _local4:Array = getObjectMatrix(_arg1); var _local5:Array = []; _local5[0] = {angle:-179.9, matrix:getHueMatrix(-179.9)}; _local5[1] = {angle:180, matrix:getHueMatrix(180)}; _local6 = 0; while (_local6 < _local5.length) { _local5[_local6].distance = getHueDistance(_local4, _local5[_local6].matrix); _local6++; }; var _local7:Number = 15; _local6 = 0; while (_local6 < _local7) { if (_local5[0].distance < _local5[1].distance){ _local8 = 1; } else { _local8 = 0; }; _local5[_local8].angle = ((_local5[0].angle + _local5[1].angle) / 2); _local5[_local8].matrix = getHueMatrix(_local5[_local8].angle); _local5[_local8].distance = getHueDistance(_local4, _local5[_local8].matrix); _local6++; }; return (_local5[_local8].angle); } public static function getHueMatrix(_arg1:Number):Array{ var _local2:Number = ((_arg1 * Math.PI) / 180); var _local3:Number = LUMINANCE_R; var _local4:Number = LUMINANCE_G; var _local5:Number = LUMINANCE_B; var _local6:Number = Math.cos(_local2); var _local7:Number = Math.sin(_local2); var _local8:Array = [((_local3 + (_local6 * (1 - _local3))) + (_local7 * -(_local3))), ((_local4 + (_local6 * -(_local4))) + (_local7 * -(_local4))), ((_local5 + (_local6 * -(_local5))) + (_local7 * (1 - _local5))), 0, 0, ((_local3 + (_local6 * -(_local3))) + (_local7 * 0.143)), ((_local4 + (_local6 * (1 - _local4))) + (_local7 * 0.14)), ((_local5 + (_local6 * -(_local5))) + (_local7 * -0.283)), 0, 0, ((_local3 + (_local6 * -(_local3))) + (_local7 * -((1 - _local3)))), ((_local4 + (_local6 * -(_local4))) + (_local7 * _local4)), ((_local5 + (_local6 * (1 - _local5))) + (_local7 * _local5)), 0, 0, 0, 0, 0, 1, 0]; return (_local8); } public static function _color_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return (_arg1.transform.colorTransform[_arg2[0]]); } public static function init():void{ Tweener.registerSpecialProperty("_color_ra", _oldColor_property_get, _oldColor_property_set, ["redMultiplier"]); Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["redOffset"]); Tweener.registerSpecialProperty("_color_ga", _oldColor_property_get, _oldColor_property_set, ["greenMultiplier"]); Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["greenOffset"]); Tweener.registerSpecialProperty("_color_ba", _oldColor_property_get, _oldColor_property_set, ["blueMultiplier"]); Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["blueOffset"]); Tweener.registerSpecialProperty("_color_aa", _oldColor_property_get, _oldColor_property_set, ["alphaMultiplier"]); Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["alphaOffset"]); Tweener.registerSpecialProperty("_color_redMultiplier", _color_property_get, _color_property_set, ["redMultiplier"]); Tweener.registerSpecialProperty("_color_redOffset", _color_property_get, _color_property_set, ["redOffset"]); Tweener.registerSpecialProperty("_color_greenMultiplier", _color_property_get, _color_property_set, ["greenMultiplier"]); Tweener.registerSpecialProperty("_color_greenOffset", _color_property_get, _color_property_set, ["greenOffset"]); Tweener.registerSpecialProperty("_color_blueMultiplier", _color_property_get, _color_property_set, ["blueMultiplier"]); Tweener.registerSpecialProperty("_color_blueOffset", _color_property_get, _color_property_set, ["blueOffset"]); Tweener.registerSpecialProperty("_color_alphaMultiplier", _color_property_get, _color_property_set, ["alphaMultiplier"]); Tweener.registerSpecialProperty("_color_alphaOffset", _color_property_get, _color_property_set, ["alphaOffset"]); Tweener.registerSpecialPropertySplitter("_color", _color_splitter); Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter); Tweener.registerSpecialProperty("_brightness", _brightness_get, _brightness_set, [false]); Tweener.registerSpecialProperty("_tintBrightness", _brightness_get, _brightness_set, [true]); Tweener.registerSpecialProperty("_contrast", _contrast_get, _contrast_set); Tweener.registerSpecialProperty("_hue", _hue_get, _hue_set); Tweener.registerSpecialProperty("_saturation", _saturation_get, _saturation_set, [false]); Tweener.registerSpecialProperty("_dumbSaturation", _saturation_get, _saturation_set, [true]); } private static function setObjectMatrix(_arg1:Object, _arg2:Array):void{ var _local6:ColorMatrixFilter; var _local3:Array = _arg1.filters.concat(); var _local4:Boolean; var _local5:Number = 0; while (_local5 < _local3.length) { if ((_local3[_local5] is ColorMatrixFilter)){ _local3[_local5].matrix = _arg2.concat(); _local4 = true; }; _local5++; }; if (!_local4){ _local6 = new ColorMatrixFilter(_arg2); _local3[_local3.length] = _local6; }; _arg1.filters = _local3; } public static function _color_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:ColorTransform = _arg1.transform.colorTransform; _local5[_arg3[0]] = _arg2; _arg1.transform.colorTransform = _local5; } public static function _oldColor_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:ColorTransform = _arg1.transform.colorTransform; _local5[_arg3[0]] = (_arg2 / 100); _arg1.transform.colorTransform = _local5; } public static function _contrast_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ var _local5:Number; var _local6:Number; var _local4:ColorTransform = _arg1.transform.colorTransform; _local5 = ((((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3) - 1); _local6 = ((((_local4.redOffset + _local4.greenOffset) + _local4.blueOffset) / 3) / -128); return (((_local5 + _local6) / 2)); } public static function _colorTransform_splitter(_arg1:Object, _arg2:Array):Array{ var _local3:Array = new Array(); if (_arg1 == null){ _local3.push({name:"_color_redMultiplier", value:1}); _local3.push({name:"_color_redOffset", value:0}); _local3.push({name:"_color_greenMultiplier", value:1}); _local3.push({name:"_color_greenOffset", value:0}); _local3.push({name:"_color_blueMultiplier", value:1}); _local3.push({name:"_color_blueOffset", value:0}); } else { if (_arg1.ra != undefined){ _local3.push({name:"_color_ra", value:_arg1.ra}); }; if (_arg1.rb != undefined){ _local3.push({name:"_color_rb", value:_arg1.rb}); }; if (_arg1.ga != undefined){ _local3.push({name:"_color_ba", value:_arg1.ba}); }; if (_arg1.gb != undefined){ _local3.push({name:"_color_bb", value:_arg1.bb}); }; if (_arg1.ba != undefined){ _local3.push({name:"_color_ga", value:_arg1.ga}); }; if (_arg1.bb != undefined){ _local3.push({name:"_color_gb", value:_arg1.gb}); }; if (_arg1.aa != undefined){ _local3.push({name:"_color_aa", value:_arg1.aa}); }; if (_arg1.ab != undefined){ _local3.push({name:"_color_ab", value:_arg1.ab}); }; if (_arg1.redMultiplier != undefined){ _local3.push({name:"_color_redMultiplier", value:_arg1.redMultiplier}); }; if (_arg1.redOffset != undefined){ _local3.push({name:"_color_redOffset", value:_arg1.redOffset}); }; if (_arg1.blueMultiplier != undefined){ _local3.push({name:"_color_blueMultiplier", value:_arg1.blueMultiplier}); }; if (_arg1.blueOffset != undefined){ _local3.push({name:"_color_blueOffset", value:_arg1.blueOffset}); }; if (_arg1.greenMultiplier != undefined){ _local3.push({name:"_color_greenMultiplier", value:_arg1.greenMultiplier}); }; if (_arg1.greenOffset != undefined){ _local3.push({name:"_color_greenOffset", value:_arg1.greenOffset}); }; if (_arg1.alphaMultiplier != undefined){ _local3.push({name:"_color_alphaMultiplier", value:_arg1.alphaMultiplier}); }; if (_arg1.alphaOffset != undefined){ _local3.push({name:"_color_alphaOffset", value:_arg1.alphaOffset}); }; }; return (_local3); } } }//package caurina.transitions.properties
Section 2
//AuxFunctions (caurina.transitions.AuxFunctions) package caurina.transitions { public class AuxFunctions { public static function concatObjects(... _args):Object{ var _local3:Object; var _local5:String; var _local2:Object = {}; var _local4:int; while (_local4 < _args.length) { _local3 = _args[_local4]; for (_local5 in _local3) { if (_local3[_local5] == null){ delete _local2[_local5]; } else { _local2[_local5] = _local3[_local5]; }; }; _local4++; }; return (_local2); } public static function numberToG(_arg1:Number):Number{ return (((_arg1 & 0xFF00) >> 8)); } public static function numberToR(_arg1:Number):Number{ return (((_arg1 & 0xFF0000) >> 16)); } public static function isInArray(_arg1:String, _arg2:Array):Boolean{ var _local3:uint = _arg2.length; var _local4:uint; while (_local4 < _local3) { if (_arg2[_local4] == _arg1){ return (true); }; _local4++; }; return (false); } public static function getObjectLength(_arg1:Object):uint{ var _local3:String; var _local2:uint; for (_local3 in _arg1) { _local2++; }; return (_local2); } public static function numberToB(_arg1:Number):Number{ return ((_arg1 & 0xFF)); } } }//package caurina.transitions
Section 3
//Equations (caurina.transitions.Equations) package caurina.transitions { public class Equations { public function Equations(){ trace("Equations is a static class and should not be instantiated."); } public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); }; --_arg1; return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2)); } public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ _local6 = (_local6 * 1.525); return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2)); }; _arg1 = (_arg1 - 2); _local6 = (_local6 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2)); } public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2)); } public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2)); } public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2)); } public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function init():void{ Tweener.registerTransition("easenone", easeNone); Tweener.registerTransition("linear", easeNone); Tweener.registerTransition("easeinquad", easeInQuad); Tweener.registerTransition("easeoutquad", easeOutQuad); Tweener.registerTransition("easeinoutquad", easeInOutQuad); Tweener.registerTransition("easeoutinquad", easeOutInQuad); Tweener.registerTransition("easeincubic", easeInCubic); Tweener.registerTransition("easeoutcubic", easeOutCubic); Tweener.registerTransition("easeinoutcubic", easeInOutCubic); Tweener.registerTransition("easeoutincubic", easeOutInCubic); Tweener.registerTransition("easeinquart", easeInQuart); Tweener.registerTransition("easeoutquart", easeOutQuart); Tweener.registerTransition("easeinoutquart", easeInOutQuart); Tweener.registerTransition("easeoutinquart", easeOutInQuart); Tweener.registerTransition("easeinquint", easeInQuint); Tweener.registerTransition("easeoutquint", easeOutQuint); Tweener.registerTransition("easeinoutquint", easeInOutQuint); Tweener.registerTransition("easeoutinquint", easeOutInQuint); Tweener.registerTransition("easeinsine", easeInSine); Tweener.registerTransition("easeoutsine", easeOutSine); Tweener.registerTransition("easeinoutsine", easeInOutSine); Tweener.registerTransition("easeoutinsine", easeOutInSine); Tweener.registerTransition("easeincirc", easeInCirc); Tweener.registerTransition("easeoutcirc", easeOutCirc); Tweener.registerTransition("easeinoutcirc", easeInOutCirc); Tweener.registerTransition("easeoutincirc", easeOutInCirc); Tweener.registerTransition("easeinexpo", easeInExpo); Tweener.registerTransition("easeoutexpo", easeOutExpo); Tweener.registerTransition("easeinoutexpo", easeInOutExpo); Tweener.registerTransition("easeoutinexpo", easeOutInExpo); Tweener.registerTransition("easeinelastic", easeInElastic); Tweener.registerTransition("easeoutelastic", easeOutElastic); Tweener.registerTransition("easeinoutelastic", easeInOutElastic); Tweener.registerTransition("easeoutinelastic", easeOutInElastic); Tweener.registerTransition("easeinback", easeInBack); Tweener.registerTransition("easeoutback", easeOutBack); Tweener.registerTransition("easeinoutback", easeInOutBack); Tweener.registerTransition("easeoutinback", easeOutInBack); Tweener.registerTransition("easeinbounce", easeInBounce); Tweener.registerTransition("easeoutbounce", easeOutBounce); Tweener.registerTransition("easeinoutbounce", easeInOutBounce); Tweener.registerTransition("easeoutinbounce", easeOutInBounce); } public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2)); } public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001))); } public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2)); } public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2)); } public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2)); } public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2)); } public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; --_arg1; return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); } public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); } public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005))); }; --_arg1; return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2)); } public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2)); } public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2)); } public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } } }//package caurina.transitions
Section 4
//PropertyInfoObj (caurina.transitions.PropertyInfoObj) package caurina.transitions { public class PropertyInfoObj { public var modifierParameters:Array; public var isSpecialProperty:Boolean; public var valueComplete:Number; public var modifierFunction:Function; public var extra:Object; public var valueStart:Number; public var hasModifier:Boolean; public var arrayIndex:Number; public var originalValueComplete:Object; public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){ valueStart = _arg1; valueComplete = _arg2; originalValueComplete = _arg3; arrayIndex = _arg4; extra = _arg5; isSpecialProperty = _arg6; hasModifier = Boolean(_arg7); modifierFunction = _arg7; modifierParameters = _arg8; } public function toString():String{ var _local1 = "\n[PropertyInfoObj "; _local1 = (_local1 + ("valueStart:" + String(valueStart))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("valueComplete:" + String(valueComplete))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("arrayIndex:" + String(arrayIndex))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("extra:" + String(extra))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("hasModifier:" + String(hasModifier))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("modifierFunction:" + String(modifierFunction))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("modifierParameters:" + String(modifierParameters))); _local1 = (_local1 + "]\n"); return (_local1); } public function clone():PropertyInfoObj{ var _local1:PropertyInfoObj = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters); return (_local1); } } }//package caurina.transitions
Section 5
//SpecialProperty (caurina.transitions.SpecialProperty) package caurina.transitions { public class SpecialProperty { public var parameters:Array; public var getValue:Function; public var preProcess:Function; public var setValue:Function; public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){ getValue = _arg1; setValue = _arg2; parameters = _arg3; preProcess = _arg4; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialProperty "); _local1 = (_local1 + ("getValue:" + String(getValue))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("setValue:" + String(setValue))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("parameters:" + String(parameters))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("preProcess:" + String(preProcess))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitions
Section 6
//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier) package caurina.transitions { public class SpecialPropertyModifier { public var getValue:Function; public var modifyValues:Function; public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){ modifyValues = _arg1; getValue = _arg2; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialPropertyModifier "); _local1 = (_local1 + ("modifyValues:" + String(modifyValues))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("getValue:" + String(getValue))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitions
Section 7
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter) package caurina.transitions { public class SpecialPropertySplitter { public var parameters:Array; public var splitValues:Function; public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){ splitValues = _arg1; parameters = _arg2; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialPropertySplitter "); _local1 = (_local1 + ("splitValues:" + String(splitValues))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("parameters:" + String(parameters))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitions
Section 8
//Tweener (caurina.transitions.Tweener) package caurina.transitions { import flash.events.*; import flash.display.*; import flash.utils.*; public class Tweener { private static var _timeScale:Number = 1; private static var _currentTimeFrame:Number; private static var _specialPropertySplitterList:Object; private static var _engineExists:Boolean = false; private static var _specialPropertyModifierList:Object; private static var _currentTime:Number; private static var _tweenList:Array; private static var _specialPropertyList:Object; private static var _transitionList:Object; private static var _inited:Boolean = false; private static var __tweener_controller__:MovieClip; public function Tweener(){ trace("Tweener is a static class and should not be instantiated."); } public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{ if (!_inited){ init(); }; var _local4:SpecialPropertyModifier = new SpecialPropertyModifier(_arg2, _arg3); _specialPropertyModifierList[_arg1] = _local4; } public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{ if (!_inited){ init(); }; var _local6:SpecialProperty = new SpecialProperty(_arg2, _arg3, _arg4, _arg5); _specialPropertyList[_arg1] = _local6; } public static function init(... _args):void{ _inited = true; _transitionList = new Object(); Equations.init(); _specialPropertyList = new Object(); _specialPropertyModifierList = new Object(); _specialPropertySplitterList = new Object(); } private static function updateTweens():Boolean{ var _local1:int; if (_tweenList.length == 0){ return (false); }; _local1 = 0; while (_local1 < _tweenList.length) { if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){ if (!updateTweenByIndex(_local1)){ removeTweenByIndex(_local1); }; if (_tweenList[_local1] == null){ removeTweenByIndex(_local1, true); _local1--; }; }; _local1++; }; return (true); } public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local3:Number; var _local4:Array; var _local8:Function; var _local9:TweenListObj; var _local10:Number; var _local11:String; if (!Boolean(_arg1)){ return (false); }; if ((_arg1 is Array)){ _local4 = _arg1.concat(); } else { _local4 = [_arg1]; }; var _local5:Object = _arg2; if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; var _local6:Number = (isNaN(_local5.time)) ? 0 : _local5.time; var _local7:Number = (isNaN(_local5.delay)) ? 0 : _local5.delay; if (typeof(_local5.transition) == "string"){ _local11 = _local5.transition.toLowerCase(); _local8 = _transitionList[_local11]; } else { _local8 = _local5.transition; }; if (!Boolean(_local8)){ _local8 = _transitionList["easeoutexpo"]; }; _local3 = 0; while (_local3 < _local4.length) { if (_local5.useFrames == true){ _local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams); } else { _local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams); }; _local9.properties = null; _local9.onStart = _local5.onStart; _local9.onUpdate = _local5.onUpdate; _local9.onComplete = _local5.onComplete; _local9.onOverwrite = _local5.onOverwrite; _local9.onStartParams = _local5.onStartParams; _local9.onUpdateParams = _local5.onUpdateParams; _local9.onCompleteParams = _local5.onCompleteParams; _local9.onOverwriteParams = _local5.onOverwriteParams; _local9.onStartScope = _local5.onStartScope; _local9.onUpdateScope = _local5.onUpdateScope; _local9.onCompleteScope = _local5.onCompleteScope; _local9.onOverwriteScope = _local5.onOverwriteScope; _local9.onErrorScope = _local5.onErrorScope; _local9.isCaller = true; _local9.count = _local5.count; _local9.waitFrames = _local5.waitFrames; _tweenList.push(_local9); if ((((_local6 == 0)) && ((_local7 == 0)))){ _local10 = (_tweenList.length - 1); updateTweenByIndex(_local10); removeTweenByIndex(_local10); }; _local3++; }; return (true); } public static function pauseAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { pauseTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function removeTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(removeTweenByIndex, _arg1, _local3)); } public static function splitTweens(_arg1:Number, _arg2:Array):uint{ var _local5:uint; var _local6:String; var _local7:Boolean; var _local3:TweenListObj = _tweenList[_arg1]; var _local4:TweenListObj = _local3.clone(false); _local5 = 0; while (_local5 < _arg2.length) { _local6 = _arg2[_local5]; if (Boolean(_local3.properties[_local6])){ _local3.properties[_local6] = undefined; delete _local3.properties[_local6]; }; _local5++; }; for (_local6 in _local4.properties) { _local7 = false; _local5 = 0; while (_local5 < _arg2.length) { if (_arg2[_local5] == _local6){ _local7 = true; break; }; _local5++; }; if (!_local7){ _local4.properties[_local6] = undefined; delete _local4.properties[_local6]; }; }; _tweenList.push(_local4); return ((_tweenList.length - 1)); } public static function updateFrame():void{ _currentTimeFrame++; } public static function resumeTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj = _tweenList[_arg1]; if ((((_local2 == null)) || (!(_local2.isPaused)))){ return (false); }; var _local3:Number = getCurrentTweeningTime(_local2); _local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused)); _local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused)); _local2.timePaused = undefined; _local2.isPaused = false; return (true); } public static function getVersion():String{ return ("AS3 1.31.71"); } public static function onEnterFrame(_arg1:Event):void{ updateTime(); updateFrame(); var _local2:Boolean; _local2 = updateTweens(); if (!_local2){ stopEngine(); }; } public static function updateTime():void{ _currentTime = getTimer(); } private static function updateTweenByIndex(_arg1:Number):Boolean{ var tTweening:TweenListObj; var mustUpdate:Boolean; var nv:Number; var t:Number; var b:Number; var c:Number; var d:Number; var pName:String; var eventScope:Object; var tScope:Object; var tProperty:Object; var pv:Number; var i = _arg1; tTweening = _tweenList[i]; if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){ return (false); }; var isOver:Boolean; var cTime:Number = getCurrentTweeningTime(tTweening); if (cTime >= tTweening.timeStart){ tScope = tTweening.scope; if (tTweening.isCaller){ do { t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1)); b = tTweening.timeStart; c = (tTweening.timeComplete - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d); } while (!(cTime >= nv)); } else { mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates))); if (cTime >= tTweening.timeComplete){ isOver = true; mustUpdate = true; }; if (!tTweening.hasStarted){ if (Boolean(tTweening.onStart)){ eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope; try { tTweening.onStart.apply(eventScope, tTweening.onStartParams); } catch(e:Error) { handleError(tTweening, e, "onStart"); }; }; for (pName in tTweening.properties) { if (tTweening.properties[pName].isSpecialProperty){ if (Boolean(_specialPropertyList[pName].preProcess)){ tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra); }; pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra); } else { pv = tScope[pName]; }; tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv; }; mustUpdate = true; tTweening.hasStarted = true; }; if (mustUpdate){ for (pName in tTweening.properties) { tProperty = tTweening.properties[pName]; if (isOver){ nv = tProperty.valueComplete; } else { if (tProperty.hasModifier){ t = (cTime - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams); nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters); } else { t = (cTime - tTweening.timeStart); b = tProperty.valueStart; c = (tProperty.valueComplete - tProperty.valueStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d, tTweening.transitionParams); }; }; if (tTweening.rounded){ nv = Math.round(nv); }; if (tProperty.isSpecialProperty){ _specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra); } else { tScope[pName] = nv; }; }; tTweening.updatesSkipped = 0; if (Boolean(tTweening.onUpdate)){ eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope; try { tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams); } catch(e:Error) { handleError(tTweening, e, "onUpdate"); }; }; } else { tTweening.updatesSkipped++; }; }; if (((isOver) && (Boolean(tTweening.onComplete)))){ eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope; try { tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams); } catch(e:Error) { handleError(tTweening, e, "onComplete"); }; }; return (!(isOver)); }; return (true); } public static function setTimeScale(_arg1:Number):void{ var _local2:Number; var _local3:Number; if (isNaN(_arg1)){ _arg1 = 1; }; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; if (_arg1 != _timeScale){ if (_tweenList != null){ _local2 = 0; while (_local2 < _tweenList.length) { _local3 = getCurrentTweeningTime(_tweenList[_local2]); _tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1)); _tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1)); if (_tweenList[_local2].timePaused != undefined){ _tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1)); }; _local2++; }; }; _timeScale = _arg1; }; } public static function resumeAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { resumeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{ var eventScope:Object; var pTweening = _arg1; var pError = _arg2; var pCallBackName = _arg3; if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){ eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope; try { pTweening.onError.apply(eventScope, [pTweening.scope, pError]); } catch(metaError:Error) { printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace())); }; } else { if (!Boolean(pTweening.onError)){ printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace())); }; }; } private static function startEngine():void{ _engineExists = true; _tweenList = new Array(); __tweener_controller__ = new MovieClip(); __tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); _currentTimeFrame = 0; updateTime(); } public static function removeAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { removeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local3:Number; var _local4:Number; var _local5:String; var _local6:Array; var _local13:Function; var _local14:Object; var _local15:TweenListObj; var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:String; if (!Boolean(_arg1)){ return (false); }; if ((_arg1 is Array)){ _local6 = _arg1.concat(); } else { _local6 = [_arg1]; }; var _local7:Object = TweenListObj.makePropertiesChain(_arg2); if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; var _local8:Number = (isNaN(_local7.time)) ? 0 : _local7.time; var _local9:Number = (isNaN(_local7.delay)) ? 0 : _local7.delay; var _local10:Array = new Array(); var _local11:Object = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true}; var _local12:Object = new Object(); for (_local5 in _local7) { if (!_local11[_local5]){ if (_specialPropertySplitterList[_local5]){ _local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters); _local3 = 0; while (_local3 < _local17.length) { if (_specialPropertySplitterList[_local17[_local3].name]){ _local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters); _local4 = 0; while (_local4 < _local18.length) { _local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false}; _local4++; }; } else { _local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false}; }; _local3++; }; } else { if (_specialPropertyModifierList[_local5] != undefined){ _local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]); _local3 = 0; while (_local3 < _local19.length) { _local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue}; _local3++; }; } else { _local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]}; }; }; }; }; for (_local5 in _local10) { if (_specialPropertyList[_local5] != undefined){ _local10[_local5].isSpecialProperty = true; } else { if (_local6[0][_local5] == undefined){ printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property.")); }; }; }; for (_local5 in _local12) { if (_local10[_local5] != undefined){ _local10[_local5].modifierParameters = _local12[_local5].modifierParameters; _local10[_local5].modifierFunction = _local12[_local5].modifierFunction; }; }; if (typeof(_local7.transition) == "string"){ _local20 = _local7.transition.toLowerCase(); _local13 = _transitionList[_local20]; } else { _local13 = _local7.transition; }; if (!Boolean(_local13)){ _local13 = _transitionList["easeoutexpo"]; }; _local3 = 0; while (_local3 < _local6.length) { _local14 = new Object(); for (_local5 in _local10) { _local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters); }; if (_local7.useFrames == true){ _local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams); } else { _local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams); }; _local15.properties = _local14; _local15.onStart = _local7.onStart; _local15.onUpdate = _local7.onUpdate; _local15.onComplete = _local7.onComplete; _local15.onOverwrite = _local7.onOverwrite; _local15.onError = _local7.onError; _local15.onStartParams = _local7.onStartParams; _local15.onUpdateParams = _local7.onUpdateParams; _local15.onCompleteParams = _local7.onCompleteParams; _local15.onOverwriteParams = _local7.onOverwriteParams; _local15.onStartScope = _local7.onStartScope; _local15.onUpdateScope = _local7.onUpdateScope; _local15.onCompleteScope = _local7.onCompleteScope; _local15.onOverwriteScope = _local7.onOverwriteScope; _local15.onErrorScope = _local7.onErrorScope; _local15.rounded = _local7.rounded; _local15.skipUpdates = _local7.skipUpdates; removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete); _tweenList.push(_local15); if ((((_local8 == 0)) && ((_local9 == 0)))){ _local16 = (_tweenList.length - 1); updateTweenByIndex(_local16); removeTweenByIndex(_local16); }; _local3++; }; return (true); } public static function registerTransition(_arg1:String, _arg2:Function):void{ if (!_inited){ init(); }; _transitionList[_arg1] = _arg2; } public static function printError(_arg1:String):void{ trace(("## [Tweener] Error: " + _arg1)); } private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{ var _local5:uint; var _local6:Array; var _local7:uint; var _local8:uint; var _local9:uint; var _local4:Boolean; if (!Boolean(_tweenList)){ return (false); }; _local5 = 0; while (_local5 < _tweenList.length) { if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){ if (_arg3.length == 0){ _arg1(_local5); _local4 = true; } else { _local6 = new Array(); _local7 = 0; while (_local7 < _arg3.length) { if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){ _local6.push(_arg3[_local7]); }; _local7++; }; if (_local6.length > 0){ _local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties); if (_local8 == _local6.length){ _arg1(_local5); _local4 = true; } else { _local9 = splitTweens(_local5, _local6); _arg1(_local9); _local4 = true; }; }; }; }; _local5++; }; return (_local4); } public static function getTweens(_arg1:Object):Array{ var _local2:uint; var _local3:String; if (!Boolean(_tweenList)){ return ([]); }; var _local4:Array = new Array(); _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ for (_local3 in _tweenList[_local2].properties) { _local4.push(_local3); }; }; _local2++; }; return (_local4); } public static function isTweening(_arg1:Object):Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ return (true); }; _local2++; }; return (false); } public static function pauseTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj = _tweenList[_arg1]; if ((((_local2 == null)) || (_local2.isPaused))){ return (false); }; _local2.timePaused = getCurrentTweeningTime(_local2); _local2.isPaused = true; return (true); } public static function getCurrentTweeningTime(_arg1:Object):Number{ return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime); } public static function getTweenCount(_arg1:Object):Number{ var _local2:uint; if (!Boolean(_tweenList)){ return (0); }; var _local3:Number = 0; _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ _local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties)); }; _local2++; }; return (_local3); } private static function stopEngine():void{ _engineExists = false; _tweenList = null; _currentTime = 0; _currentTimeFrame = 0; __tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); __tweener_controller__ = null; } public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{ var removedLocally:Boolean; var i:uint; var pName:String; var eventScope:Object; var p_scope = _arg1; var p_properties = _arg2; var p_timeStart = _arg3; var p_timeComplete = _arg4; var removed:Boolean; var tl:uint = _tweenList.length; i = 0; while (i < tl) { if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){ if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){ removedLocally = false; for (pName in _tweenList[i].properties) { if (Boolean(p_properties[pName])){ if (Boolean(_tweenList[i].onOverwrite)){ eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope; try { _tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams); } catch(e:Error) { handleError(_tweenList[i], e, "onOverwrite"); }; }; _tweenList[i].properties[pName] = undefined; delete _tweenList[i].properties[pName]; removedLocally = true; removed = true; }; }; if (removedLocally){ if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){ removeTweenByIndex(i); }; }; }; }; i = (i + 1); }; return (removed); } public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{ if (!_inited){ init(); }; var _local4:SpecialPropertySplitter = new SpecialPropertySplitter(_arg2, _arg3); _specialPropertySplitterList[_arg1] = _local4; } public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{ _tweenList[_arg1] = null; if (_arg2){ _tweenList.splice(_arg1, 1); }; return (true); } public static function resumeTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(resumeTweenByIndex, _arg1, _local3)); } public static function pauseTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(pauseTweenByIndex, _arg1, _local3)); } } }//package caurina.transitions
Section 9
//TweenListObj (caurina.transitions.TweenListObj) package caurina.transitions { public class TweenListObj { public var hasStarted:Boolean; public var onUpdate:Function; public var useFrames:Boolean; public var count:Number; public var onOverwriteParams:Array; public var timeStart:Number; public var timeComplete:Number; public var onStartParams:Array; public var onUpdateScope:Object; public var rounded:Boolean; public var onUpdateParams:Array; public var properties:Object; public var onComplete:Function; public var transitionParams:Object; public var updatesSkipped:Number; public var onStart:Function; public var onOverwriteScope:Object; public var skipUpdates:Number; public var onStartScope:Object; public var scope:Object; public var isCaller:Boolean; public var timePaused:Number; public var transition:Function; public var onCompleteParams:Array; public var onError:Function; public var timesCalled:Number; public var onErrorScope:Object; public var onOverwrite:Function; public var isPaused:Boolean; public var waitFrames:Boolean; public var onCompleteScope:Object; public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){ scope = _arg1; timeStart = _arg2; timeComplete = _arg3; useFrames = _arg4; transition = _arg5; transitionParams = _arg6; properties = new Object(); isPaused = false; timePaused = undefined; isCaller = false; updatesSkipped = 0; timesCalled = 0; skipUpdates = 0; hasStarted = false; } public function clone(_arg1:Boolean):TweenListObj{ var _local3:String; var _local2:TweenListObj = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams); _local2.properties = new Array(); for (_local3 in properties) { _local2.properties[_local3] = properties[_local3].clone(); }; _local2.skipUpdates = skipUpdates; _local2.updatesSkipped = updatesSkipped; if (!_arg1){ _local2.onStart = onStart; _local2.onUpdate = onUpdate; _local2.onComplete = onComplete; _local2.onOverwrite = onOverwrite; _local2.onError = onError; _local2.onStartParams = onStartParams; _local2.onUpdateParams = onUpdateParams; _local2.onCompleteParams = onCompleteParams; _local2.onOverwriteParams = onOverwriteParams; _local2.onStartScope = onStartScope; _local2.onUpdateScope = onUpdateScope; _local2.onCompleteScope = onCompleteScope; _local2.onOverwriteScope = onOverwriteScope; _local2.onErrorScope = onErrorScope; }; _local2.rounded = rounded; _local2.isPaused = isPaused; _local2.timePaused = timePaused; _local2.isCaller = isCaller; _local2.count = count; _local2.timesCalled = timesCalled; _local2.waitFrames = waitFrames; _local2.hasStarted = hasStarted; return (_local2); } public function toString():String{ var _local3:String; var _local1 = "\n[TweenListObj "; _local1 = (_local1 + ("scope:" + String(scope))); _local1 = (_local1 + ", properties:"); var _local2:Boolean; for (_local3 in properties) { if (!_local2){ _local1 = (_local1 + ","); }; _local1 = (_local1 + ("[name:" + properties[_local3].name)); _local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart)); _local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete)); _local1 = (_local1 + "]"); _local2 = false; }; _local1 = (_local1 + (", timeStart:" + String(timeStart))); _local1 = (_local1 + (", timeComplete:" + String(timeComplete))); _local1 = (_local1 + (", useFrames:" + String(useFrames))); _local1 = (_local1 + (", transition:" + String(transition))); _local1 = (_local1 + (", transitionParams:" + String(transitionParams))); if (skipUpdates){ _local1 = (_local1 + (", skipUpdates:" + String(skipUpdates))); }; if (updatesSkipped){ _local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped))); }; if (Boolean(onStart)){ _local1 = (_local1 + (", onStart:" + String(onStart))); }; if (Boolean(onUpdate)){ _local1 = (_local1 + (", onUpdate:" + String(onUpdate))); }; if (Boolean(onComplete)){ _local1 = (_local1 + (", onComplete:" + String(onComplete))); }; if (Boolean(onOverwrite)){ _local1 = (_local1 + (", onOverwrite:" + String(onOverwrite))); }; if (Boolean(onError)){ _local1 = (_local1 + (", onError:" + String(onError))); }; if (onStartParams){ _local1 = (_local1 + (", onStartParams:" + String(onStartParams))); }; if (onUpdateParams){ _local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams))); }; if (onCompleteParams){ _local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams))); }; if (onOverwriteParams){ _local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams))); }; if (onStartScope){ _local1 = (_local1 + (", onStartScope:" + String(onStartScope))); }; if (onUpdateScope){ _local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope))); }; if (onCompleteScope){ _local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope))); }; if (onOverwriteScope){ _local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope))); }; if (onErrorScope){ _local1 = (_local1 + (", onErrorScope:" + String(onErrorScope))); }; if (rounded){ _local1 = (_local1 + (", rounded:" + String(rounded))); }; if (isPaused){ _local1 = (_local1 + (", isPaused:" + String(isPaused))); }; if (timePaused){ _local1 = (_local1 + (", timePaused:" + String(timePaused))); }; if (isCaller){ _local1 = (_local1 + (", isCaller:" + String(isCaller))); }; if (count){ _local1 = (_local1 + (", count:" + String(count))); }; if (timesCalled){ _local1 = (_local1 + (", timesCalled:" + String(timesCalled))); }; if (waitFrames){ _local1 = (_local1 + (", waitFrames:" + String(waitFrames))); }; if (hasStarted){ _local1 = (_local1 + (", hasStarted:" + String(hasStarted))); }; _local1 = (_local1 + "]\n"); return (_local1); } public static function makePropertiesChain(_arg1:Object):Object{ var _local3:Object; var _local4:Object; var _local5:Object; var _local6:Number; var _local7:Number; var _local8:Number; var _local2:Object = _arg1.base; if (_local2){ _local3 = {}; if ((_local2 is Array)){ _local4 = []; _local8 = 0; while (_local8 < _local2.length) { _local4.push(_local2[_local8]); _local8++; }; } else { _local4 = [_local2]; }; _local4.push(_arg1); _local6 = _local4.length; _local7 = 0; while (_local7 < _local6) { if (_local4[_local7]["base"]){ _local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]); } else { _local5 = _local4[_local7]; }; _local3 = AuxFunctions.concatObjects(_local3, _local5); _local7++; }; if (_local3["base"]){ delete _local3["base"]; }; return (_local3); //unresolved jump }; return (_arg1); } } }//package caurina.transitions
Section 10
//SimpleMp3Player (com.vuzum.simplemp3player.SimpleMp3Player) package com.vuzum.simplemp3player { import flash.text.*; import flash.events.*; import flash.net.*; import flash.display.*; import caurina.transitions.*; import com.vuzum.utils.*; import caurina.transitions.properties.*; import flash.media.*; import flash.geom.*; import flash.utils.*; public class SimpleMp3Player extends MovieClip { private var playPauseBtBackColor:Number; private var strokeColor:Number; private var playButtonWidthRatio:Number; public var mcVisualizer:MovieClip; private var songURL:String;// = "" private var playPauseBtBackOverColor:Number; public var sound:Sound; private var volumePercentMarginX:Number;// = 5 private var volumePercentMarginY:Number;// = 5 private var contentXmlPath:String;// = "" private var startValue:Number; private var songFontSize:Number;// = 12 private var songName:String;// = "" public var mcLoader:MovieClip; private var songColor:Number; private var volumeSignNormalAlpha:Number;// = 1 private var visualWavesColor:Number;// = 5790043 private var pos:Number;// = 0 public var mcShadow:MovieClip; public var mcVolume:MovieClip; private var volumePercentColor:Number; private var playPauseBtSignStrokeColor:Number; private var artistColor:Number; private var endValue:Number; private var volumeInitLevel:Number;// = 50 public var mcVolumeMask:MovieClip; public var sc:SoundChannel; private var autoplay:Boolean;// = false private var artistFontSize:Number;// = 14 private var artistName:String;// = "" private var visualBackColor:Number;// = 5790043 private var componentHeight:Number; private var volumeScrubStrokeColor:Number; public var mcBack:MovieClip; public var mcPlayPauseBt:MovieClip; private var fillColor:Number; public var mcMask:MovieClip; private var volumeSignOverAlpha:Number;// = 0.5 private var margin:Number;// = 5 private var playPauseBtSignFillColor:Number; private var playButtonHeightRatio:Number; private var volumeSignColor:Number; private var volumePercentPositionY:String; private var componentWidth:Number; private var pathToFiles:String;// = "" private var volumeSignOverColor:Number; private var xmlPath:String;// = "" private var volumeScrubFillColor:Number; private var currPressedObject:MovieClip; private var volumePercentDefaultPositionY:Number; public function SimpleMp3Player(){ volumePercentDefaultPositionY = volumePercentMarginY; super(); ColorShortcuts.init(); new Prototypes(); mcPlayPauseBt.mcPause.visible = false; mcVisualizer.mask = mcMask; mcVisualizer.mcVisualWaves.mask = mcVisualizer.mcMask; mcVisualizer.mcVisualWaves.visible = false; mcVisualizer.mcMask.mc1.alpha = 1; mcVisualizer.mcMask.mc1.width = 0; mcVisualizer.mcMask.mc2.alpha = 0.3; mcVisualizer.mcMask.mc2.width = 0; mcVolume.mask = mcVolumeMask; mcVolume.mcPercent.txt.embedFonts = true; mcVolume.mcPercent.txt.autoSize = TextFieldAutoSize.LEFT; mcVolume.mcScrub.mouseChildren = false; mcVolume.mcScrub.visible = false; mcVolume.mcArea.visible = false; mcPlayPauseBt.mouseChildren = false; playButtonWidthRatio = (mcPlayPauseBt.mcPlay.width / mcPlayPauseBt.mcBack.width); playButtonHeightRatio = (mcPlayPauseBt.mcPlay.height / mcPlayPauseBt.mcBack.height); show(false, true); } public function playAudio():void{ togglePlayPause(); } public function writeArtist(_arg1:String="", _arg2:Boolean=false):void{ mcVolume.mcArtist.txt.text = (artistName = _arg1); mcVolume.mcArtist.x = Math.round(((mcVolume.mcArea.width - mcVolume.mcArtist.width) / 2)); if (_arg2){ mcVolume.mcArtist.y = Math.round(((mcVolume.mcArea.height - mcVolume.mcArtist.height) / 2)); }; } public function init(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:String="", _arg4:String="", _arg5:String="", _arg6:String="", _arg7:String=""):void{ componentWidth = _arg1; componentHeight = _arg2; pathToFiles = Prototypes.readPathTo(_arg3, pathToFiles); xmlPath = Prototypes.readAssetPath(_arg4, pathToFiles); songURL = Prototypes.readAssetPath(_arg5, pathToFiles); artistName = Prototypes.readStringVar(_arg6, artistName); songName = Prototypes.readStringVar(_arg7, songName); show(false, true); mcVisualizer.mcVisualWaves.visible = false; mcLoader.centerOn((isNaN(componentWidth)) ? stage.stageWidth : componentWidth, (isNaN(componentHeight)) ? stage.stageHeight : componentHeight); if (xmlPath != ""){ Prototypes.loadXML(xmlPath, xmlLoaded, mcLoader); } else { start(); }; } public function outHandler(_arg1:MouseEvent):void{ var _local2:MovieClip = (_arg1.currentTarget as MovieClip); overToggle(_local2, false); } private function addEvents():void{ mcPlayPauseBt.addEvents(this); mcVolume.mcArea.addEvents(this); mcVolume.mcScrub.addEvents(this); } private function createVisualizerEffect(_arg1:Event):void{ var _local9:Number; var _local2:MovieClip = mcVisualizer.mcVisual; var _local3:ByteArray = new ByteArray(); var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = mcVisualizer.mcVisualWaves.width; var _local7:Number = mcVisualizer.mcVisualWaves.height; _local2.graphics.clear(); _local2.graphics.beginFill(visualBackColor); _local2.graphics.moveTo(_local4, _local7); SoundMixer.computeSpectrum(_local3); var _local8:uint; while (_local8 < 0x0100) { _local9 = ((-(_local3.readFloat()) * _local7) + _local7); if (((((_local8 * 2) <= _local6)) && ((_local9 <= _local7)))){ _local2.graphics.lineTo((_local8 * 2), _local9); }; _local8++; }; _local2.graphics.lineTo((_local4 + _local6), (_local5 + _local7)); _local2.graphics.lineTo((_local4 + _local6), _local5); _local2.graphics.lineTo(_local4, _local5); _local2.graphics.endFill(); } private function togglePlayPause(_arg1:Boolean=true):void{ if (_arg1){ if (sound != null){ sc = sound.play(pos); setSoundVolume = getVolume; sc.addEventListener(Event.SOUND_COMPLETE, soundComplete); }; } else { if (sc != null){ pos = sc.position; sc.stop(); }; }; visualizerToggle(_arg1); mcVolume.mcSong.showObject(!(_arg1)); mcVolume.mcArtist.showObject(!(_arg1)); mcVolume.mcArea.visible = (mcVolume.mcScrub.visible = _arg1); mcPlayPauseBt.mcPlay.visible = !(_arg1); mcPlayPauseBt.mcPause.visible = !(mcPlayPauseBt.mcPlay.visible); } public function get getVolume():Number{ return (((mcVolume.mcScrub.x - startValue) / (endValue - startValue))); } public function set setVolume(_arg1:Number):void{ mcVolume.mcScrub.x = Math.floor((startValue + (_arg1 * (endValue - startValue)))); adjustVolume(); } private function config():void{ setColors(); addEvents(); } public function releaseHandler(_arg1:MouseEvent):void{ var _local2:MovieClip = (_arg1.currentTarget as MovieClip); if (_local2 == this.currPressedObject){ releaseFunction(_local2); currPressedObject = null; }; } public function overToggle(_arg1:MovieClip, _arg2:Boolean=true):void{ if (((_arg2) || (((!(_arg2)) && (!(_arg1.pressed)))))){ switch (_arg1){ case mcPlayPauseBt: mcPlayPauseBt.mcBack.setColor((_arg2) ? playPauseBtBackOverColor : playPauseBtBackColor); break; case mcVolume.mcScrub: mcVolume.mcScrub.mcSign.setColor((_arg2) ? volumeSignOverColor : volumeSignColor); mcVolume.mcScrub.mcBack.mcFill.tweenAlpha((_arg2) ? volumeSignOverAlpha : volumeSignNormalAlpha); break; }; }; } public function loadNewSound(_arg1:String="", _arg2:String="", _arg3:String=""):void{ songURL = _arg1; writeArtist(_arg2); writeSong(_arg3); stopAudio(); sound = new Sound(); sound.load(new URLRequest(songURL)); sound.addEventListener(IOErrorEvent.IO_ERROR, soundLoadingError); if (autoplay){ playAudio(); }; } public function start():void{ mcPlayPauseBt.mcPause.visible = false; mcVolume.mcScrub.visible = false; mcVolume.mcArea.visible = false; mcVolume.mcPercent.visible = false; mcVolume.mcArtist.txt.embedFonts = true; mcVolume.mcArtist.txt.autoSize = TextFieldAutoSize.LEFT; mcVolume.mcArtist.txt.mouseEnabled = false; var _local1:TextFormat = new TextFormat(); _local1.size = artistFontSize; mcVolume.mcArtist.txt.defaultTextFormat = _local1; mcVolume.mcArtist.txt.text = artistName; mcVolume.mcArtist.alpha = 0; mcVolume.mcSong.txt.embedFonts = true; mcVolume.mcSong.txt.autoSize = TextFieldAutoSize.LEFT; mcVolume.mcSong.txt.mouseEnabled = false; _local1 = new TextFormat(); _local1.size = songFontSize; mcVolume.mcSong.txt.defaultTextFormat = _local1; mcVolume.mcSong.txt.text = songName; mcVolume.mcSong.alpha = 0; config(); resize(componentWidth, componentHeight); show(); setVolume = volumeInitLevel; if (songURL != ""){ loadNewSound(songURL, artistName, songName); }; } private function soundMetadata(_arg1:Event=null):void{ } private function stopDragging():void{ mcVolume.mcScrub.stopDrag(); mcVolume.mcScrub.removeEventListener(Event.ENTER_FRAME, adjustVolume); mcVolume.mcPercent.visible = false; } private function soundComplete(_arg1:Event=null):void{ if (currPressedObject){ dispatchEvent(new Event(MouseEvent.MOUSE_UP)); releaseFunction(currPressedObject); }; stopAudio(); } public function setColors():void{ mcBack.mcStroke.setColor(strokeColor); mcBack.mcFill.setColor(fillColor); mcPlayPauseBt.mcBack.setColor(playPauseBtBackColor); mcPlayPauseBt.mcPlay.mcStroke.setColor(playPauseBtSignStrokeColor); mcPlayPauseBt.mcPlay.mcFill.setColor(playPauseBtSignFillColor); mcPlayPauseBt.mcPause.mcStroke.setColor(playPauseBtSignStrokeColor); mcPlayPauseBt.mcPause.mcFill.setColor(playPauseBtSignFillColor); mcVolume.mcScrub.mcBack.mcStroke.setColor(volumeScrubStrokeColor); mcVolume.mcScrub.mcBack.mcFill.setColor(volumeScrubFillColor); mcVolume.mcScrub.mcSign.setColor(volumeSignColor); mcVolume.mcPercent.setColor(volumePercentColor); mcVolume.mcArtist.setColor(artistColor); mcVolume.mcSong.setColor(songColor); mcVisualizer.mcBack.setColor(visualBackColor); mcVisualizer.mcVisualWaves.setColor(visualWavesColor); } private function adjustVolume(_arg1:Event=null):void{ var _local2:Number = getVolume; setSoundVolume = _local2; var _local3:Number = Math.ceil((_local2 * 100)); mcVolume.mcPercent.txt.text = (String(_local3) + "%"); if (mcVolume.mouseX < (mcVolume.mcArea.x + (mcVolume.mcArea.width / 2))){ mcVolume.mcPercent.x = ((mcVolume.mcArea.width - volumePercentMarginX) - mcVolume.mcPercent.width); } else { mcVolume.mcPercent.x = volumePercentMarginX; }; mcVisualizer.mcMask.mc1.width = mcVolume.mcScrub.x; mcVisualizer.mcMask.mc2.x = mcVolume.mcScrub.x; mcVisualizer.mcMask.mc2.width = (((startValue + endValue) + mcVolume.mcScrub.width) - mcVolume.mcScrub.x); } public function pressHandler(_arg1:MouseEvent):void{ var _local2:MovieClip = (_arg1.currentTarget as MovieClip); currPressedObject = _local2; switch (_local2){ case mcVolume.mcScrub: case mcVolume.mcArea: currPressedObject = mcVolume.mcScrub; startDragging(); break; }; currPressedObject.pressed = true; stage.addEventListener(MouseEvent.MOUSE_UP, releaseOutsideHandler); stage.addEventListener(Event.MOUSE_LEAVE, releaseOutsideHandler); } public function pauseAudio():void{ togglePlayPause(false); } public function writeSong(_arg1:String="", _arg2:Boolean=false):void{ mcVolume.mcSong.txt.text = (songName = _arg1); mcVolume.mcSong.x = Math.round(((mcVolume.mcArea.width - mcVolume.mcSong.width) / 2)); if (_arg2){ mcVolume.mcSong.x = Math.round(((mcVolume.mcArea.height - mcVolume.mcSong.height) / 2)); }; } public function set setSoundVolume(_arg1:Number):void{ var _local2:SoundTransform = new SoundTransform(_arg1); if (sc != null){ sc.soundTransform = _local2; }; } public function resize(_arg1:Number=NaN, _arg2:Number=NaN):void{ componentWidth = (isNaN(_arg1)) ? mcBack.width : _arg1; componentHeight = (isNaN(_arg1)) ? mcBack.height : _arg2; mcBack.mcStroke.width = componentWidth; mcBack.mcStroke.height = componentHeight; mcBack.mcFill.width = (mcBack.mcStroke.width - (2 * mcBack.mcFill.x)); mcBack.mcFill.height = (mcBack.mcStroke.height - (2 * mcBack.mcFill.y)); mcPlayPauseBt.x = (mcPlayPauseBt.y = margin); mcPlayPauseBt.mcBack.width = (mcPlayPauseBt.mcBack.height = (mcBack.height - (2 * margin))); mcPlayPauseBt.mcPlay.width = Math.round((playButtonWidthRatio * mcPlayPauseBt.mcBack.width)); mcPlayPauseBt.mcPlay.height = Math.round((playButtonHeightRatio * mcPlayPauseBt.mcBack.height)); mcPlayPauseBt.mcPlay.centerOnClip(mcPlayPauseBt.mcBack); mcPlayPauseBt.mcPlay.x = (mcPlayPauseBt.mcPlay.x + 2); mcPlayPauseBt.mcPause.width = Math.round((playButtonWidthRatio * mcPlayPauseBt.mcBack.width)); mcPlayPauseBt.mcPause.height = Math.round((playButtonHeightRatio * mcPlayPauseBt.mcBack.height)); mcPlayPauseBt.mcPause.centerOnClip(mcPlayPauseBt.mcBack); mcVolume.x = ((mcPlayPauseBt.x + mcPlayPauseBt.mcBack.width) + margin); mcVolume.y = margin; mcVolume.mcArea.width = ((mcBack.width - mcPlayPauseBt.mcBack.width) - (3 * margin)); mcVolume.mcArea.height = mcPlayPauseBt.mcBack.width; mcVolume.mcScrub.mcBack.mcStroke.height = mcVolume.mcArea.height; mcVolume.mcScrub.mcBack.mcFill.height = (mcVolume.mcScrub.mcBack.mcStroke.height - (2 * mcVolume.mcScrub.mcBack.mcFill.y)); mcVolume.mcScrub.mcSign.centerOn(NaN, mcVolume.mcScrub.mcBack.height); mcVolume.mcSong.x = Math.round(((mcVolume.mcArea.width - mcVolume.mcSong.width) / 2)); mcVolume.mcSong.y = Math.round((((mcVolume.mcArea.height - mcVolume.mcSong.height) / 2) + (mcVolume.mcSong.height / 2))); mcVolume.mcArtist.x = Math.round(((mcVolume.mcArea.width - mcVolume.mcArtist.width) / 2)); mcVolume.mcArtist.y = (mcVolume.mcSong.y - mcVolume.mcArtist.height); positionPercent(); mcVolumeMask.x = mcVolume.x; mcVolumeMask.y = mcVolume.y; mcVolumeMask.mcShape.width = mcVolume.mcArea.width; mcVolumeMask.mcShape.height = mcVolume.mcArea.height; mcMask.x = mcVolume.x; mcMask.y = mcVolume.y; mcMask.mcShape.width = mcVolume.mcArea.width; mcMask.mcShape.height = mcVolume.mcArea.height; mcVisualizer.x = mcVolume.x; mcVisualizer.y = margin; mcVisualizer.mcVisualWaves.width = mcVolume.mcArea.width; mcVisualizer.mcVisualWaves.height = mcVolume.mcArea.height; mcVisualizer.mcBack.width = mcVolume.mcArea.width; mcVisualizer.mcBack.height = mcVolume.mcArea.height; mcVisualizer.mcMask.height = mcVolume.mcArea.height; mcShadow.x = mcVolume.x; mcShadow.y = margin; mcShadow.width = mcVolume.mcArea.width; mcShadow.height = mcVolume.mcArea.height; startValue = (mcVolume.mcArea.x + (mcVolume.mcScrub.width / 2)); endValue = (mcVolume.mcArea.width - (mcVolume.mcScrub.width / 2)); } public function releaseOutsideHandler(_arg1:Event):void{ var event = _arg1; stage.removeEventListener(MouseEvent.MOUSE_UP, releaseOutsideHandler); stage.removeEventListener(Event.MOUSE_LEAVE, releaseOutsideHandler); switch (currPressedObject){ case mcPlayPauseBt: mcPlayPauseBt.pressed = false; overToggle(mcPlayPauseBt, false); break; case mcVolume.mcScrub: case mcVolume.mcArea: releaseFunction(mcVolume.mcScrub); setTimeout(function ():void{ overToggle(mcVolume.mcScrub, false); }, 100); break; }; currPressedObject = null; } private function startDragging():void{ mcVolume.mcScrub.x = mcVolume.mouseX; if (mcVolume.mouseX < startValue){ mcVolume.mcScrub.x = startValue; }; if (mcVolume.mouseX > endValue){ mcVolume.mcScrub.x = endValue; }; mcVolume.mcScrub.startDrag(true, new Rectangle(startValue, mcVolume.mcScrub.y, (endValue - startValue), 0)); mcVolume.mcScrub.addEventListener(Event.ENTER_FRAME, adjustVolume); mcVolume.mcPercent.visible = true; } public function visualizerToggle(_arg1:Boolean=true):void{ if (_arg1){ mcVisualizer.mcVisual.addEventListener(Event.ENTER_FRAME, createVisualizerEffect); } else { mcVisualizer.removeEventListener(Event.ENTER_FRAME, createVisualizerEffect); }; mcVisualizer.mcVisualWaves.visible = _arg1; } private function soundLoadingError(_arg1:Event=null):void{ stopAudio(); writeArtist("The sound could not be loaded!", true); mcVolume.mcSong.showObject(false); } public function overHandler(_arg1:MouseEvent):void{ var _local2:MovieClip = (_arg1.currentTarget as MovieClip); overToggle(_local2); } private function positionPercent():void{ switch (volumePercentPositionY){ case "top": mcVolume.mcPercent.y = volumePercentMarginY; break; case "center": mcVolume.mcPercent.centerOn(NaN, mcVolume.mcArea.height); break; case "bottom": mcVolume.mcPercent.y = ((mcVolume.mcArea.height - mcVolume.mcPercent.height) - volumePercentMarginY); break; default: mcVolume.mcPercent.y = volumePercentDefaultPositionY; break; }; } private function stopAudio():void{ pauseAudio(); pos = 0; } private function xmlLoaded(_arg1:XML):void{ if (isNaN(componentWidth)){ componentWidth = Prototypes.readNumberVar(_arg1.@width, stage.stageWidth); }; if (isNaN(componentHeight)){ componentHeight = Prototypes.readNumberVar(_arg1.@height, stage.stageHeight); }; autoplay = Prototypes.readBooleanVar(_arg1.autoplay); margin = Prototypes.readNumberVar(_arg1.margin, margin); strokeColor = Prototypes.readNumberVar(_arg1.strokeColor); fillColor = Prototypes.readNumberVar(_arg1.fillColor); playPauseBtBackColor = Prototypes.readNumberVar(_arg1.playPauseButton.backColor); playPauseBtBackOverColor = Prototypes.readNumberVar(_arg1.playPauseButton.backOverColor); playPauseBtSignStrokeColor = Prototypes.readNumberVar(_arg1.playPauseButton.signStrokeColor); playPauseBtSignFillColor = Prototypes.readNumberVar(_arg1.playPauseButton.signFillColor); volumeInitLevel = (Prototypes.readNumberVar(_arg1.volumeControl.@initLevel, volumeInitLevel) / 100); volumeScrubStrokeColor = Prototypes.readNumberVar(_arg1.volumeControl.backStrokeColor); volumeScrubFillColor = Prototypes.readNumberVar(_arg1.volumeControl.backFillColor); volumeSignColor = Prototypes.readNumberVar(_arg1.volumeControl.signColor); volumeSignOverColor = Prototypes.readNumberVar(_arg1.volumeControl.signOverColor); volumePercentColor = Prototypes.readNumberVar(_arg1.volumeControl.percentText.@color); volumePercentMarginX = Prototypes.readNumberVar(_arg1.volumeControl.percentText.@marginX, volumePercentMarginX); volumePercentPositionY = Prototypes.readStringVar(_arg1.volumeControl.percentText.@positionY); volumePercentDefaultPositionY = Prototypes.readNumberVar(_arg1.volumeControl.percentText.@positionY, volumePercentDefaultPositionY); artistColor = Prototypes.readNumberVar(_arg1.songText.artistColor); artistFontSize = Prototypes.readNumberVar(_arg1.songText.artistFontSize); songColor = Prototypes.readNumberVar(_arg1.songText.songColor); songFontSize = Prototypes.readNumberVar(_arg1.songText.songFontSize); visualBackColor = Prototypes.readNumberVar(_arg1.visualizer.@backColor); visualWavesColor = Prototypes.readNumberVar(_arg1.visualizer.@wavesColor); start(); } public function show(_arg1:Boolean=true, _arg2:Boolean=false):void{ mcLoader.visible = (_arg2) ? _arg1 : !(_arg1); mcPlayPauseBt.visible = _arg1; mcVolume.visible = _arg1; mcVisualizer.visible = _arg1; mcShadow.visible = _arg1; mcBack.visible = _arg1; } public function releaseFunction(_arg1:MovieClip):void{ _arg1.pressed = false; switch (_arg1){ case mcPlayPauseBt: togglePlayPause(mcPlayPauseBt.mcPlay.visible); break; case mcVolume.mcArea: case mcVolume.mcScrub: stopDragging(); break; }; } } }//package com.vuzum.simplemp3player
Section 11
//Prototypes (com.vuzum.utils.Prototypes) package com.vuzum.utils { import flash.text.*; import flash.events.*; import flash.net.*; import flash.display.*; import caurina.transitions.*; import caurina.transitions.properties.*; import flash.system.*; import flash.filters.*; public class Prototypes { private var tracer:TextField; public static var sheet:StyleSheet; public function Prototypes(){ super(); ColorShortcuts.init(); MovieClip.prototype.ttrace = function (... _args):void{ var _local2 = ""; var _local3:Number = 0; while (_local3 < _args.length) { _local2 = (_local2 + (_args[_local3] + " ")); _local3++; }; if ((((tracer == null)) || (!(this.stage.contains(tracer))))){ tracer = TextField(this.stage.addChild(new TextField())); tracer.type = TextFieldType.INPUT; tracer.x = 10; tracer.y = 10; tracer.width = 300; tracer.height = 100; tracer.multiline = true; tracer.wordWrap = true; tracer.border = true; tracer.background = true; tracer.selectable = true; } else { this.stage.setChildIndex(tracer, (this.stage.numChildren - 1)); }; if (tracer.text == ""){ tracer.appendText((_local2 + "\n")); } else { tracer.appendText((_local2 + "\n")); }; }; MovieClip.prototype.fitToRect = function (_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:Boolean=true):void{ var _local5:Number = (_arg1 / this.width); var _local6:Number = (_arg2 / this.height); if (_arg3){ if (_local6 <= _local5){ this.height = (this.height * _local6); this.width = (this.width * _local6); } else { this.height = (this.height * _local5); this.width = (this.width * _local5); }; } else { if (_local6 > _local5){ this.height = (this.height * _local6); this.width = (this.width * _local6); } else { this.height = (this.height * _local5); this.width = (this.width * _local5); }; }; this.smoothing = true; if (_arg4){ this.x = Math.round(((_arg1 - this.width) / 2)); this.y = Math.round(((_arg2 - this.height) / 2)); }; }; MovieClip.prototype.scaleOnProperty = function (_arg1:Number=0, _arg2:Boolean=true):void{ if (_arg2){ this.width = _arg1; this.scaleY = this.scaleX; } else { this.height = _arg1; this.scaleX = this.scaleY; }; }; MovieClip.prototype.centerOn = (TextField.prototype.centerOn = function (_arg1:Number=NaN, _arg2:Number=NaN):void{ if (!isNaN(_arg1)){ this.x = Math.round(((_arg1 - this.width) / 2)); }; if (!isNaN(_arg2)){ this.y = Math.round(((_arg2 - this.height) / 2)); }; }); MovieClip.prototype.centerOnClip = (TextField.prototype.centerOnClip = function (_arg1):void{ this.centerOn(_arg1.width, _arg1.height); this.x = (this.x + _arg1.x); this.y = (this.y + _arg1.y); }); MovieClip.prototype.addEvents = function (_arg1:Object, _arg2:Boolean=true):void{ this.buttonMode = _arg2; if (_arg1.overHandler != null){ this.addEventListener(MouseEvent.MOUSE_OVER, _arg1.overHandler); }; if (_arg1.outHandler != null){ this.addEventListener(MouseEvent.MOUSE_OUT, _arg1.outHandler); }; if (_arg1.pressHandler != null){ this.addEventListener(MouseEvent.MOUSE_DOWN, _arg1.pressHandler); }; if (_arg1.releaseHandler != null){ this.addEventListener(MouseEvent.MOUSE_UP, _arg1.releaseHandler); }; }; MovieClip.prototype.removeEvents = function (_arg1:Object):void{ this.buttonMode = false; if (_arg1.overHandler != null){ this.removeEventListener(MouseEvent.MOUSE_OVER, _arg1.overHandler); }; if (_arg1.outHandler != null){ this.removeEventListener(MouseEvent.MOUSE_OUT, _arg1.outHandler); }; if (_arg1.pressHandler != null){ this.removeEventListener(MouseEvent.MOUSE_DOWN, _arg1.pressHandler); }; if (_arg1.releaseHandler != null){ this.removeEventListener(MouseEvent.MOUSE_UP, _arg1.releaseHandler); }; }; MovieClip.prototype.loadContent = function (_arg1:String, _arg2:Function=null, _arg3=null, _arg4:Boolean=true, _arg5:Boolean=true):void{ var pTarget:MovieClip; var str:*; var contentPath = _arg1; var onCompleteFunction = _arg2; var mcLoader = _arg3; var showFlag = _arg4; var bitmapFlag = _arg5; pTarget = (this as MovieClip); pTarget.x = (pTarget.y = 0); for (str in pTarget) { }; if (((!((contentPath == ""))) && (!((contentPath == null))))){ if (mcLoader != null){ (mcLoader.visible = true); }; (pTarget.loader = new Loader()); (pTarget.progressEventHandler = function (_arg1:ProgressEvent):void{ var _local2:Number = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100)); pTarget.onProgressFunction(_local2); }); if (pTarget.onProgressFunction != null){ pTarget.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, pTarget.progressEventHandler); }; (pTarget.completeEventHandler = function ():void{ if (pTarget){ if (((!((pTarget.loader == null))) && (!((pTarget.loader.content == null))))){ if (pTarget.flashmo_bm != null){ pTarget.removeChild(pTarget.flashmo_bm); }; if (bitmapFlag){ (pTarget.bitmapHolder = Bitmap(pTarget.loader.content)); (pTarget.bitmapHolder.smoothing = true); } else { (pTarget.bitmapHolder = pTarget.loader.content); }; pTarget.addChild(pTarget.bitmapHolder); }; if (mcLoader != null){ (mcLoader.visible = false); }; if (showFlag){ (pTarget.alpha = 0); pTarget.showObject(); }; if (onCompleteFunction != null){ onCompleteFunction(pTarget); }; }; }); pTarget.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, pTarget.completeEventHandler); (pTarget.stopLoading = function ():void{ pTarget.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, pTarget.completeEventHandler); if (pTarget.loader){ try { pTarget.loader.close(); } catch(e) { }; pTarget.loader.unload(); pTarget.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, pTarget.onCompleteFunction); pTarget.loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, pTarget.progressEventHandler); }; }); pTarget.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function ():void{ trace("The content doesn't exist!"); }); pTarget.loader.load(new URLRequest(contentPath), new LoaderContext(true)); }; }; MovieClip.prototype.showObject = function (_arg1:Boolean=true, _arg2:Function=null, _arg3:Number=0.5):void{ var flag = _arg1; var completeFunction = _arg2; var pTime = _arg3; var goToAlpha:Number = (flag) ? 1 : 0; if (flag){ (this.visible = flag); }; Tweener.addTween(this, {alpha:goToAlpha, time:pTime, transition:"easeOutExpo", onComplete:function ():void{ (this.visible = flag); if (completeFunction != null){ completeFunction(); }; }}); }; MovieClip.prototype.duplicateBitmap = function (_arg1:MovieClip):void{ var _local2:Bitmap = new Bitmap(_arg1.bitmapHolder.bitmapData.clone()); (_local2.smoothing = true); this.addChild(_local2); }; MovieClip.prototype.duplicateMovieClip = function (_arg1, _arg2:String):Object{ _arg1 = this.addChild(_arg1); _arg1; (_arg1.name = _arg2); return (_arg1); }; MovieClip.prototype.tweenAlpha = function (_arg1:Number=NaN, _arg2:Number=0.5, _arg3:String="easeOutExpo"):void{ if (!isNaN(_arg1)){ Tweener.addTween(this, {alpha:_arg1, time:_arg2, transition:"easeOutExpo"}); }; }; MovieClip.prototype.setColor = function (_arg1:Number=NaN):void{ if (!isNaN(_arg1)){ Tweener.addTween(this, {_color:_arg1, time:0, transition:"easeOutExpo"}); }; }; MovieClip.prototype.removeColor = function ():void{ Tweener.addTween(this, {_color:null, time:0, transition:"easeOutExpo"}); }; MovieClip.prototype.setBrightness = function (_arg1:Number):void{ var _local2:Array = [1, 0, 0, 0, _arg1, 0, 1, 0, 0, _arg1, 0, 0, 1, 0, _arg1, 0, 0, 0, 1, 0]; var _local3:ColorMatrixFilter = new ColorMatrixFilter(_local2); (this.filters = [_local3]); }; MovieClip.prototype.setToGrayscale = function ():void{ (this.cacheAsBitmap = true); var _local1:Array = new Array(); _local1 = _local1.concat([0.308600038290024, 0.609399974346161, 0.0820000022649765, 0, 0]); _local1; _local1 = _local1.concat([0.308600008487701, 0.609399974346161, 0.0820000022649765, 0, 0]); _local1; _local1 = _local1.concat([0.308600008487701, 0.609399974346161, 0.0820000246167183, 0, 0]); _local1; _local1 = _local1.concat([0, 0, 0, 1, 0]); _local1; var _local2:BitmapFilter = new ColorMatrixFilter(_local1); (this.filters = new Array(_local2)); }; MovieClip.prototype.removeGrayscale = function ():void{ (this.filters = new Array()); }; MovieClip.prototype.dotrun = function (_arg1:String, _arg2:String):void{ var mydottext = _arg1; var char = _arg2; (this.dots = 0); (this.dotdir = 0); (this.maxdot = 4); (this.onEnterFrame = function ():void{ (this.dots = (this.dots + this.dotdir)); if (this.dots >= this.maxdot){ (this.dotdir = -1); } else { if (this.dots < 1){ (this.dotdir = 1); }; }; (this.tempdots = ""); var _local1:Number = 0; while (_local1 < this.dots) { (this.tempdots = (this.tempdots + char)); _local1++; }; (this.txt.htmlText = (mydottext + this.tempdots)); }); }; MovieClip.prototype.typewriter = function (_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Function, _arg6:Object):void{ var newtext = _arg1; var oldtext = _arg2; var lspeed = _arg3; var blinkdelay = _arg4; var f = _arg5; var v = _arg6; (this.charToUse = " "); if (oldtext == null){ var _local8 = ""; oldtext = _local8; _local8; }; (this.temptext = oldtext); (this.counter = 0); (this.i = oldtext.length); (this.onEnterFrame = function ():void{ var htmlend:Number; var htmladd:Number; var mylspeed:Number = 0; while (mylspeed < lspeed) { (this.temptext = (this.temptext + newtext.charAt(this.i))); if (newtext.charAt(this.i) == "<"){ htmlend = newtext.indexOf(">", this.i); htmladd = (htmlend - this.i); (this.i = (this.i + htmladd)); (this.temptext = newtext.substr(0, this.i)); } else { this.i++; }; mylspeed = (mylspeed + 1); }; (this.txt.htmlText = (this.temptext + this.charToUse)); if (this.i >= newtext.length){ (this.mybool = 1); (this.onEnterFrame = function ():void{ this.counter++; (this.mybool = !(this.mybool)); if (this.mybool == true){ (this.txt.htmlText = (this.temptext + this.charToUse)); } else { (this.txt.htmlText = this.temptext); }; if (this.counter >= blinkdelay){ (this.txt.htmlText = this.temptext); (this.counter = 0); this.blinkremove(); delete this["onEnterFrame"]; f(v); }; }); }; }); }; MovieClip.prototype.blinkremove = function ():void{ (this.onEnterFrame = function ():void{ (this._alpha = (this._alpha - 10)); (this._visible = !(this._visible)); if (this._alpha <= 0){ this.removeMovieClip(); }; }); }; TextField.prototype.initText = function (_arg1:String="", _arg2:Boolean=false, _arg3:Boolean=true):void{ (this.autoSize = (_arg3) ? TextFieldAutoSize.LEFT : TextFieldAutoSize.NONE); (this.embedFonts = true); (this.mouseEnabled = _arg2); (this.htmlText = _arg1); }; TextField.prototype.initCSSText = function (_arg1:String="", _arg2:Boolean=true):void{ (this.autoSize = TextFieldAutoSize.LEFT); (this.mouseEnabled = _arg2); if (sheet){ (this.styleSheet = sheet); }; (this.htmlText = _arg1); }; TextField.prototype.setColor = function (_arg1:Number):void{ var _local2:TextFormat = new TextFormat(); (_local2.color = _arg1); this.setTextFormat(_local2); }; TextField.prototype.setSize = function (_arg1:Number):void{ var _local2:TextFormat = new TextFormat(); (_local2.size = _arg1); this.setTextFormat(_local2); }; TextField.prototype.isValid = function (_arg1, _arg2:String=""):Boolean{ var _local3:TextField = (this as TextField); if ((((_local3.text.toString() == "")) || ((_local3.text.toString() == null)))){ (_arg1.stage.focus = this); (_arg1.mcError.txt.text = _arg1.emptyFieldMessage); return (false); }; if ((((_arg2 == "number")) && (isNaN(Number(_local3.text))))){ (_arg1.stage.focus = _local3); (_arg1.mcError.txt.text = _arg1.NaNFieldMessage); return (false); }; if ((((_arg2 == "email")) && (!(_local3.text.toString()["isEmail"]())))){ (_arg1.stage.focus = _local3); (_arg1.mcError.txt.text = _arg1.invalidMailFieldMessage); return (false); }; (_arg1.mcError.txt.text = ""); return (true); }; String.prototype.trim = function ():String{ var _local1:String = String(this); while (true) { if ((((((_local1.charAt((_local1.length - 1)) == " ")) || ((_local1.charAt((_local1.length - 1)) == "\n")))) || ((_local1.charAt((_local1.length - 1)) == "\r")))){ _local1 = _local1.substr(0, (_local1.length - 1)); _local1; } else { break; }; }; var _local2:Number = 0; while (true) { if ((((((_local1.charAt(_local2) == " ")) || ((_local1.charAt(_local2) == "\n")))) || ((_local1.charAt(_local2) == "\r")))){ _local1 = _local1.substr((_local2 + 1), (_local1.length - 1)); _local1; } else { break; }; var _temp1 = _local2; _local2 = (_local2 + 1); _temp1; }; return (_local1); }; String.prototype.replaceSubString = function (_arg1:String, _arg2:String, _arg3:Boolean):String{ var _local4:Array = this.split(_arg1); var _local5:String = _local4.join(_arg2); if (!_arg3){ _local4 = _local5.split(_arg1.toLowerCase()); _local4; _local5 = _local4.join(_arg2); _local5; _local4 = _local5.split(_arg1.toUpperCase()); _local4; _local5 = _local4.join(_arg2); _local5; }; return (_local5); }; String.prototype.isEmail = function ():Boolean{ if (this.length < 6){ return (false); }; var _local1 = "*|,\":<>[]{}`';()&$#%+"; var _local2:Number = this.length; var _local3:Number = 0; while (_local3 < _local2) { if (_local1.indexOf(this.charAt(_local3)) != -1){ return (false); }; _local3++; }; var _local4:Number = this.lastIndexOf("@"); if ((((_local4 < 1)) || ((_local4 == (_local2 - 1))))){ return (false); }; if (this.indexOf("@") != _local4){ return (false); }; var _local5:Number = this.lastIndexOf("."); if ((((((_local5 < 4)) || ((_local5 == (_local2 - 1))))) || ((_local5 >= (_local2 - 2))))){ return (false); }; if (1 >= (_local5 - _local4)){ return (false); }; _local3 = 0; while (_local3 < _local2) { if ((((((this.charAt(_local3) == ".")) || ((this.charAt(_local3) == "@")))) && ((this.charAt(_local3) == this.charAt((_local3 - 1)))))){ return (false); }; _local3++; }; return (true); }; Date.prototype.toSlashFormat = function ():String{ return ((((((this.getMonth() + 1) + "/") + this.getDate()) + "/") + this.getFullYear())); }; Date.prototype.time12Format = function ():String{ return (getUSClockTime(this.getHours(), this.getMinutes())); }; } public static function randomize(_arg1:Array):Array{ var _local3:Number; var _local4:*; var _local5:*; var _local2:Number = _arg1.length; if (_local2 == 0){ return (_arg1); }; while (--_local2) { _local3 = Math.floor((Math.random() * (_local2 + 1))); _local4 = _arg1[_local2]; _local5 = _arg1[_local3]; _arg1[_local2] = _local5; _arg1[_local3] = _local4; }; return (_arg1); } public static function pull(_arg1:Array, _arg2):Array{ if (_arg1.length < 1){ return (_arg1); }; var _local3:Array = new Array(); var _local4:Number = 0; while (_local4 < _arg1.length) { if (_arg1[_local4] != _arg2){ _local3.push(_arg1[_local4]); }; _local4++; }; _arg1 = _local3; return (_local3); } public static function getDaysBetweenDates(_arg1:Date, _arg2:Date):int{ var _local3:Number = (((1000 * 60) * 60) * 24); var _local4:Number = _arg1.getTime(); var _local5:Number = _arg2.getTime(); var _local6:Number = Math.abs((_local4 - _local5)); return (Math.round((_local6 / _local3))); } public static function randomBetween(_arg1:Number, _arg2:Number):Number{ var _local3:Number = Math.round(((Math.random() * (_arg2 - _arg1)) + _arg1)); return (_local3); } public static function loadXML(_arg1:String=null, _arg2:Function=null, _arg3=null, _arg4:Function=null, _arg5:Function=null):void{ var xmlLoader:URLLoader; var xmlPath = _arg1; var completeFunction = _arg2; var mcLoader = _arg3; var progressFunction = _arg4; var errorFunction = _arg5; if (mcLoader != null){ mcLoader.visible = true; }; if (((!((xmlPath == ""))) && (!((xmlPath == null))))){ xmlLoader = new URLLoader(new URLRequest(xmlPath)); xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, function ():void{ trace("The file does not exist!"); if (errorFunction != null){ errorFunction(); }; }); xmlLoader.addEventListener(ProgressEvent.PROGRESS, function (_arg1:ProgressEvent):void{ if (progressFunction != null){ progressFunction(_arg1.bytesLoaded, _arg1.bytesTotal); }; }); xmlLoader.addEventListener(Event.COMPLETE, function (_arg1:Event):void{ var _local2:XML = new XML(_arg1.target.data); _local2.ignoreWhitespace = true; if (mcLoader != null){ mcLoader.visible = false; }; if (completeFunction != null){ completeFunction(_local2); }; }); } else { trace("The file does not exist!"); if (errorFunction != null){ errorFunction(); }; }; } public static function randoMix(_arg1:Number=10):Array{ var _local2:Array = new Array(); var _local3:Number = 0; while (_local3 < _arg1) { _local2[_local3] = _local3; _local3++; }; _local2 = randomize(_local2); return (_local2); } public static function makeGrid():void{ } public static function sendAndload(_arg1:String, _arg2:Array=null, _arg3:Function=null, _arg4:Function=null, _arg5:Function=null, _arg6:Boolean=true):void{ var i:Number; var url = _arg1; var varsArray = _arg2; var completeHandler = _arg3; var ioErrorHandler = _arg4; var progressHandler = _arg5; var flag = _arg6; var scriptRequest:URLRequest = new URLRequest(url); var scriptLoader:URLLoader = new URLLoader(); var scriptVars:URLVariables = new URLVariables(); scriptLoader.addEventListener(Event.COMPLETE, function (_arg1:Event):void{ if (completeHandler != null){ completeHandler(_arg1); }; }); scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ if (ioErrorHandler != null){ ioErrorHandler(_arg1); }; }); scriptLoader.addEventListener(ProgressEvent.PROGRESS, function (_arg1:ProgressEvent):void{ if (progressHandler != null){ progressHandler(_arg1); }; }); if (varsArray){ i = 0; while (i < varsArray.length) { scriptVars[varsArray[i]] = varsArray[(i + 1)]; i = (i + 2); }; }; if (flag){ scriptLoader.dataFormat = URLLoaderDataFormat.VARIABLES; } else { scriptLoader.dataFormat = URLLoaderDataFormat.TEXT; }; scriptRequest.method = URLRequestMethod.POST; scriptRequest.data = scriptVars; scriptLoader.load(scriptRequest); } public static function traceArray(_arg1:Array):String{ var _local2 = ""; var _local3:Number = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + (_arg1[_local3].name + " ")); _local3++; }; trace("ARRAY:", _local2); return (_local2); } public static function readBooleanVar(_arg1, _arg2:Boolean=false):Boolean{ if (_arg1 == "true"){ return (true); }; return (_arg2); } public static function hourTo12(_arg1:Number):Object{ var _local2:Object = new Object(); _local2.me = ((_arg1 >= 12)) ? "PM" : "AM"; _local2.h = ((_arg1 >= 13)) ? (_arg1 - 12) : ((_arg1 == 0)) ? 12 : _arg1; return (_local2); } public static function getUSClockTime(_arg1:uint, _arg2:uint):String{ var _local3 = "PM"; var _local4:String = doubleDigitFormat(_arg2); if (_arg1 > 12){ _arg1 = (_arg1 - 12); } else { if (_arg1 == 0){ _local3 = "AM"; _arg1 = 12; } else { if (_arg1 < 12){ _local3 = "AM"; }; }; }; return (((((doubleDigitFormat(_arg1) + ":") + _local4) + " ") + _local3)); } public static function readNumberVar(_arg1, _arg2:Number=NaN):Number{ if (((((((!((_arg1 == undefined))) && (!((_arg1 == ""))))) && (!((_arg1 == null))))) && (!(isNaN(_arg1))))){ return (Number(_arg1)); }; return (_arg2); } public static function isExpired(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Date = new Date(); var _local5:Date = new Date(_arg3, (_arg2 - 1), _arg1); if (_local4 >= _local5){ return (true); }; return (false); } public static function removeDuplicates(_arg1:Array):Array{ var _local2:Array = new Array(); var _local3:Number = 0; while (_local3 < _arg1.length) { if (_local2.indexOf(_arg1[_local3]) < 0){ _local2.push(_arg1[_local3]); }; _local3++; }; return (_local2); } public static function sendAndloadWithHeader(_arg1:String, _arg2:Array=null, _arg3:Function=null, _arg4:URLRequestHeader=null, _arg5:Function=null, _arg6:Function=null):void{ var i:Number; var url = _arg1; var varsArray = _arg2; var completeHandler = _arg3; var pHeader = _arg4; var ioErrorHandler = _arg5; var progressHandler = _arg6; var scriptRequest:URLRequest = new URLRequest(url); var scriptLoader:URLLoader = new URLLoader(); var scriptVars:URLVariables = new URLVariables(); scriptLoader.addEventListener(Event.COMPLETE, function ():void{ if (completeHandler != null){ completeHandler(); }; }); scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, function ():void{ if (ioErrorHandler != null){ ioErrorHandler(); }; }); scriptLoader.addEventListener(ProgressEvent.PROGRESS, function ():void{ if (progressHandler != null){ progressHandler(); }; }); if (varsArray){ i = 0; while (i < varsArray.length) { scriptVars[varsArray[i]] = varsArray[(i + 1)]; i = (i + 2); }; }; scriptLoader.dataFormat = URLLoaderDataFormat.VARIABLES; scriptRequest.method = URLRequestMethod.POST; scriptRequest.data = scriptVars; scriptRequest.requestHeaders.push(pHeader); scriptLoader.load(scriptRequest); } public static function isStolen():Boolean{ var _local1:String = new LocalConnection().domain; var _local2:Array = new Array(); _local2.push("flabell"); _local2.push("vuzum"); _local2.push("localhost"); _local2.push("127.0.0.1"); var _local3:Number = 0; while (_local3 < _local2.length) { if (_local1.toLowerCase().indexOf(_local2[_local3].toString().toLowerCase()) > -1){ return (false); }; _local3++; }; return (true); } public static function doubleDigitFormat(_arg1:uint):String{ if (_arg1 < 10){ return (("0" + _arg1)); }; return (String(_arg1)); } public static function setStyle(_arg1:StyleSheet=null):void{ if (sheet == null){ sheet = _arg1; }; } public static function numberOfDays(_arg1:Number=1, _arg2:Number=NaN):Number{ var _local4:Number; var _local3:Number = 0; switch (_arg1){ case 1: case 3: case 5: case 7: case 8: case 10: case 12: _local3 = 31; break; case 4: case 6: case 9: case 11: _local3 = 30; break; case 2: _local4 = (isNaN(_arg2)) ? new Date().getFullYear() : _arg2; _local3 = ((_local4 % 4)) ? 28 : 29; break; }; return (_local3); } public static function readStringVar(_arg1, _arg2:String=""):String{ if (((!((_arg1 == ""))) && (!((_arg1 == null))))){ return (_arg1); }; return (_arg2); } public static function insert(_arg1:Array, _arg2:uint, _arg3):Array{ if (!(_arg2 >= 0)){ return (_arg1); }; var _local4:Array = _arg1.slice(); var _local5:Array = _local4.splice(_arg2); _local4[_arg2] = _arg3; _local4 = _local4.concat(_local5); return (_local4); } public static function readPathTo(_arg1, _arg2:String=null):String{ if (_arg1 != null){ return (_arg1); }; return (_arg2); } public static function readAssetPath(_arg1:String="", _arg2:String=""):String{ return (((_arg1)=="") ? _arg1 : (((_arg1.indexOf("://") == -1)) ? _arg2 : "" + _arg1)); } } }//package com.vuzum.utils
Section 12
//MyriadPro (MyriadPro) package { import flash.text.*; public dynamic class MyriadPro extends Font { } }//package
Section 13
//MyriadProBold (MyriadProBold) package { import flash.text.*; public dynamic class MyriadProBold extends Font { } }//package
Section 14
//Sample (Sample) package { import flash.display.*; import com.vuzum.utils.*; import com.vuzum.simplemp3player.*; public class Sample extends MovieClip { private var songName:String;// = "Break Ya Neck" private var contentXmlPath:String;// = "xml/content.xml" private var componentHeight:Number; private var componentWidth:Number; private var pathToFiles:String;// = "player/" private var artistName:String;// = "Busta Rhymes" private var songURL:String;// = "songs/song.mp3" private var xmlPath:String;// = "xml/settings.xml" public var mcPlayer:SimpleMp3Player; public function Sample(){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.showDefaultContextMenu = false; init(); } public function init():void{ componentWidth = Prototypes.readNumberVar(stage.loaderInfo.parameters.componentWidth); componentHeight = Prototypes.readNumberVar(stage.loaderInfo.parameters.componentHeight); pathToFiles = Prototypes.readPathTo(stage.loaderInfo.parameters.pathToFiles, pathToFiles); xmlPath = Prototypes.readStringVar(stage.loaderInfo.parameters.xmlPath, xmlPath); contentXmlPath = Prototypes.readStringVar(stage.loaderInfo.parameters.contentXmlPath, contentXmlPath); songURL = Prototypes.readStringVar(stage.loaderInfo.parameters.songURL, songURL); artistName = Prototypes.readStringVar(stage.loaderInfo.parameters.artistName, artistName); songName = Prototypes.readStringVar(stage.loaderInfo.parameters.songName, songName); mcPlayer.init(componentWidth, componentHeight, pathToFiles, xmlPath, songURL, artistName, songName); } } }//package

Library Items

Symbol 1 Font {MyriadPro}
Symbol 2 Font {MyriadProBold}Used by:14 16
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:5
Symbol 5 MovieClipUses:4Used by:39
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:6Used by:12 13 24 35 39
Symbol 8 MovieClipUsed by:12
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:11
Symbol 11 MovieClipUses:10Used by:12
Symbol 12 MovieClipUses:7 8 11Used by:39
Symbol 13 MovieClipUses:7Used by:39
Symbol 14 EditableTextUses:2Used by:15
Symbol 15 MovieClipUses:14Used by:24
Symbol 16 EditableTextUses:2Used by:17
Symbol 17 MovieClipUses:16Used by:24
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClipUses:18Used by:20
Symbol 20 MovieClipUses:19Used by:23
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClipUses:21Used by:23
Symbol 23 MovieClipUses:20 22Used by:24
Symbol 24 MovieClipUses:15 17 7 23Used by:39
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClipUses:25Used by:29
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClipUses:27Used by:29
Symbol 29 MovieClipUses:26 28Used by:35
Symbol 30 GraphicUsed by:31
Symbol 31 MovieClipUses:30Used by:34
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClipUses:32Used by:34
Symbol 34 MovieClipUses:31 33Used by:35
Symbol 35 MovieClipUses:7 29 34Used by:39
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:38
Symbol 38 MovieClipUses:37Used by:39
Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player}Uses:5 7 12 13 24 35 38Used by:Timeline

Instance Names

"mcPlayer"Frame 1Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player}
"mcStroke"Symbol 5 MovieClip Frame 1Symbol 4 MovieClip
"mcFill"Symbol 5 MovieClip Frame 1Symbol 4 MovieClip
"mc2"Symbol 11 MovieClip Frame 1Symbol 10 MovieClip
"mc1"Symbol 11 MovieClip Frame 1Symbol 10 MovieClip
"mcBack"Symbol 12 MovieClip Frame 1Symbol 7 MovieClip
"mcVisualWaves"Symbol 12 MovieClip Frame 1Symbol 7 MovieClip
"mcVisual"Symbol 12 MovieClip Frame 1Symbol 8 MovieClip
"mcMask"Symbol 12 MovieClip Frame 1Symbol 11 MovieClip
"mcShape"Symbol 13 MovieClip Frame 1Symbol 7 MovieClip
"txt"Symbol 15 MovieClip Frame 1Symbol 14 EditableText
"txt"Symbol 17 MovieClip Frame 1Symbol 16 EditableText
"mcStroke"Symbol 20 MovieClip Frame 1Symbol 19 MovieClip
"mcFill"Symbol 20 MovieClip Frame 1Symbol 19 MovieClip
"mcBack"Symbol 23 MovieClip Frame 1Symbol 20 MovieClip
"mcSign"Symbol 23 MovieClip Frame 1Symbol 22 MovieClip
"mcSong"Symbol 24 MovieClip Frame 1Symbol 15 MovieClip
"mcArtist"Symbol 24 MovieClip Frame 1Symbol 17 MovieClip
"mcPercent"Symbol 24 MovieClip Frame 1Symbol 15 MovieClip
"mcArea"Symbol 24 MovieClip Frame 1Symbol 7 MovieClip
"mcScrub"Symbol 24 MovieClip Frame 1Symbol 23 MovieClip
"mcFill"Symbol 29 MovieClip Frame 1Symbol 26 MovieClip
"mcStroke"Symbol 29 MovieClip Frame 1Symbol 28 MovieClip
"mcFill"Symbol 34 MovieClip Frame 1Symbol 31 MovieClip
"mcStroke"Symbol 34 MovieClip Frame 1Symbol 33 MovieClip
"mcBack"Symbol 35 MovieClip Frame 1Symbol 7 MovieClip
"mcPause"Symbol 35 MovieClip Frame 1Symbol 29 MovieClip
"mcPlay"Symbol 35 MovieClip Frame 1Symbol 34 MovieClip
"mcCircle"Symbol 38 MovieClip Frame 1Symbol 37 MovieClip
"mcBack"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 5 MovieClip
"mcShadow"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 7 MovieClip
"mcVisualizer"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 12 MovieClip
"mcMask"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 13 MovieClip
"mcVolume"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 24 MovieClip
"mcVolumeMask"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 13 MovieClip
"mcPlayPauseBt"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 35 MovieClip
"mcLoader"Symbol 39 MovieClip {com.vuzum.simplemp3player.SimpleMp3Player} Frame 1Symbol 38 MovieClip

Special Tags

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




http://swfchan.com/34/169145/info.shtml
Created: 18/10 -2018 05:00:39 Last modified: 18/10 -2018 05:00:39 Server time: 22/12 -2024 04:17:07