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/95337360?noj=FRM95337360-22DC" width="1" height="1"></div>

gemtd-sandbox.swf

This is the info page for
Flash #2526

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


Text
You Lost!

Victory!

ActionScript [AS3]

Section 1
//AuxFunctions (caurina.transitions.AuxFunctions) package caurina.transitions { public class AuxFunctions { public static function getObjectLength(_arg1:Object):uint{ var _local2:uint; var _local3:String; _local2 = 0; for (_local3 in _arg1) { _local2++; }; return (_local2); } public static function isInArray(_arg1:String, _arg2:Array):Boolean{ var _local3:uint; var _local4:uint; _local3 = _arg2.length; _local4 = 0; while (_local4 < _local3) { if (_arg2[_local4] == _arg1){ return (true); }; _local4++; }; return (false); } public static function numberToG(_arg1:Number):Number{ return (((_arg1 & 0xFF00) >> 8)); } public static function numberToB(_arg1:Number):Number{ return ((_arg1 & 0xFF)); } public static function numberToR(_arg1:Number):Number{ return (((_arg1 & 0xFF0000) >> 16)); } } }//package caurina.transitions
Section 2
//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):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:Number=NaN, _arg6:Number=NaN):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; if (!_arg6){ _arg6 = (_arg4 * (0.3 * 1.5)); }; if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2)); }; --_arg1; return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2)); } public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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:Number=NaN):Number{ if (!_arg5){ _arg5 = 1.70158; }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ _arg5 = (_arg5 * 1.525); return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2)); }; _arg1 = (_arg1 - 2); _arg5 = (_arg5 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2)); } public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{ if (!_arg5){ _arg5 = 1.70158; }; _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2)); } public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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:Number=NaN):Number{ if (!_arg5){ _arg5 = 1.70158; }; _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2)); } public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } 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):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:Number=NaN):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):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):Number{ _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2)); } public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2)); } public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5, _arg6)); }; return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5, _arg6)); } public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (!_arg6){ _arg6 = (_arg4 * 0.3); }; if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; --_arg1; return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2)); } public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_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:Number=NaN, _arg6:Number=NaN):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (!_arg6){ _arg6 = (_arg4 * 0.3); }; if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2)); } public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):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):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4)); }; return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4)); } } }//package caurina.transitions
Section 3
//PropertyInfoObj (caurina.transitions.PropertyInfoObj) package caurina.transitions { public class PropertyInfoObj { public var modifierParameters:Array; public var valueComplete:Number; public var modifierFunction:Function; public var hasModifier:Boolean; public var valueStart:Number; public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Function, _arg4:Array){ valueStart = _arg1; valueComplete = _arg2; hasModifier = Boolean(_arg3); modifierFunction = _arg3; modifierParameters = _arg4; } public function toString():String{ var _local1:String; _local1 = "\n[PropertyInfoObj "; _local1 = (_local1 + ("valueStart:" + String(valueStart))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("valueComplete:" + String(valueComplete))); _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; _local1 = new PropertyInfoObj(valueStart, valueComplete, modifierFunction, modifierParameters); return (_local1); } } }//package caurina.transitions
Section 4
//SpecialPropertiesDefault (caurina.transitions.SpecialPropertiesDefault) package caurina.transitions { import flash.filters.*; import flash.media.*; import flash.geom.*; public class SpecialPropertiesDefault { public function SpecialPropertiesDefault(){ trace("SpecialProperties is a static class and should not be instantiated."); } public static function _sound_volume_get(_arg1:Object):Number{ return (_arg1.soundTransform.volume); } public static function _color_splitter(_arg1):Array{ var _local2:Array; _local2 = new Array(); if (_arg1 == null){ _local2.push({name:"_color_ra", value:1}); _local2.push({name:"_color_rb", value:0}); _local2.push({name:"_color_ga", value:1}); _local2.push({name:"_color_gb", value:0}); _local2.push({name:"_color_ba", value:1}); _local2.push({name:"_color_bb", value:0}); } else { _local2.push({name:"_color_ra", value:0}); _local2.push({name:"_color_rb", value:AuxFunctions.numberToR(_arg1)}); _local2.push({name:"_color_ga", value:0}); _local2.push({name:"_color_gb", value:AuxFunctions.numberToG(_arg1)}); _local2.push({name:"_color_ba", value:0}); _local2.push({name:"_color_bb", value:AuxFunctions.numberToB(_arg1)}); }; return (_local2); } public static function frame_get(_arg1:Object):Number{ return (_arg1.currentFrame); } public static function _sound_pan_get(_arg1:Object):Number{ return (_arg1.soundTransform.pan); } public static function _color_property_get(_arg1:Object, _arg2:Array):Number{ return (_arg1.transform.colorTransform[_arg2[0]]); } public static function _sound_volume_set(_arg1:Object, _arg2:Number):void{ var _local3:SoundTransform; _local3 = _arg1.soundTransform; _local3.volume = _arg2; _arg1.soundTransform = _local3; } public static function _autoAlpha_get(_arg1:Object):Number{ return (_arg1.alpha); } public static function _filter_splitter(_arg1:BitmapFilter):Array{ var _local2:Array; _local2 = new Array(); if ((_arg1 is BlurFilter)){ _local2.push({name:"_blur_blurX", value:BlurFilter(_arg1).blurX}); _local2.push({name:"_blur_blurY", value:BlurFilter(_arg1).blurY}); _local2.push({name:"_blur_quality", value:BlurFilter(_arg1).quality}); } else { trace("??"); }; return (_local2); } public static function init():void{ Tweener.registerSpecialProperty("_frame", frame_get, frame_set); Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set); Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set); Tweener.registerSpecialProperty("_color_ra", _color_property_get, _color_property_set, ["redMultiplier"]); Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["redOffset"]); Tweener.registerSpecialProperty("_color_ga", _color_property_get, _color_property_set, ["greenMultiplier"]); Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["greenOffset"]); Tweener.registerSpecialProperty("_color_ba", _color_property_get, _color_property_set, ["blueMultiplier"]); Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["blueOffset"]); Tweener.registerSpecialProperty("_color_aa", _color_property_get, _color_property_set, ["alphaMultiplier"]); Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["alphaOffset"]); Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set); Tweener.registerSpecialPropertySplitter("_color", _color_splitter); Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter); Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter); Tweener.registerSpecialProperty("_blur_blurX", _filter_property_get, _filter_property_set, [BlurFilter, "blurX"]); Tweener.registerSpecialProperty("_blur_blurY", _filter_property_get, _filter_property_set, [BlurFilter, "blurY"]); Tweener.registerSpecialProperty("_blur_quality", _filter_property_get, _filter_property_set, [BlurFilter, "quality"]); Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter); Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get); } public static function _sound_pan_set(_arg1:Object, _arg2:Number):void{ var _local3:SoundTransform; _local3 = _arg1.soundTransform; _local3.pan = _arg2; _arg1.soundTransform = _local3; } public static function _color_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{ var _local4:ColorTransform; _local4 = _arg1.transform.colorTransform; _local4[_arg3[0]] = _arg2; _arg1.transform.colorTransform = _local4; } public static function _filter_property_get(_arg1:Object, _arg2:Array):Number{ var _local3:Array; var _local4:uint; var _local5:Object; var _local6:String; var _local7:Object; _local3 = _arg1.filters; _local5 = _arg2[0]; _local6 = _arg2[1]; _local4 = 0; while (_local4 < _local3.length) { if ((((_local3[_local4] is BlurFilter)) && ((_local5 == BlurFilter)))){ return (_local3[_local4][_local6]); }; _local4++; }; switch (_local5){ case BlurFilter: _local7 = {blurX:0, blurY:0, quality:NaN}; break; }; return (_local7[_local6]); } public static function _bezier_get(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{ var _local5:uint; var _local6:Number; var _local7:Number; var _local8:Number; if (_arg4.length == 1){ return ((_arg1 + (_arg3 * (((2 * (1 - _arg3)) * (_arg4[0] - _arg1)) + (_arg3 * (_arg2 - _arg1)))))); }; _local5 = Math.floor((_arg3 * _arg4.length)); _local6 = ((_arg3 - (_local5 * (1 / _arg4.length))) * _arg4.length); if (_local5 == 0){ _local7 = _arg1; _local8 = ((_arg4[0] + _arg4[1]) / 2); } else { if (_local5 == (_arg4.length - 1)){ _local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2); _local8 = _arg2; } else { _local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2); _local8 = ((_arg4[_local5] + _arg4[(_local5 + 1)]) / 2); }; }; return ((_local7 + (_local6 * (((2 * (1 - _local6)) * (_arg4[_local5] - _local7)) + (_local6 * (_local8 - _local7)))))); } public static function frame_set(_arg1:Object, _arg2:Number):void{ _arg1.gotoAndStop(Math.round(_arg2)); } public static function _filter_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{ var _local4:Array; var _local5:uint; var _local6:Object; var _local7:String; var _local8:BitmapFilter; _local4 = _arg1.filters; _local6 = _arg3[0]; _local7 = _arg3[1]; _local5 = 0; while (_local5 < _local4.length) { if ((((_local4[_local5] is BlurFilter)) && ((_local6 == BlurFilter)))){ _local4[_local5][_local7] = _arg2; _arg1.filters = _local4; return; }; _local5++; }; if (_local4 == null){ _local4 = new Array(); }; switch (_local6){ case BlurFilter: _local8 = new BlurFilter(0, 0); break; }; _local8[_local7] = _arg2; _local4.push(_local8); _arg1.filters = _local4; } public static function _autoAlpha_set(_arg1:Object, _arg2:Number):void{ _arg1.alpha = _arg2; _arg1.visible = (_arg2 > 0); } public static function _scale_splitter(_arg1:Number):Array{ var _local2:Array; _local2 = new Array(); _local2.push({name:"scaleX", value:_arg1}); _local2.push({name:"scaleY", value:_arg1}); return (_local2); } public static function _colorTransform_splitter(_arg1):Array{ var _local2:Array; _local2 = new Array(); if (_arg1 == null){ _local2.push({name:"_color_ra", value:1}); _local2.push({name:"_color_rb", value:0}); _local2.push({name:"_color_ga", value:1}); _local2.push({name:"_color_gb", value:0}); _local2.push({name:"_color_ba", value:1}); _local2.push({name:"_color_bb", value:0}); } else { if (_arg1.ra != undefined){ _local2.push({name:"_color_ra", value:_arg1.ra}); }; if (_arg1.rb != undefined){ _local2.push({name:"_color_rb", value:_arg1.rb}); }; if (_arg1.ga != undefined){ _local2.push({name:"_color_ba", value:_arg1.ba}); }; if (_arg1.gb != undefined){ _local2.push({name:"_color_bb", value:_arg1.bb}); }; if (_arg1.ba != undefined){ _local2.push({name:"_color_ga", value:_arg1.ga}); }; if (_arg1.bb != undefined){ _local2.push({name:"_color_gb", value:_arg1.gb}); }; if (_arg1.aa != undefined){ _local2.push({name:"_color_aa", value:_arg1.aa}); }; if (_arg1.ab != undefined){ _local2.push({name:"_color_ab", value:_arg1.ab}); }; }; return (_local2); } public static function _bezier_modifier(_arg1):Array{ var _local2:Array; var _local3:Array; var _local4:uint; var _local5:String; var _local6:Object; _local2 = []; if ((_arg1 is Array)){ _local3 = _arg1; } else { _local3 = [_arg1]; }; _local6 = {}; _local4 = 0; while (_local4 < _local3.length) { for (_local5 in _local3[_local4]) { if (_local6[_local5] == undefined){ _local6[_local5] = []; }; _local6[_local5].push(_local3[_local4][_local5]); }; _local4++; }; for (_local5 in _local6) { _local2.push({name:_local5, parameters:_local6[_local5]}); }; return (_local2); } } }//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 setValue:Function; public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null){ getValue = _arg1; setValue = _arg2; parameters = _arg3; } public function toString():String{ var _local1:String; _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 + "]"); 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:String; _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 splitValues:Function; public function SpecialPropertySplitter(_arg1:Function){ splitValues = _arg1; } public function toString():String{ var _local1:String; _local1 = ""; _local1 = (_local1 + "[SpecialPropertySplitter "); _local1 = (_local1 + ("splitValues:" + String(splitValues))); _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 _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{ var _local4:SpecialPropertyModifier; if (!_inited){ init(); }; _local4 = new SpecialPropertyModifier(_arg2, _arg3); _specialPropertyModifierList[_arg1] = _local4; } public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null):void{ var _local5:SpecialProperty; if (!_inited){ init(); }; _local5 = new SpecialProperty(_arg2, _arg3, _arg4); _specialPropertyList[_arg1] = _local5; } public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Object; var _local8:Number; var _local9:Number; var _local10:Function; var _local11:TweenListObj; var _local12:Number; var _local13:String; if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){ return (false); }; _local4 = new Array(); if ((arguments[0] is Array)){ _local5 = 0; while (_local5 < arguments[0].length) { _local4.push(arguments[0][_local5]); _local5++; }; } else { _local5 = 0; while (_local5 < (arguments.length - 1)) { _local4.push(arguments[_local5]); _local5++; }; }; _local7 = arguments[(arguments.length - 1)]; if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; _local8 = (isNaN(_local7.time)) ? 0 : _local7.time; _local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay; if (typeof(_local7.transition) == "string"){ _local13 = _local7.transition.toLowerCase(); _local10 = _transitionList[_local13]; } else { _local10 = _local7.transition; }; if (!Boolean(_local10)){ _local10 = _transitionList["easeoutexpo"]; }; _local5 = 0; while (_local5 < _local4.length) { _local11 = new TweenListObj(_local4[_local5], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), (_local7.useFrames == true), _local10); _local11.properties = null; _local11.onStart = _local7.onStart; _local11.onUpdate = _local7.onUpdate; _local11.onComplete = _local7.onComplete; _local11.onOverwrite = _local7.onOverwrite; _local11.onStartParams = _local7.onStartParams; _local11.onUpdateParams = _local7.onUpdateParams; _local11.onCompleteParams = _local7.onCompleteParams; _local11.onOverwriteParams = _local7.onOverwriteParams; _local11.isCaller = true; _local11.count = _local7.count; _local11.waitFrames = _local7.waitFrames; _tweenList.push(_local11); if ((((_local8 == 0)) && ((_local9 == 0)))){ _local12 = (_tweenList.length - 1); updateTweenByIndex(_local12); removeTweenByIndex(_local12); }; _local5++; }; return (true); } public static function init(_arg1=null):void{ _inited = true; _transitionList = new Object(); Equations.init(); _specialPropertyList = new Object(); _specialPropertyModifierList = new Object(); _specialPropertySplitterList = new Object(); SpecialPropertiesDefault.init(); } 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 removeTweens(_arg1:Object, ... _args):Boolean{ var _local3:Array; var _local4:uint; _local3 = 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 pauseAllTweens():Boolean{ var _local1:Boolean; var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local1 = false; _local2 = 0; while (_local2 < _tweenList.length) { pauseTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function splitTweens(_arg1:Number, _arg2:Array):uint{ var _local3:TweenListObj; var _local4:TweenListObj; var _local5:uint; var _local6:String; var _local7:Boolean; _local3 = _tweenList[_arg1]; _local4 = _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 resumeTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj; _local2 = _tweenList[_arg1]; if ((((_local2 == null)) || (!(_local2.isPaused)))){ return (false); }; _local2.timeStart = (_local2.timeStart + (_currentTime - _local2.timePaused)); _local2.timeComplete = (_local2.timeComplete + (_currentTime - _local2.timePaused)); _local2.timePaused = undefined; _local2.isPaused = false; return (true); } public static function debug_getList():String{ var _local1:String; var _local2:uint; var _local3:uint; _local1 = ""; _local2 = 0; while (_local2 < _tweenList.length) { _local1 = (_local1 + (("[" + _local2) + "] ::\n")); _local3 = 0; while (_local3 < _tweenList[_local2].properties.length) { _local1 = (_local1 + ((((" " + _tweenList[_local2].properties[_local3].name) + " -> ") + _tweenList[_local2].properties[_local3].valueComplete) + "\n")); _local3++; }; _local2++; }; return (_local1); } public static function getVersion():String{ return ("AS3 1.25.59"); } public static function onEnterFrame(_arg1:Event):void{ var _local2:Boolean; updateTime(); _local2 = false; _local2 = updateTweens(); if (!_local2){ stopEngine(); }; } public static function updateTime():void{ _currentTime = getTimer(); } private static function updateTweenByIndex(_arg1:Number):Boolean{ var tTweening:TweenListObj; var isOver:Boolean; var mustUpdate:Boolean; var nv:Number; var t:Number; var b:Number; var c:Number; var d:Number; var pName:String; var tScope:Object; var tProperty:Object; var pv:Number; var i = _arg1; tTweening = _tweenList[i]; if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){ return (false); }; isOver = false; if (_currentTime >= 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 (!(_currentTime >= nv)); } else { mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates))); if (_currentTime >= tTweening.timeComplete){ isOver = true; mustUpdate = true; }; if (!tTweening.hasStarted){ if (Boolean(tTweening.onStart)){ try { tTweening.onStart.apply(tScope, tTweening.onStartParams); } catch(e:Error) { }; }; for (pName in tTweening.properties) { pv = getPropertyValue(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 = (_currentTime - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, 0, 1, d); nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters); } else { t = (_currentTime - tTweening.timeStart); b = tProperty.valueStart; c = (tProperty.valueComplete - tProperty.valueStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d); }; }; if (tTweening.rounded){ nv = Math.round(nv); }; setPropertyValue(tScope, pName, nv); }; tTweening.updatesSkipped = 0; if (Boolean(tTweening.onUpdate)){ try { tTweening.onUpdate.apply(tScope, tTweening.onUpdateParams); } catch(e:Error) { }; }; } else { tTweening.updatesSkipped++; }; }; if (((isOver) && (Boolean(tTweening.onComplete)))){ try { tTweening.onComplete.apply(tScope, tTweening.onCompleteParams); } catch(e:Error) { }; }; return (!(isOver)); }; return (true); } public static function setTimeScale(_arg1:Number):void{ var _local2: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) { _tweenList[_local2].timeStart = (_currentTime - (((_currentTime - _tweenList[_local2].timeStart) * _timeScale) / _arg1)); _tweenList[_local2].timeComplete = (_currentTime - (((_currentTime - _tweenList[_local2].timeComplete) * _timeScale) / _arg1)); if (_tweenList[_local2].timePaused != undefined){ _tweenList[_local2].timePaused = (_currentTime - (((_currentTime - _tweenList[_local2].timePaused) * _timeScale) / _arg1)); }; _local2++; }; }; _timeScale = _arg1; }; } public static function resumeAllTweens():Boolean{ var _local1:Boolean; var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local1 = false; _local2 = 0; while (_local2 < _tweenList.length) { resumeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } private static function startEngine():void{ _engineExists = true; _tweenList = new Array(); __tweener_controller__ = new MovieClip(); __tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); updateTime(); } public static function removeAllTweens():Boolean{ var _local1:Boolean; var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local1 = false; _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 _local4:Array; var _local5:Number; var _local6:Number; var _local7:String; var _local8:String; var _local9:Object; var _local10:Number; var _local11:Number; var _local12:Array; var _local13:Object; var _local14:Object; var _local15:Function; var _local16:Object; var _local17:TweenListObj; var _local18:Number; var _local19:Array; var _local20:Array; var _local21:String; if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){ return (false); }; _local4 = new Array(); if ((arguments[0] is Array)){ _local5 = 0; while (_local5 < arguments[0].length) { _local4.push(arguments[0][_local5]); _local5++; }; } else { _local5 = 0; while (_local5 < (arguments.length - 1)) { _local4.push(arguments[_local5]); _local5++; }; }; _local9 = arguments[(arguments.length - 1)]; if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; _local10 = (isNaN(_local9.time)) ? 0 : _local9.time; _local11 = (isNaN(_local9.delay)) ? 0 : _local9.delay; _local12 = new Array(); _local13 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true}; _local14 = new Object(); for (_local7 in _local9) { if (!_local13[_local7]){ if (_specialPropertySplitterList[_local7]){ _local19 = _specialPropertySplitterList[_local7].splitValues(_local9[_local7]); _local5 = 0; while (_local5 < _local19.length) { _local12[_local19[_local5].name] = {valueStart:undefined, valueComplete:_local19[_local5].value}; _local5++; }; } else { if (_specialPropertyModifierList[_local7] != undefined){ _local20 = _specialPropertyModifierList[_local7].modifyValues(_local9[_local7]); _local5 = 0; while (_local5 < _local20.length) { _local14[_local20[_local5].name] = {modifierParameters:_local20[_local5].parameters, modifierFunction:_specialPropertyModifierList[_local7].getValue}; _local5++; }; } else { _local12[_local7] = {valueStart:undefined, valueComplete:_local9[_local7]}; }; }; }; }; for (_local7 in _local14) { if (_local12[_local7] != undefined){ _local12[_local7].modifierParameters = _local14[_local7].modifierParameters; _local12[_local7].modifierFunction = _local14[_local7].modifierFunction; }; }; if (typeof(_local9.transition) == "string"){ _local21 = _local9.transition.toLowerCase(); _local15 = _transitionList[_local21]; } else { _local15 = _local9.transition; }; if (!Boolean(_local15)){ _local15 = _transitionList["easeoutexpo"]; }; _local5 = 0; while (_local5 < _local4.length) { _local16 = new Object(); for (_local7 in _local12) { _local16[_local7] = new PropertyInfoObj(_local12[_local7].valueStart, _local12[_local7].valueComplete, _local12[_local7].modifierFunction, _local12[_local7].modifierParameters); }; _local17 = new TweenListObj(_local4[_local5], (_currentTime + ((_local11 * 1000) / _timeScale)), (_currentTime + (((_local11 * 1000) + (_local10 * 1000)) / _timeScale)), (_local9.useFrames == true), _local15); _local17.properties = _local16; _local17.onStart = _local9.onStart; _local17.onUpdate = _local9.onUpdate; _local17.onComplete = _local9.onComplete; _local17.onOverwrite = _local9.onOverwrite; _local17.onStartParams = _local9.onStartParams; _local17.onUpdateParams = _local9.onUpdateParams; _local17.onCompleteParams = _local9.onCompleteParams; _local17.onOverwriteParams = _local9.onOverwriteParams; _local17.rounded = _local9.rounded; _local17.skipUpdates = _local9.skipUpdates; removeTweensByTime(_local17.scope, _local17.properties, _local17.timeStart, _local17.timeComplete); _tweenList.push(_local17); if ((((_local10 == 0)) && ((_local11 == 0)))){ _local18 = (_tweenList.length - 1); updateTweenByIndex(_local18); removeTweenByIndex(_local18); }; _local5++; }; return (true); } public static function registerTransition(_arg1:String, _arg2:Function):void{ if (!_inited){ init(); }; _transitionList[_arg1] = _arg2; } private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{ var _local4:Boolean; var _local5:uint; var _local6:Array; var _local7:uint; var _local8:uint; var _local9:uint; _local4 = false; 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; var _local4:Array; if (!Boolean(_tweenList)){ return ([]); }; _local4 = new Array(); _local2 = 0; while (_local2 < _tweenList.length) { if (_tweenList[_local2].scope == _arg1){ for (_local3 in _tweenList[_local2].properties) { _local4.push(_local3); }; }; _local2++; }; return (_local4); } private static function setPropertyValue(_arg1:Object, _arg2:String, _arg3:Number):void{ if (_specialPropertyList[_arg2] != undefined){ if (Boolean(_specialPropertyList[_arg2].parameters)){ _specialPropertyList[_arg2].setValue(_arg1, _arg3, _specialPropertyList[_arg2].parameters); } else { _specialPropertyList[_arg2].setValue(_arg1, _arg3); }; } else { _arg1[_arg2] = _arg3; }; } private static function getPropertyValue(_arg1:Object, _arg2:String):Number{ if (_specialPropertyList[_arg2] != undefined){ if (Boolean(_specialPropertyList[_arg2].parameters)){ return (_specialPropertyList[_arg2].getValue(_arg1, _specialPropertyList[_arg2].parameters)); }; return (_specialPropertyList[_arg2].getValue(_arg1)); } else { }; return (!NULL!); } public static function isTweening(_arg1:Object):Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local2 = 0; while (_local2 < _tweenList.length) { if (_tweenList[_local2].scope == _arg1){ return (true); }; _local2++; }; return (false); } public static function getTweenCount(_arg1:Object):Number{ var _local2:uint; var _local3:Number; if (!Boolean(_tweenList)){ return (0); }; _local3 = 0; _local2 = 0; while (_local2 < _tweenList.length) { if (_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; __tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); __tweener_controller__ = null; } public static function pauseTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj; _local2 = _tweenList[_arg1]; if ((((_local2 == null)) || (_local2.isPaused))){ return (false); }; _local2.timePaused = _currentTime; _local2.isPaused = true; return (true); } public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{ var removed:Boolean; var removedLocally:Boolean; var i:uint; var tl:uint; var pName:String; var p_scope = _arg1; var p_properties = _arg2; var p_timeStart = _arg3; var p_timeComplete = _arg4; removed = false; tl = _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)){ try { _tweenList[i].onOverwrite.apply(_tweenList[i].scope, _tweenList[i].onOverwriteParams); } catch(e:Error) { }; }; _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):void{ var _local3:SpecialPropertySplitter; if (!_inited){ init(); }; _local3 = new SpecialPropertySplitter(_arg2); _specialPropertySplitterList[_arg1] = _local3; } 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 _local3:Array; var _local4:uint; _local3 = 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 _local3:Array; var _local4:uint; _local3 = 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 onUpdate:Function; public var useFrames:Boolean; public var hasStarted:Boolean; public var onOverwriteParams:Array; public var timeStart:Number; public var count:Number; public var auxProperties:Object; public var timeComplete:Number; public var onStartParams:Array; public var rounded:Boolean; public var updatesSkipped:Number; public var onUpdateParams:Array; public var onComplete:Function; public var properties:Object; public var onStart:Function; public var skipUpdates:Number; public var scope:Object; public var isCaller:Boolean; public var timePaused:Number; public var transition:Function; public var onCompleteParams:Array; public var timesCalled:Number; public var onOverwrite:Function; public var isPaused:Boolean; public var waitFrames:Boolean; public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function){ scope = _arg1; timeStart = _arg2; timeComplete = _arg3; useFrames = _arg4; transition = _arg5; auxProperties = new Object(); properties = new Object(); isPaused = false; timePaused = undefined; isCaller = false; updatesSkipped = 0; timesCalled = 0; skipUpdates = 0; hasStarted = false; } public function clone(_arg1:Boolean):TweenListObj{ var _local2:TweenListObj; var _local3:String; _local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition); _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.onStartParams = onStartParams; _local2.onUpdateParams = onUpdateParams; _local2.onCompleteParams = onCompleteParams; _local2.onOverwriteParams = onOverwriteParams; }; _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 _local1:String; var _local2:uint; _local1 = "\n[TweenListObj "; _local1 = (_local1 + ("scope:" + String(scope))); _local1 = (_local1 + ", properties:"); _local2 = 0; while (_local2 < properties.length) { if (_local2 > 0){ _local1 = (_local1 + ","); }; _local1 = (_local1 + ("[name:" + properties[_local2].name)); _local1 = (_local1 + (",valueStart:" + properties[_local2].valueStart)); _local1 = (_local1 + (",valueComplete:" + properties[_local2].valueComplete)); _local1 = (_local1 + "]"); _local2++; }; _local1 = (_local1 + (", timeStart:" + String(timeStart))); _local1 = (_local1 + (", timeComplete:" + String(timeComplete))); _local1 = (_local1 + (", useFrames:" + String(useFrames))); _local1 = (_local1 + (", transition:" + String(transition))); 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 (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 (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); } } }//package caurina.transitions
Section 10
//MemoryCrypto (com.electrotank.util.MemoryCrypto) package com.electrotank.util { import com.meychi.ascrypt3.*; public class MemoryCrypto { private static var crypto:TEA = null; private static var INCREMENT:int = 0; private static var initialized:Boolean = false; private static var key:String = null; private static var MULTIPLY:int = 2; private static var DECREMENT:int = 1; private static var dataHolder:Object = null; private static var DIVIDE:int = 3; public static function incrementValue(_arg1:String, _arg2:Number):Number{ return (processValue(_arg1, _arg2, INCREMENT)); } public static function getValue(_arg1:String):Number{ var _local2:Number; initIfNeeded(); _local2 = 0; if (!isValueSet(_arg1)){ setValue(_arg1, _local2); } else { _local2 = new Number(crypto.decrypt(dataHolder[_arg1], key)); }; return (_local2); } private static function processValue(_arg1:String, _arg2:Number, _arg3:int):Number{ var _local4:Number; initIfNeeded(); _local4 = getValue(_arg1); switch (_arg3){ case INCREMENT: _local4 = (_local4 + _arg2); break; case DECREMENT: _local4 = (_local4 - _arg2); break; case MULTIPLY: _local4 = (_local4 * _arg2); break; case DIVIDE: _local4 = (_local4 / _arg2); break; }; setValue(_arg1, _local4); return (_local4); } public static function reset():void{ initialized = false; initIfNeeded(); } public static function decrementValue(_arg1:String, _arg2:Number):Number{ return (processValue(_arg1, _arg2, DECREMENT)); } private static function initIfNeeded():void{ var _local1:Number; var _local2:String; var _local3:Number; var _local4:String; if (!initialized){ _local1 = Math.random(); _local2 = new String(_local1); _local2 = _local2.substr(2, (_local2.length - 2)); _local3 = Math.random(); _local4 = new String(_local3); _local4 = _local4.substr(2, (_local4.length - 2)); key = (_local2 + _local4); crypto = new TEA(); dataHolder = new Object(); initialized = true; }; } public static function multiplyValue(_arg1:String, _arg2:Number):Number{ return (processValue(_arg1, _arg2, MULTIPLY)); } public static function setValue(_arg1:String, _arg2:Number):Number{ initIfNeeded(); dataHolder[_arg1] = crypto.encrypt(_arg2.toString(), key); return (_arg2); } public static function divideValue(_arg1:String, _arg2:Number):Number{ if (_arg2 == 0){ throw (new Error("Amount can't be zero when dividing!")); }; return (processValue(_arg1, _arg2, DIVIDE)); } public static function isValueSet(_arg1:String):Boolean{ var _local2:Boolean; initIfNeeded(); _local2 = false; if (dataHolder[_arg1] != null){ _local2 = true; }; return (_local2); } } }//package com.electrotank.util
Section 11
//TEA (com.meychi.ascrypt3.TEA) package com.meychi.ascrypt3 { public class TEA { public function encrypt(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local3 = charsToLongs(strToChars(_arg1)); _local4 = charsToLongs(strToChars(_arg2)); _local5 = _local3.length; if (_local5 == 0){ return (""); }; if (_local5 == 1){ var _temp1 = _local5; _local5 = (_local5 + 1); var _local14 = _temp1; _local3[_local14] = 0; }; _local6 = _local3[(_local5 - 1)]; _local7 = _local3[0]; _local8 = 2654435769; _local11 = Math.floor((6 + (52 / _local5))); _local12 = 0; while (_local11-- > 0) { _local12 = (_local12 + _local8); _local10 = ((_local12 >>> 2) & 3); _local13 = 0; while (_local13 < (_local5 - 1)) { _local7 = _local3[(_local13 + 1)]; _local9 = ((((_local6 >>> 5) ^ (_local7 << 2)) + ((_local7 >>> 3) ^ (_local6 << 4))) ^ ((_local12 ^ _local7) + (_local4[((_local13 & 3) ^ _local10)] ^ _local6))); _local6 = (_local3[_local13] = (_local3[_local13] + _local9)); _local13++; }; _local7 = _local3[0]; _local9 = ((((_local6 >>> 5) ^ (_local7 << 2)) + ((_local7 >>> 3) ^ (_local6 << 4))) ^ ((_local12 ^ _local7) + (_local4[((_local13 & 3) ^ _local10)] ^ _local6))); _local6 = (_local3[(_local5 - 1)] = (_local3[(_local5 - 1)] + _local9)); }; return (charsToHex(longsToChars(_local3))); } public function decrypt(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local3 = charsToLongs(hexToChars(_arg1)); _local4 = charsToLongs(strToChars(_arg2)); _local5 = _local3.length; if (_local5 == 0){ return (""); }; _local6 = _local3[(_local5 - 1)]; _local7 = _local3[0]; _local8 = 2654435769; _local11 = Math.floor((6 + (52 / _local5))); _local12 = (_local11 * _local8); while (_local12 != 0) { _local10 = ((_local12 >>> 2) & 3); _local13 = (_local5 - 1); while (_local13 > 0) { _local6 = _local3[(_local13 - 1)]; _local9 = ((((_local6 >>> 5) ^ (_local7 << 2)) + ((_local7 >>> 3) ^ (_local6 << 4))) ^ ((_local12 ^ _local7) + (_local4[((_local13 & 3) ^ _local10)] ^ _local6))); _local7 = (_local3[_local13] = (_local3[_local13] - _local9)); _local13--; }; _local6 = _local3[(_local5 - 1)]; _local9 = ((((_local6 >>> 5) ^ (_local7 << 2)) + ((_local7 >>> 3) ^ (_local6 << 4))) ^ ((_local12 ^ _local7) + (_local4[((_local13 & 3) ^ _local10)] ^ _local6))); _local7 = (_local3[0] = (_local3[0] - _local9)); _local12 = (_local12 - _local8); }; return (charsToStr(longsToChars(_local3))); } private static function strToChars(_arg1:String):Array{ var _local2:Array; var _local3:Number; _local2 = new Array(); _local3 = 0; while (_local3 < _arg1.length) { _local2.push(_arg1.charCodeAt(_local3)); _local3++; }; return (_local2); } private static function charsToHex(_arg1:Array):String{ var _local2:String; var _local3:Array; var _local4:Number; _local2 = new String(""); _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); _local4 = 0; while (_local4 < _arg1.length) { _local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)])); _local4++; }; return (_local2); } private static function hexToChars(_arg1:String):Array{ var _local2:Array; var _local3:Number; _local2 = new Array(); _local3 = ((_arg1.substr(0, 2))=="0x") ? 2 : 0; while (_local3 < _arg1.length) { _local2.push(parseInt(_arg1.substr(_local3, 2), 16)); _local3 = (_local3 + 2); }; return (_local2); } private static function charsToStr(_arg1:Array):String{ var _local2:String; var _local3:Number; _local2 = new String(""); _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode(_arg1[_local3])); _local3++; }; return (_local2); } private static function longsToChars(_arg1:Array):Array{ var _local2:Array; var _local3:Number; _local2 = new Array(); _local3 = 0; while (_local3 < _arg1.length) { _local2.push((_arg1[_local3] & 0xFF), ((_arg1[_local3] >>> 8) & 0xFF), ((_arg1[_local3] >>> 16) & 0xFF), ((_arg1[_local3] >>> 24) & 0xFF)); _local3++; }; return (_local2); } private static function charsToLongs(_arg1:Array):Array{ var _local2:Array; var _local3:Number; _local2 = new Array(Math.ceil((_arg1.length / 4))); _local3 = 0; while (_local3 < _local2.length) { _local2[_local3] = (((_arg1[(_local3 * 4)] + (_arg1[((_local3 * 4) + 1)] << 8)) + (_arg1[((_local3 * 4) + 2)] << 16)) + (_arg1[((_local3 * 4) + 3)] << 24)); _local3++; }; return (_local2); } } }//package com.meychi.ascrypt3
Section 12
//None (fl.transitions.easing.None) package fl.transitions.easing { public class None { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } } }//package fl.transitions.easing
Section 13
//Tween (fl.transitions.Tween) package fl.transitions { import flash.events.*; import flash.display.*; import flash.utils.*; public class Tween extends EventDispatcher { private var _position:Number;// = NAN public var prevTime:Number;// = NAN public var prevPos:Number;// = NAN public var isPlaying:Boolean;// = false public var begin:Number;// = NAN private var _fps:Number;// = NAN private var _time:Number;// = NAN public var change:Number;// = NAN private var _finish:Number;// = NAN public var looping:Boolean;// = false private var _intervalID:uint;// = 0 public var func:Function; private var _timer:Timer;// = null private var _startTime:Number;// = NAN public var prop:String;// = "" private var _duration:Number;// = NAN public var obj:Object;// = null public var useSeconds:Boolean;// = false protected static var _mc:MovieClip = new MovieClip(); public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){ isPlaying = false; obj = null; prop = ""; func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); }; begin = NaN; change = NaN; useSeconds = false; prevTime = NaN; prevPos = NaN; looping = false; _duration = NaN; _time = NaN; _fps = NaN; _position = NaN; _startTime = NaN; _intervalID = 0; _finish = NaN; _timer = null; super(); if (!arguments.length){ return; }; this.obj = _arg1; this.prop = _arg2; this.begin = _arg4; this.position = _arg4; this.duration = _arg6; this.useSeconds = _arg7; if ((_arg3 is Function)){ this.func = _arg3; }; this.finish = _arg5; this._timer = new Timer(100); this.start(); } public function continueTo(_arg1:Number, _arg2:Number):void{ this.begin = this.position; this.finish = _arg1; if (!isNaN(_arg2)){ this.duration = _arg2; }; this.start(); } public function stop():void{ this.stopEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position)); } private function fixTime():void{ if (this.useSeconds){ this._startTime = (getTimer() - (this._time * 1000)); }; } public function set FPS(_arg1:Number):void{ var _local2:Boolean; _local2 = this.isPlaying; this.stopEnterFrame(); this._fps = _arg1; if (_local2){ this.startEnterFrame(); }; } public function get finish():Number{ return ((this.begin + this.change)); } public function get duration():Number{ return (this._duration); } protected function startEnterFrame():void{ var _local1:Number; if (isNaN(this._fps)){ _mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true); } else { _local1 = (1000 / this._fps); this._timer.delay = _local1; this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true); this._timer.start(); }; this.isPlaying = true; } public function set time(_arg1:Number):void{ this.prevTime = this._time; if (_arg1 > this.duration){ if (this.looping){ this.rewind((_arg1 - this._duration)); this.update(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position)); } else { if (this.useSeconds){ this._time = this._duration; this.update(); }; this.stop(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position)); }; } else { if (_arg1 < 0){ this.rewind(); this.update(); } else { this._time = _arg1; this.update(); }; }; } protected function stopEnterFrame():void{ if (isNaN(this._fps)){ _mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame); } else { this._timer.stop(); }; this.isPlaying = false; } public function getPosition(_arg1:Number=NaN):Number{ if (isNaN(_arg1)){ _arg1 = this._time; }; return (this.func(_arg1, this.begin, this.change, this._duration)); } public function set finish(_arg1:Number):void{ this.change = (_arg1 - this.begin); } public function set duration(_arg1:Number):void{ this._duration = ((_arg1)<=0) ? Infinity : _arg1; } public function setPosition(_arg1:Number):void{ this.prevPos = this._position; if (this.prop.length){ this.obj[this.prop] = (this._position = _arg1); }; this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position)); } public function resume():void{ this.fixTime(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position)); } public function fforward():void{ this.time = this._duration; this.fixTime(); } protected function onEnterFrame(_arg1:Event):void{ this.nextFrame(); } public function get position():Number{ return (this.getPosition(this._time)); } public function yoyo():void{ this.continueTo(this.begin, this.time); } public function nextFrame():void{ if (this.useSeconds){ this.time = ((getTimer() - this._startTime) / 1000); } else { this.time = (this._time + 1); }; } protected function timerHandler(_arg1:TimerEvent):void{ this.nextFrame(); _arg1.updateAfterEvent(); } public function get FPS():Number{ return (this._fps); } public function rewind(_arg1:Number=0):void{ this._time = _arg1; this.fixTime(); this.update(); } public function set position(_arg1:Number):void{ this.setPosition(_arg1); } public function get time():Number{ return (this._time); } private function update():void{ this.setPosition(this.getPosition(this._time)); } public function start():void{ this.rewind(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position)); } public function prevFrame():void{ if (!this.useSeconds){ this.time = (this._time - 1); }; } } }//package fl.transitions
Section 14
//TweenEvent (fl.transitions.TweenEvent) package fl.transitions { import flash.events.*; public class TweenEvent extends Event { public var time:Number;// = NAN public var position:Number;// = NAN public static const MOTION_START:String = "motionStart"; public static const MOTION_STOP:String = "motionStop"; public static const MOTION_LOOP:String = "motionLoop"; public static const MOTION_CHANGE:String = "motionChange"; public static const MOTION_FINISH:String = "motionFinish"; public static const MOTION_RESUME:String = "motionResume"; public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){ time = NaN; position = NaN; super(_arg1, _arg4, _arg5); this.time = _arg2; this.position = _arg3; } override public function clone():Event{ return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable)); } } }//package fl.transitions
Section 15
//armorTableNeg (gemtd.armorTableNeg) package gemtd { var armorTableNeg:Array = new Array(); armorTableNeg[1] = 1.06; armorTableNeg[2] = 1.116; armorTableNeg[3] = 1.169; armorTableNeg[4] = 1.219; armorTableNeg[5] = 1.266; armorTableNeg[6] = 1.31; armorTableNeg[7] = 1.352; armorTableNeg[8] = 1.39; armorTableNeg[9] = 1.427; var _local1:* = (armorTableNeg[10] = 1.461); return (_local1); }//package gemtd
Section 16
//armorTablePos (gemtd.armorTablePos) package gemtd { var armorTablePos:Array = new Array(); armorTablePos[0] = 1; armorTablePos[1] = 0.943; armorTablePos[2] = 0.893; armorTablePos[3] = 0.847; armorTablePos[4] = 0.806; armorTablePos[5] = 0.769; armorTablePos[6] = 0.735; armorTablePos[7] = 0.704; armorTablePos[8] = 0.676; armorTablePos[9] = 0.649; armorTablePos[10] = 0.625; armorTablePos[11] = 0.602; armorTablePos[12] = 0.581; armorTablePos[13] = 0.562; armorTablePos[14] = 0.543; armorTablePos[15] = 0.526; armorTablePos[16] = 0.51; armorTablePos[17] = 0.495; armorTablePos[18] = 0.481; armorTablePos[19] = 0.467; armorTablePos[20] = 0.455; armorTablePos[21] = 0.442; armorTablePos[22] = 0.431; armorTablePos[23] = 0.42; armorTablePos[24] = 0.41; armorTablePos[25] = 0.4; armorTablePos[26] = 0.391; armorTablePos[27] = 0.382; armorTablePos[28] = 0.373; armorTablePos[29] = 0.365; armorTablePos[30] = 0.357; armorTablePos[31] = 0.35; armorTablePos[32] = 0.342; armorTablePos[33] = 0.336; armorTablePos[34] = 0.329; var _local1:* = (armorTablePos[35] = 0.323); return (_local1); }//package gemtd
Section 17
//CreateNPC (gemtd.CreateNPC) package gemtd { import flash.events.*; import caurina.transitions.*; import flash.display.*; import fl.transitions.*; import flash.utils.*; import fl.transitions.easing.*; public class CreateNPC extends MovieClip { public var waypoint:Number; public var hpMaxNPC:Number; public var mov_x:Number; public var mov_y:Number; public var uraniumDamageBurnTimer:Timer; public var path:Array; public var uraniumDamageBurn:Boolean; public var speedModifier:Number; public var nameNPC:String; public var speed:Number; public var defaultSpeed:Number; public var flying:Boolean; private var UI:Object; private var yReached:Boolean; public var stunTimer:Timer; public var hpNPC:Number; public var npcSelected:Boolean; public var iceSlowed:Boolean; public var angle:Number; private var player:CreatePlayer; public var npcLifeCost:Number; public var poisonDamageTimer:Timer; public var armorPenaltyAuraApplied:Boolean; public var speedTracker:Number; public var goldValue:Number; public var startSpeed:Number; public var minSpeed:Number; public var armorType:String; public var armorPenaltyTimer:Timer; public var poisonTimer:Timer; public var armor:Number; public var armorPenaltyValue:Number; public var tweenX:Tween; public var tweenY:Tween; public var starDamageBurnTimer:Timer; public var listNPC:Array; public var iceTimer:Timer; public var poisonSlowed:Boolean; public var mc:MovieClip; private var xReached:Boolean; public var tileSize:Number; public var starDamageBurn:Boolean; public var speedPenaltyAuraApplied:Boolean; public function CreateNPC(_arg1:Object, _arg2:CreatePlayer, _arg3:Array, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number){ UI = _arg1; player = _arg2; mc = new NPC(player.getGameLevel()); waypoint = 0; path = _arg4; iceSlowed = false; poisonSlowed = false; armorPenaltyValue = 0; armorPenaltyAuraApplied = false; speedPenaltyAuraApplied = false; starDamageBurn = false; uraniumDamageBurn = false; npcLifeCost = (1 + Math.floor((player.getGameLevel() / 4))); minSpeed = 0.001; defaultSpeed = 0.3; speed = defaultSpeed; speedTracker = 1; speedModifier = 0; tileSize = _arg8; listNPC = _arg3; xReached = false; yReached = false; goldValue = (Math.floor((player.getGameLevel() / 4)) + 1); determineNPCType(player.getGameLevel()); if (player.getGameLevel() >= 11){ if (player.difficulty == "Extreme"){ extremeLevels(player.getGameLevel()); } else { if (player.difficulty == "Insane"){ insaneLevels(player.getGameLevel()); }; }; }; mc.x = (path[waypoint][1] * tileSize); mc.y = (path[waypoint][0] * tileSize); hpNPC = hpMaxNPC; npcSelected = false; startSpeed = (speed / speedModifier); speed = (speed / speedModifier); Tweener.addTween(mc, {x:(path[(waypoint + 1)][1] * tileSize), y:(path[(waypoint + 1)][0] * tileSize), time:speed, onComplete:TweenHandler, transition:"linear"}); waypoint = (waypoint + 2); this.addChild(mc); } public function removeIceSlow():void{ iceSlowed = false; if (poisonSlowed){ this.mc.npcMC.gotoAndStop(4); } else { this.mc.npcMC.gotoAndStop(1); }; } public function resumeTween():void{ Tweener.resumeTweens(mc); } public function determineAngle():void{ var _local1:*; var _local2:*; _local1 = ((path[waypoint][1] * tileSize) - mc.x); _local2 = ((path[waypoint][0] * tileSize) - mc.y); if (Math.abs(_local1) <= speed){ _local1 = 0; }; if (Math.abs(_local2) <= speed){ _local2 = 0; }; if ((((_local1 == 0)) && ((_local2 > 0)))){ angle = 270; } else { if ((((_local1 == 0)) && ((_local2 < 0)))){ angle = 90; } else { if ((((_local1 > 0)) && ((_local2 == 0)))){ angle = 0; } else { if ((((_local1 < 0)) && ((_local2 == 0)))){ angle = 180; } else { if ((((_local1 > 0)) && ((_local2 > 0)))){ angle = 315; } else { if ((((_local1 > 0)) && ((_local2 < 0)))){ angle = 45; } else { if ((((_local1 < 0)) && ((_local2 < 0)))){ angle = 135; } else { if ((((_local1 < 0)) && ((_local2 > 0)))){ angle = 225; }; }; }; }; }; }; }; }; } public function removeTween():void{ Tweener.removeTweens(mc); } public function getCenterX():Number{ return ((mc.x + (mc.width / 2))); } public function getCenterY():Number{ return ((mc.y + (mc.height / 2))); } public function iceTimerHandler(_arg1:TimerEvent):void{ changeSpeed(0.2); removeIceSlow(); iceTimer.stop(); iceTimer.removeEventListener("timer", iceTimerHandler); iceTimer = null; } public function changeSpeed(_arg1:Number):void{ var _local2:Number; var _local3:*; var _local4:*; speedTracker = (speedTracker + _arg1); _local2 = speedTracker; if ((((_local2 <= 0)) && ((_arg1 == -1)))){ Tweener.pauseTweens(mc); } else { if (_local2 <= 0){ _local2 = 0.01; }; _local3 = (startSpeed / _local2); _local4 = (defaultSpeed / minSpeed); if (_local4 < _local3){ speed = (defaultSpeed / minSpeed); } else { speed = _local3; }; }; } public function TweenHandler():void{ Tweener.addTween(mc, {x:(path[waypoint][1] * tileSize), y:(path[waypoint][0] * tileSize), time:speed, onComplete:TweenHandler, transition:"linear"}); xReached = false; yReached = false; if (waypoint < (path.length - 1)){ waypoint++; } else { if (this.contains(mc)){ this.removeChild(mc); listNPC.splice(listNPC.indexOf(this), 1); player.addLives((-1 * npcLifeCost)); if (player.getLives() <= 0){ UI.playerLost(); }; UI.updateLivesText(String(player.getLives())); }; }; } public function enterFrame_handler(_arg1:Event){ mc.x = (mc.x + 2); } public function addPoisonSlow():void{ poisonSlowed = true; if (((iceSlowed) && (poisonSlowed))){ this.mc.npcMC.gotoAndStop(3); } else { this.mc.npcMC.gotoAndStop(4); }; } public function removePoisonSlow():void{ poisonSlowed = false; if (iceSlowed){ this.mc.npcMC.gotoAndStop(2); } else { this.mc.npcMC.gotoAndStop(1); }; } public function insaneLevels(_arg1:Number){ var _local2:*; _local2 = 265; switch (_arg1){ case 11: nameNPC = "Level 11"; hpMaxNPC = 650; armor = 1; armorType = "Green"; speedModifier = (285 / _local2); break; case 12: nameNPC = "Level 12"; hpMaxNPC = 550; armor = 1; armorType = "Pink"; speedModifier = (250 / _local2); flying = true; break; case 13: nameNPC = "Level 13"; hpMaxNPC = 800; armor = 1; armorType = "Yellow"; speedModifier = (295 / _local2); break; case 14: nameNPC = "Level 14"; hpMaxNPC = 925; armor = 1; armorType = "Blazed"; speedModifier = (295 / _local2); break; case 15: nameNPC = "Level 15"; hpMaxNPC = 1350; armor = 0; armorType = "Red"; speedModifier = (295 / _local2); break; case 16: nameNPC = "Level 16"; hpMaxNPC = 850; armor = 1; armorType = "Pink"; speedModifier = (250 / _local2); flying = true; break; case 17: nameNPC = "Level 17"; hpMaxNPC = 1650; armor = 1; armorType = "Red"; speedModifier = (325 / _local2); minSpeed = (100 / _local2); break; case 18: nameNPC = "Level 18"; hpMaxNPC = 2000; armor = 1; armorType = "Pink"; speedModifier = (325 / _local2); minSpeed = (110 / _local2); break; case 19: nameNPC = "Level 19"; hpMaxNPC = 2500; armor = 1; armorType = "Blue"; speedModifier = (350 / _local2); minSpeed = (120 / _local2); break; case 20: nameNPC = "Level 20"; hpMaxNPC = 1550; armor = 1; armorType = "Pink"; speedModifier = (280 / _local2); minSpeed = (100 / _local2); flying = true; break; case 21: nameNPC = "Level 21"; hpMaxNPC = 3250; armor = 2; armorType = "White"; speedModifier = (400 / _local2); minSpeed = (140 / _local2); break; case 22: nameNPC = "Level 22"; hpMaxNPC = 4100; armor = 2; armorType = "Green"; speedModifier = (420 / _local2); minSpeed = (160 / _local2); break; case 23: nameNPC = "Level 23"; hpMaxNPC = 5000; armor = 2; armorType = "Red"; speedModifier = (440 / _local2); minSpeed = (180 / _local2); break; case 24: nameNPC = "Level 24"; hpMaxNPC = 2850; armor = 1; armorType = "Pink"; speedModifier = (280 / _local2); minSpeed = (140 / _local2); flying = true; break; case 25: nameNPC = "Level 25"; hpMaxNPC = 6250; armor = 2; armorType = "Red"; speedModifier = (435 / _local2); minSpeed = (200 / _local2); break; case 26: nameNPC = "Level 26"; hpMaxNPC = 7750; armor = 2; armorType = "Green"; speedModifier = (440 / _local2); minSpeed = (220 / _local2); break; case 27: nameNPC = "Level 27"; hpMaxNPC = 9500; armor = 2; armorType = "Blue"; speedModifier = (445 / _local2); minSpeed = (240 / _local2); break; case 28: nameNPC = "Level 28"; hpMaxNPC = 5000; armor = 2; armorType = "Pink"; speedModifier = (275 / _local2); minSpeed = (150 / _local2); flying = true; break; case 29: nameNPC = "Level 29"; hpMaxNPC = 10500; armor = 2; armorType = "White"; speedModifier = (450 / _local2); minSpeed = (280 / _local2); break; case 30: nameNPC = "Level 30"; hpMaxNPC = 13000; armor = 3; armorType = "Green"; speedModifier = (455 / _local2); minSpeed = (300 / _local2); break; case 31: nameNPC = "Level 31"; hpMaxNPC = 16000; armor = 3; armorType = "Blazed"; speedModifier = (460 / _local2); minSpeed = (310 / _local2); break; case 32: nameNPC = "Level 32"; hpMaxNPC = 7500; armor = 2; armorType = "Pink"; speedModifier = (320 / _local2); minSpeed = (160 / _local2); flying = true; break; case 33: nameNPC = "Level 33"; hpMaxNPC = 19500; armor = 3; armorType = "Red"; speedModifier = (465 / _local2); minSpeed = (320 / _local2); break; case 34: nameNPC = "Level 34"; hpMaxNPC = 23500; armor = 3; armorType = "Yellow"; speedModifier = (470 / _local2); minSpeed = (330 / _local2); break; case 35: nameNPC = "Level 35"; hpMaxNPC = 28000; armor = 3; armorType = "Blue"; speedModifier = (475 / _local2); minSpeed = (340 / _local2); break; case 36: nameNPC = "Level 36"; hpMaxNPC = 10000; armor = 2; armorType = "Pink"; speedModifier = (350 / _local2); minSpeed = (200 / _local2); flying = true; break; case 37: nameNPC = "Level 37"; hpMaxNPC = 0x7D00; armor = 3; armorType = "Yellow"; speedModifier = (480 / _local2); minSpeed = (350 / _local2); break; case 38: nameNPC = "Level 38"; hpMaxNPC = 38000; armor = 3; armorType = "Red"; speedModifier = (485 / _local2); minSpeed = (360 / _local2); break; case 39: nameNPC = "Level 39"; hpMaxNPC = 45000; armor = 3; armorType = "White"; speedModifier = (490 / _local2); minSpeed = (370 / _local2); break; case 40: nameNPC = "Level 40"; hpMaxNPC = 13500; armor = 2; armorType = "Pink"; speedModifier = (380 / _local2); minSpeed = (250 / _local2); flying = true; break; }; if (_arg1 > 40){ nameNPC = ("Level " + _arg1); hpMaxNPC = (45000 * (1 + (0.1 * (_arg1 - 40)))); if ((_arg1 % 4) == 0){ hpMaxNPC = (hpMaxNPC * 0.3333); }; armor = 3; armorType = "Pink"; speedModifier = (550 / _local2); minSpeed = (390 / _local2); goldValue = 25; }; } public function extremeLevels(_arg1:Number){ var _local2:*; _local2 = 265; switch (_arg1){ case 11: nameNPC = "Level 11"; hpMaxNPC = 600; armor = 1; armorType = "Green"; speedModifier = (285 / _local2); break; case 12: nameNPC = "Level 12"; hpMaxNPC = 450; armor = 1; armorType = "Pink"; speedModifier = (250 / _local2); flying = true; break; case 13: nameNPC = "Level 13"; hpMaxNPC = 700; armor = 1; armorType = "Yellow"; speedModifier = (295 / _local2); break; case 14: nameNPC = "Level 14"; hpMaxNPC = 800; armor = 1; armorType = "Blazed"; speedModifier = (295 / _local2); break; case 15: nameNPC = "Level 15"; hpMaxNPC = 1200; armor = 0; armorType = "Red"; speedModifier = (295 / _local2); break; case 16: nameNPC = "Level 16"; hpMaxNPC = 725; armor = 1; armorType = "Pink"; speedModifier = (250 / _local2); flying = true; break; case 17: nameNPC = "Level 17"; hpMaxNPC = 1450; armor = 1; armorType = "Red"; speedModifier = (325 / _local2); minSpeed = (100 / _local2); break; case 18: nameNPC = "Level 18"; hpMaxNPC = 1850; armor = 1; armorType = "Pink"; speedModifier = (325 / _local2); minSpeed = (110 / _local2); break; case 19: nameNPC = "Level 19"; hpMaxNPC = 2350; armor = 1; armorType = "Blue"; speedModifier = (350 / _local2); minSpeed = (120 / _local2); break; case 20: nameNPC = "Level 20"; hpMaxNPC = 1350; armor = 1; armorType = "Pink"; speedModifier = (280 / _local2); minSpeed = (100 / _local2); flying = true; break; case 21: nameNPC = "Level 21"; hpMaxNPC = 3150; armor = 2; armorType = "White"; speedModifier = (400 / _local2); minSpeed = (140 / _local2); break; case 22: nameNPC = "Level 22"; hpMaxNPC = 3500; armor = 2; armorType = "Green"; speedModifier = (420 / _local2); minSpeed = (160 / _local2); break; case 23: nameNPC = "Level 23"; hpMaxNPC = 4300; armor = 2; armorType = "Red"; speedModifier = (440 / _local2); minSpeed = (180 / _local2); break; case 24: nameNPC = "Level 24"; hpMaxNPC = 2500; armor = 1; armorType = "Pink"; speedModifier = (280 / _local2); minSpeed = (140 / _local2); flying = true; break; case 25: nameNPC = "Level 25"; hpMaxNPC = 5250; armor = 2; armorType = "Red"; speedModifier = (435 / _local2); minSpeed = (200 / _local2); break; case 26: nameNPC = "Level 26"; hpMaxNPC = 6300; armor = 2; armorType = "Green"; speedModifier = (440 / _local2); minSpeed = (220 / _local2); break; case 27: nameNPC = "Level 27"; hpMaxNPC = 7900; armor = 2; armorType = "Blue"; speedModifier = (445 / _local2); minSpeed = (240 / _local2); break; case 28: nameNPC = "Level 28"; hpMaxNPC = 4150; armor = 2; armorType = "Pink"; speedModifier = (275 / _local2); minSpeed = (160 / _local2); flying = true; break; case 29: nameNPC = "Level 29"; hpMaxNPC = 9000; armor = 2; armorType = "White"; speedModifier = (450 / _local2); minSpeed = (260 / _local2); break; case 30: nameNPC = "Level 30"; hpMaxNPC = 11000; armor = 3; armorType = "Green"; speedModifier = (455 / _local2); minSpeed = (280 / _local2); break; case 31: nameNPC = "Level 31"; hpMaxNPC = 12750; armor = 3; armorType = "Blazed"; speedModifier = (460 / _local2); minSpeed = (300 / _local2); break; case 32: nameNPC = "Level 32"; hpMaxNPC = 6250; armor = 2; armorType = "Pink"; speedModifier = (320 / _local2); minSpeed = (180 / _local2); flying = true; break; case 33: nameNPC = "Level 33"; hpMaxNPC = 14500; armor = 3; armorType = "Red"; speedModifier = (465 / _local2); minSpeed = (310 / _local2); break; case 34: nameNPC = "Level 34"; hpMaxNPC = 16500; armor = 3; armorType = "Yellow"; speedModifier = (470 / _local2); minSpeed = (320 / _local2); break; case 35: nameNPC = "Level 35"; hpMaxNPC = 19000; armor = 3; armorType = "Blue"; speedModifier = (475 / _local2); minSpeed = (330 / _local2); break; case 36: nameNPC = "Level 36"; hpMaxNPC = 8500; armor = 2; armorType = "Pink"; speedModifier = (320 / _local2); speedModifier = (200 / _local2); flying = true; break; case 37: nameNPC = "Level 37"; hpMaxNPC = 21000; armor = 3; armorType = "Yellow"; speedModifier = (480 / _local2); minSpeed = (340 / _local2); break; case 38: nameNPC = "Level 38"; hpMaxNPC = 23000; armor = 3; armorType = "Red"; speedModifier = (485 / _local2); minSpeed = (350 / _local2); break; case 39: nameNPC = "Level 39"; hpMaxNPC = 25000; armor = 3; armorType = "White"; speedModifier = (490 / _local2); minSpeed = (360 / _local2); break; case 40: nameNPC = "Level 40"; hpMaxNPC = 10500; armor = 2; armorType = "Pink"; speedModifier = (340 / _local2); minSpeed = (220 / _local2); flying = true; break; case 41: nameNPC = "Level 41"; hpMaxNPC = 19500; armor = 7; armorType = "Green"; speedModifier = (380 / _local2); break; case 42: nameNPC = "Level 42"; hpMaxNPC = 23000; armor = 18; armorType = "Blue"; speedModifier = (390 / _local2); goldValue = 16; break; case 43: nameNPC = "Level 43"; hpMaxNPC = 26000; armor = 15; armorType = "Yellow"; speedModifier = (400 / _local2); goldValue = 16; break; case 44: nameNPC = "Level 44"; hpMaxNPC = 13000; armor = 5; armorType = "Pink"; speedModifier = (370 / _local2); flying = true; goldValue = 16; break; case 45: nameNPC = "Level 45"; hpMaxNPC = 28500; armor = 15; armorType = "Red"; speedModifier = (400 / _local2); goldValue = 18; break; case 46: nameNPC = "Level 46"; hpMaxNPC = 30000; armor = 15; armorType = "Blazed"; speedModifier = (400 / _local2); goldValue = 18; break; case 47: nameNPC = "Level 47"; hpMaxNPC = 33000; armor = 15; armorType = "White"; speedModifier = (400 / _local2); goldValue = 18; break; case 48: nameNPC = "Level 48"; hpMaxNPC = 15000; armor = 5; armorType = "Pink"; speedModifier = (380 / _local2); flying = true; goldValue = 20; break; case 49: nameNPC = "Level 49"; hpMaxNPC = 35000; armor = 15; armorType = "Green"; speedModifier = (400 / _local2); goldValue = 20; break; case 50: nameNPC = "Level 50"; hpMaxNPC = 40000; armor = 15; armorType = "Green"; speedModifier = (400 / _local2); goldValue = 20; break; }; } public function addIceSlow():void{ iceSlowed = true; if (((iceSlowed) && (poisonSlowed))){ this.mc.npcMC.gotoAndStop(3); } else { this.mc.npcMC.gotoAndStop(2); }; } public function starDamageBurnHandler(_arg1:TimerEvent):void{ starDamageBurn = false; starDamageBurnTimer.stop(); starDamageBurnTimer.removeEventListener("timer", starDamageBurnHandler); starDamageBurnTimer = null; } public function uraniumDamageBurnHandler(_arg1:TimerEvent):void{ uraniumDamageBurn = false; uraniumDamageBurnTimer.stop(); uraniumDamageBurnTimer.removeEventListener("timer", uraniumDamageBurnHandler); uraniumDamageBurnTimer = null; } public function tweenEventY_handler(_arg1:TweenEvent):void{ if (xReached){ tweenX.continueTo((path[waypoint][1] * tileSize), speed); tweenY.continueTo((path[waypoint][0] * tileSize), speed); xReached = false; yReached = false; if (waypoint < (path.length - 1)){ waypoint++; }; } else { yReached = true; }; } public function determineNPCType(_arg1:Number){ var _local2:*; _local2 = 265; switch (_arg1){ case 0: case 1: nameNPC = "Level 1"; hpMaxNPC = 10; armor = 0; armorType = "Yellow"; speedModifier = (265 / _local2); break; case 2: nameNPC = "Level 2"; hpMaxNPC = 30; armor = 0; armorType = "Blazed"; speedModifier = (265 / _local2); break; case 3: nameNPC = "Level 3"; hpMaxNPC = 55; armor = 0; armorType = "White"; speedModifier = (265 / _local2); break; case 4: nameNPC = "Level 4"; hpMaxNPC = 70; armor = 0; armorType = "Pink"; speedModifier = (230 / _local2); flying = true; break; case 5: nameNPC = "Level 5"; hpMaxNPC = 90; armor = 0; armorType = "Green"; speedModifier = (275 / _local2); break; case 6: nameNPC = "Level 6"; hpMaxNPC = 120; armor = 0; armorType = "Green"; speedModifier = (275 / _local2); break; case 7: nameNPC = "Level 7"; hpMaxNPC = 178; armor = 0; armorType = "Pink"; speedModifier = (285 / _local2); break; case 8: nameNPC = "Level 8"; hpMaxNPC = 240; armor = 0; armorType = "Pink"; speedModifier = (230 / _local2); flying = true; break; case 9: nameNPC = "Level 9"; hpMaxNPC = 300; armor = 0; armorType = "White"; speedModifier = (285 / _local2); break; case 10: nameNPC = "Level 10"; hpMaxNPC = 470; armor = 1; armorType = "Blue"; speedModifier = (285 / _local2); break; case 11: nameNPC = "Level 11"; hpMaxNPC = 490; armor = 1; armorType = "Green"; speedModifier = (285 / _local2); break; case 12: nameNPC = "Level 12"; hpMaxNPC = 450; armor = 1; armorType = "Pink"; speedModifier = (250 / _local2); flying = true; break; case 13: nameNPC = "Level 13"; hpMaxNPC = 570; armor = 1; armorType = "Yellow"; speedModifier = (295 / _local2); break; case 14: nameNPC = "Level 14"; hpMaxNPC = 650; armor = 1; armorType = "Blazed"; speedModifier = (295 / _local2); break; case 15: nameNPC = "Level 15"; hpMaxNPC = 1000; armor = 0; armorType = "Red"; speedModifier = (295 / _local2); break; case 16: nameNPC = "Level 16"; hpMaxNPC = 725; armor = 1; armorType = "Pink"; speedModifier = (250 / _local2); flying = true; break; case 17: nameNPC = "Level 17"; hpMaxNPC = 1350; armor = 1; armorType = "Red"; speedModifier = (295 / _local2); break; case 18: nameNPC = "Level 18"; hpMaxNPC = 1550; armor = 1; armorType = "Pink"; speedModifier = (300 / _local2); break; case 19: nameNPC = "Level 19"; hpMaxNPC = 1950; armor = 1; armorType = "Blue"; speedModifier = (300 / _local2); break; case 20: nameNPC = "Level 20"; hpMaxNPC = 1350; armor = 1; armorType = "Pink"; speedModifier = (280 / _local2); flying = true; break; case 21: nameNPC = "Level 21"; hpMaxNPC = 2300; armor = 2; armorType = "White"; speedModifier = (315 / _local2); break; case 22: nameNPC = "Level 22"; hpMaxNPC = 2530; armor = 2; armorType = "Green"; speedModifier = (315 / _local2); break; case 23: nameNPC = "Level 23"; hpMaxNPC = 3000; armor = 2; armorType = "Red"; speedModifier = (300 / _local2); break; case 24: nameNPC = "Level 24"; hpMaxNPC = 2500; armor = 1; armorType = "Pink"; speedModifier = (280 / _local2); flying = true; break; case 25: nameNPC = "Level 25"; hpMaxNPC = 3750; armor = 2; armorType = "Red"; speedModifier = (335 / _local2); minSpeed = (100 / _local2); break; case 26: nameNPC = "Level 26"; hpMaxNPC = 4500; armor = 2; armorType = "Green"; speedModifier = (340 / _local2); minSpeed = (120 / _local2); break; case 27: nameNPC = "Level 27"; hpMaxNPC = 5000; armor = 2; armorType = "Blue"; speedModifier = (340 / _local2); minSpeed = (140 / _local2); break; case 28: nameNPC = "Level 28"; hpMaxNPC = 4150; armor = 2; armorType = "Pink"; speedModifier = (275 / _local2); minSpeed = (100 / _local2); flying = true; break; case 29: nameNPC = "Level 29"; hpMaxNPC = 6750; armor = 2; armorType = "White"; speedModifier = (345 / _local2); minSpeed = (160 / _local2); break; case 30: nameNPC = "Level 30"; hpMaxNPC = 7150; armor = 3; armorType = "Green"; speedModifier = (350 / _local2); minSpeed = (180 / _local2); break; case 31: nameNPC = "Level 31"; hpMaxNPC = 8000; armor = 3; armorType = "Blazed"; speedModifier = (350 / _local2); minSpeed = (200 / _local2); break; case 32: nameNPC = "Level 32"; hpMaxNPC = 6250; armor = 2; armorType = "Pink"; speedModifier = (320 / _local2); minSpeed = (150 / _local2); flying = true; break; case 33: nameNPC = "Level 33"; hpMaxNPC = 9550; armor = 3; armorType = "Red"; speedModifier = (355 / _local2); minSpeed = (220 / _local2); break; case 34: nameNPC = "Level 34"; hpMaxNPC = 10200; armor = 3; armorType = "Yellow"; speedModifier = (355 / _local2); minSpeed = (240 / _local2); break; case 35: nameNPC = "Level 35"; hpMaxNPC = 11500; armor = 3; armorType = "Blue"; speedModifier = (355 / _local2); minSpeed = (260 / _local2); break; case 36: nameNPC = "Level 36"; hpMaxNPC = 8500; armor = 2; armorType = "Pink"; speedModifier = (320 / _local2); minSpeed = (200 / _local2); flying = true; break; case 37: nameNPC = "Level 37"; hpMaxNPC = 13000; armor = 3; armorType = "Yellow"; speedModifier = (360 / _local2); minSpeed = (280 / _local2); break; case 38: nameNPC = "Level 38"; hpMaxNPC = 15000; armor = 3; armorType = "Red"; speedModifier = (365 / _local2); minSpeed = (300 / _local2); break; case 39: nameNPC = "Level 39"; hpMaxNPC = 17000; armor = 3; armorType = "White"; speedModifier = (375 / _local2); minSpeed = (320 / _local2); break; case 40: nameNPC = "Level 40"; hpMaxNPC = 10500; armor = 2; armorType = "Pink"; speedModifier = (350 / _local2); minSpeed = (250 / _local2); flying = true; break; case 41: nameNPC = "Level 41"; hpMaxNPC = 19500; armor = 7; armorType = "Green"; speedModifier = (380 / _local2); break; case 42: nameNPC = "Level 42"; hpMaxNPC = 23000; armor = 18; armorType = "Blue"; speedModifier = (390 / _local2); goldValue = 16; break; case 43: nameNPC = "Level 43"; hpMaxNPC = 26000; armor = 15; armorType = "Yellow"; speedModifier = (400 / _local2); goldValue = 16; break; case 44: nameNPC = "Level 44"; hpMaxNPC = 13000; armor = 5; armorType = "Pink"; speedModifier = (370 / _local2); flying = true; goldValue = 16; break; case 45: nameNPC = "Level 45"; hpMaxNPC = 28500; armor = 15; armorType = "Red"; speedModifier = (400 / _local2); goldValue = 18; break; case 46: nameNPC = "Level 46"; hpMaxNPC = 30000; armor = 15; armorType = "Blazed"; speedModifier = (400 / _local2); goldValue = 18; break; case 47: nameNPC = "Level 47"; hpMaxNPC = 33000; armor = 15; armorType = "White"; speedModifier = (400 / _local2); goldValue = 18; break; case 48: nameNPC = "Level 48"; hpMaxNPC = 15000; armor = 5; armorType = "Pink"; speedModifier = (380 / _local2); flying = true; goldValue = 20; break; case 49: nameNPC = "Level 49"; hpMaxNPC = 35000; armor = 15; armorType = "Green"; speedModifier = (400 / _local2); goldValue = 20; break; case 50: nameNPC = "Level 50"; hpMaxNPC = 40000; armor = 15; armorType = "Green"; speedModifier = (400 / _local2); goldValue = 20; break; }; } } }//package gemtd
Section 18
//CreatePlayer (gemtd.CreatePlayer) package gemtd { import flash.utils.*; import com.electrotank.util.*; public class CreatePlayer { private var armorLevel:Number; private var goldName:String; private var lives:Number; private var score:Number; private var levelScoreName:String; private var armorLevelName:String; private var gameLevel:Number; private var scoreName:String; private var livesName:String; public var difficulty:String; private var qualityLevel:Number; private var timeScore:Number; private var gameLevelName:String; private var gold:Number; private var levelScore:Number; private var qualityLevelName:String; public var gameTimer:Timer; private var timeScoreName:String; public function CreatePlayer(_arg1:Number, _arg2:Number):void{ gameLevelName = "gameLevel"; MemoryCrypto.setValue(gameLevelName, 0); goldName = "gold"; MemoryCrypto.setValue(goldName, 10000000); livesName = "lives"; MemoryCrypto.setValue(livesName, 10000); qualityLevelName = "qualityLevel"; MemoryCrypto.setValue(qualityLevelName, 0); difficulty = "Easy"; armorLevelName = "armorLevel"; MemoryCrypto.setValue(armorLevelName, -5); scoreName = "score"; MemoryCrypto.setValue(scoreName, 0); timeScoreName = "timeScore"; MemoryCrypto.setValue(timeScoreName, 0); levelScoreName = "levelScore"; MemoryCrypto.setValue(levelScoreName, 0); } public function getGameLevel():Number{ return (MemoryCrypto.getValue(gameLevelName)); } public function addQualityLevel(_arg1:Number):void{ MemoryCrypto.incrementValue(qualityLevelName, _arg1); } public function addGameLevel(_arg1:Number):void{ MemoryCrypto.incrementValue(gameLevelName, _arg1); } public function setTimeScore(_arg1:Number):void{ MemoryCrypto.setValue(timeScoreName, _arg1); } public function getTimeScore():Number{ return (MemoryCrypto.getValue(timeScoreName)); } public function setArmorLevel(_arg1:Number):void{ MemoryCrypto.setValue(armorLevelName, _arg1); } public function addGold(_arg1:Number):void{ MemoryCrypto.incrementValue(goldName, _arg1); } public function getQualityLevel():Number{ return (MemoryCrypto.getValue(qualityLevelName)); } public function updateScore():void{ var _local1:Number; var _local2:Number; _local1 = 0; switch (difficulty){ case "Easy": _local1 = 1; break; case "Normal": _local1 = 2; break; case "Hard": _local1 = 4; break; case "Extreme": _local1 = 8; break; case "Insane": _local1 = 16; break; }; setLevelScore(((getGameLevel() * getGameLevel()) * getGameLevel())); _local2 = (getLevelScore() * _local1); setTimeScore(((_local2 * 0.5) / gameTimer.currentCount)); setScore((_local2 + getTimeScore())); } public function setScore(_arg1:Number):void{ MemoryCrypto.setValue(scoreName, _arg1); } public function getLives():Number{ return (MemoryCrypto.getValue(livesName)); } public function getGold():Number{ return (MemoryCrypto.getValue(goldName)); } public function getScore():Number{ return (MemoryCrypto.getValue(scoreName)); } public function getLevelScore():Number{ return (MemoryCrypto.getValue(levelScoreName)); } public function addLives(_arg1:Number):void{ MemoryCrypto.incrementValue(livesName, _arg1); } public function getArmorLevel():Number{ return (MemoryCrypto.getValue(armorLevelName)); } public function setLevelScore(_arg1:Number):void{ MemoryCrypto.setValue(levelScoreName, _arg1); } } }//package gemtd
Section 19
//CreateProjectile (gemtd.CreateProjectile) package gemtd { import flash.events.*; import flash.display.*; import fl.transitions.*; import flash.utils.*; import fl.transitions.easing.*; public class CreateProjectile extends MovieClip { private var tower:CreateTower; public var radiusProj:Number; private var frostnovaTimer:Timer; private var towerAbilities:TowerAbilities; public var destReached:Boolean; public var d_x:Number; public var speed:Number; public var listNPC:Array; private var tweenY:Tween; private var lastSpeed:Number; public var d_y:Number; public var damage:Number; public var m:Number; public var targetNPC:MovieClip; public var radius:Number; public var mc:MovieClip; private var tweenX:Tween; private var yReached:Boolean; private var flamestrike:MovieClip; private var flamestrikeTimer:Timer; private var xReached:Boolean; public var angle:Number; private var player:CreatePlayer; public var radiusNPC:Number; private var frostnova:MovieClip; public function CreateProjectile(_arg1:CreateTower, _arg2:TowerAbilities, _arg3:CreatePlayer, _arg4:Array, _arg5:MovieClip, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){ tower = _arg1; flamestrike = new Flamestrike(); towerAbilities = _arg2; switch (tower.damageType){ case "Amethyst": mc = new ProjectileAmethyst(); break; case "Aquamarine": mc = new ProjectileAqua(); break; case "Diamond": mc = new ProjectileDiamond(); break; case "Emerald": mc = new ProjectileEmerald(); break; case "Opal": mc = new ProjectileOpal(); break; case "Ruby": mc = new ProjectileRuby(); break; case "Sapphire": mc = new ProjectileSapphire(); break; case "Topaz": mc = new ProjectileTopaz(); break; default: mc = new ProjectileOld(); }; player = _arg3; mc.x = _arg6; mc.y = _arg7; speed = _arg8; targetNPC = _arg5; listNPC = _arg4; damage = _arg9; d_x = targetNPC.getCenterX(); d_y = targetNPC.getCenterY(); xReached = false; yReached = false; tweenX = new Tween(mc, "x", None.easeOut, mc.x, targetNPC.getCenterX(), 10, false); tweenY = new Tween(mc, "y", None.easeOut, mc.y, targetNPC.getCenterY(), 10, false); tweenX.addEventListener(TweenEvent.MOTION_FINISH, tweenEventX_handler); this.addChild(mc); } public function createFlamestrike():void{ var _local1:*; trace("created flamestrike"); flamestrike = new Flamestrike(); flamestrike.x = (targetNPC.getCenterX() - (flamestrike.width / 2)); flamestrike.y = (targetNPC.getCenterY() - (flamestrike.height / 2)); tower.addChild(flamestrike); flamestrikeTimer = new Timer(200, 20); flamestrikeTimer.addEventListener("timer", flamestrikeTimerHandler); flamestrikeTimer.start(); _local1 = 0; while (_local1 < listNPC.length) { if (Math.sqrt((Math.pow(((flamestrike.x + (flamestrike.width / 2)) - listNPC[_local1].getCenterX()), 2) + Math.pow(((flamestrike.y + (flamestrike.height / 2)) - listNPC[_local1].getCenterY()), 2))) <= 7){ trace("flamestrike hit!"); listNPC[_local1].hpNPC = (listNPC[_local1].hpNPC - 100); listNPC[_local1].mc.changeHP(listNPC[_local1].hpNPC, listNPC[_local1].hpMaxNPC); if (listNPC[_local1].hpNPC <= 0){ if (listNPC[_local1].contains(listNPC[_local1].mc)){ listNPC[_local1].removeChild(listNPC[_local1].mc); listNPC[_local1].removeTween(); player.addGold(listNPC[_local1].goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local1]), 1); }; }; }; _local1++; }; } public function stunTimerHandler(_arg1:TimerEvent):void{ if (targetNPC.hpNPC > 0){ targetNPC.resumeTween(); targetNPC.changeSpeed(1); updateNPCSpeed(); targetNPC.stunTimer.stop(); targetNPC.stunTimer.removeEventListener("timer", stunTimerHandler); targetNPC.stunTimer = null; }; } public function tweenEventX_handler(_arg1:TweenEvent):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:*; if (targetNPC.hpNPC > 0){ targetNPC.hpNPC = (targetNPC.hpNPC - damage); targetNPC.mc.changeHP(targetNPC.hpNPC, targetNPC.hpMaxNPC); if (CreateUI.lastNPCSelected == targetNPC){ CreateUI.updateNpcHpTextBox(targetNPC.hpNPC); }; if (targetNPC.hpNPC <= 0){ if (targetNPC.contains(targetNPC.mc)){ targetNPC.removeChild(targetNPC.mc); targetNPC.removeTween(); listNPC.splice(listNPC.indexOf(targetNPC), 1); player.addGold(targetNPC.goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); }; if (targetNPC.poisonSlowed){ targetNPC.poisonDamageTimer.stop(); targetNPC.poisonTimer.stop(); targetNPC.poisonDamageTimer.removeEventListener("timer", poisonDamageTimerHandler); targetNPC.poisonTimer.removeEventListener("timer", poisonTimerHandler); targetNPC.poisonDamageTimer = null; targetNPC.poisonTimer = null; }; targetNPC = null; } else { if (towerAbilities.iceSlow){ if (!targetNPC.iceSlowed){ targetNPC.changeSpeed((-1 * towerAbilities.iceSlowModifier)); updateNPCSpeed(); targetNPC.addIceSlow(); }; if (targetNPC.iceTimer == null){ targetNPC.iceTimer = new Timer(5000, 1); targetNPC.iceTimer.addEventListener("timer", iceTimerHandler); targetNPC.iceTimer.start(); } else { targetNPC.iceTimer.delay = 5000; }; }; if (towerAbilities.poisonSlow){ if (!targetNPC.poisonSlowed){ targetNPC.changeSpeed((-1 * towerAbilities.poisonSlowModifier)); updateNPCSpeed(); targetNPC.addPoisonSlow(); }; if (targetNPC.poisonTimer == null){ targetNPC.poisonTimer = new Timer(towerAbilities.poisonSlowDuration, 1); targetNPC.poisonTimer.addEventListener("timer", poisonTimerHandler); targetNPC.poisonTimer.start(); targetNPC.poisonDamageTimer = new Timer(1000, 0); targetNPC.poisonDamageTimer.addEventListener("timer", poisonDamageTimerHandler); targetNPC.poisonDamageTimer.start(); } else { targetNPC.poisonTimer.delay = towerAbilities.poisonSlowDuration; }; }; if (towerAbilities.stunPossible){ _local2 = Math.random(); if (_local2 < towerAbilities.stunChance){ if (targetNPC.stunTimer == null){ targetNPC.changeSpeed(-1); updateNPCSpeed(); targetNPC.stunTimer = new Timer(towerAbilities.stunDuration, 1); targetNPC.stunTimer.addEventListener("timer", stunTimerHandler); targetNPC.stunTimer.start(); } else { targetNPC.stunTimer.delay = towerAbilities.stunDuration; }; }; if (tower.towerName == "Lucky Asian Jade"){ if (_local2 < 0.01){ player.addGold(Math.ceil((player.getGameLevel() / 2))); CreateUI.updateGoldText(String(player.getGold())); }; }; }; if (towerAbilities.armorPenalty){ trace("armorPenalty ability"); if (targetNPC.armorPenaltyTimer == null){ targetNPC.armorPenaltyValue = (targetNPC.armorPenaltyValue + towerAbilities.armorPenaltyValue); if (CreateUI.lastNPCSelected == targetNPC){ CreateUI.updateArmorTextBox(targetNPC.armor, targetNPC.armorPenaltyValue, player.getArmorLevel()); }; targetNPC.armorPenaltyTimer = new Timer(towerAbilities.armorPenaltyDuration, 1); targetNPC.armorPenaltyTimer.addEventListener("timer", armorPenaltyTimerHandler); targetNPC.armorPenaltyTimer.start(); } else { targetNPC.armorPenaltyTimer.delay = towerAbilities.armorPenaltyDuration; }; }; if (towerAbilities.mana > 0){ _local3 = Math.random(); trace(("Has mana " + _local3)); if (tower.towerName == "Ancient Blood Stone"){ if (_local3 < 0.2){ if (towerAbilities.mana >= 5){ towerAbilities.mana = (towerAbilities.mana - 5); createFlamestrike(); }; }; } else { if ((((tower.towerName == "Paraiba Tourmaline")) || ((tower.towerName == "Paraiba Tourmaline Facet")))){ if (_local3 < 0.2){ if (towerAbilities.mana >= 5){ towerAbilities.mana = (towerAbilities.mana - 5); createFrostnova(towerAbilities.frostnovaDamage); }; }; }; }; }; }; if (towerAbilities.aoe){ _local4 = 0; while (_local4 < listNPC.length) { if ((((listNPC[_local4].hpNPC > 0)) && (!((listNPC.indexOf(targetNPC) == _local4))))){ if (Math.sqrt((Math.pow((mc.x - listNPC[_local4].getCenterX()), 2) + Math.pow((mc.y - listNPC[_local4].getCenterY()), 2))) <= towerAbilities.aoeRange){ listNPC[_local4].hpNPC = (listNPC[_local4].hpNPC - damage); listNPC[_local4].mc.changeHP(listNPC[_local4].hpNPC, listNPC[_local4].hpMaxNPC); if (listNPC[_local4].hpNPC <= 0){ if (listNPC[_local4].contains(listNPC[_local4].mc)){ listNPC[_local4].removeChild(listNPC[_local4].mc); listNPC[_local4].removeTween(); player.addGold(listNPC[_local4].goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local4]), 1); }; }; }; }; _local4++; }; }; if (towerAbilities.aoeFreeze){ _local5 = 0; while (_local5 < listNPC.length) { if (listNPC[_local5].hpNPC > 0){ if (Math.sqrt((Math.pow((mc.x - listNPC[_local5].getCenterX()), 2) + Math.pow((mc.y - listNPC[_local5].getCenterY()), 2))) <= towerAbilities.aoeRange){ if (listNPC.indexOf(targetNPC) != _local5){ listNPC[_local5].hpNPC = (listNPC[_local5].hpNPC - damage); listNPC[_local5].mc.changeHP(listNPC[_local5].hpNPC, listNPC[_local5].hpMaxNPC); }; if (listNPC[_local5].hpNPC <= 0){ if (listNPC[_local5].contains(listNPC[_local5].mc)){ listNPC[_local5].removeChild(listNPC[_local5].mc); listNPC[_local5].removeTween(); player.addGold(listNPC[_local5].goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local5]), 1); }; } else { if (!listNPC[_local5].iceSlowed){ listNPC[_local5].changeSpeed((-1 * towerAbilities.iceSlowModifier)); listNPC[_local5].addIceSlow(); }; if (listNPC[_local5].iceTimer == null){ listNPC[_local5].iceTimer = new Timer(5000, 1); listNPC[_local5].iceTimer.addEventListener("timer", listNPC[_local5].iceTimerHandler); listNPC[_local5].iceTimer.start(); } else { listNPC[_local5].iceTimer.delay = 5000; }; }; }; }; _local5++; }; }; }; this.removeChild(mc); this.mc = null; tower.removeChild(this); tower.mc_projectile = null; } public function iceTimerHandler(_arg1:TimerEvent):void{ targetNPC.changeSpeed(towerAbilities.iceSlowModifier); updateNPCSpeed(); targetNPC.removeIceSlow(); targetNPC.iceTimer.stop(); targetNPC.iceTimer.removeEventListener("timer", iceTimerHandler); targetNPC.iceTimer = null; } public function poisonDamageTimerHandler(_arg1:TimerEvent):void{ targetNPC.hpNPC = (targetNPC.hpNPC - towerAbilities.poisonDamage); targetNPC.mc.changeHP(targetNPC.hpNPC, targetNPC.hpMaxNPC); if (targetNPC.hpNPC <= 0){ if (targetNPC.contains(targetNPC.mc)){ targetNPC.removeChild(targetNPC.mc); targetNPC.removeTween(); listNPC.splice(listNPC.indexOf(targetNPC), 1); player.addGold(targetNPC.goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); }; }; } public function flamestrikeTimerHandler(_arg1:TimerEvent):void{ var _local2:*; _local2 = 0; while (_local2 < listNPC.length) { if (Math.sqrt((Math.pow(((flamestrike.x + (flamestrike.width / 2)) - listNPC[_local2].getCenterX()), 2) + Math.pow(((flamestrike.y + (flamestrike.height / 2)) - listNPC[_local2].getCenterY()), 2))) <= 7){ trace("flamestrike hit!"); listNPC[_local2].hpNPC = (listNPC[_local2].hpNPC - 100); listNPC[_local2].mc.changeHP(listNPC[_local2].hpNPC, listNPC[_local2].hpMaxNPC); if (listNPC[_local2].hpNPC <= 0){ if (listNPC[_local2].contains(listNPC[_local2].mc)){ listNPC[_local2].removeChild(listNPC[_local2].mc); listNPC[_local2].removeTween(); player.addGold(listNPC[_local2].goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local2]), 1); }; }; }; _local2++; }; if (flamestrikeTimer.currentCount == flamestrikeTimer.repeatCount){ trace("Flamestrike removed"); tower.removeChild(flamestrike); flamestrike = null; }; } public function updateNPCSpeed():void{ if (CreateUI.lastNPCSelected == targetNPC){ CreateUI.updateNpcSpeedText((1 / targetNPC.speed)); }; } public function poisonTimerHandler(_arg1:TimerEvent):void{ targetNPC.changeSpeed(towerAbilities.poisonSlowModifier); updateNPCSpeed(); targetNPC.poisonTimer.removeEventListener("timer", poisonTimerHandler); targetNPC.poisonTimer = null; targetNPC.removePoisonSlow(); targetNPC.poisonDamageTimer.stop(); targetNPC.poisonDamageTimer.removeEventListener("timer", poisonTimerHandler); targetNPC.poisonDamageTimer = null; } public function armorPenaltyTimerHandler(_arg1:TimerEvent):void{ targetNPC.armorPenaltyValue = (targetNPC.armorPenaltyValue - towerAbilities.armorPenaltyValue); if (CreateUI.lastNPCSelected == targetNPC){ CreateUI.updateArmorTextBox(targetNPC.armor, targetNPC.armorPenaltyValue, player.getArmorLevel()); }; targetNPC.armorPenaltyTimer.stop(); targetNPC.armorPenaltyTimer.removeEventListener("timer", armorPenaltyTimerHandler); targetNPC.armorPenaltyTimer = null; } public function frostnovaTimerHandler(_arg1:TimerEvent):void{ tower.removeChild(frostnova); frostnova = null; } public function createFrostnova(_arg1:Number):void{ var _local2:*; frostnova = new Frostnova(); frostnova.x = (targetNPC.getCenterX() - (frostnova.width / 2)); frostnova.y = (targetNPC.getCenterY() - (frostnova.height / 2)); tower.addChild(frostnova); frostnovaTimer = new Timer(2000, 1); frostnovaTimer.addEventListener("timer", frostnovaTimerHandler); trace("frostnova target hit!"); targetNPC.hpNPC = (targetNPC.hpNPC - _arg1); targetNPC.mc.changeHP(targetNPC.hpNPC, targetNPC.hpMaxNPC); if (targetNPC.hpNPC <= 0){ if (targetNPC.contains(targetNPC.mc)){ targetNPC.removeChild(targetNPC.mc); targetNPC.removeTween(); player.addGold(targetNPC.goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); listNPC.splice(listNPC.indexOf(targetNPC), 1); }; }; _local2 = 0; while (_local2 < listNPC.length) { if (Math.sqrt((Math.pow(((frostnova.x + (frostnova.width / 2)) - listNPC[_local2].getCenterX()), 2) + Math.pow(((frostnova.y + (frostnova.height / 2)) - listNPC[_local2].getCenterY()), 2))) <= 28.6){ trace("frostnova aoe hit!"); listNPC[_local2].hpNPC = (listNPC[_local2].hpNPC - _arg1); listNPC[_local2].mc.changeHP(listNPC[_local2].hpNPC, listNPC[_local2].hpMaxNPC); if (listNPC[_local2].hpNPC <= 0){ if (listNPC[_local2].contains(listNPC[_local2].mc)){ listNPC[_local2].removeChild(listNPC[_local2].mc); listNPC[_local2].removeTween(); player.addGold(listNPC[_local2].goldValue); CreateUI.updateGoldText(String(player.getGold())); tower.updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local2]), 1); }; }; }; _local2++; }; frostnovaTimer.start(); } } }//package gemtd
Section 20
//CreateTower (gemtd.CreateTower) package gemtd { import flash.events.*; import caurina.transitions.*; import flash.display.*; import flash.text.*; import flash.utils.*; import fl.transitions.easing.*; public class CreateTower extends MovieClip { public var tooltip:String; public var gameMap:Map; public var towerLevel:Number; private var listAuraApplied:Array; public var towerUpgradable:Boolean; public var mc_projectile:MovieClip; private var dragTower:Boolean; public var fireRate:Number; public var towerAbilities:TowerAbilities; public var critTextbox:TextField; public var UI:Object; public var towerUpgradesTo:String; public var towerPlaced:MovieClip; public var manaRegenTimer:Timer; public var towerSelected:Boolean; public var damageBase:Number; private var player:CreatePlayer; public var numKills:Number; public var myTimer:Timer; private var select:MovieClip; public var numDie:Number; public var damageAuraValue:Number; public var towerName:String; public var range:Number; public var sidesPerDie:Number; public var rangeModifier:Number; public var speedAuraValue:Number; public var damageType:String; public var towerUpgradeCost:Number; public var cooldownModifier:Number; public var listNPC:Array; public var damage:Number; public var mc:MovieClip; private var dragX:Number; private var dragY:Number; public var towerQuality:Number; public var proximityAuraTimer:Timer; public var projectileSpeed:Number; public var towerType:String; public var format:TextFormat; public function CreateTower(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Array, _arg5:Map, _arg6:CreatePlayer){ listAuraApplied = new Array(); super(); UI = _arg1; gameMap = _arg5; player = _arg6; (towerName == "Rock"); towerType = "Rock"; towerQuality = 0; mc = new Rock(); select = new Select(); towerPlaced = new TowerPlaced(); towerAbilities = new TowerAbilities(); mc.x = (_arg2 - (mc.width / 2)); mc.y = (_arg3 - (mc.height / 2)); listNPC = _arg4; fireRate = 1000; dragTower = false; dragX = -1; dragY = -1; towerSelected = false; towerUpgradable = false; towerUpgradeCost = 0; towerUpgradesTo = ""; damageAuraValue = 0; speedAuraValue = 0; damage = 0; numDie = 1; numKills = 0; towerLevel = 0; format = new TextFormat(); format.font = "Arial"; format.size = 12; format.color = 0xE00000; this.addChild(mc); } public function createProjectile():void{ var _local1:Number; var _local2:Number; var _local3:*; _local1 = 0; _local2 = 0; _local3 = 0; while (_local3 < listNPC.length) { if (listNPC[_local3].hpNPC > 0){ _local2 = Math.sqrt((Math.pow((getCenterX() - listNPC[_local3].getCenterX()), 2) + Math.pow((getCenterY() - listNPC[_local3].getCenterY()), 2))); if (_local2 <= range){ if (!towerAbilities.damageBurn){ calculateDamage(listNPC[_local3]); mc_projectile = new CreateProjectile(this, towerAbilities, player, listNPC, listNPC[_local3], getCenterX(), getCenterY(), 9, damage); this.addChild(mc_projectile); } else { if (listNPC[_local3] != null){ if (damageType == "Ruby"){ if (!listNPC[_local3].starDamageBurn){ listNPC[_local3].starDamageBurn = true; listNPC[_local3].starDamageBurnTimer = new Timer((cooldownModifier * 1000), 1); listNPC[_local3].starDamageBurnTimer.addEventListener("timer", listNPC[_local3].starDamageBurnHandler); listNPC[_local3].starDamageBurnTimer.start(); listNPC[_local3].hpNPC = (listNPC[_local3].hpNPC - (damageBase * (1 + (towerLevel / 10)))); listNPC[_local3].mc.changeHP(listNPC[_local3].hpNPC, listNPC[_local3].hpMaxNPC); if (listNPC[_local3].hpNPC <= 0){ if (listNPC[_local3].contains(listNPC[_local3].mc)){ listNPC[_local3].removeChild(listNPC[_local3].mc); listNPC[_local3].removeTween(); player.addGold(listNPC[_local3].goldValue); CreateUI.updateGoldText(String(player.getGold())); updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local3]), 1); }; }; }; } else { if (damageType == "Topaz"){ if (!listNPC[_local3].uraniumDamageBurn){ listNPC[_local3].uraniumDamageBurn = true; listNPC[_local3].uraniumDamageBurnTimer = new Timer((cooldownModifier * 1000), 1); listNPC[_local3].uraniumDamageBurnTimer.addEventListener("timer", listNPC[_local3].uraniumDamageBurnHandler); listNPC[_local3].uraniumDamageBurnTimer.start(); listNPC[_local3].hpNPC = (listNPC[_local3].hpNPC - (damageBase * (1 + (towerLevel / 10)))); listNPC[_local3].mc.changeHP(listNPC[_local3].hpNPC, listNPC[_local3].hpMaxNPC); if (listNPC[_local3].hpNPC <= 0){ if (listNPC[_local3].contains(listNPC[_local3].mc)){ listNPC[_local3].removeChild(listNPC[_local3].mc); listNPC[_local3].removeTween(); player.addGold(listNPC[_local3].goldValue); CreateUI.updateGoldText(String(player.getGold())); updateTowerKills(); listNPC.splice(listNPC.indexOf(listNPC[_local3]), 1); }; }; }; }; }; }; }; _local1++; if (towerAbilities.multiTargets == _local1){ break; }; }; }; _local3++; }; } public function proximityAuraTimerHandler(_arg1:TimerEvent):void{ var _local2:*; _local2 = false; if ((player.getGameLevel() % 4) == 0){ _local2 = true; }; if (_local2){ if (towerAbilities.proximityAuraFlying){ applyProximityAura(); }; } else { if (towerAbilities.proximityAuraGround){ applyProximityAura(); }; }; } public function addSelectTower():void{ select.x = (mc.x - 4); select.y = (mc.y - 4); this.addChild(select); } public function randomTower(){ var _local1:*; var _local2:*; var _local3:Number; _local1 = Math.random(); _local2 = Math.random(); while (_local2 >= 0.96) { _local2 = Math.random(); }; if ((((_local2 >= 0)) && ((_local2 < 0.12)))){ towerType = "Amethyst"; } else { if ((((_local2 >= 0.12)) && ((_local2 < 0.24)))){ towerType = "Aquamarine"; } else { if ((((_local2 >= 0.24)) && ((_local2 < 0.36)))){ towerType = "Diamond"; } else { if ((((_local2 >= 0.36)) && ((_local2 < 0.48)))){ towerType = "Emerald"; } else { if ((((_local2 >= 0.48)) && ((_local2 < 0.6)))){ towerType = "Opal"; } else { if ((((_local2 >= 0.6)) && ((_local2 < 0.72)))){ towerType = "Ruby"; } else { if ((((_local2 >= 0.72)) && ((_local2 < 0.84)))){ towerType = "Sapphire"; } else { if ((((_local2 >= 0.84)) && ((_local2 < 0.96)))){ towerType = "Topaz"; }; }; }; }; }; }; }; }; _local3 = player.getQualityLevel(); if (_local3 == 0){ towerQuality = 0; } else { if (_local3 == 1){ if ((((_local1 >= 0)) && ((_local1 < 0.7)))){ towerQuality = 0; } else { towerQuality = 1; }; } else { if (_local3 == 2){ if ((((_local1 >= 0)) && ((_local1 < 0.6)))){ towerQuality = 0; } else { if ((((_local1 >= 0.6)) && ((_local1 < 0.9)))){ towerQuality = 1; } else { if ((((_local1 >= 0.9)) && ((_local1 <= 1)))){ towerQuality = 2; }; }; }; } else { if (_local3 == 3){ if ((((_local1 >= 0)) && ((_local1 < 0.5)))){ towerQuality = 0; } else { if ((((_local1 >= 0.5)) && ((_local1 < 0.8)))){ towerQuality = 1; } else { if ((((_local1 >= 0.8)) && ((_local1 <= 1)))){ towerQuality = 2; }; }; }; } else { if (_local3 == 4){ if ((((_local1 >= 0)) && ((_local1 < 0.4)))){ towerQuality = 0; } else { if ((((_local1 >= 0.4)) && ((_local1 < 0.7)))){ towerQuality = 1; } else { if ((((_local1 >= 0.7)) && ((_local1 < 0.9)))){ towerQuality = 2; } else { if ((((_local1 >= 0.9)) && ((_local1 <= 1)))){ towerQuality = 3; }; }; }; }; } else { if (_local3 == 5){ if ((((_local1 >= 0)) && ((_local1 < 0.3)))){ towerQuality = 0; } else { if ((((_local1 >= 0.3)) && ((_local1 < 0.6)))){ towerQuality = 1; } else { if ((((_local1 >= 0.6)) && ((_local1 < 0.9)))){ towerQuality = 2; } else { if ((((_local1 >= 0.9)) && ((_local1 <= 1)))){ towerQuality = 3; }; }; }; }; } else { if (_local3 == 6){ if ((((_local1 >= 0)) && ((_local1 < 0.2)))){ towerQuality = 0; } else { if ((((_local1 >= 0.2)) && ((_local1 < 0.5)))){ towerQuality = 1; } else { if ((((_local1 >= 0.5)) && ((_local1 < 0.8)))){ towerQuality = 2; } else { if ((((_local1 >= 0.8)) && ((_local1 <= 1)))){ towerQuality = 3; }; }; }; }; } else { if (_local3 == 7){ if ((((_local1 >= 0)) && ((_local1 < 0.1)))){ towerQuality = 0; } else { if ((((_local1 >= 0.1)) && ((_local1 < 0.4)))){ towerQuality = 1; } else { if ((((_local1 >= 0.4)) && ((_local1 < 0.7)))){ towerQuality = 2; } else { if ((((_local1 >= 0.7)) && ((_local1 <= 1)))){ towerQuality = 3; }; }; }; }; } else { if (_local3 == 8){ if ((((_local1 >= 0)) && ((_local1 < 0.3)))){ towerQuality = 1; } else { if ((((_local1 >= 0.3)) && ((_local1 < 0.6)))){ towerQuality = 2; } else { if ((((_local1 >= 0.6)) && ((_local1 < 0.9)))){ towerQuality = 3; } else { if ((((_local1 >= 0.9)) && ((_local1 <= 1)))){ towerQuality = 4; }; }; }; }; }; }; }; }; }; }; }; }; }; switch (towerQuality){ case 0: towerName = "Chipped"; break; case 1: towerName = "Flawed"; break; case 2: towerName = "Normal"; break; case 3: towerName = "Flawless"; break; case 4: towerName = "Perfect"; break; default: towerName = "Encountered an error."; }; towerName = ((towerName + " ") + towerType); applyTowerAttributes(); } public function addTooltip():void{ trace(((("towerType: " + towerType) + " | ") + !((towerType == "Special")))); trace(("towerName: " + towerName)); if (towerType != "Special"){ switch (towerType){ case "Amethyst": tooltip = "Attacks air only"; break; case "Aquamarine": tooltip = "Fast attack speed"; break; case "Diamond": tooltip = (((("Attacks ground only and has " + (towerAbilities.critChance * 100)) + "% chance to deal x") + towerAbilities.critMultiplier) + " damage"); break; case "Emerald": tooltip = (((((("Deals a poison attack that does " + towerAbilities.poisonDamage) + " damage per second, and slows the target enemy's movement by ") + (towerAbilities.poisonSlowModifier * 100)) + "%. Lasts ") + (towerAbilities.poisonSlowDuration / 1000)) + " seconds"); break; case "Opal": tooltip = (((("Gives an aura to other gems within " + towerAbilities.speedAuraOpalRange) + " range which increases their attack speeds by ") + (towerAbilities.speedAuraOpalValue * 100)) + "%"); break; case "Ruby": tooltip = "Attacks cause splash damage"; break; case "Sapphire": tooltip = "Attacks will slow target's movement speed"; break; case "Topaz": tooltip = "Attacks multiple targets"; break; default: tooltip = ""; }; } else { switch (towerName){ case "Silver": tooltip = "Attacks will slow targets within a splash area."; break; case "Sterling Silver": tooltip = "Attacks will slow targets within a splash area."; break; case "Silver Knight": tooltip = "Attacks will slow targets within a splash area."; break; case "Malachite": tooltip = "Malachite can attack three targets."; break; case "Vivid Malachite": tooltip = "Vivid Malachite can attack four targets."; break; case "Mighty Malachite": tooltip = "Mighty Malachite can attack all targets."; break; case "Jade": tooltip = "Poison attack deals 5 damage per second, and slows the target enemy's movement by 50%. Lasts 2 seconds."; break; case "Asian Jade": tooltip = "Poison attack deals 10 damage per second, and slows the target enemy's movement by 50%. Lasts 3 seconds."; break; case "Lucky Asian Jade": tooltip = "Poison attack deals 10 damage per second, and slows the target enemy's movement by 50%. Lasts 4 seconds. 1% chance to stun for 2 seconds. 5% chance to deal 4x damage. 1% chance to gain half the current level in gold per attack."; break; case "Star Ruby": tooltip = (("Any enemy within " + Math.round(rangeModifier)) + " range of the Star Ruby will receive 40 damage per second."); break; case "Blood Star": tooltip = (("Any enemy within " + Math.round(rangeModifier)) + " range of the Blood Star will receive 50 damage per second."); break; case "Fire Star": tooltip = (("Any enemy within " + Math.round(rangeModifier)) + " range of the Fire Star will receive 130 damage per second."); break; case "Pink Diamond": tooltip = (((("Attacks ground only and has " + (towerAbilities.critChance * 100)) + "% chance to deal x") + towerAbilities.critMultiplier) + " damage."); break; case "Great Pink Diamond": tooltip = (((("Attacks ground only and has " + (towerAbilities.critChance * 100)) + "% chance to deal x") + towerAbilities.critMultiplier) + " damage."); break; case "Black Opal": tooltip = (("Gives 30% more damage to towers within " + Math.round(towerAbilities.damageAuraRange)) + " range."); break; case "Mystic Black Opal": tooltip = (("Gives 40% more damage to towers within " + Math.round(towerAbilities.damageAuraRange)) + " range."); break; case "Paraiba Tourmaline": tooltip = (("Gives -4 armor to ground units within " + towerAbilities.proximityAuraRange) + " range. Additionally, it has a 20% chance to cast a 200 damage frost nova per attack costing 5 mana."); break; case "Paraiba Tourmaline Facet": tooltip = (("Gives -6 armor to ground units within " + towerAbilities.proximityAuraRange) + " range. Additionally, it has a 20% chance to cast a 250 damage frost nova per attack costing 5 mana."); break; case "Dark Emerald": tooltip = "Has a 12.5% chance to stun for 1.5 seconds per attack."; break; case "Enchanted Emerald": tooltip = "15% Chance to stun for 2 seconds and 15% chance to do 4x damage."; break; case "Blood Stone": tooltip = "Does 135 damage per second to nearby enemies and has splash damage."; break; case "Ancient Blood Stone": tooltip = "15% Chance to do 3x damage. 10% chance to cast a flame strike dealing 500 damage per second for 5 seconds, costing 5 mana."; break; case "Uranium 238": tooltip = "Any unit within range of uranium is slowed by 50%. Uranium will burn enemies for 190 damage per second."; break; case "Uranium 235": tooltip = "Any unit within range of uranium is slowed by 50%. Uranium will burn enemies for 260 damage per second."; break; case "Yellow Sapphire": tooltip = "Attacks will slow targets within a huge splash area."; break; case "Star Yellow Sapphire": tooltip = "Attacks will slow targets within a huge splash area and gives 5% more damage to towers nearby."; break; case "Red Crystal": tooltip = "Gives -4 armor to air units within a large area. Can only attack air units."; break; case "Red Crystal Facet": tooltip = "Gives -5 armor to air units within a large area. Can only attack air units."; break; case "Rose Quartz Crystal": tooltip = "Gives -6 armor to air units within a large area. Can only attack air units."; break; case "Gold": tooltip = "25% Chance to do 2x damage. Applies -5 armor to targets it attacks."; break; case "Egyptian Gold": tooltip = "30% Chance to do 2x damage. Applies -8 armor to targets it attacks."; break; case "Uber Stone": tooltip = "Only the very lucky have the chance ever to see this stone of pure damage."; break; default: tooltip = ""; }; }; } public function timerHandler(_arg1:TimerEvent):void{ var _local2:*; _local2 = false; if ((player.getGameLevel() % 4) == 0){ _local2 = true; }; if (_local2){ if (towerAbilities.attacksFlying){ createProjectile(); }; } else { if (towerAbilities.attacksGround){ createProjectile(); }; }; } public function removeSelectTower():void{ if (this.contains(select)){ trace("removed select box"); this.removeChild(select); } else { trace("failed to remove select box"); }; } public function increaseQuality():void{ towerQuality++; switch (towerQuality){ case 1: towerName = ("Flawed " + towerType); break; case 2: towerName = ("Normal " + towerType); break; case 3: towerName = ("Flawless " + towerType); break; case 4: towerName = ("Perfect " + towerType); break; case 5: towerName = ("Great " + towerType); break; default: towerName = "Error"; }; } public function tweenHandler(_arg1:TextField):void{ trace(_arg1); Tweener.removeTweens(_arg1); if (this.contains(_arg1)){ trace(this.contains(_arg1)); this.removeChild(_arg1); }; _arg1 = null; } public function stopDragTower():void{ dragTower = false; mc.removeEventListener(Event.ENTER_FRAME, enterFrame_handler); } public function getCenterX(){ return ((mc.x + (mc.width / 2))); } public function getCenterY(){ return ((mc.y + (mc.height / 2))); } public function calculateDamage(_arg1:Object){ var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; _local2 = dmgTable[damageType][_arg1.armorType]; _local3 = calculateArmorModifier(((_arg1.armor - _arg1.armorPenaltyValue) + player.getArmorLevel())); _local4 = 0; _local5 = 0; while (_local4++ < numDie) { _local5 = (_local5 + (Math.floor((Math.random() * sidesPerDie)) + 1)); }; _local5 = (_local5 + damageBase); damage = (((_local5 * _local2) * _local3) * (1 + (towerLevel / 10))); damage = (damage * (1 + damageAuraValue)); if (towerAbilities.critPossible){ _local6 = Math.random(); if (_local6 < towerAbilities.critChance){ damage = (damage * towerAbilities.critMultiplier); critTextbox = new TextField(); critTextbox.selectable = false; critTextbox.width = 40; critTextbox.height = 25; critTextbox.x = (_arg1.getCenterX() - 10); critTextbox.y = (_arg1.getCenterY() - 15); critTextbox.defaultTextFormat = format; critTextbox.text = String((damage.toFixed(0) + "!")); this.addChild(critTextbox); Tweener.addTween(critTextbox, {y:(_arg1.getCenterY() - 25), onComplete:tweenHandler, onCompleteParams:[critTextbox], time:2}); }; }; } public function placeTower():Boolean{ var _local1:*; var _local2:*; var _local3:Boolean; var _local4:*; _local1 = mc.x; _local2 = mc.y; _local3 = false; _local1 = Math.floor((_local1 / gameMap.tileSize)); _local2 = Math.floor((_local2 / gameMap.tileSize)); _local4 = false; trace(((("Temp_x: " + _local1) + " Temp_y: ") + _local2)); if ((((((((_local1 < 0)) || ((_local2 < 0)))) || ((_local1 >= (gameMap.mapWidth - 1))))) || ((_local2 >= (gameMap.mapHeight - 1))))){ if (this.contains(mc)){ this.removeChild(mc); }; _local4 = false; } else { if (((((((!(gameMap.checkWalkable(_local1, _local2))) || (!(gameMap.checkWalkable((_local1 + 1), _local2))))) || (!(gameMap.checkWalkable((_local1 + 1), (_local2 + 1)))))) || (!(gameMap.checkWalkable(_local1, (_local2 + 1)))))){ _local3 = true; UI.drawErrorMsg("CannotBuildThere"); if (this.contains(mc)){ this.removeChild(mc); }; _local4 = false; } else { gameMap.setWalkable(_local1, _local2, false); gameMap.setWalkable((_local1 + 1), _local2, false); gameMap.setWalkable((_local1 + 1), (_local2 + 1), false); gameMap.setWalkable(_local1, (_local2 + 1), false); if (pathfindingCheck()){ trace("pathfindCheck"); UI.drawErrorMsg("Blocking"); gameMap.setWalkable(_local1, _local2, true); gameMap.setWalkable((_local1 + 1), _local2, true); gameMap.setWalkable((_local1 + 1), (_local2 + 1), true); gameMap.setWalkable(_local1, (_local2 + 1), true); this.removeChild(mc); _local4 = false; } else { mc.x = (_local1 * gameMap.tileSize); mc.y = (_local2 * gameMap.tileSize); initializeTower(); addTimer(); _local4 = true; }; }; }; trace(("ReturnVar: " + _local4)); return (_local4); } public function enterFrame_handler(_arg1:Event):void{ var _local2:*; var _local3:*; if (dragTower){ _local2 = Math.round(((stage.mouseX - (mc.width / 2)) / gameMap.tileSize)); _local3 = Math.round((((stage.mouseY - 20) - (mc.height / 2)) / gameMap.tileSize)); if (((!((dragX == _local2))) || (!((dragY == _local3))))){ mc.x = (_local2 * gameMap.tileSize); mc.y = (_local3 * gameMap.tileSize); dragX = _local2; dragY = _local3; }; }; } public function decreaseQuality():void{ towerQuality--; switch (towerQuality){ case 0: towerName = ("Chipped " + towerType); break; case 1: towerName = ("Flawed " + towerType); break; case 2: towerName = ("Normal " + towerType); break; case 3: towerName = ("Flawless " + towerType); break; case 4: towerName = ("Perfect " + towerType); break; default: towerName = "Error"; }; } public function removeTower():void{ var _local1:*; var _local2:*; removeTimers(); if (mc != null){ this.removeChild(mc); }; _local1 = Math.floor((mc.x / gameMap.tileSize)); _local2 = Math.floor((mc.y / gameMap.tileSize)); gameMap.setWalkable(_local1, _local2, true); gameMap.setWalkable((_local1 + 1), _local2, true); gameMap.setWalkable((_local1 + 1), (_local2 + 1), true); gameMap.setWalkable(_local1, (_local2 + 1), true); } public function updateTowerKills():void{ numKills++; if ((numKills % 10) == 0){ towerLevel++; }; if (towerSelected){ CreateUI.updateTowerKillsTextBox(numKills, towerLevel); }; } public function addTimer():void{ myTimer = new Timer(fireRate, 0); updatefireRate(); myTimer.addEventListener("timer", timerHandler); myTimer.start(); } public function changeTower(_arg1:String):void{ var _local2:RegExp; var _local3:Class; var _local4:*; var _local5:*; towerName = _arg1; this.removeChild(mc); _local2 = / /g; if (towerName == "Rock"){ towerType = "Rock"; towerQuality = 0; removeTimers(); } else { towerAbilities = new TowerAbilities(); applyTowerAttributes(); updatefireRate(); calculateRange(); }; _local3 = (getDefinitionByName(towerName.replace(_local2, "")) as Class); _local4 = mc.x; _local5 = mc.y; mc = new (_local3); mc.x = _local4; mc.y = _local5; this.addChild(mc); } public function addTowerPlaced():void{ towerPlaced.x = (mc.x - 1); towerPlaced.y = (mc.y - 1); this.addChild(towerPlaced); } public function calculateArmorModifier(_arg1){ if (_arg1 >= 0){ return (armorTablePos[_arg1]); }; _arg1 = (_arg1 * -1); if (_arg1 > 10){ _arg1 = 10; }; return (armorTableNeg[_arg1]); } public function initializeTower():void{ var _local1:Number; var _local2:Number; var _local3:RegExp; var _local4:Class; _local1 = mc.x; _local2 = mc.y; this.removeChild(mc); randomTower(); calculateRange(); _local3 = / /; _local4 = (getDefinitionByName(towerName.replace(_local3, "")) as Class); mc = new (_local4); mc.x = _local1; mc.y = _local2; this.addChild(mc); } public function removeTimers():void{ if (myTimer != null){ myTimer.stop(); myTimer.removeEventListener("timer", timerHandler); }; if (proximityAuraTimer != null){ proximityAuraTimer.stop(); proximityAuraTimer.removeEventListener("timer", proximityAuraTimerHandler); }; if (manaRegenTimer != null){ manaRegenTimer.stop(); manaRegenTimer.removeEventListener("timer", manaRegenTimerHandler); }; } public function removeTowerPlaced():void{ if (this.contains(towerPlaced)){ this.removeChild(towerPlaced); }; } public function calculateRange(){ range = (286 * rangeModifier); } public function manaRegenTimerHandler(_arg1:TimerEvent):void{ if (towerAbilities.mana < towerAbilities.manaMax){ towerAbilities.mana = (towerAbilities.mana + towerAbilities.manaRegen); }; } public function pathfindingCheck():Boolean{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; _local1 = gameMap.findPath(0, 4, 8, 4); if (_local1 == null){ return (true); }; _local2 = gameMap.findPath(8, 4, 7, 22); if (_local2 == null){ return (true); }; _local3 = gameMap.findPath(7, 22, 32, 22); if (_local3 == null){ return (true); }; _local4 = gameMap.findPath(32, 22, 32, 4); if (_local4 == null){ return (true); }; _local5 = gameMap.findPath(32, 4, 19, 4); if (_local5 == null){ return (true); }; _local6 = gameMap.findPath(19, 4, 19, 34); if (_local6 == null){ return (true); }; _local7 = gameMap.findPath(19, 34, 39, 34); if (_local7 == null){ return (true); }; return (false); } public function applyProximityAura():void{ var _local1:*; var _local2:*; var _local3:Number; _local1 = 0; while (_local1 < listNPC.length) { if (listNPC[_local1].hpNPC > 0){ _local2 = Math.sqrt((Math.pow((getCenterX() - listNPC[_local1].getCenterX()), 2) + Math.pow((getCenterY() - listNPC[_local1].getCenterY()), 2))); trace(_local2); if (_local2 <= towerAbilities.proximityAuraRange){ if ((((towerAbilities.proximityAuraArmorPenalty > 0)) && (!(listNPC[_local1].armorPenaltyAuraApplied)))){ listNPC[_local1].armorPenaltyValue = (listNPC[_local1].armorPenaltyValue + towerAbilities.proximityAuraArmorPenalty); if (listNPC[_local1].npcSelected){ CreateUI.updateArmorTextBox(listNPC[_local1].armor, listNPC[_local1].armorPenaltyValue, player.getArmorLevel()); }; listNPC[_local1].armorPenaltyAuraApplied = true; listAuraApplied.push(listNPC[_local1]); } else { if ((((towerAbilities.proximityAuraSpeedPenalty > 0)) && (!(listNPC[_local1].speedPenaltyAuraApplied)))){ listNPC[_local1].changeSpeed((-1 * towerAbilities.proximityAuraSpeedPenalty)); listNPC[_local1].speedPenaltyAuraApplied = true; listAuraApplied.push(listNPC[_local1]); }; }; } else { _local3 = listAuraApplied.indexOf(listNPC[_local1]); if (_local3 >= 0){ if (towerAbilities.proximityAuraArmorPenalty > 0){ listAuraApplied[_local3].armorPenaltyValue = (listAuraApplied[_local3].armorPenaltyValue - towerAbilities.proximityAuraArmorPenalty); if (listAuraApplied[_local3].npcSelected){ CreateUI.updateArmorTextBox(listAuraApplied[_local3].armor, listAuraApplied[_local3].armorPenaltyValue, player.getArmorLevel()); }; listAuraApplied[_local3].armorPenaltyAuraApplied = false; listAuraApplied.splice(listAuraApplied.indexOf(listAuraApplied[_local3]), 1); } else { if (towerAbilities.proximityAuraSpeedPenalty > 0){ listAuraApplied[_local3].changeSpeed(towerAbilities.proximityAuraSpeedPenalty); listAuraApplied[_local3].speedPenaltyAuraApplied = false; listAuraApplied.splice(listAuraApplied.indexOf(listAuraApplied[_local3]), 1); }; }; }; }; }; _local1++; }; } public function getDamageRange(_arg1:Boolean):Number{ if (_arg1){ return ((((damageBase + numDie) * (1 + (towerLevel / 10))) * (1 + damageAuraValue))); }; return ((((damageBase + (numDie * sidesPerDie)) * (1 + (towerLevel / 10))) * (1 + damageAuraValue))); } public function startDragTower():void{ dragTower = true; mc.addEventListener(Event.ENTER_FRAME, enterFrame_handler); } public function applyTowerAttributes():void{ var _local1:*; var _local2:*; var _local3:*; _local1 = 1; _local2 = 2000; _local3 = 2000; switch (towerName){ case "Chipped Amethyst": damageType = "Amethyst"; cooldownModifier = (0.8 / _local1); damageBase = 8; sidesPerDie = 5; rangeModifier = (1000 / _local2); projectileSpeed = (1200 / _local3); towerAbilities.attacksGround = false; break; case "Chipped Aquamarine": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 5; sidesPerDie = 3; rangeModifier = (350 / _local2); projectileSpeed = (1000 / _local3); break; case "Chipped Diamond": damageType = "Diamond"; cooldownModifier = (0.8 / _local1); damageBase = 7; sidesPerDie = 5; rangeModifier = (500 / _local2); projectileSpeed = (900 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 2; break; case "Chipped Emerald": damageType = "Emerald"; cooldownModifier = (0.8 / _local1); damageBase = 3; sidesPerDie = 4; rangeModifier = (500 / _local2); projectileSpeed = (700 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.15; towerAbilities.poisonSlowDuration = 3000; towerAbilities.poisonDamage = 2; break; case "Chipped Opal": damageType = "Opal"; cooldownModifier = (0.8 / _local1); damageBase = 4; sidesPerDie = 1; rangeModifier = (600 / _local2); projectileSpeed = (600 / _local3); towerAbilities.bonusAura = true; towerAbilities.speedAuraOpalValue = 0.1; towerAbilities.speedAuraOpalRange = 86; break; case "Chipped Ruby": damageType = "Ruby"; cooldownModifier = (1 / _local1); damageBase = 7; sidesPerDie = 2; rangeModifier = (800 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.aoe = true; towerAbilities.aoeRange = 25; break; case "Chipped Sapphire": damageType = "Sapphire"; cooldownModifier = (0.8 / _local1); damageBase = 4; sidesPerDie = 4; rangeModifier = (500 / _local2); projectileSpeed = (1000 / _local3); towerAbilities.iceSlowModifier = 0.2; towerAbilities.iceSlow = true; break; case "Chipped Topaz": damageType = "Topaz"; cooldownModifier = (0.8 / _local1); damageBase = 3; sidesPerDie = 1; rangeModifier = (500 / _local2); projectileSpeed = (900 / _local3); towerAbilities.multiTargets = 3; break; case "Flawed Amethyst": damageType = "Amethyst"; cooldownModifier = (1 / _local1); damageBase = 17; sidesPerDie = 8; rangeModifier = (1125 / _local2); projectileSpeed = (1400 / _local3); towerAbilities.attacksGround = false; break; case "Flawed Aquamarine": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 11; sidesPerDie = 4; rangeModifier = (365 / _local2); projectileSpeed = (1000 / _local3); break; case "Flawed Diamond": damageType = "Diamond"; cooldownModifier = (1 / _local1); damageBase = 15; sidesPerDie = 3; rangeModifier = (550 / _local2); projectileSpeed = (900 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 2; break; case "Flawed Emerald": damageType = "Emerald"; cooldownModifier = (1 / _local1); damageBase = 9; sidesPerDie = 4; rangeModifier = (550 / _local2); projectileSpeed = (750 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.2; towerAbilities.poisonSlowDuration = 4000; towerAbilities.poisonDamage = 3; break; case "Flawed Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 9; sidesPerDie = 1; rangeModifier = (700 / _local2); projectileSpeed = (1200 / _local3); towerAbilities.bonusAura = true; towerAbilities.speedAuraOpalValue = 0.15; towerAbilities.speedAuraOpalRange = 100; break; case "Flawed Ruby": damageType = "Ruby"; cooldownModifier = (1 / _local1); damageBase = 12; sidesPerDie = 4; rangeModifier = (800 / _local2); projectileSpeed = (1400 / _local3); towerAbilities.aoe = true; towerAbilities.aoeRange = 25; break; case "Flawed Sapphire": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 9; sidesPerDie = 4; rangeModifier = (750 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.iceSlowModifier = 0.2; towerAbilities.iceSlow = true; break; case "Flawed Topaz": damageType = "Topaz"; cooldownModifier = (1 / _local1); damageBase = 7; sidesPerDie = 1; rangeModifier = (500 / _local2); projectileSpeed = (900 / _local3); towerAbilities.multiTargets = 3; break; case "Normal Amethyst": damageType = "Amethyst"; cooldownModifier = (1 / _local1); damageBase = 29; sidesPerDie = 11; rangeModifier = (1250 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.attacksGround = false; break; case "Normal Aquamarine": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 23; sidesPerDie = 7; rangeModifier = (380 / _local2); projectileSpeed = (1000 / _local3); break; case "Normal Diamond": damageType = "Diamond"; cooldownModifier = (1 / _local1); damageBase = 29; sidesPerDie = 8; rangeModifier = (600 / _local2); projectileSpeed = (850 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 2; break; case "Normal Emerald": damageType = "Emerald"; cooldownModifier = (1 / _local1); damageBase = 14; sidesPerDie = 11; rangeModifier = (600 / _local2); projectileSpeed = (700 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.25; towerAbilities.poisonSlowDuration = 5000; towerAbilities.poisonDamage = 5; break; case "Normal Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 19; sidesPerDie = 1; rangeModifier = (800 / _local2); projectileSpeed = (1000 / _local3); towerAbilities.bonusAura = true; towerAbilities.speedAuraOpalValue = 0.2; towerAbilities.speedAuraOpalRange = 115; break; case "Normal Ruby": damageType = "Ruby"; cooldownModifier = (1 / _local1); damageBase = 19; sidesPerDie = 6; rangeModifier = (800 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.aoe = true; towerAbilities.aoeRange = 30; break; case "Normal Sapphire": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 15; sidesPerDie = 6; rangeModifier = (800 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.iceSlowModifier = 0.2; towerAbilities.iceSlow = true; break; case "Normal Topaz": damageType = "Topaz"; cooldownModifier = (1 / _local1); damageBase = 13; sidesPerDie = 1; rangeModifier = (500 / _local2); projectileSpeed = (900 / _local3); towerAbilities.multiTargets = 4; break; case "Flawless Amethyst": damageType = "Amethyst"; cooldownModifier = (1 / _local1); damageBase = 59; sidesPerDie = 16; rangeModifier = (1300 / _local2); projectileSpeed = (1800 / _local3); towerAbilities.attacksGround = false; break; case "Flawless Aquamarine": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 47; sidesPerDie = 8; rangeModifier = (400 / _local2); projectileSpeed = (1000 / _local3); break; case "Flawless Diamond": damageType = "Diamond"; cooldownModifier = (1 / _local1); damageBase = 57; sidesPerDie = 8; rangeModifier = (650 / _local2); projectileSpeed = (900 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 2; break; case "Flawless Emerald": damageType = "Emerald"; cooldownModifier = (1 / _local1); damageBase = 29; sidesPerDie = 9; rangeModifier = (700 / _local2); projectileSpeed = (700 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.3; towerAbilities.poisonSlowDuration = 6000; towerAbilities.poisonDamage = 8; break; case "Flawless Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 39; sidesPerDie = 1; rangeModifier = (900 / _local2); projectileSpeed = (900 / _local3); towerAbilities.bonusAura = true; towerAbilities.speedAuraOpalValue = 0.25; towerAbilities.speedAuraOpalRange = 129; break; case "Flawless Ruby": damageType = "Ruby"; cooldownModifier = (1 / _local1); damageBase = 37; sidesPerDie = 8; rangeModifier = (800 / _local2); projectileSpeed = (1600 / _local3); towerAbilities.aoe = true; towerAbilities.aoeRange = 30; break; case "Flawless Sapphire": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 29; sidesPerDie = 11; rangeModifier = (850 / _local2); projectileSpeed = (1200 / _local3); towerAbilities.iceSlowModifier = 0.2; towerAbilities.iceSlow = true; break; case "Flawless Topaz": damageType = "Topaz"; cooldownModifier = (1 / _local1); damageBase = 24; sidesPerDie = 1; rangeModifier = (500 / _local2); projectileSpeed = (900 / _local3); towerAbilities.multiTargets = 4; break; case "Perfect Amethyst": damageType = "Amethyst"; cooldownModifier = (1 / _local1); damageBase = 139; sidesPerDie = 11; rangeModifier = (1500 / _local2); projectileSpeed = (1900 / _local3); towerAbilities.attacksGround = false; break; case "Perfect Aquamarine": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 99; sidesPerDie = 21; rangeModifier = (550 / _local2); projectileSpeed = (1000 / _local3); break; case "Perfect Diamond": damageType = "Diamond"; cooldownModifier = (1 / _local1); damageBase = 139; sidesPerDie = 11; rangeModifier = (750 / _local2); projectileSpeed = (1200 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 2; break; case "Perfect Emerald": damageType = "Emerald"; cooldownModifier = (1 / _local1); damageBase = 79; sidesPerDie = 11; rangeModifier = (900 / _local2); projectileSpeed = (700 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.5; towerAbilities.poisonSlowDuration = 8000; towerAbilities.poisonDamage = 16; break; case "Perfect Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 84; sidesPerDie = 1; rangeModifier = (1000 / _local2); projectileSpeed = (1000 / _local3); towerAbilities.bonusAura = true; towerAbilities.speedAuraOpalValue = 0.35; towerAbilities.speedAuraOpalRange = 143; break; case "Perfect Ruby": damageType = "Ruby"; cooldownModifier = (1 / _local1); damageBase = 79; sidesPerDie = 25; rangeModifier = (900 / _local2); projectileSpeed = (1700 / _local3); towerAbilities.aoe = true; towerAbilities.aoeRange = 30; break; case "Perfect Sapphire": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 59; sidesPerDie = 16; rangeModifier = (1400 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.iceSlowModifier = 0.2; towerAbilities.iceSlow = true; break; case "Perfect Topaz": damageType = "Topaz"; cooldownModifier = (1 / _local1); damageBase = 74; sidesPerDie = 1; rangeModifier = (600 / _local2); projectileSpeed = (900 / _local3); towerAbilities.multiTargets = 5; break; case "Great Amethyst": damageType = "Amethyst"; cooldownModifier = (1 / _local1); damageBase = 349; sidesPerDie = 51; rangeModifier = (1650 / _local2); projectileSpeed = (1900 / _local3); towerAbilities.attacksGround = false; break; case "Great Aquamarine": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 279; sidesPerDie = 1; rangeModifier = (600 / _local2); projectileSpeed = (1000 / _local3); break; case "Great Diamond": damageType = "Diamond"; cooldownModifier = (1 / _local1); damageBase = 299; sidesPerDie = 51; rangeModifier = (850 / _local2); projectileSpeed = (1900 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 5; break; case "Great Emerald": damageType = "Emerald"; cooldownModifier = (1 / _local1); damageBase = 249; sidesPerDie = 1; rangeModifier = (900 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.5; towerAbilities.poisonSlowDuration = 30000; towerAbilities.poisonDamage = 50; break; case "Great Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 179; sidesPerDie = 1; rangeModifier = (1500 / _local2); projectileSpeed = (1200 / _local3); towerAbilities.bonusAura = true; towerAbilities.speedAuraOpalValue = 0.5; towerAbilities.speedAuraOpalRange = 214.5; break; case "Great Ruby": damageType = "Ruby"; cooldownModifier = (0.5 / _local1); damageBase = 139; sidesPerDie = 1; rangeModifier = (900 / _local2); projectileSpeed = (1700 / _local3); towerAbilities.multiTargets = 3; break; case "Great Sapphire": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 199; sidesPerDie = 1; rangeModifier = (2000 / _local2); projectileSpeed = (1900 / _local3); towerAbilities.iceSlowModifier = 0.2; towerAbilities.iceSlow = true; break; case "Great Topaz": damageType = "Topaz"; cooldownModifier = (1 / _local1); damageBase = 249; sidesPerDie = 1; rangeModifier = (700 / _local2); projectileSpeed = (900 / _local3); towerAbilities.multiTargets = 7; break; case "Silver": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 19; sidesPerDie = 2; rangeModifier = (550 / _local2); projectileSpeed = (1800 / _local3); towerAbilities.aoeFreeze = true; towerAbilities.aoeRange = 36; towerAbilities.iceSlowModifier = 0.2; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 25; towerUpgradesTo = "Sterling Silver"; break; case "Sterling Silver": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 39; sidesPerDie = 1; rangeModifier = (650 / _local2); projectileSpeed = (1800 / _local3); towerAbilities.aoeFreeze = true; towerAbilities.aoeRange = 36; towerAbilities.iceSlowModifier = 0.2; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 300; towerUpgradesTo = "Silver Knight"; break; case "Silver Knight": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 149; sidesPerDie = 1; rangeModifier = (750 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.aoeFreeze = true; towerAbilities.aoeRange = 36; towerAbilities.iceSlowModifier = 0.2; towerType = "Special"; towerUpgradable = false; break; case "Malachite": damageType = "Emerald"; cooldownModifier = (0.5 / _local1); damageBase = 5; sidesPerDie = 1; rangeModifier = (750 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.multiTargets = 3; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 25; towerUpgradesTo = "Vivid Malachite"; break; case "Vivid Malachite": damageType = "Emerald"; cooldownModifier = (0.5 / _local1); damageBase = 10; sidesPerDie = 1; rangeModifier = (800 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.multiTargets = 4; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 280; towerUpgradesTo = "Mighty Malachite"; break; case "Mighty Malachite": damageType = "Emerald"; cooldownModifier = (0.55 / _local1); damageBase = 44; sidesPerDie = 1; rangeModifier = (800 / _local2); projectileSpeed = (1300 / _local3); towerAbilities.multiTargets = 10; towerType = "Special"; towerUpgradable = false; break; case "Jade": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 29; sidesPerDie = 6; rangeModifier = (800 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.5; towerAbilities.poisonSlowDuration = 2000; towerAbilities.poisonDamage = 5; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 45; towerUpgradesTo = "Asian Jade"; break; case "Asian Jade": damageType = "Aquamarine"; cooldownModifier = (0.5 / _local1); damageBase = 49; sidesPerDie = 1; rangeModifier = (800 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.5; towerAbilities.poisonSlowDuration = 3000; towerAbilities.poisonDamage = 10; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 250; towerUpgradesTo = "Lucky Asian Jade"; break; case "Lucky Asian Jade": damageType = "Aquamarine"; cooldownModifier = (0.35 / _local1); damageBase = 54; sidesPerDie = 1; rangeModifier = (850 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.poisonSlow = true; towerAbilities.poisonSlowModifier = 0.5; towerAbilities.poisonSlowDuration = 4000; towerAbilities.poisonDamage = 10; towerAbilities.critPossible = true; towerAbilities.critChance = 0.05; towerAbilities.critMultiplier = 4; towerAbilities.stunPossible = true; towerAbilities.stunChance = 0.01; towerAbilities.stunDuration = 2000; towerType = "Special"; towerUpgradable = false; break; case "Star Ruby": damageType = "Ruby"; cooldownModifier = (0.25 / _local1); damageBase = 10; sidesPerDie = 0; rangeModifier = (265 / _local2); projectileSpeed = (700 / _local3); towerAbilities.damageBurn = true; towerType = "Special"; towerUpgradable = true; towerAbilities.multiTargets = 10; towerUpgradeCost = 30; towerUpgradesTo = "Blood Star"; break; case "Blood Star": damageType = "Ruby"; cooldownModifier = (0.25 / _local1); damageBase = 12.5; sidesPerDie = 0; rangeModifier = (500 / _local2); projectileSpeed = (700 / _local3); towerAbilities.damageBurn = true; towerType = "Special"; towerUpgradable = true; towerAbilities.multiTargets = 10; towerUpgradeCost = 290; towerUpgradesTo = "Fire Star"; break; case "Fire Star": damageType = "Ruby"; cooldownModifier = (0.5 / _local1); damageBase = 65; sidesPerDie = 0; rangeModifier = (600 / _local2); projectileSpeed = (700 / _local3); towerAbilities.damageBurn = true; towerType = "Special"; towerUpgradable = false; towerAbilities.multiTargets = 10; break; case "Pink Diamond": damageType = "Diamond"; cooldownModifier = (0.75 / _local1); damageBase = 149; sidesPerDie = 26; rangeModifier = (800 / _local2); projectileSpeed = (1200 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.1; towerAbilities.critMultiplier = 5; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 175; towerUpgradesTo = "Great Pink Diamond"; break; case "Great Pink Diamond": damageType = "Diamond"; cooldownModifier = (0.65 / _local1); damageBase = 174; sidesPerDie = 51; rangeModifier = (850 / _local2); projectileSpeed = (1800 / _local3); towerAbilities.attacksFlying = false; towerAbilities.critPossible = true; towerAbilities.critChance = 0.1; towerAbilities.critMultiplier = 8; towerType = "Special"; towerUpgradable = false; break; case "Dark Emerald": damageType = "Emerald"; cooldownModifier = (0.8 / _local1); damageBase = 89; sidesPerDie = 61; rangeModifier = (550 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.stunPossible = true; towerAbilities.stunChance = 0.125; towerAbilities.stunDuration = 1500; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 250; towerUpgradesTo = "Enchanted Emerald"; break; case "Enchanted Emerald": damageType = "Emerald"; cooldownModifier = (0.7 / _local1); damageBase = 98; sidesPerDie = 51; numDie = 2; rangeModifier = (700 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.critPossible = true; towerAbilities.critChance = 0.15; towerAbilities.critMultiplier = 4; towerAbilities.stunPossible = true; towerAbilities.stunChance = 0.15; towerAbilities.stunDuration = 2000; towerType = "Special"; towerUpgradable = false; break; case "Gold": damageType = "Amethyst"; cooldownModifier = (1 / _local1); damageBase = 159; sidesPerDie = 31; rangeModifier = (800 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.critPossible = true; towerAbilities.critChance = 0.25; towerAbilities.critMultiplier = 2; towerAbilities.armorPenalty = true; towerAbilities.armorPenaltyValue = 5; towerAbilities.armorPenaltyDuration = 5000; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 210; towerUpgradesTo = "Egyptian Gold"; break; case "Egyptian Gold": damageType = "Amethyst"; cooldownModifier = (0.75 / _local1); damageBase = 159; sidesPerDie = 41; rangeModifier = (800 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.critPossible = true; towerAbilities.critChance = 0.3; towerAbilities.critMultiplier = 2; towerAbilities.armorPenalty = true; towerAbilities.armorPenaltyValue = 8; towerAbilities.armorPenaltyDuration = 5000; towerType = "Special"; towerUpgradable = false; break; case "Yellow Sapphire": damageType = "Sapphire"; cooldownModifier = (1 / _local1); damageBase = 99; sidesPerDie = 1; rangeModifier = (800 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.aoeFreeze = true; towerAbilities.aoeRange = 57; towerAbilities.iceSlowModifier = 0.2; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 180; towerUpgradesTo = "Star Yellow Sapphire"; break; case "Star Yellow Sapphire": damageType = "Sapphire"; cooldownModifier = (0.8 / _local1); damageBase = 179; sidesPerDie = 1; rangeModifier = (850 / _local2); projectileSpeed = (1500 / _local3); towerAbilities.aoeFreeze = true; towerAbilities.aoeRange = 57; towerAbilities.iceSlowModifier = 0.2; towerAbilities.bonusAura = true; towerAbilities.damageAuraValue = 0.05; towerAbilities.damageAuraRange = 171; towerType = "Special"; towerUpgradable = false; break; case "Black Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 24; sidesPerDie = 1; rangeModifier = (800 / _local2); projectileSpeed = (800 / _local3); towerAbilities.bonusAura = true; towerAbilities.damageAuraValue = 0.3; towerAbilities.damageAuraRange = 143; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 300; towerUpgradesTo = "Mystic Black Opal"; break; case "Mystic Black Opal": damageType = "Opal"; cooldownModifier = (1 / _local1); damageBase = 49; sidesPerDie = 1; rangeModifier = (1000 / _local2); projectileSpeed = (1000 / _local3); towerAbilities.bonusAura = true; towerAbilities.damageAuraValue = 0.4; towerAbilities.damageAuraRange = 171; towerType = "Special"; towerUpgradable = false; break; case "Red Crystal": damageType = "Amethyst"; cooldownModifier = (0.8 / _local1); damageBase = 49; sidesPerDie = 26; rangeModifier = (1300 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.attacksGround = false; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 100; towerUpgradesTo = "Red Crystal Facet"; proximityAuraTimer = new Timer(200, 0); proximityAuraTimer.addEventListener("timer", proximityAuraTimerHandler); proximityAuraTimer.start(); towerAbilities.proximityAuraFlying = true; towerAbilities.proximityAuraGround = false; towerAbilities.proximityAuraArmorPenalty = 4; towerAbilities.proximityAuraRange = 186; break; case "Red Crystal Facet": damageType = "Amethyst"; cooldownModifier = (0.8 / _local1); damageBase = 74; sidesPerDie = 26; rangeModifier = (1400 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.attacksGround = false; towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 150; towerUpgradesTo = "Rose Quartz Crystal"; towerAbilities.proximityAuraFlying = true; towerAbilities.proximityAuraGround = false; towerAbilities.proximityAuraArmorPenalty = 5; towerAbilities.proximityAuraRange = 200; break; case "Rose Quartz Crystal": damageType = "Amethyst"; cooldownModifier = (0.8 / _local1); damageBase = 99; sidesPerDie = 26; rangeModifier = (1500 / _local2); projectileSpeed = (2000 / _local3); towerAbilities.attacksGround = false; towerType = "Special"; towerAbilities.proximityAuraFlying = true; towerAbilities.proximityAuraGround = false; towerAbilities.proximityAuraArmorPenalty = 6; towerAbilities.proximityAuraRange = 214.6; towerUpgradable = false; break; case "Uranium 238": damageType = "Topaz"; cooldownModifier = (0.25 / _local1); damageBase = 47; sidesPerDie = 0; rangeModifier = (450 / _local2); projectileSpeed = (700 / _local3); towerAbilities.damageBurn = true; towerType = "Special"; towerUpgradable = true; towerAbilities.multiTargets = 10; proximityAuraTimer = new Timer(250, 0); proximityAuraTimer.addEventListener("timer", proximityAuraTimerHandler); proximityAuraTimer.start(); towerAbilities.proximityAuraFlying = true; towerAbilities.proximityAuraGround = true; towerAbilities.proximityAuraSpeedPenalty = 0.5; towerAbilities.proximityAuraRange = 64.35; towerUpgradeCost = 190; towerUpgradesTo = "Uranium 235"; break; case "Uranium 235": damageType = "Topaz"; cooldownModifier = (0.25 / _local1); damageBase = 64; sidesPerDie = 1; rangeModifier = (600 / _local2); projectileSpeed = (700 / _local3); towerAbilities.damageBurn = true; towerType = "Special"; towerUpgradable = false; towerAbilities.multiTargets = 10; towerAbilities.proximityAuraFlying = true; towerAbilities.proximityAuraGround = true; towerAbilities.proximityAuraSpeedPenalty = 0.5; towerAbilities.proximityAuraRange = 64.35; break; case "Blood Stone": damageType = "Ruby"; cooldownModifier = (0.5 / _local1); damageBase = 67; sidesPerDie = 1; rangeModifier = (700 / _local2); projectileSpeed = (1500 / _local3); towerType = "Special"; towerAbilities.aoe = true; towerAbilities.aoeRange = 57; towerAbilities.multiTargets = 10; towerUpgradable = true; towerUpgradeCost = 250; towerUpgradesTo = "Ancient Blood Stone"; break; case "Ancient Blood Stone": damageType = "Ruby"; cooldownModifier = (0.8 / _local1); damageBase = 159; sidesPerDie = 81; rangeModifier = (700 / _local2); projectileSpeed = (1500 / _local3); towerType = "Special"; towerAbilities.critPossible = true; towerAbilities.critChance = 0.15; towerAbilities.critMultiplier = 3; towerAbilities.manaMax = 10; towerAbilities.mana = towerAbilities.manaMax; towerAbilities.manaRegen = 2; manaRegenTimer = new Timer(1000, 0); manaRegenTimer.addEventListener("timer", manaRegenTimerHandler); manaRegenTimer.start(); towerUpgradable = false; break; case "Paraiba Tourmaline": damageType = "Aquamarine"; cooldownModifier = (0.75 / _local1); damageBase = 5; numDie = 5; sidesPerDie = 79; rangeModifier = (850 / _local2); projectileSpeed = (1750 / _local3); towerType = "Special"; towerUpgradable = true; towerUpgradeCost = 350; towerUpgradesTo = "Paraiba Tourmaline Facet"; proximityAuraTimer = new Timer(200, 0); proximityAuraTimer.addEventListener("timer", proximityAuraTimerHandler); proximityAuraTimer.start(); towerAbilities.proximityAuraFlying = false; towerAbilities.proximityAuraGround = true; towerAbilities.proximityAuraArmorPenalty = 4; towerAbilities.proximityAuraRange = 85.8; towerAbilities.manaMax = 10; towerAbilities.mana = towerAbilities.manaMax; towerAbilities.manaRegen = 1.75; towerAbilities.frostnovaDamage = 100; manaRegenTimer = new Timer(1000, 0); manaRegenTimer.addEventListener("timer", manaRegenTimerHandler); manaRegenTimer.start(); break; case "Paraiba Tourmaline Facet": damageType = "Aquamarine"; cooldownModifier = (0.75 / _local1); damageBase = 25; numDie = 5; sidesPerDie = 79; rangeModifier = (875 / _local2); projectileSpeed = (1750 / _local3); towerType = "Special"; towerUpgradable = false; towerAbilities.proximityAuraFlying = false; towerAbilities.proximityAuraGround = true; towerAbilities.proximityAuraArmorPenalty = 6; towerAbilities.proximityAuraRange = 93; towerAbilities.manaMax = 10; towerAbilities.mana = towerAbilities.manaMax; towerAbilities.manaRegen = 2; towerAbilities.frostnovaDamage = 100; break; case "Uber Stone": damageType = "Amethyst"; cooldownModifier = (0.8 / _local1); damageBase = 749; sidesPerDie = 1; rangeModifier = (850 / _local2); projectileSpeed = (900 / _local3); towerType = "Special"; towerUpgradable = false; break; default: trace("Error: No Gem found"); }; addTooltip(); } public function updatefireRate():void{ trace(((fireRate * cooldownModifier) - ((fireRate * cooldownModifier) * speedAuraValue))); myTimer.delay = ((fireRate * cooldownModifier) - ((fireRate * cooldownModifier) * speedAuraValue)); } } }//package gemtd
Section 21
//CreateUI (gemtd.CreateUI) package gemtd { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import flash.net.*; public class CreateUI extends MovieClip { private var easy:MovieClip; public var gameMap:Map; private var loader:URLLoader; private var gemtdRef:Object; private var path:Array; private var repickTowerButton:MovieClip; private var blocking:MovieClip; private var flyingLevel:MovieClip; var spawnY;// = 4 var spawnX;// = 0 private var builtTowerButton:MovieClip; public var npcLivesCostTextBox:TextField; private var currentNumNPC:Number; private var upgradeQualityButton:MovieClip; private var rangeCircle:Sprite; private var removeTowerButton:MovieClip; private var scoreTextbox:TextField; private var downgraded:Boolean; private var gemQualityTextBox:TextField; private var won:MovieClip; private var extreme:MovieClip; private var stageRef:Stage; private var selectedNameTextBox:TextField; public var listTowers:Array; private var repickTimes:Number; private var keepTowerButton:MovieClip; private var combineTowerButton:MovieClip; public var listAidedStartup:Array; public var player:CreatePlayer; private var normal:MovieClip; private var hard:MovieClip; private var damageTextBox:TextField; private var myTimer:Timer; private var userName:TextField; public var npcArmorTypeTextBox:TextField; private var tower:MovieClip; private var select:MovieClip; private var roundStarted:Boolean; private var upgradeCostTextBox:TextField; private var speedTextBox:TextField; private var livesButton:MovieClip; private var aidedStartup:Number; private var lost:MovieClip; private var selectedTower:Object; private var insane:MovieClip; public var listTowersPerLevel:Array; private var buyOneButton:MovieClip; private var flyingPath:Array; private var submitScore:MovieClip; private var shiftPressed:Boolean; public var listNPC:Array; public var npcMinSpeedTextBox:TextField; private var rangeTextBox:TextField; private var numNPC:Number; private var bPressed:Boolean; var maxTowersPerLevel;// = 5 private var combineSpecialTowerButtonA:MovieClip; private var combineSpecialTowerButtonB:MovieClip; var mapHeight;// = 40 public var listRocks:Array; private var buyFiveButton:MovieClip; private var gemTextArea:MovieClip; var mapWidth;// = 40 var tileSize;// = 13 private var lastTowerSelected:Object; private var tooltipTextBox:TextField; private var upgradeTowerButton:MovieClip; private var combineSpecialTowerName:String; private var towerPlacement:Boolean; private var downgradeTowerButton:MovieClip; private var combineNum:Number; private var combineSpecialTowerList:Array; public var timeTextbox:TextField; private var leftEdgeUI:Number; private var cannotBuildThere:MovieClip; public var playerLivesTextbox:TextField; public static var npcArmorTextBox:TextField; public static var lastNPCSelected:Object; private static var numKillsTextBox:TextField; public static var npcHpTextBox:TextField; public static var format:TextFormat; public static var npcSpeedTextBox:TextField; public static var levelTextbox:TextField; public static var goldTextbox:TextField; public function CreateUI(_arg1:Object, _arg2:Stage, _arg3:Map, _arg4:CreatePlayer, _arg5:Array, _arg6:Array, _arg7:Array, _arg8:Number){ spawnX = 0; spawnY = 4; tileSize = 13; mapWidth = 40; mapHeight = 40; maxTowersPerLevel = 5; listRocks = new Array(); listAidedStartup = new Array(); super(); gemtdRef = _arg1; stageRef = _arg2; gameMap = _arg3; player = _arg4; listNPC = _arg5; listTowers = _arg6; listTowersPerLevel = _arg7; leftEdgeUI = _arg8; towerPlacement = true; numNPC = 10; currentNumNPC = 0; downgraded = false; roundStarted = false; shiftPressed = false; bPressed = false; aidedStartup = 0; lastNPCSelected = null; repickTimes = 0; drawDifficultyLevelButtons(); livesButton = new Lives(); livesButton.x = 198; livesButton.y = -18; this.addChild(livesButton); } public function drawChances():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; if (this.contains(gemQualityTextBox)){ this.removeChild(gemQualityTextBox); }; _local1 = 20; _local2 = 30; _local3 = (20 + (30 * player.getQualityLevel())); _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; switch (player.getQualityLevel()){ case 0: _local4 = 100; break; case 1: _local4 = 70; _local5 = 30; break; case 2: _local4 = 60; _local5 = 30; _local6 = 10; break; case 3: _local4 = 50; _local5 = 30; _local6 = 20; break; case 4: _local4 = 40; _local5 = 30; _local6 = 20; _local7 = 10; break; case 5: _local4 = 30; _local5 = 30; _local6 = 30; _local7 = 10; break; case 6: _local4 = 20; _local5 = 30; _local6 = 30; _local7 = 20; break; case 7: _local4 = 10; _local5 = 30; _local6 = 30; _local7 = 30; break; case 8: _local5 = 30; _local6 = 30; _local7 = 30; _local8 = 10; break; }; gemQualityTextBox.text = ((((((((((("Increases the chance to get better gems\n\nChipped: " + _local4) + "%\nFlawed: ") + _local5) + "%\nNormal: ") + _local6) + "%\nFlawless: ") + _local7) + "%\nPerfect: ") + _local8) + "%\n\nCost to Upgrade: ") + _local3); this.addChild(gemQualityTextBox); } public function updateLivesText(_arg1:String):void{ playerLivesTextbox.text = String(_arg1); } public function towerPlaceHandler(_arg1:MouseEvent):void{ var _local2:Boolean; var _local3:Number; var _local4:String; var _local5:*; _local2 = false; tower.stopDragTower(); _local2 = tower.placeTower(); trace(("Tower place: " + _local2)); if (_local2){ if ((((player.getGameLevel() == 0)) && ((aidedStartup > 0)))){ if (listAidedStartup.length > 0){ _local3 = Math.floor((Math.random() * listAidedStartup.length)); _local4 = listAidedStartup[_local3]; tower.changeTower(("Chipped " + _local4)); listAidedStartup.splice(listAidedStartup.indexOf(listAidedStartup[_local3]), 1); }; }; listTowersPerLevel.push(tower); tower.removeEventListener(MouseEvent.CLICK, towerPlaceHandler); tower.addEventListener(MouseEvent.CLICK, mouseClickTowerHandler); if (lastTowerSelected == null){ tower.towerSelected = true; lastTowerSelected = tower; drawTowerUI(tower); trace("lastTowerSelected null"); } else { lastTowerSelected.removeSelectTower(); tower.towerSelected = true; lastTowerSelected.towerSelected = false; lastTowerSelected = tower; drawTowerUI(tower); trace("lastTowerSelected not null"); }; tower.addTowerPlaced(); tower.addSelectTower(); if (((!(roundStarted)) && ((listTowersPerLevel.length < maxTowersPerLevel)))){ tower = new CreateTower(this, stageRef.mouseX, (stageRef.mouseY - 20), listNPC, gameMap, player); this.addChild(tower); tower.addEventListener(MouseEvent.CLICK, towerPlaceHandler); tower.startDragTower(); }; } else { trace("Clear selected tower"); _local5 = 0; while (_local5 < listTowersPerLevel.length) { listTowersPerLevel[_local5].towerSelected = false; listTowersPerLevel[_local5].removeSelectTower(); _local5++; }; bPressed = false; }; } public function repickTowermouseOut_handler(_arg1:MouseEvent):void{ if (this.contains(gemTextArea)){ this.removeChild(gemTextArea); }; if (this.contains(gemQualityTextBox)){ this.removeChild(gemQualityTextBox); }; } public function towerHoverHandler(_arg1:MouseEvent):void{ if (((!(roundStarted)) && ((listTowersPerLevel.length < maxTowersPerLevel)))){ tower = new CreateTower(this, stageRef.mouseX, (stageRef.mouseY - 20), listNPC, gameMap, player); this.addChild(tower); tower.addEventListener(MouseEvent.CLICK, towerPlaceHandler); tower.startDragTower(); bPressed = true; }; } public function removeUI():void{ if (myTimer != null){ myTimer.stop(); myTimer.removeEventListener("timer", timerHandler); }; this.removeEventListener(Event.ENTER_FRAME, enterFrame_handler); } public function mouseOver_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(2); } public function mouseDown_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(3); } public function onTick_handler(_arg1:TimerEvent):void{ timeTextbox.text = String(player.gameTimer.currentCount); } public function mouseUp_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(2); } public function timerHandler(_arg1:TimerEvent):void{ var _local2:MovieClip; _local2 = new CreateNPC(this, player, listNPC, path, (spawnX * tileSize), (spawnY * tileSize), 3, tileSize); _local2.addEventListener(MouseEvent.CLICK, npcSelectHandler); listNPC.push(_local2); this.addChild(_local2); currentNumNPC++; if (currentNumNPC == numNPC){ this.addEventListener(Event.ENTER_FRAME, enterFrame_handler); currentNumNPC = 0; }; } public function startLevel():void{ var _local1:Number; var _local2:Boolean; var _local3:*; var _local4:*; player.addGameLevel(1); updateLevelText(String(player.getGameLevel())); if (this.contains(repickTowerButton)){ this.removeChild(repickTowerButton); }; if ((player.getGameLevel() % 4) == 0){ path = flyingPath; this.addChild(flyingLevel); } else { determinePath(); }; _local2 = false; _local3 = 0; while (_local3 < listTowers.length) { if (listTowers[_local3].towerType != "Special"){ if (checkListForCombo(listTowers[_local3].towerName, false)){ _local2 = true; _local1 = _local3; }; }; listTowers[_local3].removeTowerPlaced(); _local3++; }; _local4 = 0; while (_local4 < listRocks.length) { listRocks[_local4].removeTowerPlaced(); _local4++; }; if (_local2){ }; myTimer = new Timer(1000, numNPC); myTimer.addEventListener("timer", timerHandler); myTimer.start(); player.gameTimer.start(); roundStarted = true; } public function buyFiveButtonHandler(_arg1:MouseEvent):void{ if ((((player.getGold() >= 50)) && ((player.getLives() <= 45)))){ player.addGold(-50); goldTextbox.text = String(player.getGold()); player.addLives(5); playerLivesTextbox.text = String(player.getLives()); }; } public function drawRangeCheck(_arg1:Object):void{ var _local2:Number; _local2 = Math.floor(_arg1.range); if (_arg1.towerName != "Rock"){ rangeCircle.graphics.lineStyle(1, 2463191); rangeCircle.graphics.drawCircle(_arg1.getCenterX(), _arg1.getCenterY(), _local2); this.addChild(rangeCircle); }; } public function upgradeTowerButtonHandler(_arg1:MouseEvent):void{ if (selectedTower.towerUpgradeCost <= player.getGold()){ player.addGold((-1 * selectedTower.towerUpgradeCost)); goldTextbox.text = String(player.getGold()); selectedTower.towerName = selectedTower.towerUpgradesTo; selectedTower.changeTower(selectedTower.towerName); removeDisplayObject(upgradeTowerButton, MouseEvent.CLICK, upgradeTowerButtonHandler); checkAuras(); drawTowerUI(selectedTower); }; } public function repickTowermouseOver_handler(_arg1:MouseEvent):void{ removeUIObjects(); removeTowerStats(); if (lastTowerSelected != null){ lastTowerSelected.removeSelectTower(); lastTowerSelected.towerSelected = false; lastTowerSelected = null; }; this.addChild(gemTextArea); gemQualityTextBox.text = (("Trade gold to repick all 5 gems.\n\nPrice: " + ((repickTimes + 1) * 25)) + "\n\nThe repick price increases each time it is used."); this.addChild(gemQualityTextBox); } public function checkListForCombo(_arg1:String, _arg2:Boolean):Boolean{ var _local3:Boolean; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:Array; var _local15:Array; var _local16:Array; _local3 = false; _local4 = new Array("Perfect Opal", "Flawless Diamond", "Normal Aquamarine"); _local5 = new Array("Perfect Ruby", "Flawless Aquamarine", "Normal Amethyst"); _local6 = new Array("Perfect Emerald", "Flawless Sapphire", "Flawed Topaz"); _local7 = new Array("Perfect Amethyst", "Flawless Amethyst", "Flawed Diamond"); _local8 = new Array("Normal Emerald", "Normal Opal", "Flawed Sapphire"); _local9 = new Array("Chipped Opal", "Chipped Emerald", "Chipped Aquamarine"); _local10 = new Array("Perfect Aquamarine", "Flawless Opal", "Flawed Emerald", "Flawed Aquamarine"); _local11 = new Array("Perfect Diamond", "Normal Topaz", "Normal Diamond"); _local12 = new Array("Flawless Emerald", "Normal Ruby", "Flawed Amethyst"); _local13 = new Array("Chipped Diamond", "Chipped Topaz", "Chipped Sapphire"); _local14 = new Array("Chipped Ruby", "Flawed Ruby", "Chipped Amethyst"); _local15 = new Array("Perfect Topaz", "Flawed Opal", "Normal Sapphire"); _local16 = new Array("Perfect Sapphire", "Flawless Topaz", "Flawless Ruby"); if (checkForCombo(_local4, _arg1, _arg2)){ combineSpecialTowerName = "Black Opal"; _local3 = true; } else { if (checkForCombo(_local5, _arg1, _arg2)){ combineSpecialTowerName = "Blood Stone"; _local3 = true; } else { if (checkForCombo(_local6, _arg1, _arg2)){ combineSpecialTowerName = "Dark Emerald"; _local3 = true; } else { if (checkForCombo(_local7, _arg1, _arg2)){ combineSpecialTowerName = "Gold"; _local3 = true; } else { if (checkForCombo(_local8, _arg1, _arg2)){ combineSpecialTowerName = "Jade"; _local3 = true; } else { if (checkForCombo(_local9, _arg1, _arg2)){ combineSpecialTowerName = "Malachite"; _local3 = true; } else { if (checkForCombo(_local10, _arg1, _arg2)){ combineSpecialTowerName = "Paraiba Tourmaline"; _local3 = true; } else { if (checkForCombo(_local11, _arg1, _arg2)){ combineSpecialTowerName = "Pink Diamond"; _local3 = true; } else { if (checkForCombo(_local12, _arg1, _arg2)){ combineSpecialTowerName = "Red Crystal"; _local3 = true; } else { if (checkForCombo(_local13, _arg1, _arg2)){ combineSpecialTowerName = "Silver"; _local3 = true; } else { if (checkForCombo(_local14, _arg1, _arg2)){ combineSpecialTowerName = "Star Ruby"; _local3 = true; } else { if (checkForCombo(_local15, _arg1, _arg2)){ combineSpecialTowerName = "Uranium 238"; _local3 = true; } else { if (checkForCombo(_local16, _arg1, _arg2)){ combineSpecialTowerName = "Yellow Sapphire"; _local3 = true; } else { _local3 = false; }; }; }; }; }; }; }; }; }; }; }; }; }; return (_local3); } public function removeDisplayObject(_arg1:MovieClip, _arg2:String, _arg3:Function){ if (_arg1 != null){ if (this.contains(_arg1)){ _arg1.removeEventListener(_arg2, _arg3); this.removeChild(_arg1); _arg1 = null; }; }; } public function enterFrame_handler(_arg1:Event):void{ var _local2:*; var _local3:*; var _local4:*; if ((((listNPC.length == 0)) && ((player.getLives() > 0)))){ player.gameTimer.stop(); player.updateScore(); scoreTextbox.text = String(player.getScore().toFixed(0)); if ((((player.getGameLevel() > 40)) && (!((player.difficulty == "Insane"))))){ UIReset(); if (builtTowerButton != null){ if (this.contains(builtTowerButton)){ this.removeChild(builtTowerButton); }; }; won = new Won(); won.x = ((stageRef.width / 2) - (won.width / 2)); won.y = (((stageRef.height / 2) - (won.height / 2)) - 100); this.addChild(won); _local2 = new TextFormat(); _local2.font = "Verdana"; _local2.size = 14; _local2.bold = true; _local2.color = 0; _local3 = new TextField(); _local3.defaultTextFormat = _local2; _local3.selectable = false; _local3.text = "Name: "; _local3.autoSize = TextFieldAutoSize.LEFT; _local3.x = (((stageRef.width / 2) - _local3.width) - 22); _local3.y = (225 + 110); this.addChild(_local3); _local4 = new TextField(); _local4.defaultTextFormat = _local2; _local4.selectable = false; _local4.text = ("Score: " + Math.floor(player.getScore())); _local4.x = _local3.x; _local4.y = (225 + 80); _local4.width = 200; this.addChild(_local4); userName = new TextField(); userName.type = TextFieldType.INPUT; userName.background = true; userName.border = true; userName.x = ((stageRef.width / 2) - 22); userName.y = (225 + 110); userName.height = _local3.height; userName.defaultTextFormat = _local2; userName.restrict = "a-zA-Z 0-9"; this.addChild(userName); submitScore = new SubmitScore(); submitScore.x = ((stageRef.width / 2) - (submitScore.width / 2)); submitScore.y = (225 + 140); this.addChild(submitScore); addButtonMouseEvents(submitScore); submitScore.addEventListener(MouseEvent.CLICK, submitScoreHandler); } else { if (this.contains(flyingLevel)){ this.removeChild(flyingLevel); }; listTowersPerLevel.length = 0; towerPlacement = true; downgraded = false; player.addGold((5 + (player.getGameLevel() * 2))); updateGoldText(String(player.getGold())); this.addChild(builtTowerButton); bPressed = false; }; roundStarted = false; if (downgradeTowerButton != null){ if (this.contains(downgradeTowerButton)){ this.removeChild(downgradeTowerButton); }; }; this.removeEventListener(Event.ENTER_FRAME, enterFrame_handler); }; } public function submitScoreHandler(_arg1:MouseEvent):void{ var _local2:String; var _local3:String; if (this.contains(submitScore)){ this.removeChild(submitScore); }; _local2 = player.difficulty; if (player.difficulty == "Insane"){ _local2 = "Survival"; }; _local3 = (((((((((((("username=" + userName.text) + "&score=") + String(Math.round(player.getScore()))) + "&levelscore=") + String(Math.round(player.getLevelScore()))) + "&diff=") + _local2) + "&timescore=") + String(Math.round(player.getTimeScore()))) + "&numtime=") + String(player.gameTimer.currentCount)) + "&key=noghxll"); trace(_local3); gemtdRef.resetGame(); } public function upgradeQualitymouseOut_handler(_arg1:MouseEvent):void{ if (this.contains(gemTextArea)){ this.removeChild(gemTextArea); }; if (this.contains(gemQualityTextBox)){ this.removeChild(gemQualityTextBox); }; } public function removeTowerStats():void{ if (this.contains(selectedNameTextBox)){ this.removeChild(selectedNameTextBox); }; if (this.contains(damageTextBox)){ this.removeChild(damageTextBox); }; if (this.contains(speedTextBox)){ this.removeChild(speedTextBox); }; if (this.contains(rangeTextBox)){ this.removeChild(rangeTextBox); }; if (this.contains(numKillsTextBox)){ this.removeChild(numKillsTextBox); }; if (this.contains(tooltipTextBox)){ this.removeChild(tooltipTextBox); }; if (this.contains(gemTextArea)){ this.removeChild(gemTextArea); }; if (this.contains(npcHpTextBox)){ this.removeChild(npcHpTextBox); }; if (this.contains(npcSpeedTextBox)){ this.removeChild(npcSpeedTextBox); }; if (this.contains(npcArmorTextBox)){ this.removeChild(npcArmorTextBox); }; if (this.contains(npcArmorTypeTextBox)){ this.removeChild(npcArmorTypeTextBox); }; if (this.contains(npcMinSpeedTextBox)){ this.removeChild(npcMinSpeedTextBox); }; if (this.contains(npcLivesCostTextBox)){ this.removeChild(npcLivesCostTextBox); }; if (this.contains(upgradeCostTextBox)){ this.removeChild(upgradeCostTextBox); }; if (this.contains(rangeCircle)){ trace("test"); rangeCircle.graphics.clear(); this.removeChild(rangeCircle); }; } public function errorMsgHandler(_arg1:MouseEvent):void{ blocking.removeEventListener(MouseEvent.CLICK, errorMsgHandler); cannotBuildThere.removeEventListener(MouseEvent.CLICK, errorMsgHandler); if (this.contains(blocking)){ this.removeChild(blocking); }; if (this.contains(cannotBuildThere)){ this.removeChild(cannotBuildThere); }; } public function removeTowerButtonHandler(_arg1:MouseEvent):void{ var _local2:*; _local2 = 0; while (_local2 < listRocks.length) { if (listRocks[_local2].towerSelected){ listRocks[_local2].towerSelected = false; listRocks[_local2].removeTower(); listRocks[_local2].removeSelectTower(); }; _local2++; }; if (this.contains(removeTowerButton)){ removeTowerButton.removeEventListener(MouseEvent.CLICK, removeTowerButtonHandler); this.removeChild(removeTowerButton); }; } public function repickTowerHandler(_arg1:MouseEvent):void{ var _local2:*; if (player.getGold() >= ((repickTimes + 1) * 25)){ player.addGold(((-1 * (repickTimes + 1)) * 25)); goldTextbox.text = String(player.getGold()); repickTimes++; _local2 = 0; while (_local2 < listTowersPerLevel.length) { listTowersPerLevel[_local2].towerSelected = false; listTowersPerLevel[_local2].removeSelectTower(); listTowersPerLevel[_local2].removeTowerPlaced(); listTowersPerLevel[_local2].removeTower(); listTowersPerLevel[_local2].towerQuality = 0; listTowersPerLevel[_local2].removeTimers(); _local2++; }; listTowersPerLevel.length = 0; this.addChild(builtTowerButton); builtTowerButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); if (this.contains(repickTowerButton)){ this.removeChild(repickTowerButton); }; }; } public function EventKeyUp(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 16){ shiftPressed = false; }; } public function startGameUI():void{ var _local1:TextFormat; var _local2:Number; var _local3:Number; determinePath(); flyingPath = path; select = new Select(); player.gameTimer = new Timer(1000); player.gameTimer.addEventListener(TimerEvent.TIMER, onTick_handler); format = new TextFormat(); format.font = "Arial Black"; format.size = 12; format.color = 0xFFFFFF; goldTextbox = new TextField(); goldTextbox.selectable = false; goldTextbox.width = 100; goldTextbox.height = 25; goldTextbox.x = 346; goldTextbox.y = -22; goldTextbox.defaultTextFormat = format; goldTextbox.text = String(player.getGold()); this.addChild(goldTextbox); playerLivesTextbox = new TextField(); playerLivesTextbox.selectable = false; playerLivesTextbox.width = 100; playerLivesTextbox.height = 25; playerLivesTextbox.x = 246; playerLivesTextbox.y = -22; playerLivesTextbox.defaultTextFormat = format; playerLivesTextbox.text = String(player.getLives()); this.addChild(playerLivesTextbox); levelTextbox = new TextField(); levelTextbox.selectable = false; levelTextbox.width = 40; levelTextbox.height = 25; levelTextbox.x = 148; levelTextbox.y = -22; levelTextbox.defaultTextFormat = format; levelTextbox.text = String(player.getGameLevel()); this.addChild(levelTextbox); timeTextbox = new TextField(); timeTextbox.selectable = false; timeTextbox.width = 100; timeTextbox.height = 25; timeTextbox.x = 452; timeTextbox.y = -22; timeTextbox.defaultTextFormat = format; timeTextbox.text = String(player.gameTimer.currentCount); this.addChild(timeTextbox); scoreTextbox = new TextField(); scoreTextbox.selectable = false; scoreTextbox.width = 100; scoreTextbox.height = 25; scoreTextbox.x = 570; scoreTextbox.y = -22; scoreTextbox.defaultTextFormat = format; scoreTextbox.text = String(player.getScore()); this.addChild(scoreTextbox); upgradeQualityButton = new UpgradeQuality(); upgradeQualityButton.x = 540; upgradeQualityButton.y = 110; this.addChild(upgradeQualityButton); addButtonMouseEvents(upgradeQualityButton); upgradeQualityButton.addEventListener(MouseEvent.MOUSE_OVER, upgradeQualitymouseOver_handler); upgradeQualityButton.addEventListener(MouseEvent.MOUSE_OUT, upgradeQualitymouseOut_handler); upgradeQualityButton.addEventListener(MouseEvent.CLICK, upgradeQualityButton_handler); _local1 = new TextFormat(); _local1.font = "Verdana"; _local1.size = 11; _local1.bold = true; _local1.color = 0; _local2 = 538; _local3 = 160; selectedNameTextBox = new TextField(); selectedNameTextBox.selectable = false; selectedNameTextBox.width = 150; selectedNameTextBox.height = 25; selectedNameTextBox.x = _local2; selectedNameTextBox.y = _local3; selectedNameTextBox.defaultTextFormat = _local1; damageTextBox = new TextField(); damageTextBox.selectable = false; damageTextBox.width = 150; damageTextBox.height = 25; damageTextBox.x = _local2; damageTextBox.y = (_local3 + 20); damageTextBox.defaultTextFormat = _local1; speedTextBox = new TextField(); speedTextBox.selectable = false; speedTextBox.width = 150; speedTextBox.height = 25; speedTextBox.x = _local2; speedTextBox.y = (_local3 + 40); speedTextBox.defaultTextFormat = _local1; rangeTextBox = new TextField(); rangeTextBox.selectable = false; rangeTextBox.width = 150; rangeTextBox.height = 25; rangeTextBox.x = _local2; rangeTextBox.y = (_local3 + 60); rangeTextBox.defaultTextFormat = _local1; numKillsTextBox = new TextField(); numKillsTextBox.selectable = false; numKillsTextBox.width = 150; numKillsTextBox.height = 25; numKillsTextBox.x = _local2; numKillsTextBox.y = (_local3 + 80); numKillsTextBox.defaultTextFormat = _local1; upgradeCostTextBox = new TextField(); upgradeCostTextBox.selectable = false; upgradeCostTextBox.width = 150; upgradeCostTextBox.height = 25; upgradeCostTextBox.x = _local2; upgradeCostTextBox.y = (_local3 + 100); upgradeCostTextBox.defaultTextFormat = _local1; tooltipTextBox = new TextField(); tooltipTextBox.selectable = false; tooltipTextBox.width = 150; tooltipTextBox.height = 100; tooltipTextBox.x = _local2; tooltipTextBox.y = (_local3 + 117); tooltipTextBox.defaultTextFormat = _local1; tooltipTextBox.multiline = true; tooltipTextBox.wordWrap = true; gemQualityTextBox = new TextField(); gemQualityTextBox.selectable = false; gemQualityTextBox.width = 150; gemQualityTextBox.height = 200; gemQualityTextBox.x = _local2; gemQualityTextBox.y = 170; gemQualityTextBox.defaultTextFormat = _local1; gemQualityTextBox.multiline = true; gemQualityTextBox.wordWrap = true; npcHpTextBox = new TextField(); npcHpTextBox.selectable = false; npcHpTextBox.width = 150; npcHpTextBox.height = 25; npcHpTextBox.x = _local2; npcHpTextBox.y = 190; npcHpTextBox.defaultTextFormat = _local1; npcSpeedTextBox = new TextField(); npcSpeedTextBox.selectable = false; npcSpeedTextBox.width = 150; npcSpeedTextBox.height = 25; npcSpeedTextBox.x = _local2; npcSpeedTextBox.y = 210; npcSpeedTextBox.defaultTextFormat = _local1; npcArmorTextBox = new TextField(); npcArmorTextBox.selectable = false; npcArmorTextBox.width = 150; npcArmorTextBox.height = 25; npcArmorTextBox.x = _local2; npcArmorTextBox.y = 230; npcArmorTextBox.defaultTextFormat = _local1; npcArmorTypeTextBox = new TextField(); npcArmorTypeTextBox.selectable = false; npcArmorTypeTextBox.width = 150; npcArmorTypeTextBox.height = 25; npcArmorTypeTextBox.x = _local2; npcArmorTypeTextBox.y = 250; npcArmorTypeTextBox.defaultTextFormat = _local1; npcMinSpeedTextBox = new TextField(); npcMinSpeedTextBox.selectable = false; npcMinSpeedTextBox.width = 150; npcMinSpeedTextBox.height = 25; npcMinSpeedTextBox.x = _local2; npcMinSpeedTextBox.y = 270; npcMinSpeedTextBox.defaultTextFormat = _local1; npcLivesCostTextBox = new TextField(); npcLivesCostTextBox.selectable = false; npcLivesCostTextBox.width = 150; npcLivesCostTextBox.height = 25; npcLivesCostTextBox.x = _local2; npcLivesCostTextBox.y = 290; npcLivesCostTextBox.defaultTextFormat = _local1; gemTextArea = new GemTextArea(); gemTextArea.x = 529; gemTextArea.y = 157; blocking = new Blocking(); blocking.x = ((stageRef.width / 2) - (blocking.width / 2)); blocking.y = (((stageRef.height / 2) - (blocking.height / 2)) - 20); cannotBuildThere = new CannotBuildThere(); cannotBuildThere.x = ((stageRef.width / 2) - (cannotBuildThere.width / 2)); cannotBuildThere.y = (((stageRef.height / 2) - (cannotBuildThere.height / 2)) - 20); builtTowerButton = new BuildTower(); builtTowerButton.x = 540; builtTowerButton.y = 65; addButtonMouseEvents(builtTowerButton); builtTowerButton.addEventListener(MouseEvent.CLICK, towerHoverHandler); this.addChild(builtTowerButton); repickTowerButton = new RepickGems(); repickTowerButton.x = 540; repickTowerButton.y = 65; addButtonMouseEvents(repickTowerButton); repickTowerButton.addEventListener(MouseEvent.MOUSE_OVER, repickTowermouseOver_handler); repickTowerButton.addEventListener(MouseEvent.MOUSE_OUT, repickTowermouseOut_handler); repickTowerButton.addEventListener(MouseEvent.CLICK, repickTowerHandler); livesButton.addEventListener(MouseEvent.MOUSE_OVER, livesmouseOver_handler); addButtonMouseEvents(livesButton); buyOneButton = new BuyOne(); buyOneButton.x = 540; buyOneButton.y = 376; addButtonMouseEvents(buyOneButton); buyFiveButton = new BuyFive(); buyFiveButton.x = 540; buyFiveButton.y = 420; addButtonMouseEvents(buyFiveButton); flyingLevel = new FlyingLevel(); flyingLevel.x = 5; flyingLevel.y = 8; rangeCircle = new Sprite(); stage.addEventListener(KeyboardEvent.KEY_DOWN, EventKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, EventKeyUp); } public function addButtonMouseEvents(_arg1:MovieClip):void{ _arg1.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_handler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_handler); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_handler); _arg1.addEventListener(MouseEvent.MOUSE_UP, mouseUp_handler); } public function UIReset():void{ while (this.numChildren > 0) { this.removeChildAt((this.numChildren - 1)); }; } public function drawDifficultyLevelButtons():void{ var _local1:Number; var _local2:Number; easy = new Easy(); normal = new Normal(); hard = new Hard(); extreme = new Extreme(); insane = new Insane(); _local1 = ((stageRef.stageWidth / 2) - (easy.width / 2)); _local2 = 140; easy.x = (normal.x = (hard.x = (extreme.x = (insane.x = _local1)))); easy.y = _local2; normal.y = (_local2 + 45); hard.y = (_local2 + 90); extreme.y = (_local2 + 135); insane.y = (_local2 + 180); easy.addEventListener(MouseEvent.CLICK, difficultyButton_handler); normal.addEventListener(MouseEvent.CLICK, difficultyButton_handler); hard.addEventListener(MouseEvent.CLICK, difficultyButton_handler); extreme.addEventListener(MouseEvent.CLICK, difficultyButton_handler); insane.addEventListener(MouseEvent.CLICK, difficultyButton_handler); addButtonMouseEvents(easy); addButtonMouseEvents(normal); addButtonMouseEvents(hard); addButtonMouseEvents(extreme); addButtonMouseEvents(insane); this.addChild(easy); this.addChild(normal); this.addChild(hard); this.addChild(extreme); this.addChild(insane); } public function downgradeTowerHandler(_arg1:MouseEvent):void{ selectedTower.decreaseQuality(); selectedTower.changeTower(selectedTower.towerName); checkAuras(); drawTowerUI(selectedTower); downgraded = true; removeDisplayObject(downgradeTowerButton, MouseEvent.CLICK, downgradeTowerHandler); } public function determinePath(){ var _local1:Array; var _local2:Array; var _local3:Array; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:Array; path = new Array(); _local1 = new Array(); _local2 = new Array(); _local3 = new Array(); _local4 = new Array(); _local5 = new Array(); _local6 = new Array(); _local7 = new Array(); _local8 = new Array(); _local1 = gameMap.findPath(0, 4, 8, 4); _local2 = gameMap.findPath(8, 4, 7, 22); _local3 = gameMap.findPath(7, 22, 32, 22); _local4 = gameMap.findPath(32, 22, 32, 4); _local5 = gameMap.findPath(32, 4, 19, 4); _local6 = gameMap.findPath(19, 4, 19, 34); _local7 = gameMap.findPath(19, 34, 39, 34); path = path.concat(_local1); path = path.concat(_local2); path = path.concat(_local3); path = path.concat(_local4); path = path.concat(_local5); path = path.concat(_local6); path = path.concat(_local7); } public function checkAuras():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Boolean; var _local6:*; var _local7:*; var _local8:*; _local6 = 0; while (_local6 < listTowers.length) { listTowers[_local6].updatefireRate(); _local6++; }; _local7 = 0; while (_local7 < listTowers.length) { trace(("ListTowers -CheckAuras: " + listTowers[_local7].towerName)); listTowers[_local7].speedAuraValue = 0; listTowers[_local7].damageAuraValue = 0; if (listTowers[_local7].towerAbilities.bonusAura){ if (listTowers[_local7].towerAbilities.speedAuraOpalValue > 0){ _local3 = listTowers[_local7].towerAbilities.speedAuraOpalValue; _local4 = listTowers[_local7].towerAbilities.speedAuraOpalRange; _local5 = true; } else { _local3 = listTowers[_local7].towerAbilities.damageAuraValue; _local4 = listTowers[_local7].towerAbilities.damageAuraRange; _local5 = false; }; _local8 = 0; while (_local8 < listTowers.length) { _local1 = (listTowers[_local7].getCenterX() - listTowers[_local8].getCenterX()); _local2 = (listTowers[_local7].getCenterY() - listTowers[_local8].getCenterY()); if (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))) <= _local4){ if (_local5){ if (listTowers[_local8].speedAuraValue < _local3){ listTowers[_local8].speedAuraValue = _local3; listTowers[_local8].updatefireRate(); trace(((listTowers[_local8].towerName + " ") + listTowers[_local8].speedAuraValue)); }; } else { if (listTowers[_local8].damageAuraValue < _local3){ listTowers[_local8].damageAuraValue = _local3; }; }; }; _local8++; }; }; _local7++; }; } public function upgradeQualitymouseOver_handler(_arg1:MouseEvent):void{ removeUIObjects(); removeTowerStats(); if (lastTowerSelected != null){ lastTowerSelected.removeSelectTower(); lastTowerSelected.towerSelected = false; lastTowerSelected = null; }; this.addChild(gemTextArea); drawChances(); } public function combineSpecialButtonHandler(_arg1:MouseEvent):void{ var _local2:*; var _local3:*; _local2 = 0; while (_local2 < combineSpecialTowerList.length) { if (combineSpecialTowerList[_local2] != selectedTower){ combineSpecialTowerList[_local2].changeTower("Rock"); listRocks.push(combineSpecialTowerList[_local2]); listTowers.splice(listTowers.indexOf(combineSpecialTowerList[_local2]), 1); }; _local2++; }; selectedTower.towerName = combineSpecialTowerName; selectedTower.changeTower(selectedTower.towerName); _local3 = 0; while (_local3 < listTowers.length) { trace(("listTowers: " + listTowers[_local3].towerName)); _local3++; }; checkAuras(); removeDisplayObject(combineSpecialTowerButtonB, MouseEvent.CLICK, combineSpecialButtonHandler); drawTowerUI(selectedTower); } public function checkForCombo(_arg1:Array, _arg2:String, _arg3:Boolean):Boolean{ var _local4:Number; var _local5:Number; var _local6:Boolean; var _local7:*; var _local8:*; var _local9:*; var _local10:*; _local4 = 0; _local5 = _arg1.length; _local6 = false; if (_arg1.indexOf(_arg2) >= 0){ _local6 = true; }; if (_arg3){ _local7 = 0; while (_local7 < listTowersPerLevel.length) { _local8 = 0; while (_local8 < _arg1.length) { if (listTowersPerLevel[_local7].towerName == _arg1[_local8]){ _local4++; _arg1.splice(_local8, 1); }; _local8++; }; _local7++; }; if ((((_local4 == _local5)) && (_local6))){ return (true); }; return (false); //unresolved jump }; combineSpecialTowerList = new Array(); _local9 = 0; while (_local9 < listTowers.length) { _local10 = 0; while (_local10 < _arg1.length) { if (listTowers[_local9].towerName == _arg1[_local10]){ _local4++; combineSpecialTowerList.push(listTowers[_local9]); _arg1.splice(_local10, 1); }; _local10++; }; _local9++; }; if ((((_local4 == _local5)) && (_local6))){ return (true); }; return (false); } public function drawTowerStats(_arg1:Object):void{ var _local2:TextFormat; removeTowerStats(); _local2 = new TextFormat(); _local2.font = "Verdana"; _local2.size = 11; _local2.bold = true; switch (_arg1.damageType){ case "Amethyst": _local2.color = 14100364; break; case "Aquamarine": _local2.color = 2276039; break; case "Diamond": _local2.color = 0x9B9B9B; break; case "Emerald": _local2.color = 6015777; break; case "Opal": _local2.color = 2276039; break; case "Ruby": _local2.color = 13247526; break; case "Sapphire": _local2.color = 2504922; break; case "Topaz": _local2.color = 14072362; break; default: _local2.color = 0; }; selectedNameTextBox.text = _arg1.towerName; damageTextBox.text = "Damage: "; damageTextBox.setTextFormat(_local2, 7); damageTextBox.appendText(((_arg1.getDamageRange(true).toFixed(1) + " - ") + _arg1.getDamageRange(false).toFixed(1))); speedTextBox.text = ("Cooldown: " + _arg1.myTimer.delay); rangeTextBox.text = ("Range: " + Math.floor(_arg1.range)); numKillsTextBox.text = ((("Level: " + _arg1.towerLevel) + " | Kills: ") + _arg1.numKills); tooltipTextBox.text = _arg1.tooltip; drawRangeCheck(_arg1); this.addChild(gemTextArea); this.addChild(selectedNameTextBox); if (_arg1.towerName != "Rock"){ this.addChild(damageTextBox); this.addChild(speedTextBox); this.addChild(rangeTextBox); this.addChild(numKillsTextBox); if (_arg1.towerUpgradable){ upgradeCostTextBox.text = ("Upgrade Cost: " + _arg1.towerUpgradeCost); this.addChild(upgradeCostTextBox); }; this.addChild(tooltipTextBox); }; } public function mouseOut_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(1); } public function mouseClickTowerHandler(_arg1:MouseEvent):void{ var _local2:Object; var _local3:*; _local2 = _arg1.target.parent; if ((_local2 is CreateTower)){ if (((shiftPressed) && ((_local2.towerName == "Rock")))){ if (lastTowerSelected.towerName != "Rock"){ lastTowerSelected.towerSelected = false; lastTowerSelected.removeSelectTower(); }; if (_local2.towerSelected){ _local2.removeSelectTower(); _local2.towerSelected = false; drawTowerUI(_local2); } else { _local2.towerSelected = true; drawTowerUI(_local2); _local2.addSelectTower(); }; } else { _local3 = 0; while (_local3 < listRocks.length) { if (listRocks[_local3] != lastTowerSelected){ if (listRocks[_local3].towerSelected){ listRocks[_local3].towerSelected = false; listRocks[_local3].removeSelectTower(); }; }; _local3++; }; if (lastTowerSelected == null){ _local2.towerSelected = true; lastTowerSelected = _local2; drawTowerUI(_local2); _local2.addSelectTower(); } else { if (_local2.towerSelected){ lastTowerSelected.removeSelectTower(); _local2.towerSelected = false; lastTowerSelected = null; drawTowerUI(_local2); } else { lastTowerSelected.removeSelectTower(); _local2.towerSelected = true; lastTowerSelected.towerSelected = false; lastTowerSelected = _local2; drawTowerUI(_local2); _local2.addSelectTower(); }; }; }; }; } public function drawKeepButton():void{ var _local1:Boolean; var _local2:*; _local1 = false; combineNum = 0; if (listTowersPerLevel.length >= maxTowersPerLevel){ if (this.contains(builtTowerButton)){ this.removeChild(builtTowerButton); }; this.addChild(repickTowerButton); _local2 = 0; while (_local2 < listTowersPerLevel.length) { if ((((selectedTower.towerType == listTowersPerLevel[_local2].towerType)) && ((selectedTower.towerQuality == listTowersPerLevel[_local2].towerQuality)))){ combineNum++; }; if (_local2 == listTowersPerLevel.indexOf(selectedTower)){ _local1 = true; }; _local2++; }; if (_local1){ keepTowerButton = new KeepTower(); keepTowerButton.x = 540; keepTowerButton.y = 420; this.addChild(keepTowerButton); addButtonMouseEvents(keepTowerButton); keepTowerButton.addEventListener(MouseEvent.CLICK, keepTowerButtonHandler); if (combineNum > 1){ combineTowerButton = new CombineTower(); combineTowerButton.x = 540; combineTowerButton.y = 465; this.addChild(combineTowerButton); addButtonMouseEvents(combineTowerButton); combineTowerButton.addEventListener(MouseEvent.CLICK, keepTowerButtonHandler); }; if (checkListForCombo(selectedTower.towerName, true)){ combineSpecialTowerButtonA = new CombineSpecialTower(); combineSpecialTowerButtonA.x = 540; combineSpecialTowerButtonA.y = 376; this.addChild(combineSpecialTowerButtonA); addButtonMouseEvents(combineSpecialTowerButtonA); combineSpecialTowerButtonA.addEventListener(MouseEvent.CLICK, keepTowerButtonHandler); }; }; }; } public function drawTowerUI(_arg1:Object){ selectedTower = _arg1; removeUIObjects(); if (selectedTower.towerSelected){ drawTowerStats(selectedTower); if (towerPlacement){ drawKeepButton(); } else { if (((checkListForCombo(selectedTower.towerName, false)) && ((selectedTower === combineSpecialTowerList[(combineSpecialTowerList.length - 1)])))){ combineSpecialTowerButtonB = new CombineSpecialTower(); combineSpecialTowerButtonB.x = 540; combineSpecialTowerButtonB.y = 376; this.addChild(combineSpecialTowerButtonB); addButtonMouseEvents(combineSpecialTowerButtonB); combineSpecialTowerButtonB.addEventListener(MouseEvent.CLICK, combineSpecialButtonHandler); }; if (((!((listTowersPerLevel.indexOf(selectedTower) == -1))) && (!(downgraded)))){ if (((!((selectedTower.towerQuality == 0))) && (!((selectedTower.towerType == "Special"))))){ downgradeTowerButton = new DowngradeTower(); downgradeTowerButton.x = 540; downgradeTowerButton.y = 465; this.addChild(downgradeTowerButton); addButtonMouseEvents(downgradeTowerButton); downgradeTowerButton.addEventListener(MouseEvent.CLICK, downgradeTowerHandler); }; }; }; if (selectedTower.towerUpgradable){ upgradeTowerButton = new UpgradeTower(); upgradeTowerButton.x = 540; upgradeTowerButton.y = 465; this.addChild(upgradeTowerButton); addButtonMouseEvents(upgradeTowerButton); upgradeTowerButton.addEventListener(MouseEvent.CLICK, upgradeTowerButtonHandler); }; if (selectedTower.towerType == "Rock"){ removeTowerButton = new RemoveTower(); removeTowerButton.x = 540; removeTowerButton.y = 465; this.addChild(removeTowerButton); addButtonMouseEvents(removeTowerButton); removeTowerButton.addEventListener(MouseEvent.CLICK, removeTowerButtonHandler); }; }; } public function buyOneButtonHandler(_arg1:MouseEvent):void{ if ((((player.getGold() >= 10)) && ((player.getLives() < 50)))){ player.addGold(-10); goldTextbox.text = String(player.getGold()); player.addLives(1); playerLivesTextbox.text = String(player.getLives()); }; } public function upgradeQualityButton_handler(_arg1:MouseEvent):void{ var _local2:*; var _local3:*; var _local4:*; _local2 = 20; _local3 = 30; _local4 = (20 + (30 * player.getQualityLevel())); if (player.getGold() >= _local4){ player.addGold((-1 * _local4)); player.addQualityLevel(1); updateGoldText(String(player.getGold())); drawChances(); if (player.getQualityLevel() == 8){ if (this.contains(upgradeQualityButton)){ this.removeChild(upgradeQualityButton); upgradeQualityButton = null; }; }; }; } public function drawErrorMsg(_arg1:String):void{ if (_arg1 == "Blocking"){ this.addChild(blocking); blocking.addEventListener(MouseEvent.CLICK, errorMsgHandler); } else { if (_arg1 == "CannotBuildThere"){ this.addChild(cannotBuildThere); cannotBuildThere.addEventListener(MouseEvent.CLICK, errorMsgHandler); }; }; } public function keepTowerButtonHandler(_arg1:MouseEvent):void{ var _local2:*; _local2 = 0; while (_local2 < listTowersPerLevel.length) { if (!listTowersPerLevel[_local2].towerSelected){ listTowersPerLevel[_local2].changeTower("Rock"); listRocks.push(listTowersPerLevel[_local2]); }; _local2++; }; listTowersPerLevel.length = 0; listTowersPerLevel.push(selectedTower); listTowers.push(selectedTower); if (_arg1.target === combineTowerButton){ if (combineNum >= 4){ if (selectedTower.towerQuality == 4){ selectedTower.towerName = "Uber Stone"; selectedTower.changeTower(selectedTower.towerName); } else { selectedTower.increaseQuality(); selectedTower.increaseQuality(); selectedTower.changeTower(selectedTower.towerName); }; } else { selectedTower.increaseQuality(); selectedTower.changeTower(selectedTower.towerName); }; }; if (_arg1.target === combineSpecialTowerButtonA){ selectedTower.towerName = combineSpecialTowerName; selectedTower.changeTower(selectedTower.towerName); }; removeDisplayObject(combineTowerButton, MouseEvent.CLICK, keepTowerButtonHandler); removeDisplayObject(combineSpecialTowerButtonA, MouseEvent.CLICK, keepTowerButtonHandler); keepTowerButton.removeEventListener(MouseEvent.CLICK, keepTowerButtonHandler); this.removeChild(keepTowerButton); towerPlacement = false; checkAuras(); drawTowerUI(selectedTower); startLevel(); } public function npcSelectHandler(_arg1:MouseEvent):void{ var _local2:String; var _local3:TextFormat; var _local4:Object; var _local5:Number; if (lastTowerSelected != null){ lastTowerSelected.towerSelected = false; lastTowerSelected.removeSelectTower(); lastTowerSelected = null; }; removeUIObjects(); _local3 = new TextFormat(); _local3.font = "Verdana"; _local3.size = 11; _local3.bold = true; _local4 = _arg1.target.parent.parent; if (lastNPCSelected == null){ _local4.npcSelected = true; lastNPCSelected = _local4; this.addChild(gemTextArea); _local5 = (1 / lastNPCSelected.speed); switch (lastNPCSelected.armorType){ case "Pink": _local3.color = 14100364; _local2 = "Amethyst"; break; case "Blazed": _local3.color = 2276039; _local2 = "Aqua/Opal"; break; case "White": _local3.color = 0x9B9B9B; _local2 = "Diamond"; break; case "Green": _local3.color = 6015777; _local2 = "Emerald"; break; case "Red": _local3.color = 13247526; _local2 = "Ruby"; break; case "Blue": _local3.color = 2504922; _local2 = "Sapphire"; break; case "Yellow": _local3.color = 14072362; _local2 = "Topaz"; break; default: _local3.color = 0; _local2 = "None"; }; npcHpTextBox.text = ("Hitpoints: " + Math.round(lastNPCSelected.hpNPC)); npcSpeedTextBox.text = ("Speed: " + _local5.toFixed(2)); npcArmorTextBox.text = ("Armor: " + ((lastNPCSelected.armor - lastNPCSelected.armorPenaltyValue) + player.getArmorLevel())); if (lastNPCSelected.armorPenaltyValue > 0){ npcArmorTextBox.appendText(((" (" + (-1 * lastNPCSelected.armorPenaltyValue)) + ")")); }; npcArmorTypeTextBox.text = "Weakness: "; npcArmorTypeTextBox.setTextFormat(_local3, 9); npcArmorTypeTextBox.appendText(_local2); if (lastNPCSelected.minSpeed == 0.001){ npcMinSpeedTextBox.text = "Minimum Speed: none"; } else { npcMinSpeedTextBox.text = ("Minimum Speed: " + (1 / (lastNPCSelected.defaultSpeed / lastNPCSelected.minSpeed))); }; npcLivesCostTextBox.text = ("Lives cost: " + lastNPCSelected.npcLifeCost); this.addChild(npcHpTextBox); this.addChild(npcSpeedTextBox); this.addChild(npcArmorTextBox); this.addChild(npcArmorTypeTextBox); this.addChild(npcMinSpeedTextBox); this.addChild(npcLivesCostTextBox); } else { if (_local4.npcSelected){ _local4.npcSelected = false; lastNPCSelected = null; } else { _local4.npcSelected = true; lastNPCSelected.npcSelected = false; lastNPCSelected = _local4; this.addChild(gemTextArea); _local5 = (1 / lastNPCSelected.speed); switch (lastNPCSelected.armorType){ case "Pink": _local3.color = 14100364; _local2 = "Amethyst"; break; case "Blazed": _local3.color = 2276039; _local2 = "Aquamarine/Opal"; break; case "White": _local3.color = 0x9B9B9B; _local2 = "Diamond"; break; case "Green": _local3.color = 6015777; _local2 = "Emerald"; break; case "Red": _local3.color = 13247526; _local2 = "Ruby"; break; case "Blue": _local3.color = 2504922; _local2 = "Sapphire"; break; case "Yellow": _local3.color = 14072362; _local2 = "Topaz"; break; default: _local3.color = 0; _local2 = "None"; }; npcHpTextBox.text = ("Hitpoints: " + Math.round(lastNPCSelected.hpNPC)); npcSpeedTextBox.text = ("Speed: " + _local5.toFixed(2)); npcArmorTextBox.text = ("Armor: " + ((lastNPCSelected.armor - lastNPCSelected.armorPenaltyValue) + player.getArmorLevel())); if (lastNPCSelected.armorPenaltyValue > 0){ npcArmorTextBox.appendText(((" (" + (-1 * lastNPCSelected.armorPenaltyValue)) + ")")); }; npcArmorTypeTextBox.text = "Weakness: "; npcArmorTypeTextBox.setTextFormat(_local3, 9); npcArmorTypeTextBox.appendText(_local2); if (lastNPCSelected.minSpeed == 0.001){ npcMinSpeedTextBox.text = "Minimum Speed: none"; } else { npcMinSpeedTextBox.text = ("Minimum Speed: " + (1 / (lastNPCSelected.defaultSpeed / lastNPCSelected.minSpeed))); }; npcLivesCostTextBox.text = ("Lives cost: " + lastNPCSelected.npcLifeCost); this.addChild(npcHpTextBox); this.addChild(npcSpeedTextBox); this.addChild(npcArmorTextBox); this.addChild(npcArmorTypeTextBox); this.addChild(npcMinSpeedTextBox); this.addChild(npcLivesCostTextBox); }; }; } public function playerLost():void{ var _local1:*; var _local2:*; var _local3:*; UIReset(); if (builtTowerButton != null){ if (this.contains(builtTowerButton)){ this.removeChild(builtTowerButton); }; }; lost = new Lost(); lost.x = ((stageRef.width / 2) - (lost.width / 2)); lost.y = (((stageRef.height / 2) - (lost.height / 2)) - 100); this.addChild(lost); _local1 = new TextFormat(); _local1.font = "Verdana"; _local1.size = 14; _local1.bold = true; _local1.color = 0; _local2 = new TextField(); _local2.defaultTextFormat = _local1; _local2.selectable = false; _local2.text = "Name: "; _local2.autoSize = TextFieldAutoSize.LEFT; _local2.x = (((stageRef.width / 2) - _local2.width) - 22); _local2.y = (225 + 110); this.addChild(_local2); _local3 = new TextField(); _local3.defaultTextFormat = _local1; _local3.selectable = false; _local3.text = ("Score: " + Math.floor(player.getScore())); _local3.x = _local2.x; _local3.y = (225 + 80); _local3.width = 200; this.addChild(_local3); userName = new TextField(); userName.type = TextFieldType.INPUT; userName.background = true; userName.border = true; userName.x = ((stageRef.width / 2) - 22); userName.y = (225 + 110); userName.height = _local2.height; userName.defaultTextFormat = _local1; userName.restrict = "a-zA-Z 0-9"; this.addChild(userName); submitScore = new SubmitScore(); submitScore.x = ((stageRef.width / 2) - (submitScore.width / 2)); submitScore.y = (225 + 140); this.addChild(submitScore); addButtonMouseEvents(submitScore); submitScore.addEventListener(MouseEvent.CLICK, submitScoreHandler); } public function completeHandler(_arg1:Event):void{ loader.close(); gemtdRef.resetGame(); } public function removeUIObjects():void{ removeDisplayObject(removeTowerButton, MouseEvent.CLICK, removeTowerButtonHandler); removeDisplayObject(keepTowerButton, MouseEvent.CLICK, keepTowerButtonHandler); removeDisplayObject(combineTowerButton, MouseEvent.CLICK, keepTowerButtonHandler); removeDisplayObject(combineSpecialTowerButtonA, MouseEvent.CLICK, keepTowerButtonHandler); removeDisplayObject(combineSpecialTowerButtonB, MouseEvent.CLICK, combineSpecialButtonHandler); removeDisplayObject(upgradeTowerButton, MouseEvent.CLICK, upgradeTowerButtonHandler); removeDisplayObject(downgradeTowerButton, MouseEvent.CLICK, downgradeTowerHandler); removeDisplayObject(buyOneButton, MouseEvent.CLICK, buyOneButtonHandler); removeDisplayObject(buyFiveButton, MouseEvent.CLICK, buyFiveButtonHandler); removeTowerStats(); } public function EventKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 16){ shiftPressed = true; } else { if (_arg1.keyCode == 66){ if (builtTowerButton != null){ if (this.contains(builtTowerButton)){ if (!bPressed){ builtTowerButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; }; } else { if (_arg1.keyCode == 82){ if (removeTowerButton != null){ if (this.contains(removeTowerButton)){ removeTowerButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; } else { if (_arg1.keyCode == 88){ if (gemtdRef.resetGameButton != null){ if (gemtdRef.contains(gemtdRef.resetGameButton)){ gemtdRef.resetGameButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; } else { if (_arg1.keyCode == 67){ if (combineTowerButton != null){ if (this.contains(combineTowerButton)){ combineTowerButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; } else { if (_arg1.keyCode == 68){ if (downgradeTowerButton != null){ if (this.contains(downgradeTowerButton)){ downgradeTowerButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; } else { if (_arg1.keyCode == 69){ if (keepTowerButton != null){ if (this.contains(keepTowerButton)){ keepTowerButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; } else { if (_arg1.keyCode == 83){ if (combineSpecialTowerButtonA != null){ if (this.contains(combineSpecialTowerButtonA)){ combineSpecialTowerButtonA.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } else { if (combineSpecialTowerButtonB != null){ if (this.contains(combineSpecialTowerButtonB)){ combineSpecialTowerButtonB.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; }; }; }; }; }; }; }; }; }; }; } public function difficultyButton_handler(_arg1:MouseEvent):void{ var _local2:Object; var _local3:MovieClip; var _local4:Array; _local2 = _arg1.target; if ((_local2 is Easy)){ player.setArmorLevel(-5); _local3 = new EasyDiff(); player.difficulty = "Easy"; } else { if ((_local2 is Normal)){ player.setArmorLevel(0); _local3 = new NormalDiff(); player.difficulty = "Normal"; } else { if ((_local2 is Hard)){ player.setArmorLevel(8); _local3 = new HardDiff(); player.difficulty = "Hard"; } else { if ((_local2 is Extreme)){ player.setArmorLevel(12); _local3 = new ExtremeDiff(); player.difficulty = "Extreme"; aidedStartup = (Math.floor((Math.random() * 2)) + 1); } else { if ((_local2 is Insane)){ player.setArmorLevel(12); _local3 = new InsaneDiff(); player.difficulty = "Insane"; aidedStartup = (Math.floor((Math.random() * 2)) + 1); }; }; }; }; }; _local4 = new Array(); if (aidedStartup == 1){ listAidedStartup.push("Topaz"); listAidedStartup.push("Diamond"); listAidedStartup.push("Sapphire"); } else { if (aidedStartup == 2){ listAidedStartup.push("Emerald"); listAidedStartup.push("Aquamarine"); listAidedStartup.push("Opal"); }; }; _local3.y = -16; _local3.x = 10; this.addChild(_local3); easy.removeEventListener(MouseEvent.CLICK, difficultyButton_handler); normal.removeEventListener(MouseEvent.CLICK, difficultyButton_handler); hard.removeEventListener(MouseEvent.CLICK, difficultyButton_handler); extreme.removeEventListener(MouseEvent.CLICK, difficultyButton_handler); insane.removeEventListener(MouseEvent.CLICK, difficultyButton_handler); this.removeChild(easy); this.removeChild(normal); this.removeChild(hard); this.removeChild(extreme); this.removeChild(insane); startGameUI(); } public function livesmouseOver_handler(_arg1:MouseEvent):void{ removeUIObjects(); removeTowerStats(); if (lastTowerSelected != null){ lastTowerSelected.removeSelectTower(); lastTowerSelected.towerSelected = false; lastTowerSelected = null; }; this.addChild(gemTextArea); gemQualityTextBox.text = "Buy lives for 10 gold each. Maximum of 50 lives.\n\n1 life = 10 gold\n5 lives = 50 gold"; this.addChild(gemQualityTextBox); this.addChild(buyOneButton); this.addChild(buyFiveButton); buyOneButton.addEventListener(MouseEvent.CLICK, buyOneButtonHandler); buyFiveButton.addEventListener(MouseEvent.CLICK, buyFiveButtonHandler); } public static function updateArmorTextBox(_arg1:Number, _arg2:Number, _arg3:Number):void{ npcArmorTextBox.text = ("Armor: " + ((_arg1 - _arg2) + _arg3)); if (_arg2 > 0){ npcArmorTextBox.appendText(((" (" + (-1 * _arg2)) + ")")); }; } public static function updateNpcSpeedText(_arg1:Number):void{ npcSpeedTextBox.text = ("Speed: " + _arg1.toFixed(2)); } public static function updateLevelText(_arg1:String):void{ levelTextbox.text = String(_arg1); } public static function updateTowerKillsTextBox(_arg1:Number, _arg2:Number):void{ numKillsTextBox.text = ((("Level: " + _arg2) + " | Kills: ") + _arg1); } public static function updateNpcHpTextBox(_arg1:Number):void{ _arg1 = Math.round(_arg1); if (_arg1 <= 0){ _arg1 = 0; }; npcHpTextBox.text = ("Hitpoints: " + _arg1); } public static function updateGoldText(_arg1:String):void{ goldTextbox.text = String(_arg1); } } }//package gemtd
Section 22
//dmgTable (gemtd.dmgTable) package gemtd { var dmgTable:Array = new Array(); dmgTable["Amethyst"] = new Array(); dmgTable["Aquamarine"] = new Array(); dmgTable["Diamond"] = new Array(); dmgTable["Emerald"] = new Array(); dmgTable["Opal"] = new Array(); dmgTable["Ruby"] = new Array(); dmgTable["Sapphire"] = new Array(); dmgTable["Topaz"] = new Array(); dmgTable["Amethyst"]["Red"] = 0.8; dmgTable["Amethyst"]["Blazed"] = 0.8; dmgTable["Amethyst"]["White"] = 0.8; dmgTable["Amethyst"]["Green"] = 0.8; dmgTable["Amethyst"]["Yellow"] = 0.8; dmgTable["Amethyst"]["Blue"] = 0.8; dmgTable["Amethyst"]["Pink"] = 1.75; dmgTable["Aquamarine"]["Red"] = 1; dmgTable["Aquamarine"]["Blazed"] = 1.9; dmgTable["Aquamarine"]["White"] = 0.8; dmgTable["Aquamarine"]["Green"] = 0.7; dmgTable["Aquamarine"]["Yellow"] = 1; dmgTable["Aquamarine"]["Blue"] = 0.4; dmgTable["Aquamarine"]["Pink"] = 1; dmgTable["Diamond"]["Red"] = 1.2; dmgTable["Diamond"]["Blazed"] = 1; dmgTable["Diamond"]["White"] = 1.6; dmgTable["Diamond"]["Green"] = 0.6; dmgTable["Diamond"]["Yellow"] = 1; dmgTable["Diamond"]["Blue"] = 0.75; dmgTable["Diamond"]["Pink"] = 0.2; dmgTable["Emerald"]["Red"] = 0.7; dmgTable["Emerald"]["Blazed"] = 0.7; dmgTable["Emerald"]["White"] = 0.7; dmgTable["Emerald"]["Green"] = 1.7; dmgTable["Emerald"]["Yellow"] = 0.7; dmgTable["Emerald"]["Blue"] = 0.7; dmgTable["Emerald"]["Pink"] = 1.5; dmgTable["Opal"]["Red"] = 1; dmgTable["Opal"]["Blazed"] = 1.9; dmgTable["Opal"]["White"] = 0.8; dmgTable["Opal"]["Green"] = 0.7; dmgTable["Opal"]["Yellow"] = 1; dmgTable["Opal"]["Blue"] = 0.4; dmgTable["Opal"]["Pink"] = 1; dmgTable["Ruby"]["Red"] = 1.8; dmgTable["Ruby"]["Blazed"] = 0.8; dmgTable["Ruby"]["White"] = 1; dmgTable["Ruby"]["Green"] = 0.5; dmgTable["Ruby"]["Yellow"] = 1; dmgTable["Ruby"]["Blue"] = 1; dmgTable["Ruby"]["Pink"] = 0.8; dmgTable["Sapphire"]["Red"] = 1; dmgTable["Sapphire"]["Blazed"] = 1; dmgTable["Sapphire"]["White"] = 1; dmgTable["Sapphire"]["Green"] = 1; dmgTable["Sapphire"]["Yellow"] = 1; dmgTable["Sapphire"]["Blue"] = 1.75; dmgTable["Sapphire"]["Pink"] = 1; dmgTable["Topaz"]["Red"] = 0.5; dmgTable["Topaz"]["Blazed"] = 1; dmgTable["Topaz"]["White"] = 0.6; dmgTable["Topaz"]["Green"] = 0.7; dmgTable["Topaz"]["Yellow"] = 1.6; dmgTable["Topaz"]["Blue"] = 1; var _local1:* = (dmgTable["Topaz"]["Pink"] = 1.2); return (_local1); }//package gemtd
Section 23
//Map (gemtd.Map) package gemtd { public class Map { private var openList:Array; public var mapWidth:Number; private var ALLOW_DIAGONAL;// = false private var ALLOW_DIAGONAL_CORNERING;// = false private var HV_COST;// = 10 private var map:Array; public var tileSize:Number; private var D_COST;// = 14 public var mapHeight:Number; private var mapH:Number; private var mapStatus:Array; private var mapRestrict:Array; private var mapW:Number; public function Map(_arg1:Number, _arg2:Number, _arg3:Number){ var _local4:*; var _local5:*; HV_COST = 10; D_COST = 14; ALLOW_DIAGONAL = false; ALLOW_DIAGONAL_CORNERING = false; super(); mapH = _arg2; mapW = _arg1; mapWidth = mapW; mapHeight = mapH; tileSize = _arg3; map = new Array(mapH); mapRestrict = new Array(mapH); _local4 = 0; while (_local4 < mapH) { map[_local4] = new Array(mapW); mapRestrict[_local4] = new Array(mapW); _local5 = 0; while (_local5 < mapW) { map[_local4][_local5] = 1; mapRestrict[_local4][_local5] = 1; _local5++; }; _local4++; }; } public function openSquare(_arg1:Number, _arg2:Number, _arg3, _arg4, _arg5, _arg6){ if (!_arg6){ openList.push([_arg1, _arg2]); mapStatus[_arg1][_arg2].heuristic = _arg5; mapStatus[_arg1][_arg2].isOpen = true; mapStatus[_arg1][_arg2].isClosed = false; }; mapStatus[_arg1][_arg2].parentSquare = _arg3; mapStatus[_arg1][_arg2].movementCost = _arg4; } public function nearerSquare(){ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = 999999; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = openList.length; while (_local5-- > 0) { _local4 = mapStatus[openList[_local5][0]][openList[_local5][1]]; _local3 = (_local4.heuristic + _local4.movementCost); if (_local3 <= _local1){ _local1 = _local3; _local2 = _local5; }; }; return (_local2); } public function checkWalkable(_arg1:Number, _arg2:Number):Boolean{ if ((((map[_arg2][_arg1] == 0)) || ((mapRestrict[_arg2][_arg1] == 0)))){ return (false); }; return (true); } public function isOpen(_arg1:Number, _arg2:Number){ return (mapStatus[_arg1][_arg2].isOpen); } public function disallowTowerHere(_arg1:Number, _arg2:Number){ mapRestrict[_arg2][_arg1] = 0; } public function setWalkable(_arg1:Number, _arg2:Number, _arg3:Boolean){ if (_arg3){ map[_arg2][_arg1] = 1; } else { map[_arg2][_arg1] = 0; }; } public function closeSquare(_arg1:Number, _arg2:Number){ var _local3:*; var _local4:*; _local3 = openList.length; _local4 = 0; while (_local4 < _local3) { if (openList[_local4][0] == _arg1){ if (openList[_local4][1] == _arg2){ openList.splice(_local4, 1); break; }; }; _local4++; }; mapStatus[_arg1][_arg2].isOpen = false; mapStatus[_arg1][_arg2].isClosed = true; } public function isClosed(_arg1:Number, _arg2:Number){ return (mapStatus[_arg1][_arg2].isClosed); } public function findPath(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Array{ var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local15:Array; var _local16:*; var _local17:*; mapStatus = new Array(); _local7 = 0; while (_local7 < mapH) { mapStatus[_local7] = new Array(); _local9 = 0; while (_local9 < mapW) { mapStatus[_local7][_local9] = new Square(_local9, _local7); _local9++; }; _local7++; }; openList = new Array(); openSquare(_arg2, _arg1, null, 0, 0, false); while ((((openList.length > 0)) && (!(isClosed(_arg4, _arg3))))) { _local10 = nearerSquare(); _local5 = openList[_local10][0]; _local6 = openList[_local10][1]; closeSquare(_local5, _local6); _local11 = (_local5 - 1); while (_local11 < (_local5 + 2)) { _local12 = (_local6 - 1); while (_local12 < (_local6 + 2)) { if ((((((((((((((_local11 >= 0)) && ((_local11 < mapH)))) && ((_local12 >= 0)))) && ((_local12 < mapW)))) && (!((((_local11 == _local5)) && ((_local12 == _local6))))))) && (((((ALLOW_DIAGONAL) || ((_local11 == _local5)))) || ((_local12 == _local6)))))) && (((((((ALLOW_DIAGONAL_CORNERING) || ((_local11 == _local5)))) || ((_local12 == _local6)))) || (((!((map[_local11][_local6] == 0))) && (map[_local5][_local12]))))))){ if (map[_local11][_local12] != 0){ if (!isClosed(_local11, _local12)){ _local13 = (mapStatus[_local5][_local6].movementCost + (((((_local11 == _local5)) || ((_local12 == _local6)))) ? HV_COST : D_COST * map[_local11][_local12])); if (isOpen(_local11, _local12)){ if (_local13 < mapStatus[_local11][_local12].movementCost){ openSquare(_local11, _local12, [_local5, _local6], _local13, 0, true); }; } else { _local14 = ((Math.abs((_local11 - _arg4)) + Math.abs((_local12 - _arg3))) * 10); openSquare(_local11, _local12, [_local5, _local6], _local13, _local14, false); }; }; }; }; _local12++; }; _local11++; }; }; _local8 = isClosed(_arg4, _arg3); if (_local8){ _local15 = new Array(); _local5 = _arg4; _local6 = _arg3; while (((!((_local5 == _arg2))) || (!((_local6 == _arg1))))) { _local15.push([_local5, _local6]); _local16 = mapStatus[_local5][_local6].parentSquare[0]; _local17 = mapStatus[_local5][_local6].parentSquare[1]; _local5 = _local16; _local6 = _local17; }; _local15.push([_arg2, _arg1]); _local15.reverse(); return (_local15); //unresolved jump }; return (null); } } }//package gemtd
Section 24
//NPC (gemtd.NPC) package gemtd { import flash.display.*; public class NPC extends MovieClip { public var npcMC:MovieClip; public var hpMC:MovieClip; public function NPC(_arg1:Number){ if ((_arg1 % 4) == 0){ npcMC = new Batman(); } else { npcMC = new Axedwarf(); }; hpMC = new MovieClip(); hpMC.graphics.beginFill(0x9900); hpMC.graphics.drawRect(1, -5, (npcMC.width - 2), 3); this.addChild(npcMC); this.addChild(hpMC); } public function changeHP(_arg1:Number, _arg2:Number){ var _local3:*; var _local4:*; this.removeChild(hpMC); _local3 = (_arg1 / _arg2); _local4 = Math.ceil((_local3 * (npcMC.width - 2))); if (_local4 < 0){ _local4 = 0; }; hpMC.graphics.beginFill(0x9900); hpMC.graphics.drawRect(1, -5, _local4, 3); this.addChild(hpMC); hpMC.graphics.beginFill(0xF0000F); hpMC.graphics.drawRect((1 + _local4), -5, ((npcMC.width - 2) - _local4), 3); this.addChild(hpMC); } } }//package gemtd
Section 25
//Square (gemtd.Square) package gemtd { class Square { public var m_x; public var m_y; public var heuristic:Number; public var parentSquare:Array; public var isOpen:Boolean; public var movementCost:Number; public var isClosed:Boolean; function Square(_arg1:Number, _arg2:Number){ m_x = _arg1; m_y = _arg2; parentSquare = null; movementCost = 0; heuristic = 0; isOpen = false; isClosed = false; } } }//package gemtd
Section 26
//TowerAbilities (gemtd.TowerAbilities) package gemtd { public class TowerAbilities { public var multiRange:Number; public var multiRawDamage:Number; public var aoeRange:Number; public var multiTargets:Number; public var stunChance:Number; public var poisonDamage:Number; public var attacksGround:Boolean; public var attacksFlying:Boolean; public var manaMax:Number; public var damageAuraValue:Number; public var poisonSlowModifier:Number; public var bonusAura:Boolean; public var iceSlowModifier:Number; public var speedAuraOpalRange:Number; public var poisonSlow:Boolean; public var iceSlow:Boolean; public var critChance:Number; public var proximityAuraGround:Boolean; public var proximityAuraFlying:Boolean; public var critMultiplier:Number; public var manaRegen:Number; public var armorPenaltyValue:Number; public var armorPenalty:Boolean; public var stunPossible:Boolean; public var speedAuraOpalValue:Number; public var poisonSlowDuration:Number; public var damageBurn:Boolean; public var multiAttack:Boolean; public var proximityAuraSpeedPenalty:Number; public var mana:Number; public var proximityAuraRange:Number; public var damageAuraRange:Number; public var proximityAuraArmorPenalty:Number; public var stunDuration:Number; public var critPossible:Boolean; public var aoe:Boolean; public var aoeFreeze:Boolean; public var armorPenaltyDuration:Number; public var frostnovaDamage:Number; public function TowerAbilities(){ poisonSlow = false; iceSlow = false; aoe = false; aoeRange = 0; aoeFreeze = false; multiTargets = 1; bonusAura = false; speedAuraOpalValue = 0; speedAuraOpalRange = 0; damageAuraValue = 0; damageAuraRange = 0; attacksFlying = true; attacksGround = true; iceSlowModifier = 0; poisonSlowModifier = 0; poisonSlowDuration = 0; poisonDamage = 0; critPossible = false; critChance = 0; critMultiplier = 0; damageBurn = false; stunPossible = false; stunChance = 0; stunDuration = 0; armorPenalty = false; armorPenaltyValue = 0; armorPenaltyDuration = 0; proximityAuraFlying = false; proximityAuraGround = false; proximityAuraArmorPenalty = 0; proximityAuraSpeedPenalty = 0; proximityAuraRange = 0; multiAttack = false; multiRawDamage = 0; multiRange = 0; manaMax = 0; mana = 0; manaRegen = 0; frostnovaDamage = 0; } } }//package gemtd
Section 27
//MainTimeline (gemtd_fla.MainTimeline) package gemtd_fla { import flash.display.*; public dynamic class MainTimeline extends MovieClip { public var game:MovieClip; public function MainTimeline(){ addFrameScript(0, frame1); } function frame1(){ game = new GemTD(stage); game.y = 20; addChild(game); stop(); } } }//package gemtd_fla
Section 28
//AncientBloodStone (AncientBloodStone) package { import flash.display.*; public dynamic class AncientBloodStone extends MovieClip { } }//package
Section 29
//AsianJade (AsianJade) package { import flash.display.*; public dynamic class AsianJade extends MovieClip { } }//package
Section 30
//Axedwarf (Axedwarf) package { import flash.display.*; public dynamic class Axedwarf extends MovieClip { public function Axedwarf(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 31
//Batman (Batman) package { import flash.display.*; public dynamic class Batman extends MovieClip { public function Batman(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 32
//BlackOpal (BlackOpal) package { import flash.display.*; public dynamic class BlackOpal extends MovieClip { } }//package
Section 33
//Blocking (Blocking) package { import flash.display.*; public dynamic class Blocking extends MovieClip { } }//package
Section 34
//BloodStar (BloodStar) package { import flash.display.*; public dynamic class BloodStar extends MovieClip { } }//package
Section 35
//BloodStone (BloodStone) package { import flash.display.*; public dynamic class BloodStone extends MovieClip { } }//package
Section 36
//BuildTower (BuildTower) package { import flash.display.*; public dynamic class BuildTower extends MovieClip { public function BuildTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 37
//BuyFive (BuyFive) package { import flash.display.*; public dynamic class BuyFive extends MovieClip { public function BuyFive(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 38
//BuyOne (BuyOne) package { import flash.display.*; public dynamic class BuyOne extends MovieClip { public function BuyOne(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 39
//CannotBuildThere (CannotBuildThere) package { import flash.display.*; public dynamic class CannotBuildThere extends MovieClip { } }//package
Section 40
//ChippedAmethyst (ChippedAmethyst) package { import flash.display.*; public dynamic class ChippedAmethyst extends MovieClip { } }//package
Section 41
//ChippedAquamarine (ChippedAquamarine) package { import flash.display.*; public dynamic class ChippedAquamarine extends MovieClip { } }//package
Section 42
//ChippedDiamond (ChippedDiamond) package { import flash.display.*; public dynamic class ChippedDiamond extends MovieClip { } }//package
Section 43
//ChippedEmerald (ChippedEmerald) package { import flash.display.*; public dynamic class ChippedEmerald extends MovieClip { } }//package
Section 44
//ChippedOpal (ChippedOpal) package { import flash.display.*; public dynamic class ChippedOpal extends MovieClip { } }//package
Section 45
//ChippedRuby (ChippedRuby) package { import flash.display.*; public dynamic class ChippedRuby extends MovieClip { } }//package
Section 46
//ChippedSapphire (ChippedSapphire) package { import flash.display.*; public dynamic class ChippedSapphire extends MovieClip { } }//package
Section 47
//ChippedTopaz (ChippedTopaz) package { import flash.display.*; public dynamic class ChippedTopaz extends MovieClip { } }//package
Section 48
//CombineSpecialTower (CombineSpecialTower) package { import flash.display.*; public dynamic class CombineSpecialTower extends MovieClip { public function CombineSpecialTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 49
//CombineTower (CombineTower) package { import flash.display.*; public dynamic class CombineTower extends MovieClip { public function CombineTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 50
//DarkEmerald (DarkEmerald) package { import flash.display.*; public dynamic class DarkEmerald extends MovieClip { } }//package
Section 51
//Deer (Deer) package { import flash.display.*; public dynamic class Deer extends MovieClip { } }//package
Section 52
//DowngradeTower (DowngradeTower) package { import flash.display.*; public dynamic class DowngradeTower extends MovieClip { public function DowngradeTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 53
//Easy (Easy) package { import flash.display.*; public dynamic class Easy extends MovieClip { public function Easy(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 54
//EasyDiff (EasyDiff) package { import flash.display.*; public dynamic class EasyDiff extends MovieClip { } }//package
Section 55
//EgyptianGold (EgyptianGold) package { import flash.display.*; public dynamic class EgyptianGold extends MovieClip { } }//package
Section 56
//Elephant (Elephant) package { import flash.display.*; public dynamic class Elephant extends MovieClip { } }//package
Section 57
//EnchantedEmerald (EnchantedEmerald) package { import flash.display.*; public dynamic class EnchantedEmerald extends MovieClip { } }//package
Section 58
//Extreme (Extreme) package { import flash.display.*; public dynamic class Extreme extends MovieClip { public function Extreme(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 59
//ExtremeDiff (ExtremeDiff) package { import flash.display.*; public dynamic class ExtremeDiff extends MovieClip { } }//package
Section 60
//FireStar (FireStar) package { import flash.display.*; public dynamic class FireStar extends MovieClip { } }//package
Section 61
//Flamestrike (Flamestrike) package { import flash.display.*; public dynamic class Flamestrike extends MovieClip { } }//package
Section 62
//FlawedAmethyst (FlawedAmethyst) package { import flash.display.*; public dynamic class FlawedAmethyst extends MovieClip { } }//package
Section 63
//FlawedAquamarine (FlawedAquamarine) package { import flash.display.*; public dynamic class FlawedAquamarine extends MovieClip { } }//package
Section 64
//FlawedDiamond (FlawedDiamond) package { import flash.display.*; public dynamic class FlawedDiamond extends MovieClip { } }//package
Section 65
//FlawedEmerald (FlawedEmerald) package { import flash.display.*; public dynamic class FlawedEmerald extends MovieClip { } }//package
Section 66
//FlawedOpal (FlawedOpal) package { import flash.display.*; public dynamic class FlawedOpal extends MovieClip { } }//package
Section 67
//FlawedRuby (FlawedRuby) package { import flash.display.*; public dynamic class FlawedRuby extends MovieClip { } }//package
Section 68
//FlawedSapphire (FlawedSapphire) package { import flash.display.*; public dynamic class FlawedSapphire extends MovieClip { } }//package
Section 69
//FlawedTopaz (FlawedTopaz) package { import flash.display.*; public dynamic class FlawedTopaz extends MovieClip { } }//package
Section 70
//FlawlessAmethyst (FlawlessAmethyst) package { import flash.display.*; public dynamic class FlawlessAmethyst extends MovieClip { } }//package
Section 71
//FlawlessAquamarine (FlawlessAquamarine) package { import flash.display.*; public dynamic class FlawlessAquamarine extends MovieClip { } }//package
Section 72
//FlawlessDiamond (FlawlessDiamond) package { import flash.display.*; public dynamic class FlawlessDiamond extends MovieClip { } }//package
Section 73
//FlawlessEmerald (FlawlessEmerald) package { import flash.display.*; public dynamic class FlawlessEmerald extends MovieClip { } }//package
Section 74
//FlawlessOpal (FlawlessOpal) package { import flash.display.*; public dynamic class FlawlessOpal extends MovieClip { } }//package
Section 75
//FlawlessRuby (FlawlessRuby) package { import flash.display.*; public dynamic class FlawlessRuby extends MovieClip { } }//package
Section 76
//FlawlessSapphire (FlawlessSapphire) package { import flash.display.*; public dynamic class FlawlessSapphire extends MovieClip { } }//package
Section 77
//FlawlessTopaz (FlawlessTopaz) package { import flash.display.*; public dynamic class FlawlessTopaz extends MovieClip { } }//package
Section 78
//FlyingLevel (FlyingLevel) package { import flash.display.*; public dynamic class FlyingLevel extends MovieClip { } }//package
Section 79
//Frost (Frost) package { import flash.display.*; public dynamic class Frost extends MovieClip { } }//package
Section 80
//Frostnova (Frostnova) package { import flash.display.*; public dynamic class Frostnova extends MovieClip { } }//package
Section 81
//GemTD (GemTD) package { import flash.events.*; import flash.display.*; import gemtd.*; import flash.net.*; public class GemTD extends MovieClip { public var gameMap:Map; var spawnY;// = 4 var spawnX;// = 0 public var listNPC:Array; public var listTowersPerLevel:Array; var maxTowersPerLevel;// = 5 public var mc:MovieClip; private var restartGame:MovieClip; private var stageRef:Stage; public var resetGameButton:MovieClip; var mapHeight;// = 40 public var UI:MovieClip; var mapWidth;// = 40 var tileSize;// = 13 private var no:MovieClip; public var listTowers:Array; public var player:CreatePlayer; private var yes:MovieClip; public function GemTD(_arg1:Stage){ spawnX = 0; spawnY = 4; tileSize = 13; mapWidth = 40; mapHeight = 40; maxTowersPerLevel = 5; listNPC = new Array(); listTowers = new Array(); listTowersPerLevel = new Array(); super(); stageRef = _arg1; startGame(); } public function yesButton_handler(_arg1:MouseEvent):void{ if (this.contains(yes)){ this.removeChild(yes); }; if (this.contains(no)){ this.removeChild(no); }; yes = null; no = null; restartGame = null; resetGame(); } public function resetGameHandler(_arg1:MouseEvent):void{ if (restartGame != null){ if (this.contains(restartGame)){ this.removeChild(restartGame); }; }; if (yes != null){ if (this.contains(yes)){ this.removeChild(yes); }; }; if (no != null){ if (this.contains(no)){ this.removeChild(no); }; }; restartGame = new RestartGame(); yes = new Yes(); no = new No(); restartGame.x = 285; restartGame.y = 185; yes.x = 307; yes.y = 245; no.x = 365; no.y = 245; yes.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_handler); yes.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_handler); yes.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_handler); yes.addEventListener(MouseEvent.MOUSE_UP, mouseUp_handler); no.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_handler); no.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_handler); no.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_handler); no.addEventListener(MouseEvent.MOUSE_UP, mouseUp_handler); yes.addEventListener(MouseEvent.CLICK, yesButton_handler); no.addEventListener(MouseEvent.CLICK, noButton_handler); this.addChild(restartGame); this.addChild(yes); this.addChild(no); } public function mouseOver_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(2); } public function mouseUp_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(2); } public function noButton_handler(_arg1:MouseEvent):void{ if (this.contains(no)){ this.removeChild(no); }; if (this.contains(yes)){ this.removeChild(yes); }; if (this.contains(restartGame)){ this.removeChild(restartGame); }; yes = null; no = null; restartGame = null; } private function ioErrorHandler(_arg1:IOErrorEvent):void{ trace("Error"); } public function startGame():void{ gameMap = new Map(mapWidth, mapHeight, tileSize); mc = new MovieClip(); initializeMap(); player = new CreatePlayer(0, 9); resetGameButton = new ResetGame(); resetGameButton.x = 540; resetGameButton.y = 20; resetGameButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_handler); resetGameButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_handler); resetGameButton.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown_handler); resetGameButton.addEventListener(MouseEvent.MOUSE_UP, mouseUp_handler); this.addChild(resetGameButton); resetGameButton.addEventListener(MouseEvent.CLICK, resetGameHandler); UI = new CreateUI(this, stageRef, gameMap, player, listNPC, listTowers, listTowersPerLevel, 525); this.addChild(UI); } public function initializeMap():void{ gameMap.disallowTowerHere(0, 4); gameMap.disallowTowerHere(5, 4); gameMap.disallowTowerHere(6, 4); gameMap.disallowTowerHere(7, 4); gameMap.disallowTowerHere(8, 4); gameMap.disallowTowerHere(9, 4); gameMap.disallowTowerHere(10, 4); gameMap.disallowTowerHere(5, 5); gameMap.disallowTowerHere(6, 5); gameMap.disallowTowerHere(7, 5); gameMap.disallowTowerHere(8, 5); gameMap.disallowTowerHere(9, 5); gameMap.disallowTowerHere(10, 5); gameMap.disallowTowerHere(7, 6); gameMap.disallowTowerHere(8, 6); gameMap.disallowTowerHere(7, 7); gameMap.disallowTowerHere(8, 7); gameMap.disallowTowerHere(7, 19); gameMap.disallowTowerHere(7, 20); gameMap.disallowTowerHere(7, 21); gameMap.disallowTowerHere(7, 22); gameMap.disallowTowerHere(7, 23); gameMap.disallowTowerHere(7, 24); gameMap.disallowTowerHere(8, 19); gameMap.disallowTowerHere(8, 20); gameMap.disallowTowerHere(8, 21); gameMap.disallowTowerHere(8, 22); gameMap.disallowTowerHere(8, 23); gameMap.disallowTowerHere(8, 24); gameMap.disallowTowerHere(9, 21); gameMap.disallowTowerHere(10, 21); gameMap.disallowTowerHere(9, 22); gameMap.disallowTowerHere(10, 22); gameMap.disallowTowerHere(31, 19); gameMap.disallowTowerHere(31, 20); gameMap.disallowTowerHere(31, 21); gameMap.disallowTowerHere(31, 22); gameMap.disallowTowerHere(31, 23); gameMap.disallowTowerHere(31, 24); gameMap.disallowTowerHere(32, 19); gameMap.disallowTowerHere(32, 20); gameMap.disallowTowerHere(32, 21); gameMap.disallowTowerHere(32, 22); gameMap.disallowTowerHere(32, 23); gameMap.disallowTowerHere(32, 24); gameMap.disallowTowerHere(29, 21); gameMap.disallowTowerHere(30, 21); gameMap.disallowTowerHere(29, 22); gameMap.disallowTowerHere(30, 22); gameMap.disallowTowerHere(29, 4); gameMap.disallowTowerHere(30, 4); gameMap.disallowTowerHere(31, 4); gameMap.disallowTowerHere(32, 4); gameMap.disallowTowerHere(33, 4); gameMap.disallowTowerHere(34, 4); gameMap.disallowTowerHere(29, 5); gameMap.disallowTowerHere(30, 5); gameMap.disallowTowerHere(31, 5); gameMap.disallowTowerHere(32, 5); gameMap.disallowTowerHere(33, 5); gameMap.disallowTowerHere(34, 5); gameMap.disallowTowerHere(31, 6); gameMap.disallowTowerHere(32, 6); gameMap.disallowTowerHere(31, 7); gameMap.disallowTowerHere(32, 7); gameMap.disallowTowerHere(17, 4); gameMap.disallowTowerHere(18, 4); gameMap.disallowTowerHere(19, 4); gameMap.disallowTowerHere(20, 4); gameMap.disallowTowerHere(21, 4); gameMap.disallowTowerHere(22, 4); gameMap.disallowTowerHere(17, 5); gameMap.disallowTowerHere(18, 5); gameMap.disallowTowerHere(19, 5); gameMap.disallowTowerHere(20, 5); gameMap.disallowTowerHere(21, 5); gameMap.disallowTowerHere(22, 5); gameMap.disallowTowerHere(19, 6); gameMap.disallowTowerHere(20, 6); gameMap.disallowTowerHere(19, 7); gameMap.disallowTowerHere(20, 7); gameMap.disallowTowerHere(19, 31); gameMap.disallowTowerHere(19, 32); gameMap.disallowTowerHere(20, 31); gameMap.disallowTowerHere(20, 32); gameMap.disallowTowerHere(17, 33); gameMap.disallowTowerHere(18, 33); gameMap.disallowTowerHere(19, 33); gameMap.disallowTowerHere(20, 33); gameMap.disallowTowerHere(21, 33); gameMap.disallowTowerHere(22, 33); gameMap.disallowTowerHere(17, 34); gameMap.disallowTowerHere(18, 34); gameMap.disallowTowerHere(19, 34); gameMap.disallowTowerHere(20, 34); gameMap.disallowTowerHere(21, 34); gameMap.disallowTowerHere(22, 34); gameMap.disallowTowerHere(39, 33); gameMap.disallowTowerHere(39, 34); } public function mouseOut_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(1); } private function completeHandler(_arg1:Event):void{ var _local2:URLLoader; _local2 = URLLoader(_arg1.target); if (_local2.data == "ijmikhh"){ startGame(); }; } public function resetGame(){ var _local1:*; var _local2:*; while (this.numChildren > 0) { this.removeChildAt((this.numChildren - 1)); }; _local1 = 0; while (_local1 < listTowers.length) { listTowers[_local1].removeTower(); _local1++; }; _local2 = 0; while (_local2 < listNPC.length) { listNPC[_local2].removeTween(); _local2++; }; UI.removeUI(); listNPC = null; listTowersPerLevel = null; mc = null; player = null; gameMap = null; UI = null; listNPC = new Array(); listTowers = new Array(); listTowersPerLevel = new Array(); startGame(); } public function mouseDown_handler(_arg1:MouseEvent):void{ _arg1.target.gotoAndStop(3); } } }//package
Section 82
//GemTextArea (GemTextArea) package { import flash.display.*; public dynamic class GemTextArea extends MovieClip { } }//package
Section 83
//Gold (Gold) package { import flash.display.*; public dynamic class Gold extends MovieClip { } }//package
Section 84
//GreatAmethyst (GreatAmethyst) package { import flash.display.*; public dynamic class GreatAmethyst extends MovieClip { } }//package
Section 85
//GreatAquamarine (GreatAquamarine) package { import flash.display.*; public dynamic class GreatAquamarine extends MovieClip { } }//package
Section 86
//GreatDiamond (GreatDiamond) package { import flash.display.*; public dynamic class GreatDiamond extends MovieClip { } }//package
Section 87
//GreatEmerald (GreatEmerald) package { import flash.display.*; public dynamic class GreatEmerald extends MovieClip { } }//package
Section 88
//GreatOpal (GreatOpal) package { import flash.display.*; public dynamic class GreatOpal extends MovieClip { } }//package
Section 89
//GreatPinkDiamond (GreatPinkDiamond) package { import flash.display.*; public dynamic class GreatPinkDiamond extends MovieClip { } }//package
Section 90
//GreatRuby (GreatRuby) package { import flash.display.*; public dynamic class GreatRuby extends MovieClip { } }//package
Section 91
//GreatSapphire (GreatSapphire) package { import flash.display.*; public dynamic class GreatSapphire extends MovieClip { } }//package
Section 92
//GreatTopaz (GreatTopaz) package { import flash.display.*; public dynamic class GreatTopaz extends MovieClip { } }//package
Section 93
//Hard (Hard) package { import flash.display.*; public dynamic class Hard extends MovieClip { public function Hard(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 94
//HardDiff (HardDiff) package { import flash.display.*; public dynamic class HardDiff extends MovieClip { } }//package
Section 95
//Insane (Insane) package { import flash.display.*; public dynamic class Insane extends MovieClip { public function Insane(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 96
//InsaneDiff (InsaneDiff) package { import flash.display.*; public dynamic class InsaneDiff extends MovieClip { } }//package
Section 97
//Jade (Jade) package { import flash.display.*; public dynamic class Jade extends MovieClip { } }//package
Section 98
//KeepTower (KeepTower) package { import flash.display.*; public dynamic class KeepTower extends MovieClip { public function KeepTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 99
//Lives (Lives) package { import flash.display.*; public dynamic class Lives extends MovieClip { public function Lives(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 100
//Lost (Lost) package { import flash.display.*; public dynamic class Lost extends MovieClip { } }//package
Section 101
//LuckyAsianJade (LuckyAsianJade) package { import flash.display.*; public dynamic class LuckyAsianJade extends MovieClip { } }//package
Section 102
//Malachite (Malachite) package { import flash.display.*; public dynamic class Malachite extends MovieClip { } }//package
Section 103
//MightyMalachite (MightyMalachite) package { import flash.display.*; public dynamic class MightyMalachite extends MovieClip { } }//package
Section 104
//MysticBlackOpal (MysticBlackOpal) package { import flash.display.*; public dynamic class MysticBlackOpal extends MovieClip { } }//package
Section 105
//No (No) package { import flash.display.*; public dynamic class No extends MovieClip { public function No(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 106
//Normal (Normal) package { import flash.display.*; public dynamic class Normal extends MovieClip { public function Normal(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 107
//NormalAmethyst (NormalAmethyst) package { import flash.display.*; public dynamic class NormalAmethyst extends MovieClip { } }//package
Section 108
//NormalAquamarine (NormalAquamarine) package { import flash.display.*; public dynamic class NormalAquamarine extends MovieClip { } }//package
Section 109
//NormalDiamond (NormalDiamond) package { import flash.display.*; public dynamic class NormalDiamond extends MovieClip { } }//package
Section 110
//NormalDiff (NormalDiff) package { import flash.display.*; public dynamic class NormalDiff extends MovieClip { } }//package
Section 111
//NormalEmerald (NormalEmerald) package { import flash.display.*; public dynamic class NormalEmerald extends MovieClip { } }//package
Section 112
//NormalOpal (NormalOpal) package { import flash.display.*; public dynamic class NormalOpal extends MovieClip { } }//package
Section 113
//NormalRuby (NormalRuby) package { import flash.display.*; public dynamic class NormalRuby extends MovieClip { } }//package
Section 114
//NormalSapphire (NormalSapphire) package { import flash.display.*; public dynamic class NormalSapphire extends MovieClip { } }//package
Section 115
//NormalTopaz (NormalTopaz) package { import flash.display.*; public dynamic class NormalTopaz extends MovieClip { } }//package
Section 116
//ParaibaTourmaline (ParaibaTourmaline) package { import flash.display.*; public dynamic class ParaibaTourmaline extends MovieClip { } }//package
Section 117
//ParaibaTourmalineFacet (ParaibaTourmalineFacet) package { import flash.display.*; public dynamic class ParaibaTourmalineFacet extends MovieClip { } }//package
Section 118
//PerfectAmethyst (PerfectAmethyst) package { import flash.display.*; public dynamic class PerfectAmethyst extends MovieClip { } }//package
Section 119
//PerfectAquamarine (PerfectAquamarine) package { import flash.display.*; public dynamic class PerfectAquamarine extends MovieClip { } }//package
Section 120
//PerfectDiamond (PerfectDiamond) package { import flash.display.*; public dynamic class PerfectDiamond extends MovieClip { } }//package
Section 121
//PerfectEmerald (PerfectEmerald) package { import flash.display.*; public dynamic class PerfectEmerald extends MovieClip { } }//package
Section 122
//PerfectOpal (PerfectOpal) package { import flash.display.*; public dynamic class PerfectOpal extends MovieClip { } }//package
Section 123
//PerfectRuby (PerfectRuby) package { import flash.display.*; public dynamic class PerfectRuby extends MovieClip { } }//package
Section 124
//PerfectSapphire (PerfectSapphire) package { import flash.display.*; public dynamic class PerfectSapphire extends MovieClip { public function PerfectSapphire(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 125
//PerfectTopaz (PerfectTopaz) package { import flash.display.*; public dynamic class PerfectTopaz extends MovieClip { } }//package
Section 126
//PinkDiamond (PinkDiamond) package { import flash.display.*; public dynamic class PinkDiamond extends MovieClip { } }//package
Section 127
//PlayerLost (PlayerLost) package { import flash.display.*; public dynamic class PlayerLost extends MovieClip { } }//package
Section 128
//PlayerWin (PlayerWin) package { import flash.display.*; public dynamic class PlayerWin extends MovieClip { } }//package
Section 129
//ProjectileAmethyst (ProjectileAmethyst) package { import flash.display.*; public dynamic class ProjectileAmethyst extends MovieClip { } }//package
Section 130
//ProjectileAqua (ProjectileAqua) package { import flash.display.*; public dynamic class ProjectileAqua extends MovieClip { } }//package
Section 131
//ProjectileDiamond (ProjectileDiamond) package { import flash.display.*; public dynamic class ProjectileDiamond extends MovieClip { } }//package
Section 132
//ProjectileEmerald (ProjectileEmerald) package { import flash.display.*; public dynamic class ProjectileEmerald extends MovieClip { } }//package
Section 133
//ProjectileOld (ProjectileOld) package { import flash.display.*; public dynamic class ProjectileOld extends MovieClip { } }//package
Section 134
//ProjectileOpal (ProjectileOpal) package { import flash.display.*; public dynamic class ProjectileOpal extends MovieClip { } }//package
Section 135
//ProjectileRuby (ProjectileRuby) package { import flash.display.*; public dynamic class ProjectileRuby extends MovieClip { } }//package
Section 136
//ProjectileSapphire (ProjectileSapphire) package { import flash.display.*; public dynamic class ProjectileSapphire extends MovieClip { } }//package
Section 137
//ProjectileTopaz (ProjectileTopaz) package { import flash.display.*; public dynamic class ProjectileTopaz extends MovieClip { } }//package
Section 138
//RedCrystal (RedCrystal) package { import flash.display.*; public dynamic class RedCrystal extends MovieClip { } }//package
Section 139
//RedCrystalFacet (RedCrystalFacet) package { import flash.display.*; public dynamic class RedCrystalFacet extends MovieClip { } }//package
Section 140
//RemoveTower (RemoveTower) package { import flash.display.*; public dynamic class RemoveTower extends MovieClip { public function RemoveTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 141
//RepickGems (RepickGems) package { import flash.display.*; public dynamic class RepickGems extends MovieClip { public function RepickGems(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 142
//ResetGame (ResetGame) package { import flash.display.*; public dynamic class ResetGame extends MovieClip { public function ResetGame(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 143
//RestartGame (RestartGame) package { import flash.display.*; public dynamic class RestartGame extends MovieClip { } }//package
Section 144
//Rock (Rock) package { import flash.display.*; public dynamic class Rock extends MovieClip { } }//package
Section 145
//RoseQuartzCrystal (RoseQuartzCrystal) package { import flash.display.*; public dynamic class RoseQuartzCrystal extends MovieClip { } }//package
Section 146
//Select (Select) package { import flash.display.*; public dynamic class Select extends MovieClip { } }//package
Section 147
//Silver (Silver) package { import flash.display.*; public dynamic class Silver extends MovieClip { } }//package
Section 148
//SilverKnight (SilverKnight) package { import flash.display.*; public dynamic class SilverKnight extends MovieClip { } }//package
Section 149
//StarRuby (StarRuby) package { import flash.display.*; public dynamic class StarRuby extends MovieClip { } }//package
Section 150
//StarYellowSapphire (StarYellowSapphire) package { import flash.display.*; public dynamic class StarYellowSapphire extends MovieClip { } }//package
Section 151
//SterlingSilver (SterlingSilver) package { import flash.display.*; public dynamic class SterlingSilver extends MovieClip { } }//package
Section 152
//SubmitScore (SubmitScore) package { import flash.display.*; public dynamic class SubmitScore extends MovieClip { public function SubmitScore(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 153
//TowerPlaced (TowerPlaced) package { import flash.display.*; public dynamic class TowerPlaced extends MovieClip { } }//package
Section 154
//UberStone (UberStone) package { import flash.display.*; public dynamic class UberStone extends MovieClip { } }//package
Section 155
//UpgradeQuality (UpgradeQuality) package { import flash.display.*; public dynamic class UpgradeQuality extends MovieClip { public function UpgradeQuality(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 156
//UpgradeTower (UpgradeTower) package { import flash.display.*; public dynamic class UpgradeTower extends MovieClip { public function UpgradeTower(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 157
//Uranium235 (Uranium235) package { import flash.display.*; public dynamic class Uranium235 extends MovieClip { } }//package
Section 158
//Uranium238 (Uranium238) package { import flash.display.*; public dynamic class Uranium238 extends MovieClip { } }//package
Section 159
//VividMalachite (VividMalachite) package { import flash.display.*; public dynamic class VividMalachite extends MovieClip { } }//package
Section 160
//Won (Won) package { import flash.display.*; public dynamic class Won extends MovieClip { } }//package
Section 161
//YellowSapphire (YellowSapphire) package { import flash.display.*; public dynamic class YellowSapphire extends MovieClip { } }//package
Section 162
//Yes (Yes) package { import flash.display.*; public dynamic class Yes extends MovieClip { public function Yes(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package

Library Items

Symbol 1 BitmapUsed by:2
Symbol 2 GraphicUses:1Used by:3
Symbol 3 MovieClip {GreatPinkDiamond}Uses:2
Symbol 4 BitmapUsed by:5
Symbol 5 GraphicUses:4Used by:6
Symbol 6 MovieClip {YellowSapphire}Uses:5
Symbol 7 BitmapUsed by:8
Symbol 8 GraphicUses:7Used by:9
Symbol 9 MovieClip {VividMalachite}Uses:8
Symbol 10 BitmapUsed by:11
Symbol 11 GraphicUses:10Used by:12
Symbol 12 MovieClip {Uranium238}Uses:11
Symbol 13 BitmapUsed by:14
Symbol 14 GraphicUses:13Used by:15
Symbol 15 MovieClip {Uranium235}Uses:14
Symbol 16 BitmapUsed by:17
Symbol 17 GraphicUses:16Used by:18
Symbol 18 MovieClip {StarYellowSapphire}Uses:17
Symbol 19 BitmapUsed by:20
Symbol 20 GraphicUses:19Used by:21
Symbol 21 MovieClip {SterlingSilver}Uses:20
Symbol 22 BitmapUsed by:23
Symbol 23 GraphicUses:22Used by:24
Symbol 24 MovieClip {StarRuby}Uses:23
Symbol 25 BitmapUsed by:26
Symbol 26 GraphicUses:25Used by:27
Symbol 27 MovieClip {SilverKnight}Uses:26
Symbol 28 BitmapUsed by:29
Symbol 29 GraphicUses:28Used by:30
Symbol 30 MovieClip {Silver}Uses:29
Symbol 31 BitmapUsed by:32
Symbol 32 GraphicUses:31Used by:33
Symbol 33 MovieClip {RedCrystalFacet}Uses:32
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:36
Symbol 36 MovieClip {RedCrystal}Uses:35
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:39
Symbol 39 MovieClip {ParaibaTourmalineFacet}Uses:38
Symbol 40 BitmapUsed by:41
Symbol 41 GraphicUses:40Used by:42
Symbol 42 MovieClip {ParaibaTourmaline}Uses:41
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:45
Symbol 45 MovieClip {MightyMalachite}Uses:44
Symbol 46 BitmapUsed by:47
Symbol 47 GraphicUses:46Used by:48
Symbol 48 MovieClip {Malachite}Uses:47
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:51
Symbol 51 MovieClip {Gold}Uses:50
Symbol 52 BitmapUsed by:53
Symbol 53 GraphicUses:52Used by:54
Symbol 54 MovieClip {FireStar}Uses:53
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:57
Symbol 57 MovieClip {EnchantedEmerald}Uses:56
Symbol 58 BitmapUsed by:59
Symbol 59 GraphicUses:58Used by:60
Symbol 60 MovieClip {EgyptianGold}Uses:59
Symbol 61 BitmapUsed by:62
Symbol 62 GraphicUses:61Used by:63
Symbol 63 MovieClip {DarkEmerald}Uses:62
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:66
Symbol 66 MovieClip {BloodStar}Uses:65
Symbol 67 BitmapUsed by:68
Symbol 68 GraphicUses:67Used by:69
Symbol 69 MovieClip {LuckyAsianJade}Uses:68
Symbol 70 BitmapUsed by:71
Symbol 71 GraphicUses:70Used by:72
Symbol 72 MovieClip {MysticBlackOpal}Uses:71
Symbol 73 BitmapUsed by:74
Symbol 74 GraphicUses:73Used by:75
Symbol 75 MovieClip {Jade}Uses:74
Symbol 76 BitmapUsed by:77
Symbol 77 GraphicUses:76Used by:78
Symbol 78 MovieClip {BlackOpal}Uses:77
Symbol 79 BitmapUsed by:80
Symbol 80 GraphicUses:79Used by:81
Symbol 81 MovieClip {BloodStone}Uses:80
Symbol 82 BitmapUsed by:83
Symbol 83 GraphicUses:82Used by:84
Symbol 84 MovieClip {AsianJade}Uses:83
Symbol 85 BitmapUsed by:86
Symbol 86 GraphicUses:85Used by:87
Symbol 87 MovieClip {AncientBloodStone}Uses:86
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:90
Symbol 90 MovieClip {PinkDiamond}Uses:89
Symbol 91 GraphicUsed by:92
Symbol 92 MovieClip {ProjectileOld}Uses:91
Symbol 93 BitmapUsed by:94
Symbol 94 GraphicUses:93Used by:99
Symbol 95 BitmapUsed by:96
Symbol 96 GraphicUses:95Used by:99
Symbol 97 BitmapUsed by:98
Symbol 98 GraphicUses:97Used by:99
Symbol 99 MovieClip {RemoveTower}Uses:94 96 98
Symbol 100 BitmapUsed by:101
Symbol 101 GraphicUses:100Used by:106
Symbol 102 BitmapUsed by:103
Symbol 103 GraphicUses:102Used by:106
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:106
Symbol 106 MovieClip {CombineSpecialTower}Uses:101 103 105
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:113
Symbol 109 BitmapUsed by:110
Symbol 110 GraphicUses:109Used by:113
Symbol 111 BitmapUsed by:112
Symbol 112 GraphicUses:111Used by:113
Symbol 113 MovieClip {UpgradeTower}Uses:108 110 112
Symbol 114 BitmapUsed by:115
Symbol 115 GraphicUses:114Used by:120
Symbol 116 BitmapUsed by:117
Symbol 117 GraphicUses:116Used by:120
Symbol 118 BitmapUsed by:119
Symbol 119 GraphicUses:118Used by:120
Symbol 120 MovieClip {CombineTower}Uses:115 117 119
Symbol 121 BitmapUsed by:122
Symbol 122 GraphicUses:121Used by:127
Symbol 123 BitmapUsed by:124
Symbol 124 GraphicUses:123Used by:127
Symbol 125 BitmapUsed by:126
Symbol 126 GraphicUses:125Used by:127
Symbol 127 MovieClip {KeepTower}Uses:122 124 126
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:134
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:134
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:134
Symbol 134 MovieClip {RepickGems}Uses:129 131 133
Symbol 135 BitmapUsed by:136
Symbol 136 GraphicUses:135Used by:141
Symbol 137 BitmapUsed by:138
Symbol 138 GraphicUses:137Used by:141
Symbol 139 BitmapUsed by:140
Symbol 140 GraphicUses:139Used by:141
Symbol 141 MovieClip {ResetGame}Uses:136 138 140
Symbol 142 BitmapUsed by:146
Symbol 143 BitmapUsed by:146
Symbol 144 BitmapUsed by:146
Symbol 145 BitmapUsed by:146
Symbol 146 GraphicUses:142 143 144 145Used by:159
Symbol 147 BitmapUsed by:152
Symbol 148 BitmapUsed by:152
Symbol 149 BitmapUsed by:152
Symbol 150 BitmapUsed by:152
Symbol 151 BitmapUsed by:152
Symbol 152 GraphicUses:147 148 149 150 151Used by:159
Symbol 153 BitmapUsed by:158
Symbol 154 BitmapUsed by:158
Symbol 155 BitmapUsed by:158
Symbol 156 BitmapUsed by:158
Symbol 157 BitmapUsed by:158
Symbol 158 GraphicUses:153 154 155 156 157Used by:159
Symbol 159 MovieClip {UpgradeQuality}Uses:146 152 158
Symbol 160 BitmapUsed by:161
Symbol 161 GraphicUses:160Used by:166
Symbol 162 BitmapUsed by:163
Symbol 163 GraphicUses:162Used by:166
Symbol 164 BitmapUsed by:165
Symbol 165 GraphicUses:164Used by:166
Symbol 166 MovieClip {BuildTower}Uses:161 163 165
Symbol 167 BitmapUsed by:168
Symbol 168 GraphicUses:167Used by:170
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClip {PerfectSapphire}Uses:168 169
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:173
Symbol 173 MovieClip {PerfectAquamarine}Uses:172
Symbol 174 BitmapUsed by:175
Symbol 175 GraphicUses:174Used by:176
Symbol 176 MovieClip {PerfectEmerald}Uses:175
Symbol 177 BitmapUsed by:178
Symbol 178 GraphicUses:177Used by:179
Symbol 179 MovieClip {PerfectAmethyst}Uses:178
Symbol 180 BitmapUsed by:181
Symbol 181 GraphicUses:180Used by:182
Symbol 182 MovieClip {PerfectRuby}Uses:181
Symbol 183 BitmapUsed by:184
Symbol 184 GraphicUses:183Used by:185
Symbol 185 MovieClip {PerfectTopaz}Uses:184
Symbol 186 BitmapUsed by:187
Symbol 187 GraphicUses:186Used by:188
Symbol 188 MovieClip {PerfectOpal}Uses:187
Symbol 189 BitmapUsed by:190
Symbol 190 GraphicUses:189Used by:191
Symbol 191 MovieClip {PerfectDiamond}Uses:190
Symbol 192 GraphicUsed by:195
Symbol 193 FontUsed by:194 349
Symbol 194 TextUses:193Used by:195
Symbol 195 MovieClip {PlayerLost}Uses:192 194
Symbol 196 BitmapUsed by:197
Symbol 197 GraphicUses:196Used by:198
Symbol 198 MovieClip {ChippedSapphire}Uses:197
Symbol 199 BitmapUsed by:200
Symbol 200 GraphicUses:199Used by:201
Symbol 201 MovieClip {ChippedAquamarine}Uses:200
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:204
Symbol 204 MovieClip {ChippedDiamond}Uses:203
Symbol 205 BitmapUsed by:206
Symbol 206 GraphicUses:205Used by:207
Symbol 207 MovieClip {ChippedEmerald}Uses:206
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:210
Symbol 210 MovieClip {ChippedAmethyst}Uses:209
Symbol 211 BitmapUsed by:212
Symbol 212 GraphicUses:211Used by:213
Symbol 213 MovieClip {ChippedRuby}Uses:212
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214Used by:216
Symbol 216 MovieClip {ChippedTopaz}Uses:215
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:219
Symbol 219 MovieClip {ChippedOpal}Uses:218
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:222
Symbol 222 MovieClip {FlawedSapphire}Uses:221
Symbol 223 BitmapUsed by:224
Symbol 224 GraphicUses:223Used by:225
Symbol 225 MovieClip {FlawedDiamond}Uses:224
Symbol 226 BitmapUsed by:227
Symbol 227 GraphicUses:226Used by:228
Symbol 228 MovieClip {FlawedAquamarine}Uses:227
Symbol 229 BitmapUsed by:230
Symbol 230 GraphicUses:229Used by:231
Symbol 231 MovieClip {FlawedEmerald}Uses:230
Symbol 232 BitmapUsed by:233
Symbol 233 GraphicUses:232Used by:234
Symbol 234 MovieClip {FlawedOpal}Uses:233
Symbol 235 BitmapUsed by:236
Symbol 236 GraphicUses:235Used by:237
Symbol 237 MovieClip {FlawedRuby}Uses:236
Symbol 238 BitmapUsed by:239
Symbol 239 GraphicUses:238Used by:240
Symbol 240 MovieClip {FlawedAmethyst}Uses:239
Symbol 241 BitmapUsed by:242
Symbol 242 GraphicUses:241Used by:243
Symbol 243 MovieClip {FlawedTopaz}Uses:242
Symbol 244 BitmapUsed by:245
Symbol 245 GraphicUses:244Used by:246
Symbol 246 MovieClip {NormalSapphire}Uses:245
Symbol 247 BitmapUsed by:248
Symbol 248 GraphicUses:247Used by:249
Symbol 249 MovieClip {NormalAquamarine}Uses:248
Symbol 250 BitmapUsed by:251
Symbol 251 GraphicUses:250Used by:252
Symbol 252 MovieClip {NormalEmerald}Uses:251
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:255
Symbol 255 MovieClip {NormalOpal}Uses:254
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:258
Symbol 258 MovieClip {NormalDiamond}Uses:257
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:261
Symbol 261 MovieClip {NormalAmethyst}Uses:260
Symbol 262 BitmapUsed by:263
Symbol 263 GraphicUses:262Used by:264
Symbol 264 MovieClip {NormalTopaz}Uses:263
Symbol 265 BitmapUsed by:266
Symbol 266 GraphicUses:265Used by:267
Symbol 267 MovieClip {NormalRuby}Uses:266
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:270
Symbol 270 MovieClip {FlawlessSapphire}Uses:269
Symbol 271 BitmapUsed by:272
Symbol 272 GraphicUses:271Used by:273
Symbol 273 MovieClip {FlawlessAquamarine}Uses:272
Symbol 274 BitmapUsed by:275
Symbol 275 GraphicUses:274Used by:276
Symbol 276 MovieClip {FlawlessAmethyst}Uses:275
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:279
Symbol 279 MovieClip {FlawlessRuby}Uses:278
Symbol 280 BitmapUsed by:281
Symbol 281 GraphicUses:280Used by:282
Symbol 282 MovieClip {FlawlessTopaz}Uses:281
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:285
Symbol 285 MovieClip {FlawlessOpal}Uses:284
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:288
Symbol 288 MovieClip {FlawlessEmerald}Uses:287
Symbol 289 BitmapUsed by:290
Symbol 290 GraphicUses:289Used by:291
Symbol 291 MovieClip {FlawlessDiamond}Uses:290
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:294
Symbol 294 MovieClip {Rock}Uses:293
Symbol 295 BitmapUsed by:296
Symbol 296 GraphicUses:295Used by:303
Symbol 297 BitmapUsed by:298
Symbol 298 GraphicUses:297Used by:303
Symbol 299 BitmapUsed by:300
Symbol 300 GraphicUses:299Used by:303
Symbol 301 BitmapUsed by:302
Symbol 302 GraphicUses:301Used by:303
Symbol 303 MovieClip {Flamestrike}Uses:296 298 300 302
Symbol 304 BitmapUsed by:305
Symbol 305 GraphicUses:304Used by:312
Symbol 306 BitmapUsed by:307
Symbol 307 GraphicUses:306Used by:312
Symbol 308 BitmapUsed by:309
Symbol 309 GraphicUses:308Used by:312
Symbol 310 BitmapUsed by:311
Symbol 311 GraphicUses:310Used by:312
Symbol 312 MovieClip {Frostnova}Uses:305 307 309 311
Symbol 313 BitmapUsed by:314
Symbol 314 GraphicUses:313Used by:319
Symbol 315 BitmapUsed by:316
Symbol 316 GraphicUses:315Used by:319
Symbol 317 BitmapUsed by:318
Symbol 318 GraphicUses:317Used by:319
Symbol 319 MovieClip {Easy}Uses:314 316 318
Symbol 320 BitmapUsed by:321
Symbol 321 GraphicUses:320Used by:326
Symbol 322 BitmapUsed by:323
Symbol 323 GraphicUses:322Used by:326
Symbol 324 BitmapUsed by:325
Symbol 325 GraphicUses:324Used by:326
Symbol 326 MovieClip {Normal}Uses:321 323 325
Symbol 327 BitmapUsed by:328
Symbol 328 GraphicUses:327Used by:333
Symbol 329 BitmapUsed by:330
Symbol 330 GraphicUses:329Used by:333
Symbol 331 BitmapUsed by:332
Symbol 332 GraphicUses:331Used by:333
Symbol 333 MovieClip {Hard}Uses:328 330 332
Symbol 334 BitmapUsed by:335
Symbol 335 GraphicUses:334Used by:340
Symbol 336 BitmapUsed by:337
Symbol 337 GraphicUses:336Used by:340
Symbol 338 BitmapUsed by:339
Symbol 339 GraphicUses:338Used by:340
Symbol 340 MovieClip {Extreme}Uses:335 337 339
Symbol 341 BitmapUsed by:342
Symbol 342 GraphicUses:341Used by:347
Symbol 343 BitmapUsed by:344
Symbol 344 GraphicUses:343Used by:347
Symbol 345 BitmapUsed by:346
Symbol 346 GraphicUses:345Used by:347
Symbol 347 MovieClip {DowngradeTower}Uses:342 344 346
Symbol 348 GraphicUsed by:350
Symbol 349 TextUses:193Used by:350
Symbol 350 MovieClip {PlayerWin}Uses:348 349
Symbol 351 BitmapUsed by:355
Symbol 352 BitmapUsed by:355
Symbol 353 BitmapUsed by:355
Symbol 354 BitmapUsed by:355
Symbol 355 GraphicUses:351 352 353 354Used by:368
Symbol 356 BitmapUsed by:361
Symbol 357 BitmapUsed by:361
Symbol 358 BitmapUsed by:361
Symbol 359 BitmapUsed by:361
Symbol 360 BitmapUsed by:361
Symbol 361 GraphicUses:356 357 358 359 360Used by:368
Symbol 362 BitmapUsed by:367
Symbol 363 BitmapUsed by:367
Symbol 364 BitmapUsed by:367
Symbol 365 BitmapUsed by:367
Symbol 366 BitmapUsed by:367
Symbol 367 GraphicUses:362 363 364 365 366Used by:368
Symbol 368 MovieClip {SubmitScore}Uses:355 361 367
Symbol 369 BitmapUsed by:370
Symbol 370 GraphicUses:369Used by:371
Symbol 371 MovieClip {Elephant}Uses:370
Symbol 372 BitmapUsed by:373
Symbol 373 GraphicUses:372Used by:374
Symbol 374 MovieClip {Deer}Uses:373
Symbol 375 BitmapUsed by:376
Symbol 376 GraphicUses:375Used by:381
Symbol 377 BitmapUsed by:378
Symbol 378 GraphicUses:377Used by:381
Symbol 379 BitmapUsed by:380
Symbol 380 GraphicUses:379Used by:381
Symbol 381 MovieClip {Insane}Uses:376 378 380
Symbol 382 BitmapUsed by:383
Symbol 383 GraphicUses:382Used by:384
Symbol 384 MovieClip {GemTextArea}Uses:383
Symbol 385 BitmapUsed by:386
Symbol 386 GraphicUses:385Used by:387
Symbol 387 MovieClip {InsaneDiff}Uses:386
Symbol 388 BitmapUsed by:389
Symbol 389 GraphicUses:388Used by:390
Symbol 390 MovieClip {NormalDiff}Uses:389
Symbol 391 BitmapUsed by:392
Symbol 392 GraphicUses:391Used by:393
Symbol 393 MovieClip {EasyDiff}Uses:392
Symbol 394 BitmapUsed by:395
Symbol 395 GraphicUses:394Used by:396
Symbol 396 MovieClip {ExtremeDiff}Uses:395
Symbol 397 BitmapUsed by:398
Symbol 398 GraphicUses:397Used by:399
Symbol 399 MovieClip {HardDiff}Uses:398
Symbol 400 BitmapUsed by:401
Symbol 401 GraphicUses:400Used by:402
Symbol 402 MovieClip {RoseQuartzCrystal}Uses:401
Symbol 403 BitmapUsed by:404
Symbol 404 GraphicUses:403Used by:405
Symbol 405 MovieClip {Select}Uses:404
Symbol 406 MovieClip {Frost}
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:407Used by:415
Symbol 409 BitmapUsed by:410
Symbol 410 GraphicUses:409Used by:415
Symbol 411 BitmapUsed by:412
Symbol 412 GraphicUses:411Used by:415
Symbol 413 BitmapUsed by:414
Symbol 414 GraphicUses:413Used by:415
Symbol 415 MovieClip {Axedwarf}Uses:408 410 412 414
Symbol 416 BitmapUsed by:417
Symbol 417 GraphicUses:416Used by:418
Symbol 418 MovieClip {GreatAmethyst}Uses:417
Symbol 419 BitmapUsed by:420
Symbol 420 GraphicUses:419Used by:421
Symbol 421 MovieClip {GreatAquamarine}Uses:420
Symbol 422 BitmapUsed by:423
Symbol 423 GraphicUses:422Used by:424
Symbol 424 MovieClip {UberStone}Uses:423
Symbol 425 BitmapUsed by:426
Symbol 426 GraphicUses:425Used by:427
Symbol 427 MovieClip {GreatDiamond}Uses:426
Symbol 428 BitmapUsed by:429
Symbol 429 GraphicUses:428Used by:430
Symbol 430 MovieClip {GreatEmerald}Uses:429
Symbol 431 BitmapUsed by:432
Symbol 432 GraphicUses:431Used by:433
Symbol 433 MovieClip {GreatOpal}Uses:432
Symbol 434 BitmapUsed by:435
Symbol 435 GraphicUses:434Used by:436
Symbol 436 MovieClip {GreatRuby}Uses:435
Symbol 437 BitmapUsed by:438
Symbol 438 GraphicUses:437Used by:439
Symbol 439 MovieClip {GreatSapphire}Uses:438
Symbol 440 BitmapUsed by:441
Symbol 441 GraphicUses:440Used by:442
Symbol 442 MovieClip {GreatTopaz}Uses:441
Symbol 443 BitmapUsed by:449
Symbol 444 BitmapUsed by:449
Symbol 445 BitmapUsed by:449
Symbol 446 BitmapUsed by:449
Symbol 447 BitmapUsed by:449
Symbol 448 BitmapUsed by:449
Symbol 449 GraphicUses:443 444 445 446 447 448Used by:450
Symbol 450 MovieClip {Won}Uses:449
Symbol 451 BitmapUsed by:452
Symbol 452 GraphicUses:451Used by:453
Symbol 453 MovieClip {Lost}Uses:452
Symbol 454 BitmapUsed by:459
Symbol 455 BitmapUsed by:459
Symbol 456 BitmapUsed by:459
Symbol 457 BitmapUsed by:459
Symbol 458 BitmapUsed by:459
Symbol 459 GraphicUses:454 455 456 457 458Used by:460
Symbol 460 MovieClip {Blocking}Uses:459
Symbol 461 BitmapUsed by:466
Symbol 462 BitmapUsed by:466
Symbol 463 BitmapUsed by:466
Symbol 464 BitmapUsed by:466
Symbol 465 BitmapUsed by:466
Symbol 466 GraphicUses:461 462 463 464 465Used by:467
Symbol 467 MovieClip {CannotBuildThere}Uses:466
Symbol 468 BitmapUsed by:469
Symbol 469 GraphicUses:468Used by:476
Symbol 470 BitmapUsed by:471
Symbol 471 GraphicUses:470Used by:476
Symbol 472 BitmapUsed by:473
Symbol 473 GraphicUses:472Used by:476
Symbol 474 BitmapUsed by:475
Symbol 475 GraphicUses:474Used by:476
Symbol 476 MovieClip {Batman}Uses:469 471 473 475
Symbol 477 BitmapUsed by:478
Symbol 478 GraphicUses:477Used by:479
Symbol 479 MovieClip {FlyingLevel}Uses:478
Symbol 480 BitmapUsed by:481
Symbol 481 GraphicUses:480Used by:486
Symbol 482 BitmapUsed by:483
Symbol 483 GraphicUses:482Used by:486
Symbol 484 BitmapUsed by:485
Symbol 485 GraphicUses:484Used by:486
Symbol 486 MovieClip {Yes}Uses:481 483 485
Symbol 487 BitmapUsed by:491
Symbol 488 BitmapUsed by:491
Symbol 489 BitmapUsed by:491
Symbol 490 BitmapUsed by:491
Symbol 491 GraphicUses:487 488 489 490Used by:492
Symbol 492 MovieClip {RestartGame}Uses:491
Symbol 493 BitmapUsed by:494
Symbol 494 GraphicUses:493Used by:499
Symbol 495 BitmapUsed by:496
Symbol 496 GraphicUses:495Used by:499
Symbol 497 BitmapUsed by:498
Symbol 498 GraphicUses:497Used by:499
Symbol 499 MovieClip {No}Uses:494 496 498
Symbol 500 BitmapUsed by:501
Symbol 501 GraphicUses:500Used by:506
Symbol 502 BitmapUsed by:503
Symbol 503 GraphicUses:502Used by:506
Symbol 504 BitmapUsed by:505
Symbol 505 GraphicUses:504Used by:506
Symbol 506 MovieClip {Lives}Uses:501 503 505
Symbol 507 BitmapUsed by:508
Symbol 508 GraphicUses:507Used by:513
Symbol 509 BitmapUsed by:510
Symbol 510 GraphicUses:509Used by:513
Symbol 511 BitmapUsed by:512
Symbol 512 GraphicUses:511Used by:513
Symbol 513 MovieClip {BuyFive}Uses:508 510 512
Symbol 514 BitmapUsed by:515
Symbol 515 GraphicUses:514Used by:520
Symbol 516 BitmapUsed by:517
Symbol 517 GraphicUses:516Used by:520
Symbol 518 BitmapUsed by:519
Symbol 519 GraphicUses:518Used by:520
Symbol 520 MovieClip {BuyOne}Uses:515 517 519
Symbol 521 BitmapUsed by:522
Symbol 522 GraphicUses:521Used by:523 533
Symbol 523 MovieClip {ProjectileAqua}Uses:522
Symbol 524 BitmapUsed by:525
Symbol 525 GraphicUses:524Used by:526
Symbol 526 MovieClip {ProjectileAmethyst}Uses:525
Symbol 527 BitmapUsed by:528
Symbol 528 GraphicUses:527Used by:529
Symbol 529 MovieClip {ProjectileDiamond}Uses:528
Symbol 530 BitmapUsed by:531
Symbol 531 GraphicUses:530Used by:532
Symbol 532 MovieClip {ProjectileEmerald}Uses:531
Symbol 533 MovieClip {ProjectileOpal}Uses:522
Symbol 534 BitmapUsed by:535
Symbol 535 GraphicUses:534Used by:536
Symbol 536 MovieClip {ProjectileRuby}Uses:535
Symbol 537 BitmapUsed by:538
Symbol 538 GraphicUses:537Used by:539
Symbol 539 MovieClip {ProjectileSapphire}Uses:538
Symbol 540 BitmapUsed by:541
Symbol 541 GraphicUses:540Used by:542
Symbol 542 MovieClip {ProjectileTopaz}Uses:541
Symbol 543 BitmapUsed by:544
Symbol 544 GraphicUses:543Used by:545
Symbol 545 MovieClip {TowerPlaced}Uses:544
Symbol 546 BitmapUsed by:557
Symbol 547 BitmapUsed by:557
Symbol 548 BitmapUsed by:557
Symbol 549 BitmapUsed by:557
Symbol 550 BitmapUsed by:557
Symbol 551 BitmapUsed by:557
Symbol 552 BitmapUsed by:557
Symbol 553 BitmapUsed by:557
Symbol 554 BitmapUsed by:557
Symbol 555 BitmapUsed by:557
Symbol 556 BitmapUsed by:557
Symbol 557 GraphicUses:546 547 548 549 550 551 552 553 554 555 556Used by:Timeline

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 131 bytes "..$1$m.$mrgqx/oxOWmHqsSn5d1Bp0."

Labels

"loaded"Frame 1




http://swfchan.com/1/2526/info.shtml
Created: 17/6 -2019 14:46:34 Last modified: 17/6 -2019 14:46:34 Server time: 22/12 -2024 22:02:15