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

7586cada.swf

This is the info page for
Flash #94306

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


Text
Knuckle

Cracker

D

ActionScript [AS3]

Section 1
//_-3 (_-6._-3) package _-6 { import flash.net.*; import flash.display.*; public class _-3 { static const _-:Array; static const _-5:Array; static const _-1:Array; static const _-9:Boolean; public function _-3(){ var _local1:Boolean; //unresolved jump //unresolved jump !NULL!; var _local2 = (!NULL! | !NULL!); _local2 = !NULL!; if (((_local1) || (_local1))){ super(); }; } public static function _-8(_arg1:int, _arg2:int):String{ var _local10:Boolean; //unresolved jump ~(!NULL!); var _local11 = (!NULL! < !NULL!); var _local3:String; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:*; var _local9:*; if (((_local10) || (_local3))){ _local3 = ""; if (!_local11){ //unresolved if _local4 = 0; //unresolved if }; _local5 = _-[((_arg1 - 5) ^ 819)].length; }; while (_local4 < _local5) { if (!((_local11) && (_arg1))){ _local6 = int(_-[((_arg1 - 5) ^ 819)][_local4]); //unresolved if //unresolved if //unresolved if //unresolved if }; _local4 = int(_-[((_arg1 - 5) ^ 819)][_local4]); //unresolved if //unresolved if _local7 = int(_-[((_arg1 - 5) ^ 819)][_local4]); //unresolved if _local8 = 2654435769; _local9 = 84941944608; if (!_local11){ for (;_local9 != 0;if (_local10){ //unresolved if _local7 = (((((!NULL! + !NULL!) ^ 532)[!NULL!][((_local9 >>> 11) & 3)].int(!NULL!) + !NULL!) ^ !NULL!) - !NULL!); //unresolved if }, (_local9 = (((((!NULL! + !NULL!) ^ 532)[!NULL!][((_local9 >>> 11) & 3)].int(!NULL!) + !NULL!) ^ !NULL!) - !NULL!)), if (_local10){ if (!((_local11) && (_local3))){ if (_local10){ //unresolved if //unresolved if }; if (((_local10) || (_arg2))){ //unresolved if }; }; }) { //unresolved if if (!_local11){ //unresolved if //unresolved if }; if (_local10){ //unresolved if }; continue; _local0 = _arg1; }; //unresolved if if (!_local11){ }; //unresolved if }; if (_local10){ //unresolved if }; }; if (!_local11){ if (((_local10) || (_arg2))){ //unresolved if //unresolved if if (_local10){ //unresolved jump ~((_local3 is ((0 - 1) >= _arg2))); //unresolved if }; }; }; return (_local3); } public static function _-7(_arg1:MovieClip):Boolean{ var _local4:Boolean; //unresolved jump var _local3:Boolean; var _local5 = ??getglobalscope ; var _local2:String; _local3 = 0; if (_local4){ if (_local4){ _local2 = new LocalConnection().domain; //unresolved if //unresolved if //unresolved if //unresolved if }; if (new LocalConnection().domain == "localhost"){ //unresolved if _arg1.stage.removeChildAt(0); //unresolved if //unresolved if return (false); //unresolved if }; if (_-1.length == 0){ //unresolved jump var _temp1 = _-3; _local0 = //unresolved nextvalue or nextname; _temp1; (((!NULL! - 1) <= !NULL!) * !NULL!); if (!!NULL!){ !NULL!; }; //unresolved if return (true); //unresolved if }; _local3 = 0; }; while (_local3 < _-1.length) { if (_local2 == _-1[_local3]){ //unresolved if //unresolved if return (true); //unresolved if }; _local3++; //unresolved if }; if (!_local4){ //unresolved jump _local2 = _local4; ??hasnext ; }; if (_local4){ _arg1.stage.removeChildAt(0); }; return (false); } //unresolved jump var _local1:Boolean; _local1 = (((true * typeof((null - 1))) <= !NULL!) === _local1); !ERROR! if (!((_local1) && (_-3))){ _-5 = new Array([-1386239655, 1921968967, 1763943689, -1174156475], [-45542980, -842802767, 1320799804, -1185859419]); //unresolved if }; //unresolved jump new [, , 1744184032, -582261189, -2083601796, -1585368364, 353056915, 264377978, -153447451, -1260733224, 1182205647, -953008034, 1111987409, 113361223, 1366654813, 1829538262, //unresolved nextvalue or nextname, -898407112, -1160389344, 1240730969, 777902308, -1490099779].Array([-1015229919, 230178423, 209127162, 1276363493, 1987148433, -2064200726, 1490502163, -1378369556, -528550271, 678375867, -970884707, -1634332445, -1469458789, 1337594361, -2050584884, 1671803623, 87393755, -827672068], !NULL!)._- = !NULL!; if (!((_local1) && (_-3))){ _-9 = true; if (((_local2) || (_-3))){ //unresolved jump _local2 = ( * ( % //unresolved nextvalue or nextname)); new (!NULL! / (!NULL! >> !NULL!))._-8(!NULL!, !NULL!).Array(_-3._-8(823, 530), !NULL!)._-1 = !NULL!; }; }; } }//package _-6
Section 2
//DisplayShortcuts (caurina.transitions.properties.DisplayShortcuts) package caurina.transitions.properties { import flash.geom.*; import caurina.transitions.*; public class DisplayShortcuts { public function DisplayShortcuts(){ trace("This is an static class and should not be instantiated."); } public static function init():void{ Tweener.registerSpecialProperty("_frame", _frame_get, _frame_set); Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set); Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter); Tweener.registerSpecialPropertySplitter("_scrollRect", _scrollRect_splitter); Tweener.registerSpecialProperty("_scrollRect_x", _scrollRect_property_get, _scrollRect_property_set, ["x"]); Tweener.registerSpecialProperty("_scrollRect_y", _scrollRect_property_get, _scrollRect_property_set, ["y"]); Tweener.registerSpecialProperty("_scrollRect_left", _scrollRect_property_get, _scrollRect_property_set, ["left"]); Tweener.registerSpecialProperty("_scrollRect_right", _scrollRect_property_get, _scrollRect_property_set, ["right"]); Tweener.registerSpecialProperty("_scrollRect_top", _scrollRect_property_get, _scrollRect_property_set, ["top"]); Tweener.registerSpecialProperty("_scrollRect_bottom", _scrollRect_property_get, _scrollRect_property_set, ["bottom"]); Tweener.registerSpecialProperty("_scrollRect_width", _scrollRect_property_get, _scrollRect_property_set, ["width"]); Tweener.registerSpecialProperty("_scrollRect_height", _scrollRect_property_get, _scrollRect_property_set, ["height"]); } public static function _frame_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ _arg1.gotoAndStop(Math.round(_arg2)); } public static function _autoAlpha_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ _arg1.alpha = _arg2; _arg1.visible = (_arg2 > 0); } public static function _frame_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return (_arg1.currentFrame); } public static function _scrollRect_splitter(_arg1:Rectangle, _arg2:Array, _arg3:Object=null):Array{ var _local4:Array = new Array(); if (_arg1 == null){ _local4.push({name:"_scrollRect_x", value:0}); _local4.push({name:"_scrollRect_y", value:0}); _local4.push({name:"_scrollRect_width", value:100}); _local4.push({name:"_scrollRect_height", value:100}); } else { _local4.push({name:"_scrollRect_x", value:_arg1.x}); _local4.push({name:"_scrollRect_y", value:_arg1.y}); _local4.push({name:"_scrollRect_width", value:_arg1.width}); _local4.push({name:"_scrollRect_height", value:_arg1.height}); }; return (_local4); } public static function _autoAlpha_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return (_arg1.alpha); } public static function _scrollRect_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return (_arg1.scrollRect[_arg2[0]]); } public static function _scale_splitter(_arg1:Number, _arg2:Array):Array{ var _local3:Array = new Array(); _local3.push({name:"scaleX", value:_arg1}); _local3.push({name:"scaleY", value:_arg1}); return (_local3); } public static function _scrollRect_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:Rectangle = _arg1.scrollRect; _local5[_arg3[0]] = Math.round(_arg2); _arg1.scrollRect = _local5; } } }//package caurina.transitions.properties
Section 3
//FilterShortcuts (caurina.transitions.properties.FilterShortcuts) package caurina.transitions.properties { import caurina.transitions.*; import flash.display.*; import flash.filters.*; import flash.geom.*; public class FilterShortcuts { public function FilterShortcuts(){ trace("This is an static class and should not be instantiated."); } public static function init():void{ Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter); Tweener.registerSpecialProperty("_Bevel_angle", _filter_property_get, _filter_property_set, [BevelFilter, "angle"]); Tweener.registerSpecialProperty("_Bevel_blurX", _filter_property_get, _filter_property_set, [BevelFilter, "blurX"]); Tweener.registerSpecialProperty("_Bevel_blurY", _filter_property_get, _filter_property_set, [BevelFilter, "blurY"]); Tweener.registerSpecialProperty("_Bevel_distance", _filter_property_get, _filter_property_set, [BevelFilter, "distance"]); Tweener.registerSpecialProperty("_Bevel_highlightAlpha", _filter_property_get, _filter_property_set, [BevelFilter, "highlightAlpha"]); Tweener.registerSpecialPropertySplitter("_Bevel_highlightColor", _generic_color_splitter, ["_Bevel_highlightColor_r", "_Bevel_highlightColor_g", "_Bevel_highlightColor_b"]); Tweener.registerSpecialProperty("_Bevel_highlightColor_r", _filter_property_get, _filter_property_set, [BevelFilter, "highlightColor", "color", "r"]); Tweener.registerSpecialProperty("_Bevel_highlightColor_g", _filter_property_get, _filter_property_set, [BevelFilter, "highlightColor", "color", "g"]); Tweener.registerSpecialProperty("_Bevel_highlightColor_b", _filter_property_get, _filter_property_set, [BevelFilter, "highlightColor", "color", "b"]); Tweener.registerSpecialProperty("_Bevel_knockout", _filter_property_get, _filter_property_set, [BevelFilter, "knockout"]); Tweener.registerSpecialProperty("_Bevel_quality", _filter_property_get, _filter_property_set, [BevelFilter, "quality"]); Tweener.registerSpecialProperty("_Bevel_shadowAlpha", _filter_property_get, _filter_property_set, [BevelFilter, "shadowAlpha"]); Tweener.registerSpecialPropertySplitter("_Bevel_shadowColor", _generic_color_splitter, ["_Bevel_shadowColor_r", "_Bevel_shadowColor_g", "_Bevel_shadowColor_b"]); Tweener.registerSpecialProperty("_Bevel_shadowColor_r", _filter_property_get, _filter_property_set, [BevelFilter, "shadowColor", "color", "r"]); Tweener.registerSpecialProperty("_Bevel_shadowColor_g", _filter_property_get, _filter_property_set, [BevelFilter, "shadowColor", "color", "g"]); Tweener.registerSpecialProperty("_Bevel_shadowColor_b", _filter_property_get, _filter_property_set, [BevelFilter, "shadowColor", "color", "b"]); Tweener.registerSpecialProperty("_Bevel_strength", _filter_property_get, _filter_property_set, [BevelFilter, "strength"]); Tweener.registerSpecialProperty("_Bevel_type", _filter_property_get, _filter_property_set, [BevelFilter, "type"]); 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("_ColorMatrix_matrix", _generic_matrix_splitter, [[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], ["_ColorMatrix_matrix_rr", "_ColorMatrix_matrix_rg", "_ColorMatrix_matrix_rb", "_ColorMatrix_matrix_ra", "_ColorMatrix_matrix_ro", "_ColorMatrix_matrix_gr", "_ColorMatrix_matrix_gg", "_ColorMatrix_matrix_gb", "_ColorMatrix_matrix_ga", "_ColorMatrix_matrix_go", "_ColorMatrix_matrix_br", "_ColorMatrix_matrix_bg", "_ColorMatrix_matrix_bb", "_ColorMatrix_matrix_ba", "_ColorMatrix_matrix_bo", "_ColorMatrix_matrix_ar", "_ColorMatrix_matrix_ag", "_ColorMatrix_matrix_ab", "_ColorMatrix_matrix_aa", "_ColorMatrix_matrix_ao"]]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_rr", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 0]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_rg", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 1]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_rb", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 2]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ra", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 3]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ro", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 4]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_gr", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 5]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_gg", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 6]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_gb", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 7]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ga", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 8]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_go", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 9]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_br", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 10]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_bg", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 11]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_bb", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 12]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ba", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 13]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_bo", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 14]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ar", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 15]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ag", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 16]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ab", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 17]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_aa", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 18]); Tweener.registerSpecialProperty("_ColorMatrix_matrix_ao", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 19]); Tweener.registerSpecialProperty("_Convolution_alpha", _filter_property_get, _filter_property_set, [ConvolutionFilter, "alpha"]); Tweener.registerSpecialProperty("_Convolution_bias", _filter_property_get, _filter_property_set, [ConvolutionFilter, "bias"]); Tweener.registerSpecialProperty("_Convolution_clamp", _filter_property_get, _filter_property_set, [ConvolutionFilter, "clamp"]); Tweener.registerSpecialPropertySplitter("_Convolution_color", _generic_color_splitter, ["_Convolution_color_r", "_Convolution_color_g", "_Convolution_color_b"]); Tweener.registerSpecialProperty("_Convolution_color_r", _filter_property_get, _filter_property_set, [ConvolutionFilter, "color", "color", "r"]); Tweener.registerSpecialProperty("_Convolution_color_g", _filter_property_get, _filter_property_set, [ConvolutionFilter, "color", "color", "g"]); Tweener.registerSpecialProperty("_Convolution_color_b", _filter_property_get, _filter_property_set, [ConvolutionFilter, "color", "color", "b"]); Tweener.registerSpecialProperty("_Convolution_divisor", _filter_property_get, _filter_property_set, [ConvolutionFilter, "divisor"]); Tweener.registerSpecialProperty("_Convolution_matrixX", _filter_property_get, _filter_property_set, [ConvolutionFilter, "matrixX"]); Tweener.registerSpecialProperty("_Convolution_matrixY", _filter_property_get, _filter_property_set, [ConvolutionFilter, "matrixY"]); Tweener.registerSpecialProperty("_Convolution_preserveAlpha", _filter_property_get, _filter_property_set, [ConvolutionFilter, "preserveAlpha"]); Tweener.registerSpecialProperty("_DisplacementMap_alpha", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "alpha"]); Tweener.registerSpecialPropertySplitter("_DisplacementMap_color", _generic_color_splitter, ["_DisplacementMap_color_r", "_DisplacementMap_color_r", "_DisplacementMap_color_r"]); Tweener.registerSpecialProperty("_DisplacementMap_color_r", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "color", "color", "r"]); Tweener.registerSpecialProperty("_DisplacementMap_color_g", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "color", "color", "g"]); Tweener.registerSpecialProperty("_DisplacementMap_color_b", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "color", "color", "b"]); Tweener.registerSpecialProperty("_DisplacementMap_componentX", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "componentX"]); Tweener.registerSpecialProperty("_DisplacementMap_componentY", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "componentY"]); Tweener.registerSpecialProperty("_DisplacementMap_mapBitmap", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapBitmap"]); Tweener.registerSpecialPropertySplitter("_DisplacementMap_mapPoint", _generic_point_splitter, ["_DisplacementMap_mapPoint_x", "_DisplacementMap_mapPoint_y"]); Tweener.registerSpecialProperty("_DisplacementMap_mapPoint_x", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapPoint", "point", "x"]); Tweener.registerSpecialProperty("_DisplacementMap_mapPoint_y", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapPoint", "point", "y"]); Tweener.registerSpecialProperty("_DisplacementMap_mode", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mode"]); Tweener.registerSpecialProperty("_DisplacementMap_scaleX", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "scaleX"]); Tweener.registerSpecialProperty("_DisplacementMap_scaleY", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "scaleY"]); Tweener.registerSpecialProperty("_DropShadow_alpha", _filter_property_get, _filter_property_set, [DropShadowFilter, "alpha"]); Tweener.registerSpecialProperty("_DropShadow_angle", _filter_property_get, _filter_property_set, [DropShadowFilter, "angle"]); Tweener.registerSpecialProperty("_DropShadow_blurX", _filter_property_get, _filter_property_set, [DropShadowFilter, "blurX"]); Tweener.registerSpecialProperty("_DropShadow_blurY", _filter_property_get, _filter_property_set, [DropShadowFilter, "blurY"]); Tweener.registerSpecialPropertySplitter("_DropShadow_color", _generic_color_splitter, ["_DropShadow_color_r", "_DropShadow_color_g", "_DropShadow_color_b"]); Tweener.registerSpecialProperty("_DropShadow_color_r", _filter_property_get, _filter_property_set, [DropShadowFilter, "color", "color", "r"]); Tweener.registerSpecialProperty("_DropShadow_color_g", _filter_property_get, _filter_property_set, [DropShadowFilter, "color", "color", "g"]); Tweener.registerSpecialProperty("_DropShadow_color_b", _filter_property_get, _filter_property_set, [DropShadowFilter, "color", "color", "b"]); Tweener.registerSpecialProperty("_DropShadow_distance", _filter_property_get, _filter_property_set, [DropShadowFilter, "distance"]); Tweener.registerSpecialProperty("_DropShadow_hideObject", _filter_property_get, _filter_property_set, [DropShadowFilter, "hideObject"]); Tweener.registerSpecialProperty("_DropShadow_inner", _filter_property_get, _filter_property_set, [DropShadowFilter, "inner"]); Tweener.registerSpecialProperty("_DropShadow_knockout", _filter_property_get, _filter_property_set, [DropShadowFilter, "knockout"]); Tweener.registerSpecialProperty("_DropShadow_quality", _filter_property_get, _filter_property_set, [DropShadowFilter, "quality"]); Tweener.registerSpecialProperty("_DropShadow_strength", _filter_property_get, _filter_property_set, [DropShadowFilter, "strength"]); Tweener.registerSpecialProperty("_Glow_alpha", _filter_property_get, _filter_property_set, [GlowFilter, "alpha"]); Tweener.registerSpecialProperty("_Glow_blurX", _filter_property_get, _filter_property_set, [GlowFilter, "blurX"]); Tweener.registerSpecialProperty("_Glow_blurY", _filter_property_get, _filter_property_set, [GlowFilter, "blurY"]); Tweener.registerSpecialPropertySplitter("_Glow_color", _generic_color_splitter, ["_Glow_color_r", "_Glow_color_g", "_Glow_color_b"]); Tweener.registerSpecialProperty("_Glow_color_r", _filter_property_get, _filter_property_set, [GlowFilter, "color", "color", "r"]); Tweener.registerSpecialProperty("_Glow_color_g", _filter_property_get, _filter_property_set, [GlowFilter, "color", "color", "g"]); Tweener.registerSpecialProperty("_Glow_color_b", _filter_property_get, _filter_property_set, [GlowFilter, "color", "color", "b"]); Tweener.registerSpecialProperty("_Glow_inner", _filter_property_get, _filter_property_set, [GlowFilter, "inner"]); Tweener.registerSpecialProperty("_Glow_knockout", _filter_property_get, _filter_property_set, [GlowFilter, "knockout"]); Tweener.registerSpecialProperty("_Glow_quality", _filter_property_get, _filter_property_set, [GlowFilter, "quality"]); Tweener.registerSpecialProperty("_Glow_strength", _filter_property_get, _filter_property_set, [GlowFilter, "strength"]); Tweener.registerSpecialProperty("_GradientBevel_angle", _filter_property_get, _filter_property_set, [GradientBevelFilter, "angle"]); Tweener.registerSpecialProperty("_GradientBevel_blurX", _filter_property_get, _filter_property_set, [GradientBevelFilter, "blurX"]); Tweener.registerSpecialProperty("_GradientBevel_blurY", _filter_property_get, _filter_property_set, [GradientBevelFilter, "blurY"]); Tweener.registerSpecialProperty("_GradientBevel_distance", _filter_property_get, _filter_property_set, [GradientBevelFilter, "distance"]); Tweener.registerSpecialProperty("_GradientBevel_quality", _filter_property_get, _filter_property_set, [GradientBevelFilter, "quality"]); Tweener.registerSpecialProperty("_GradientBevel_strength", _filter_property_get, _filter_property_set, [GradientBevelFilter, "strength"]); Tweener.registerSpecialProperty("_GradientBevel_type", _filter_property_get, _filter_property_set, [GradientBevelFilter, "type"]); Tweener.registerSpecialProperty("_GradientGlow_angle", _filter_property_get, _filter_property_set, [GradientGlowFilter, "angle"]); Tweener.registerSpecialProperty("_GradientGlow_blurX", _filter_property_get, _filter_property_set, [GradientGlowFilter, "blurX"]); Tweener.registerSpecialProperty("_GradientGlow_blurY", _filter_property_get, _filter_property_set, [GradientGlowFilter, "blurY"]); Tweener.registerSpecialProperty("_GradientGlow_distance", _filter_property_get, _filter_property_set, [GradientGlowFilter, "distance"]); Tweener.registerSpecialProperty("_GradientGlow_knockout", _filter_property_get, _filter_property_set, [GradientGlowFilter, "knockout"]); Tweener.registerSpecialProperty("_GradientGlow_quality", _filter_property_get, _filter_property_set, [GradientGlowFilter, "quality"]); Tweener.registerSpecialProperty("_GradientGlow_strength", _filter_property_get, _filter_property_set, [GradientGlowFilter, "strength"]); Tweener.registerSpecialProperty("_GradientGlow_type", _filter_property_get, _filter_property_set, [GradientGlowFilter, "type"]); } public static function _filter_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ var _local5:Number; var _local9:Object; var _local10:String; var _local4:Array = _arg1.filters; var _local6:Object = _arg2[0]; var _local7:String = _arg2[1]; var _local8:String = _arg2[2]; _local5 = 0; while (_local5 < _local4.length) { if ((_local4[_local5] is Class(_local6))){ if (_local8 == "color"){ _local10 = _arg2[3]; if (_local10 == "r"){ return (AuxFunctions.numberToR(_local4[_local5][_local7])); }; if (_local10 == "g"){ return (AuxFunctions.numberToG(_local4[_local5][_local7])); }; if (_local10 == "b"){ return (AuxFunctions.numberToB(_local4[_local5][_local7])); }; } else { if (_local8 == "matrix"){ return (_local4[_local5][_local7][_arg2[3]]); }; if (_local8 == "point"){ return (_local4[_local5][_local7][_arg2[3]]); }; return (_local4[_local5][_local7]); }; }; _local5++; }; switch (_local6){ case BevelFilter: _local9 = {angle:NaN, blurX:0, blurY:0, distance:0, highlightAlpha:1, highlightColor:NaN, knockout:null, quality:NaN, shadowAlpha:1, shadowColor:NaN, strength:2, type:null}; break; case BlurFilter: _local9 = {blurX:0, blurY:0, quality:NaN}; break; case ColorMatrixFilter: _local9 = {matrix:[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]}; break; case ConvolutionFilter: _local9 = {alpha:0, bias:0, clamp:null, color:NaN, divisor:1, matrix:[1], matrixX:1, matrixY:1, preserveAlpha:null}; break; case DisplacementMapFilter: _local9 = {alpha:0, color:NaN, componentX:null, componentY:null, mapBitmap:null, mapPoint:null, mode:null, scaleX:0, scaleY:0}; break; case DropShadowFilter: _local9 = {distance:0, angle:NaN, color:NaN, alpha:1, blurX:0, blurY:0, strength:1, quality:NaN, inner:null, knockout:null, hideObject:null}; break; case GlowFilter: _local9 = {alpha:1, blurX:0, blurY:0, color:NaN, inner:null, knockout:null, quality:NaN, strength:2}; break; case GradientBevelFilter: _local9 = {alphas:null, angle:NaN, blurX:0, blurY:0, colors:null, distance:0, knockout:null, quality:NaN, ratios:NaN, strength:1, type:null}; break; case GradientGlowFilter: _local9 = {alphas:null, angle:NaN, blurX:0, blurY:0, colors:null, distance:0, knockout:null, quality:NaN, ratios:NaN, strength:1, type:null}; break; }; if (_local8 == "color"){ return (NaN); }; if (_local8 == "matrix"){ return (_local9[_local7][_arg2[3]]); }; if (_local8 == "point"){ return (_local9[_local7][_arg2[3]]); }; return (_local9[_local7]); } public static function _filter_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local6:Number; var _local10:BitmapFilter; var _local11:String; var _local12:Array; var _local13:Point; var _local5:Array = _arg1.filters; var _local7:Object = _arg3[0]; var _local8:String = _arg3[1]; var _local9:String = _arg3[2]; _local6 = 0; while (_local6 < _local5.length) { if ((_local5[_local6] is Class(_local7))){ if (_local9 == "color"){ _local11 = _arg3[3]; if (_local11 == "r"){ _local5[_local6][_local8] = ((_local5[_local6][_local8] & 0xFFFF) | (_arg2 << 16)); }; if (_local11 == "g"){ _local5[_local6][_local8] = ((_local5[_local6][_local8] & 0xFF00FF) | (_arg2 << 8)); }; if (_local11 == "b"){ _local5[_local6][_local8] = ((_local5[_local6][_local8] & 0xFFFF00) | _arg2); }; } else { if (_local9 == "matrix"){ _local12 = _local5[_local6][_local8]; _local12[_arg3[3]] = _arg2; _local5[_local6][_local8] = _local12; } else { if (_local9 == "point"){ _local13 = Point(_local5[_local6][_local8]); _local13[_arg3[3]] = _arg2; _local5[_local6][_local8] = _local13; } else { _local5[_local6][_local8] = _arg2; }; }; }; _arg1.filters = _local5; return; }; _local6++; }; if (_local5 == null){ _local5 = new Array(); }; switch (_local7){ case BevelFilter: _local10 = new BevelFilter(0, 45, 0xFFFFFF, 1, 0, 1, 0, 0); break; case BlurFilter: _local10 = new BlurFilter(0, 0); break; case ColorMatrixFilter: _local10 = new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]); break; case ConvolutionFilter: _local10 = new ConvolutionFilter(1, 1, [1], 1, 0, true, true, 0, 0); break; case DisplacementMapFilter: _local10 = new DisplacementMapFilter(new BitmapData(10, 10), new Point(0, 0), 0, 1, 0, 0); break; case DropShadowFilter: _local10 = new DropShadowFilter(0, 45, 0, 1, 0, 0); break; case GlowFilter: _local10 = new GlowFilter(0xFF0000, 1, 0, 0); break; case GradientBevelFilter: _local10 = new GradientBevelFilter(0, 45, [0xFFFFFF, 0], [1, 1], [32, 223], 0, 0); break; case GradientGlowFilter: _local10 = new GradientGlowFilter(0, 45, [0xFFFFFF, 0], [1, 1], [32, 223], 0, 0); break; }; _local5.push(_local10); _arg1.filters = _local5; _filter_property_set(_arg1, _arg2, _arg3); } public static function _generic_color_splitter(_arg1:Number, _arg2:Array):Array{ var _local3:Array = new Array(); _local3.push({name:_arg2[0], value:AuxFunctions.numberToR(_arg1)}); _local3.push({name:_arg2[1], value:AuxFunctions.numberToG(_arg1)}); _local3.push({name:_arg2[2], value:AuxFunctions.numberToB(_arg1)}); return (_local3); } public static function _generic_point_splitter(_arg1:Point, _arg2:Array):Array{ var _local3:Array = new Array(); _local3.push({name:_arg2[0], value:_arg1.x}); _local3.push({name:_arg2[1], value:_arg1.y}); return (_local3); } public static function _generic_matrix_splitter(_arg1:Array, _arg2:Array):Array{ if (_arg1 == null){ _arg1 = _arg2[0].concat(); }; var _local3:Array = new Array(); var _local4:Number = 0; while (_local4 < _arg1.length) { _local3.push({name:_arg2[1][_local4], value:_arg1[_local4]}); _local4++; }; return (_local3); } public static function _filter_splitter(_arg1:BitmapFilter, _arg2:Array, _arg3:Object=null):Array{ var _local4:Array = new Array(); if ((_arg1 is BevelFilter)){ _local4.push({name:"_Bevel_angle", value:BevelFilter(_arg1).angle}); _local4.push({name:"_Bevel_blurX", value:BevelFilter(_arg1).blurX}); _local4.push({name:"_Bevel_blurY", value:BevelFilter(_arg1).blurY}); _local4.push({name:"_Bevel_distance", value:BevelFilter(_arg1).distance}); _local4.push({name:"_Bevel_highlightAlpha", value:BevelFilter(_arg1).highlightAlpha}); _local4.push({name:"_Bevel_highlightColor", value:BevelFilter(_arg1).highlightColor}); _local4.push({name:"_Bevel_knockout", value:BevelFilter(_arg1).knockout}); _local4.push({name:"_Bevel_quality", value:BevelFilter(_arg1).quality}); _local4.push({name:"_Bevel_shadowAlpha", value:BevelFilter(_arg1).shadowAlpha}); _local4.push({name:"_Bevel_shadowColor", value:BevelFilter(_arg1).shadowColor}); _local4.push({name:"_Bevel_strength", value:BevelFilter(_arg1).strength}); _local4.push({name:"_Bevel_type", value:BevelFilter(_arg1).type}); } else { if ((_arg1 is BlurFilter)){ _local4.push({name:"_Blur_blurX", value:BlurFilter(_arg1).blurX}); _local4.push({name:"_Blur_blurY", value:BlurFilter(_arg1).blurY}); _local4.push({name:"_Blur_quality", value:BlurFilter(_arg1).quality}); } else { if ((_arg1 is ColorMatrixFilter)){ _local4.push({name:"_ColorMatrix_matrix", value:ColorMatrixFilter(_arg1).matrix}); } else { if ((_arg1 is ConvolutionFilter)){ _local4.push({name:"_Convolution_alpha", value:ConvolutionFilter(_arg1).alpha}); _local4.push({name:"_Convolution_bias", value:ConvolutionFilter(_arg1).bias}); _local4.push({name:"_Convolution_clamp", value:ConvolutionFilter(_arg1).clamp}); _local4.push({name:"_Convolution_color", value:ConvolutionFilter(_arg1).color}); _local4.push({name:"_Convolution_divisor", value:ConvolutionFilter(_arg1).divisor}); _local4.push({name:"_Convolution_matrixX", value:ConvolutionFilter(_arg1).matrixX}); _local4.push({name:"_Convolution_matrixY", value:ConvolutionFilter(_arg1).matrixY}); _local4.push({name:"_Convolution_preserveAlpha", value:ConvolutionFilter(_arg1).preserveAlpha}); } else { if ((_arg1 is DisplacementMapFilter)){ _local4.push({name:"_DisplacementMap_alpha", value:DisplacementMapFilter(_arg1).alpha}); _local4.push({name:"_DisplacementMap_color", value:DisplacementMapFilter(_arg1).color}); _local4.push({name:"_DisplacementMap_componentX", value:DisplacementMapFilter(_arg1).componentX}); _local4.push({name:"_DisplacementMap_componentY", value:DisplacementMapFilter(_arg1).componentY}); _local4.push({name:"_DisplacementMap_mapBitmap", value:DisplacementMapFilter(_arg1).mapBitmap}); _local4.push({name:"_DisplacementMap_mapPoint", value:DisplacementMapFilter(_arg1).mapPoint}); _local4.push({name:"_DisplacementMap_mode", value:DisplacementMapFilter(_arg1).mode}); _local4.push({name:"_DisplacementMap_scaleX", value:DisplacementMapFilter(_arg1).scaleX}); _local4.push({name:"_DisplacementMap_scaleY", value:DisplacementMapFilter(_arg1).scaleY}); } else { if ((_arg1 is DropShadowFilter)){ _local4.push({name:"_DropShadow_alpha", value:DropShadowFilter(_arg1).alpha}); _local4.push({name:"_DropShadow_angle", value:DropShadowFilter(_arg1).angle}); _local4.push({name:"_DropShadow_blurX", value:DropShadowFilter(_arg1).blurX}); _local4.push({name:"_DropShadow_blurY", value:DropShadowFilter(_arg1).blurY}); _local4.push({name:"_DropShadow_color", value:DropShadowFilter(_arg1).color}); _local4.push({name:"_DropShadow_distance", value:DropShadowFilter(_arg1).distance}); _local4.push({name:"_DropShadow_hideObject", value:DropShadowFilter(_arg1).hideObject}); _local4.push({name:"_DropShadow_inner", value:DropShadowFilter(_arg1).inner}); _local4.push({name:"_DropShadow_knockout", value:DropShadowFilter(_arg1).knockout}); _local4.push({name:"_DropShadow_quality", value:DropShadowFilter(_arg1).quality}); _local4.push({name:"_DropShadow_strength", value:DropShadowFilter(_arg1).strength}); } else { if ((_arg1 is GlowFilter)){ _local4.push({name:"_Glow_alpha", value:GlowFilter(_arg1).alpha}); _local4.push({name:"_Glow_blurX", value:GlowFilter(_arg1).blurX}); _local4.push({name:"_Glow_blurY", value:GlowFilter(_arg1).blurY}); _local4.push({name:"_Glow_color", value:GlowFilter(_arg1).color}); _local4.push({name:"_Glow_inner", value:GlowFilter(_arg1).inner}); _local4.push({name:"_Glow_knockout", value:GlowFilter(_arg1).knockout}); _local4.push({name:"_Glow_quality", value:GlowFilter(_arg1).quality}); _local4.push({name:"_Glow_strength", value:GlowFilter(_arg1).strength}); } else { if ((_arg1 is GradientBevelFilter)){ _local4.push({name:"_GradientBevel_angle", value:GradientBevelFilter(_arg1).strength}); _local4.push({name:"_GradientBevel_blurX", value:GradientBevelFilter(_arg1).blurX}); _local4.push({name:"_GradientBevel_blurY", value:GradientBevelFilter(_arg1).blurY}); _local4.push({name:"_GradientBevel_distance", value:GradientBevelFilter(_arg1).distance}); _local4.push({name:"_GradientBevel_quality", value:GradientBevelFilter(_arg1).quality}); _local4.push({name:"_GradientBevel_strength", value:GradientBevelFilter(_arg1).strength}); _local4.push({name:"_GradientBevel_type", value:GradientBevelFilter(_arg1).type}); } else { if ((_arg1 is GradientGlowFilter)){ _local4.push({name:"_GradientGlow_angle", value:GradientGlowFilter(_arg1).strength}); _local4.push({name:"_GradientGlow_blurX", value:GradientGlowFilter(_arg1).blurX}); _local4.push({name:"_GradientGlow_blurY", value:GradientGlowFilter(_arg1).blurY}); _local4.push({name:"_GradientGlow_distance", value:GradientGlowFilter(_arg1).distance}); _local4.push({name:"_GradientGlow_knockout", value:GradientGlowFilter(_arg1).knockout}); _local4.push({name:"_GradientGlow_quality", value:GradientGlowFilter(_arg1).quality}); _local4.push({name:"_GradientGlow_strength", value:GradientGlowFilter(_arg1).strength}); _local4.push({name:"_GradientGlow_type", value:GradientGlowFilter(_arg1).type}); } else { trace("Tweener FilterShortcuts Error :: Unknown filter class used"); }; }; }; }; }; }; }; }; }; return (_local4); } } }//package caurina.transitions.properties
Section 4
//SoundShortcuts (caurina.transitions.properties.SoundShortcuts) package caurina.transitions.properties { import flash.media.*; import caurina.transitions.*; public class SoundShortcuts { public function SoundShortcuts(){ trace("This is an static class and should not be instantiated."); } public static function init():void{ Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set); Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set); } public static function _sound_pan_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:SoundTransform = _arg1.soundTransform; _local5.pan = _arg2; _arg1.soundTransform = _local5; } public static function _sound_volume_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{ var _local5:SoundTransform = _arg1.soundTransform; _local5.volume = _arg2; _arg1.soundTransform = _local5; } public static function _sound_pan_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return (_arg1.soundTransform.pan); } public static function _sound_volume_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{ return (_arg1.soundTransform.volume); } } }//package caurina.transitions.properties
Section 5
//AuxFunctions (caurina.transitions.AuxFunctions) package caurina.transitions { public class AuxFunctions { public static function getObjectLength(_arg1:Object):uint{ var _local3:String; var _local2:uint; for (_local3 in _arg1) { _local2++; }; return (_local2); } 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)); } public static function concatObjects(... _args):Object{ var _local3:Object; var _local5:String; var _local2:Object = {}; var _local4:int; while (_local4 < _args.length) { _local3 = _args[_local4]; for (_local5 in _local3) { if (_local3[_local5] == null){ delete _local2[_local5]; } else { _local2[_local5] = _local3[_local5]; }; }; _local4++; }; return (_local2); } } }//package caurina.transitions
Section 6
//Equations (caurina.transitions.Equations) package caurina.transitions { public class Equations { public function Equations(){ trace("Equations is a static class and should not be instantiated."); } public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); }; --_arg1; return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2)); } public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ _local6 = (_local6 * 1.525); return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2)); }; _arg1 = (_arg1 - 2); _local6 = (_local6 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2)); } public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2)); } public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2)); } public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2)); } public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function init():void{ Tweener.registerTransition("easenone", easeNone); Tweener.registerTransition("linear", easeNone); Tweener.registerTransition("easeinquad", easeInQuad); Tweener.registerTransition("easeoutquad", easeOutQuad); Tweener.registerTransition("easeinoutquad", easeInOutQuad); Tweener.registerTransition("easeoutinquad", easeOutInQuad); Tweener.registerTransition("easeincubic", easeInCubic); Tweener.registerTransition("easeoutcubic", easeOutCubic); Tweener.registerTransition("easeinoutcubic", easeInOutCubic); Tweener.registerTransition("easeoutincubic", easeOutInCubic); Tweener.registerTransition("easeinquart", easeInQuart); Tweener.registerTransition("easeoutquart", easeOutQuart); Tweener.registerTransition("easeinoutquart", easeInOutQuart); Tweener.registerTransition("easeoutinquart", easeOutInQuart); Tweener.registerTransition("easeinquint", easeInQuint); Tweener.registerTransition("easeoutquint", easeOutQuint); Tweener.registerTransition("easeinoutquint", easeInOutQuint); Tweener.registerTransition("easeoutinquint", easeOutInQuint); Tweener.registerTransition("easeinsine", easeInSine); Tweener.registerTransition("easeoutsine", easeOutSine); Tweener.registerTransition("easeinoutsine", easeInOutSine); Tweener.registerTransition("easeoutinsine", easeOutInSine); Tweener.registerTransition("easeincirc", easeInCirc); Tweener.registerTransition("easeoutcirc", easeOutCirc); Tweener.registerTransition("easeinoutcirc", easeInOutCirc); Tweener.registerTransition("easeoutincirc", easeOutInCirc); Tweener.registerTransition("easeinexpo", easeInExpo); Tweener.registerTransition("easeoutexpo", easeOutExpo); Tweener.registerTransition("easeinoutexpo", easeInOutExpo); Tweener.registerTransition("easeoutinexpo", easeOutInExpo); Tweener.registerTransition("easeinelastic", easeInElastic); Tweener.registerTransition("easeoutelastic", easeOutElastic); Tweener.registerTransition("easeinoutelastic", easeInOutElastic); Tweener.registerTransition("easeoutinelastic", easeOutInElastic); Tweener.registerTransition("easeinback", easeInBack); Tweener.registerTransition("easeoutback", easeOutBack); Tweener.registerTransition("easeinoutback", easeInOutBack); Tweener.registerTransition("easeoutinback", easeOutInBack); Tweener.registerTransition("easeinbounce", easeInBounce); Tweener.registerTransition("easeoutbounce", easeOutBounce); Tweener.registerTransition("easeinoutbounce", easeInOutBounce); Tweener.registerTransition("easeoutinbounce", easeOutInBounce); } public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2)); } public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001))); } public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2)); } public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2)); } public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2)); } public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2)); } public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; --_arg1; return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); } public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); } public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005))); }; --_arg1; return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2)); } public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2)); } public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2)); } public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } } }//package caurina.transitions
Section 7
//PropertyInfoObj (caurina.transitions.PropertyInfoObj) package caurina.transitions { public class PropertyInfoObj { public var modifierParameters:Array; public var isSpecialProperty:Boolean; public var valueComplete:Number; public var modifierFunction:Function; public var extra:Object; public var valueStart:Number; public var hasModifier:Boolean; public var arrayIndex:Number; public var originalValueComplete:Object; public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){ valueStart = _arg1; valueComplete = _arg2; originalValueComplete = _arg3; arrayIndex = _arg4; extra = _arg5; isSpecialProperty = _arg6; hasModifier = Boolean(_arg7); modifierFunction = _arg7; modifierParameters = _arg8; } public function toString():String{ var _local1 = "\n[PropertyInfoObj "; _local1 = (_local1 + ("valueStart:" + String(valueStart))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("valueComplete:" + String(valueComplete))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("arrayIndex:" + String(arrayIndex))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("extra:" + String(extra))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("hasModifier:" + String(hasModifier))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("modifierFunction:" + String(modifierFunction))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("modifierParameters:" + String(modifierParameters))); _local1 = (_local1 + "]\n"); return (_local1); } public function clone():PropertyInfoObj{ var _local1:PropertyInfoObj = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters); return (_local1); } } }//package caurina.transitions
Section 8
//SpecialProperty (caurina.transitions.SpecialProperty) package caurina.transitions { public class SpecialProperty { public var parameters:Array; public var getValue:Function; public var preProcess:Function; public var setValue:Function; public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){ getValue = _arg1; setValue = _arg2; parameters = _arg3; preProcess = _arg4; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialProperty "); _local1 = (_local1 + ("getValue:" + String(getValue))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("setValue:" + String(setValue))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("parameters:" + String(parameters))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("preProcess:" + String(preProcess))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitions
Section 9
//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier) package caurina.transitions { public class SpecialPropertyModifier { public var getValue:Function; public var modifyValues:Function; public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){ modifyValues = _arg1; getValue = _arg2; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialPropertyModifier "); _local1 = (_local1 + ("modifyValues:" + String(modifyValues))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("getValue:" + String(getValue))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitions
Section 10
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter) package caurina.transitions { public class SpecialPropertySplitter { public var parameters:Array; public var splitValues:Function; public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){ splitValues = _arg1; parameters = _arg2; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialPropertySplitter "); _local1 = (_local1 + ("splitValues:" + String(splitValues))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("parameters:" + String(parameters))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitions
Section 11
//Tweener (caurina.transitions.Tweener) package caurina.transitions { import flash.display.*; import flash.events.*; import flash.utils.*; public class Tweener { private static var _timeScale:Number = 1; private static var _currentTimeFrame:Number; private static var _specialPropertySplitterList:Object; private static var _engineExists:Boolean = false; private static var _specialPropertyModifierList:Object; private static var _currentTime:Number; private static var _tweenList:Array; private static var _specialPropertyList:Object; private static var _transitionList:Object; private static var _inited:Boolean = false; private static var __tweener_controller__:MovieClip; public function Tweener(){ trace("Tweener is a static class and should not be instantiated."); } public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{ if (!_inited){ init(); }; var _local4:SpecialPropertyModifier = new SpecialPropertyModifier(_arg2, _arg3); _specialPropertyModifierList[_arg1] = _local4; } public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{ if (!_inited){ init(); }; var _local6:SpecialProperty = new SpecialProperty(_arg2, _arg3, _arg4, _arg5); _specialPropertyList[_arg1] = _local6; } public static function init(... _args):void{ _inited = true; _transitionList = new Object(); Equations.init(); _specialPropertyList = new Object(); _specialPropertyModifierList = new Object(); _specialPropertySplitterList = new Object(); } private static function updateTweens():Boolean{ var _local1:int; if (_tweenList.length == 0){ return (false); }; _local1 = 0; while (_local1 < _tweenList.length) { if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){ if (!updateTweenByIndex(_local1)){ removeTweenByIndex(_local1); }; if (_tweenList[_local1] == null){ removeTweenByIndex(_local1, true); _local1--; }; }; _local1++; }; return (true); } public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local3:Number; var _local4:Array; var _local8:Function; var _local9:TweenListObj; var _local10:Number; var _local11:String; if (!Boolean(_arg1)){ return (false); }; if ((_arg1 is Array)){ _local4 = _arg1.concat(); } else { _local4 = [_arg1]; }; var _local5:Object = _arg2; if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; var _local6:Number = (isNaN(_local5.time)) ? 0 : _local5.time; var _local7:Number = (isNaN(_local5.delay)) ? 0 : _local5.delay; if (typeof(_local5.transition) == "string"){ _local11 = _local5.transition.toLowerCase(); _local8 = _transitionList[_local11]; } else { _local8 = _local5.transition; }; if (!Boolean(_local8)){ _local8 = _transitionList["easeoutexpo"]; }; _local3 = 0; while (_local3 < _local4.length) { if (_local5.useFrames == true){ _local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams); } else { _local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams); }; _local9.properties = null; _local9.onStart = _local5.onStart; _local9.onUpdate = _local5.onUpdate; _local9.onComplete = _local5.onComplete; _local9.onOverwrite = _local5.onOverwrite; _local9.onStartParams = _local5.onStartParams; _local9.onUpdateParams = _local5.onUpdateParams; _local9.onCompleteParams = _local5.onCompleteParams; _local9.onOverwriteParams = _local5.onOverwriteParams; _local9.onStartScope = _local5.onStartScope; _local9.onUpdateScope = _local5.onUpdateScope; _local9.onCompleteScope = _local5.onCompleteScope; _local9.onOverwriteScope = _local5.onOverwriteScope; _local9.onErrorScope = _local5.onErrorScope; _local9.isCaller = true; _local9.count = _local5.count; _local9.waitFrames = _local5.waitFrames; _tweenList.push(_local9); if ((((_local6 == 0)) && ((_local7 == 0)))){ _local10 = (_tweenList.length - 1); updateTweenByIndex(_local10); removeTweenByIndex(_local10); }; _local3++; }; return (true); } public static function pauseAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { pauseTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function removeTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local5:SpecialPropertySplitter; var _local6:Array; var _local7:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){ if (_specialPropertySplitterList[_args[_local4]]){ _local5 = _specialPropertySplitterList[_args[_local4]]; _local6 = _local5.splitValues(_arg1, null); _local7 = 0; while (_local7 < _local6.length) { _local3.push(_local6[_local7].name); _local7++; }; } else { _local3.push(_args[_local4]); }; }; _local4++; }; return (affectTweens(removeTweenByIndex, _arg1, _local3)); } public static function splitTweens(_arg1:Number, _arg2:Array):uint{ var _local5:uint; var _local6:String; var _local7:Boolean; var _local3:TweenListObj = _tweenList[_arg1]; var _local4:TweenListObj = _local3.clone(false); _local5 = 0; while (_local5 < _arg2.length) { _local6 = _arg2[_local5]; if (Boolean(_local3.properties[_local6])){ _local3.properties[_local6] = undefined; delete _local3.properties[_local6]; }; _local5++; }; for (_local6 in _local4.properties) { _local7 = false; _local5 = 0; while (_local5 < _arg2.length) { if (_arg2[_local5] == _local6){ _local7 = true; break; }; _local5++; }; if (!_local7){ _local4.properties[_local6] = undefined; delete _local4.properties[_local6]; }; }; _tweenList.push(_local4); return ((_tweenList.length - 1)); } public static function updateFrame():void{ _currentTimeFrame++; } public static function resumeTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj = _tweenList[_arg1]; if ((((_local2 == null)) || (!(_local2.isPaused)))){ return (false); }; var _local3:Number = getCurrentTweeningTime(_local2); _local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused)); _local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused)); _local2.timePaused = undefined; _local2.isPaused = false; return (true); } public static function getVersion():String{ return ("AS3 1.31.74"); } public static function onEnterFrame(_arg1:Event):void{ updateTime(); updateFrame(); var _local2:Boolean; _local2 = updateTweens(); if (!_local2){ stopEngine(); }; } public static function updateTime():void{ _currentTime = getTimer(); } private static function updateTweenByIndex(_arg1:Number):Boolean{ var tTweening:TweenListObj; var mustUpdate:Boolean; var nv:Number; var t:Number; var b:Number; var c:Number; var d:Number; var pName:String; var eventScope:Object; var tScope:Object; var tProperty:Object; var pv:Number; var i = _arg1; tTweening = _tweenList[i]; if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){ return (false); }; var isOver:Boolean; var cTime:Number = getCurrentTweeningTime(tTweening); if (cTime >= tTweening.timeStart){ tScope = tTweening.scope; if (tTweening.isCaller){ do { t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1)); b = tTweening.timeStart; c = (tTweening.timeComplete - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d); } while (!(cTime >= nv)); } else { mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates))); if (cTime >= tTweening.timeComplete){ isOver = true; mustUpdate = true; }; if (!tTweening.hasStarted){ if (Boolean(tTweening.onStart)){ eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope; try { tTweening.onStart.apply(eventScope, tTweening.onStartParams); } catch(e2:Error) { handleError(tTweening, e2, "onStart"); }; }; for (pName in tTweening.properties) { if (tTweening.properties[pName].isSpecialProperty){ if (Boolean(_specialPropertyList[pName].preProcess)){ tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra); }; pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra); } else { pv = tScope[pName]; }; tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv; }; mustUpdate = true; tTweening.hasStarted = true; }; if (mustUpdate){ for (pName in tTweening.properties) { tProperty = tTweening.properties[pName]; if (isOver){ nv = tProperty.valueComplete; } else { if (tProperty.hasModifier){ t = (cTime - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams); nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters); } else { t = (cTime - tTweening.timeStart); b = tProperty.valueStart; c = (tProperty.valueComplete - tProperty.valueStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d, tTweening.transitionParams); }; }; if (tTweening.rounded){ nv = Math.round(nv); }; if (tProperty.isSpecialProperty){ _specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra); } else { tScope[pName] = nv; }; }; tTweening.updatesSkipped = 0; if (Boolean(tTweening.onUpdate)){ eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope; try { tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams); } catch(e3:Error) { handleError(tTweening, e3, "onUpdate"); }; }; } else { tTweening.updatesSkipped++; }; }; if (((isOver) && (Boolean(tTweening.onComplete)))){ eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope; try { tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams); } catch(e4:Error) { handleError(tTweening, e4, "onComplete"); }; }; return (!(isOver)); }; return (true); } public static function setTimeScale(_arg1:Number):void{ var _local2:Number; var _local3:Number; if (isNaN(_arg1)){ _arg1 = 1; }; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; if (_arg1 != _timeScale){ if (_tweenList != null){ _local2 = 0; while (_local2 < _tweenList.length) { _local3 = getCurrentTweeningTime(_tweenList[_local2]); _tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1)); _tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1)); if (_tweenList[_local2].timePaused != undefined){ _tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1)); }; _local2++; }; }; _timeScale = _arg1; }; } public static function resumeAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { resumeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{ var eventScope:Object; var pTweening = _arg1; var pError = _arg2; var pCallBackName = _arg3; if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){ eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope; try { pTweening.onError.apply(eventScope, [pTweening.scope, pError]); } catch(metaError:Error) { printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace())); }; } else { if (!Boolean(pTweening.onError)){ printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace())); }; }; } private static function startEngine():void{ _engineExists = true; _tweenList = new Array(); __tweener_controller__ = new MovieClip(); __tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); _currentTimeFrame = 0; updateTime(); } public static function removeAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { removeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local3:Number; var _local4:Number; var _local5:String; var _local6:Array; var _local13:Function; var _local14:Object; var _local15:TweenListObj; var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:String; if (!Boolean(_arg1)){ return (false); }; if ((_arg1 is Array)){ _local6 = _arg1.concat(); } else { _local6 = [_arg1]; }; var _local7:Object = TweenListObj.makePropertiesChain(_arg2); if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; var _local8:Number = (isNaN(_local7.time)) ? 0 : _local7.time; var _local9:Number = (isNaN(_local7.delay)) ? 0 : _local7.delay; var _local10:Array = new Array(); var _local11:Object = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true}; var _local12:Object = new Object(); for (_local5 in _local7) { if (!_local11[_local5]){ if (_specialPropertySplitterList[_local5]){ _local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters); _local3 = 0; while (_local3 < _local17.length) { if (_specialPropertySplitterList[_local17[_local3].name]){ _local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters); _local4 = 0; while (_local4 < _local18.length) { _local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false}; _local4++; }; } else { _local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false}; }; _local3++; }; } else { if (_specialPropertyModifierList[_local5] != undefined){ _local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]); _local3 = 0; while (_local3 < _local19.length) { _local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue}; _local3++; }; } else { _local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]}; }; }; }; }; for (_local5 in _local10) { if (_specialPropertyList[_local5] != undefined){ _local10[_local5].isSpecialProperty = true; } else { if (_local6[0][_local5] == undefined){ printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property.")); }; }; }; for (_local5 in _local12) { if (_local10[_local5] != undefined){ _local10[_local5].modifierParameters = _local12[_local5].modifierParameters; _local10[_local5].modifierFunction = _local12[_local5].modifierFunction; }; }; if (typeof(_local7.transition) == "string"){ _local20 = _local7.transition.toLowerCase(); _local13 = _transitionList[_local20]; } else { _local13 = _local7.transition; }; if (!Boolean(_local13)){ _local13 = _transitionList["easeoutexpo"]; }; _local3 = 0; while (_local3 < _local6.length) { _local14 = new Object(); for (_local5 in _local10) { _local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters); }; if (_local7.useFrames == true){ _local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams); } else { _local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams); }; _local15.properties = _local14; _local15.onStart = _local7.onStart; _local15.onUpdate = _local7.onUpdate; _local15.onComplete = _local7.onComplete; _local15.onOverwrite = _local7.onOverwrite; _local15.onError = _local7.onError; _local15.onStartParams = _local7.onStartParams; _local15.onUpdateParams = _local7.onUpdateParams; _local15.onCompleteParams = _local7.onCompleteParams; _local15.onOverwriteParams = _local7.onOverwriteParams; _local15.onStartScope = _local7.onStartScope; _local15.onUpdateScope = _local7.onUpdateScope; _local15.onCompleteScope = _local7.onCompleteScope; _local15.onOverwriteScope = _local7.onOverwriteScope; _local15.onErrorScope = _local7.onErrorScope; _local15.rounded = _local7.rounded; _local15.skipUpdates = _local7.skipUpdates; removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete); _tweenList.push(_local15); if ((((_local8 == 0)) && ((_local9 == 0)))){ _local16 = (_tweenList.length - 1); updateTweenByIndex(_local16); removeTweenByIndex(_local16); }; _local3++; }; return (true); } public static function registerTransition(_arg1:String, _arg2:Function):void{ if (!_inited){ init(); }; _transitionList[_arg1] = _arg2; } public static function printError(_arg1:String):void{ trace(("## [Tweener] Error: " + _arg1)); } private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{ var _local5:uint; var _local6:Array; var _local7:uint; var _local8:uint; var _local9:uint; var _local4:Boolean; if (!Boolean(_tweenList)){ return (false); }; _local5 = 0; while (_local5 < _tweenList.length) { if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){ if (_arg3.length == 0){ _arg1(_local5); _local4 = true; } else { _local6 = new Array(); _local7 = 0; while (_local7 < _arg3.length) { if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){ _local6.push(_arg3[_local7]); }; _local7++; }; if (_local6.length > 0){ _local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties); if (_local8 == _local6.length){ _arg1(_local5); _local4 = true; } else { _local9 = splitTweens(_local5, _local6); _arg1(_local9); _local4 = true; }; }; }; }; _local5++; }; return (_local4); } public static function getTweens(_arg1:Object):Array{ var _local2:uint; var _local3:String; if (!Boolean(_tweenList)){ return ([]); }; var _local4:Array = new Array(); _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ for (_local3 in _tweenList[_local2].properties) { _local4.push(_local3); }; }; _local2++; }; return (_local4); } public static function isTweening(_arg1:Object):Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ return (true); }; _local2++; }; return (false); } public static function pauseTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj = _tweenList[_arg1]; if ((((_local2 == null)) || (_local2.isPaused))){ return (false); }; _local2.timePaused = getCurrentTweeningTime(_local2); _local2.isPaused = true; return (true); } public static function getCurrentTweeningTime(_arg1:Object):Number{ return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime); } public static function getTweenCount(_arg1:Object):Number{ var _local2:uint; if (!Boolean(_tweenList)){ return (0); }; var _local3:Number = 0; _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ _local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties)); }; _local2++; }; return (_local3); } private static function stopEngine():void{ _engineExists = false; _tweenList = null; _currentTime = 0; _currentTimeFrame = 0; __tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); __tweener_controller__ = null; } public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{ var removedLocally:Boolean; var i:uint; var pName:String; var eventScope:Object; var p_scope = _arg1; var p_properties = _arg2; var p_timeStart = _arg3; var p_timeComplete = _arg4; var removed:Boolean; var tl:uint = _tweenList.length; i = 0; while (i < tl) { if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){ if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){ removedLocally = false; for (pName in _tweenList[i].properties) { if (Boolean(p_properties[pName])){ if (Boolean(_tweenList[i].onOverwrite)){ eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope; try { _tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams); } catch(e:Error) { handleError(_tweenList[i], e, "onOverwrite"); }; }; _tweenList[i].properties[pName] = undefined; delete _tweenList[i].properties[pName]; removedLocally = true; removed = true; }; }; if (removedLocally){ if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){ removeTweenByIndex(i); }; }; }; }; i = (i + 1); }; return (removed); } public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{ if (!_inited){ init(); }; var _local4:SpecialPropertySplitter = new SpecialPropertySplitter(_arg2, _arg3); _specialPropertySplitterList[_arg1] = _local4; } public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{ _tweenList[_arg1] = null; if (_arg2){ _tweenList.splice(_arg1, 1); }; return (true); } public static function resumeTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(resumeTweenByIndex, _arg1, _local3)); } public static function pauseTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && ((_local3.indexOf(_args[_local4]) == -1)))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(pauseTweenByIndex, _arg1, _local3)); } } }//package caurina.transitions
Section 12
//TweenListObj (caurina.transitions.TweenListObj) package caurina.transitions { public class TweenListObj { public var hasStarted:Boolean; public var onUpdate:Function; public var useFrames:Boolean; public var count:Number; public var onOverwriteParams:Array; public var timeStart:Number; public var timeComplete:Number; public var onStartParams:Array; public var onUpdateScope:Object; public var rounded:Boolean; public var onUpdateParams:Array; public var properties:Object; public var onComplete:Function; public var transitionParams:Object; public var updatesSkipped:Number; public var onStart:Function; public var onOverwriteScope:Object; public var skipUpdates:Number; public var onStartScope:Object; public var scope:Object; public var isCaller:Boolean; public var timePaused:Number; public var transition:Function; public var onCompleteParams:Array; public var onError:Function; public var timesCalled:Number; public var onErrorScope:Object; public var onOverwrite:Function; public var isPaused:Boolean; public var waitFrames:Boolean; public var onCompleteScope:Object; public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){ scope = _arg1; timeStart = _arg2; timeComplete = _arg3; useFrames = _arg4; transition = _arg5; transitionParams = _arg6; properties = new Object(); isPaused = false; timePaused = undefined; isCaller = false; updatesSkipped = 0; timesCalled = 0; skipUpdates = 0; hasStarted = false; } public function clone(_arg1:Boolean):TweenListObj{ var _local3:String; var _local2:TweenListObj = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams); _local2.properties = new Array(); for (_local3 in properties) { _local2.properties[_local3] = properties[_local3].clone(); }; _local2.skipUpdates = skipUpdates; _local2.updatesSkipped = updatesSkipped; if (!_arg1){ _local2.onStart = onStart; _local2.onUpdate = onUpdate; _local2.onComplete = onComplete; _local2.onOverwrite = onOverwrite; _local2.onError = onError; _local2.onStartParams = onStartParams; _local2.onUpdateParams = onUpdateParams; _local2.onCompleteParams = onCompleteParams; _local2.onOverwriteParams = onOverwriteParams; _local2.onStartScope = onStartScope; _local2.onUpdateScope = onUpdateScope; _local2.onCompleteScope = onCompleteScope; _local2.onOverwriteScope = onOverwriteScope; _local2.onErrorScope = onErrorScope; }; _local2.rounded = rounded; _local2.isPaused = isPaused; _local2.timePaused = timePaused; _local2.isCaller = isCaller; _local2.count = count; _local2.timesCalled = timesCalled; _local2.waitFrames = waitFrames; _local2.hasStarted = hasStarted; return (_local2); } public function toString():String{ var _local3:String; var _local1 = "\n[TweenListObj "; _local1 = (_local1 + ("scope:" + String(scope))); _local1 = (_local1 + ", properties:"); var _local2:Boolean; for (_local3 in properties) { if (!_local2){ _local1 = (_local1 + ","); }; _local1 = (_local1 + ("[name:" + properties[_local3].name)); _local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart)); _local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete)); _local1 = (_local1 + "]"); _local2 = false; }; _local1 = (_local1 + (", timeStart:" + String(timeStart))); _local1 = (_local1 + (", timeComplete:" + String(timeComplete))); _local1 = (_local1 + (", useFrames:" + String(useFrames))); _local1 = (_local1 + (", transition:" + String(transition))); _local1 = (_local1 + (", transitionParams:" + String(transitionParams))); if (skipUpdates){ _local1 = (_local1 + (", skipUpdates:" + String(skipUpdates))); }; if (updatesSkipped){ _local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped))); }; if (Boolean(onStart)){ _local1 = (_local1 + (", onStart:" + String(onStart))); }; if (Boolean(onUpdate)){ _local1 = (_local1 + (", onUpdate:" + String(onUpdate))); }; if (Boolean(onComplete)){ _local1 = (_local1 + (", onComplete:" + String(onComplete))); }; if (Boolean(onOverwrite)){ _local1 = (_local1 + (", onOverwrite:" + String(onOverwrite))); }; if (Boolean(onError)){ _local1 = (_local1 + (", onError:" + String(onError))); }; if (onStartParams){ _local1 = (_local1 + (", onStartParams:" + String(onStartParams))); }; if (onUpdateParams){ _local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams))); }; if (onCompleteParams){ _local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams))); }; if (onOverwriteParams){ _local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams))); }; if (onStartScope){ _local1 = (_local1 + (", onStartScope:" + String(onStartScope))); }; if (onUpdateScope){ _local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope))); }; if (onCompleteScope){ _local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope))); }; if (onOverwriteScope){ _local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope))); }; if (onErrorScope){ _local1 = (_local1 + (", onErrorScope:" + String(onErrorScope))); }; if (rounded){ _local1 = (_local1 + (", rounded:" + String(rounded))); }; if (isPaused){ _local1 = (_local1 + (", isPaused:" + String(isPaused))); }; if (timePaused){ _local1 = (_local1 + (", timePaused:" + String(timePaused))); }; if (isCaller){ _local1 = (_local1 + (", isCaller:" + String(isCaller))); }; if (count){ _local1 = (_local1 + (", count:" + String(count))); }; if (timesCalled){ _local1 = (_local1 + (", timesCalled:" + String(timesCalled))); }; if (waitFrames){ _local1 = (_local1 + (", waitFrames:" + String(waitFrames))); }; if (hasStarted){ _local1 = (_local1 + (", hasStarted:" + String(hasStarted))); }; _local1 = (_local1 + "]\n"); return (_local1); } public static function makePropertiesChain(_arg1:Object):Object{ var _local3:Object; var _local4:Object; var _local5:Object; var _local6:Number; var _local7:Number; var _local8:Number; var _local2:Object = _arg1.base; if (_local2){ _local3 = {}; if ((_local2 is Array)){ _local4 = []; _local8 = 0; while (_local8 < _local2.length) { _local4.push(_local2[_local8]); _local8++; }; } else { _local4 = [_local2]; }; _local4.push(_arg1); _local6 = _local4.length; _local7 = 0; while (_local7 < _local6) { if (_local4[_local7]["base"]){ _local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]); } else { _local5 = _local4[_local7]; }; _local3 = AuxFunctions.concatObjects(_local3, _local5); _local7++; }; if (_local3["base"]){ delete _local3["base"]; }; return (_local3); } else { }; return (!NULL!); } } }//package caurina.transitions
Section 13
//BitString (com.adobe.images.BitString) package com.adobe.images { public class BitString { public var val:int;// = 0 public var len:int;// = 0 } }//package com.adobe.images
Section 14
//JPGEncoder (com.adobe.images.JPGEncoder) package com.adobe.images { import flash.display.*; import flash.geom.*; import flash.utils.*; public class JPGEncoder { private var fdtbl_UV:Array; private var std_ac_chrominance_values:Array; private var std_dc_chrominance_values:Array; private var ZigZag:Array; private var YDC_HT:Array; private var YAC_HT:Array; private var bytenew:int;// = 0 private var fdtbl_Y:Array; private var std_ac_chrominance_nrcodes:Array; private var DU:Array; private var std_ac_luminance_values:Array; private var std_dc_chrominance_nrcodes:Array; private var UVTable:Array; private var YDU:Array; private var UDU:Array; private var byteout:ByteArray; private var UVAC_HT:Array; private var UVDC_HT:Array; private var bytepos:int;// = 7 private var VDU:Array; private var std_ac_luminance_nrcodes:Array; private var std_dc_luminance_values:Array; private var YTable:Array; private var std_dc_luminance_nrcodes:Array; private var bitcode:Array; private var category:Array; public function JPGEncoder(_arg1:Number=50){ ZigZag = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63]; YTable = new Array(64); UVTable = new Array(64); fdtbl_Y = new Array(64); fdtbl_UV = new Array(64); std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125]; std_ac_luminance_values = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250]; std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119]; std_ac_chrominance_values = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250]; bitcode = new Array(0xFFFF); category = new Array(0xFFFF); DU = new Array(64); YDU = new Array(64); UDU = new Array(64); VDU = new Array(64); super(); if (_arg1 <= 0){ _arg1 = 1; }; if (_arg1 > 100){ _arg1 = 100; }; var _local2:int; if (_arg1 < 50){ _local2 = int((5000 / _arg1)); } else { _local2 = int((200 - (_arg1 * 2))); }; initHuffmanTbl(); initCategoryNumber(); initQuantTables(_local2); } private function initHuffmanTbl():void{ YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values); UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values); YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values); UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values); } private function RGB2YUV(_arg1:BitmapData, _arg2:int, _arg3:int):void{ var _local6:int; var _local7:uint; var _local8:Number; var _local9:Number; var _local10:Number; var _local4:int; var _local5:int; while (_local5 < 8) { _local6 = 0; while (_local6 < 8) { _local7 = _arg1.getPixel32((_arg2 + _local6), (_arg3 + _local5)); _local8 = Number(((_local7 >> 16) & 0xFF)); _local9 = Number(((_local7 >> 8) & 0xFF)); _local10 = Number((_local7 & 0xFF)); YDU[_local4] = ((((0.299 * _local8) + (0.587 * _local9)) + (0.114 * _local10)) - 128); UDU[_local4] = (((-0.16874 * _local8) + (-0.33126 * _local9)) + (0.5 * _local10)); VDU[_local4] = (((0.5 * _local8) + (-0.41869 * _local9)) + (-0.08131 * _local10)); _local4++; _local6++; }; _local5++; }; } private function writeBits(_arg1:BitString):void{ var _local2:int = _arg1.val; var _local3:int = (_arg1.len - 1); while (_local3 >= 0) { if ((_local2 & uint((1 << _local3)))){ bytenew = (bytenew | uint((1 << bytepos))); }; _local3--; bytepos--; if (bytepos < 0){ if (bytenew == 0xFF){ writeByte(0xFF); writeByte(0); } else { writeByte(bytenew); }; bytepos = 7; bytenew = 0; }; }; } private function writeWord(_arg1:int):void{ writeByte(((_arg1 >> 8) & 0xFF)); writeByte((_arg1 & 0xFF)); } private function writeByte(_arg1:int):void{ byteout.writeByte(_arg1); } private function writeDHT():void{ var _local1:int; writeWord(65476); writeWord(418); writeByte(0); _local1 = 0; while (_local1 < 16) { writeByte(std_dc_luminance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 11) { writeByte(std_dc_luminance_values[_local1]); _local1++; }; writeByte(16); _local1 = 0; while (_local1 < 16) { writeByte(std_ac_luminance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 161) { writeByte(std_ac_luminance_values[_local1]); _local1++; }; writeByte(1); _local1 = 0; while (_local1 < 16) { writeByte(std_dc_chrominance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 11) { writeByte(std_dc_chrominance_values[_local1]); _local1++; }; writeByte(17); _local1 = 0; while (_local1 < 16) { writeByte(std_ac_chrominance_nrcodes[(_local1 + 1)]); _local1++; }; _local1 = 0; while (_local1 <= 161) { writeByte(std_ac_chrominance_values[_local1]); _local1++; }; } public function encode(_arg1:BitmapData):ByteArray{ var _local6:int; var _local7:BitString; byteout = new ByteArray(); bytenew = 0; bytepos = 7; writeWord(65496); writeAPP0(); writeDQT(); writeSOF0(_arg1.width, _arg1.height); writeDHT(); writeSOS(); var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; bytenew = 0; bytepos = 7; var _local5:int; while (_local5 < _arg1.height) { _local6 = 0; while (_local6 < _arg1.width) { RGB2YUV(_arg1, _local6, _local5); _local2 = processDU(YDU, fdtbl_Y, _local2, YDC_HT, YAC_HT); _local3 = processDU(UDU, fdtbl_UV, _local3, UVDC_HT, UVAC_HT); _local4 = processDU(VDU, fdtbl_UV, _local4, UVDC_HT, UVAC_HT); _local6 = (_local6 + 8); }; _local5 = (_local5 + 8); }; if (bytepos >= 0){ _local7 = new BitString(); _local7.len = (bytepos + 1); _local7.val = ((1 << (bytepos + 1)) - 1); writeBits(_local7); }; writeWord(65497); return (byteout); } private function initCategoryNumber():void{ var _local3:int; var _local1 = 1; var _local2 = 2; var _local4 = 1; while (_local4 <= 15) { _local3 = _local1; while (_local3 < _local2) { category[(32767 + _local3)] = _local4; bitcode[(32767 + _local3)] = new BitString(); bitcode[(32767 + _local3)].len = _local4; bitcode[(32767 + _local3)].val = _local3; _local3++; }; _local3 = -((_local2 - 1)); while (_local3 <= -(_local1)) { category[(32767 + _local3)] = _local4; bitcode[(32767 + _local3)] = new BitString(); bitcode[(32767 + _local3)].len = _local4; bitcode[(32767 + _local3)].val = ((_local2 - 1) + _local3); _local3++; }; _local1 = (_local1 << 1); _local2 = (_local2 << 1); _local4++; }; } private function writeDQT():void{ var _local1:int; writeWord(65499); writeWord(132); writeByte(0); _local1 = 0; while (_local1 < 64) { writeByte(YTable[_local1]); _local1++; }; writeByte(1); _local1 = 0; while (_local1 < 64) { writeByte(UVTable[_local1]); _local1++; }; } private function writeAPP0():void{ writeWord(65504); writeWord(16); writeByte(74); writeByte(70); writeByte(73); writeByte(70); writeByte(0); writeByte(1); writeByte(1); writeByte(0); writeWord(1); writeWord(1); writeByte(0); writeByte(0); } private function writeSOS():void{ writeWord(65498); writeWord(12); writeByte(3); writeByte(1); writeByte(0); writeByte(2); writeByte(17); writeByte(3); writeByte(17); writeByte(0); writeByte(63); writeByte(0); } private function processDU(_arg1:Array, _arg2:Array, _arg3:Number, _arg4:Array, _arg5:Array):Number{ var _local8:int; var _local12:int; var _local13:int; var _local14:int; var _local6:BitString = _arg5[0]; var _local7:BitString = _arg5[240]; var _local9:Array = fDCTQuant(_arg1, _arg2); _local8 = 0; while (_local8 < 64) { DU[ZigZag[_local8]] = _local9[_local8]; _local8++; }; var _local10:int = (DU[0] - _arg3); _arg3 = DU[0]; if (_local10 == 0){ writeBits(_arg4[0]); } else { writeBits(_arg4[category[(32767 + _local10)]]); writeBits(bitcode[(32767 + _local10)]); }; var _local11 = 63; while ((((_local11 > 0)) && ((DU[_local11] == 0)))) { _local11--; }; if (_local11 == 0){ writeBits(_local6); return (_arg3); }; _local8 = 1; while (_local8 <= _local11) { _local12 = _local8; while ((((DU[_local8] == 0)) && ((_local8 <= _local11)))) { _local8++; }; _local13 = (_local8 - _local12); if (_local13 >= 16){ _local14 = 1; while (_local14 <= (_local13 / 16)) { writeBits(_local7); _local14++; }; _local13 = int((_local13 & 15)); }; writeBits(_arg5[((_local13 * 16) + category[(32767 + DU[_local8])])]); writeBits(bitcode[(32767 + DU[_local8])]); _local8++; }; if (_local11 != 63){ writeBits(_local6); }; return (_arg3); } private function initQuantTables(_arg1:int):void{ var _local2:int; var _local3:Number; var _local8:int; var _local4:Array = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]; _local2 = 0; while (_local2 < 64) { _local3 = Math.floor((((_local4[_local2] * _arg1) + 50) / 100)); if (_local3 < 1){ _local3 = 1; } else { if (_local3 > 0xFF){ _local3 = 0xFF; }; }; YTable[ZigZag[_local2]] = _local3; _local2++; }; var _local5:Array = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99]; _local2 = 0; while (_local2 < 64) { _local3 = Math.floor((((_local5[_local2] * _arg1) + 50) / 100)); if (_local3 < 1){ _local3 = 1; } else { if (_local3 > 0xFF){ _local3 = 0xFF; }; }; UVTable[ZigZag[_local2]] = _local3; _local2++; }; var _local6:Array = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379]; _local2 = 0; var _local7:int; while (_local7 < 8) { _local8 = 0; while (_local8 < 8) { fdtbl_Y[_local2] = (1 / (((YTable[ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8)); fdtbl_UV[_local2] = (1 / (((UVTable[ZigZag[_local2]] * _local6[_local7]) * _local6[_local8]) * 8)); _local2++; _local8++; }; _local7++; }; } private function writeSOF0(_arg1:int, _arg2:int):void{ writeWord(65472); writeWord(17); writeByte(8); writeWord(_arg2); writeWord(_arg1); writeByte(3); writeByte(1); writeByte(17); writeByte(0); writeByte(2); writeByte(17); writeByte(1); writeByte(3); writeByte(17); writeByte(1); } private function computeHuffmanTbl(_arg1:Array, _arg2:Array):Array{ var _local7:int; var _local3:int; var _local4:int; var _local5:Array = new Array(); var _local6 = 1; while (_local6 <= 16) { _local7 = 1; while (_local7 <= _arg1[_local6]) { _local5[_arg2[_local4]] = new BitString(); _local5[_arg2[_local4]].val = _local3; _local5[_arg2[_local4]].len = _local6; _local4++; _local3++; _local7++; }; _local3 = (_local3 * 2); _local6++; }; return (_local5); } private function fDCTQuant(_arg1:Array, _arg2:Array):Array{ var _local3:Number; var _local4:Number; 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; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:int; var _local23:int; _local22 = 0; while (_local22 < 8) { _local3 = (_arg1[(_local23 + 0)] + _arg1[(_local23 + 7)]); _local10 = (_arg1[(_local23 + 0)] - _arg1[(_local23 + 7)]); _local4 = (_arg1[(_local23 + 1)] + _arg1[(_local23 + 6)]); _local9 = (_arg1[(_local23 + 1)] - _arg1[(_local23 + 6)]); _local5 = (_arg1[(_local23 + 2)] + _arg1[(_local23 + 5)]); _local8 = (_arg1[(_local23 + 2)] - _arg1[(_local23 + 5)]); _local6 = (_arg1[(_local23 + 3)] + _arg1[(_local23 + 4)]); _local7 = (_arg1[(_local23 + 3)] - _arg1[(_local23 + 4)]); _local11 = (_local3 + _local6); _local14 = (_local3 - _local6); _local12 = (_local4 + _local5); _local13 = (_local4 - _local5); _arg1[(_local23 + 0)] = (_local11 + _local12); _arg1[(_local23 + 4)] = (_local11 - _local12); _local15 = ((_local13 + _local14) * 0.707106781); _arg1[(_local23 + 2)] = (_local14 + _local15); _arg1[(_local23 + 6)] = (_local14 - _local15); _local11 = (_local7 + _local8); _local12 = (_local8 + _local9); _local13 = (_local9 + _local10); _local19 = ((_local11 - _local13) * 0.382683433); _local16 = ((0.5411961 * _local11) + _local19); _local18 = ((1.306562965 * _local13) + _local19); _local17 = (_local12 * 0.707106781); _local20 = (_local10 + _local17); _local21 = (_local10 - _local17); _arg1[(_local23 + 5)] = (_local21 + _local16); _arg1[(_local23 + 3)] = (_local21 - _local16); _arg1[(_local23 + 1)] = (_local20 + _local18); _arg1[(_local23 + 7)] = (_local20 - _local18); _local23 = (_local23 + 8); _local22++; }; _local23 = 0; _local22 = 0; while (_local22 < 8) { _local3 = (_arg1[(_local23 + 0)] + _arg1[(_local23 + 56)]); _local10 = (_arg1[(_local23 + 0)] - _arg1[(_local23 + 56)]); _local4 = (_arg1[(_local23 + 8)] + _arg1[(_local23 + 48)]); _local9 = (_arg1[(_local23 + 8)] - _arg1[(_local23 + 48)]); _local5 = (_arg1[(_local23 + 16)] + _arg1[(_local23 + 40)]); _local8 = (_arg1[(_local23 + 16)] - _arg1[(_local23 + 40)]); _local6 = (_arg1[(_local23 + 24)] + _arg1[(_local23 + 32)]); _local7 = (_arg1[(_local23 + 24)] - _arg1[(_local23 + 32)]); _local11 = (_local3 + _local6); _local14 = (_local3 - _local6); _local12 = (_local4 + _local5); _local13 = (_local4 - _local5); _arg1[(_local23 + 0)] = (_local11 + _local12); _arg1[(_local23 + 32)] = (_local11 - _local12); _local15 = ((_local13 + _local14) * 0.707106781); _arg1[(_local23 + 16)] = (_local14 + _local15); _arg1[(_local23 + 48)] = (_local14 - _local15); _local11 = (_local7 + _local8); _local12 = (_local8 + _local9); _local13 = (_local9 + _local10); _local19 = ((_local11 - _local13) * 0.382683433); _local16 = ((0.5411961 * _local11) + _local19); _local18 = ((1.306562965 * _local13) + _local19); _local17 = (_local12 * 0.707106781); _local20 = (_local10 + _local17); _local21 = (_local10 - _local17); _arg1[(_local23 + 40)] = (_local21 + _local16); _arg1[(_local23 + 24)] = (_local21 - _local16); _arg1[(_local23 + 8)] = (_local20 + _local18); _arg1[(_local23 + 56)] = (_local20 - _local18); _local23++; _local22++; }; _local22 = 0; while (_local22 < 64) { _arg1[_local22] = Math.round((_arg1[_local22] * _arg2[_local22])); _local22++; }; return (_arg1); } } }//package com.adobe.images
Section 15
//ArrayUtil (com.adobe.utils.ArrayUtil) package com.adobe.utils { public class ArrayUtil { public static function arraysAreEqual(_arg1:Array, _arg2:Array):Boolean{ if (_arg1.length != _arg2.length){ return (false); }; var _local3:Number = _arg1.length; var _local4:Number = 0; while (_local4 < _local3) { if (_arg1[_local4] !== _arg2[_local4]){ return (false); }; _local4++; }; return (true); } public static function arrayContainsValue(_arg1:Array, _arg2:Object):Boolean{ return (!((_arg1.indexOf(_arg2) == -1))); } public static function copyArray(_arg1:Array):Array{ return (_arg1.slice()); } public static function removeValueFromArray(_arg1:Array, _arg2:Object):void{ var _local3:uint = _arg1.length; var _local4:Number = _local3; while (_local4 > -1) { if (_arg1[_local4] === _arg2){ _arg1.splice(_local4, 1); }; _local4--; }; } public static function createUniqueCopy(_arg1:Array):Array{ var _local4:Object; var _local2:Array = new Array(); var _local3:Number = _arg1.length; var _local5:uint; while (_local5 < _local3) { _local4 = _arg1[_local5]; if (_slot1.arrayContainsValue(_local2, _local4)){ } else { _local2.push(_local4); }; _local5++; }; return (_local2); } } }//package com.adobe.utils
Section 16
//BuildMenu (com.wbwar.creeper.controlpanel.menu.BuildMenu) package com.wbwar.creeper.controlpanel.menu { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; public class BuildMenu extends Sprite { public var areaGunButton:Button; public var gunButton:Button; public var droneBaseButton:Button; public var statusName:TextField; public var buttonHighlight:ButtonHighlight; public var relayButton:Button; public var logisticsButton:Button; public var statusDesc:TextField; public var thorsHammerButton:Button; public var abmButton:Button; public var energyStoreButton:Button; public var nodeButton:Button; public var statusCost:TextField; public var energyAmpButton:Button; private var highlightLayer:Sprite; public function BuildMenu(){ var _local1:Sprite; super(); mouseEnabled = false; gunButton = new Button("Blaster", 10, 66, 17, 0, 0, false, 7344144, -1); addChild(gunButton); gunButton.setSubtitle("6", -2, 6); _local1 = Gun.getPlacementSprite(false); gunButton.addChild(_local1); _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.8; _local1.scaleY = _local1.scaleX; gunButton.x = 1; gunButton.y = 19; gunButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverGun, false, 0, true); gunButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); areaGunButton = new Button("Mortar", 10, 66, 17, 0, 0, false, 7344144, -1); addChild(areaGunButton); areaGunButton.setSubtitle("7", -2, 6); _local1 = AreaGun.getPlacementSprite(false); areaGunButton.addChild(_local1); _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.8; _local1.scaleY = _local1.scaleX; areaGunButton.x = (gunButton.x + 67); areaGunButton.y = 19; areaGunButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverAreaGun, false, 0, true); areaGunButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); abmButton = new Button("SAM", 10, 66, 17, 0, 0, false, 7344144, -1); addChild(abmButton); abmButton.setSubtitle("8", -2, 6); _local1 = ABM.getPlacementSprite(false); abmButton.addChild(_local1); _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.8; _local1.scaleY = _local1.scaleX; abmButton.x = (areaGunButton.x + 67); abmButton.y = 19; abmButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverAbm, false, 0, true); abmButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); droneBaseButton = new Button("Drone", 10, 66, 17, 0, 0, false, 7344144, -1); addChild(droneBaseButton); droneBaseButton.setSubtitle("9", -2, 6); _local1 = DroneBase.getPlacementSprite(false); droneBaseButton.addChild(_local1); _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.7; _local1.scaleY = _local1.scaleX; droneBaseButton.x = (abmButton.x + 67); droneBaseButton.y = 19; droneBaseButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverDroneBase, false, 0, true); droneBaseButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); thorsHammerButton = new Button("Thor", 10, 66, 17, 0, 0, false, 7344144, -1); addChild(thorsHammerButton); thorsHammerButton.setSubtitle("0", -2, 6); _local1 = new Sprite(); thorsHammerButton.addChild(_local1); _local1.rotation = -90; _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.4; _local1.scaleY = _local1.scaleX; thorsHammerButton.x = (droneBaseButton.x + 67); thorsHammerButton.y = 19; thorsHammerButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverThorsHammer, false, 0, true); thorsHammerButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); nodeButton = new Button("Collector", 10, 66, 17, 0, 0, false, 1077264, -1); addChild(nodeButton); nodeButton.setSubtitle("1", -2, 6); _local1 = Node.getPlacementSprite(false); nodeButton.addChild(_local1); _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.8; _local1.scaleY = _local1.scaleX; nodeButton.x = 1; nodeButton.y = 1; nodeButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverNode, false, 0, true); nodeButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); relayButton = new Button("Relay", 10, 66, 17, 0, 0, false, 1077264, -1); addChild(relayButton); relayButton.setSubtitle("2", -2, 6); _local1 = Relay.getPlacementSprite(false); relayButton.addChild(_local1); _local1.x = 57; _local1.y = 9; _local1.scaleX = 0.8; _local1.scaleY = _local1.scaleX; relayButton.x = (nodeButton.x + 67); relayButton.y = 1; relayButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverRelay, false, 0, true); relayButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); energyStoreButton = new Button("Storage", 10, 66, 17, 0, 0, false, 1077264, -1); addChild(energyStoreButton); energyStoreButton.setSubtitle("3", -2, 6); _local1 = EnergyStorage.getPlacementSprite(false); energyStoreButton.addChild(_local1); _local1.x = 57; _local1.y = 8; _local1.scaleX = 0.6; _local1.scaleY = _local1.scaleX; energyStoreButton.x = (relayButton.x + 67); energyStoreButton.y = 1; energyStoreButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverEnergyStorage, false, 0, true); energyStoreButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); logisticsButton = new Button("Speed", 10, 66, 17, 0, 0, false, 1077264, -1); addChild(logisticsButton); logisticsButton.setSubtitle("4", -2, 6); _local1 = Logistics.getPlacementSprite(false); logisticsButton.addChild(_local1); _local1.x = 57; _local1.y = 8; _local1.scaleX = 0.6; _local1.scaleY = _local1.scaleX; logisticsButton.x = (energyStoreButton.x + 67); logisticsButton.y = 1; logisticsButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverLogistics, false, 0, true); logisticsButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); energyAmpButton = new Button("Reactor", 10, 66, 17, 0, 0, false, 1077264, -1); addChild(energyAmpButton); energyAmpButton.setSubtitle("5", -2, 6); _local1 = EnergyAmp.getPlacementSprite(false); energyAmpButton.addChild(_local1); _local1.x = 57; _local1.y = 8; _local1.scaleX = 0.6; _local1.scaleY = _local1.scaleX; energyAmpButton.x = (logisticsButton.x + 67); energyAmpButton.y = 1; energyAmpButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverEnergyAmp, false, 0, true); energyAmpButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); highlightLayer = new Sprite(); highlightLayer.mouseEnabled = false; highlightLayer.mouseChildren = false; addChild(highlightLayer); buttonHighlight = new ButtonHighlight(gunButton.width, gunButton.height); highlightLayer.addChild(buttonHighlight); buttonHighlight.visible = false; gunButton.addEventListener(MouseEvent.CLICK, onGunButtonClick, false, 0, true); areaGunButton.addEventListener(MouseEvent.CLICK, onAreaGunButtonClick, false, 0, true); abmButton.addEventListener(MouseEvent.CLICK, onAbmButtonClick, false, 0, true); droneBaseButton.addEventListener(MouseEvent.CLICK, onDroneBaseButtonClick, false, 0, true); thorsHammerButton.addEventListener(MouseEvent.CLICK, onThorsHammerButtonClick, false, 0, true); nodeButton.addEventListener(MouseEvent.CLICK, onNodeButtonClick, false, 0, true); relayButton.addEventListener(MouseEvent.CLICK, onRelayButtonClick, false, 0, true); energyStoreButton.addEventListener(MouseEvent.CLICK, onEnergyStoreButtonClick, false, 0, true); logisticsButton.addEventListener(MouseEvent.CLICK, onLogisticsButtonClick, false, 0, true); energyAmpButton.addEventListener(MouseEvent.CLICK, onEnergyAmpButtonClick, false, 0, true); statusName = Text.text("", 8, 0xFFFFFF); statusName.filters = [new DropShadowFilter(1, 45, 0x404040)]; statusName.y = 33; addChild(statusName); statusDesc = Text.text("", 8, 0xA0A0A0); statusDesc.filters = [new DropShadowFilter(1, 45, 0x404040)]; statusDesc.y = 33; addChild(statusDesc); statusCost = Text.text("", 8, 0xFF00); statusCost.filters = [new DropShadowFilter(1, 45, 0x404040)]; statusCost.y = 33; addChild(statusCost); } private function onMouseOverThorsHammer(_arg1:MouseEvent):void{ if (thorsHammerButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[THOR'S HAMMER]"; statusDesc.text = "Ultimate Weapon"; statusCost.text = "COST: "; alignStatus(); } private function onMouseOverAreaGun(_arg1:MouseEvent):void{ if (areaGunButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[Mortar]"; statusDesc.text = "Confined fractal charge launcher."; statusCost.text = ("COST: " + String(int(((AreaGun.BASE_COST / 5) * _local2)))); alignStatus(); } private function onMouseOverNode(_arg1:MouseEvent):void{ if (nodeButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[COLLECTOR]"; statusDesc.text = "Fractal energy collector."; statusCost.text = ("COST: " + String(int(((Node.BASE_COST / 5) * _local2)))); alignStatus(); } public function enableAll(_arg1:Boolean):void{ nodeButton.enabled = _arg1; relayButton.enabled = _arg1; energyStoreButton.enabled = _arg1; logisticsButton.enabled = _arg1; energyAmpButton.enabled = _arg1; gunButton.enabled = _arg1; areaGunButton.enabled = _arg1; abmButton.enabled = _arg1; droneBaseButton.enabled = _arg1; } private function onMouseOverAbm(_arg1:MouseEvent):void{ if (abmButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[SAM]"; statusDesc.text = "Surface to air missile."; statusCost.text = ("COST: " + String(int(((ABM.BASE_COST / 5) * _local2)))); alignStatus(); } private function onAbmButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::ABM"; setBuildMode(abmButton); } private function onRelayButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::Relay"; setBuildMode(relayButton); } private function onDroneBaseButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::DroneBase"; setBuildMode(droneBaseButton); } private function onMouseOverDroneBase(_arg1:MouseEvent):void{ if (droneBaseButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[DRONE]"; statusDesc.text = "AI Drone bomber base."; statusCost.text = ("COST: " + String(int(((DroneBase.BASE_COST / 5) * _local2)))); alignStatus(); } private function onNodeButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::Node"; setBuildMode(nodeButton); } private function onMouseOverRelay(_arg1:MouseEvent):void{ if (relayButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[RELAY]"; statusDesc.text = "Long range network relay."; statusCost.text = ("COST: " + String(int(((Relay.BASE_COST / 5) * _local2)))); alignStatus(); } private function onMouseOverLogistics(_arg1:MouseEvent):void{ if (logisticsButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[PACKET SPEED]"; statusDesc.text = "Packet speed enhancement driver."; statusCost.text = ("COST: " + String(int(((Logistics.BASE_COST / 5) * _local2)))); alignStatus(); } private function onEnergyStoreButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::EnergyStorage"; setBuildMode(energyStoreButton); } private function onEnergyAmpButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::EnergyAmp"; setBuildMode(energyAmpButton); } private function onKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 49){ if (((nodeButton.enabled) && (!(nodeButton.mystery)))){ onNodeButtonClick(null); }; } else { if (_arg1.keyCode == 50){ if (((relayButton.enabled) && (!(relayButton.mystery)))){ onRelayButtonClick(null); }; } else { if (_arg1.keyCode == 51){ if (((energyStoreButton.enabled) && (!(energyStoreButton.mystery)))){ onEnergyStoreButtonClick(null); }; } else { if (_arg1.keyCode == 52){ if (((logisticsButton.enabled) && (!(logisticsButton.mystery)))){ onLogisticsButtonClick(null); }; } else { if (_arg1.keyCode == 53){ if (((energyAmpButton.enabled) && (!(energyAmpButton.mystery)))){ onEnergyAmpButtonClick(null); }; } else { if (_arg1.keyCode == 54){ if (((gunButton.enabled) && (!(gunButton.mystery)))){ onGunButtonClick(null); }; } else { if (_arg1.keyCode == 55){ if (((areaGunButton.enabled) && (!(areaGunButton.mystery)))){ onAreaGunButtonClick(null); }; } else { if (_arg1.keyCode == 56){ if (((abmButton.enabled) && (!(abmButton.mystery)))){ onAbmButtonClick(null); }; } else { if (_arg1.keyCode == 57){ if (((droneBaseButton.enabled) && (!(droneBaseButton.mystery)))){ onDroneBaseButtonClick(null); }; } else { if (_arg1.keyCode == 48){ if (((thorsHammerButton.enabled) && (!(thorsHammerButton.mystery)))){ onThorsHammerButtonClick(null); }; }; }; }; }; }; }; }; }; }; }; } private function onMouseOverEnergyAmp(_arg1:MouseEvent):void{ if (energyAmpButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[SINGULARITY REACTOR]"; statusDesc.text = "Fractal energy producer."; statusCost.text = ("COST: " + String(int(((EnergyAmp.BASE_COST / 5) * _local2)))); alignStatus(); } private function onAreaGunButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::AreaGun"; setBuildMode(areaGunButton); } private function onGunButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::Gun"; setBuildMode(gunButton); } private function alignStatus():void{ statusName.visible = true; statusDesc.visible = true; statusCost.visible = true; statusName.x = 5; statusCost.x = ((statusName.x + statusName.width) + 5); statusDesc.x = ((statusCost.x + statusCost.width) + 10); } private function onLogisticsButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::Logistics"; setBuildMode(logisticsButton); } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (_arg1){ Creeper.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true); } else { Creeper.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); }; } private function onMouseOverGun(_arg1:MouseEvent):void{ if (gunButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[BLASTER]"; statusDesc.text = "Fractal beam blaster."; statusCost.text = ("COST: " + String(int(((Gun.BASE_COST / 5) * _local2)))); alignStatus(); } private function setBuildMode(_arg1:Button):void{ GameSpace.instance.controlPanel.cancelButton.visible = true; buttonHighlight.visible = true; buttonHighlight.x = _arg1.x; buttonHighlight.y = _arg1.y; } private function onThorsHammerButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToMove = null; GameSpace.instance.places.placeToAdd = "com.wbwar.creeper::ThorsHammer"; setBuildMode(thorsHammerButton); } private function onMouseOut(_arg1:MouseEvent):void{ statusName.visible = false; statusDesc.visible = false; statusCost.visible = false; } private function onMouseOverEnergyStorage(_arg1:MouseEvent):void{ if (energyStoreButton.mystery){ return; }; var _local2:Number = (GameSpace.instance.upgradeEconomic1) ? Place.CHEAPER_RATE : 1; statusName.text = "[ENERGY STORAGE]"; statusDesc.text = "Fractal energy storage center."; statusCost.text = ("COST: " + String(int(((EnergyStorage.BASE_COST / 5) * _local2)))); alignStatus(); } } }//package com.wbwar.creeper.controlpanel.menu
Section 17
//CivControlMenu (com.wbwar.creeper.controlpanel.menu.CivControlMenu) package com.wbwar.creeper.controlpanel.menu { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.text.*; public class CivControlMenu extends Sprite { private var titleText:TextField; private var _place:Place; private var descText:TextField; public function CivControlMenu(){ titleText = Text.text("", 12, 0xFFFFFF); titleText.filters = [new DropShadowFilter(2, 45, 0xFF00)]; titleText.y = 0; addChild(titleText); descText = Text.text("", 9, 0xFFFFFF); descText.y = 17; addChild(descText); } public function get place():Place{ return (_place); } public function set place(_arg1:Place):void{ _place = _arg1; if ((_arg1 is Node)){ titleText.text = "Collector"; descText.text = "Collects fractal space energy from surroundings.\nCollectors are the backbone of any successful network."; } else { if ((_arg1 is Relay)){ titleText.text = "Relay"; descText.text = "Form long range network connections to other relays.\nUseful for spanning valleys or creating shorter paths."; } else { if ((_arg1 is EnergyStorage)){ titleText.text = "Energy Storage"; descText.text = "Increases maximum energy reserves.\nProvides additional buffer for rapid building."; } else { if ((_arg1 is Logistics)){ titleText.text = "Packet Speed"; descText.text = "Increases speed of all packets on the network.\nUseful for rapid supply of packets over long distance."; } else { if ((_arg1 is EnergyAmp)){ titleText.text = "Singularity Reactor"; descText.text = "Utilizes fractal space singularities to produce energy.\nUseful for producing additional energy."; } else { if ((_arg1 is BaseGun)){ titleText.text = "Odin City"; descText.text = "Humanity's last hope for survival.\nProtect the city at ALL costs."; } else { if ((_arg1 is Totem)){ titleText.text = "Rift Totem"; descText.text = "Power all of these on a map to activate the Rift.\nMade of fractal alloy, totems are immune to Creeper."; } else { if ((_arg1 is UpgradeBox)){ titleText.text = "Nanobot Deposit"; descText.text = "Collect these to earn upgrades.\nCollect as many of these as possible."; } else { if ((_arg1 is Tech)){ titleText.text = "Nano Schematics"; descText.text = "Schematics for new technology.\nCollect these to rebuild our technology database."; } else { if ((_arg1 is Ruin)){ titleText.text = "Ruin"; descText.text = "Unknown artifact."; } else { if ((_arg1 is SurvivalPod)){ titleText.text = "Survival Pod"; descText.text = "Escape pod from orbiting ship.\nMay contain living human survivors."; }; }; }; }; }; }; }; }; }; }; }; } } }//package com.wbwar.creeper.controlpanel.menu
Section 18
//PlaceControlMenu (com.wbwar.creeper.controlpanel.menu.PlaceControlMenu) package com.wbwar.creeper.controlpanel.menu { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; public class PlaceControlMenu extends Sprite { public var turnOnOffButton:Button; private var _place:Place; public var destroyButton:Button; public var noActionMode:Boolean; public var armDisarmButton:Button; public function PlaceControlMenu(){ turnOnOffButton = new Button("Deactivate", 10, 66, 15, 0, -1, false, 1077264, -1); addChild(turnOnOffButton); turnOnOffButton.setSubtitle("Q", 59, 3); turnOnOffButton.x = 5; turnOnOffButton.y = 1; armDisarmButton = new Button("Disarm", 10, 66, 15, 0, -1, false, 1077360, -1); addChild(armDisarmButton); armDisarmButton.setSubtitle("A", 59, 3); armDisarmButton.x = 5; armDisarmButton.y = 17; destroyButton = new Button("Destroy", 8, 46, 10, 0, -3, true, 7344144, -1); addChild(destroyButton); destroyButton.setSubtitle("x", 39, -1); destroyButton.x = 5; destroyButton.y = 35; destroyButton.addEventListener(MouseEvent.CLICK, onDestroyButtonClick, false, 0, true); turnOnOffButton.addEventListener(MouseEvent.CLICK, onTurnOnOffButtonClick, false, 0, true); armDisarmButton.addEventListener(MouseEvent.CLICK, onArmDisarmButtonClick, false, 0, true); } public function onTurnOnOffButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; if (_place != null){ _place.turnedOn = !(_place.turnedOn); if (_place.turnedOn){ turnOnOffButton.text.text = "Deactivate"; } else { turnOnOffButton.text.text = "Activate"; }; }; } public function get place():Place{ return (_place); } public function onArmDisarmButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; if (_place != null){ _place.armed = !(_place.armed); if (_place.armed){ armDisarmButton.text.text = "Disarm"; } else { armDisarmButton.text.text = "Arm"; }; }; } public function set place(_arg1:Place):void{ _place = _arg1; if (_arg1 != null){ if (noActionMode){ destroyButton.visible = false; turnOnOffButton.visible = false; armDisarmButton.visible = false; } else { if ((((((((((((_arg1 is BaseGun)) || ((_arg1 is UpgradeBox)))) || ((_arg1 is Totem)))) || ((_arg1 is Tech)))) || ((_arg1 is Ruin)))) || ((_arg1 is SurvivalPod)))){ destroyButton.visible = false; armDisarmButton.visible = false; turnOnOffButton.visible = false; } else { destroyButton.visible = true; if (_arg1.turnedOn){ turnOnOffButton.text.text = "Deactivate"; } else { turnOnOffButton.text.text = "Activate"; }; if (_arg1.armed){ armDisarmButton.text.text = "Disarm"; } else { armDisarmButton.text.text = "Arm"; }; if ((((((((_arg1 is Gun)) || ((_arg1 is AreaGun)))) || ((_arg1 is ABM)))) || ((_arg1 is DroneBase)))){ turnOnOffButton.visible = true; } else { turnOnOffButton.visible = false; }; if ((((((_arg1 is Gun)) || ((_arg1 is AreaGun)))) || ((_arg1 is ABM)))){ armDisarmButton.visible = true; } else { armDisarmButton.visible = false; }; }; }; }; } public function onDestroyButtonClick(_arg1:MouseEvent):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; if (_place != null){ _place.destroy(); }; GameSpace.instance.controlPanel.onCancelButtonClick(); } } }//package com.wbwar.creeper.controlpanel.menu
Section 19
//PlaceMenu (com.wbwar.creeper.controlpanel.menu.PlaceMenu) package com.wbwar.creeper.controlpanel.menu { import com.wbwar.creeper.*; import flash.display.*; import flash.events.*; public class PlaceMenu extends Sprite { private var _place:Place; public var civControlMenu:CivControlMenu; public var weaponControlMenu:WeaponControlMenu; public var placeControlMenu:PlaceControlMenu; public function PlaceMenu(){ mouseEnabled = false; placeControlMenu = new PlaceControlMenu(); addChild(placeControlMenu); civControlMenu = new CivControlMenu(); civControlMenu.x = 75; addChild(civControlMenu); civControlMenu.visible = false; weaponControlMenu = new WeaponControlMenu(); weaponControlMenu.x = 75; addChild(weaponControlMenu); weaponControlMenu.visible = false; } private function onKeyDown(_arg1:KeyboardEvent):void{ if (weaponControlMenu.visible){ if (_arg1.keyCode == 81){ if (placeControlMenu.turnOnOffButton.visible){ placeControlMenu.onTurnOnOffButtonClick(null); }; } else { if (_arg1.keyCode == 65){ if (placeControlMenu.armDisarmButton.visible){ placeControlMenu.onArmDisarmButtonClick(null); }; }; }; }; if (_arg1.keyCode == 88){ if (placeControlMenu.destroyButton.visible){ placeControlMenu.onDestroyButtonClick(null); }; }; } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (_arg1){ Creeper.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true); } else { Creeper.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); }; } public function get place():Place{ return (_place); } public function set place(_arg1:Place):void{ _place = _arg1; if ((_arg1 is BaseGun)){ civControlMenu.place = _arg1; weaponControlMenu.visible = false; civControlMenu.visible = true; } else { if ((((((((_arg1 is Gun)) || ((_arg1 is AreaGun)))) || ((_arg1 is ABM)))) || ((_arg1 is DroneBase)))){ weaponControlMenu.place = _arg1; weaponControlMenu.visible = true; civControlMenu.visible = false; } else { civControlMenu.place = _arg1; weaponControlMenu.visible = false; civControlMenu.visible = true; }; }; placeControlMenu.place = _arg1; } } }//package com.wbwar.creeper.controlpanel.menu
Section 20
//WeaponControlMenu (com.wbwar.creeper.controlpanel.menu.WeaponControlMenu) package com.wbwar.creeper.controlpanel.menu { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; public class WeaponControlMenu extends Sprite { private var checkForDone:Boolean; private var titleText:TextField; private var _place:Place; private var currentLevelText:TextField; private var descText:TextField; public function WeaponControlMenu(){ titleText = Text.text("", 12, 0xFFFFFF); titleText.filters = [new DropShadowFilter(2, 45, 0xFF0000)]; titleText.y = 0; addChild(titleText); currentLevelText = Text.text("", 10, 0xD0D0D0); currentLevelText.filters = [new DropShadowFilter(2, 45, 0xFF00)]; currentLevelText.y = 1; addChild(currentLevelText); descText = Text.text("", 9, 0xFFFFFF); descText.y = 17; addChild(descText); addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); } public function get place():Place{ return (_place); } public function set place(_arg1:Place):void{ _place = _arg1; if ((_arg1 is Gun)){ titleText.text = "Blaster"; descText.text = "Primary defense weapon.\nCannot fire at elevations higher than itself!"; } else { if ((_arg1 is AreaGun)){ titleText.text = "Mortar"; descText.text = "Area effect weapon. Can fire over walls.\nBest when used against dense creeper."; } else { if ((_arg1 is ABM)){ titleText.text = "SAM"; descText.text = "Surface to air missile launcher.\nDestroys incoming creeper spores."; } else { if ((_arg1 is DroneBase)){ titleText.text = "Drone Base"; descText.text = "Powerful drone bomber. Good for air to ground support.\nMust be manually targetted."; }; }; }; }; if (((_place.building) && (!(_place.upgrading)))){ currentLevelText.text = "[Constructing...]"; currentLevelText.x = ((titleText.x + titleText.width) + 3); checkForDone = true; } else { if (_place.upgrading){ currentLevelText.text = "[Upgrading...]"; currentLevelText.x = ((titleText.x + titleText.width) + 3); checkForDone = true; } else { currentLevelText.text = ""; }; }; } private function onEnterFrame(_arg1:Event):void{ if (_place != null){ if (((((!(_place.upgrading)) && (!(_place.building)))) && (checkForDone))){ this.place = place; }; }; } } }//package com.wbwar.creeper.controlpanel.menu
Section 21
//ControlPanel (com.wbwar.creeper.controlpanel.ControlPanel) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.utils.*; import caurina.transitions.*; import com.wbwar.creeper.dialogs.*; import com.wbwar.creeper.controlpanel.menu.*; public class ControlPanel extends Sprite { private var lastTime:int;// = -1 private var _place:Place; private var mainMenuButton:Button; public var placeMenu:PlaceMenu; private var glopBlobWaveViewer:GlopBlobWaveViewer; private var speedControl:SpeedControl; private var heightViewer:HeightViewer; public var playMore:PlayMore; private var showFPS:Boolean; private var frameRateText:TextField; public var pointViewer:PointViewer; public var cancelButton:Button; private var lastUpdateCount:int;// = -1 private var helpButton:Button; private var playMoreButton:Button; public var menu:Sprite; public var stashViewer:StashViewer; public var missionTimeViewer:MissionTimeViewer; public var buildMenu:BuildMenu; private var optionsButton:Button; private var menuButton:Button; public function ControlPanel(){ graphics.beginFill(0x202020); graphics.drawRect(0, 0, (GameSpace.WIDTH * GameSpace.CELL_WIDTH), 45); graphics.endFill(); frameRateText = Text.text("", 8, 0); frameRateText.filters = [new DropShadowFilter(1, 45, 0xFFFFFF)]; addChild(frameRateText); frameRateText.x = ((GameSpace.WIDTH * GameSpace.CELL_WIDTH) - 20); frameRateText.y = -15; frameRateText.visible = false; buildMenu = new BuildMenu(); buildMenu.visible = true; addChild(buildMenu); placeMenu = new PlaceMenu(); placeMenu.visible = false; addChild(placeMenu); cancelButton = new Button(" CANCEL", 9, 45, 42, 0, 8, true, 9465872, 0x707070); cancelButton.setSubtitle("[space]", 7, 17); addChild(cancelButton); cancelButton.visible = false; cancelButton.x = 337; cancelButton.y = 1; missionTimeViewer = new MissionTimeViewer(); addChild(missionTimeViewer); missionTimeViewer.x = 445; missionTimeViewer.y = 1; glopBlobWaveViewer = new GlopBlobWaveViewer(); addChild(glopBlobWaveViewer); glopBlobWaveViewer.x = 447; glopBlobWaveViewer.y = 22; glopBlobWaveViewer.visible = false; playMore = new PlayMore(); addChild(playMore); playMore.x = 375; playMore.y = 1; heightViewer = new HeightViewer(); addChild(heightViewer); heightViewer.x = 415; heightViewer.y = 2; stashViewer = new StashViewer(); addChild(stashViewer); stashViewer.x = 513; stashViewer.y = 1; speedControl = new SpeedControl(); addChild(speedControl); speedControl.x = 625; speedControl.y = 1; optionsButton = new Button("Options", 9, 60, 14, 0, 0, true, 7368720, -1); addChild(optionsButton); optionsButton.x = 639; optionsButton.y = 1; helpButton = new Button("Help", 9, 60, 14, 0, 0, true, 5292048, -1); addChild(helpButton); helpButton.x = 639; helpButton.y = 16; mainMenuButton = new Button("Exit Game", 9, 60, 13, 0, -1, true, 7352336, -1); addChild(mainMenuButton); mainMenuButton.x = 639; mainMenuButton.y = 31; cancelButton.addEventListener(MouseEvent.CLICK, onCancelButtonClick, false, 0, true); optionsButton.addEventListener(MouseEvent.CLICK, onOptionsClick, false, 0, true); helpButton.addEventListener(MouseEvent.CLICK, onHelpClick, false, 0, true); mainMenuButton.addEventListener(MouseEvent.CLICK, onMainMenuClick, false, 0, true); Creeper.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true); } private function onOptionsClick(_arg1:MouseEvent):void{ _arg1.stopImmediatePropagation(); GameSpace.instance.showSettingsDialog(); } public function set place(_arg1:Place):void{ _place = _arg1; placeMenu.place = _arg1; if (_arg1 == null){ buildMenu.visible = true; placeMenu.visible = false; cancelButton.visible = false; } else { buildMenu.visible = false; placeMenu.visible = true; cancelButton.visible = true; }; } private function onMainMenuClick(_arg1:MouseEvent):void{ _arg1.stopImmediatePropagation(); GameSpace.instance.showExitDialog(); } public function finish():void{ Creeper.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); buildMenu.visible = false; placeMenu.visible = false; } private function onHelpClick(_arg1:MouseEvent):void{ _arg1.stopImmediatePropagation(); GameSpace.instance.tutorialLayer.addChild(HelpDialog.instance); HelpDialog.instance.x = (350 - (HelpDialog.WIDTH / 2)); HelpDialog.instance.y = (250 - (HelpDialog.HEIGHT / 2)); HelpDialog.instance.visible = true; GameSpace.instance.paused = true; } public function update():void{ var _local1:int; var _local2:int; if (showFPS){ _local1 = getTimer(); _local2 = GameSpace.instance.updateCount; if (lastTime > 0){ frameRateText.text = String((int((((_local2 - lastUpdateCount) / ((_local1 - lastTime) / 1000)) * 10)) / 10)); }; lastTime = _local1; lastUpdateCount = GameSpace.instance.updateCount; }; glopBlobWaveViewer.update(); missionTimeViewer.update(); } private function onMenuClick(_arg1:MouseEvent):void{ if (menu.y >= 0){ Tweener.addTween(menu, {time:1, y:-33}); } else { Tweener.addTween(menu, {time:1, y:0}); }; } private function onKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 80){ GameSpace.instance.paused = !(GameSpace.instance.paused); } else { if (_arg1.keyCode == 187){ showFPS = !(showFPS); frameRateText.visible = showFPS; } else { if (_arg1.keyCode == 8){ } else { if (_arg1.keyCode == 186){ } else { if (_arg1.keyCode == 87){ } else { if (_arg1.keyCode == 90){ } else { if (_arg1.keyCode == 27){ onCancelButtonClick(null); } else { if (_arg1.keyCode == 32){ onCancelButtonClick(null); } else { if (_arg1.keyCode == 77){ GameSpace.instance.mute = !(GameSpace.instance.mute); } else { if (_arg1.keyCode == 38){ } else { if (_arg1.keyCode == 40){ }; }; }; }; }; }; }; }; }; }; }; } public function onCancelButtonClick(_arg1:MouseEvent=null):void{ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; GameSpace.instance.places.removeAllSelections(); GameSpace.instance.places.placeToAdd = null; GameSpace.instance.places.placeToMove = null; place = null; buildMenu.buttonHighlight.visible = false; cancelButton.visible = false; dispatchEvent(new Event("ControlPanel_Cancel")); } } }//package com.wbwar.creeper.controlpanel
Section 22
//GlopBlobWaveViewer (com.wbwar.creeper.controlpanel.GlopBlobWaveViewer) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.text.*; import caurina.transitions.*; public class GlopBlobWaveViewer extends Sprite { private var warn:Boolean; private var arrow:PulsingArrow; private var updateCount:int; private var scounter:int;// = 0 private var timeText:TextField; private static const WIDTH:int = 65; private static const HEIGHT:int = 21; public function GlopBlobWaveViewer(){ var _local1:TextField; super(); graphics.beginFill(8392720); graphics.lineStyle(1, 0x707070); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); _local1 = Text.text("Spore Attack", 9, 0xFFFFFF); _local1.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(_local1); _local1.x = ((WIDTH / 2) - (_local1.width / 2)); _local1.y = -2; timeText = Text.text("", 9, 16760976); addChild(timeText); timeText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; filters = [new GlowFilter(0xFFFFFF, 1, 0, 0)]; } private function warnOut():void{ if (warn){ Tweener.addTween(this, {time:0.5, transition:"linear", _Glow_blurX:8, _Glow_blurY:8, onComplete:warnIn}); }; } private function warnIn():void{ if (warn){ Tweener.addTween(this, {time:0.5, transition:"linear", _Glow_blurX:0, _Glow_blurY:0, onComplete:warnOut}); }; } public function update():void{ if ((((GameSpace.instance.glopBlobProducer == null)) || (GameSpace.instance.hideGlopBlobWaveViewer))){ return; }; updateCount++; if (updateCount == 5){ arrow = new PulsingArrow(); arrow.rotation = 60; arrow.scaleX = 2; arrow.scaleY = arrow.scaleX; arrow.x = (int((WIDTH / 2)) - 5); arrow.y = -10; addChild(arrow); } else { if (updateCount == 10){ removeChild(arrow); }; }; if (!visible){ visible = true; }; var _local1:int = int((GameSpace.instance.glopBlobProducer.remainingTime / 36)); if (_local1 < 30){ if (!warn){ warn = true; warnOut(); }; } else { if (warn){ warnIn(); warn = false; }; }; var _local2:int = int((_local1 / 60)); _local1 = (_local1 - (_local2 * 60)); var _local3:String = ((_local1 >= 10)) ? String(_local1) : ("0" + String(_local1)); timeText.text = ((String(_local2) + ":") + _local3); timeText.x = ((WIDTH / 2) - (timeText.width / 2)); timeText.y = 8; } } }//package com.wbwar.creeper.controlpanel
Section 23
//HeightViewer (com.wbwar.creeper.controlpanel.HeightViewer) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.text.*; public class HeightViewer extends Sprite { private var gHeightLast:Number; private var elevationText:TextField; private var mx:int;// = -1 private var my:int;// = -1 private var tHeightLast:int; private var heightShape:Shape; public static const WIDTH:int = 15; public static const HEIGHT:int = 42; public function HeightViewer(){ heightShape = new Shape(); heightShape.x = 13; addChild(heightShape); addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); elevationText = Text.text("ELEVATION", 8, 0xFFFFFF); addChild(elevationText); elevationText.rotation = -90; elevationText.x = 0; elevationText.y = HEIGHT; } private function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:Number; if (GameSpace.instance == null){ return; }; mx = (GameSpace.instance.gameArea.mouseX / GameSpace.CELL_WIDTH); my = (GameSpace.instance.gameArea.mouseY / GameSpace.CELL_HEIGHT); if ((((((((mx < 0)) || ((my < 0)))) || ((mx >= GameSpace.WIDTH)))) || ((my >= GameSpace.HEIGHT)))){ _local2 = 0; _local3 = 0; } else { _local2 = GameSpace.instance.terrain.terrainHeight[(mx + (my * GameSpace.WIDTH))]; _local3 = GameSpace.instance.glop.data[(mx + (my * GameSpace.WIDTH))]; }; if (((!((_local2 == tHeightLast))) || (!((_local3 == gHeightLast))))){ tHeightLast = _local2; gHeightLast = _local3; draw(_local2, _local3); }; } private function draw(_arg1:int, _arg2:Number):void{ heightShape.graphics.clear(); heightShape.graphics.beginFill(0xFFFFFF); heightShape.graphics.drawRect(0, 0, WIDTH, HEIGHT); heightShape.graphics.endFill(); var _local3:Number = (HEIGHT / 6); heightShape.graphics.beginFill(10526832); heightShape.graphics.drawRect(1, (HEIGHT - (_arg1 * _local3)), (WIDTH - 2), (_arg1 * _local3)); heightShape.graphics.endFill(); var _local4:Number = (_arg2 * _local3); if ((((_arg2 > 0)) && ((_local4 < 1)))){ _local4 = 1; }; var _local5:Number = ((HEIGHT - (_arg1 * _local3)) - _local4); if (_local5 < 0){ _local4 = (_local4 + _local5); _local5 = 0; }; heightShape.graphics.beginFill(5592507); heightShape.graphics.drawRect(1, _local5, (WIDTH - 2), _local4); heightShape.graphics.endFill(); heightShape.graphics.lineStyle(1, 0); var _local6:int; while (_local6 < 7) { heightShape.graphics.moveTo(0, ((_local6 * HEIGHT) / 6)); heightShape.graphics.lineTo(WIDTH, ((_local6 * HEIGHT) / 6)); _local6++; }; } } }//package com.wbwar.creeper.controlpanel
Section 24
//MissionTimeViewer (com.wbwar.creeper.controlpanel.MissionTimeViewer) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import caurina.transitions.*; public class MissionTimeViewer extends Sprite { private var updateCount:int; private var scounter:int;// = 0 private var missionScoreSprite:Sprite; private var timeText:TextField; private var missionTimeSprite:Sprite; private var scoreText:TextField; private static const WIDTH:int = 69; private static const HEIGHT:int = 21; public function MissionTimeViewer(){ missionTimeSprite = new Sprite(); missionTimeSprite.graphics.beginFill(1052800); missionTimeSprite.graphics.lineStyle(1, 0x707070); missionTimeSprite.graphics.drawRect(0, 0, WIDTH, HEIGHT); missionTimeSprite.graphics.endFill(); missionScoreSprite = new Sprite(); missionScoreSprite.graphics.beginFill(1052800); missionScoreSprite.graphics.lineStyle(1, 0x707070); missionScoreSprite.graphics.drawRect(0, 0, WIDTH, HEIGHT); missionScoreSprite.graphics.endFill(); var _local1:TextField = Text.text("Mission Time", 9, 0xFFFFFF); _local1.filters = [new DropShadowFilter(1)]; missionTimeSprite.addChild(_local1); _local1.x = ((WIDTH / 2) - (_local1.width / 2)); _local1.y = -2; timeText = Text.text("", 9, 16760976); missionTimeSprite.addChild(timeText); timeText.filters = [new DropShadowFilter(1)]; var _local2:TextField = Text.text("Mission Score", 9, 0xFFFFFF); _local2.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; missionScoreSprite.addChild(_local2); _local2.x = ((WIDTH / 2) - (_local2.width / 2)); _local2.y = -2; scoreText = Text.text("", 9, 16760976); missionScoreSprite.addChild(scoreText); scoreText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(missionScoreSprite); addChild(missionTimeSprite); addEventListener(MouseEvent.CLICK, onMouseClick); useHandCursor = true; buttonMode = true; } private function onMouseClick(_arg1:MouseEvent):void{ Creeper.instance.gameScreen.showResultsScreen(true); } public function update():void{ updateCount++; if ((updateCount % 3) == 0){ swap(); }; var _local1:int = int((GameSpace.instance.elapsedTime / 36)); timeText.text = Time.getTimeString(_local1); timeText.x = ((WIDTH / 2) - (timeText.width / 2)); timeText.y = 8; scoreText.text = String(GameSpace.instance.calculateScore()); scoreText.x = ((WIDTH / 2) - (scoreText.width / 2)); scoreText.y = 8; } private function swap():void{ if (missionTimeSprite.visible){ Tweener.addTween(missionTimeSprite, {time:0.5, _autoAlpha:0}); Tweener.addTween(missionScoreSprite, {time:0.5, _autoAlpha:1}); } else { Tweener.addTween(missionTimeSprite, {time:0.5, _autoAlpha:1}); Tweener.addTween(missionScoreSprite, {time:0.5, _autoAlpha:0}); }; } } }//package com.wbwar.creeper.controlpanel
Section 25
//PlayMore (com.wbwar.creeper.controlpanel.PlayMore) package com.wbwar.creeper.controlpanel { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.media.*; import flash.net.*; public class PlayMore extends Sprite { private var box:Sprite; public static const WIDTH:int = 39; public static const HEIGHT:int = 42; public function PlayMore(){ box = new Sprite(); addChild(box); box.graphics.beginFill(3166256); box.graphics.lineStyle(1, 3170352); box.graphics.drawRect(9, 0, (WIDTH - 9), HEIGHT); box.graphics.endFill(); var _local1:TextField = Text.text("PLAY", 10, 0xFFFFFF); addChild(_local1); _local1.x = 11; _local1.y = 7; var _local2:TextField = Text.text("MORE", 10, 0xFFFFFF); addChild(_local2); _local2.x = 8; _local2.y = 20; useHandCursor = true; buttonMode = true; box.filters = [new GlowFilter(9502608, 1, 0, 0)]; addEventListener(MouseEvent.CLICK, onMouseClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); } private function onMouseOut(_arg1:MouseEvent):void{ ColorUtil.normalColor(this, 1); } private function onMouseOver(_arg1:MouseEvent):void{ ColorUtil.brighterColor(this, 1); } private function onMouseClick(_arg1:MouseEvent):void{ var _local2:Sound = new ClickSound(); _local2.play(); var _local3:URLRequest = new URLRequest("http://knucklecracker.com?cwts=ingame"); navigateToURL(_local3, "_blank"); Creeper.instance.mochiBotVisitKC(); } } }//package com.wbwar.creeper.controlpanel
Section 26
//PointViewer (com.wbwar.creeper.controlpanel.PointViewer) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.media.*; import caurina.transitions.*; public class PointViewer extends Sprite { private var _points:int; private var box:Sprite; private var pointsText:TextField; private var tweening:Boolean; public static const WIDTH:int = 29; public static const HEIGHT:int = 42; public function PointViewer(){ box = new Sprite(); addChild(box); box.graphics.beginFill(3166256); box.graphics.lineStyle(1, 3170352); box.graphics.drawRect(9, 0, (WIDTH - 9), HEIGHT); box.graphics.endFill(); var _local1:TextField = Text.text("UPGRADES", 8, 0xFFFFFF); addChild(_local1); _local1.rotation = -90; _local1.x = -5; _local1.y = (HEIGHT + 1); pointsText = Text.text("", 28, 0xFFFFFF); box.addChild(pointsText); points = 0; useHandCursor = true; buttonMode = true; box.filters = [new GlowFilter(9502608, 1, 0, 0)]; addEventListener(MouseEvent.CLICK, onMouseClick); } public function get points():int{ return (_points); } public function set points(_arg1:int):void{ _points = _arg1; pointsText.text = String(_arg1); pointsText.x = ((9 + ((WIDTH - 9) / 2)) - (pointsText.width / 2)); pointsText.y = 2; if (_arg1 > 0){ startTweening(); }; } private function onMouseClick(_arg1:MouseEvent):void{ var _local2:Sound = new ClickSound(); _local2.play(); GameSpace.instance.upgradesDialog.visible = true; GameSpace.instance.paused = true; } public function tweenOut():void{ if (points > 0){ Tweener.addTween(box, {time:0.5, transition:"linear", _Glow_blurX:4, _Glow_blurY:4, onComplete:tweenIn}); } else { Tweener.addTween(box, {time:0.5, transition:"linear", _Glow_blurX:0, _Glow_blurY:0}); tweening = false; }; } public function startTweening():void{ if (!tweening){ tweening = true; tweenOut(); }; } public function tweenIn():void{ if (points > 0){ Tweener.addTween(box, {time:0.5, transition:"linear", _Glow_blurX:0, _Glow_blurY:0, onComplete:tweenOut}); } else { Tweener.addTween(box, {time:0.5, transition:"linear", _Glow_blurX:0, _Glow_blurY:0}); tweening = false; }; } } }//package com.wbwar.creeper.controlpanel
Section 27
//SpeedControl (com.wbwar.creeper.controlpanel.SpeedControl) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import flash.events.*; import flash.filters.*; public class SpeedControl extends Sprite { private var noSoundShape:Shape; private var noMusic:Boolean; private var paused:Boolean; private var soundShape:Shape; private var pausedShape:Shape; private var playShape:Shape; private var updateCount:int; private var mute:Boolean; private var musicShape:Shape; private var noMusicShape:Shape; public static const WIDTH:int = 13; public static const HEIGHT:int = 43; public function SpeedControl(){ useHandCursor = true; buttonMode = true; graphics.beginFill(5275776); graphics.drawRect(0, 0, WIDTH, HEIGHT); playShape = new Shape(); playShape.filters = [new DropShadowFilter(2)]; addChild(playShape); playShape.graphics.beginFill(2162464); playShape.graphics.moveTo(0, 0); playShape.graphics.lineTo(5, 5); playShape.graphics.lineTo(0, 10); playShape.graphics.lineTo(0, 0); playShape.graphics.endFill(); playShape.x = 4; playShape.y = 3; pausedShape = new Shape(); pausedShape.filters = [new DropShadowFilter(2)]; addChild(pausedShape); pausedShape.graphics.beginFill(0xFFFFFF); pausedShape.graphics.drawRect(0, 0, 2, 10); pausedShape.graphics.endFill(); pausedShape.graphics.beginFill(0xFFFFFF); pausedShape.graphics.drawRect(3, 0, 2, 10); pausedShape.graphics.endFill(); pausedShape.x = playShape.x; pausedShape.y = playShape.y; pausedShape.visible = false; soundShape = new Shape(); soundShape.filters = [new DropShadowFilter(2)]; addChild(soundShape); soundShape.graphics.beginFill(0xFFFF00); soundShape.graphics.moveTo(0, 3); soundShape.graphics.lineTo(0, 7); soundShape.graphics.lineTo(3, 7); soundShape.graphics.lineTo(6, 10); soundShape.graphics.lineTo(6, 0); soundShape.graphics.lineTo(3, 3); soundShape.graphics.lineTo(0, 3); soundShape.graphics.endFill(); soundShape.x = 3; soundShape.y = 16; noSoundShape = new Shape(); addChild(noSoundShape); noSoundShape.graphics.lineStyle(2, 0xFF0000); noSoundShape.graphics.moveTo(0, 0); noSoundShape.graphics.lineTo(6, 10); noSoundShape.graphics.moveTo(6, 0); noSoundShape.graphics.lineTo(0, 10); noSoundShape.visible = false; noSoundShape.x = soundShape.x; noSoundShape.y = soundShape.y; musicShape = new Shape(); musicShape.filters = [new DropShadowFilter(2)]; addChild(musicShape); musicShape.graphics.beginFill(0xFFFF00); musicShape.graphics.moveTo(3, 0); musicShape.graphics.lineTo(3, 8); musicShape.graphics.lineTo(4, 8); musicShape.graphics.lineTo(4, 4); musicShape.graphics.lineTo(7, 2); musicShape.graphics.lineTo(3, 0); musicShape.graphics.endFill(); musicShape.graphics.beginFill(0xFFFF00); musicShape.graphics.drawCircle(2, 8, 2); musicShape.graphics.endFill(); musicShape.x = 3; musicShape.y = 30; noMusicShape = new Shape(); addChild(noMusicShape); noMusicShape.graphics.lineStyle(2, 0xFF0000); noMusicShape.graphics.moveTo(0, 0); noMusicShape.graphics.lineTo(6, 10); noMusicShape.graphics.moveTo(6, 0); noMusicShape.graphics.lineTo(0, 10); noMusicShape.visible = false; noMusicShape.x = musicShape.x; noMusicShape.y = musicShape.y; addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true); addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); } private function onMouseClick(_arg1:Event):void{ if (mouseY < (HEIGHT / 3)){ GameSpace.instance.paused = !(GameSpace.instance.paused); } else { if (mouseY < ((2 * HEIGHT) / 3)){ GameSpace.instance.mute = !(GameSpace.instance.mute); } else { Creeper.instance.gameScreen.toggleGameMusic(); }; }; } private function onEnterFrame(_arg1:Event):void{ updateCount++; if ((updateCount % 4) == 0){ playShape.visible = !(GameSpace.instance.paused); pausedShape.visible = !(playShape.visible); noSoundShape.visible = GameSpace.instance.mute; noMusicShape.visible = !(Creeper.instance.gameScreen.gameMusicPlaying); }; } } }//package com.wbwar.creeper.controlpanel
Section 28
//StashViewer (com.wbwar.creeper.controlpanel.StashViewer) package com.wbwar.creeper.controlpanel { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.text.*; public class StashViewer extends Sprite { private var queueBar:Bar; private var stashValueText:TextField; private var lastEnergyConsumed:Number;// = -1 private var energyDrainValueText:TextField; private var barStart:int;// = 49 private var stashText:TextField; private var bar:Bar; private var queueTitleText:TextField; private var updateCount:int; private var energyRateValueText:TextField; private var energyDrainBar:Bar; private var energyRateBar:Bar; private var queueValueText:TextField; private var stashTitleText:TextField; private var rateText:TextField; private var energyDrainTitleText:TextField; private var energyRateTitleText:TextField; private var lastStash:Number;// = -1 public static const WIDTH:int = 110; public function StashViewer(){ bar = new Bar((WIDTH - barStart), 15, 1089552); bar.border = 0; addChild(bar); bar.x = barStart; bar.y = 0; bar.setValue(0, 1); energyRateBar = new Bar((WIDTH - barStart), 8, 3206960); energyRateBar.border = 0; addChild(energyRateBar); energyRateBar.x = barStart; energyRateBar.y = 17; energyRateBar.setValue(0, 1); energyDrainBar = new Bar((WIDTH - barStart), 8, 16777008); energyDrainBar.border = 0; addChild(energyDrainBar); energyDrainBar.x = barStart; energyDrainBar.y = 26; energyDrainBar.setValue(0, 1); queueBar = new Bar((WIDTH - barStart), 8, 16724016); queueBar.border = 0; addChild(queueBar); queueBar.x = barStart; queueBar.y = 35; queueBar.setValue(0, 1); stashValueText = Text.text("", 9, 0xFFFFFF); stashValueText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(stashValueText); energyRateValueText = Text.text("", 8, 0xFFFFFF); energyRateValueText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(energyRateValueText); energyDrainValueText = Text.text("", 8, 0xFFFFFF); energyDrainValueText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(energyDrainValueText); energyDrainValueText.text = "0"; energyDrainValueText.x = (barStart + int((((WIDTH - barStart) / 2) - (energyDrainValueText.width / 2)))); energyDrainValueText.y = 22; queueValueText = Text.text("", 8, 0xFFFFFF); queueValueText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(queueValueText); stashTitleText = Text.text("ENERGY", 11, 8450176, TextFieldAutoSize.RIGHT); energyRateTitleText = Text.text("COLLECTION", 8, 9498768, TextFieldAutoSize.RIGHT); energyDrainTitleText = Text.text("DEPLETION", 8, 16777152, TextFieldAutoSize.RIGHT); queueTitleText = Text.text("STARVATION", 8, 16761024, TextFieldAutoSize.RIGHT); addChild(stashTitleText); addChild(energyRateTitleText); addChild(energyDrainTitleText); addChild(queueTitleText); stashTitleText.x = 0; stashTitleText.y = 0; energyRateTitleText.x = 2; energyRateTitleText.y = 13; energyDrainTitleText.x = 7; energyDrainTitleText.y = 22; queueTitleText.x = 0; queueTitleText.y = 31; } public function update():void{ var _local1:Number; updateCount++; bar.setValue(int((GameSpace.instance.stash / 5)), (GameSpace.instance.stashMax / 5)); energyRateBar.setValue((GameSpace.instance.dynamicContent.energyAccumulationRate / 5), 10); if (GameSpace.instance.baseGun != null){ queueBar.setValue(GameSpace.instance.energyQueueLength, 100); } else { queueBar.setValue(0, 100); }; queueValueText.text = ((" " + GameSpace.instance.energyQueueLength) + " "); queueValueText.x = (barStart + int((((WIDTH - barStart) / 2) - (queueValueText.width / 2)))); queueValueText.y = 31; if ((updateCount % 2) == 0){ if (lastEnergyConsumed != -1){ _local1 = (GameSpace.instance.energyConsumed - lastEnergyConsumed); energyDrainBar.setValue(((_local1 / 2) / 5), 10); energyDrainValueText.text = ((" " + (int((((_local1 / 2) / 5) * 10)) / 10)) + " "); energyDrainValueText.x = (barStart + int((((WIDTH - barStart) / 2) - (energyDrainValueText.width / 2)))); energyDrainValueText.y = 22; }; lastEnergyConsumed = GameSpace.instance.energyConsumed; }; if (((!((lastStash == -1))) && (!((GameSpace.instance.stash == lastStash))))){ _local1 = (GameSpace.instance.stash - lastStash); }; stashValueText.text = ((((" " + int((GameSpace.instance.stash / 5))) + "/") + int((GameSpace.instance.stashMax / 5))) + " "); stashValueText.x = ((barStart + ((WIDTH - barStart) / 2)) - (stashValueText.width / 2)); energyRateValueText.text = ((" " + (int(((GameSpace.instance.dynamicContent.energyAccumulationRate / 5) * 10)) / 10)) + " "); energyRateValueText.x = (barStart + int((((WIDTH - barStart) / 2) - (energyRateValueText.width / 2)))); energyRateValueText.y = 13; lastStash = GameSpace.instance.stash; } } }//package com.wbwar.creeper.controlpanel
Section 29
//AdvPage (com.wbwar.creeper.dialogs.help.AdvPage) package com.wbwar.creeper.dialogs.help { import flash.display.*; import com.wbwar.creeper.util.*; public class AdvPage extends Sprite { private var flowContainer:FlowContainer; public var HEIGHT:int; public var WIDTH:int; public static var adv2Image:Class = AdvPage_adv2Image; public static var adv4Image:Class = AdvPage_adv4Image; private static var adv1Bitmap:Bitmap = (new adv1Image() as Bitmap); private static var adv2Bitmap:Bitmap = (new adv2Image() as Bitmap); private static var adv3Bitmap:Bitmap = (new adv3Image() as Bitmap); private static var adv4Bitmap:Bitmap = (new adv4Image() as Bitmap); public static var adv3Image:Class = AdvPage_adv3Image; public static var adv1Image:Class = AdvPage_adv1Image; public function AdvPage(_arg1:int, _arg2:int){ WIDTH = _arg1; HEIGHT = _arg2; flowContainer = new FlowContainer(WIDTH, HEIGHT); flowContainer.addContent(Text.text("1: Manage energy use (don't overbuild).", 22, 9502608)); flowContainer.addContent(adv1Bitmap, 170); flowContainer.addContent(Text.text("2: Use Relays to reach tough areas.", 22, 9502608)); flowContainer.addContent(adv2Bitmap, 170); flowContainer.addContent(Text.text("3: Build storage and speed for large networks.", 22, 9502608)); flowContainer.addContent(adv3Bitmap, 170); flowContainer.addContent(Text.text("3: Build reactors for energy when confined.", 22, 9502608)); flowContainer.addContent(adv4Bitmap, 170); addChild(flowContainer); } } }//package com.wbwar.creeper.dialogs.help
Section 30
//AdvPage_adv1Image (com.wbwar.creeper.dialogs.help.AdvPage_adv1Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class AdvPage_adv1Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 31
//AdvPage_adv2Image (com.wbwar.creeper.dialogs.help.AdvPage_adv2Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class AdvPage_adv2Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 32
//AdvPage_adv3Image (com.wbwar.creeper.dialogs.help.AdvPage_adv3Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class AdvPage_adv3Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 33
//AdvPage_adv4Image (com.wbwar.creeper.dialogs.help.AdvPage_adv4Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class AdvPage_adv4Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 34
//BasicPage (com.wbwar.creeper.dialogs.help.BasicPage) package com.wbwar.creeper.dialogs.help { import flash.display.*; import com.wbwar.creeper.util.*; public class BasicPage extends Sprite { private var flowContainer:FlowContainer; public var HEIGHT:int; public var WIDTH:int; private static var basic1Bitmap:Bitmap = (new basic1Image() as Bitmap); private static var basic2Bitmap:Bitmap = (new basic2Image() as Bitmap); private static var basic3Bitmap:Bitmap = (new basic3Image() as Bitmap); public static var basic4Image:Class = BasicPage_basic4Image; public static var basic3Image:Class = BasicPage_basic3Image; public static var basic2Image:Class = BasicPage_basic2Image; public static var basic1Image:Class = BasicPage_basic1Image; public static var basic5Image:Class = BasicPage_basic5Image; private static var basic4Bitmap:Bitmap = (new basic4Image() as Bitmap); private static var basic5Bitmap:Bitmap = (new basic5Image() as Bitmap); public function BasicPage(_arg1:int, _arg2:int){ WIDTH = _arg1; HEIGHT = _arg2; flowContainer = new FlowContainer(WIDTH, HEIGHT); flowContainer.addContent(Text.text("1: Build collectors to get energy.", 25, 9502608)); flowContainer.addContent(basic1Bitmap, 170); flowContainer.addContent(Text.text("2: Build weapons to fight off the Creeper.", 25, 9502608)); flowContainer.addContent(basic2Bitmap, 170); flowContainer.addContent(Text.text("3: Collect any technology and artifacts.", 25, 9502608)); flowContainer.addContent(basic3Bitmap, 170); flowContainer.addContent(Text.text("4: Connect to all Totems.", 25, 9502608)); flowContainer.addContent(basic4Bitmap, 170); flowContainer.addContent(Text.text("5: Once Totems activate, Odin City escapes!", 25, 9502608)); flowContainer.addContent(basic5Bitmap, 170); addChild(flowContainer); } } }//package com.wbwar.creeper.dialogs.help
Section 35
//BasicPage_basic1Image (com.wbwar.creeper.dialogs.help.BasicPage_basic1Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class BasicPage_basic1Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 36
//BasicPage_basic2Image (com.wbwar.creeper.dialogs.help.BasicPage_basic2Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class BasicPage_basic2Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 37
//BasicPage_basic3Image (com.wbwar.creeper.dialogs.help.BasicPage_basic3Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class BasicPage_basic3Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 38
//BasicPage_basic4Image (com.wbwar.creeper.dialogs.help.BasicPage_basic4Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class BasicPage_basic4Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 39
//BasicPage_basic5Image (com.wbwar.creeper.dialogs.help.BasicPage_basic5Image) package com.wbwar.creeper.dialogs.help { import mx.core.*; public class BasicPage_basic5Image extends BitmapAsset { } }//package com.wbwar.creeper.dialogs.help
Section 40
//TipsPage (com.wbwar.creeper.dialogs.help.TipsPage) package com.wbwar.creeper.dialogs.help { import flash.display.*; import com.wbwar.creeper.util.*; public class TipsPage extends Sprite { private var flowContainer:FlowContainer; public var HEIGHT:int; public var WIDTH:int; public function TipsPage(_arg1:int, _arg2:int){ WIDTH = _arg1; HEIGHT = _arg2; flowContainer = new FlowContainer(WIDTH, HEIGHT); flowContainer.addContent(Text.text("1: Attack deep Creeper with Mortars.", 22, 9502608)); flowContainer.addContent(Text.text("- Go after depressions where Creeper pools up.", 14, 0xC0C0C0)); flowContainer.addContent(Text.text("- Mortars are most effective on deep Creeper.", 14, 0xC0C0C0)); flowContainer.addContent(Text.text("- Bombarding a pool will relieve the pressure on higher surrounding areas.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("2: Attack thin Creeper with Blasters.", 22, 9502608)); flowContainer.addContent(Text.text("- Blasters are most efficient on thin Creeper.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("3: Use Drones to bomb distant Creeper pools.", 22, 9502608)); flowContainer.addContent(Text.text("- Bombing distant pools can relieve pressure on your front.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("4: Don't engage the Creeper too early.", 22, 9502608)); flowContainer.addContent(Text.text("- The longer you wait, the more energy you have to build your base.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("5: Use Deactivate on weapons to save energy.", 22, 9502608)); flowContainer.addContent(Text.text("- Deactivating a weapon stops all energy drain from that weapon.", 14, 0xC0C0C0)); flowContainer.addContent(Text.text("- While deactivated, the weapon won't fire or charge up.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("6: Use Disarm on weapons to build up a force.", 22, 9502608)); flowContainer.addContent(Text.text("- Disarming a weapon only prevents the weapon from firing.", 14, 0xC0C0C0)); flowContainer.addContent(Text.text("- Disarm weapons to prevent firing when you are building up a force.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("7: Cap off emitters.", 22, 9502608)); flowContainer.addContent(Text.text("- Fight to get a blaster in range of an emitter.", 14, 0xC0C0C0)); flowContainer.addContent(Text.text("- Once capped, all but one blaster can be redeployed.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("8: Be brave and put weapons in danger.", 22, 9502608)); flowContainer.addContent(Text.text("- Blasters and Mortars can take some limited exposure to Creeper.", 14, 0xC0C0C0)); flowContainer.addContent(Text.text("- Send Mortars on 'bombing runs' into deep Creeper territory.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("9: Pause the game.", 22, 9502608)); flowContainer.addContent(Text.text("- You can queue things to build and move while the game is paused.", 14, 0xC0C0C0), 75); flowContainer.addContent(Text.text("10: Use keyboard shortcuts", 22, 9502608)); flowContainer.addContent(Text.text("- Hover over a button, the shortcut key will appear in the corner.", 14, 0xC0C0C0), 75); addChild(flowContainer); } } }//package com.wbwar.creeper.dialogs.help
Section 41
//UnitButton (com.wbwar.creeper.dialogs.help.UnitButton) package com.wbwar.creeper.dialogs.help { import flash.display.*; import com.wbwar.creeper.util.*; import flash.text.*; import flash.utils.*; public class UnitButton extends Button { private var _active:Boolean; private var WIDTH:int;// = 50 private var HEIGHT:int;// = 50 private var cover:Shape; public function UnitButton(_arg1:String){ var _local2:Number; var _local3:Sprite; var _local4:TextField; if ((((((((((((_arg1 == "Gun")) || ((_arg1 == "AreaGun")))) || ((_arg1 == "ABM")))) || ((_arg1 == "DroneBase")))) || ((_arg1 == "ThorsHammer")))) || ((_arg1 == "")))){ _local2 = 11550784; } else { _local2 = 4239424; }; if (_arg1 == "BaseGun"){ WIDTH = 100; HEIGHT = 100; }; super("", 8, WIDTH, HEIGHT, 0, 0, false, _local2, 0xFFFFFF); if (_arg1 == "BaseGun"){ _local3 = new BaseGunBody(); addChild(_local3); _local3.x = (WIDTH / 2); _local3.y = (HEIGHT / 2); _local3.scaleX = 1; _local3.scaleY = _local3.scaleX; } else { if (_arg1 != ""){ _local3 = getDefinitionByName(("com.wbwar.creeper." + _arg1))["getPlacementSprite"](false); addChild(_local3); _local3.x = (WIDTH / 2); _local3.y = (HEIGHT / 2); _local3.scaleX = 2; _local3.scaleY = _local3.scaleX; } else { _local4 = Text.text("?", 28, 0xFFFFFF); addChild(_local4); _local4.x = ((WIDTH / 2) - (_local4.width / 2)); _local4.y = ((HEIGHT / 2) - (_local4.height / 2)); }; }; cover = new Shape(); cover.graphics.beginFill(0, 0.6); cover.graphics.drawRect(0, 0, WIDTH, HEIGHT); cover.graphics.endFill(); addChild(cover); } public function set active(_arg1:Boolean):void{ _active = _arg1; cover.visible = !(_arg1); } } }//package com.wbwar.creeper.dialogs.help
Section 42
//UnitPage (com.wbwar.creeper.dialogs.help.UnitPage) package com.wbwar.creeper.dialogs.help { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.text.*; import flash.utils.*; public class UnitPage extends Sprite { private var WIDTH:int; private var HEIGHT:int; private var textField:TextField; private var titleTextField:TextField; public function UnitPage(_arg1:String, _arg2:int, _arg3:int){ var _local4:Sprite; var _local5:TextField; super(); WIDTH = _arg2; HEIGHT = _arg3; if (_arg1 == "BaseGun"){ _local4 = new BaseGunBody(); addChild(_local4); _local4.x = (WIDTH / 2); _local4.y = 50; _local4.scaleX = 2; _local4.scaleY = _local4.scaleX; } else { if (_arg1 != ""){ _local4 = getDefinitionByName(("com.wbwar.creeper." + _arg1))["getPlacementSprite"](false); addChild(_local4); _local4.x = (WIDTH / 2); _local4.y = 50; _local4.scaleX = 4; _local4.scaleY = _local4.scaleX; } else { _local5 = Text.text("?", 48, 0xFFFFFF); addChild(_local5); _local5.x = ((WIDTH / 2) - (_local5.width / 2)); _local5.y = (50 - (_local5.height / 2)); }; }; titleTextField = Text.text("", 24, 0xFFFFFF); titleTextField.filters = [new GlowFilter(0, 1, 2, 2, 3, 1)]; addChild(titleTextField); titleTextField.x = 5; if (_arg1 == "BaseGun"){ titleTextField.y = 100; } else { titleTextField.y = 80; }; textField = Text.text("", 14, 0xFFFFFF); textField.filters = [new GlowFilter(0, 1, 2, 2, 3, 1)]; addChild(textField); textField.x = 5; if (_arg1 == "BaseGun"){ textField.y = 130; } else { textField.y = 110; }; textField.wordWrap = true; textField.width = (WIDTH - 10); if (_arg1 == ""){ setUnknown(); } else { var _local6 = this; _local6[("setText" + _arg1)](); }; } private function setTextBaseGun():void{ titleTextField.text = "Odin City"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = (((("Odin City is everything we have left. Every human that remains alive calls Odin City home. Protect the city " + "at ALL costs. Odin City has powerful nano production engines that convert the raw energy it receives from ") + "Collectors and Reactors into useful construction, ammunition, and totem packets. Odin City is always the heart ") + "of any network. Build Collectors out from Odin City as you expand your defenses into an offense. As necessary, ") + "you may need to relocate Odin City to safer or more productive ground."); } private function setTextDroneBase():void{ titleTextField.text = "Drone"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = (((((("Automated nano tech Drones are state of the art in anti-Creeper weaponry. Each Drone bomber carries " + "a full load-out of confined fusion bombs. Like Mortars, Drones are best targeted at deep Creeper. ") + "Unlike Mortars, Drones can target any location on the map. Drones do require large numbers of packets ") + "to operate, but they can be worth it to hit the Creeper deep in its territory. Drones require manual ") + "targeting. Select the Drone base, then select where to launch the sortie. The Drone will fly to the ") + "specified area and drop its ordinance until empty. When empty it will return to the base and re-arm. Once ") + "re-armed, it can be manually launched again."); } private function setTextRelay():void{ titleTextField.text = "Relay"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = ((("Relays allow you to extend your network over great distances. Sometimes irregular terrain can best be dealt with " + "by just Relay'ing over it. Note that Relays will only form long range connections with other Relays. So to build ") + "only one Relay never makes any sense. Build at least two to gain its benefits. Also note that Relays can also ") + "be useful for creating more direct routes in your network for packets."); } private function setTextEnergyStorage():void{ titleTextField.text = "Storage"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = ((("Energy Storage is useful for increasing Odin City's reserve of raw energy. The energy from Collectors is sent " + "to Odin City where it is held and used to create packets for construction, weapons and Totem charging. But, Odin City ") + "can only store so much energy. Build Storage to increase this capacity. Increasing energy capacity can be a key ") + "advantage in certain energy intensive situations."); } private function setUnknown():void{ titleTextField.text = "Unknown"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = "Always be prepared for the unexpected."; } private function setTextLogistics():void{ titleTextField.text = "Speed"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = (("Packet Speed drivers inject Higgs particles directly onto your network. The result is improved propagation speed " + "for all packets. Any large base with any sustained military campaign will require several Speed drivers to operate ") + "efficiently. By building Speed drivers, weapons stay better armed and building new structures at a distance can go faster."); } private function setTextNode():void{ titleTextField.text = "Collector"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = ((((((("The Collector is your primary means of getting energy. With energy you build and power everything. " + "Without energy, you wither and die. Collectors operate by tapping into fractal space and extracting ") + "energy from infinite recursive space-time. Sadly, Collectors only have a limited discernment resolution ") + "so they can't extract infinite energy from a single point. In other words, they need area to operate. Collectors ") + "should be spaced apart so that each has the maximum area from which to collect energy. Overlapping Collectors ") + "is inefficient. Also Collectors need to send their energy somewhere, so there must be some path from a Collector ") + "back to Odin City for the collector to operate. If a Collector goes offline, nothing bad happens to the Collector, ") + "you just don't get any energy from it until it is reconnected to the network."); } private function setTextEnergyAmp():void{ titleTextField.text = "Reactor"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = (((("Singularity Reactors use a stream of temporary black holes to drastically improve on the discernment resolution " + "of Collector technology. As such, they can produce energy from single points in space time. This technology ") + "is expensive, though, so it is always better to build collectors when possible. But sometimes Odin City needs ") + "more energy than can be produced by the available land area. When this is the case, build farms of Reactors to meet ") + "the energy needs."); } private function setTextGun():void{ titleTextField.text = "Blaster"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = ((((((("Blasters are the primary defense weapon in Odin City's arsenal. Blasters utilize the absolute latest in " + "heavy boson particle beam technology to produce a beam that will incinerate any Creeper at which it fires. Additionally, ") + "Blasters employ tachyon enhanced rotational turrets for near instant turret rotation. Blasters do have two weaknesses. ") + "First, Blasters can only fire at their current elevation or lower. Blasters can't fire at higher terrain! Because of this, Blasters ") + "at the base of a hill will only be able to fire at Creeper as it flows off of the hill. As such, wise Commanders will fight to ") + "get Blasters on high ground. The second weakness is that Blasters can only damage Creeper down to a fixed depth. So using Blasters ") + "on deep pools or large tidal fronts of Creeper will prove only marginally effective. It is best to use Blasters on thinner Creeper ") + "where it is most effective."); } private function setTextAreaGun():void{ titleTextField.text = "Mortar"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = (((((("Mortars fire confined fusion projectiles. The projectiles overcome the limitations of Blasters by being able to target any terrain " + "level. Additionally, Mortars can fire over walls. The confined fusion projectiles can also damage nearly any depth ") + "of Creeper. This makes Mortars absolutely devastating to pools of Creeper. Fire a Mortar at a giant lake of Creeper ") + "and watch the lake disappear. Mortars do require large amounts of ammunition packets to operate and they do have a limited ") + "fire rate. This makes it best to employ Mortars against pools of Creeper that have accumulated significant depth. Letting Mortars fire ") + "at thin Creeper will definitely do damage, but it will be done inefficiently compared to a Blaster. Lastly, ") + "because of this, Mortars will always auto-target the deepest Creeper in range."); } private function setTextABM():void{ titleTextField.text = "SAM"; titleTextField.x = ((WIDTH / 2) - (titleTextField.width / 2)); textField.text = (("SAMs, or Surface to Air Missiles, have one and only one purpose; destroy any insidious Creeper Spores " + "before they hit the ground and do terrible damage. On worlds that have Creeper Spores, numerous SAMs will ") + "be required to provide total base protection. SAMs may also need to be relocated as the network grows."); } } }//package com.wbwar.creeper.dialogs.help
Section 43
//UnitsPage (com.wbwar.creeper.dialogs.help.UnitsPage) package com.wbwar.creeper.dialogs.help { import flash.display.*; import flash.events.*; public class UnitsPage extends Sprite { private var thorPage:UnitPage; private var storageButton:UnitButton; private var samPage:UnitPage; private var collectorButton:UnitButton; private var relayButton:UnitButton; public var WIDTH:int; public var HEIGHT:int; private var storagePage:UnitPage; private var mortarButton:UnitButton; private var blasterButton:UnitButton; private var collectorPage:UnitPage; private var relayPage:UnitPage; private var mortarPage:UnitPage; private var dronePage:UnitPage; private var reactorPage:UnitPage; private var blasterPage:UnitPage; private var odinCityButton:UnitButton; private var speedButton:UnitButton; private var thorButton:UnitButton; private var droneButton:UnitButton; private var samButton:UnitButton; private var reactorButton:UnitButton; private var speedPage:UnitPage; private var odinCityPage:UnitPage; public function UnitsPage(_arg1:int, _arg2:int){ var _local3:int; var _local4:int; super(); WIDTH = _arg1; HEIGHT = _arg2; _local3 = 5; _local4 = 50; collectorButton = new UnitButton("Node"); addChild(collectorButton); collectorButton.x = 5; collectorButton.y = _local3; _local3 = (_local3 + _local4); relayButton = new UnitButton("Relay"); addChild(relayButton); relayButton.x = 5; relayButton.y = _local3; _local3 = (_local3 + _local4); storageButton = new UnitButton("EnergyStorage"); addChild(storageButton); storageButton.x = 5; storageButton.y = _local3; _local3 = (_local3 + _local4); speedButton = new UnitButton("Logistics"); addChild(speedButton); speedButton.x = 5; speedButton.y = _local3; _local3 = (_local3 + _local4); reactorButton = new UnitButton("EnergyAmp"); addChild(reactorButton); reactorButton.x = 5; reactorButton.y = _local3; _local3 = (_local3 + _local4); _local3 = 5; blasterButton = new UnitButton("Gun"); addChild(blasterButton); blasterButton.x = 55; blasterButton.y = _local3; _local3 = (_local3 + _local4); mortarButton = new UnitButton("AreaGun"); addChild(mortarButton); mortarButton.x = 55; mortarButton.y = _local3; _local3 = (_local3 + _local4); samButton = new UnitButton("ABM"); addChild(samButton); samButton.x = 55; samButton.y = _local3; _local3 = (_local3 + _local4); droneButton = new UnitButton("DroneBase"); addChild(droneButton); droneButton.x = 55; droneButton.y = _local3; _local3 = (_local3 + _local4); thorButton = new UnitButton(""); addChild(thorButton); thorButton.x = 55; thorButton.y = _local3; _local3 = (_local3 + _local4); odinCityButton = new UnitButton("BaseGun"); addChild(odinCityButton); odinCityButton.x = 5; odinCityButton.y = _local3; collectorButton.addEventListener(MouseEvent.CLICK, onCollector); relayButton.addEventListener(MouseEvent.CLICK, onRelay); storageButton.addEventListener(MouseEvent.CLICK, onStorage); speedButton.addEventListener(MouseEvent.CLICK, onSpeed); reactorButton.addEventListener(MouseEvent.CLICK, onReactor); blasterButton.addEventListener(MouseEvent.CLICK, onBlaster); mortarButton.addEventListener(MouseEvent.CLICK, onMortar); samButton.addEventListener(MouseEvent.CLICK, onSam); droneButton.addEventListener(MouseEvent.CLICK, onDrone); thorButton.addEventListener(MouseEvent.CLICK, onThor); odinCityButton.addEventListener(MouseEvent.CLICK, onOdinCity); collectorPage = new UnitPage("Node", ((WIDTH - 10) - 110), (_arg2 - 10)); collectorPage.x = 110; collectorPage.y = 5; addChild(collectorPage); relayPage = new UnitPage("Relay", ((WIDTH - 10) - 110), (_arg2 - 10)); relayPage.x = 110; relayPage.y = 5; addChild(relayPage); storagePage = new UnitPage("EnergyStorage", ((WIDTH - 10) - 110), (_arg2 - 10)); storagePage.x = 110; storagePage.y = 5; addChild(storagePage); speedPage = new UnitPage("Logistics", ((WIDTH - 10) - 110), (_arg2 - 10)); speedPage.x = 110; speedPage.y = 5; addChild(speedPage); reactorPage = new UnitPage("EnergyAmp", ((WIDTH - 10) - 110), (_arg2 - 10)); reactorPage.x = 110; reactorPage.y = 5; addChild(reactorPage); blasterPage = new UnitPage("Gun", ((WIDTH - 10) - 110), (_arg2 - 10)); blasterPage.x = 110; blasterPage.y = 5; addChild(blasterPage); mortarPage = new UnitPage("AreaGun", ((WIDTH - 10) - 110), (_arg2 - 10)); mortarPage.x = 110; mortarPage.y = 5; addChild(mortarPage); samPage = new UnitPage("ABM", ((WIDTH - 10) - 110), (_arg2 - 10)); samPage.x = 110; samPage.y = 5; addChild(samPage); dronePage = new UnitPage("DroneBase", ((WIDTH - 10) - 110), (_arg2 - 10)); dronePage.x = 110; dronePage.y = 5; addChild(dronePage); thorPage = new UnitPage("", ((WIDTH - 10) - 110), (_arg2 - 10)); thorPage.x = 110; thorPage.y = 5; addChild(thorPage); odinCityPage = new UnitPage("BaseGun", ((WIDTH - 10) - 110), (_arg2 - 10)); odinCityPage.x = 110; odinCityPage.y = 5; addChild(odinCityPage); showPage(0); } private function onMortar(_arg1:MouseEvent=null):void{ showPage(6); } private function onSam(_arg1:MouseEvent=null):void{ showPage(7); } private function onStorage(_arg1:MouseEvent=null):void{ showPage(2); } private function showPage(_arg1:int):void{ collectorButton.active = false; relayButton.active = false; storageButton.active = false; speedButton.active = false; reactorButton.active = false; blasterButton.active = false; mortarButton.active = false; samButton.active = false; droneButton.active = false; thorButton.active = false; odinCityButton.active = false; collectorPage.visible = false; relayPage.visible = false; storagePage.visible = false; speedPage.visible = false; reactorPage.visible = false; blasterPage.visible = false; mortarPage.visible = false; samPage.visible = false; dronePage.visible = false; thorPage.visible = false; odinCityPage.visible = false; if (_arg1 == 0){ collectorPage.visible = true; collectorButton.active = true; } else { if (_arg1 == 1){ relayPage.visible = true; relayButton.active = true; } else { if (_arg1 == 2){ storagePage.visible = true; storageButton.active = true; } else { if (_arg1 == 3){ speedPage.visible = true; speedButton.active = true; } else { if (_arg1 == 4){ reactorPage.visible = true; reactorButton.active = true; } else { if (_arg1 == 5){ blasterPage.visible = true; blasterButton.active = true; } else { if (_arg1 == 6){ mortarPage.visible = true; mortarButton.active = true; } else { if (_arg1 == 7){ samPage.visible = true; samButton.active = true; } else { if (_arg1 == 8){ dronePage.visible = true; droneButton.active = true; } else { if (_arg1 == 9){ thorPage.visible = true; thorButton.active = true; } else { if (_arg1 == 10){ odinCityPage.visible = true; odinCityButton.active = true; }; }; }; }; }; }; }; }; }; }; }; } private function onSpeed(_arg1:MouseEvent=null):void{ showPage(3); } private function onReactor(_arg1:MouseEvent=null):void{ showPage(4); } private function onOdinCity(_arg1:MouseEvent=null):void{ showPage(10); } private function onBlaster(_arg1:MouseEvent=null):void{ showPage(5); } private function onThor(_arg1:MouseEvent=null):void{ showPage(9); } private function onCollector(_arg1:MouseEvent=null):void{ showPage(0); } private function onRelay(_arg1:MouseEvent=null):void{ showPage(1); } private function onDrone(_arg1:MouseEvent=null):void{ showPage(8); } } }//package com.wbwar.creeper.dialogs.help
Section 44
//ExitDialog (com.wbwar.creeper.dialogs.ExitDialog) package com.wbwar.creeper.dialogs { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; public class ExitDialog extends Sprite { private var noButton:Button; private var yesButton:Button; public static const WIDTH:int = 300; public static const HEIGHT:int = 110; public static const NO_CLICKED:String = "NO_CLICKED"; public static const YES_CLICKED:String = "YES_CLICKED"; public function ExitDialog(){ graphics.beginFill(0x202020); graphics.lineStyle(3, 0xFFFFFF); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); filters = [new GlowFilter(0, 1, 8, 8)]; var _local1:int = ((WIDTH - 30) / 2); var _local2 = 50; var _local3:TextField = Text.text("EXIT GAME?", 24, 16777152); addChild(_local3); _local3.x = ((WIDTH / 2) - (_local3.width / 2)); _local3.y = 5; yesButton = new Button("Yes", 18, 100, 25, 0, 0, true, 0x8000, -1); addChild(yesButton); yesButton.x = (((WIDTH / 2) - yesButton.width) - 5); yesButton.y = ((HEIGHT - 5) - yesButton.height); yesButton.addEventListener(MouseEvent.CLICK, onYesClick); noButton = new Button("No", 18, 100, 25, 0, 0, true, 0x8000, -1); addChild(noButton); noButton.x = ((WIDTH / 2) + 5); noButton.y = ((HEIGHT - 5) - noButton.height); noButton.addEventListener(MouseEvent.CLICK, onNoClick); visible = false; } private function onYesClick(_arg1:MouseEvent=null):void{ dispatchEvent(new Event(YES_CLICKED)); visible = false; } private function onNoClick(_arg1:MouseEvent=null):void{ dispatchEvent(new Event(NO_CLICKED)); visible = false; } } }//package com.wbwar.creeper.dialogs
Section 45
//HelpDialog (com.wbwar.creeper.dialogs.HelpDialog) package com.wbwar.creeper.dialogs { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.dialogs.help.*; public class HelpDialog extends Sprite { private var basicButton:Button; private var unitsButton:Button; private var advButton:Button; private var tipsButton:Button; private var tipsButtonCover:Shape; private var basicButtonCover:Shape; private var basicPage:BasicPage; private var unitsPage:UnitsPage; private var advPage:AdvPage; private var tipsPage:TipsPage; private var buttonHighlight:ButtonHighlight; private var exitButton:Button; private var advButtonCover:Shape; private var unitsButtonCover:Shape; public static const DISMISS_CLICKED:String = "DISMISS_CLICKED"; public static const WIDTH:int = 600; public static const HEIGHT:int = 450; private static var _instance:HelpDialog; public function HelpDialog(){ graphics.beginFill(0x303030); graphics.lineStyle(3, 0xFFFFFF); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); filters = [new GlowFilter(0, 1, 8, 8)]; basicButton = new Button("Basic Gameplay", 12, 100, 18, 0, 0, true, 4210943, 0xFFFFFF); addChild(basicButton); basicButton.x = 5; basicButton.y = 5; basicButton.addEventListener(MouseEvent.CLICK, onBasicButtonClick); advButton = new Button("Adv Gameplay", 12, 100, 18, 0, 0, true, 4210943, 0xFFFFFF); addChild(advButton); advButton.x = 110; advButton.y = 5; advButton.addEventListener(MouseEvent.CLICK, onAdvButtonClick); tipsButton = new Button("Strategy Tips", 12, 100, 18, 0, 0, true, 4210943, 0xFFFFFF); addChild(tipsButton); tipsButton.x = 215; tipsButton.y = 5; tipsButton.addEventListener(MouseEvent.CLICK, onTipsButtonClick); unitsButton = new Button("Units", 12, 100, 18, 0, 0, true, 4210943, 0xFFFFFF); addChild(unitsButton); unitsButton.x = 320; unitsButton.y = 5; unitsButton.addEventListener(MouseEvent.CLICK, onUnitsButtonClick); basicButtonCover = new Shape(); basicButtonCover.graphics.beginFill(0, 0.4); basicButtonCover.graphics.drawRect(0, 0, 100, 18); basicButtonCover.graphics.endFill(); addChild(basicButtonCover); basicButtonCover.x = basicButton.x; basicButtonCover.y = basicButton.y; advButtonCover = new Shape(); advButtonCover.graphics.beginFill(0, 0.4); advButtonCover.graphics.drawRect(0, 0, 100, 18); advButtonCover.graphics.endFill(); addChild(advButtonCover); advButtonCover.x = advButton.x; advButtonCover.y = advButton.y; tipsButtonCover = new Shape(); tipsButtonCover.graphics.beginFill(0, 0.4); tipsButtonCover.graphics.drawRect(0, 0, 100, 18); tipsButtonCover.graphics.endFill(); addChild(tipsButtonCover); tipsButtonCover.x = tipsButton.x; tipsButtonCover.y = tipsButton.y; unitsButtonCover = new Shape(); unitsButtonCover.graphics.beginFill(0, 0.4); unitsButtonCover.graphics.drawRect(0, 0, 100, 18); unitsButtonCover.graphics.endFill(); addChild(unitsButtonCover); unitsButtonCover.x = unitsButton.x; unitsButtonCover.y = unitsButton.y; basicPage = new BasicPage((WIDTH - 6), (HEIGHT - 33)); basicPage.x = 3; basicPage.y = 30; addChild(basicPage); advPage = new AdvPage((WIDTH - 6), (HEIGHT - 33)); advPage.x = 3; advPage.y = 30; addChild(advPage); tipsPage = new TipsPage((WIDTH - 6), (HEIGHT - 33)); tipsPage.x = 3; tipsPage.y = 30; addChild(tipsPage); unitsPage = new UnitsPage((WIDTH - 6), (HEIGHT - 33)); unitsPage.x = 3; unitsPage.y = 30; addChild(unitsPage); exitButton = new Button("Exit", 10, 75, 17, 0, 0, true, 12587024, 0); addChild(exitButton); exitButton.x = ((WIDTH - 5) - exitButton.width); exitButton.y = 5; exitButton.addEventListener(MouseEvent.CLICK, onExitClick); visible = false; showPage(0); setSelectedButton(basicButton); } private function onTipsButtonClick(_arg1:Event=null):void{ showPage(2); setSelectedButton(tipsButton); } private function onAdvButtonClick(_arg1:Event=null):void{ showPage(1); setSelectedButton(advButton); } private function onUnitsButtonClick(_arg1:Event=null):void{ showPage(3); setSelectedButton(unitsButton); } private function onExitClick(_arg1:MouseEvent=null):void{ dispatchEvent(new Event(DISMISS_CLICKED)); visible = false; } private function setSelectedButton(_arg1:Button):void{ basicButtonCover.visible = true; advButtonCover.visible = true; tipsButtonCover.visible = true; unitsButtonCover.visible = true; if (_arg1 == basicButton){ basicButtonCover.visible = false; } else { if (_arg1 == advButton){ advButtonCover.visible = false; } else { if (_arg1 == tipsButton){ tipsButtonCover.visible = false; } else { if (_arg1 == unitsButton){ unitsButtonCover.visible = false; }; }; }; }; } public function showPage(_arg1:int):void{ basicPage.visible = false; advPage.visible = false; tipsPage.visible = false; unitsPage.visible = false; if (_arg1 == 0){ basicPage.visible = true; } else { if (_arg1 == 1){ advPage.visible = true; } else { if (_arg1 == 2){ tipsPage.visible = true; } else { if (_arg1 == 3){ unitsPage.visible = true; }; }; }; }; } private function onBasicButtonClick(_arg1:Event=null):void{ showPage(0); setSelectedButton(basicButton); } public static function get instance():HelpDialog{ if (_instance == null){ _instance = new (HelpDialog); }; return (_instance); } } }//package com.wbwar.creeper.dialogs
Section 46
//SettingsDialog (com.wbwar.creeper.dialogs.SettingsDialog) package com.wbwar.creeper.dialogs { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.text.*; public class SettingsDialog extends Sprite { private var musicVolumeSlider:Slider; private var dismissButton:Button; private var mistCheck:Checkbox; private var particlesCheck:Checkbox; public static const DISMISS_CLICKED:String = "DISMISS_CLICKED"; public static const WIDTH:int = 350; public static const HEIGHT:int = 250; public function SettingsDialog(){ var _local3:TextField; var _local4:int; var _local9:TextField; var _local10:Button; super(); graphics.beginFill(0x202020); graphics.lineStyle(3, 0xFFFFFF); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); filters = [new GlowFilter(0, 1, 8, 8)]; var _local1:int = ((WIDTH - 30) / 2); var _local2 = 50; _local3 = Text.text("GAME SETTINGS?", 24, 16777152); addChild(_local3); _local3.x = ((WIDTH / 2) - (_local3.width / 2)); _local3.y = 5; _local4 = 50; particlesCheck = new Checkbox(0x9000, 0xFF00); addChild(particlesCheck); particlesCheck.x = 15; particlesCheck.y = (_local4 + 4); var _local5:TextField = Text.text("Enable Particle Effects", 14, 0xFFFFFF); addChild(_local5); _local5.x = 25; _local5.y = (_local4 - 5); particlesCheck.checked = GameData.particleEffects; particlesCheck.addEventListener(Checkbox.CHECK_CHANGE, onParticlesCheckChange); _local4 = (_local4 + 25); mistCheck = new Checkbox(0x9000, 0xFF00); addChild(mistCheck); mistCheck.x = 15; mistCheck.y = (_local4 + 4); var _local6:TextField = Text.text("Enable Mist Effects", 14, 0xFFFFFF); addChild(_local6); _local6.x = 25; _local6.y = (_local4 - 5); var _local7:TextField = Text.text("(GAME RESTART REQUIRED)", 8, 0xFFFFFF); addChild(_local7); _local7.x = 170; _local7.y = _local4; mistCheck.checked = GameData.mistEffects; mistCheck.addEventListener(Checkbox.CHECK_CHANGE, onMistCheckChange); _local4 = (_local4 + 25); var _local8:TextField = Text.text("Music Volume", 14, 0xFFFFFF); addChild(_local8); _local8.x = ((WIDTH / 2) - (_local8.width / 2)); _local8.y = (_local4 - 5); musicVolumeSlider = new Slider(0xFF00, 0x9000, 100, 100); addChild(musicVolumeSlider); musicVolumeSlider.x = ((WIDTH / 2) - 50); musicVolumeSlider.y = (_local4 + 20); musicVolumeSlider.value = (Creeper.instance.gameScreen.gameMusicVolume * 100); musicVolumeSlider.addEventListener(Slider.SLIDER_CHANGING, onMusicVolumeSliderChange); musicVolumeSlider.addEventListener(Slider.SLIDER_CHANGED, onMusicVolumeSliderChanged); _local4 = (_local4 + 50); if (Creeper.optimalWindowSizeFunction != null){ _local9 = Text.text("Set Window Size for Best Performance", 14, 0xFFFFFF); addChild(_local9); _local9.x = ((WIDTH / 2) - (_local9.width / 2)); _local9.y = (_local4 - 5); _local10 = new Button("Set Size Now", 12, 100, 18, 0, 0, true, 0x8000, -1); addChild(_local10); _local10.x = ((WIDTH / 2) - (_local10.width / 2)); _local10.y = (_local4 + 20); _local10.addEventListener(MouseEvent.CLICK, onOptimalWindowSizeButtonClick); }; dismissButton = new Button("Close", 18, 100, 25, 0, 0, true, 0x8000, -1); addChild(dismissButton); dismissButton.x = ((WIDTH / 2) - (dismissButton.width / 2)); dismissButton.y = ((HEIGHT - 5) - dismissButton.height); dismissButton.addEventListener(MouseEvent.CLICK, onDismissClick); visible = false; } private function onOptimalWindowSizeButtonClick(_arg1:Event):void{ if (Creeper.optimalWindowSizeFunction != null){ Creeper.optimalWindowSizeFunction(); }; } private function onDismissClick(_arg1:MouseEvent=null):void{ dispatchEvent(new Event(DISMISS_CLICKED)); visible = false; } private function onParticlesCheckChange(_arg1:Event):void{ GameData.particleEffects = particlesCheck.checked; GameData.save(); } private function onMusicVolumeSliderChange(_arg1:Event):void{ Creeper.instance.gameScreen.gameMusicVolume = (musicVolumeSlider.value / 100); } private function onMusicVolumeSliderChanged(_arg1:Event):void{ Creeper.instance.gameScreen.gameMusicVolume = (musicVolumeSlider.value / 100); GameData.musicVolume = Creeper.instance.gameScreen.gameMusicVolume; GameData.save(); } private function onMistCheckChange(_arg1:Event):void{ GameData.mistEffects = mistCheck.checked; GameData.save(); } } }//package com.wbwar.creeper.dialogs
Section 47
//UpgradesDialog (com.wbwar.creeper.dialogs.UpgradesDialog) package com.wbwar.creeper.dialogs { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.media.*; public class UpgradesDialog extends Sprite { private var noPointsShield:Sprite; private var buildFasterSelector:UpgradeSelector; private var upgradeToPurchase:int; private var dismissButton:Button; private var fireRangeSelector:UpgradeSelector; private var confirmDialog:ConfirmDialog; private var fireRateSelector:UpgradeSelector; private var moveFasterSelector:UpgradeSelector; private var energyBoostSelector:UpgradeSelector; private var cheaperSelector:UpgradeSelector; public static const UPGRADE_WEAPON1:int = 12; public static const WIDTH:int = 500; public static const HEIGHT:int = 270; public static const UPGRADE_WEAPON0:int = 11; public static const UPGRADE_WEAPON2:int = 13; public static const UPGRADE_ECONOMIC0:int = 1; public static const UPGRADE_ECONOMIC1:int = 2; public static const UPGRADE_ECONOMIC2:int = 3; public function UpgradesDialog(){ super(); visible = false; graphics.beginFill(0x202020); graphics.lineStyle(3, 0xFFFFFF); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); filters = [new GlowFilter(0, 1, 8, 8)]; var swidth:int = ((WIDTH - 30) / 2); var sheight = 50; var titleText:TextField = Text.text("UPGRADES", 24, 16777152); addChild(titleText); titleText.x = ((WIDTH / 2) - (titleText.width / 2)); titleText.y = 5; energyBoostSelector = new UpgradeSelector("Produce 10% more energy", 2146336, swidth, sheight); addChild(energyBoostSelector); energyBoostSelector.x = 10; energyBoostSelector.y = 40; energyBoostSelector.selected = GameSpace.instance.upgradeEconomic0; energyBoostSelector.addEventListener(MouseEvent.CLICK, function ():void{ purchaseUpgrade(UPGRADE_ECONOMIC0); }); cheaperSelector = new UpgradeSelector("Everything costs 10% less to build", 2146336, swidth, sheight); addChild(cheaperSelector); cheaperSelector.x = 10; cheaperSelector.y = ((energyBoostSelector.y + sheight) + 10); cheaperSelector.selected = GameSpace.instance.upgradeEconomic1; cheaperSelector.addEventListener(MouseEvent.CLICK, function ():void{ purchaseUpgrade(UPGRADE_ECONOMIC1); }); buildFasterSelector = new UpgradeSelector("Build things 20% faster", 2146336, swidth, sheight); addChild(buildFasterSelector); buildFasterSelector.x = 10; buildFasterSelector.y = ((cheaperSelector.y + sheight) + 10); buildFasterSelector.selected = GameSpace.instance.upgradeEconomic2; buildFasterSelector.addEventListener(MouseEvent.CLICK, function ():void{ purchaseUpgrade(UPGRADE_ECONOMIC2); }); fireRangeSelector = new UpgradeSelector("Increase fire range by 20%", 12591136, swidth, sheight); addChild(fireRangeSelector); fireRangeSelector.x = ((WIDTH / 2) + 5); fireRangeSelector.y = 40; fireRangeSelector.selected = GameSpace.instance.upgradeWeapon0; fireRangeSelector.addEventListener(MouseEvent.CLICK, function ():void{ purchaseUpgrade(UPGRADE_WEAPON0); }); fireRateSelector = new UpgradeSelector("Increase fire rate by 15%", 12591136, swidth, sheight); addChild(fireRateSelector); fireRateSelector.x = ((WIDTH / 2) + 5); fireRateSelector.y = ((fireRangeSelector.y + sheight) + 10); fireRateSelector.selected = GameSpace.instance.upgradeWeapon1; fireRateSelector.addEventListener(MouseEvent.CLICK, function ():void{ purchaseUpgrade(UPGRADE_WEAPON1); }); moveFasterSelector = new UpgradeSelector("Increase move speed by 30%", 12591136, swidth, sheight); addChild(moveFasterSelector); moveFasterSelector.x = ((WIDTH / 2) + 5); moveFasterSelector.y = ((fireRateSelector.y + sheight) + 10); moveFasterSelector.selected = GameSpace.instance.upgradeWeapon2; moveFasterSelector.addEventListener(MouseEvent.CLICK, function ():void{ purchaseUpgrade(UPGRADE_WEAPON2); }); noPointsShield = new Sprite(); noPointsShield.visible = false; addChild(noPointsShield); noPointsShield.graphics.beginFill(0xFFFFFF, 0.1); noPointsShield.graphics.drawRect(0, 0, WIDTH, HEIGHT); noPointsShield.graphics.endFill(); var noPointsText:TextField = Text.text("NO UPGRADE POINTS AVAILABLE TO SPEND", 18, 0xFFFFFF); noPointsShield.addChild(noPointsText); noPointsText.x = ((WIDTH / 2) - (noPointsText.width / 2)); noPointsText.y = ((HEIGHT - 35) - noPointsText.height); dismissButton = new Button("Close", 18, 100, 25, 0, 0, true, 0x8000, -1); addChild(dismissButton); dismissButton.x = ((WIDTH / 2) - (dismissButton.width / 2)); dismissButton.y = ((HEIGHT - 5) - dismissButton.height); dismissButton.addEventListener(MouseEvent.CLICK, onDismissClick); confirmDialog = new ConfirmDialog(200, 100, WIDTH, HEIGHT); confirmDialog.message = "Purchase Upgrade?"; confirmDialog.yesCallback = onYesClick; confirmDialog.noCallback = onNoClick; addChild(confirmDialog); confirmDialog.visible = false; GameSpace.instance.addEventListener(UpgradeBox.UPGRADE_APPLIED, refresh, false, 0, true); } private function refresh(_arg1:Event=null):void{ energyBoostSelector.selected = GameSpace.instance.upgradeEconomic0; cheaperSelector.selected = GameSpace.instance.upgradeEconomic1; buildFasterSelector.selected = GameSpace.instance.upgradeEconomic2; fireRangeSelector.selected = GameSpace.instance.upgradeWeapon0; fireRateSelector.selected = GameSpace.instance.upgradeWeapon1; moveFasterSelector.selected = GameSpace.instance.upgradeWeapon2; if (GameSpace.instance.points == 0){ noPointsShield.visible = true; } else { noPointsShield.visible = false; }; } private function onDismissClick(_arg1:Event):void{ visible = false; GameSpace.instance.paused = false; } private function onYesClick():void{ if (upgradeToPurchase == UPGRADE_ECONOMIC0){ GameSpace.instance.upgradeEconomic0 = true; GameSpace.instance.points--; } else { if (upgradeToPurchase == UPGRADE_ECONOMIC1){ GameSpace.instance.upgradeEconomic1 = true; GameSpace.instance.points--; } else { if (upgradeToPurchase == UPGRADE_ECONOMIC2){ GameSpace.instance.upgradeEconomic2 = true; GameSpace.instance.points--; } else { if (upgradeToPurchase == UPGRADE_WEAPON0){ GameSpace.instance.upgradeWeapon0 = true; GameSpace.instance.points--; Gun.setUpgradedRange(); AreaGun.setUpgradedRange(); ABM.setUpgradedRange(); } else { if (upgradeToPurchase == UPGRADE_WEAPON1){ GameSpace.instance.upgradeWeapon1 = true; GameSpace.instance.points--; } else { if (upgradeToPurchase == UPGRADE_WEAPON2){ GameSpace.instance.upgradeWeapon2 = true; GameSpace.instance.points--; }; }; }; }; }; }; refresh(); } private function purchaseUpgrade(_arg1:int):void{ if ((((_arg1 == UPGRADE_ECONOMIC0)) && (GameSpace.instance.upgradeEconomic0))){ return; }; if ((((_arg1 == UPGRADE_ECONOMIC1)) && (GameSpace.instance.upgradeEconomic1))){ return; }; if ((((_arg1 == UPGRADE_ECONOMIC2)) && (GameSpace.instance.upgradeEconomic2))){ return; }; if ((((_arg1 == UPGRADE_WEAPON0)) && (GameSpace.instance.upgradeWeapon0))){ return; }; if ((((_arg1 == UPGRADE_WEAPON1)) && (GameSpace.instance.upgradeWeapon1))){ return; }; if ((((_arg1 == UPGRADE_WEAPON2)) && (GameSpace.instance.upgradeWeapon2))){ return; }; if (GameSpace.instance.points == 0){ return; }; var _local2:Sound = new ClickSound(); _local2.play(); confirmDialog.visible = true; upgradeToPurchase = _arg1; } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (_arg1){ refresh(); }; } private function onNoClick():void{ refresh(); } } }//package com.wbwar.creeper.dialogs
Section 48
//UpgradeSelector (com.wbwar.creeper.dialogs.UpgradeSelector) package com.wbwar.creeper.dialogs { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.text.*; public class UpgradeSelector extends Sprite { private var textTextField:TextField; public var WIDTH:int; public var HEIGHT:int; private var text:String; private var _over:Boolean; private var backgroundColor:Number; private var _selected:Boolean; public function UpgradeSelector(_arg1:String, _arg2:Number, _arg3:int, _arg4:int){ this.text = _arg1; this.backgroundColor = _arg2; this.WIDTH = _arg3; this.HEIGHT = _arg4; textTextField = Text.text(_arg1, 12, 0xFFFFFF); textTextField.x = ((WIDTH / 2) - (textTextField.width / 2)); textTextField.y = ((HEIGHT / 2) - (textTextField.height / 2)); addChild(textTextField); draw(); useHandCursor = true; buttonMode = true; addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); } public function get over():Boolean{ return (_over); } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (!visible){ over = false; }; } public function set over(_arg1:Boolean):void{ _over = _arg1; draw(); } private function onMouseOver(_arg1:Event):void{ over = true; } private function draw():void{ graphics.clear(); var _local1:Number = 0.2; if (over){ _local1 = 0.4; }; if (selected){ _local1 = 1; }; graphics.beginFill(backgroundColor, _local1); graphics.drawRoundRect(0, 0, WIDTH, HEIGHT, 10, 5); graphics.endFill(); } public function set selected(_arg1:Boolean):void{ var _local2:Boolean; if (_arg1 != _selected){ _local2 = true; }; _selected = _arg1; if (_local2){ draw(); }; if (_arg1){ useHandCursor = false; buttonMode = false; } else { useHandCursor = true; buttonMode = true; }; } private function onMouseOut(_arg1:Event):void{ over = false; } public function get selected():Boolean{ return (_selected); } } }//package com.wbwar.creeper.dialogs
Section 49
//Game (com.wbwar.creeper.games.Game) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; public class Game { protected var done:Boolean; protected var updateCount:int; private var first:Boolean;// = true private var callbackTime:int; public var xml:XML; private var callbackFunction:Function; public static const TERRAIN_HEIGHT_MULTIPLE:Number = 1; public static const TRAINING_GAME_COUNT:int = 5; public function disableGame():void{ GameSpace.instance.controlPanel.buildMenu.enableAll(false); GameSpace.instance.baseGun.canMove = false; GameSpace.instance.controlPanel.missionTimeViewer.visible = false; } protected function delayedCallback(_arg1:int, _arg2:Function):void{ callbackTime = (updateCount + _arg1); callbackFunction = _arg2; } public function update():void{ if (done){ return; }; if (first){ gameStart(); first = false; }; if ((((updateCount == callbackTime)) && (!((callbackFunction == null))))){ callbackTime = -1; callbackFunction(); }; updateCount++; } public function getWallData():Array{ var _local1:Array = GameArrayUtil.csvAsIntArray(xml.walls.wallData); return (_local1); } public function getTerrainHeight():Array{ var _local1:Array = GameArrayUtil.csvAsIntArray(xml.terrain.terrainHeight); var _local2:int; while (_local2 < _local1.length) { _local1[_local2] = (_local1[_local2] * TERRAIN_HEIGHT_MULTIPLE); _local2++; }; return (_local1); } protected function placesCharged(_arg1:Class):Boolean{ var _local2:Place; var _local3:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local3 >= 0) { _local2 = (GameSpace.instance.places.placesLayer.getChildAt(_local3) as Place); if ((_local2 is _arg1)){ if (_local2.energyLevel < _local2.operateEnergy){ return (false); }; }; _local3--; }; return (true); } public function gameSpaceStarted():void{ } public function enableGame():void{ GameSpace.instance.controlPanel.buildMenu.enableAll(true); GameSpace.instance.baseGun.canMove = true; GameSpace.instance.controlPanel.missionTimeViewer.visible = true; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.controlPanel.missionTimeViewer.update(); } protected function placeInRange(_arg1:Class, _arg2:int, _arg3:int, _arg4:int):Boolean{ var _local5:Place; var _local6:int; var _local7:int; var _local8:int; var _local9:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local9 >= 0) { _local5 = (GameSpace.instance.places.placesLayer.getChildAt(_local9) as Place); if ((_local5 is _arg1)){ _local6 = (_local5.gameSpaceX - _arg2); _local7 = (_local5.gameSpaceY - _arg3); if (((_local6 * _local6) + (_local7 * _local7)) <= (_arg4 * _arg4)){ return (true); }; }; _local9--; }; return (false); } public function getBackground():int{ return (int(xml.background.backgroundMap)); } public function gameStart():void{ } } }//package com.wbwar.creeper.games
Section 50
//GameData (com.wbwar.creeper.games.GameData) package com.wbwar.creeper.games { import com.wbwar.creeper.util.*; import flash.utils.*; public class GameData { public static var mistEffects:Boolean = true; public static var musicVolume:Number = 0.5; private static var trainingGames:Array = []; public static var playerName:String; public static var groupName:String; public static var particleEffects:Boolean = true; public static var tutorial:Boolean; private static function getGameDataString():String{ var _local2:IndividualGameData; var _local1 = "<games>\n"; if (playerName == null){ _local1 = (_local1 + "<playerName></playerName>\n"); } else { _local1 = (_local1 + (("<playerName>" + playerName) + "</playerName>\n")); }; if (groupName == null){ _local1 = (_local1 + "<groupName></groupName>\n"); } else { _local1 = (_local1 + (("<groupName>" + groupName) + "</groupName>\n")); }; _local1 = (_local1 + (("<musicVolume>" + String(musicVolume)) + "</musicVolume>\n")); _local1 = (_local1 + (("<mistEffects>" + String(mistEffects)) + "</mistEffects>\n")); _local1 = (_local1 + (("<particleEffects>" + String(particleEffects)) + "</particleEffects>\n")); _local1 = (_local1 + "<tutorial>\n"); _local1 = (_local1 + String(tutorial)); _local1 = (_local1 + "</tutorial>\n"); _local1 = (_local1 + "<tGames>\n"); for each (_local2 in trainingGames) { if (_local2.gameNumber >= 0){ _local1 = (_local1 + _local2.getXML()); _local1 = (_local1 + "\n"); }; }; _local1 = (_local1 + "</tGames>\n"); _local1 = (_local1 + "</games>\n"); return (_local1); } public static function getTrainingGameData(_arg1:int):IndividualGameData{ var _local2:IndividualGameData; _local2 = trainingGames[_arg1]; if (_local2 == null){ _local2 = new IndividualGameData(); _local2.gameNumber = _arg1; trainingGames[_arg1] = _local2; }; return (_local2); } public static function load():void{ var d:String; var ba:ByteArray; var result:String; try { d = (Persist.getData() as String); if (d != null){ ba = RC4.decryptBA(d, RC4.decrypt("4b061fadebe13b", "spaceestate12")); ba.uncompress(); result = ba.toString(); loadGameDataString(result); }; } catch(e:Error) { trace(e); }; } private static function loadGameDataString(_arg1:String):void{ var _local3:IndividualGameData; var _local2:XML = new XML(_arg1); if (_local2.playerName.length() > 0){ playerName = _local2.playerName; } else { playerName = null; }; if (_local2.groupName.length() > 0){ groupName = _local2.groupName; } else { groupName = null; }; if (_local2.musicVolume.length() > 0){ musicVolume = _local2.musicVolume; } else { musicVolume = 0.5; }; if (_local2.mistEffects.length() > 0){ mistEffects = (_local2.mistEffects == "true"); } else { mistEffects = true; }; if (_local2.particleEffects.length() > 0){ particleEffects = (_local2.particleEffects == "true"); } else { particleEffects = true; }; if (_local2.tutorial.length() > 0){ tutorial = (_local2.tutorial == "true"); } else { tutorial = false; }; trainingGames = []; var _local4:XMLList = _local2.tGames; var _local5:int; while (_local5 < _local4.elements().length()) { _local3 = IndividualGameData.create(_local4.elements()[_local5]); if (_local3.gameNumber >= 0){ trainingGames[_local3.gameNumber] = _local3; }; _local5++; }; } public static function save():void{ var s:String; var od:ByteArray; var result:String; try { s = getGameDataString(); od = new ByteArray(); od.writeUTFBytes(s); od.compress(); result = RC4.encryptBA(od, RC4.decrypt("4b061fadebe13b", "spaceestate12")); Persist.saveData(result); } catch(e:Error) { trace(e); }; } } }//package com.wbwar.creeper.games
Section 51
//IndividualGameData (com.wbwar.creeper.games.IndividualGameData) package com.wbwar.creeper.games { public class IndividualGameData { public var gameNumber:int;// = -1 public var lastPlayed:Number;// = 0 public var highScore:int;// = 0 public var playCount:int;// = 0 public var minTime:int;// = 0 public function getXML():XML{ var _local1:XML = <IndividualGame/> ; _local1.gameNumber = gameNumber; _local1.highScore = highScore; _local1.minTime = minTime; _local1.playCount = playCount; _local1.lastPlayed = lastPlayed; return (_local1); } public function load(_arg1:XML):void{ var data = _arg1; try { gameNumber = data.gameNumber; highScore = data.highScore; minTime = data.minTime; playCount = data.playCount; lastPlayed = data.lastPlayed; } catch(e:Error) { trace(e); gameNumber = -1; highScore = 0; minTime = 0; playCount = 0; lastPlayed = 0; }; } public static function create(_arg1:XML):IndividualGameData{ var _local2:IndividualGameData = new (IndividualGameData); _local2.load(_arg1); return (_local2); } } }//package com.wbwar.creeper.games
Section 52
//Persist (com.wbwar.creeper.games.Persist) package com.wbwar.creeper.games { import flash.net.*; public class Persist { public static function getData():Object{ var data:Object; var lso:SharedObject; if (Creeper.airMode){ return (Creeper.loadGameDataFunction()); }; try { lso = SharedObject.getLocal("creeperworld", "/"); data = lso.data.gameData; } finally { lso.close(); }; return (data); } public static function saveData(_arg1:Object):void{ var lso:SharedObject; var gameData = _arg1; if (Creeper.airMode){ Creeper.saveGameDataFunction(gameData); } else { try { lso = SharedObject.getLocal("creeperworld", "/"); lso.data.gameData = gameData; lso.flush(); } finally { lso.close(); }; }; } } }//package com.wbwar.creeper.games
Section 53
//Prelude (com.wbwar.creeper.games.Prelude) package com.wbwar.creeper.games { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.media.*; import caurina.transitions.*; public class Prelude extends Sprite { private var continueButton:Button; private var worldBlue:Array; private var worldGreen:Array; private var worldNames:Array; private var textBox:Sprite; private var worldPop:Array; private var worlds:Array; private var textToShow:String; private var worldRed:Array; private var oldWorld:Sprite; private var worldSeeds:Array; private var musicSC:SoundChannel; private var hopeWorld:Sprite; private var game:TrainingGame99; private var worldThres:Array; private var music:Sound; public static var backgroundImage:Class = Prelude_backgroundImage; public function Prelude(_arg1:TrainingGame99){ var b:Bitmap; var w:Sprite; var game = _arg1; worlds = []; worldSeeds = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]; worldThres = [50, 60, 70, 100, 55, 86, 45, 76, 65, 57, 88, 95, 63, 65, 77, 83, 91, 80, 70, 60]; worldRed = [10, 10, 10, 200, 20, 150, 40, 30, 90, 20, 50, 20, 150, 60, 40, 70, 30, 30, 40, 40]; worldGreen = [10, 100, 150, 110, 100, 90, 60, 140, 130, 120, 100, 90, 90, 80, 70, 110, 140, 150, 180, 120]; worldBlue = [30, 250, 30, 40, 140, 80, 60, 120, 100, 60, 70, 50, 80, 90, 20, 30, 50, 80, 30, 60]; worldNames = ["Antlia", "Sagitta", "Aquila", "Pavo", "Caelum", "Canis", "Vela", "Corvus", "Draco", "Fornax", "Indus", "Apus", "Orion", "Ara", "Pictor", "Leo", "Taurus", "Cetus", "Ursa", "Volans"]; worldPop = ["13.7 billion", "12.2 billion", "10.8 billion", "15.3 billion", "20.4 billion", "5.4 billion", "8.2 billion", "10.5 billion", "8.7 billion", "3.3 billion", "14 billion", "12.2 billion", "13.1 billion", "13.9 billion", "9.3 billion", "7.6 billion", "5.1 billion", "6 billion", "18.2 billion", "14 billion"]; super(); this.game = game; graphics.beginFill(0); graphics.drawRect(0, 0, 700, 525); graphics.endFill(); b = new backgroundImage(); b.alpha = 0; b.visible = false; addChild(b); var cancelText:TextField = Text.text("[SPACE] to Skip", 8, 0xA0A0A0); addChild(cancelText); cancelText.x = ((700 - cancelText.width) - 5); cancelText.y = ((525 - 5) - cancelText.height); Creeper.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 0, true); textBox = new Sprite(); addChild(textBox); textBox.y = 30; var i:int; while (i < 20) { w = ColorUtil.world(worldSeeds[i], worldThres[i], worldRed[i], worldGreen[i], worldBlue[i]); w.width = 200; w.height = 200; worlds[i] = w; i = (i + 1); }; hopeWorld = ColorUtil.world(100, 50, 100, 10, 100); hopeWorld.width = 250; hopeWorld.height = 250; hopeWorld.x = 350; hopeWorld.y = 300; addChild(hopeWorld); hopeWorld.visible = false; continueButton = new Button("Continue", 12, 120, 20, 0, 0, true, 0x8000, -1); continueButton.visible = false; addChild(continueButton); continueButton.x = (350 - (continueButton.width / 2)); continueButton.y = ((525 - 5) - continueButton.height); continueButton.addEventListener(MouseEvent.CLICK, onContinueClick); Tweener.addTween(b, {time:5, _autoAlpha:0.7}); Callback.callback(function ():void{ showText("In the year 13,271 Humankind had colonized\nthousands of worlds."); }, 2000); Callback.callback(function ():void{ showText("They found none their equal as they spread\ninto a fantastic and bountiful empire."); }, 9000); Callback.callback(function ():void{ showText("At the height of their greatness they walked\namongst the stars as though they were gods. "); }, 16000); Callback.callback(function ():void{ showText("But gods they were not..."); }, 25000); Callback.callback(function ():void{ showText("It fell from the sky without purpose or reason."); }, 30000); Callback.callback(function ():void{ showText("Fifty worlds fell on the first day.\n500 billion lives were lost."); }, 36000); Callback.callback(function ():void{ showText("World after world fell as man\nwas routed from existence."); }, 42000); Callback.callback(function ():void{ showText("Nothing could stop what would\ncome to be called the Creeper."); }, 48000); Callback.callback(function ():void{ showText("It wanted nothing, it could not be reasoned with."); }, 54000); Callback.callback(function ():void{ showText("It seemed as though its only purpose was\nto undo all that Man had done."); }, 60000); Callback.callback(function ():void{ showText("But all was not yet lost...."); }, 69000); Callback.callback(function ():void{ showText("The last survivors of humanity have\ngathered at a world called Hope."); }, 76000); Callback.callback(function ():void{ showText("Assembled by the visions of a crazed Old Man,\nthe last of Humankind marks its final hours."); }, 82000); Callback.callback(function ():void{ showText("A great city has been built to house\nthe 50 thousand that survive."); }, 88000); Callback.callback(function ():void{ showText("It will journey from world to world...\nNever staying longer than it must."); }, 94000); Callback.callback(function ():void{ showText("Guided by the path set by the Old Man,\nOur final journey will soon begin."); }, 100000); Callback.callback(function ():void{ continueButton.visible = true; }, 102000); Callback.callback(showHope, 76000); var wst = 38000; Callback.callback(function ():void{ showWorld(0); }, wst); Callback.callback(function ():void{ showWorld(1); }, (wst + 5000)); Callback.callback(function ():void{ showWorld(2); }, (wst + 10000)); Callback.callback(function ():void{ showWorld(3); }, (wst + 15000)); Callback.callback(function ():void{ showWorld(4); }, (wst + 20000)); Callback.callback(function ():void{ showWorld(5); }, (wst + 23000)); Callback.callback(function ():void{ showWorld(6); }, (wst + 25000)); Callback.callback(function ():void{ showWorld(7); }, (wst + 26000)); Callback.callback(function ():void{ showWorld(8); }, (wst + 26500)); Callback.callback(function ():void{ showWorld(10); }, ((wst + 26500) + (200 * 1))); Callback.callback(function ():void{ showWorld(11); }, ((wst + 26500) + (200 * 2))); Callback.callback(function ():void{ showWorld(12); }, ((wst + 26500) + (200 * 3))); Callback.callback(function ():void{ showWorld(13); }, ((wst + 26500) + (200 * 4))); Callback.callback(function ():void{ showWorld(14); }, ((wst + 26500) + (200 * 5))); Callback.callback(function ():void{ showWorld(15); }, ((wst + 26500) + (200 * 6))); Callback.callback(function ():void{ showWorld(16); }, ((wst + 26500) + (200 * 7))); Callback.callback(function ():void{ showWorld(17); }, ((wst + 26500) + (200 * 8))); Callback.callback(function ():void{ showWorld(18); }, ((wst + 26500) + (200 * 9))); Callback.callback(function ():void{ showWorld(19); }, ((wst + 26500) + (200 * 10))); Callback.callback(function ():void{ showWorld(0); }, ((wst + 26500) + (200 * 11))); Callback.callback(function ():void{ showWorld(1); }, ((wst + 26500) + (200 * 12))); Callback.callback(function ():void{ showWorld(2); }, ((wst + 26500) + (200 * 13))); Callback.callback(function ():void{ showWorld(3); }, ((wst + 26500) + (200 * 14))); Callback.callback(function ():void{ showWorld(4); }, ((wst + 26500) + (200 * 15))); Callback.callback(function ():void{ showWorld(5); }, ((wst + 26500) + (200 * 16))); Callback.callback(function ():void{ showWorld(6); }, ((wst + 26500) + (200 * 17))); Callback.callback(function ():void{ showWorld(9); }, ((wst + 26500) + (200 * 18))); Callback.callback(function ():void{ showWorld(7); }, ((wst + 26500) + (200 * 19))); Callback.callback(function ():void{ showWorld(8); }, ((wst + 26500) + (200 * 20))); Callback.callback(function ():void{ showWorld(9); }, ((wst + 26500) + (200 * 21))); Callback.callback(function ():void{ showWorld(-1); }, ((wst + 26500) + (200 * 22))); music = new MusicOperaHouse(); musicSC = music.play(0, 2); } private function onKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 32){ onContinueClick(null); }; } private function showTextUp():void{ while (textBox.numChildren) { textBox.removeChildAt(0); }; var _local1:TextField = Text.text(textToShow, 24, 0xF0F0F0); _local1.filters = [new DropShadowFilter(4, 45, 0x404040)]; textBox.addChild(_local1); textBox.x = (350 - (_local1.width / 2)); Tweener.addTween(textBox, {time:1, _autoAlpha:1}); } private function showWorld(_arg1:int):void{ var w:Sprite; var n:TextField; var p:TextField; var d:TextField; var ow:Sprite; var wn = _arg1; if (wn != -1){ w = worlds[wn]; w.y = 300; n = Text.text(("Name: " + worldNames[wn]), 12, 0xFFFFFF); p = Text.text(("Population: " + worldPop[wn]), 12, 10551200); d = Text.text("Status: DEAD", 12, 16752800); w.addChild(n); w.addChild(p); w.addChild(d); n.x = (-(n.width) / 2); p.x = (-(p.width) / 2); d.x = (-(d.width) / 2); n.y = 105; p.y = 120; d.y = 135; addChild(w); }; if (oldWorld != null){ ow = oldWorld; Tweener.addTween(ow, {time:2, _autoAlpha:0, x:0, onComplete:function ():void{ removeChild(ow); }}); }; if (wn != -1){ w.x = (700 + 100); w.alpha = 0; Tweener.addTween(w, {time:0.8, _autoAlpha:1, x:350}); oldWorld = w; }; } private function onContinueClick(_arg1:Event):void{ Creeper.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); visible = false; if (musicSC != null){ musicSC.stop(); }; game.actualGameStart(); game.prelude = null; } private function showHope():void{ var _local1:TextField = Text.text("Name: Hope", 12, 0xFFFFFF); var _local2:TextField = Text.text("Population: 49,825", 12, 10551200); hopeWorld.addChild(_local1); hopeWorld.addChild(_local2); _local1.x = (-(_local1.width) / 2); _local2.x = (-(_local2.width) / 2); _local1.y = 105; _local2.y = 120; hopeWorld.visible = false; hopeWorld.alpha = 0; Tweener.addTween(hopeWorld, {time:5, _autoAlpha:1}); } private function showText(_arg1:String):void{ textToShow = _arg1; Tweener.addTween(textBox, {time:1, _autoAlpha:0, onComplete:showTextUp}); } } }//package com.wbwar.creeper.games
Section 54
//Prelude_backgroundImage (com.wbwar.creeper.games.Prelude_backgroundImage) package com.wbwar.creeper.games { import mx.core.*; public class Prelude_backgroundImage extends BitmapAsset { } }//package com.wbwar.creeper.games
Section 55
//TrainingGame0 (com.wbwar.creeper.games.TrainingGame0) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.geom.*; import flash.utils.*; public class TrainingGame0 extends Game { private var arrow:PulsingArrow; private var mb:MessageBubble; private var tech:Tech; private var message6time:Number; private var message6shown:Boolean; private var md:MessageDialog; private var metEnergyRequirements:Boolean; private var arrowGS:PulsingArrowGameSpace; private var gameStarted:Boolean; private var gotBlasterTech:Boolean; public static var title:String = "Intro"; public static var gameData:Class = TrainingGame0_gameData; public function TrainingGame0(){ xml = new XML(new gameData()); } private function showMessage291(_arg1:Object=null):void{ GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage291); arrowGS.remove(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 305; arrowGS.y = 305; GameSpace.instance.places.onlyLegalX = 30; GameSpace.instance.places.onlyLegalY = 30; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage292, false, 0, true); } private function showMessage292(_arg1:Object=null):void{ GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage292); arrowGS.remove(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 305; arrowGS.y = 445; GameSpace.instance.places.onlyLegalX = 30; GameSpace.instance.places.onlyLegalY = 44; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage293, false, 0, true); } private function showMessage293(_arg1:Object=null):void{ GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage293); arrowGS.remove(); GameSpace.instance.places.onlyLegalX = -1; GameSpace.instance.places.onlyLegalY = -1; md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = (("[TRAINING SIMULATOR]\n" + "YOU MAY NOW BUILD COLLECTORS FREELY.\n") + "KEEP BUILDING COLLECTORS UNTIL YOUR ENERGY COLLECTION IS AT LEAST 2.0.\n"); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showBubble2, false, 0, true); } private function showMessage351(_arg1:Object=null):void{ GameSpace.instance.controlPanel.buildMenu.relayButton.enabled = true; arrow = new PulsingArrow(); arrow.rotation = 135; arrow.scaleX = 1.5; arrow.scaleY = arrow.scaleX; arrow.x = 105; arrow.y = 480; GameSpace.instance.controlPanel.buildMenu.relayButton.addEventListener(MouseEvent.CLICK, showMessage352, false, 1, true); } private function showMessage352(_arg1:Object=null):void{ GameSpace.instance.controlPanel.buildMenu.relayButton.removeEventListener(MouseEvent.CLICK, showMessage352); arrow.remove(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 145; arrowGS.y = 325; GameSpace.instance.places.onlyLegalX = 14; GameSpace.instance.places.onlyLegalY = 32; GameSpace.instance.places.addEventListener(Relay.EVENT_PLACED, showMessage353, false, 0, true); mb = new MessageBubble(200, 150, 155, 315, 150); mb.textField.text = "Build a relay here."; mb.show(); } private function showMessage353(_arg1:Object=null):void{ mb.hide(true); GameSpace.instance.places.removeEventListener(Relay.EVENT_PLACED, showMessage353); arrowGS.remove(); GameSpace.instance.places.onlyLegalX = -1; GameSpace.instance.places.onlyLegalY = -1; GameSpace.instance.controlPanel.buildMenu.nodeButton.enabled = true; md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 500, -1, true); md.textField.text = (((("[TRAINING SIMULATOR]\n" + "NOW BUILD ONE MORE RELAY TO CONNECT TO THE ONE YOU JUST SCHEDULED TO BE BUILT.\n") + "MAKE SURE TO CONNECT THE RELAY TO YOUR EXISTING NODE NETWORK. ") + "RELAYS ARE USEFUL FOR SPANNING YOUR NETWORK OVER GREATER DISTANCES. ") + "IN THIS CASE YOU ARE AVOIDING A POOL OF DEADLY CREEPER."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showBubble3, false, 0, true); } override public function update():void{ var _local1:Number; super.update(); if (!gameStarted){ return; }; if (!metEnergyRequirements){ _local1 = (int(((GameSpace.instance.dynamicContent.energyAccumulationRate / 5) * 10)) / 10); if (_local1 >= 2){ metEnergyRequirements = true; showMessage3(); }; }; if (!gotBlasterTech){ if (!GameSpace.instance.controlPanel.buildMenu.gunButton.mystery){ gotBlasterTech = true; showMessage4(); }; }; if (((((!(message6shown)) && ((message6time > 0)))) && ((getTimer() > (message6time + 45000))))){ showMessage6(); message6shown = true; }; if (updateCount == 20){ showMessage1(); }; } private function showMessage4(_arg1:Object=null):void{ mb.hide(true); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = ((((((("[Lieutenant]\n" + "There, Relays are no lon...\n\n") + "[INSTRUCTOR]\n") + "Shut up! If I need any commentary on your part you'll be the first to know. Otherwise, keep your cake hole shut.\n\n") + "Lieutenant, you may think this is just a laughing matter but need I remind you that this miserable rock is all ") + "we will soon have left? A once great empire of thousands of worlds reduced to less than maybe 100,000 people.... And jokers like ") + "you are what we have left to pin our hopes on.\n\n") + "May the Gods help us...."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage5, false, 0, true); } private function showMessage25(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 500, -1, true); md.textField.text = ((("[TRAINING SIMULATOR]\n" + "BUILD COLLECTORS SPREAD OUT IN A NETWORK.\n") + "THE NETWORK MUST ATTACH TO THE CITY.\n") + "ACHIEVE AN ENERGY COLLECTION OF 2.0 OR GREATER"); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage26, false, 0, true); } private function showMessage26(_arg1:Object=null):void{ mb = new MessageBubble(50, 300, 25, 475, 150); mb.textField.text = "Click here in your command bar to build a collector."; mb.show(); var _local2:MessageBubble = new MessageBubble(450, 400, 395, 450, 200); _local2.textField.text = "This is Odin City. Protect it at all costs. She is our home."; _local2.showTimed(15000); _local2.addEventListener(MouseEvent.CLICK, _local2.hide, false, 0, true); arrow = new PulsingArrow(); arrow.rotation = 135; arrow.scaleX = 1.5; arrow.scaleY = arrow.scaleX; arrow.x = 45; arrow.y = 480; createProducers(); GameSpace.instance.controlPanel.buildMenu.nodeButton.addEventListener(MouseEvent.CLICK, showMessage27, false, 1, true); } private function showMessage27(_arg1:Object=null):void{ mb.hide(true); GameSpace.instance.controlPanel.buildMenu.nodeButton.removeEventListener(MouseEvent.CLICK, showMessage27); arrow.remove(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 355; arrowGS.y = 405; GameSpace.instance.places.onlyLegalX = 35; GameSpace.instance.places.onlyLegalY = 40; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage28, false, 0, true); mb = new MessageBubble(475, 100, 370, 390, 200); mb.textField.text = "Click in the locations I indicate to build energy collectors."; mb.show(); } private function showMessage29(_arg1:Object=null):void{ GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage29); arrowGS.remove(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 355; arrowGS.y = 305; GameSpace.instance.places.onlyLegalX = 35; GameSpace.instance.places.onlyLegalY = 30; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage291, false, 0, true); } private function createProducers(_arg1:Object=null):void{ var _local2:GlopProducer; enableGame(); GameSpace.instance.controlPanel.buildMenu.relayButton.enabled = false; _local2 = new GlopProducer(0, 0); _local2.productionBaseAmt = 0.75; _local2.productionInterval = 175; _local2.startTime = 200; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(30, 0); _local2.productionBaseAmt = 0.4; _local2.productionInterval = 200; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(0, 32); _local2.productionBaseAmt = 1; _local2.productionInterval = 50; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(55, 25); _local2.productionBaseAmt = 0.8; _local2.productionInterval = 100; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); } override public function gameStart():void{ super.gameStart(); gameStarted = true; updateCount = 0; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.paused = false; GameSpace.instance.controlPanel.buildMenu.nodeButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = true; tech = new Tech(11, 32, Tech.TECH_GUN); disableGame(); Creeper.instance.gameScreen.playGameMusic(0, 1); GameSpace.instance.controlPanel.buildMenu.relayButton.enabled = false; } private function setMessage6(_arg1:Object=null):void{ if (((!((tech == null))) && (!((tech.md == null))))){ tech.md.remove(); }; mb = new MessageBubble(10, 300, 25, 500, 220); mb.textField.text = "Build a couple Blasters to fight back the Creeper! Don't build too many, else you will starve your energy network."; mb.show(); GameSpace.instance.controlPanel.buildMenu.gunButton.addEventListener(MouseEvent.CLICK, removeBlasterBubble, false, 1, true); var _local2:MessageBubble = new MessageBubble(225, 100, 365, 35, 250); _local2.arrowPoints.push(new Point(85, 80)); _local2.arrowPoints.push(new Point(615, 80)); _local2.textField.text = ("On each map your goal is to connect all of the Totems to your network. " + "This will allow Odin City to energize the Rift and escape."); _local2.showTimed(20000); _local2.addEventListener(MouseEvent.CLICK, _local2.hide, false, 0, true); var _local3:MessageBubble = new MessageBubble(460, 320, 560, 280, 230); _local3.textField.text = ("This is the insidious Creeper. It flows around the map and destroys anything it touches. " + "You must avoid the Creeper by staying out of its way or by destroying it with your weapons!"); _local3.showTimed(22000); _local3.addEventListener(MouseEvent.CLICK, _local3.hide, false, 0, true); message6time = getTimer(); } private function showMessage6(_arg1:Object=null):void{ var _local2:MessageBubble = new MessageBubble(150, 5, 60, 60, 400); _local2.textField.text = ("Move a blaster in range of this Creeper to push it back. " + "Grow your Collector network so the Blaster can remain connected and resupplied with ammo."); _local2.showTimed(15000); _local2.addEventListener(MouseEvent.CLICK, _local2.hide, false, 0, true); var _local3:MessageBubble = new MessageBubble(480, 370, -1, -1, 235); _local3.textField.text = ("Remember, your goal is to connect all three Totems to your network. " + "Fight the Creeper and expand your network to reach the Totems!"); _local3.show(); _local3.addEventListener(MouseEvent.CLICK, _local3.hide, false, 0, true); } private function showMessage28(_arg1:Object=null):void{ mb.hide(true); GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage28); arrowGS.remove(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 355; arrowGS.y = 355; GameSpace.instance.places.onlyLegalX = 35; GameSpace.instance.places.onlyLegalY = 35; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage29, false, 0, true); } private function showMessage55(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 500, -1, true); md.textField.text = (((("[TRAINING SIMULATOR]\n" + "ATTACH ALL TOTEMS ACROSS TOP OF MAP TO YOUR NETWORK.\n") + "USE BLASTERS TO DEFEAT CREEPER.\n") + "MOVE BLASTERS AS APPROPRIATE.\n") + "ENGAGE ONLY THE CREEPER NECESSARY TO REACH THE TOTEMS."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, setMessage6, false, 0, true); } private function showMessage1(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = ((("[INSTRUCTOR]\n" + "Welcome to command staff training Lieutenant.\n\n") + "I'll whip you into shape before you know it. Once you complete this training course we might one day actually trust you with ") + "the command of Odin City herself. But for now, your simulated posterior is mine to kick. So pay attention!"); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage2, false, 0, true); } private function showMessage2(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = (((("[INSTRUCTOR]\n" + "First up, build collectors and get the simulated Odin City's energy collection up to 2.0 or greater. Keep your eye on the energy ") + "collection in the bottom right of the command console.\n\n") + "Remember to space the collectors out so you maximize the green area they produce. Also remember that they must all ") + "be continuously connected to Odin City. Now hurry up so we can get past this..."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage25, false, 0, true); } private function showBubble2(_arg1:Object=null):void{ mb.hide(true); mb = new MessageBubble(520, 300, 600, 500, 150); mb.textField.text = "Build collectors until your energy collection is 2.0 or greater."; mb.show(); } private function showMessage5(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = ((((((("[INSTRUCTOR]\n" + "For some reason beyond me, the Old Man seems to like you. He's as crazy as ever these last few weeks... so in some odd way ") + "I guess it makes sense for him to favor you.\n\n") + "Anyway, see those three Rift Totems spread across the top of the map? Connect your network to all three so the Rift will activate and ") + "Odin City can escape this world. Remember if this had been a real world it is unlikely that the Creeper would be so nicely confined... so ") + "you'd have a more difficult time defending your network and advancing to the Totems.\n\n") + "You will need to build a few Blasters to clear away the Creeper. Don't over build! Always keep an eye on energy collection and consumption. ") + "Now get busy Lieutenant.... Activate all three Totems and I'll see you on the next simulator map!"); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage55, false, 0, true); } private function removeBlasterBubble(_arg1:Object=null):void{ mb.hide(true); } private function showMessage3(_arg1:Object=null):void{ mb.hide(true); GameSpace.instance.controlPanel.buildMenu.nodeButton.enabled = false; GameSpace.instance.controlPanel.onCancelButtonClick(); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = ((((((("[INSTRUCTOR]\n" + "Wonderful. You aren't totally worthless after all.\n\n") + "See that tech upgrade on the lower left of the map surrounded by a lovely pool of creeper? ") + "Well, go get it so we can obliterate some simulated Creeper. Use your Relays to avoid the Creeper ") + "for now. We wouldn't want you to get hurt just yet would we?\n\n") + "Remember that Relays can form long range connections ONLY WITH OTHER RELAYS. I know you flunked this ") + "question on your academy entrance exam... here is your chance to show you've learned. Build a Relay next ") + "to the tech upgrade and then build another Relay to connect to your Collector network."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage35, false, 0, true); } private function showBubble3(_arg1:Object=null):void{ mb = new MessageBubble(30, 150, 130, 310, 150); mb.textField.text = "Build Relays to collect this tech upgrade."; mb.show(); var _local2:MessageBubble = new MessageBubble(450, 250, 375, 490, 200); _local2.textField.text = "Click the Cancel button when you are done building. This will clear your current build selection."; _local2.showTimed(15000); GameSpace.instance.controlPanel.cancelButton.addEventListener(MouseEvent.CLICK, _local2.hide, false, 1, true); } private function showMessage35(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 500, -1, true); md.textField.text = ((("[TRAINING SIMULATOR]\n" + "ACQUIRE BLASTER TECH UPGRADE NEAR BOTTOM LEFT OF MAP.\n") + "USE RELAYS TO REACH THE UPGRADE.\n") + "DO NOT ATTEMPT TO ENGAGE THE CREEPER."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage351, false, 0, true); } } }//package com.wbwar.creeper.games
Section 56
//TrainingGame0_gameData (com.wbwar.creeper.games.TrainingGame0_gameData) package com.wbwar.creeper.games { import mx.core.*; public class TrainingGame0_gameData extends ByteArrayAsset { } }//package com.wbwar.creeper.games
Section 57
//TrainingGame1 (com.wbwar.creeper.games.TrainingGame1) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; import flash.events.*; public class TrainingGame1 extends Game { private var gameStarted:Boolean; private var arrowGS:PulsingArrowGameSpace; private var md:MessageDialog; private var arrow:PulsingArrow; public static var title:String = "Cells"; public static var gameData:Class = TrainingGame1_gameData; public function TrainingGame1(){ xml = new XML(new gameData()); } private function showMessage3(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 500, -1, true); md.textField.text = (((("[TRAINING SIMULATOR]\n" + "ACQUIRE TECH UPGRADE.\n") + "USER MORTARS TO BOMBARD POOLS.\n") + "USER BLASTERS TO APPROACH TOTEMS.\n") + "ACTIVATE ALL THREE TOTEMS."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage4, false, 0, true); } private function createProducers(_arg1:Object=null):void{ var _local2:GlopProducer; enableGame(); _local2 = new GlopProducer(10, 0); _local2.productionBaseAmt = 2; _local2.productionInterval = 125; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(35, 0); _local2.productionBaseAmt = 2; _local2.productionInterval = 125; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(60, 0); _local2.productionBaseAmt = 2; _local2.productionInterval = 125; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); } private function showMessage1(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = (((("[INSTRUCTOR]\n" + "Lieutenant..... I.... \n") + "I just got news that my home world of Corvus has fallen to the Creeper. It came a week before it was expected. My family... I don't ") + "know if they made it out or not. I've got to take a shuttle and find out... if there is any chance they are still..., there might still be time ") + "for me to get them out.\n\n"); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage2, false, 0, true); } private function showMessage2(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = ((("[INSTRUCTOR]\n" + "You are on your own to finish the training missions. I've enabled all of the simulated techs that the Old Man gave us. I'm not even really ") + "sure how to best use some of it.... but something tells me you'll figure it out.\n\n") + "Good luck Lieutenant, you have the makings of a fine Commander... don't let me down."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage3, false, 0, true); } override public function update():void{ super.update(); if (!gameStarted){ return; }; if (updateCount == 20){ showMessage1(); }; } override public function gameStart():void{ super.gameStart(); gameStarted = true; updateCount = 0; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.paused = false; GameSpace.instance.controlPanel.buildMenu.nodeButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = true; new Tech(35, 30, Tech.TECH_AREAGUN); disableGame(); Creeper.instance.gameScreen.playGameMusic(0, 1); } private function showMessage4(_arg1:Object=null):void{ var _local2:MessageBubble = new MessageBubble(50, 100, 345, 290, 250); _local2.textField.text = "Collect this Tech upgrade so you can build Mortars. Also be sure to build a large network of Collectors to provide all of the energy you will need!"; _local2.showTimed(20000); _local2.addEventListener(MouseEvent.CLICK, _local2.hide, false, 0, true); var _local3:MessageBubble = new MessageBubble(400, 100, 365, 290, 250); _local3.textField.text = "Mortars are great against pools of Creeper. They auto target the deepest Creeper in range."; _local3.showTimed(25000); _local3.addEventListener(MouseEvent.CLICK, _local3.hide, false, 0, true); createProducers(); } } }//package com.wbwar.creeper.games
Section 58
//TrainingGame1_gameData (com.wbwar.creeper.games.TrainingGame1_gameData) package com.wbwar.creeper.games { import mx.core.*; public class TrainingGame1_gameData extends ByteArrayAsset { } }//package com.wbwar.creeper.games
Section 59
//TrainingGame2 (com.wbwar.creeper.games.TrainingGame2) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; public class TrainingGame2 extends Game { private var gameStarted:Boolean; private var arrowGS:PulsingArrowGameSpace; private var md:MessageDialog; private var arrow:PulsingArrow; public static var title:String = "Action"; public static var gameData:Class = TrainingGame2_gameData; public function TrainingGame2(){ xml = new XML(new gameData()); } private function createProducers(_arg1:Object=null):void{ var _local2:GlopProducer; enableGame(); _local2 = new GlopProducer(2, 45); _local2.productionBaseAmt = 2; _local2.productionInterval = 100; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(8, 4); _local2.productionBaseAmt = 1; _local2.productionInterval = 75; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(43, 3); _local2.productionBaseAmt = 3; _local2.productionInterval = 75; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); } private function showMessage1(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 500, -1, true); md.textField.text = (((("[TRAINING SIMULATOR]\n" + "ACQUIRE TECH UPGRADES.\n") + "USE ENERGY STORAGE TO BUFFER LARGE ENRGY RESERVES.\n") + "USE SPEED TO INCREASE PACKET SPEED.\n\n") + "ACTIVATE TOTEMS."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, createProducers, false, 0, true); } override public function update():void{ super.update(); if (!gameStarted){ return; }; if (updateCount == 20){ showMessage1(); }; } override public function gameStart():void{ super.gameStart(); gameStarted = true; updateCount = 0; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.paused = false; GameSpace.instance.controlPanel.buildMenu.nodeButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = true; new Tech(46, 40, Tech.TECH_ENERGYSTORAGE); new Tech(33, 12, Tech.TECH_LOGISTICS); disableGame(); Creeper.instance.gameScreen.playGameMusic(0, 1); } } }//package com.wbwar.creeper.games
Section 60
//TrainingGame2_gameData (com.wbwar.creeper.games.TrainingGame2_gameData) package com.wbwar.creeper.games { import mx.core.*; public class TrainingGame2_gameData extends ByteArrayAsset { } }//package com.wbwar.creeper.games
Section 61
//TrainingGame3 (com.wbwar.creeper.games.TrainingGame3) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; public class TrainingGame3 extends Game { private var gameStarted:Boolean; private var arrowGS:PulsingArrowGameSpace; private var md:MessageDialog; private var arrow:PulsingArrow; public static var title:String = "The Mount"; public static var gameData:Class = TrainingGame3_gameData; public function TrainingGame3(){ xml = new XML(new gameData()); } private function createProducers(_arg1:Object=null):void{ var _local2:GlopProducer; enableGame(); _local2 = new GlopProducer(45, 10); _local2.productionBaseAmt = 1.5; _local2.productionInterval = 50; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); var _local3:GlopBlobProducer = new GlopBlobProducer(); var _local4:GlopBlobProducerWave = new GlopBlobProducerWave(8640, 2, 1, 72, 0.2, GlopBlobProducerWave.SIDE_TOP); _local3.waves.push(_local4); _local4 = new GlopBlobProducerWave(6480, 3, 1, 72, 0.2, GlopBlobProducerWave.SIDE_TOP); _local3.waves.push(_local4); GameSpace.instance.glopBlobProducer = _local3; } private function showMessage1(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = (((("[TRAINING SIMULATOR]\n" + "ACQUIRE TECH UPGRADES.\n") + "USE ABM TO DEFEND AGAINST AERIAL SPORES.\n") + "USE REACTORS TO PRODUCE MORE ENERGY.\n\n") + "ACTIVATE TOTEMS."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, createProducers, false, 0, true); } override public function update():void{ super.update(); if (!gameStarted){ return; }; if (updateCount == 20){ showMessage1(); }; } override public function gameStart():void{ super.gameStart(); gameStarted = true; updateCount = 0; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.paused = false; GameSpace.instance.controlPanel.buildMenu.nodeButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = true; new Tech(2, 35, Tech.TECH_ENERGYAMP); new Tech(34, 46, Tech.TECH_ABM); var _local1:Ruin = new Ruin(10, 22); _local1.md.textField.text = ((("[TRAINING SIMULATOR]\n" + "REMEMBER YOUR TRAINING. BLASTERS WILL NOT FIRE AT TERRAIN HIGHER THAN THEMSELVES. ") + "TO ASSAULT A HILL YOU WILL HAVE TO MOVE BLASTERS DIRECTLY INTO THE CREEPER MOMENTARILY. ") + "WEAPONS CAN TAKE SOME DAMAGE BEFORE BEING DESTROYED. DO NOT YIELD TO THE CREEPER."); disableGame(); Creeper.instance.gameScreen.playGameMusic(0, 1); } } }//package com.wbwar.creeper.games
Section 62
//TrainingGame3_gameData (com.wbwar.creeper.games.TrainingGame3_gameData) package com.wbwar.creeper.games { import mx.core.*; public class TrainingGame3_gameData extends ByteArrayAsset { } }//package com.wbwar.creeper.games
Section 63
//TrainingGame4 (com.wbwar.creeper.games.TrainingGame4) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; public class TrainingGame4 extends Game { private var gameStarted:Boolean; private var arrowGS:PulsingArrowGameSpace; private var md:MessageDialog; private var arrow:PulsingArrow; public static var title:String = "The Bowl"; public static var gameData:Class = TrainingGame4_gameData; public function TrainingGame4(){ xml = new XML(new gameData()); } private function createProducers(_arg1:Object=null):void{ var _local2:GlopProducer; enableGame(); _local2 = new GlopProducer(7, 0); _local2.productionBaseAmt = 2; _local2.productionInterval = 20; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(35, 0); _local2.productionBaseAmt = 2; _local2.productionInterval = 30; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(62, 0); _local2.productionBaseAmt = 2; _local2.productionInterval = 20; _local2.startTime = 50; GameSpace.instance.addGlopProducer(_local2); var _local3:GlopBlobProducer = new GlopBlobProducer(); var _local4:GlopBlobProducerWave = new GlopBlobProducerWave(8640, 2, 1, 72, 0.2, GlopBlobProducerWave.SIDE_TOP); _local3.waves.push(_local4); GameSpace.instance.glopBlobProducer = _local3; } private function showMessage1(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 500, -1, true); md.textField.text = (((("[TRAINING SIMULATOR]\n" + "ACQUIRE TECH UPGRADE.\n") + "USE DRONES TO ASSIST BLASTER ASSAULTS.\n") + "DO NOT ALLOW CREEPER TO FLOOD LOWER PLAIN.\n") + "ACTIVATE TOTEMS."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, createProducers, false, 0, true); } override public function update():void{ super.update(); if (!gameStarted){ return; }; if (updateCount == 20){ showMessage1(); }; } override public function gameStart():void{ super.gameStart(); gameStarted = true; updateCount = 0; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.paused = false; GameSpace.instance.controlPanel.buildMenu.nodeButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = true; new Tech(35, 23, Tech.TECH_DRONEBASE); var _local1:Ruin = new Ruin(35, 30); _local1.md.textField.text = ((("[TRAINING SIMULATOR]\n" + "USE ALL OF YOUR SKILLS AND KNOWLEDGE TO DEFEAT THE CREEPER. ") + "BUILD YOUR INFRASTRUCTURE, BUT DO NOT WAIT TOO LONG TO ATTACK. ") + "AN UNKNOWN WEAPON REFERRED TO AS 'DRONES' MAY ASSIST YOUR EFFORTS."); disableGame(); Creeper.instance.gameScreen.playGameMusic(0, 1); } } }//package com.wbwar.creeper.games
Section 64
//TrainingGame4_gameData (com.wbwar.creeper.games.TrainingGame4_gameData) package com.wbwar.creeper.games { import mx.core.*; public class TrainingGame4_gameData extends ByteArrayAsset { } }//package com.wbwar.creeper.games
Section 65
//TrainingGame99 (com.wbwar.creeper.games.TrainingGame99) package com.wbwar.creeper.games { import com.wbwar.creeper.*; import com.wbwar.creeper.util.*; import flash.events.*; public class TrainingGame99 extends Game { private var arrow:PulsingArrow; private var mb:MessageBubble; private var tech:Tech; private var md:MessageDialog; private var message6time:Number; private var message6shown:Boolean; private var gameStarted:Boolean; public var prelude:Prelude; private var arrowGS:PulsingArrowGameSpace; private var gotBlasterTech:Boolean; private var metEnergyRequirements:Boolean; public static var title:String = "Tutorial"; public static var gameData:Class = TrainingGame99_gameData; public function TrainingGame99(){ xml = new XML(new gameData()); } private function showMessage18(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 650, -1, true); md.textField.text = ("[Knuckle Cracker]\n" + "There are three Rift Totems in the upper left hand corner of the map. We need to hook these Totems up to our network..."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage19, false, 0, true); } private function showMessage10(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = (("[Knuckle Cracker]\n" + "The 'Collection' bar is how much energy you are producing. The 'Depletion' bar is how much energy you are using. When you have things ") + "that need energy but they can't get it.... then you get starvation indicated by the 'Starvation' bar. Try to keep this bar low."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage11, false, 0, true); } private function showMessage11(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = ("[Knuckle Cracker]\n" + "Lastly, the biggest bar 'Energy' is how much energy you currently have in Odin City's reserves. This is basically your stockpile of energy."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage12, false, 0, true); } private function showMessage14(_arg1:Object=null):void{ md.hide(true); GameSpace.instance.controlPanel.removeEventListener("ControlPanel_Cancel", showMessage14); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = ("[Knuckle Cracker]\n" + "Our Blasters will all arm as Odin City supplies ammunition packets. Time for some Creeper to feel our wrath!"); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage15, false, 0, true); } private function showMessage15(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, false); md.textField.text = ("[Knuckle Cracker]\n" + "One of our Blasters should be moved to the south. Click the Blaster I have pointed out and move it to the location indicated."); md.show(); arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 275; arrowGS.y = 335; GameSpace.instance.places.onlyLegalX = 27; GameSpace.instance.places.onlyLegalY = 33; mb = new MessageBubble(420, 170, 325, 265, 200); mb.textField.text = "Click this Blaster to select it and move it where indicated."; mb.show(); GameSpace.instance.places.addEventListener("PLACES_MOVE", showMessage16, false, 0, true); } private function showMessage16(_arg1:Object=null):void{ md.hide(true); mb.hide(true); arrowGS.remove(); GameSpace.instance.places.removeEventListener("PLACES_MOVE", showMessage16); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = ((((("[Knuckle Cracker]\n" + "Sweet.... Those Blasters will sure vaporize that Creeper.\n\n") + "But you know what? The Creeper isn't going to give in. It never does. It destroyed thousands ") + "of our worlds and we were helpless in its path. Odin City is the last refuge for Humanity... and ") + "our only hope is to flee... to travel from world to world. The Creeper will hunt us, but we must survive ") + "long enough to activate the Jump Rift and move the city to the next world."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage17, false, 0, true); } private function showMessage20(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 650, -1, false); md.textField.text = ((("[Knuckle Cracker]\n" + "There isn't much time left now.\n") + "Build a Relay where I have indicated. Relays don't produce energy but they are a great way to extend your network over greater ") + "distances. Relays can only connect over a long distance to other Relays, but there is already one built near the Totems."); md.show(); GameSpace.instance.controlPanel.buildMenu.nodeButton.enabled = false; GameSpace.instance.controlPanel.buildMenu.relayButton.enabled = true; arrow = new PulsingArrow(); arrow.rotation = 135; arrow.scaleX = 1.5; arrow.scaleY = arrow.scaleX; arrow.x = 105; arrow.y = 480; arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 285; arrowGS.y = 75; GameSpace.instance.places.onlyLegalX = 28; GameSpace.instance.places.onlyLegalY = 7; GameSpace.instance.places.addEventListener(Relay.EVENT_PLACED, showMessage21, false, 0, true); } private function showMessage19(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 650, -1, true); md.textField.text = (("[Knuckle Cracker]\n" + "When we connect them, Odin City will supply Rift energy packets to each Totem and activate the Rift. When this happens, we can ") + "escape to safety."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage20, false, 0, true); } private function createProducers(_arg1:Object=null):void{ var _local2:GlopProducer; enableGame(); GameSpace.instance.controlPanel.buildMenu.relayButton.enabled = false; _local2 = new GlopProducer(0, 47); _local2.productionBaseAmt = 1; _local2.productionInterval = 50; _local2.startTime = 100; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(20, 47); _local2.productionBaseAmt = 1; _local2.productionInterval = 50; _local2.startTime = 100; GameSpace.instance.addGlopProducer(_local2); _local2 = new GlopProducer(0, 30); _local2.productionBaseAmt = 1; _local2.productionInterval = 50; _local2.startTime = 100; GameSpace.instance.addGlopProducer(_local2); } private function showMessage6(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, false); md.textField.text = (("[Knuckle Cracker]\n" + "Click the Collector button in your command bar at the bottom left of the screen. Then ") + "click where I have highlighted to build the Collector."); md.show(); arrow = new PulsingArrow(); arrow.rotation = 135; arrow.scaleX = 1.5; arrow.scaleY = arrow.scaleX; arrow.x = 45; arrow.y = 480; arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 425; arrowGS.y = 345; GameSpace.instance.places.onlyLegalX = 42; GameSpace.instance.places.onlyLegalY = 34; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage7, false, 0, true); } override public function gameStart():void{ super.gameStart(); } override public function update():void{ super.update(); if (!gameStarted){ return; }; if (updateCount == 20){ showMessage1(); }; } private function showMessage13(_arg1:Object=null):void{ md.hide(true); arrow.remove(); arrowGS.remove(); GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage13); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, false); md.textField.text = ("[Knuckle Cracker]\n" + "Excellent.... Btw, click the 'Cancel' button now to clear your current build selection."); md.show(); GameSpace.instance.controlPanel.addEventListener("ControlPanel_Cancel", showMessage14, false, 1, true); } private function showMessage21(_arg1:Object=null):void{ GameSpace.instance.controlPanel.buildMenu.nodeButton.enabled = true; md.hide(true); arrow.remove(); arrowGS.remove(); GameSpace.instance.controlPanel.onCancelButtonClick(); GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage21); GameSpace.instance.places.onlyLegalX = -1; GameSpace.instance.places.onlyLegalY = -1; md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 650, -1, false); md.textField.text = ("[Knuckle Cracker]\n" + "Perfect. When the Totems charge we are outa' here!"); md.show(); } private function showMessage1(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = (("[Knuckle Cracker]\n" + "Welcome to Creeper World: Training Sim!\n\n") + "You're gonna love this....\n "); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage2, false, 0, true); createProducers(); } public function actualGameStart():void{ super.gameStart(); gameStarted = true; updateCount = 0; GameSpace.instance.updateCount = 0; GameSpace.instance.elapsedTime = 0; GameSpace.instance.paused = false; GameSpace.instance.controlPanel.buildMenu.nodeButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = true; GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = true; disableGame(); Creeper.instance.gameScreen.playGameMusic(0, 1); GameSpace.instance.controlPanel.buildMenu.relayButton.enabled = false; } private function showMessage5(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = ((("[Knuckle Cracker]\n" + "There is a giant farm of energy Collectors that are already built. They are all to the North of Odin City. ") + "But, unfortunately they are all currently disconnected from our great city!\n\n") + "We need to build a Collector that will hook up Odin City to this powerful network. Once we do this, we will have lots of energy."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage6, false, 0, true); } override public function gameSpaceStarted():void{ super.gameSpaceStarted(); prelude = new Prelude(this); GameSpace.instance.addChild(prelude); GameSpace.instance.paused = true; } private function showMessage3(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = ((("[Knuckle Cracker]\n" + "Fortunately, you have a powerful arsenal with units that can be moved once built. Last but not least, you have ") + "the super powerful Odin City to power everything. She is a mighty beast, and the home for the last remnants of the ") + "once great and bountiful Human empire. She gives you what you need but you must always protect her..."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage4, false, 0, true); } private function showMessage12(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, false); md.textField.text = ((("[Knuckle Cracker]\n" + "Now that you understand the basic economy on to weapons!\n\n") + "There are already some prebuilt Blasters on this map. All we need to do is build a Collector to connect them to our network and they ") + "will all arm. Build a collector where I have indicated."); md.show(); arrow = new PulsingArrow(); arrow.rotation = 135; arrow.scaleX = 1.5; arrow.scaleY = arrow.scaleX; arrow.x = 45; arrow.y = 480; arrowGS = new PulsingArrowGameSpace(); arrowGS.x = 345; arrowGS.y = 245; GameSpace.instance.places.onlyLegalX = 34; GameSpace.instance.places.onlyLegalY = 24; GameSpace.instance.places.addEventListener(Node.EVENT_PLACED, showMessage13, false, 0, true); } private function showMessage2(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = (("[Knuckle Cracker]\n" + "Creeper World is a Tower Defense game where the enemy is a thick goo that floods across the map. You'll need ") + "all of you skills to contain it as it slimes its way around hills, through valleys, and to your base."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage3, false, 0, true); } private function showMessage4(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = (((("[Knuckle Cracker]\n" + "Now, down to business....\n\n") + "Odin City is indicated below. \n") + "Right now Odin City is safe as she is up on a hill. The Creeper is already flooding in from the left...") + "But don't worry, it is safely below us for now."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage5, false, 0, true); var _local2:MessageBubble = new MessageBubble(500, 400, 470, 380, 200); _local2.textField.text = "This is Odin City. Protect it at all costs. She is our home."; _local2.showTimed(20000); _local2.addEventListener(MouseEvent.CLICK, _local2.hide, false, 0, true); } private function showMessage7(_arg1:Object=null):void{ md.hide(true); arrow.remove(); arrowGS.remove(); GameSpace.instance.controlPanel.onCancelButtonClick(); GameSpace.instance.places.removeEventListener(Node.EVENT_PLACED, showMessage7); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = (("[Knuckle Cracker]\n" + "Build packets will flow from Odin City to the Collector and once it is built, it will connect that huge set of existing ") + "Collectors to the City."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage8, false, 0, true); } private function showMessage8(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = ((("[Knuckle Cracker]\n" + "Note that some of the Collectors on the lower plain to the right have not been built yet. Odin City will supply packets ") + "to these unfinished Collectors once they are part of her network. As Collectors come online you see a green area ") + "appear around each one. This green area is the energy production area for the Collector."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage9, false, 0, true); } private function showMessage9(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 650, -1, true); md.textField.text = (("[Knuckle Cracker]\n" + "The more green you have, the more energy you produce. The more energy you produce, the more things you can build and the more ") + "weapons you can power. Watch the Collection graph in the lower right of the command bar as Collectors come online."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage10, false, 0, true); } private function showMessage17(_arg1:Object=null):void{ md = new MessageDialog(MessageDialog.SIDE_BOTTOM, -1, 650, -1, true); md.textField.text = ("[Knuckle Cracker]\n" + "So yeah... speaking of that Jump Rift. We need to activate it and get the city out of here before the Creeper gets too aggressive."); md.show(); md.addEventListener(MessageDialog.OK_CLICK, showMessage18, false, 0, true); } } }//package com.wbwar.creeper.games
Section 66
//TrainingGame99_gameData (com.wbwar.creeper.games.TrainingGame99_gameData) package com.wbwar.creeper.games { import mx.core.*; public class TrainingGame99_gameData extends ByteArrayAsset { } }//package com.wbwar.creeper.games
Section 67
//Score (com.wbwar.creeper.remote.Score) package com.wbwar.creeper.remote { import com.wbwar.creeper.util.*; import flash.events.*; import com.wbwar.creeper.games.*; import flash.net.*; public class Score { public static function submitScore(_arg1:String, _arg2:String, _arg3:Function, _arg4:Function):void{ var data:String; var igd:IndividualGameData; var i:int; var request:URLRequest; var loader:URLLoader; var user = _arg1; var group = _arg2; var submitComplete = _arg3; var errorComplete = _arg4; data = "1"; data = (data + "\n"); data = (data + user); data = (data + "\n"); data = (data + group); data = (data + "\n"); data = (data + "3"); data = (data + "\n"); var scores = ""; var playCounts = ""; i = 0; while (i < Game.TRAINING_GAME_COUNT) { igd = GameData.getTrainingGameData(i); scores = (scores + igd.highScore); playCounts = (playCounts + igd.playCount); if (i < (Game.TRAINING_GAME_COUNT - 1)){ scores = (scores + ","); playCounts = (playCounts + ","); }; i = (i + 1); }; data = (data + scores); data = (data + "\n"); data = (data + playCounts); data = (data + "\n"); data = (data + MD5.hex_md5(data)); var edata:String = RC4.encrypt(data, RC4.decrypt("4890928b4e8152aadf996098b9", "spaceestate11")); var variables:URLVariables = new URLVariables(); variables.scoredata = edata; try { request = new URLRequest(); request.url = "http://knucklecracker.com/creeperworld/submitscoreweb.php"; request.data = variables; request.method = URLRequestMethod.POST; loader = new URLLoader(); loader.load(request); loader.addEventListener(Event.COMPLETE, submitComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, errorComplete); } catch(e:Error) { }; } } }//package com.wbwar.creeper.remote
Section 68
//AchievementsBox (com.wbwar.creeper.screens.AchievementsBox) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.geom.*; import flash.text.*; import flash.utils.*; public class AchievementsBox extends Sprite { private var titleText:TextField; private var _locked:Boolean; private var star:MovieClip; public static const STAR_RED:String = "red"; public static const STAR_BLUE:String = "blue"; public static const STAR_GOLD:String = "gold"; public static const TYPE_ALLTRAINING:String = "allTraining"; public static const TYPE_ALL:String = "all"; public static const STAR_GREEN:String = "green"; public static const TYPE_TRAINING:String = "training"; public function AchievementsBox(_arg1:String, _arg2:int=-1){ var starColor:String; var width:int; var height:int; var title:String; var type = _arg1; var mission = _arg2; super(); if (type == TYPE_TRAINING){ starColor = STAR_RED; } else { starColor = STAR_GOLD; }; if (type == TYPE_TRAINING){ try { title = getDefinitionByName(("com.wbwar.creeper.games.TrainingGame" + mission))["title"]; } catch(e:Error) { title = "???"; }; width = 130; height = 25; } else { if (type == TYPE_ALLTRAINING){ title = "Graduate"; width = 170; height = 25; scaleX = 1.3; scaleY = scaleX; } else { title = "Supreme Victory"; width = 150; height = 25; scaleX = 3; scaleY = scaleX; }; }; var matr:Matrix = new Matrix(); matr.createGradientBox(width, height, (Math.PI / 4)); graphics.beginGradientFill(GradientType.LINEAR, [0xA0A0A0, 0x707070], [1, 1], [0, 0xFF], matr); graphics.lineStyle(2, 0x404040); graphics.drawRect(0, 0, width, height); graphics.endFill(); if (starColor == STAR_RED){ star = new StarRed(); } else { if (starColor == STAR_GREEN){ star = new StarGreen(); } else { if (starColor == STAR_BLUE){ star = new StarBlue(); } else { if (starColor == STAR_GOLD){ star = new StarGold(); }; }; }; }; star.width = 23; star.height = 23; addChild(star); star.x = 15; star.y = 12; titleText = Text.text(title, 14, 0xFFFFFF); titleText.filters = [new DropShadowFilter()]; addChild(titleText); titleText.x = 25; titleText.y = 0; locked = true; } public function get locked():Boolean{ return (_locked); } public function set locked(_arg1:Boolean):void{ _locked = _arg1; if (_arg1){ alpha = 0.1; star.visible = false; } else { alpha = 1; star.visible = true; }; } } }//package com.wbwar.creeper.screens
Section 69
//AchievementsScreen (com.wbwar.creeper.screens.AchievementsScreen) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.text.*; public class AchievementsScreen extends Sprite { private var exitButton:Button; private var trainingBoxes:Array; private var allTrainingBox:AchievementsBox; private static var backgroundBitmap:Bitmap = (new backgroundImage() as Bitmap); public static var backgroundImage:Class = AchievementsScreen_backgroundImage; public function AchievementsScreen(){ var i:int; var ab:AchievementsBox; var more2Text:TextField; var logo:Logo; trainingBoxes = []; super(); addChild(backgroundBitmap); exitButton = new Button("Exit", 10, 75, 17, 0, 0, true, 12587024, 0); addChild(exitButton); exitButton.x = ((700 - 5) - exitButton.width); exitButton.y = 5; exitButton.addEventListener(MouseEvent.CLICK, function ():void{ Creeper.instance.gameScreen.showMainMenu(); }); allTrainingBox = new AchievementsBox(AchievementsBox.TYPE_ALLTRAINING); addChild(allTrainingBox); allTrainingBox.x = 240; allTrainingBox.y = 155; var deltaYBox = 30; var trainingBoxesX:int = int((700 / 2)); var trainingBoxesY = 200; i = 0; while (i < Game.TRAINING_GAME_COUNT) { ab = new AchievementsBox(AchievementsBox.TYPE_TRAINING, i); trainingBoxes.push(ab); addChild(ab); ab.x = (trainingBoxesX - 65); ab.y = (trainingBoxesY + (i * deltaYBox)); i = (i + 1); }; var titleText:TextField = Text.text("Training Accomplishments", 36, 0xFFFFFF); titleText.filters = [new GlowFilter(0x606060, 1, 8, 8, 2, 1)]; addChild(titleText); titleText.x = (350 - int((titleText.width / 2))); titleText.y = 50; var moreText:TextField = Text.text("Looking for more????", 22, 0xFFFFFF); moreText.filters = [new GlowFilter(0xFF, 1, 8, 8, 2, 1)]; addChild(moreText); moreText.x = (350 - int((moreText.width / 2))); moreText.y = 370; more2Text = Text.text("Visit KnuckleCracker.com and try the FREE demo for Creeper World!", 18, 0xFFFFFF); more2Text.filters = [new GlowFilter(0xFF, 1, 8, 8, 2, 1)]; addChild(more2Text); more2Text.x = (350 - int((more2Text.width / 2))); more2Text.y = 400; var more3Text:TextField = Text.text("20 Story, 25 Conquest, and 10 Special Ops missions!", 18, 0xFFFFFF); more3Text.filters = [new GlowFilter(0xFF, 1, 8, 8, 2, 1)]; addChild(more3Text); more3Text.x = (350 - int((more3Text.width / 2))); more3Text.y = 430; logo = new Logo(); addChild(logo); logo.y = 480; logo.x = 300; var arrowSprite:Sprite = new Sprite(); arrowSprite.mouseEnabled = false; addChild(arrowSprite); arrowSprite.graphics.lineStyle(4, 0xFFFFFF); ColorUtil.drawArrow(arrowSprite.graphics, 210, 480, 245, 480); ColorUtil.drawArrow(arrowSprite.graphics, 480, 480, 445, 480); } public function refresh():void{ var _local1:IndividualGameData; var _local2:int; var _local3:Boolean; GameData.load(); var _local4:AchievementsSnapshot = getSnapshot(); _local2 = 0; while (_local2 < Game.TRAINING_GAME_COUNT) { (trainingBoxes[_local2] as AchievementsBox).locked = !(_local4.training[_local2]); _local2++; }; allTrainingBox.locked = !(_local4.allTraining); } public static function getSnapshot():AchievementsSnapshot{ var _local2:IndividualGameData; var _local3:int; var _local4:int; var _local5:Boolean; var _local1:AchievementsSnapshot = new AchievementsSnapshot(); GameData.load(); _local3 = 0; while (_local3 < Game.TRAINING_GAME_COUNT) { _local2 = GameData.getTrainingGameData(_local3); _local1.training[_local3] = (_local2.highScore > 0); _local3++; }; return (_local1); } } }//package com.wbwar.creeper.screens
Section 70
//AchievementsScreen_backgroundImage (com.wbwar.creeper.screens.AchievementsScreen_backgroundImage) package com.wbwar.creeper.screens { import mx.core.*; public class AchievementsScreen_backgroundImage extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 71
//AchievementsSnapshot (com.wbwar.creeper.screens.AchievementsSnapshot) package com.wbwar.creeper.screens { public class AchievementsSnapshot { public var training:Array; public function AchievementsSnapshot(){ training = []; super(); } public function get all():Boolean{ return (allTraining); } public function get allTraining():Boolean{ var _local1:int; while (_local1 < 6) { if (training[_local1] == false){ return (false); }; _local1++; }; return (true); } public function getTrainingDifference(_arg1:AchievementsSnapshot):int{ var _local2:int; while (_local2 < 6) { if (((_arg1.training[_local2]) && (!(training[_local2])))){ return (_local2); }; _local2++; }; return (-1); } } }//package com.wbwar.creeper.screens
Section 72
//BBLogo (com.wbwar.creeper.screens.BBLogo) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.net.*; public class BBLogo extends Sprite { public static var bbImage:Class = BBLogo_bbImage; private static var bbBitmap:Bitmap = (new bbImage() as Bitmap); public function BBLogo(){ addChild(bbBitmap); filters = [new DropShadowFilter()]; buttonMode = true; useHandCursor = true; addEventListener(MouseEvent.CLICK, onMouseClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); } private function onMouseOut(_arg1:Event):void{ ColorUtil.normalColor(this, 1); } private function onMouseClick(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://bubblebox.com?referrer=CreeperWorld"); navigateToURL(_local2, "_blank"); ColorUtil.normalColor(this, 3); MochiBot.track(this, "04e79bbb"); } private function onMouseOver(_arg1:Event):void{ ColorUtil.brighterColor(this, 1); } } }//package com.wbwar.creeper.screens
Section 73
//BBLogo_bbImage (com.wbwar.creeper.screens.BBLogo_bbImage) package com.wbwar.creeper.screens { import mx.core.*; public class BBLogo_bbImage extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 74
//Credits (com.wbwar.creeper.screens.Credits) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.text.*; import caurina.transitions.*; public class Credits extends Sprite { private var started:Boolean; private var currentSS:int; private var titles:Array; private var currentTitle:int; private var others:Sprite; private var titleText:TextField; private var ss:Array; private var exitButton:Button; private var othersText:TextField; private static var ss10Bitmap:Bitmap = (new ssImage10() as Bitmap); private static var ss12Bitmap:Bitmap = (new ssImage12() as Bitmap); private static var ss14Bitmap:Bitmap = (new ssImage14() as Bitmap); private static var ss16Bitmap:Bitmap = (new ssImage16() as Bitmap); private static var ss2Bitmap:Bitmap = (new ssImage2() as Bitmap); private static var ss4Bitmap:Bitmap = (new ssImage4() as Bitmap); private static var ss6Bitmap:Bitmap = (new ssImage6() as Bitmap); private static var ss8Bitmap:Bitmap = (new ssImage8() as Bitmap); private static var titleBitmap:Bitmap = (new MainMenu.titleImage() as Bitmap); public static var ssImage1:Class = Credits_ssImage1; public static var ssImage2:Class = Credits_ssImage2; public static var ssImage3:Class = Credits_ssImage3; public static var ssImage4:Class = Credits_ssImage4; public static var ssImage10:Class = Credits_ssImage10; public static var ssImage11:Class = Credits_ssImage11; public static var ssImage12:Class = Credits_ssImage12; public static var ssImage8:Class = Credits_ssImage8; public static var ssImage9:Class = Credits_ssImage9; public static var ssImage15:Class = Credits_ssImage15; public static var ssImage5:Class = Credits_ssImage5; public static var ssImage7:Class = Credits_ssImage7; public static var ssImage14:Class = Credits_ssImage14; public static var ssImage16:Class = Credits_ssImage16; private static var ss11Bitmap:Bitmap = (new ssImage11() as Bitmap); private static var ss13Bitmap:Bitmap = (new ssImage13() as Bitmap); public static var ssImage6:Class = Credits_ssImage6; public static var ssImage13:Class = Credits_ssImage13; private static var ss15Bitmap:Bitmap = (new ssImage15() as Bitmap); private static var ss1Bitmap:Bitmap = (new ssImage1() as Bitmap); private static var ss3Bitmap:Bitmap = (new ssImage3() as Bitmap); private static var ss5Bitmap:Bitmap = (new ssImage5() as Bitmap); private static var ss7Bitmap:Bitmap = (new ssImage7() as Bitmap); private static var ss9Bitmap:Bitmap = (new ssImage9() as Bitmap); public function Credits(){ var creeperTextField:TextField; var othersBox:Sprite; titles = ["Game Concept", "Game Design", "Game Story", "Senior Developer(s)", "Developer(s)", "Testing Lead", "Windows Development", "Mac Development", "Documentation Lead", "Online Help", "Web Site", "IT Manager", "Network Engineer(s)", "Game Producer", "PR Specialist", "NCSU Graduate", "Chief Nit-Picker", "Lord of Detail", "Physics Degree Holder", "Finishing Refuser", "SciFi Lover", "Disbeliever", "Primary Worrier", "Comp. Science Degree Holder", "Doubter in Chief", "Schedule Misser", "Cricket Treat Getter", "ST(all), B5, FS, SG1, SGA, BSG Lover", "Obsessed", "Compulsive", "ChopRaider Maker", "Knuckle Cracker is:"]; super(); graphics.beginFill(0x303030); graphics.drawRect(0, 0, 700, 525); graphics.endFill(); exitButton = new Button("Exit", 10, 75, 17, 0, 0, true, 12587024, 0); addChild(exitButton); exitButton.x = ((700 - 5) - exitButton.width); exitButton.y = 5; exitButton.addEventListener(MouseEvent.CLICK, function ():void{ Creeper.instance.gameScreen.showMainMenu(); }); titleBitmap.filters = [new BlurFilter(16, 16)]; ColorUtil.bwColor(titleBitmap, 0); titleBitmap.alpha = 0.3; addChild(titleBitmap); creeperTextField = Text.text("Creeper World", 48, 5271807); creeperTextField.x = (350 - (creeperTextField.width / 2)); creeperTextField.y = 10; creeperTextField.filters = [new DropShadowFilter(), new BlurFilter(2, 2), new GlowFilter(0xFF, 1, 8, 8)]; addChild(creeperTextField); var vw:TextField = Text.text("Virgil Wall", 20, 0xFFFFFF); vw.filters = [new DropShadowFilter()]; addChild(vw); vw.x = (350 - (vw.width / 2)); vw.y = 175; titleText = Text.text("", 22, 0xFFFFFF); titleText.filters = [new DropShadowFilter()]; titleText.y = 140; addChild(titleText); ss = []; ss[0] = ss1Bitmap; ss[1] = ss2Bitmap; ss[2] = ss3Bitmap; ss[3] = ss4Bitmap; ss[4] = ss5Bitmap; ss[5] = ss6Bitmap; ss[6] = ss7Bitmap; ss[7] = ss8Bitmap; ss[8] = ss9Bitmap; ss[9] = ss10Bitmap; ss[10] = ss11Bitmap; ss[11] = ss12Bitmap; ss[12] = ss13Bitmap; ss[13] = ss14Bitmap; ss[14] = ss15Bitmap; ss[15] = ss16Bitmap; var i:int; while (i < ss.length) { addChild(ss[i]); ss[i].x = ((700 - 10) - 250); ss[i].y = ((525 - 10) - 250); ss[i].visible = false; ss[i].alpha = 0; i = (i + 1); }; othersBox = new Sprite(); addChild(othersBox); othersBox.x = 50; othersBox.y = 290; othersBox.graphics.lineStyle(1, 0xFFFFFF, 0.3); othersBox.graphics.moveTo(0, 0); othersBox.graphics.lineTo(300, 0); othersBox.graphics.moveTo(0, 149); othersBox.graphics.lineTo(300, 149); othersBox.scrollRect = new Rectangle(0, 0, 300, 150); others = new Sprite(); othersText = Text.text("", 12, 0xFFFFFF, TextFieldAutoSize.CENTER); othersText.cacheAsBitmap = true; othersText.multiline = true; othersText.htmlText = (((((((((((((((((((((((((((((((((((((((((((((("<body><p align='center'><br>" + "<font size='14' color='#90c0FF'>Awesome Title Music</font><br/>") + "'Arcadia' Kevin MacLeod (incompetech.com)<br><br><br><br>") + "<font size='14' color='#90c0FF'>Perfect Credits Music</font><br/>") + "'African Afternoon' (www.jimmyg.us)<br><br><br><br>") + "<font size='14' color='#90c0FF'>Milky Way Galaxy Image</font><br/>") + "NASA/JPL-Caltech<br><br><br><br>") + "<font size='14' color='#90c0FF'>Testers and Idea machines</font><br/>") + "April Wall<br/>") + "David Patterson [dpstuff.com]<br/>") + "Jason Walker [aristotlesaxis.com]<br/>") + "Rob Ward<br/>") + "Ricky Beam<br/>") + "Byron Hargett<br/>") + "Doug Hester<br/><br/><br/><br/><br/>") + "<font size='14' color='#90c0FF'>Special Dedication</font><br/>") + "April Wall<br/><br/><br/><br/><br/><br/><br/>") + "Words of wisdom:<br/><br/>") + "Diplomacy is the art of saying<br/>") + "'Nice doggie'<br/>") + "until you can find a rock.<br/><br/><br/><br/>") + "War is an art and as such is not susceptible<br/>") + "to explanation by fixed formula.<br/><br/><br/><br/>") + "Make your plans to fit the circumstances.<br/><br/><br/><br/>") + "Fear accompanies the possibility of death.<br/>") + "Calm shepherds its certainty.<br/><br/><br/><br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + ".<br/>") + "Still Watching?<br/><br/>") + "So how about those screen shots<br/>") + "to the right---------><br/><br/>") + "Those are from early stages of the game.<br/>") + "As you can see, in the beginning it didn't look<br/>") + "anything like it did in the end.<br/><br/><br/><br/>") + "But, the core idea was there from the beginning<br/><br/>") + "to<br/><br/>") + "the end!<br/><br/><br/><br/><br/><br/>"); othersBox.addChild(othersText); othersText.x = int(((300 / 2) - (othersText.width / 2))); othersText.y = 0; } private function stop():void{ started = false; Tweener.removeTweens(titleText); Tweener.removeTweens(othersText); } private function ssOut():void{ if (started){ Tweener.addTween(ss[currentSS], {delay:5, time:1, _autoAlpha:0, onComplete:nextSS}); }; } private function scrollOthers(_arg1:Event=null):void{ if (started){ othersText.y = 150; Tweener.addTween(othersText, {transition:"linear", time:130, y:-(othersText.height), onComplete:scrollOthers}); }; } private function nextSS():void{ if (started){ currentSS++; if (currentSS >= ss.length){ currentSS = 0; }; Tweener.addTween(ss[currentSS], {time:2, _autoAlpha:1, onComplete:ssOut}); }; } private function titleOut():void{ if (started){ Tweener.addTween(titleText, {delay:3, time:0.5, x:-(titleText.width), onComplete:nextTitle}); }; } private function start():void{ started = true; currentTitle = -1; nextTitle(); currentSS = -1; nextSS(); scrollOthers(); } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (_arg1){ start(); } else { stop(); }; } private function nextTitle():void{ if (started){ currentTitle++; if (currentTitle >= titles.length){ currentTitle = 0; }; titleText.text = titles[currentTitle]; titleText.x = 700; Tweener.addTween(titleText, {time:0.5, x:(350 - (titleText.width / 2)), onComplete:titleOut}); }; } } }//package com.wbwar.creeper.screens
Section 75
//Credits_ssImage1 (com.wbwar.creeper.screens.Credits_ssImage1) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage1 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 76
//Credits_ssImage10 (com.wbwar.creeper.screens.Credits_ssImage10) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage10 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 77
//Credits_ssImage11 (com.wbwar.creeper.screens.Credits_ssImage11) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage11 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 78
//Credits_ssImage12 (com.wbwar.creeper.screens.Credits_ssImage12) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage12 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 79
//Credits_ssImage13 (com.wbwar.creeper.screens.Credits_ssImage13) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage13 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 80
//Credits_ssImage14 (com.wbwar.creeper.screens.Credits_ssImage14) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage14 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 81
//Credits_ssImage15 (com.wbwar.creeper.screens.Credits_ssImage15) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage15 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 82
//Credits_ssImage16 (com.wbwar.creeper.screens.Credits_ssImage16) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage16 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 83
//Credits_ssImage2 (com.wbwar.creeper.screens.Credits_ssImage2) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage2 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 84
//Credits_ssImage3 (com.wbwar.creeper.screens.Credits_ssImage3) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage3 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 85
//Credits_ssImage4 (com.wbwar.creeper.screens.Credits_ssImage4) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage4 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 86
//Credits_ssImage5 (com.wbwar.creeper.screens.Credits_ssImage5) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage5 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 87
//Credits_ssImage6 (com.wbwar.creeper.screens.Credits_ssImage6) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage6 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 88
//Credits_ssImage7 (com.wbwar.creeper.screens.Credits_ssImage7) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage7 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 89
//Credits_ssImage8 (com.wbwar.creeper.screens.Credits_ssImage8) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage8 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 90
//Credits_ssImage9 (com.wbwar.creeper.screens.Credits_ssImage9) package com.wbwar.creeper.screens { import mx.core.*; public class Credits_ssImage9 extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 91
//DemoScreen (com.wbwar.creeper.screens.DemoScreen) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.net.*; public class DemoScreen extends Sprite { public function DemoScreen(){ var demoText2:TextField; var demoText3:TextField; var demoText4:TextField; var demoText5:TextField; var demoText6:TextField; super(); graphics.beginFill(0, 0.9); graphics.drawRect(0, 0, 700, 525); graphics.endFill(); var demoText:TextField = Text.text("Congratulations COMMANDER!\nYou have graduated training!", 44, 0xFF0000); demoText.filters = [new DropShadowFilter(), new GlowFilter(0xA0A0A0, 1, 32, 32, 4, BitmapFilterQuality.MEDIUM)]; addChild(demoText); demoText.x = (350 - (demoText.width / 2)); demoText.y = 50; demoText2 = Text.text("Continue the journey in the FREE demo at KnuckleCracker.com!", 18, 0xD0D0D0); demoText2.filters = [new DropShadowFilter(), new GlowFilter(0xA0A0A0, 1, 32, 32, 4, BitmapFilterQuality.MEDIUM)]; addChild(demoText2); demoText2.x = (350 - (demoText2.width / 2)); demoText2.y = 200; demoText3 = Text.text("20 Story, 25 Conquest, and 10 Special Ops missions await.", 18, 0xD0D0D0); demoText3.filters = [new DropShadowFilter(), new GlowFilter(0xA0A0A0, 1, 32, 32, 4, BitmapFilterQuality.MEDIUM)]; addChild(demoText3); demoText3.x = (350 - (demoText3.width / 2)); demoText3.y = 240; demoText4 = Text.text("More music, more action, more fun... even play full screen...", 18, 0xD0D0D0); demoText4.filters = [new DropShadowFilter(), new GlowFilter(0xA0A0A0, 1, 32, 32, 4, BitmapFilterQuality.MEDIUM)]; addChild(demoText4); demoText4.x = (350 - (demoText4.width / 2)); demoText4.y = 280; demoText5 = Text.text("Create, play, and share your own maps with the FREE Map Editor!", 18, 0xD0D0D0); demoText5.filters = [new DropShadowFilter(), new GlowFilter(0xA0A0A0, 1, 32, 32, 4, BitmapFilterQuality.MEDIUM)]; addChild(demoText5); demoText5.x = (350 - (demoText5.width / 2)); demoText5.y = 320; demoText6 = Text.text("Get the FREE demo now at KnuckleCracker.com!", 22, 0xD0D0D0); demoText6.filters = [new DropShadowFilter(), new GlowFilter(0xA0A0A0, 1, 32, 32, 4, BitmapFilterQuality.MEDIUM)]; addChild(demoText6); demoText6.x = (350 - (demoText6.width / 2)); demoText6.y = 370; var bb:Button = new Button("Visit KnuckleCracker.com!", 20, 300, 30, 0, 0, true, 0x8000, -1); bb.filters = [new GlowFilter(3178560, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(bb); bb.x = (350 - (bb.width / 2)); bb.y = 430; bb.addEventListener(MouseEvent.CLICK, onBBClick); var exitButton:Button = new Button("Exit", 10, 75, 17, 0, 0, true, 12587024, 0); addChild(exitButton); exitButton.x = ((700 - 5) - exitButton.width); exitButton.y = 5; exitButton.addEventListener(MouseEvent.CLICK, function ():void{ visible = false; }); } private function onBBClick(_arg1:MouseEvent=null):void{ var _local2:URLRequest = new URLRequest("http://knucklecracker.com?cwts=finished"); navigateToURL(_local2, "_blank"); Creeper.instance.mochiBotVisitKC(); } } }//package com.wbwar.creeper.screens
Section 92
//GameScreen (com.wbwar.creeper.screens.GameScreen) package com.wbwar.creeper.screens { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.text.*; import flash.media.*; import flash.utils.*; import caurina.transitions.*; public class GameScreen extends Sprite { private var resultsScreen:ResultsScreen; private var _gameMusicVolume:Number;// = 0.5 private var launchGameData:Object; private var credits:Credits; private var gameMusicFinishTrack:int; private var creditsMusic:Sound; private var achievementsScreen:AchievementsScreen; private var mainMenu:MainMenu; private var mainMusicSC:SoundChannel; private var creditsMusicSC:SoundChannel; private var gameMusicCurrentTrack:int; private var gameMusicStartTrack:int; private var gameSpace:GameSpace; private var gameMusic:Array; private var loadingGameScreen:Sprite; public var gameMusicPlaying:Boolean; private var trainingMissionSelection:TrainingMissionSelection; private var gameMusicSC:SoundChannel; private var mainMusic:Sound; public function GameScreen(){ mainMusic = new MusicSwampMists(); creditsMusic = new MusicAfricanAfternoon(); gameMusic = []; gameMusic[0] = new MusicOgzTheme(); gameMusic[1] = new MusicTakeFlight(); mainMenu = new MainMenu(); addChild(mainMenu); credits = new Credits(); addChild(credits); trainingMissionSelection = new TrainingMissionSelection(); addChild(trainingMissionSelection); achievementsScreen = new AchievementsScreen(); addChild(achievementsScreen); resultsScreen = new ResultsScreen(); addChild(resultsScreen); showMainMenu(); loadingGameScreen = new Sprite(); loadingGameScreen.graphics.beginFill(0); loadingGameScreen.graphics.drawRect(0, 0, 700, 525); loadingGameScreen.graphics.endFill(); loadingGameScreen.visible = false; var _local1:TextField = Text.text("Loading Mission...", 24, 0); _local1.filters = [new GlowFilter(0xFFFFFF, 1, 4, 4, 3)]; loadingGameScreen.addChild(_local1); _local1.x = (350 - (_local1.width / 2)); _local1.y = 200; GameData.load(); gameMusicVolume = GameData.musicVolume; } public function showResultsScreen(_arg1:Boolean=false):void{ mainMenu.visible = false; credits.visible = false; trainingMissionSelection.visible = false; achievementsScreen.visible = false; resultsScreen.returnToGameMode = _arg1; if (_arg1){ if (gameSpace != null){ gameSpace.visible = false; gameSpace.paused = true; }; } else { stopGameMusic(); stopCreditsMusic(); if (gameSpace != null){ gameSpace.finish(); removeChild(gameSpace); gameSpace = null; }; }; resultsScreen.visible = true; } public function showAchievementsScreen():void{ mainMenu.visible = false; credits.visible = false; trainingMissionSelection.visible = false; achievementsScreen.visible = true; achievementsScreen.refresh(); resultsScreen.visible = false; if (gameSpace != null){ gameSpace.finish(); removeChild(gameSpace); gameSpace = null; }; stopGameMusic(); stopCreditsMusic(); if (mainMusicSC == null){ mainMusicSC = mainMusic.play(0, 99999); }; } public function showGame():void{ mainMenu.visible = false; credits.visible = false; trainingMissionSelection.visible = false; achievementsScreen.visible = false; resultsScreen.visible = false; if (gameSpace != null){ gameSpace.visible = true; gameSpace.paused = false; }; } public function startGameMusic():void{ if (!gameMusicPlaying){ gameMusicPlaying = true; playTrack(gameMusicCurrentTrack); }; } public function set gameMusicVolume(_arg1:Number):void{ var _local2:SoundTransform; _gameMusicVolume = _arg1; if (gameMusicSC != null){ _local2 = new SoundTransform(); _local2.volume = gameMusicVolume; gameMusicSC.soundTransform = _local2; }; } public function get gameMusicVolume():Number{ return (_gameMusicVolume); } private function onGameMusicTrackComplete(_arg1:Event):void{ gameMusicCurrentTrack++; if (gameMusicCurrentTrack > gameMusicFinishTrack){ gameMusicCurrentTrack = gameMusicStartTrack; }; playTrack(gameMusicCurrentTrack); } public function stopCreditsMusic():void{ if (creditsMusicSC != null){ creditsMusicSC.stop(); creditsMusicSC = null; }; } public function showMainMenu():void{ mainMenu.visible = true; credits.visible = false; trainingMissionSelection.visible = false; achievementsScreen.visible = false; resultsScreen.visible = false; if (gameSpace != null){ gameSpace.finish(); removeChild(gameSpace); gameSpace = null; }; mainMenu.show(); stopGameMusic(); stopCreditsMusic(); if (mainMusicSC == null){ mainMusicSC = mainMusic.play(0, 99999); }; } public function showCredits(_arg1:Event=null):void{ mainMenu.visible = false; trainingMissionSelection.visible = false; achievementsScreen.visible = false; resultsScreen.visible = false; if (gameSpace != null){ gameSpace.finish(); removeChild(gameSpace); gameSpace = null; }; stopGameMusic(); stopCreditsMusic(); if (mainMusicSC != null){ mainMusicSC.stop(); mainMusicSC = null; }; if (creditsMusicSC == null){ creditsMusicSC = creditsMusic.play(0, 99999); }; credits.visible = true; } public function toggleGameMusic():void{ if (gameMusicPlaying){ stopGameMusic(); } else { startGameMusic(); }; } public function launchGame(_arg1:Game, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:int):void{ var game = _arg1; var storyGame = _arg2; var conquestGame = _arg3; var specialGame = _arg4; var gameNumber = _arg5; if (gameNumber == 0){ MochiBot.track(this, "f200a208"); } else { if (gameNumber == 1){ MochiBot.track(this, "cafb974b"); } else { if (gameNumber == 2){ MochiBot.track(this, "308010b3"); } else { if (gameNumber == 3){ MochiBot.track(this, "56089252"); } else { if (gameNumber == 4){ MochiBot.track(this, "30a61e5e"); }; }; }; }; }; if (mainMusicSC != null){ Tweener.addTween(mainMusicSC, {time:1.5, transition:"linear", _sound_volume:0, onComplete:function ():void{ mainMusicSC.stop(); mainMusicSC = null; }}); }; mainMenu.visible = false; credits.visible = false; trainingMissionSelection.visible = false; achievementsScreen.visible = false; resultsScreen.visible = false; if (gameSpace != null){ gameSpace.finish(); removeChild(gameSpace); gameSpace = null; }; launchGameData = {}; launchGameData.game = game; launchGameData.gameNumber = gameNumber; addChild(loadingGameScreen); loadingGameScreen.visible = true; var t:Timer = new Timer(50, 1); t.addEventListener(TimerEvent.TIMER, onGameTimerStart); t.start(); } private function onGameTimerStart(_arg1:TimerEvent=null):void{ gameSpace = new GameSpace(); gameSpace.gameNumber = launchGameData.gameNumber; addChild(gameSpace); gameSpace.loadGame(launchGameData.game); gameSpace.start(); launchGameData.game.gameSpaceStarted(); loadingGameScreen.visible = false; removeChild(loadingGameScreen); } public function stopGameMusic():void{ if (gameMusicPlaying){ gameMusicPlaying = false; if (gameMusicSC != null){ gameMusicSC.stop(); }; gameMusicCurrentTrack++; if (gameMusicCurrentTrack > gameMusicFinishTrack){ gameMusicCurrentTrack = gameMusicStartTrack; }; }; } private function playTrack(_arg1:int):void{ var _local2:SoundTransform; gameMusicSC = (gameMusic[_arg1] as Sound).play(); if (gameMusicSC != null){ gameMusicSC.addEventListener(Event.SOUND_COMPLETE, onGameMusicTrackComplete, false, 0, true); _local2 = new SoundTransform(); _local2.volume = gameMusicVolume; gameMusicSC.soundTransform = _local2; }; } public function showTrainingMissionSelection(_arg1:int):void{ mainMenu.visible = false; credits.visible = false; trainingMissionSelection.visible = true; trainingMissionSelection.reinit(_arg1); achievementsScreen.visible = false; resultsScreen.visible = false; if (gameSpace != null){ gameSpace.finish(); removeChild(gameSpace); gameSpace = null; }; stopGameMusic(); stopCreditsMusic(); if (mainMusicSC == null){ mainMusicSC = mainMusic.play(0, 99999); }; } public function playGameMusic(_arg1:int, _arg2:int):void{ if (!gameMusicPlaying){ gameMusicPlaying = true; gameMusicStartTrack = _arg1; gameMusicFinishTrack = _arg2; if (gameMusicCurrentTrack < gameMusicStartTrack){ gameMusicCurrentTrack = gameMusicStartTrack; } else { if (gameMusicCurrentTrack > gameMusicFinishTrack){ gameMusicCurrentTrack = gameMusicFinishTrack; }; }; playTrack(gameMusicCurrentTrack); }; } } }//package com.wbwar.creeper.screens
Section 93
//Logo (com.wbwar.creeper.screens.Logo) package com.wbwar.creeper.screens { import flash.display.*; import flash.filters.*; import flash.events.*; import com.wbwar.creeper.util.*; import flash.net.*; public class Logo extends Sprite { public function Logo(){ var _local1:Sprite = new Sprite(); var _local2:LogoLeftKnuckle = new LogoLeftKnuckle(); var _local3:LogoRightKnuckle = new LogoRightKnuckle(); _local1.addChild(_local2); _local1.addChild(_local3); _local3.x = 184; addChild(_local1); _local1.scaleX = 0.5; _local1.scaleY = _local1.scaleX; filters = [new DropShadowFilter()]; buttonMode = true; useHandCursor = true; addEventListener(MouseEvent.CLICK, onMouseClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); } private function onMouseOut(_arg1:Event):void{ ColorUtil.normalColor(this, 3); } private function onMouseClick(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://knucklecracker.com?cwts=logo"); navigateToURL(_local2, "_blank"); ColorUtil.normalColor(this, 3); MochiBot.track(this, "e00dd08c"); } private function onMouseOver(_arg1:Event):void{ ColorUtil.brighterColor(this, 3); } } }//package com.wbwar.creeper.screens
Section 94
//MainMenu (com.wbwar.creeper.screens.MainMenu) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import caurina.transitions.*; import com.wbwar.creeper.dialogs.*; public class MainMenu extends Sprite { private var creeperTextFieldContainer:Sprite; private var exitGameButton:Button; private var achievementsButton:Button; private var howToPlayButton:Button; private var subtitleTextField:TextField; private var worldTextField:TextField; private var versionText:TextField; private var worldTextFieldContainer:Sprite; private var creditsButton:Button; private var startButton:Button; private var creeperTextField:TextField; public static var titleImage:Class = MainMenu_titleImage; private static var titleBitmap:Bitmap = (new titleImage() as Bitmap); public function MainMenu(){ var _local2:TextField; var _local5:TextField; super(); graphics.beginFill(0); graphics.drawRect(0, 0, 700, 525); graphics.endFill(); addChild(titleBitmap); creeperTextFieldContainer = new Sprite(); addChild(creeperTextFieldContainer); creeperTextField = Text.text("Creeper", 64, 5271807); creeperTextField.x = (-(creeperTextField.width) / 2); creeperTextFieldContainer.addChild(creeperTextField); worldTextFieldContainer = new Sprite(); addChild(worldTextFieldContainer); worldTextField = Text.text("World", 64, 5271807); worldTextField.x = (-(worldTextField.width) / 2); worldTextFieldContainer.addChild(worldTextField); subtitleTextField = Text.text("Training Simulator", 28, 12632224); subtitleTextField.filters = [new DropShadowFilter(4, 45, 96)]; subtitleTextField.x = 20; subtitleTextField.y = 150; addChild(subtitleTextField); if (Creeper.DEMO){ _local5 = Text.text("DEMO", 48, 0xFF0000); _local5.x = 70; _local5.y = 200; _local5.rotation = -15; addChild(_local5); }; startButton = new Button("ENTER SIMULATOR", 24, 250, 45, 0, 5, true, 0x8000, -1); startButton.filters = [new GlowFilter(3178560, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(startButton); startButton.x = 440; startButton.y = -50; startButton.addEventListener(MouseEvent.CLICK, onStartClick); achievementsButton = new Button("Hall of Honor", 20, 200, 30, 0, 0, true, 128, -1); achievementsButton.filters = [new GlowFilter(4214944, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(achievementsButton); achievementsButton.x = -(achievementsButton.width); achievementsButton.y = 410; achievementsButton.addEventListener(MouseEvent.CLICK, onAchievementsClick); exitGameButton = new Button("Exit Game", 16, 130, 25, 0, 0, true, 0x800000, -1); exitGameButton.filters = [new GlowFilter(10502208, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(exitGameButton); exitGameButton.x = 560; exitGameButton.y = 460; exitGameButton.addEventListener(MouseEvent.CLICK, onExitGameClick); if (Creeper.exitGameFunction == null){ exitGameButton.visible = false; }; creditsButton = new Button("Credits", 16, 150, 25, 0, 0, true, 0x8000, -1); creditsButton.filters = [new GlowFilter(3178560, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(creditsButton); creditsButton.x = -(creditsButton.width); creditsButton.y = 460; creditsButton.addEventListener(MouseEvent.CLICK, onCreditsClick); howToPlayButton = new Button("How To Play", 20, 200, 30, 0, 0, true, 0x808000, -1); howToPlayButton.filters = [new GlowFilter(8421440, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(howToPlayButton); howToPlayButton.x = 700; howToPlayButton.y = 110; howToPlayButton.addEventListener(MouseEvent.CLICK, onHowToPlayClick); var _local1:Logo = new Logo(); addChild(_local1); _local1.x = 300; _local1.y = ((525 - 5) - _local1.height); _local2 = Text.text("In Cooperation With", 8, 12632240); addChild(_local2); _local2.x = 570; _local2.y = 460; var _local3:BBLogo = new BBLogo(); addChild(_local3); _local3.x = 530; _local3.y = 475; if (Creeper.version != null){ versionText = Text.text(("Ver: " + Creeper.version), 8, 0x606060); addChild(versionText); versionText.x = 5; versionText.y = int(((525 - 5) - versionText.height)); }; var _local4:TextField = Text.text("Copyright © 2009 Knuckle Cracker, LLC", 8, 0x909090); addChild(_local4); _local4.x = int((350 - (_local4.width / 2))); _local4.y = int(((525 - 5) - _local4.height)); } private function onStartClick(_arg1:MouseEvent):void{ Creeper.instance.gameScreen.showTrainingMissionSelection(-1); } private function onAchievementsClick(_arg1:MouseEvent):void{ Creeper.instance.gameScreen.showAchievementsScreen(); } private function onHowToPlayClick(_arg1:MouseEvent):void{ addChild(HelpDialog.instance); HelpDialog.instance.x = (350 - (HelpDialog.WIDTH / 2)); HelpDialog.instance.y = (250 - (HelpDialog.HEIGHT / 2)); HelpDialog.instance.visible = true; } private function onCreditsClick(_arg1:MouseEvent):void{ Creeper.instance.gameScreen.showCredits(); } private function onExitGameClick(_arg1:MouseEvent):void{ if (Creeper.exitGameFunction != null){ Creeper.exitGameFunction(); }; } public function show():void{ creeperTextFieldContainer.x = 150; worldTextFieldContainer.x = 150; worldTextFieldContainer.y = 80; creeperTextFieldContainer.scaleX = 3; worldTextFieldContainer.scaleX = 3; creeperTextFieldContainer.scaleY = 3; worldTextFieldContainer.scaleY = 3; worldTextFieldContainer.visible = false; startButton.y = -50; achievementsButton.x = -(achievementsButton.width); creditsButton.x = -(creditsButton.width); howToPlayButton.x = 700; Tweener.removeTweens(creeperTextField); Tweener.removeTweens(worldTextField); creeperTextField.filters = [new DropShadowFilter(), new GlowFilter(3166336, 1, 32, 32, 3, BitmapFilterQuality.MEDIUM), new BlurFilter(64, 64, 1)]; worldTextField.filters = [new DropShadowFilter(), new GlowFilter(3166336, 1, 32, 32, 3, BitmapFilterQuality.MEDIUM), new BlurFilter(64, 64, 1)]; Tweener.addTween(creeperTextFieldContainer, {time:0.5, scaleX:1, scaleY:1, onComplete:function ():void{ worldTextFieldContainer.visible = true; }}); Tweener.addTween(worldTextFieldContainer, {time:0.5, delay:0.5, scaleX:1, scaleY:1}); Tweener.addTween(creeperTextField, {time:2, _Blur_blurX:0, _Blur_blurY:0, onComplete:function ():void{ }}); Tweener.addTween(worldTextField, {time:2, delay:0.6, _Blur_blurX:0, _Blur_blurY:0, onComplete:function ():void{ }}); Tweener.addTween(startButton, {time:1.5, y:50}); Tweener.addTween(achievementsButton, {time:1.5, x:10}); Tweener.addTween(creditsButton, {time:1.5, x:35}); Tweener.addTween(howToPlayButton, {time:1.5, x:465}); } } }//package com.wbwar.creeper.screens
Section 95
//MainMenu_titleImage (com.wbwar.creeper.screens.MainMenu_titleImage) package com.wbwar.creeper.screens { import mx.core.*; public class MainMenu_titleImage extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 96
//ResultAchievements (com.wbwar.creeper.screens.ResultAchievements) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.media.*; import caurina.transitions.*; public class ResultAchievements extends Sprite { private var achievements:Sprite; private var continueButton:Button; public function ResultAchievements(){ graphics.beginFill(0, 0.9); graphics.drawRect(0, 0, 700, 525); graphics.endFill(); var _local1:TextField = Text.text("Achievement Awarded!!!", 32, 0xFFFFFF); _local1.filters = [new GlowFilter(0, 1, 8, 8)]; _local1.x = (350 - (_local1.width / 2)); _local1.y = 50; addChild(_local1); achievements = new Sprite(); addChild(achievements); continueButton = new Button("Continue", 10, 100, 18, 0, 0, true, 0x8000, -1); addChild(continueButton); continueButton.x = (350 - (continueButton.width / 2)); continueButton.y = ((525 - 5) - continueButton.height); continueButton.addEventListener(MouseEvent.CLICK, hide); visible = false; alpha = 0; } public function clearAchievements():void{ var _local1:int = (achievements.numChildren - 1); while (_local1 >= 0) { achievements.removeChildAt(_local1); _local1--; }; } public function hide(_arg1:Event=null):void{ Tweener.addTween(this, {time:0.5, _autoAlpha:0}); } public function setAchievement(_arg1:String, _arg2:int=-1):void{ var _local3:AchievementsBox = new AchievementsBox(_arg1, _arg2); achievements.addChild(_local3); if (_arg1 == AchievementsBox.TYPE_ALL){ _local3.y = 100; } else { if (_arg1 == AchievementsBox.TYPE_ALLTRAINING){ _local3.y = 200; } else { _local3.y = 250; }; }; _local3.locked = false; _local3.x = (350 - (_local3.width / 2)); _local3.filters = [new GlowFilter(0xFF9000, 1, 16, 16)]; } public function show():void{ var _local1:Sound = new UpgradeAvailableSound(); _local1.play(); Tweener.addTween(this, {time:0.5, _autoAlpha:1}); } } }//package com.wbwar.creeper.screens
Section 97
//ResultsScreen (com.wbwar.creeper.screens.ResultsScreen) package com.wbwar.creeper.screens { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import com.wbwar.creeper.games.*; import flash.text.*; public class ResultsScreen extends Sprite { private var demoScreen:DemoScreen; private var graph:LineGraph; private var energyUsedLegend:GraphLegendButton; private var energyCollectedLegend:GraphLegendButton; private var _returnToGameMode:Boolean; private var scoreText:TextField; private var resultAchievements:ResultAchievements; private var creeperCoverageLegend:GraphLegendButton; private var returnToGameButton:Button; private var scoreTitleText:TextField; private var elapsedTimeText:TextField; private var creeperKilledLegend:GraphLegendButton; private var continueButton:Button; private var elapsedTimeTitleText:TextField; public static const WIDTH:int = 700; public static const HEIGHT:int = 525; public function ResultsScreen(){ super(); graphics.beginFill(0x3000); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); energyCollectedLegend = new GraphLegendButton("Energy Collected", 0xFF00); addChild(energyCollectedLegend); energyCollectedLegend.x = 20; energyCollectedLegend.y = 5; energyCollectedLegend.addEventListener(MouseEvent.CLICK, function ():void{ energyCollectedLegend.selected = !(energyCollectedLegend.selected); renderGraph(); }); energyUsedLegend = new GraphLegendButton("Energy Used", 0xFFFFFF); addChild(energyUsedLegend); energyUsedLegend.x = ((energyCollectedLegend.x + energyCollectedLegend.width) + 5); energyUsedLegend.y = 5; energyUsedLegend.addEventListener(MouseEvent.CLICK, function ():void{ energyUsedLegend.selected = !(energyUsedLegend.selected); renderGraph(); }); creeperCoverageLegend = new GraphLegendButton("Creeper Coverage", 0xFF); addChild(creeperCoverageLegend); creeperCoverageLegend.x = ((energyUsedLegend.x + energyUsedLegend.width) + 5); creeperCoverageLegend.y = 5; creeperCoverageLegend.addEventListener(MouseEvent.CLICK, function ():void{ creeperCoverageLegend.selected = !(creeperCoverageLegend.selected); renderGraph(); }); creeperKilledLegend = new GraphLegendButton("Creeper Killed", 0xFF0000); addChild(creeperKilledLegend); creeperKilledLegend.x = ((creeperCoverageLegend.x + creeperCoverageLegend.width) + 5); creeperKilledLegend.y = 5; creeperKilledLegend.addEventListener(MouseEvent.CLICK, function ():void{ creeperKilledLegend.selected = !(creeperKilledLegend.selected); renderGraph(); }); graph = new LineGraph(690, 400, [0xFF00, 0xFF0000, 0xFF, 16736511], 2105408, null); addChild(graph); graph.x = 5; graph.y = 30; elapsedTimeTitleText = Text.text("Time: ", 18, 0xB0B0B0); addChild(elapsedTimeTitleText); elapsedTimeText = Text.text("", 18, 0xFFFFFF); addChild(elapsedTimeText); scoreTitleText = Text.text("Score: ", 18, 0xB0B0B0); addChild(scoreTitleText); scoreText = Text.text("", 22, 9502608); addChild(scoreText); returnToGameButton = new Button("Return To Game", 10, 100, 18, 0, 0, true, 0x8000, -1); addChild(returnToGameButton); returnToGameButton.x = (350 - (returnToGameButton.width / 2)); returnToGameButton.y = ((525 - 5) - returnToGameButton.height); returnToGameButton.addEventListener(MouseEvent.CLICK, onReturnToGameClick); returnToGameButton.visible = false; continueButton = new Button("Continue", 10, 100, 18, 0, 0, true, 0x8000, -1); addChild(continueButton); continueButton.x = (350 - (continueButton.width / 2)); continueButton.y = ((525 - 5) - continueButton.height); continueButton.addEventListener(MouseEvent.CLICK, onContinueClick); resultAchievements = new ResultAchievements(); addChild(resultAchievements); demoScreen = new DemoScreen(); addChild(demoScreen); demoScreen.visible = false; } public function set returnToGameMode(_arg1:Boolean):void{ _returnToGameMode = _arg1; if (_arg1){ returnToGameButton.visible = true; continueButton.visible = false; } else { returnToGameButton.visible = false; continueButton.visible = true; }; } private function showAchievement(_arg1:String, _arg2:int=-1):void{ resultAchievements.setAchievement(_arg1, _arg2); } private function update():void{ var _local3:Boolean; var _local4:AchievementsSnapshot; var _local5:IndividualGameData; var _local6:Date; var _local7:AchievementsSnapshot; var _local8:Boolean; var _local9:int; demoScreen.visible = false; renderGraph(); var _local1:String = Time.getTimeString((GameSpace.instance.elapsedTime / 36)); elapsedTimeText.text = _local1; elapsedTimeText.x = ((WIDTH / 2) - (elapsedTimeText.width / 2)); elapsedTimeText.y = 435; elapsedTimeTitleText.x = ((elapsedTimeText.x - elapsedTimeTitleText.width) - 5); elapsedTimeTitleText.y = elapsedTimeText.y; var _local2:int = GameSpace.instance.calculateScore(); if (GameSpace.instance.destroyedReason == GameSpace.DESTROYED_REASON_SHIP_DESTROYED){ scoreText.text = "ODIN CITY DESTROYED!"; _local3 = false; } else { if (GameSpace.instance.destroyedReason == GameSpace.DESTROYED_REASON_SURVIVALPOD_DESTROYED){ scoreText.text = "SURVIVAL POD DESTROYED!"; _local3 = false; } else { scoreText.text = formatNumber(_local2); _local3 = true; }; }; if (!_local3){ _local2 = 0; }; scoreText.x = elapsedTimeText.x; scoreText.y = 460; scoreTitleText.x = ((scoreText.x - scoreTitleText.width) - 5); scoreTitleText.y = (scoreText.y + 4); if (((!(_returnToGameMode)) && (_local3))){ if (!returnToGameMode){ _local4 = AchievementsScreen.getSnapshot(); }; GameData.load(); if (GameSpace.instance.gameNumber == 99){ GameData.tutorial = true; } else { _local5 = GameData.getTrainingGameData(GameSpace.instance.gameNumber); _local5.playCount++; if (_local2 > _local5.highScore){ _local5.highScore = _local2; _local5.minTime = GameSpace.instance.elapsedTime; }; _local6 = new Date(); _local5.lastPlayed = _local6.getTime(); }; GameData.save(); if (!returnToGameMode){ _local7 = AchievementsScreen.getSnapshot(); resultAchievements.clearAchievements(); _local9 = _local4.getTrainingDifference(_local7); if (_local9 >= 0){ showAchievement(AchievementsBox.TYPE_TRAINING, _local9); _local8 = true; }; if (((!(_local4.allTraining)) && (_local7.allTraining))){ showAchievement(AchievementsBox.TYPE_ALLTRAINING); _local8 = true; }; if (_local8){ resultAchievements.show(); }; if (GameSpace.instance.gameNumber == 4){ demoScreen.visible = true; }; }; }; } private function normalizeArray(_arg1:Array, _arg2:Number):Array{ var _local3:Number = maxInArray(_arg1); if (_local3 == 0){ _local3 = 1; }; var _local4:Number = (_arg2 / _local3); var _local5:Array = [_arg1.length]; var _local6:int; while (_local6 < _arg1.length) { _local5[_local6] = (_arg1[_local6] * _local4); _local6++; }; return (_local5); } private function onContinueClick(_arg1:MouseEvent):void{ if (GameSpace.instance == null){ Creeper.instance.gameScreen.showMainMenu(); } else { if (GameSpace.instance.destroyedReason != GameSpace.DESTROYED_REASON_NONE){ Creeper.instance.gameScreen.showTrainingMissionSelection(-1); } else { Creeper.instance.gameScreen.showTrainingMissionSelection(GameSpace.instance.gameNumber); }; }; } private function onReturnToGameClick(_arg1:MouseEvent):void{ Creeper.instance.gameScreen.showGame(); } private function renderGraph():void{ var _local1:Array; var _local2:Array; var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local9:Array; if (GameSpace.instance != null){ _local1 = GameSpace.instance.statsCreeperKilled; _local2 = GameSpace.instance.statsCreeperCoverage; _local3 = GameSpace.instance.statsEnergyCollected; _local4 = GameSpace.instance.statsEnergyUsed; _local5 = maxInArray(_local3); _local6 = maxInArray(_local4); _local7 = ((_local5 > _local6)) ? _local5 : _local6; graph.yMax = _local7; _local8 = []; _local9 = []; if (energyCollectedLegend.selected){ _local8.push(0xFF00); _local9.push(_local3); }; if (energyUsedLegend.selected){ _local8.push(0xFFFFFF); _local9.push(_local4); }; if (creeperCoverageLegend.selected){ _local8.push(0xFF); _local9.push(normalizeArray(_local2, _local7)); }; if (creeperKilledLegend.selected){ _local8.push(0xFF0000); _local9.push(normalizeArray(_local1, _local7)); }; graph.lineColor = _local8; graph.data = _local9; }; } public function get returnToGameMode():Boolean{ return (_returnToGameMode); } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; if (_arg1){ update(); }; } private function maxInArray(_arg1:Array):Number{ var _local2:int; var _local5:Number; var _local3:int = _arg1.length; var _local4:Number = 0; _local2 = 0; while (_local2 < _local3) { _local5 = _arg1[_local2]; if (_local5 > _local4){ _local4 = _local5; }; _local2++; }; return (_local4); } public static function formatNumber(_arg1:Number):String{ var _local4:String; var _local2:String = _arg1.toString(); var _local3 = ""; while (_local2.length > 3) { _local4 = _local2.substr(-3); _local2 = _local2.substr(0, (_local2.length - 3)); _local3 = (("," + _local4) + _local3); }; if (_local2.length > 0){ _local3 = (_local2 + _local3); }; return (_local3); } } }//package com.wbwar.creeper.screens
Section 98
//SplashScreen (com.wbwar.creeper.screens.SplashScreen) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.media.*; import caurina.transitions.*; import flash.net.*; public class SplashScreen extends Sprite { private var knuckles:Sprite; private var leftKnuckle:LogoLeftKnuckle; private var rightKnuckle:LogoRightKnuckle; private var initScreen:Sprite; private var title:TextField; private var presents:TextField; private var soundWave:Shape; private var screen:Sprite; public function SplashScreen(){ var _local1:TextField; super(); initScreen = new Sprite(); addChild(initScreen); screen = new Sprite(); addChild(screen); initScreen.graphics.beginFill(0); initScreen.graphics.drawRect(0, 0, 700, 525); initScreen.graphics.endFill(); _local1 = Text.text("Calibrating Fractal Energy Collectors........", 18, 0); _local1.filters = [new GlowFilter(4259648, 1, 16, 16, 6, BitmapFilterQuality.MEDIUM)]; initScreen.addChild(_local1); _local1.x = (350 - int((_local1.width / 2))); _local1.y = 200; screen.graphics.beginFill(0); screen.graphics.drawRect(0, 0, 700, 525); screen.graphics.endFill(); knuckles = new Sprite(); screen.addChild(knuckles); leftKnuckle = new LogoLeftKnuckle(); knuckles.addChild(leftKnuckle); rightKnuckle = new LogoRightKnuckle(); knuckles.addChild(rightKnuckle); knuckles.alpha = 0; knuckles.visible = false; knuckles.addEventListener(MouseEvent.CLICK, onLogoClick); leftKnuckle.x = ((350 - 90) - 2); leftKnuckle.y = 200; rightKnuckle.x = ((350 + 90) + 2); rightKnuckle.y = 200; presents = Text.text("presents", 18, 0xC0C0C0); screen.addChild(presents); presents.x = (350 - int((presents.width / 2))); presents.y = 250; presents.alpha = 0; presents.visible = false; title = Text.text("", 20, 0xC0C0C0); screen.addChild(title); title.x = (350 - int((title.width / 2))); title.y = 275; title.alpha = 0; title.visible = false; soundWave = new Shape(); soundWave.graphics.lineStyle(2, 0xFFFFFF); soundWave.graphics.moveTo(-4, -4); soundWave.graphics.curveTo(0, -8, 4, -4); soundWave.graphics.moveTo(-6, -10); soundWave.graphics.curveTo(0, -14, 6, -10); soundWave.graphics.moveTo(-8, -16); soundWave.graphics.curveTo(0, -20, 8, -16); soundWave.graphics.moveTo(-4, 4); soundWave.graphics.curveTo(0, 8, 4, 4); soundWave.graphics.moveTo(-6, 10); soundWave.graphics.curveTo(0, 14, 6, 10); soundWave.graphics.moveTo(-8, 16); soundWave.graphics.curveTo(0, 20, 8, 16); soundWave.x = 350; soundWave.y = 200; screen.addChild(soundWave); soundWave.scaleX = 0; soundWave.scaleY = 0; } public function hide():void{ parent.removeChild(this); } private function separateBones():void{ var _local1:Sound = new LogoCrackSound(); _local1.play(); var _local2:int = (leftKnuckle.x - 5); var _local3:int = (rightKnuckle.x + 5); Tweener.addTween(leftKnuckle, {time:0.25, x:_local2}); Tweener.addTween(rightKnuckle, {time:0.25, x:_local3, onComplete:showPresents}); soundWave.visible = true; Tweener.addTween(soundWave, {time:0.75, _autoAlpha:0, scaleX:2, scaleY:2}); } private function fadeInComplete():void{ Tweener.addTween(this, {delay:0.5, onComplete:separateBones}); } private function disappear():void{ Tweener.addTween(screen, {time:1, scaleX:0, scaleY:0, x:350, y:262, onComplete:startGame}); } private function titleComplete():void{ Tweener.addTween(this, {delay:1, onComplete:disappear}); } private function startGame():void{ Tweener.removeAllTweens(); removeEventListener(MouseEvent.CLICK, cancel); Creeper.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, cancel); screen.visible = false; Creeper.instance.startActualGame(); hide(); } private function showPresents():void{ Tweener.addTween(presents, {delay:1, time:0.75, _autoAlpha:1}); Tweener.addTween(title, {delay:1, time:1.5, _autoAlpha:1, onComplete:titleComplete}); } private function cancel(_arg1:Event=null):void{ Tweener.removeAllTweens(); disappear(); } public function show():void{ Tweener.addTween(knuckles, {time:0.75, _autoAlpha:1, onComplete:fadeInComplete}); addEventListener(MouseEvent.CLICK, cancel); Creeper.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, cancel); } private function onLogoClick(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://knucklecracker.com?cwts=splash"); navigateToURL(_local2, "_blank"); Creeper.instance.mochiBotVisitKC(); } } }//package com.wbwar.creeper.screens
Section 99
//SubmitScoreScreen (com.wbwar.creeper.screens.SubmitScoreScreen) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.text.*; import caurina.transitions.*; import flash.net.*; import com.wbwar.creeper.remote.*; public class SubmitScoreScreen extends Sprite { private var groupInputTextField:TextField; private var nameInputTextField:TextField; private var grandPlayCount:int; private var systemPlayCount:int; private var table:String; private var systemPlayCountText:TextField; private var systemScore:int; private var grandScore:int; private var systemTitle:TextField; private var grandPlayCountText:TextField; private var grandTitle:TextField; private var exitButton:Button; private var grandScoreText:TextField; private var missionNumber:int; private var systemScoreText:TextField; private var submitScoreButton:Button; private var submitSprite:Sprite; private static const SUBMITSPRITE_WIDTH:int = 200; public static const WIDTH:int = 700; public static const HEIGHT:int = 525; private static const SUBMITSPRITE_HEIGHT:int = 280; public function SubmitScoreScreen(){ var groupTitle:TextField; super(); graphics.beginFill(0, 0.85); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); submitSprite = new Sprite(); submitSprite.graphics.beginFill(2105408); submitSprite.graphics.lineStyle(4, 0xA0A0A0); submitSprite.graphics.drawRoundRect(0, 0, SUBMITSPRITE_WIDTH, SUBMITSPRITE_HEIGHT, 10, 7); submitSprite.graphics.endFill(); addChild(submitSprite); submitSprite.x = ((WIDTH / 2) - (SUBMITSPRITE_WIDTH / 2)); submitSprite.y = ((HEIGHT / 2) - (SUBMITSPRITE_HEIGHT / 2)); exitButton = new Button("Exit", 10, 75, 17, 0, 0, true, 12587024, 0); addChild(exitButton); exitButton.x = ((submitSprite.x + SUBMITSPRITE_WIDTH) - exitButton.width); exitButton.y = ((submitSprite.y - 5) - exitButton.height); exitButton.addEventListener(MouseEvent.CLICK, function ():void{ hide(); }); var nameTitle:TextField = Text.text("Your Player Name", 10, 0xFFFFFF); nameTitle.x = 10; nameTitle.y = 9; submitSprite.addChild(nameTitle); var format:TextFormat = new TextFormat(); format.font = "befont"; format.color = 0; format.size = 12; nameInputTextField = new TextField(); nameInputTextField.embedFonts = true; nameInputTextField.antiAliasType = AntiAliasType.ADVANCED; nameInputTextField.type = TextFieldType.INPUT; nameInputTextField.maxChars = 15; nameInputTextField.background = true; nameInputTextField.border = true; nameInputTextField.defaultTextFormat = format; nameInputTextField.x = 11; nameInputTextField.y = 25; nameInputTextField.width = 147; nameInputTextField.height = 18; submitSprite.addChild(nameInputTextField); groupTitle = Text.text("Group Name (Optional)", 10, 0xFFFFFF); groupTitle.x = 10; groupTitle.y = 50; submitSprite.addChild(groupTitle); groupInputTextField = new TextField(); groupInputTextField.embedFonts = true; groupInputTextField.antiAliasType = AntiAliasType.ADVANCED; groupInputTextField.type = TextFieldType.INPUT; groupInputTextField.maxChars = 20; groupInputTextField.background = true; groupInputTextField.border = true; groupInputTextField.defaultTextFormat = format; groupInputTextField.x = 11; groupInputTextField.y = 64; groupInputTextField.width = 147; groupInputTextField.height = 18; submitSprite.addChild(groupInputTextField); var grandTitle0:TextField = Text.text("Total", 16, 0xC0C0C0); submitSprite.addChild(grandTitle0); grandTitle0.filters = [new DropShadowFilter()]; grandTitle0.x = ((SUBMITSPRITE_WIDTH / 2) - (grandTitle0.width / 2)); grandTitle0.y = 160; grandTitle = Text.text("---", 16, 0xC0C0C0); submitSprite.addChild(grandTitle); grandTitle.filters = [new DropShadowFilter()]; grandTitle.x = 10; grandTitle.y = 180; grandScoreText = Text.text("000", 24, 0xFFFFFF); grandScoreText.x = ((SUBMITSPRITE_WIDTH / 2) - (grandScoreText.width / 2)); grandScoreText.y = (grandTitle.y + 20); submitSprite.addChild(grandScoreText); grandPlayCountText = Text.text("# Plays: ", 14, 0xFFFFFF); submitSprite.addChild(grandPlayCountText); grandPlayCountText.filters = [new DropShadowFilter()]; grandPlayCountText.y = ((grandScoreText.y + grandScoreText.height) - 7); systemTitle = Text.text("---", 16, 0xC0C0C0); submitSprite.addChild(systemTitle); systemTitle.filters = [new DropShadowFilter()]; systemTitle.x = 10; systemTitle.y = 85; systemScoreText = Text.text("000", 24, 0xFFFFFF); systemScoreText.x = ((SUBMITSPRITE_WIDTH / 2) - (systemScoreText.width / 2)); systemScoreText.y = (systemTitle.y + 20); submitSprite.addChild(systemScoreText); systemPlayCountText = Text.text("# Plays: ", 14, 0xFFFFFF); submitSprite.addChild(systemPlayCountText); systemPlayCountText.filters = [new DropShadowFilter()]; systemPlayCountText.y = ((systemScoreText.y + systemScoreText.height) - 7); submitScoreButton = new Button("Submit Scores", 12, 100, 20, 0, 0, true, 0x8000, -1); submitScoreButton.x = ((SUBMITSPRITE_WIDTH / 2) - (submitScoreButton.width / 2)); submitScoreButton.y = ((SUBMITSPRITE_HEIGHT - 5) - submitScoreButton.height); submitSprite.addChild(submitScoreButton); submitScoreButton.addEventListener(MouseEvent.CLICK, onSubmitClick); } private function submitComplete(_arg1:Event):void{ var _local2:URLLoader = URLLoader(_arg1.target); hide(); } public function hide():void{ if (missionNumber == 5){ alpha = 0; visible = false; Creeper.instance.gameScreen.showCredits(); } else { Tweener.addTween(this, {time:0.5, _autoAlpha:0}); }; } private function errorComplete(_arg1:Event):void{ trace(_arg1); hide(); } private function onSubmitClick(_arg1:Event):void{ var _local2:String = nameInputTextField.text; var _local3:String = groupInputTextField.text; if ((((_local2 == null)) || ((_local2 == "")))){ _local2 = "Anonymous"; }; submitScoreButton.enabled = false; GameData.playerName = _local2; GameData.groupName = _local3; GameData.save(); Score.submitScore(_local2, _local3, submitComplete, errorComplete); } public function show(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ if (((!((GameData.playerName == null))) && (!((GameData.playerName == ""))))){ nameInputTextField.text = GameData.playerName; }; if (((!((GameData.groupName == null))) && (!((GameData.groupName == ""))))){ groupInputTextField.text = GameData.groupName; }; Tweener.addTween(this, {time:0.5, _autoAlpha:1}); grandTitle.text = "Training Score"; systemTitle.text = (TrainingMissionSelection.missionWorlds[_arg5].title.text + " Score"); table = "training"; missionNumber = _arg5; grandTitle.x = ((submitSprite.width / 2) - (grandTitle.width / 2)); systemTitle.x = ((submitSprite.width / 2) - (systemTitle.width / 2)); this.grandScore = _arg1; this.grandPlayCount = _arg2; this.systemScore = _arg3; this.systemPlayCount = _arg4; grandScoreText.text = String(_arg1); grandPlayCountText.text = ("# Plays: " + String(_arg2)); systemScoreText.text = String(_arg3); systemPlayCountText.text = ("# Plays: " + String(_arg4)); grandScoreText.x = ((SUBMITSPRITE_WIDTH / 2) - (grandScoreText.width / 2)); grandPlayCountText.x = ((SUBMITSPRITE_WIDTH / 2) - (grandPlayCountText.width / 2)); systemScoreText.x = ((SUBMITSPRITE_WIDTH / 2) - (systemScoreText.width / 2)); systemPlayCountText.x = ((SUBMITSPRITE_WIDTH / 2) - (systemPlayCountText.width / 2)); submitScoreButton.enabled = true; } } }//package com.wbwar.creeper.screens
Section 100
//TrainingMissionSelection (com.wbwar.creeper.screens.TrainingMissionSelection) package com.wbwar.creeper.screens { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.text.*; import flash.net.*; public class TrainingMissionSelection extends Sprite { public var popupLayer:Sprite; private var submitScoreScreen:SubmitScoreScreen; private var exitButton:Button; private var startMessageSprite:Sprite; private var grandScoreText:TextField; private var grandPlayCountText:TextField; private var viewScoresButton:Button; private static const GRANDSCORE_HEIGHT:int = 70; private static const GRANDSCORE_WIDTH:int = 140; public static var backgroundImage:Class = TrainingMissionSelection_backgroundImage; public static var missionWorlds:Array = []; public static var tutorialWorld:TrainingMissionWorld; private static var backgroundBitmap:Bitmap = (new backgroundImage() as Bitmap); public function TrainingMissionSelection(){ var smw:TrainingMissionWorld; var sn:TextField; super(); addChild(backgroundBitmap); popupLayer = new Sprite(); popupLayer.mouseEnabled = false; popupLayer.mouseChildren = false; var grandScoreContainer:Sprite = new Sprite(); grandScoreContainer.filters = [new DropShadowFilter(4, 45, 3178544)]; grandScoreContainer.graphics.lineStyle(2, 0xFFFFFF); grandScoreContainer.graphics.beginFill(2109472); grandScoreContainer.graphics.drawRoundRect(0, 0, GRANDSCORE_WIDTH, GRANDSCORE_HEIGHT, 14, 8); grandScoreContainer.graphics.endFill(); addChild(grandScoreContainer); grandScoreContainer.x = 10; grandScoreContainer.y = 10; var grandScoreTitle:TextField = Text.text("Total Score", 18, 0xFFFFFF); grandScoreTitle.filters = [new DropShadowFilter()]; grandScoreContainer.addChild(grandScoreTitle); grandScoreTitle.x = ((GRANDSCORE_WIDTH / 2) - (grandScoreTitle.width / 2)); grandScoreTitle.y = 0; grandScoreText = Text.text("", 24, 0xFFFFFF); grandScoreText.filters = [new DropShadowFilter()]; grandScoreContainer.addChild(grandScoreText); grandScoreText.y = 20; grandPlayCountText = Text.text("", 14, 0xFFFFFF); grandPlayCountText.filters = [new DropShadowFilter()]; grandScoreContainer.addChild(grandPlayCountText); grandPlayCountText.x = 12; grandPlayCountText.y = 48; exitButton = new Button("Exit", 10, 75, 17, 0, 0, true, 12587024, 0); addChild(exitButton); exitButton.x = ((700 - 5) - exitButton.width); exitButton.y = 5; exitButton.addEventListener(MouseEvent.CLICK, function ():void{ Creeper.instance.gameScreen.showMainMenu(); }); viewScoresButton = new Button("View Online Scores", 12, 135, 20, 0, 0, true, 1097744, 0); addChild(viewScoresButton); viewScoresButton.x = int((350 - (viewScoresButton.width / 2))); viewScoresButton.y = 5; viewScoresButton.addEventListener(MouseEvent.CLICK, onViewScoresClick); var title:TextField = Text.text("Simulator Missions", 36, 0xFFFFFF); title.filters = [new GlowFilter(0xFF00, 1, 16, 16)]; addChild(title); title.x = (350 - (title.width / 2)); title.y = 40; tutorialWorld = new TrainingMissionWorld(this, 99, 150, 150); missionWorlds.push(new TrainingMissionWorld(this, 0, 350, 175)); missionWorlds.push(new TrainingMissionWorld(this, 1, 500, 275)); missionWorlds.push(new TrainingMissionWorld(this, 2, 440, 425)); missionWorlds.push(new TrainingMissionWorld(this, 3, 260, 425)); missionWorlds.push(new TrainingMissionWorld(this, 4, 200, 275)); var lineLayer:Sprite = new Sprite(); lineLayer.mouseChildren = false; lineLayer.mouseEnabled = false; addChild(lineLayer); lineLayer.graphics.lineStyle(3, 0x909090); lineLayer.graphics.moveTo(150, 150); lineLayer.graphics.lineTo(350, 175); lineLayer.graphics.lineTo(500, 275); lineLayer.graphics.lineTo(440, 425); lineLayer.graphics.lineTo(260, 425); lineLayer.graphics.lineTo(200, 275); addChild(tutorialWorld); for each (smw in missionWorlds) { addChild(smw); }; addChild(popupLayer); submitScoreScreen = new SubmitScoreScreen(); submitScoreScreen.hide(); addChild(submitScoreScreen); startMessageSprite = new Sprite(); addChild(startMessageSprite); sn = Text.text("START\nHERE!", 20, 0xFFFFFF); startMessageSprite.addChild(sn); startMessageSprite.graphics.lineStyle(3, 0xFFFFFF); ColorUtil.drawArrow(startMessageSprite.graphics, 75, 5, 90, -10); startMessageSprite.x = 20; startMessageSprite.y = 200; startMessageSprite.filters = [new DropShadowFilter()]; } private function onViewScoresClick(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://knucklecracker.com/creeperworld/viewscores.php?missionGroup=training"); navigateToURL(_local2, "creeperworldscores"); Creeper.instance.mochiBotVisitKC(); } public function reinit(_arg1:int):void{ var _local2:IndividualGameData; var _local5:int; var _local6:TrainingMissionWorld; var _local7:int; var _local8:int; GameData.load(); startMessageSprite.visible = !(GameData.tutorial); var _local3:int; var _local4:int; _local5 = 0; while (_local5 < 5) { _local2 = GameData.getTrainingGameData(_local5); _local3 = (_local3 + _local2.highScore); _local4 = (_local4 + _local2.playCount); _local5++; }; grandScoreText.text = String(_local3); grandScoreText.x = ((GRANDSCORE_WIDTH / 2) - (grandScoreText.width / 2)); grandPlayCountText.text = ("#Plays: " + String(_local4)); _local5 = 0; while (_local5 < missionWorlds.length) { _local6 = (missionWorlds[_local5] as TrainingMissionWorld); _local2 = GameData.getTrainingGameData(_local5); _local6.reinit(_local2); _local6.locked = isGameLocked(_local5); _local5++; }; if ((((_arg1 >= 0)) && ((_arg1 < 99)))){ _local7 = GameData.getTrainingGameData(_arg1).highScore; _local8 = GameData.getTrainingGameData(_arg1).playCount; submitScoreScreen.show(_local3, _local4, _local7, _local8, _arg1); }; } private function isGameLocked(_arg1:int):Boolean{ var _local2:IndividualGameData; if (_arg1 >= 0){ if (_arg1 == 99){ return (false); }; if (_arg1 == 0){ return (!(GameData.tutorial)); }; _local2 = GameData.getTrainingGameData((_arg1 - 1)); if (_local2.highScore <= 0){ return (true); }; }; return (false); } } }//package com.wbwar.creeper.screens
Section 101
//TrainingMissionSelection_backgroundImage (com.wbwar.creeper.screens.TrainingMissionSelection_backgroundImage) package com.wbwar.creeper.screens { import mx.core.*; public class TrainingMissionSelection_backgroundImage extends BitmapAsset { } }//package com.wbwar.creeper.screens
Section 102
//TrainingMissionWorld (com.wbwar.creeper.screens.TrainingMissionWorld) package com.wbwar.creeper.screens { import com.wbwar.creeper.*; import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.utils.*; import caurina.transitions.*; public class TrainingMissionWorld extends Sprite { private var timeTextField:TextField; private var miniMap:Bitmap; private var playCountText:TextField; private var lockedCover:Sprite; public var gameNumber:int; public var title:TextField; private var scoreTextField:TextField; private var scoreTitle:TextField; private var _locked:Boolean; private var popup:Sprite; private var worldShape:Sprite; public static const WORLD_SIZE:int = 100; public function TrainingMissionWorld(_arg1:TrainingMissionSelection, _arg2:int, _arg3:Number, _arg4:Number){ var tg0:TrainingGame0; var tg1:TrainingGame1; var tg2:TrainingGame2; var tg3:TrainingGame3; var tg4:TrainingGame4; var tg99:TrainingGame99; var r:int; var g:int; var b:int; var lockedText1:TextField; var gc:Object; var sms = _arg1; var gameNumber = _arg2; var x = _arg3; var y = _arg4; super(); this.gameNumber = gameNumber; this.x = x; this.y = y; graphics.beginFill(0, 0); graphics.drawCircle(0, 0, 26); graphics.endFill(); var c:int = gameNumber; if (c == 0){ r = 150; g = 50; b = 50; } else { if (c == 1){ r = 50; g = 150; b = 50; } else { if (c == 2){ r = 250; g = 250; b = 0; } else { if (c == 3){ r = 50; g = 200; b = 150; } else { if (c == 4){ r = 150; g = 0; b = 150; } else { if (c == 5){ r = 200; g = 200; b = 50; } else { if (c == 6){ r = 0; g = 0; b = 250; } else { if (c == 7){ r = 150; g = 150; b = 150; } else { if (c == 8){ r = 0; g = 250; b = 0; } else { if (c == 9){ r = 100; g = 200; b = 100; } else { if (c == 99){ r = 200; g = 200; b = 200; }; }; }; }; }; }; }; }; }; }; }; var gname:String = ("com.wbwar.creeper.games::TrainingGame" + gameNumber); try { gc = getDefinitionByName(gname); title = Text.text(gc["title"], 12, 0xFFFFFF); } catch(e:Error) { title = Text.text("???", 9, 0xFFFFFF); }; title.filters = [new GlowFilter(0, 1, 4, 4, 4, 1)]; addChild(title); title.x = (-(title.width) / 2); title.y = ((WORLD_SIZE / 2) + 3); worldShape = ColorUtil.world(gameNumber, 50, r, g, b); worldShape.mouseEnabled = false; worldShape.width = WORLD_SIZE; worldShape.height = WORLD_SIZE; addChild(worldShape); worldShape.filters = [new DropShadowFilter(2), new GlowFilter(0xFFFFFF, 1, 16, 16)]; popup = new Sprite(); popup.filters = [new DropShadowFilter()]; popup.mouseEnabled = false; popup.mouseChildren = false; popup.visible = false; popup.alpha = 0; sms.popupLayer.addChild(popup); popup.x = int(((sms.x + this.x) - 70)); popup.y = int((((sms.y + this.y) - (WORLD_SIZE / 2)) - 100)); scoreTitle = Text.text("Score: ", 12, 0xFFFFFF); scoreTitle.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; popup.addChild(scoreTitle); scoreTitle.y = 0; scoreTextField = Text.text("", 12, 0xFFFFFF); scoreTextField.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; popup.addChild(scoreTextField); scoreTextField.x = ((scoreTitle.x + scoreTitle.width) - 2); scoreTextField.y = 0; timeTextField = Text.text("", 10, 0xFFFFFF); timeTextField.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; popup.addChild(timeTextField); timeTextField.x = ((scoreTitle.x + scoreTitle.width) - 2); timeTextField.y = 13; playCountText = Text.text("", 10, 0xFFFFFF); playCountText.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; popup.addChild(playCountText); playCountText.y = (96 - 14); lockedCover = new Sprite(); lockedText1 = Text.text("Locked", 20, 0xFFFF00); lockedText1.filters = [new GlowFilter(0, 1, 8, 8)]; lockedText1.x = (-(lockedText1.width) / 2); lockedText1.y = (-(lockedText1.height) - 5); lockedCover.addChild(lockedText1); lockedCover.visible = false; addChild(lockedCover); buttonMode = true; useHandCursor = true; addEventListener(MouseEvent.CLICK, onMouseClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); if (gameNumber == 99){ scaleX = 0.8; scaleY = 0.8; }; } public function reinit(_arg1:IndividualGameData):void{ scoreTextField.text = String(_arg1.highScore); timeTextField.text = (("(" + Time.getTimeString((_arg1.minTime / 36))) + ")"); playCountText.text = ("# Plays: " + String(_arg1.playCount)); if (_arg1.highScore > 0){ worldShape.filters = [new DropShadowFilter(2), new GlowFilter(10551200, 1, 16, 16)]; } else { worldShape.filters = [new DropShadowFilter(2), new GlowFilter(0xFF, 1, 16, 16)]; }; } public function get locked():Boolean{ return (_locked); } public function set locked(_arg1:Boolean):void{ _locked = _arg1; buttonMode = !(_arg1); useHandCursor = !(_arg1); lockedCover.visible = _arg1; } private function onMouseOut(_arg1:MouseEvent):void{ if (miniMap != null){ Tweener.addTween(popup, {time:1, _autoAlpha:0}); }; } private function onMouseClick(_arg1:MouseEvent):void{ var gname:String; var gc:Object; var s:Sound; var event = _arg1; if (_locked){ return; }; try { gname = ("com.wbwar.creeper.games::TrainingGame" + gameNumber); gc = getDefinitionByName(gname); s = new ClickSound(); s.play(); Creeper.instance.gameScreen.launchGame(new (gc), false, false, true, gameNumber); } catch(e:Error) { }; } private function createMiniMap():void{ var gc:Object; var t:Terrain; var game:Game; var matrix:Matrix; var gname:String = ("com.wbwar.creeper.games::TrainingGame" + gameNumber); try { gc = getDefinitionByName(gname); miniMap = new Bitmap(new BitmapData(140, 96, false)); t = new Terrain(); game = new (gc); t.background = int(game.getBackground()); t.setData(game.getTerrainHeight()); t.update(); matrix = new Matrix(); matrix.scale(0.2, 0.2); miniMap.bitmapData.draw(t, matrix); popup.addChild(miniMap); popup.addChild(scoreTitle); popup.addChild(scoreTextField); popup.addChild(timeTextField); popup.addChild(playCountText); } catch(e:Error) { }; } private function onMouseOver(_arg1:MouseEvent):void{ if (miniMap == null){ createMiniMap(); }; if (miniMap != null){ Tweener.addTween(popup, {time:1, _autoAlpha:1}); }; } } }//package com.wbwar.creeper.screens
Section 103
//Arc (com.wbwar.creeper.util.Arc) package com.wbwar.creeper.util { import flash.display.*; public class Arc { public static function draw(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=0):void{ var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _arg1.moveTo(_arg2, _arg3); if (Math.abs(_arg5) > 360){ _arg5 = 360; }; _local10 = Math.ceil((Math.abs(_arg5) / 45)); _local7 = (_arg5 / _local10); _local7 = ((_local7 / 180) * Math.PI); _local8 = ((_arg6 / 180) * Math.PI); _local11 = (_arg2 - (Math.cos(_local8) * _arg4)); _local12 = (_arg3 - (Math.sin(_local8) * _arg4)); var _local17:int; while (_local17 < _local10) { _local8 = (_local8 + _local7); _local9 = (_local8 - (_local7 / 2)); _local13 = (_local11 + (Math.cos(_local8) * _arg4)); _local14 = (_local12 + (Math.sin(_local8) * _arg4)); _local15 = (_local11 + (Math.cos(_local9) * (_arg4 / Math.cos((_local7 / 2))))); _local16 = (_local12 + (Math.sin(_local9) * (_arg4 / Math.cos((_local7 / 2))))); _arg1.curveTo(_local15, _local16, _local13, _local14); _local17++; }; } } }//package com.wbwar.creeper.util
Section 104
//ArcBar (com.wbwar.creeper.util.ArcBar) package com.wbwar.creeper.util { import flash.display.*; public class ArcBar extends Shape { public var border:Number;// = -1 private var startAngle:Number; private var arc:Number; private var thickness:Number; private var backgroundColor:Number; private var solidColor:Number; private var radius:Number; public function ArcBar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=9474256){ this.radius = _arg1; this.arc = _arg2; this.startAngle = _arg3; this.thickness = _arg4; this.solidColor = _arg5; this.backgroundColor = _arg6; } public function setValue(_arg1:Number, _arg2:Number):void{ graphics.clear(); if (backgroundColor >= 0){ graphics.lineStyle(thickness, backgroundColor, 1, false, LineScaleMode.NORMAL, CapsStyle.SQUARE); Arc.draw(graphics, 0, 0, radius, arc, startAngle); }; graphics.lineStyle(thickness, solidColor, 1, false, LineScaleMode.NORMAL, CapsStyle.SQUARE); Arc.draw(graphics, 0, 0, radius, ((_arg1 / _arg2) * arc), startAngle); } } }//package com.wbwar.creeper.util
Section 105
//Bar (com.wbwar.creeper.util.Bar) package com.wbwar.creeper.util { import flash.display.*; import caurina.transitions.*; public class Bar extends Shape { public var WIDTH:Number; public var HEIGHT:Number; public var border:Number;// = -1 private var maxValue:Number; private var _value:Number; private var backgroundColor:Number; private var solidColor:Number; public function Bar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=9474256){ this.WIDTH = _arg1; this.HEIGHT = _arg2; this.solidColor = _arg3; this.backgroundColor = _arg4; } public function get val():Number{ return (_value); } public function set val(_arg1:Number):void{ _value = _arg1; _setValue(_arg1); } public function setValue(_arg1:Number, _arg2:Number):void{ this.maxValue = _arg2; if (_arg1 > _arg2){ _arg1 = _arg2; }; Tweener.addTween(this, {val:_arg1, time:0.75}); } private function _setValue(_arg1:Number):void{ var _local2:Number; var _local3:Number; graphics.clear(); if (backgroundColor >= 0){ graphics.beginFill(backgroundColor, 0.5); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.endFill(); }; if (maxValue == 0){ _local2 = 0; } else { _local2 = (_arg1 / maxValue); }; if (solidColor != -1){ _local3 = solidColor; } else { _local3 = ((int(((1 - _local2) * 0xFF)) << 16) | (int((_local2 * 0xFF)) << 8)); }; graphics.beginFill(_local3, 1); graphics.drawRect(0, 0, (WIDTH * _local2), HEIGHT); graphics.endFill(); if (border >= 0){ graphics.lineStyle(1, border); graphics.drawRect(0, 0, WIDTH, HEIGHT); graphics.lineStyle(); }; } } }//package com.wbwar.creeper.util
Section 106
//Button (com.wbwar.creeper.util.Button) package com.wbwar.creeper.util { import flash.display.*; import flash.filters.*; import flash.geom.*; import flash.events.*; import flash.text.*; import flash.media.*; public class Button extends Sprite { private var _mystery:Boolean; private var _enabled:Boolean;// = true private var updateCount:int; private var _available:Boolean;// = true private var mysteryText:TextField; private var subtitleTextField:TextField; private var clickSound:Sound; public var text:TextField; private var mysteryCover:Sprite; public function Button(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean, _arg8:Number, _arg9:Number){ var _local11:Matrix; super(); clickSound = new ClickSound(); var _local10:Button = this; text = textAdv(_arg1, _arg2, 0xFFFFFF); text.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; text.x = 1; addChild(text); text.x = (text.x + _arg5); text.y = (text.y + _arg6); mysteryCover = new Sprite(); mysteryCover.mouseEnabled = false; mysteryCover.mouseChildren = false; addChild(mysteryCover); mysteryCover.visible = false; graphics.beginFill(_arg8); mysteryCover.graphics.beginFill(_arg8); if (_arg9 >= 0){ graphics.lineStyle(1, _arg9); }; if (_arg3 <= 0){ if (_arg4 <= 0){ graphics.drawRect(0, 0, (text.width + 1), text.height); mysteryCover.graphics.drawRect(0, 0, (text.width + 1), text.height); } else { graphics.drawRect(0, 0, (text.width + 1), _arg4); mysteryCover.graphics.drawRect(0, 0, (text.width + 1), _arg4); }; } else { if (_arg7){ text.x = int(((_arg3 / 2) - (text.width / 2))); }; if (_arg4 <= 0){ graphics.drawRect(0, 0, _arg3, text.height); mysteryCover.graphics.drawRect(0, 0, _arg3, text.height); } else { graphics.drawRect(0, 0, _arg3, _arg4); mysteryCover.graphics.drawRect(0, 0, _arg3, _arg4); }; }; graphics.endFill(); mysteryCover.graphics.endFill(); _local11 = new Matrix(); _local11.createGradientBox(_arg3, _arg4, (Math.PI / 3), 0, 0); mysteryCover.graphics.beginGradientFill(GradientType.LINEAR, [0, 0x707070], [0, 0.6], [0, 0xFF], _local11, SpreadMethod.PAD, InterpolationMethod.RGB, 0); mysteryCover.graphics.drawRect(0, 0, _arg3, _arg4); mysteryCover.graphics.endFill(); _local11 = new Matrix(); _local11.createGradientBox(_arg3, _arg4, (Math.PI / 3), 0, 0); graphics.beginGradientFill(GradientType.LINEAR, [0, 0xFFFFFF], [0, 0.6], [0, 0xFF], _local11, SpreadMethod.PAD, InterpolationMethod.RGB, 0); graphics.drawRect(0, 0, _arg3, _arg4); graphics.endFill(); useHandCursor = true; buttonMode = true; mouseChildren = false; addEventListener(MouseEvent.CLICK, onMouseClick); addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); } public function get enabled():Boolean{ return (_enabled); } private function onMouseDown(_arg1:MouseEvent):void{ if (((enabled) && (!(mystery)))){ clickSound.play(); }; } public function get available():Boolean{ return (_available); } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; if (_arg1){ alpha = 1; } else { alpha = 0.5; }; if (_arg1){ useHandCursor = true; buttonMode = true; } else { useHandCursor = false; buttonMode = false; }; } public function set available(_arg1:Boolean):void{ _available = _arg1; enabled = _available; if (_arg1){ alpha = 1; filters = []; } else { alpha = 0.5; filters = [new BlurFilter(2, 2)]; }; } public function setSubtitle(_arg1:String, _arg2:Number, _arg3:Number):void{ subtitleTextField = Text.text(_arg1, 8, 12632208); subtitleTextField.filters = [new GlowFilter(0, 1, 2, 2, 2, BitmapFilterQuality.LOW)]; addChild(subtitleTextField); subtitleTextField.x = _arg2; subtitleTextField.y = _arg3; subtitleTextField.visible = false; } private function onMouseClick(_arg1:MouseEvent):void{ if (((!(enabled)) || (mystery))){ _arg1.stopImmediatePropagation(); }; } private function onMouseOut(_arg1:MouseEvent):void{ if (!mystery){ ColorUtil.normalColor(this, 1); if (subtitleTextField != null){ subtitleTextField.visible = false; }; }; } private function onMouseOver(_arg1:MouseEvent):void{ if (((enabled) && (!(mystery)))){ ColorUtil.brighterColor(this, 1); if (subtitleTextField != null){ subtitleTextField.visible = true; }; }; } public function set mystery(_arg1:Boolean):void{ _mystery = _arg1; if (_arg1){ text.visible = false; mysteryCover.visible = true; addChild(mysteryCover); ColorUtil.bwColor(this, 0.5); } else { text.visible = true; mysteryCover.visible = false; ColorUtil.normalColor(this, 0.5); }; } public function get mystery():Boolean{ return (_mystery); } public static function textAdv(_arg1:String, _arg2:uint, _arg3:uint):TextField{ var _local5:TextFormat; var _local4:TextField = new TextField(); _local5 = new TextFormat(); if (_arg2 <= 8){ _local5.font = "befontsmall"; } else { _local5.font = "befont"; }; _local5.color = _arg3; _local5.size = _arg2; _local4.embedFonts = true; _local4.antiAliasType = AntiAliasType.ADVANCED; if (_arg2 <= 8){ _local4.sharpness = 400; } else { if (_arg2 <= 14){ _local4.sharpness = 100; }; }; _local4.defaultTextFormat = _local5; _local4.autoSize = TextFieldAutoSize.LEFT; _local4.selectable = false; _local4.mouseEnabled = false; if (_arg1 != null){ _local4.text = _arg1; }; return (_local4); } } }//package com.wbwar.creeper.util
Section 107
//ButtonHighlight (com.wbwar.creeper.util.ButtonHighlight) package com.wbwar.creeper.util { import flash.display.*; import flash.events.*; public class ButtonHighlight extends Sprite { private var hl:Shape; private var pulseRate:Number;// = 0.007 private var outerhl:Sprite; public function ButtonHighlight(_arg1:int, _arg2:int){ mouseEnabled = false; mouseChildren = false; hl = new Shape(); hl.graphics.lineStyle(2, 0xFFFFFF); hl.graphics.moveTo(0, 5); hl.graphics.lineTo(0, 0); hl.graphics.lineTo(5, 0); hl.graphics.moveTo(_arg1, 5); hl.graphics.lineTo(_arg1, 0); hl.graphics.lineTo((_arg1 - 5), 0); hl.graphics.moveTo(_arg1, (_arg2 - 5)); hl.graphics.lineTo(_arg1, _arg2); hl.graphics.lineTo((_arg1 - 5), _arg2); hl.graphics.moveTo(0, (_arg2 - 5)); hl.graphics.lineTo(0, _arg2); hl.graphics.lineTo(5, _arg2); outerhl = new Sprite(); outerhl.mouseEnabled = false; outerhl.mouseChildren = false; outerhl.addChild(hl); hl.x = (-(_arg1) / 2); hl.y = (-(_arg2) / 2); addChild(outerhl); outerhl.x = (_arg1 / 2); outerhl.y = (_arg2 / 2); addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); } private function onEnterFrame(_arg1:Event):void{ if (visible){ outerhl.scaleX = (outerhl.scaleX + pulseRate); outerhl.scaleY = (outerhl.scaleY + (pulseRate * 3)); if ((((outerhl.scaleX > 1.1)) || ((outerhl.scaleX <= 1)))){ pulseRate = -(pulseRate); }; }; } } }//package com.wbwar.creeper.util
Section 108
//Callback (com.wbwar.creeper.util.Callback) package com.wbwar.creeper.util { import flash.events.*; public class Callback { public static function callback(_arg1:Function, _arg2:Number):void{ var _local3:DataTimer = new DataTimer(_arg2, 1); _local3.data = _arg1; _local3.addEventListener(TimerEvent.TIMER_COMPLETE, onTimer); _local3.start(); } private static function onTimer(_arg1:TimerEvent):void{ (_arg1.currentTarget as DataTimer).removeEventListener(TimerEvent.TIMER_COMPLETE, onTimer); var _local2:Object = (_arg1.currentTarget as DataTimer).data; if (_local2 != null){ _local2(); }; } } }//package com.wbwar.creeper.util
Section 109
//Checkbox (com.wbwar.creeper.util.Checkbox) package com.wbwar.creeper.util { import flash.display.*; import flash.events.*; public class Checkbox extends Sprite { private var _checked:Boolean; private var checkedColor:Number; private var borderColor:Number; public static var CHECK_CHANGE:String = "CHECK_CHANGE"; public function Checkbox(_arg1:Number, _arg2:Number){ this.borderColor = _arg1; this.checkedColor = _arg2; draw(); useHandCursor = true; buttonMode = true; addEventListener(MouseEvent.CLICK, onMouseClick); } private function onMouseClick(_arg1:MouseEvent=null):void{ checked = !(checked); dispatchEvent(new Event(CHECK_CHANGE)); } private function draw():void{ graphics.clear(); graphics.beginFill(0xFFFFFF, 0.1); graphics.drawCircle(0, 0, 8); graphics.endFill(); graphics.lineStyle(2, borderColor); graphics.drawCircle(0, 0, 8); if (checked){ graphics.lineStyle(); graphics.beginFill(checkedColor); graphics.drawCircle(0, 0, 6); graphics.endFill(); }; } public function get checked():Boolean{ return (_checked); } public function set checked(_arg1:Boolean):void{ _checked = _arg1; draw(); } } }//package com.wbwar.creeper.util
Section 110
//ClassUtil (com.wbwar.creeper.util.ClassUtil) package com.wbwar.creeper.util { import flash.utils.*; public class ClassUtil { public static function getClass(_arg1:Object):Class{ return (Class(getDefinitionByName(getQualifiedClassName(_arg1)))); } } }//package com.wbwar.creeper.util
Section 111
//ColorUtil (com.wbwar.creeper.util.ColorUtil) package com.wbwar.creeper.util { import caurina.transitions.*; import flash.display.*; import flash.filters.*; import flash.geom.*; import com.adobe.utils.*; public class ColorUtil { public static const filter_brighter:Array = [1.6, 0, 0, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 1, 0]; public static const filter_normal:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; public static const filter_dark:Array = [0.8, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 1, 0]; public static const filter_bright:Array = [1.3, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 1, 0]; public static const filter_superdark:Array = [0.5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 1, 0]; public static const filter_superbright:Array = [2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0]; public static const filter_bw:Array = [0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0, 0, 0, 1, 0]; public static var displayHeight:int; public static var displayWidth:int; public static var controlPanelHeight:int = 30; public static function normalColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_normal}); } public static function cloud(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int):Shape{ var _local11:Number; var _local12:Number; var _local6:Random = new Random(_arg5); var _local7:Shape = new Shape(); var _local8:BlurFilter = new BlurFilter(); _local8.blurX = 5; _local8.blurY = 5; _local8.quality = 3; var _local9:Array = new Array(_local8); _local7.filters = _local9; var _local10:int; while (_local10 < _arg4) { _local11 = ((_local6.random() * 2) * Math.PI); _local12 = (_local6.random() * _arg1); if (Math.random() < 0.9){ _local7.graphics.beginFill(_arg2, _arg3); } else { _local7.graphics.beginFill(12632224, _arg3); }; _local7.graphics.drawRect((Math.cos(_local11) * _local12), (Math.sin(_local11) * _local12), (_local6.random() * 1.8), (_local6.random() * 1.8)); _local7.graphics.endFill(); _local10++; }; return (_local7); } public static function darkColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_dark}); } public static function brighterColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_brighter}); } public static function sphere(_arg1:Number, _arg2:Number, _arg3:Number=-1):Shape{ var _local4:Shape = new Shape(); var _local5:Matrix = new Matrix(); _local5.createGradientBox((2.6 * _arg1), (2.6 * _arg1), 0, (-(_arg1) * 1.8), (-(_arg1) * 1.8)); _local4.graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, _arg2], [1, 1], [0, 0xFF], _local5); if (_arg3 >= 0){ _local4.graphics.lineStyle(1, _arg3); }; _local4.graphics.drawCircle(0, 0, _arg1); _local4.graphics.endFill(); return (_local4); } public static function brightColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_bright}); } public static function world(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Sprite{ var _local6:Sprite = new Sprite(); var _local7:Shape = new Shape(); _local7.cacheAsBitmap = true; _local6.addChild(_local7); var _local8:Shape = new Shape(); _local8.cacheAsBitmap = true; _local6.addChild(_local8); var _local9:Shape = new Shape(); _local9.cacheAsBitmap = true; _local6.addChild(_local9); var _local10:BitmapData = new BitmapData(200, 200, true, 0); var _local11 = 120; var _local12 = 80; var _local13 = 3; var _local14:int = _arg1; var _local15:Boolean; var _local16:Boolean; var _local17:int = BitmapDataChannel.GREEN; var _local18:Boolean; var _local19:Point = new Point(0, 0); var _local20:Point = new Point(0, 0); var _local21:Array = [_local19, _local20]; _local10.perlinNoise(_local11, _local12, _local13, _local14, _local15, _local16, _local17, _local18, _local21); var _local22:ColorTransform = new ColorTransform(); _local22.redOffset = _arg3; _local22.blueOffset = _arg4; _local22.blueOffset = _arg5; _local10.colorTransform(_local10.rect, _local22); var _local23:Number = ((((0xFF << 24) | 20) | 60) | 0xFF); _local10.threshold(_local10, _local10.rect, new Point(), "<", _arg2, _local23, 0xFF00, true); var _local24:BitmapData = new BitmapData(200, 200, true, 0); _local11 = 180; _local12 = 60; _local13 = 3; _local14 = (_arg1 + 100); _local15 = false; _local16 = false; _local17 = BitmapDataChannel.ALPHA; _local18 = true; _local19 = new Point(0, 0); _local20 = new Point(0, 0); _local21 = [_local19, _local20]; _local24.perlinNoise(_local11, _local12, _local13, _local14, _local15, _local16, _local17, _local18, _local21); _local24.threshold(_local24, _local24.rect, new Point(), "<", 1342177280, 0, 4278190080, true); var _local25:ColorTransform = new ColorTransform(); _local25.alphaOffset = 10; _local24.colorTransform(_local24.rect, _local25); var _local26:Matrix = new Matrix(); _local26.translate(-100, -100); _local7.graphics.beginBitmapFill(_local10, _local26); _local7.graphics.drawCircle(0, 0, 100); _local7.graphics.endFill(); _local8.graphics.beginBitmapFill(_local24, _local26); _local8.graphics.drawCircle(0, 0, 100); _local8.graphics.endFill(); var _local27:String = GradientType.RADIAL; var _local28:Array = [16777200, 0x202020]; var _local29:Array = [0.4, 0.8]; var _local30:Array = [0, 0xFF]; var _local31:Matrix = new Matrix(); _local31.createGradientBox(210, 270, 0, -160, -180); var _local32:String = SpreadMethod.PAD; _local9.graphics.beginGradientFill(_local27, _local28, _local29, _local30, _local31, _local32, "rgb", 0.5); _local9.graphics.drawCircle(1, 1, 104); _local9.graphics.endFill(); _local6.width = 20; _local6.height = 20; return (_local6); } public static function superDarkColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_superdark}); } public static function linesIntersect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{ if ((((((((((_arg1 == _arg5)) && ((_arg2 == _arg6)))) || ((((_arg1 == _arg7)) && ((_arg2 == _arg8)))))) || ((((_arg3 == _arg5)) && ((_arg4 == _arg6)))))) || ((((_arg3 == _arg7)) && ((_arg4 == _arg8)))))){ return (false); }; if ((((((((_arg1 == _arg5)) && ((_arg2 == _arg6)))) || ((((_arg1 == _arg7)) && ((_arg2 == _arg8)))))) && ((((((_arg3 == _arg5)) && ((_arg4 == _arg6)))) || ((((_arg3 == _arg7)) && ((_arg4 == _arg8)))))))){ return (true); }; return (((((relativeCCW(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6) * relativeCCW(_arg1, _arg2, _arg3, _arg4, _arg7, _arg8)) <= 0)) && (((relativeCCW(_arg5, _arg6, _arg7, _arg8, _arg1, _arg2) * relativeCCW(_arg5, _arg6, _arg7, _arg8, _arg3, _arg4)) <= 0)))); } public static function drawArrow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ _arg1.moveTo(_arg2, _arg3); _arg1.lineTo(_arg4, _arg5); var _local6:Number = Math.atan2((_arg3 - _arg5), (_arg2 - _arg4)); var _local7:Number = (_local6 - (Math.PI / 4)); var _local8:Number = (_local6 + (Math.PI / 4)); _arg1.moveTo(_arg4, _arg5); _arg1.lineTo((_arg4 + (Math.cos(_local7) * 5)), (_arg5 + (Math.sin(_local7) * 5))); _arg1.moveTo(_arg4, _arg5); _arg1.lineTo((_arg4 + (Math.cos(_local8) * 5)), (_arg5 + (Math.sin(_local8) * 5))); } public static function superBrightColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_superbright}); } public static function popFilter(_arg1:DisplayObject):void{ var _local2:Array = ArrayUtil.copyArray(_arg1.filters); _local2.pop(); _arg1.filters = _local2; } public static function invertBitmapData(_arg1:BitmapData, _arg2:Number):BitmapData{ var _local3:BitmapData = new BitmapData(_arg1.width, _arg1.height, true, 0); _local3.fillRect(new Rectangle(0, 0, _arg1.width, _arg1.height), _arg2); _local3.threshold(_arg1, new Rectangle(0, 0, _arg1.width, _arg1.height), new Point(0, 0), ">", 0, 0); return (_local3); } public static function bwColor(_arg1:DisplayObject, _arg2:Number=1):void{ Tweener.addTween(_arg1, {time:_arg2, _ColorMatrix_matrix:filter_bw}); } public static function relativeCCW(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):int{ _arg3 = (_arg3 - _arg1); _arg4 = (_arg4 - _arg2); _arg5 = (_arg5 - _arg1); _arg6 = (_arg6 - _arg2); var _local7:Number = ((_arg5 * _arg4) - (_arg6 * _arg3)); if (_local7 == 0){ _local7 = ((_arg5 * _arg3) + (_arg6 * _arg4)); if (_local7 > 0){ _arg5 = (_arg5 - _arg3); _arg6 = (_arg6 - _arg4); _local7 = ((_arg5 * _arg3) + (_arg6 * _arg4)); if (_local7 < 0){ _local7 = 0; }; }; }; return (((_local7)<0) ? -1 : ((_local7)>0) ? 1 : 0); } public static function pushFilter(_arg1:DisplayObject, _arg2:Object):void{ var _local3:Array = ArrayUtil.copyArray(_arg1.filters); _local3.push(_arg2); _arg1.filters = _local3; } public static function shadeColor(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Array = [_arg2, 0, 0, 0, 0, 0, _arg3, 0, 0, 0, 0, 0, _arg4, 0, 0, 0, 0, 0, 1, 0]; Tweener.addTween(_arg1, {time:_arg6, delay:_arg5, _ColorMatrix_matrix:_local7}); } public static function star(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Number):Shape{ var _local8:Boolean; var _local10:Number; var _local11:Number; var _local5:Shape = new Shape(); var _local6:Number = ((2 * Math.PI) / _arg3); var _local7:Number = _arg2; _local5.graphics.beginFill(_arg4); _local5.graphics.moveTo(_arg2, 0); var _local9:Number = 0; while (_local9 <= _arg3) { _local10 = (Math.cos((_local9 * _local6)) * _local7); _local11 = (Math.sin((_local9 * _local6)) * _local7); _local5.graphics.lineTo(_local10, _local11); if (_local8){ _local7 = _arg2; } else { _local7 = _arg1; }; _local8 = !(_local8); _local9++; }; _local5.graphics.lineTo(_arg2, 0); _local5.graphics.endFill(); return (_local5); } } }//package com.wbwar.creeper.util
Section 112
//ConfirmDialog (com.wbwar.creeper.util.ConfirmDialog) package com.wbwar.creeper.util { import flash.display.*; import flash.events.*; import flash.text.*; public class ConfirmDialog extends Sprite { private var yesCB:Function; private var dialog:Sprite; private var messageText:TextField; private var noButton:Button; public var shieldWidth:int; public var WIDTH:int; private var noCB:Function; private var shield:Sprite; public var HEIGHT:int; public var shieldHeight:int; private var yesButton:Button; public function ConfirmDialog(_arg1:int, _arg2:int, _arg3:int, _arg4:int){ WIDTH = _arg1; HEIGHT = _arg2; shield = new Sprite(); addChild(shield); shield.graphics.beginFill(0, 0); shield.graphics.drawRect(0, 0, _arg3, _arg4); shield.graphics.endFill(); dialog = new Sprite(); addChild(dialog); dialog.x = ((_arg3 / 2) - (WIDTH / 2)); dialog.y = ((_arg4 / 2) - (HEIGHT / 2)); dialog.graphics.beginFill(0xE0E0E0, 1); dialog.graphics.lineStyle(3, 0x404040); dialog.graphics.drawRoundRect(0, 0, WIDTH, HEIGHT, 10, 10); dialog.graphics.endFill(); messageText = Text.text("", 18, 0); dialog.addChild(messageText); yesButton = new Button("YES", 14, 50, 20, 0, 0, true, 0x8000, -1); yesButton.x = (((WIDTH / 2) - 5) - yesButton.width); yesButton.y = ((HEIGHT - 5) - yesButton.height); dialog.addChild(yesButton); yesButton.addEventListener(MouseEvent.CLICK, onYesClick); noButton = new Button("NO", 14, 50, 20, 0, 0, true, 0x800000, -1); noButton.x = ((WIDTH / 2) + 5); noButton.y = ((HEIGHT - 5) - noButton.height); dialog.addChild(noButton); noButton.addEventListener(MouseEvent.CLICK, onNoClick); } public function set message(_arg1:String):void{ messageText.text = _arg1; messageText.x = ((WIDTH / 2) - (messageText.width / 2)); messageText.y = 5; } public function set yesCallback(_arg1:Function):void{ yesCB = _arg1; } public function set noCallback(_arg1:Function):void{ noCB = _arg1; } public function onYesClick(_arg1:MouseEvent):void{ if (yesCB != null){ yesCB(); }; visible = false; } public function onNoClick(_arg1:MouseEvent):void{ if (noCB != null){ noCB(); }; visible = false; } } }//package com.wbwar.creeper.util
Section 113
//Damage (com.wbwar.creeper.util.Damage) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import flash.display.*; import flash.geom.*; public class Damage extends Projectile { private var PARTICLE_COUNT:int;// = 15 private var particleHead:Particle; private var particleCount:int; private var bm:Bitmap; private var particles:Array; public var active:Boolean; private var particleOffset:int; private var maxAge:int; private var age:int; public function Damage(_arg1:int, _arg2:int, _arg3:int){ particles = []; super(); this.maxAge = _arg2; this.age = _arg3; PARTICLE_COUNT = _arg1; init(); } private function init():void{ mouseChildren = false; mouseEnabled = false; graphics.lineStyle(2, 0xFF0000); var _local1:BitmapData = new BitmapData(50, 50, true, 0); bm = new Bitmap(_local1); bm.x = -25; bm.y = -25; addChild(bm); var _local2:int; while (_local2 < PARTICLE_COUNT) { particles[particleOffset] = new Particle(age); particleOffset++; _local2++; }; GameSpace.instance.projectiles.addProjectile(this); } private function done():void{ GameSpace.instance.projectiles.removeProjectile(this); } override public function update():void{ var _local1:Particle; var _local4:Number; var _local5:Number; var _local2:int; bm.bitmapData.lock(); bm.bitmapData.fillRect(new Rectangle(0, 0, bm.bitmapData.width, bm.bitmapData.height), 0); var _local3:int; while (_local3 < PARTICLE_COUNT) { _local1 = particles[_local3]; if (_local1.ready){ _local2++; _local1.update(); if (_local1.age >= maxAge){ _local1.ready = false; if (active){ _local1.reset(); }; } else { _local4 = ((1 - (_local1.age / maxAge)) * 0xFF); _local5 = ((int(_local4) << 24) | 0xFFFFFF); bm.bitmapData.fillRect(new Rectangle((_local1.x + (bm.bitmapData.width / 2)), (_local1.y + (bm.bitmapData.height / 2)), 2, 2), _local5); }; }; _local3++; }; bm.bitmapData.unlock(); if (_local2 == 0){ done(); }; } } }//package com.wbwar.creeper.util
Section 114
//DataTimer (com.wbwar.creeper.util.DataTimer) package com.wbwar.creeper.util { import flash.utils.*; public class DataTimer extends Timer { private var _data:Object; public function DataTimer(_arg1:Number, _arg2:int=0){ super(_arg1, _arg2); _data = {}; } public function set data(_arg1:Object):void{ _data = _arg1; } public function get data():Object{ return (_data); } } }//package com.wbwar.creeper.util
Section 115
//FlowContainer (com.wbwar.creeper.util.FlowContainer) package com.wbwar.creeper.util { import flash.display.*; import flash.events.*; import flash.geom.*; public class FlowContainer extends Sprite { private var currentY:int; private var containerRect:Rectangle; public var WIDTH:int; public var HEIGHT:int; private var contentContainer:Sprite; private var scrollBar:Slider; private var content:Sprite; public function FlowContainer(_arg1:int, _arg2:int){ this.WIDTH = _arg1; this.HEIGHT = _arg2; contentContainer = new Sprite(); containerRect = new Rectangle(0, 0, (WIDTH - 16), HEIGHT); contentContainer.scrollRect = containerRect; addChild(contentContainer); content = new Sprite(); contentContainer.addChild(content); scrollBar = new Slider(0xFFFFFF, 0xFF00, (HEIGHT - 9), 0); scrollBar.rotation = 90; scrollBar.x = (WIDTH - 2); scrollBar.y = 3; scrollBar.scaleY = 1.5; addChild(scrollBar); scrollBar.addEventListener(Slider.SLIDER_CHANGING, onScrollbarChange); scrollBar.addEventListener(Slider.SLIDER_CHANGED, onScrollbarChange); } private function onScrollbarChange(_arg1:Event):void{ content.y = -(scrollBar.value); } public function addContent(_arg1:DisplayObject, _arg2:int=-1):void{ content.addChild(_arg1); _arg1.x = ((containerRect.width / 2) - (_arg1.width / 2)); _arg1.y = currentY; if (_arg2 < 0){ currentY = (currentY + _arg1.height); } else { currentY = (currentY + _arg2); }; var _local3:int = (content.height - containerRect.height); if (_local3 < 0){ _local3 = 0; scrollBar.visible = false; } else { scrollBar.visible = true; scrollBar.maxValue = _local3; }; } } }//package com.wbwar.creeper.util
Section 116
//GameArrayUtil (com.wbwar.creeper.util.GameArrayUtil) package com.wbwar.creeper.util { public class GameArrayUtil { public static function csvAsIntArray(_arg1:String):Array{ var _local2:Array; if ((((_arg1 == null)) || ((_arg1.length == 0)))){ return (new Array()); }; _local2 = _arg1.split(","); var _local3:int; while (_local3 < _local2.length) { _local2[_local3] = int(_local2[_local3]); _local3++; }; return (_local2); } } }//package com.wbwar.creeper.util
Section 117
//Graph (com.wbwar.creeper.util.Graph) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import flash.utils.*; public class Graph { private static var openSetD:Dictionary; private static var tentative_is_better:Boolean; private static var dy:Number; private static var dx:Number; private static var sqrt:Function = Math.sqrt; private static var path:Path; private static var tentative_g_score:Number; private static var closedSetD:Dictionary; private static var openSet:Array; private static var hdx:Number; private static var hdy:Number; public static function travelPath(_arg1:Places, _arg2:Place, _arg3:Place):Array{ return (reversePath(astar(_arg1, _arg2, _arg3))); } private static function reversePath(_arg1:Place):Array{ if (_arg1 == null){ return ([]); }; var _local2:Array = [_arg1]; var _local3:Place = _arg1.came_from; while (_local3 != null) { _local2.push(_local3); _local3 = _local3.came_from; }; return (_local2.reverse()); } private static function hfunc(_arg1:Place, _arg2:Place):Number{ hdx = (_arg2.x - _arg1.x); hdy = (_arg2.y - _arg1.y); return (sqrt(((hdx * hdx) + (hdy * hdy)))); } public static function astar(_arg1:Places, _arg2:Place, _arg3:Place):Place{ var _local4:Place; var _local5:Place; _arg1.resetGraphData(); closedSetD = new Dictionary(true); openSet = [_arg2]; openSetD = new Dictionary(true); openSetD[_arg2] = _arg2; _arg2.g_score = 0; _arg2.h_score = hfunc(_arg2, _arg3); _arg2.f_score = _arg2.h_score; while (openSet.length > 0) { openSet.sortOn("f_score", (Array.DESCENDING | Array.NUMERIC)); _local5 = openSet.pop(); openSetD[_local5] = null; if (_local5 == _arg3){ return (_local5); }; closedSetD[_local5] = _local5; if (((!((_local5 == _arg2))) && (_local5.building))){ } else { for each (path in _local5.paths) { _local4 = path.getOtherEnd(_local5); if (((((!((_local4 == _arg2))) && (_local4.building))) && (!((_local4 == _arg3))))){ } else { if (closedSetD[_local4] != null){ } else { dx = (_local5.x - _local4.x); dy = (_local5.y - _local4.y); tentative_g_score = (_local5.g_score + sqrt(((dx * dx) + (dy * dy)))); tentative_is_better = false; if (openSetD[_local4] == null){ openSet.push(_local4); openSetD[_local4] = _local4; _local4.h_score = hfunc(_local4, _arg3); tentative_is_better = true; } else { if (tentative_g_score < _local4.g_score){ tentative_is_better = true; }; }; if (tentative_is_better){ _local4.came_from = _local5; _local4.g_score = tentative_g_score; _local4.f_score = (_local4.g_score + _local4.h_score); }; }; }; }; }; }; return (null); } } }//package com.wbwar.creeper.util
Section 118
//GraphLegendButton (com.wbwar.creeper.util.GraphLegendButton) package com.wbwar.creeper.util { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.text.*; import caurina.transitions.*; public class GraphLegendButton extends Sprite { private var _selected:Boolean;// = true private var color:Number; private var titleText:TextField; private var block:Shape; private var background:Shape; public static const WIDTH:int = 120; public static const HEIGHT:int = 18; public function GraphLegendButton(_arg1:String, _arg2:Number){ this.color = _arg2; background = new Shape(); addChild(background); background.visible = false; background.graphics.beginFill(0x909000); background.graphics.drawRect(0, 0, WIDTH, HEIGHT); background.graphics.endFill(); titleText = Text.text(_arg1, 10, 0xFFFFFF); titleText.filters = [new DropShadowFilter(2)]; addChild(titleText); titleText.x = 15; block = new Shape(); addChild(block); draw(); useHandCursor = true; buttonMode = true; addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); } public function draw():void{ block.graphics.clear(); if (_selected){ block.graphics.beginFill(color); } else { block.graphics.beginFill(0); }; block.graphics.drawRect(4, 4, 10, 10); block.graphics.endFill(); } private function onMouseOut(_arg1:MouseEvent):void{ Tweener.addTween(background, {time:1, _autoAlpha:0}); } private function onMouseOver(_arg1:MouseEvent):void{ Tweener.addTween(background, {time:1, _autoAlpha:1}); } public function set selected(_arg1:Boolean):void{ _selected = _arg1; draw(); } public function get selected():Boolean{ return (_selected); } } }//package com.wbwar.creeper.util
Section 119
//LineGraph (com.wbwar.creeper.util.LineGraph) package com.wbwar.creeper.util { import flash.display.*; import flash.filters.*; import flash.text.*; public class LineGraph extends Sprite { private var grid:Shape; private var _data:Array; private var yText:TextField; public var lineColor; private var backgroundColor:Number; private var GRAPH_HEIGHT:int; private var GRAPH_WIDTH:int; private var nameText:TextField; private var WIDTH:int; private var HEIGHT:int; public var yMax:Number; private var dataLength:int; private var graphArea:Shape; public function LineGraph(_arg1:int, _arg2:int, _arg3, _arg4:Number, _arg5:String){ this.WIDTH = _arg1; this.HEIGHT = _arg2; this.lineColor = _arg3; this.backgroundColor = _arg4; grid = new Shape(); addChild(grid); graphArea = new Shape(); addChild(graphArea); graphArea.filters = [new DropShadowFilter(2, 45, 0xFFFFFF)]; if (_arg5 != null){ nameText = Text.text(_arg5, 10, 0xFFFFFF); nameText.x = ((WIDTH / 2) - (nameText.width / 2)); nameText.y = ((HEIGHT - 2) - nameText.height); addChild(nameText); GRAPH_HEIGHT = (nameText.y - 2); } else { GRAPH_HEIGHT = HEIGHT; }; } private function drawGrid():void{ var _local3:int; graphics.clear(); if (dataLength == 0){ return; }; var _local1:Number = (GRAPH_WIDTH / (dataLength - 1)); var _local2:Number = (GRAPH_HEIGHT / yMax); grid.graphics.beginFill(backgroundColor); grid.graphics.drawRect(0, 0, (GRAPH_WIDTH + 2), (GRAPH_HEIGHT + 2)); grid.graphics.endFill(); grid.graphics.lineStyle(1, 0x505050); _local3 = 0; while (_local3 < dataLength) { grid.graphics.moveTo((_local3 * _local1), 0); grid.graphics.lineTo((_local3 * _local1), GRAPH_HEIGHT); _local3 = (_local3 + 3); }; _local3 = 0; while (_local3 < int(yMax)) { grid.graphics.moveTo(0, (GRAPH_HEIGHT - (_local3 * _local2))); grid.graphics.lineTo(GRAPH_WIDTH, (GRAPH_HEIGHT - (_local3 * _local2))); _local3++; }; grid.graphics.lineStyle(1, 0xFFFFFF); grid.graphics.drawRect(0, 0, (GRAPH_WIDTH + 2), (GRAPH_HEIGHT + 2)); } private function draw():void{ var _local1:Number; var _local2:int; graphArea.graphics.clear(); if (yMax < 1){ yMax = 1; }; graphArea.x = 0; GRAPH_WIDTH = WIDTH; if (nameText != null){ nameText.x = ((graphArea.x + (GRAPH_WIDTH / 2)) - (nameText.width / 2)); }; grid.x = (graphArea.x - 1); grid.y = (graphArea.y - 1); drawGrid(); if (dataLength == 0){ return; }; if ((data[0] is Array)){ _local2 = 0; while (_local2 < data.length) { drawLine(data[_local2], lineColor[_local2]); _local2++; }; } else { drawLine(data, lineColor); }; } public function set data(_arg1:Array):void{ _data = _arg1; if ((_data[0] is Array)){ dataLength = _data[0].length; } else { dataLength = _data.length; }; draw(); } public function get data():Array{ return (_data); } private function drawLine(_arg1:Array, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number = (GRAPH_WIDTH / (_arg1.length - 1)); var _local6:Number = (GRAPH_HEIGHT / yMax); _local3 = 0; _local4 = (GRAPH_HEIGHT - (_arg1[0] * _local6)); graphArea.graphics.lineStyle(2, _arg2); graphArea.graphics.moveTo(_local3, _local4); var _local7 = 1; while (_local7 < _arg1.length) { _local3 = (_local7 * _local5); _local4 = (GRAPH_HEIGHT - (_arg1[_local7] * _local6)); graphArea.graphics.lineTo(_local3, _local4); _local7++; }; } } }//package com.wbwar.creeper.util
Section 120
//LOS (com.wbwar.creeper.util.LOS) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import com.wbwar.creeper.games.*; public class LOS { public static function hasLOS(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:Boolean=false):Boolean{ var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:Number = GameSpace.instance.terrain.terrainHeight[(_arg1 + (_arg2 * GameSpace.WIDTH))]; var _local16:Number = (_local15 + (Game.TERRAIN_HEIGHT_MULTIPLE / 2)); var _local17:Number = GameSpace.instance.terrain.terrainHeight[(_arg3 + (_arg4 * GameSpace.WIDTH))]; var _local18:Number = (_local17 - _local16); var _local19:Number = _local16; _local13 = _arg1; _local14 = _arg2; _local7 = (_arg3 - _arg1); _local8 = (_arg4 - _arg2); _local10 = ((_local7)>0) ? 1 : -1; _local11 = ((_local8)>0) ? 1 : -1; _local7 = ((_local7 < 0)) ? -(_local7) : _local7; _local8 = ((_local8 < 0)) ? -(_local8) : _local8; if (GameSpace.instance.walls.wallData[(_local13 + (_local14 * GameSpace.WIDTH))] > 0){ return (false); }; if (_local7 > _local8){ _local18 = (_local18 / _local7); _local12 = (_local7 / 2); _local9 = 1; while (_local9 <= _local7) { _local13 = (_local13 + _local10); _local12 = (_local12 + _local8); if (_local12 >= _local7){ _local12 = (_local12 - _local7); _local14 = (_local14 + _local11); }; if (GameSpace.instance.walls.wallData[(_local13 + (_local14 * GameSpace.WIDTH))] > 0){ return (false); }; if (!_arg5){ if (_arg6){ if (GameSpace.instance.terrain.terrainHeight[(_local13 + (_local14 * GameSpace.WIDTH))] != _local15){ return (false); }; } else { if (GameSpace.instance.terrain.terrainHeight[(_local13 + (_local14 * GameSpace.WIDTH))] > _local15){ return (false); }; }; }; _local19 = (_local19 + _local18); _local9++; }; } else { _local18 = (_local18 / _local8); _local12 = (_local8 / 2); _local9 = 1; while (_local9 <= _local8) { _local14 = (_local14 + _local11); _local12 = (_local12 + _local7); if (_local12 >= _local8){ _local12 = (_local12 - _local8); _local13 = (_local13 + _local10); }; if (GameSpace.instance.walls.wallData[(_local13 + (_local14 * GameSpace.WIDTH))] > 0){ return (false); }; if (!_arg5){ if (_arg6){ if (GameSpace.instance.terrain.terrainHeight[(_local13 + (_local14 * GameSpace.WIDTH))] != _local15){ return (false); }; } else { if (GameSpace.instance.terrain.terrainHeight[(_local13 + (_local14 * GameSpace.WIDTH))] > _local15){ return (false); }; }; }; _local19 = (_local19 + _local18); _local9++; }; }; return (true); } } }//package com.wbwar.creeper.util
Section 121
//MD5 (com.wbwar.creeper.util.MD5) package com.wbwar.creeper.util { public class MD5 { public static const HEX_FORMAT_LOWERCASE:uint = 0; public static const HEX_FORMAT_UPPERCASE:uint = 1; public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = ""; public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "="; public static var hexcase:uint = 0; public static var b64pad:String = ""; public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{ return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3)); } public static function binl_md5(_arg1:Array, _arg2:Number):Array{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32))); _arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2; var _local3:Number = 1732584193; var _local4:Number = -271733879; var _local5:Number = -1732584194; var _local6:Number = 271733878; var _local7:Number = 0; while (_local7 < _arg1.length) { _local8 = _local3; _local9 = _local4; _local10 = _local5; _local11 = _local6; _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551); _local3 = safe_add(_local3, _local8); _local4 = safe_add(_local4, _local9); _local5 = safe_add(_local5, _local10); _local6 = safe_add(_local6, _local11); _local7 = (_local7 + 16); }; return ([_local3, _local4, _local5, _local6]); } public static function str2rstr_utf16le(_arg1:String):String{ var _local2 = ""; var _local3:Number = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF))); _local3++; }; return (_local2); } public static function hex_hmac_md5(_arg1:String, _arg2:String):String{ return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)))); } public static function binl2rstr(_arg1:Array):String{ var _local2 = ""; var _local3:Number = 0; while (_local3 < (_arg1.length * 32)) { _local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF))); _local3 = (_local3 + 8); }; return (_local2); } public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function rstr2binl(_arg1:String):Array{ var _local3:Number; var _local2:Array = Array((_arg1.length >> 2)); _local3 = 0; while (_local3 < _local2.length) { _local2[_local3] = 0; _local3++; }; _local3 = 0; while (_local3 < (_arg1.length * 8)) { _local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | ((_arg1.charCodeAt((_local3 / 8)) & 0xFF) << (_local3 % 32))); _local3 = (_local3 + 8); }; return (_local2); } public static function md5_vm_test():Boolean{ return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72")); } public static function b64_md5(_arg1:String):String{ return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1)))); } public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{ return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3)); } public static function hex_md5(_arg1:String):String{ return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1)))); } public static function bit_rol(_arg1:Number, _arg2:Number):Number{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } public static function encrypt(_arg1:String):String{ return (hex_md5(_arg1)); } public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function rstr2hex(_arg1:String):String{ var _local4:Number; var _local2:String = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef"; var _local3 = ""; var _local5:Number = 0; while (_local5 < _arg1.length) { _local4 = _arg1.charCodeAt(_local5); _local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15)))); _local5++; }; return (_local3); } public static function any_md5(_arg1:String, _arg2:String):String{ return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2)); } public static function b64_hmac_md5(_arg1:String, _arg2:String):String{ return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)))); } public static function rstr2b64(_arg1:String):String{ var _local6:Number; var _local7:Number; var _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var _local3 = ""; var _local4:Number = _arg1.length; var _local5:Number = 0; while (_local5 < _local4) { _local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0); _local7 = 0; while (_local7 < 4) { if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){ _local3 = (_local3 + b64pad); } else { _local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63))); }; _local7++; }; _local5 = (_local5 + 3); }; return (_local3); } public static function safe_add(_arg1:Number, _arg2:Number):Number{ var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF)); var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return (((_local4 << 16) | (_local3 & 0xFFFF))); } public static function str2rstr_utf8(_arg1:String):String{ var _local4:Number; var _local5:Number; var _local2 = ""; var _local3:Number = -1; while (++_local3 < _arg1.length) { _local4 = _arg1.charCodeAt(_local3); _local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0; if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){ _local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023)); _local3++; }; if (_local4 <= 127){ _local2 = (_local2 + String.fromCharCode(_local4)); } else { if (_local4 <= 2047){ _local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63)))); } else { if (_local4 <= 0xFFFF){ _local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63)))); } else { if (_local4 <= 2097151){ _local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63)))); }; }; }; }; }; return (_local2); } public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{ var _local3:Array = rstr2binl(_arg1); if (_local3.length > 16){ _local3 = binl_md5(_local3, (_arg1.length * 8)); }; var _local4:Array = Array(16); var _local5:Array = Array(16); var _local6:Number = 0; while (_local6 < 16) { _local4[_local6] = (_local3[_local6] ^ 909522486); _local5[_local6] = (_local3[_local6] ^ 1549556828); _local6++; }; var _local7:Array = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8))); return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128)))); } public static function str2rstr_utf16be(_arg1:String):String{ var _local2 = ""; var _local3:Number = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF))); _local3++; }; return (_local2); } public static function rstr2any(_arg1:String, _arg2:String):String{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local3:Number = _arg2.length; var _local4:Array = []; var _local9:Array = Array((_arg1.length / 2)); _local5 = 0; while (_local5 < _local9.length) { _local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1))); _local5++; }; while (_local9.length > 0) { _local8 = []; _local7 = 0; _local5 = 0; while (_local5 < _local9.length) { _local7 = ((_local7 << 16) + _local9[_local5]); _local6 = Math.floor((_local7 / _local3)); _local7 = (_local7 - (_local6 * _local3)); if ((((_local8.length > 0)) || ((_local6 > 0)))){ _local8[_local8.length] = _local6; }; _local5++; }; _local4[_local4.length] = _local7; _local9 = _local8; }; var _local10 = ""; _local5 = (_local4.length - 1); while (_local5 >= 0) { _local10 = (_local10 + _arg2.charAt(_local4[_local5])); _local5--; }; return (_local10); } public static function rstr_md5(_arg1:String):String{ return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8)))); } } }//package com.wbwar.creeper.util
Section 122
//MessageBubble (com.wbwar.creeper.util.MessageBubble) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.text.*; import flash.utils.*; import caurina.transitions.*; public class MessageBubble extends Sprite { private var loc:int; public var arrowPoints:Array; public var textField:TextField; private var centerText:Boolean; private var targetX:int; private var targetY:int; private var fixedWidth:int; private var t:Timer; private var fixedHeight:int; public function MessageBubble(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int=-1){ arrowPoints = new Array(); super(); this.fixedWidth = _arg5; this.fixedHeight = _arg6; this.targetX = _arg3; this.targetY = _arg4; GameSpace.instance.tutorialLayer.addChild(this); textField = Text.text("", 14, 0xFFFFFF); textField.filters = [new DropShadowFilter()]; addChild(textField); textField.x = 5; textField.y = 5; textField.wordWrap = true; textField.width = (_arg5 - 10); this.x = _arg1; this.y = _arg2; visible = false; alpha = 0; this.filters = [new DropShadowFilter()]; } public function hide(_arg1:Boolean=true):void{ if (_arg1){ Tweener.addTween(this, {time:0.5, _autoAlpha:0, onComplete:remove}); } else { Tweener.addTween(this, {time:0.5, _autoAlpha:0}); }; } private function update():void{ var _local3:Point; var _local1:int = fixedWidth; textField.width = (_local1 - 20); var _local2:int = (textField.height + 10); if (fixedHeight >= 0){ _local2 = fixedHeight; }; graphics.clear(); graphics.lineStyle(4, 14737624); graphics.beginFill(2101264); graphics.drawRoundRect(0, 0, _local1, _local2, 16, 16); graphics.endFill(); if (targetX >= 0){ drawArrow(targetX, targetY); }; for each (_local3 in arrowPoints) { drawArrow(_local3.x, _local3.y); }; } public function remove():void{ if (GameSpace.instance.tutorialLayer.contains(this)){ GameSpace.instance.tutorialLayer.removeChild(this); }; } public function drawArrow(_arg1:int, _arg2:int):void{ var _local7:int; var _local8:int; var _local3:int = fixedWidth; var _local4:int = (textField.height + 10); if (fixedHeight >= 0){ _local4 = fixedHeight; }; var _local5:int = (_arg1 - x); var _local6:int = (_arg2 - y); if (_local5 < 0){ _local7 = 0; } else { _local7 = _local3; }; if (_local6 < 0){ _local8 = 0; } else { _local8 = _local4; }; graphics.lineStyle(3, 14737624); ColorUtil.drawArrow(graphics, _local7, _local8, _local5, _local6); } private function onTimer(_arg1:TimerEvent):void{ hide(true); } public function showTimed(_arg1:int):void{ show(); t = new Timer(_arg1, 1); t.addEventListener(TimerEvent.TIMER, onTimer); t.start(); } public function show():void{ update(); Tweener.addTween(this, {time:0.5, _autoAlpha:1}); } } }//package com.wbwar.creeper.util
Section 123
//MessageDialog (com.wbwar.creeper.util.MessageDialog) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import flash.display.*; import flash.events.*; import flash.filters.*; import flash.text.*; import caurina.transitions.*; public class MessageDialog extends Sprite { private var loc:int; private var startX:int; public var textField:TextField; private var side:int; private var centerText:Boolean; private var targetX:int; private var targetY:int; public var okButton:Button; private var fixedWidth:int; private var startY:int; private var fixedHeight:int; public static const SIDE_BOTTOM:int = 3; public static const SIDE_RIGHT:int = 1; public static const OK_CLICK:String = "com.wbwar.creeper.util.MessageDialog.OK_CLICK"; public static const SIDE_TOP:int = 2; public static const SIDE_LEFT:int = 0; public function MessageDialog(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:Boolean=false){ this.side = _arg1; this.loc = _arg2; this.fixedWidth = _arg3; this.fixedHeight = _arg4; this.centerText = _arg6; GameSpace.instance.tutorialLayer.addChild(this); textField = Text.text("", 14, 0xFFFFFF); textField.filters = [new DropShadowFilter()]; addChild(textField); textField.x = 5; textField.y = 5; if (!_arg6){ textField.wordWrap = true; textField.width = (_arg3 - 10); }; okButton = new Button("Continue", 12, 100, 20, 0, 0, true, 3182640, 0xFFFFFF); okButton.x = ((_arg3 / 2) - (okButton.width / 2)); addChild(okButton); if (!_arg5){ okButton.visible = false; } else { okButton.addEventListener(MouseEvent.CLICK, onOkClick); }; visible = false; } public function hide(_arg1:Boolean):void{ if (_arg1){ if ((((side == SIDE_LEFT)) || ((side == SIDE_RIGHT)))){ Tweener.addTween(this, {time:0.5, x:startX, onComplete:remove}); } else { Tweener.addTween(this, {time:0.5, y:startY, onComplete:remove}); }; } else { if ((((side == SIDE_LEFT)) || ((side == SIDE_RIGHT)))){ Tweener.addTween(this, {time:0.5, x:startX}); } else { Tweener.addTween(this, {time:0.5, y:startY}); }; }; } private function update():void{ var _local1:int = fixedWidth; if (!centerText){ textField.width = (_local1 - 20); }; var _local2:int = (((textField.height + 10) + okButton.height) + 5); if (fixedHeight >= 0){ _local2 = fixedHeight; }; graphics.clear(); graphics.lineStyle(4, 7360592); graphics.beginFill(2101264); graphics.drawRoundRect(0, 0, _local1, _local2, 16, 16); graphics.endFill(); if (loc < 0){ if ((((side == SIDE_LEFT)) || ((side == SIDE_RIGHT)))){ loc = int((262 - (_local2 / 2))); } else { loc = int((350 - (_local1 / 2))); }; }; if (side == SIDE_RIGHT){ startX = ((GameSpace.WIDTH * GameSpace.CELL_WIDTH) + 5); targetX = (((GameSpace.WIDTH * GameSpace.CELL_WIDTH) - _local1) - 5); x = startX; y = loc; } else { if (side == SIDE_LEFT){ startX = (-(_local1) - 5); targetX = 5; x = startX; y = loc; } else { if (side == SIDE_TOP){ startY = (-(_local2) - 5); targetY = 5; x = loc; y = startY; } else { if (side == SIDE_BOTTOM){ startY = (((GameSpace.HEIGHT * GameSpace.CELL_HEIGHT) + 5) + 45); targetY = (((GameSpace.HEIGHT * GameSpace.CELL_HEIGHT) - _local2) - 5); x = loc; y = startY; }; }; }; }; if (centerText){ textField.x = ((_local1 / 2) - (textField.width / 2)); }; okButton.y = ((_local2 - 5) - okButton.height); } public function remove():void{ if (GameSpace.instance.tutorialLayer.contains(this)){ GameSpace.instance.tutorialLayer.removeChild(this); }; } public function show():void{ update(); visible = true; if ((((side == SIDE_LEFT)) || ((side == SIDE_RIGHT)))){ Tweener.addTween(this, {time:0.5, x:targetX}); } else { Tweener.addTween(this, {time:0.5, y:targetY}); }; } public function onOkClick(_arg1:MouseEvent):void{ _arg1.stopImmediatePropagation(); hide(true); dispatchEvent(new Event(OK_CLICK)); } } }//package com.wbwar.creeper.util
Section 124
//Navigation (com.wbwar.creeper.util.Navigation) package com.wbwar.creeper.util { public class Navigation { public static function toStandardAngle(_arg1:Number):Number{ _arg1 = (_arg1 % 360); var _local2:Number = (360 - ((_arg1)<0) ? (_arg1 + 360) : _arg1); return (((_local2)==360) ? 0 : _local2); } public static function angleSpan(_arg1:Number, _arg2:Number):Number{ var _local3:Number = toStandardAngle(_arg1); var _local4:Number = toStandardAngle(_arg2); var _local5:Number = toStandardAngle((_local3 - _local4)); var _local6:Number = (360 - toStandardAngle((_local3 - _local4))); if (_local6 < _local5){ return (_local6); }; return (-(_local5)); } } }//package com.wbwar.creeper.util
Section 125
//ObjectPool (com.wbwar.creeper.util.ObjectPool) package com.wbwar.creeper.util { public class ObjectPool { public var size:int;// = 0 private var disposed:Boolean;// = false private var _maxSize:int; public var clean:Function; public var length:int;// = 0 private var _minSize:int; public var create:Function; private var list:Array; public function ObjectPool(_arg1:Function, _arg2:Function=null, _arg3:int=50, _arg4:int=200){ list = []; super(); this.create = _arg1; this.clean = _arg2; this.minSize = _arg3; this.maxSize = _arg4; var _local5:int; while (_local5 < _arg3) { add(); _local5++; }; } public function get minSize():int{ return (_minSize); } public function dispose():void{ if (disposed){ return; }; disposed = true; create = null; clean = null; list = null; } public function checkIn(_arg1):void{ if (clean != null){ clean(_arg1); }; var _local2 = length++; list[_local2] = _arg1; } private function add():void{ var _local1 = length++; list[_local1] = create(); size++; } public function set maxSize(_arg1:int):void{ _maxSize = _arg1; if (_maxSize < list.length){ list.splice(_maxSize); }; size = list.length; if (_maxSize < _minSize){ _minSize = _maxSize; }; } public function set minSize(_arg1:int):void{ _minSize = _arg1; if (_minSize > _maxSize){ _maxSize = _minSize; }; if (_maxSize < list.length){ list.splice(_maxSize); }; size = list.length; } public function get maxSize():int{ return (_maxSize); } public function checkOut(){ if (length == 0){ if (size < maxSize){ size++; return (create()); }; return (null); }; return (list[--length]); } } }//package com.wbwar.creeper.util
Section 126
//Particle (com.wbwar.creeper.util.Particle) package com.wbwar.creeper.util { public class Particle { public var deltaX:Number;// = 0 public var deltaY:Number;// = 0 public var ready:Boolean; private var speed:Number; public var next:Particle; public var x:Number;// = 0 public var y:Number;// = 0 public var prev:Particle; public var age:int;// = 0 public function Particle(_arg1:Number){ this.speed = _arg1; reset(); } public function update():void{ x = (x + deltaX); y = (y + deltaY); age++; } public function reset():void{ ready = true; var _local1:Number = (speed + Math.random()); var _local2:Number = ((Math.random() * 2) * Math.PI); deltaX = (Math.cos(_local2) * _local1); deltaY = (Math.sin(_local2) * _local1); x = 0; y = 0; age = 0; } } }//package com.wbwar.creeper.util
Section 127
//PulsingArrow (com.wbwar.creeper.util.PulsingArrow) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import flash.display.*; import caurina.transitions.*; public class PulsingArrow extends Sprite { private var arrowShape:Shape; public function PulsingArrow(){ mouseEnabled = false; mouseChildren = false; arrowShape = new Shape(); arrowShape.graphics.lineStyle(1, 0xFFFFFF); arrowShape.graphics.beginFill(0x500000); arrowShape.graphics.moveTo(-7, -2); arrowShape.graphics.lineTo(0, -2); arrowShape.graphics.lineTo(0, -5); arrowShape.graphics.lineTo(7, 0); arrowShape.graphics.lineTo(0, 5); arrowShape.graphics.lineTo(0, 2); arrowShape.graphics.lineTo(-7, 2); arrowShape.graphics.lineTo(-7, -2); arrowShape.graphics.endFill(); addChild(arrowShape); tweenOut(); GameSpace.instance.tutorialLayer.addChild(this); } private function tweenOut():void{ Tweener.addTween(arrowShape, {time:0.5, x:-15, transition:"linear", onComplete:tweenIn}); } public function remove():void{ if (GameSpace.instance.tutorialLayer.contains(this)){ GameSpace.instance.tutorialLayer.removeChild(this); }; } private function tweenIn():void{ if (parent != null){ Tweener.addTween(arrowShape, {time:0.5, x:0, transition:"linear", onComplete:tweenOut}); }; } } }//package com.wbwar.creeper.util
Section 128
//PulsingArrowGameSpace (com.wbwar.creeper.util.PulsingArrowGameSpace) package com.wbwar.creeper.util { import com.wbwar.creeper.*; import flash.display.*; import caurina.transitions.*; public class PulsingArrowGameSpace extends Sprite { private var arrowShape:Shape; private var gameSpaceRect:Shape; public function PulsingArrowGameSpace(_arg1:Boolean=false){ mouseEnabled = false; mouseChildren = false; graphics.beginFill(0); graphics.drawCircle(0, 0, 2); gameSpaceRect = new Shape(); gameSpaceRect.graphics.lineStyle(2, 0xFF00); if (_arg1){ gameSpaceRect.graphics.drawRect((-(GameSpace.CELL_WIDTH) * 3), (-(GameSpace.CELL_HEIGHT) * 3), (GameSpace.CELL_WIDTH * 6), (GameSpace.CELL_HEIGHT * 6)); } else { gameSpaceRect.graphics.drawRect(-(GameSpace.CELL_WIDTH), -(GameSpace.CELL_HEIGHT), (GameSpace.CELL_WIDTH * 2), (GameSpace.CELL_HEIGHT * 2)); }; addChild(gameSpaceRect); arrowShape = new Shape(); arrowShape.graphics.lineStyle(1, 0xFFFFFF); arrowShape.graphics.beginFill(0x500000); arrowShape.graphics.moveTo(-9, -3); arrowShape.graphics.lineTo(0, -3); arrowShape.graphics.lineTo(0, -7); arrowShape.graphics.lineTo(9, 0); arrowShape.graphics.lineTo(0, 7); arrowShape.graphics.lineTo(0, 3); arrowShape.graphics.lineTo(-9, 3); arrowShape.graphics.lineTo(-9, -3); arrowShape.graphics.endFill(); arrowShape.rotation = 90; arrowShape.y = (-(GameSpace.CELL_HEIGHT) - 7); addChild(arrowShape); tweenOut(); GameSpace.instance.tutorialLayer.addChild(this); } private function tweenIn():void{ if (parent != null){ Tweener.addTween(arrowShape, {time:0.5, y:(-(GameSpace.CELL_HEIGHT) - 3), transition:"linear", onComplete:tweenOut}); }; } public function remove():void{ if (GameSpace.instance.tutorialLayer.contains(this)){ GameSpace.instance.tutorialLayer.removeChild(this); }; } private function tweenOut():void{ Tweener.addTween(arrowShape, {time:0.5, y:(-(GameSpace.CELL_HEIGHT) - 19), transition:"linear", onComplete:tweenIn}); } } }//package com.wbwar.creeper.util
Section 129
//Random (com.wbwar.creeper.util.Random) package com.wbwar.creeper.util { public class Random { protected var _currentSeed:uint;// = 0 protected var _seed:uint;// = 0 protected static var _instance:Random; public function Random(_arg1:uint=1){ _seed = (_currentSeed = _arg1); } public function set seed(_arg1:uint):void{ _seed = (_currentSeed = _arg1); } public function random():Number{ return ((((_currentSeed = ((_currentSeed * 16807) % 2147483647)) / 2147483647) + 2.33E-10)); } public function boolean(_arg1:Number=0.5):Boolean{ return ((random() < _arg1)); } public function get currentSeed():uint{ return (_currentSeed); } public function bit(_arg1:Number=0.5):int{ return (((random())<_arg1) ? 1 : 0); } public function reset():void{ _seed = _currentSeed; } public function get seed():uint{ return (_seed); } public function float(_arg1:Number, _arg2:Number=NaN):Number{ if (isNaN(_arg2)){ _arg2 = _arg1; _arg1 = 0; }; return (((random() * (_arg2 - _arg1)) + _arg1)); } public function sign(_arg1:Number=0.5):int{ return (((random())<_arg1) ? 1 : -1); } public function integer(_arg1:Number, _arg2:Number=NaN):int{ if (isNaN(_arg2)){ _arg2 = _arg1; _arg1 = 0; }; return (Math.floor(float(_arg1, _arg2))); } public static function random():Number{ return (instance.random()); } public static function set seed(_arg1:uint):void{ instance.seed = _arg1; } public static function get currentSeed():uint{ return (instance.currentSeed); } public static function bit(_arg1:Number=0.5):int{ return (instance.bit(_arg1)); } public static function boolean(_arg1:Number=0.5):Boolean{ return (instance.boolean(_arg1)); } public static function get seed():uint{ return (instance.seed); } public static function get instance():Random{ if (_instance == null){ _instance = new (Random); }; return (_instance); } public static function reset():void{ instance.reset(); } public static function float(_arg1:Number, _arg2:Number=NaN):Number{ return (instance.float(_arg1, _arg2)); } public static function sign(_arg1:Number=0.5):int{ return (instance.sign(_arg1)); } public static function integer(_arg1:Number, _arg2:Number=NaN):int{ return (instance.integer(_arg1, _arg2)); } } }//package com.wbwar.creeper.util
Section 130
//RC4 (com.wbwar.creeper.util.RC4) package com.wbwar.creeper.util { import flash.utils.*; public class RC4 { protected static var mykey:Array = new Array(0xFF); protected static var sbox:Array = new Array(0xFF); public static function charsToHex(_arg1:Array):String{ var _local2:String = new String(""); var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); var _local4:Number = 0; while (_local4 < _arg1.length) { _local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)])); _local4++; }; return (_local2); } public static function encryptBA(_arg1:ByteArray, _arg2:String):String{ var _local3:Array = baToChars(_arg1); var _local4:Array = strToChars(_arg2); var _local5:Array = calculate(_local3, _local4); return (charsToHex(_local5)); } public static function encrypt(_arg1:String, _arg2:String):String{ var _local3:Array = strToChars(_arg1); var _local4:Array = strToChars(_arg2); var _local5:Array = calculate(_local3, _local4); return (charsToHex(_local5)); } public static function hexToChars(_arg1:String):Array{ var _local2:Array = new Array(); var _local3:Number = ((_arg1.substr(0, 2))=="0x") ? 2 : 0; while (_local3 < _arg1.length) { _local2.push(parseInt(_arg1.substr(_local3, 2), 16)); _local3 = (_local3 + 2); }; return (_local2); } public static function baToChars(_arg1:ByteArray):Array{ var _local2:Array = []; _arg1.position = 0; var _local3:int = _arg1.bytesAvailable; var _local4:Number = 0; while (_local4 < _local3) { _local2[_local4] = _arg1.readUnsignedByte(); _local4++; }; return (_local2); } public static function decryptBA(_arg1:String, _arg2:String):ByteArray{ var _local3:Array = hexToChars(_arg1); var _local4:Array = strToChars(_arg2); var _local5:Array = calculate(_local3, _local4); return (charsToBa(_local5)); } public static function decrypt(_arg1:String, _arg2:String):String{ var _local3:Array = hexToChars(_arg1); var _local4:Array = strToChars(_arg2); var _local5:Array = calculate(_local3, _local4); return (charsToStr(_local5)); } public static function strToChars(_arg1:String):Array{ var _local2:Array = new Array(); var _local3:Number = 0; while (_local3 < _arg1.length) { _local2.push(_arg1.charCodeAt(_local3)); _local3++; }; return (_local2); } protected static function calculate(_arg1:Array, _arg2:Array):Array{ var _local6:Number; var _local7:Number; var _local8:Number; var _local10:Number; initialize(_arg2); var _local3:Number = 0; var _local4:Number = 0; var _local5:Array = new Array(); var _local9:Number = 0; while (_local9 < _arg1.length) { _local3 = ((_local3 + 1) % 0x0100); _local4 = ((_local4 + sbox[_local3]) % 0x0100); _local7 = sbox[_local3]; sbox[_local3] = sbox[_local4]; sbox[_local4] = _local7; _local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100); _local6 = sbox[_local10]; _local8 = (_arg1[_local9] ^ _local6); _local5.push(_local8); _local9++; }; return (_local5); } public static function encryptBANoHex(_arg1:ByteArray, _arg2:String):ByteArray{ var _local3:Array = baToChars(_arg1); var _local4:Array = strToChars(_arg2); return (arrayToByteArray(calculate(_local3, _local4))); } protected static function initialize(_arg1:Array):void{ var _local3:Number; var _local5:Number; var _local2:Number = 0; var _local4:Number = _arg1.length; _local5 = 0; while (_local5 <= 0xFF) { mykey[_local5] = _arg1[(_local5 % _local4)]; sbox[_local5] = _local5; _local5++; }; _local5 = 0; while (_local5 <= 0xFF) { _local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100); _local3 = sbox[_local5]; sbox[_local5] = sbox[_local2]; sbox[_local2] = _local3; _local5++; }; } public static function charsToStr(_arg1:Array):String{ var _local2:String = new String(""); var _local3:Number = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode(_arg1[_local3])); _local3++; }; return (_local2); } private static function arrayToByteArray(_arg1:Array):ByteArray{ var _local3:int; var _local2:ByteArray = new ByteArray(); for each (_local3 in _arg1) { _local2.writeByte(_local3); }; return (_local2); } public static function charsToBa(_arg1:Array):ByteArray{ var _local2:ByteArray = new ByteArray(); var _local3:int; while (_local3 < _arg1.length) { _local2.writeByte(_arg1[_local3]); _local3++; }; _local2.position = 0; return (_local2); } } }//package com.wbwar.creeper.util
Section 131
//Slider (com.wbwar.creeper.util.Slider) package com.wbwar.creeper.util { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.geom.*; public class Slider extends Sprite { private var sliderWidth:int; private var lineColor:Number; private var handle:Sprite; public var maxValue:Number; private var dragging:Boolean; private var boundsRect:Rectangle; public static const SLIDER_CHANGING:String = "SLIDER_CHANGING"; public static const SLIDER_CHANGED:String = "SLIDER_CHANGED"; public function Slider(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Number){ this.maxValue = _arg4; this.sliderWidth = _arg3; this.lineColor = _arg2; handle = new Sprite(); handle.graphics.beginFill(_arg1); handle.graphics.moveTo(-6, -4); handle.graphics.lineTo(6, -4); handle.graphics.lineTo(0, 4); handle.graphics.lineTo(-6, -4); handle.graphics.endFill(); handle.filters = [new GlowFilter(0, 1, 2, 2)]; handle.mouseEnabled = false; addChild(handle); handle.y = 5; boundsRect = new Rectangle(0, 5, _arg3, 0); draw(); addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true); useHandCursor = true; buttonMode = true; } private function onMouseDown(_arg1:MouseEvent):void{ handle.startDrag(true, boundsRect); handle.x = mouseX; dragging = true; dispatchEvent(new Event(SLIDER_CHANGING)); draw(); Creeper.instance.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true); Creeper.instance.stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true); } private function onMouseUp(_arg1:MouseEvent):void{ handle.stopDrag(); dragging = false; Creeper.instance.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); Creeper.instance.stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); dispatchEvent(new Event(SLIDER_CHANGED)); } public function set value(_arg1:Number):void{ handle.x = ((_arg1 / maxValue) * sliderWidth); } private function draw():void{ graphics.clear(); graphics.beginFill(0xFFFFFF, 0.05); graphics.drawRect(-4, -2, (boundsRect.width + 8), 14); graphics.endFill(); graphics.beginFill(0xFFFFFF, 0.05); graphics.drawRect(0, 0, boundsRect.width, 10); graphics.endFill(); graphics.beginFill(lineColor); graphics.drawRect(0, 4, boundsRect.width, 2); graphics.endFill(); } public function get value():Number{ return (((handle.x / sliderWidth) * maxValue)); } private function onMouseMove(_arg1:MouseEvent):void{ if (dragging){ dispatchEvent(new Event(SLIDER_CHANGING)); }; } } }//package com.wbwar.creeper.util
Section 132
//Text (com.wbwar.creeper.util.Text) package com.wbwar.creeper.util { import flash.text.*; public class Text { public static function text(_arg1:String, _arg2:uint, _arg3:uint, _arg4:String="left"):TextField{ var _local6:TextFormat; var _local5:TextField = new TextField(); _local5.mouseEnabled = false; _local6 = new TextFormat(); if (_arg2 <= 8){ _local6.font = "befontsmall"; } else { _local6.font = "befont"; }; _local6.color = _arg3; _local6.size = _arg2; _local5.embedFonts = true; if (_arg2 <= 8){ _local5.antiAliasType = AntiAliasType.NORMAL; } else { _local5.antiAliasType = AntiAliasType.ADVANCED; }; if (_arg2 <= 8){ _local5.sharpness = 400; } else { if (_arg2 <= 14){ _local5.sharpness = 200; }; }; _local5.defaultTextFormat = _local6; _local5.autoSize = _arg4; _local5.selectable = false; _local5.mouseEnabled = false; if (_arg1 != null){ _local5.text = _arg1; }; return (_local5); } } }//package com.wbwar.creeper.util
Section 133
//Time (com.wbwar.creeper.util.Time) package com.wbwar.creeper.util { public class Time { public static function getTimeString(_arg1:int):String{ var _local2:int = int((_arg1 / 60)); var _local3:int = (_arg1 - (_local2 * 60)); var _local4:String = ((_local3 >= 10)) ? String(_local3) : ("0" + String(_local3)); return (((String(_local2) + ":") + _local4)); } } }//package com.wbwar.creeper.util
Section 134
//ABM (com.wbwar.creeper.ABM) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; public class ABM extends Weapon { private var FIRERATEMOD:int; private var fireCounter:int; private var energyBar:Bar; private var lastEnergyLevel:Number;// = 0 private var lastHealth:Number;// = 0 private var healthBar:Bar; private var barrelShape:DisplayObject; private var bodyShape:DisplayObject; private static const MISSILE_ENERGY_TAKE:int = 20; private static const FIRE_TIME:int = 36; public static const BASE_COST:int = 100; public static var START_RANGE:int = 9; public static var unitCost:int = 1; public function ABM(_arg1:int, _arg2:int){ super(_arg1, _arg2); damageAmt = 0.5; RANGE = START_RANGE; energyBar = new Bar(20, 3, 0xFF0000, 0); addChild(energyBar); energyBar.x = -10; energyBar.y = -10; energyBar.setValue(0, 20); energyBar.filters = [new DropShadowFilter(1)]; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; addChild(placeBody); addChild(armedShape); addChild(turnedOffShape); bodyShape = getBodyShape(); placeBody.addChild(bodyShape); bodyShape.filters = [new DropShadowFilter(2)]; barrelShape = getBarrelShape(); placeBody.addChild(barrelShape); barrelShape.visible = false; if (GameSpace.instance != null){ places.addPlace(this); }; } override public function get maxHealth():Number{ return (BASE_COST); } private function fire():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Projectile; var _local5:int = (GameSpace.instance.projectiles.numChildren - 1); while (_local5 >= 0) { _local4 = (GameSpace.instance.projectiles.getChildAt(_local5) as Projectile); if ((_local4 is GlopBlob)){ _local2 = (_local4.x - x); _local3 = (_local4.y - y); _local1 = ((_local2 * _local2) + (_local3 * _local3)); if (_local1 <= (((RANGE * GameSpace.CELL_WIDTH) * RANGE) * GameSpace.CELL_WIDTH)){ fireCounter = (FIRE_TIME - FIRERATEMOD); energyLevel = (energyLevel - MISSILE_ENERGY_TAKE); new Missile(x, y); _local2 = (_local4.x - x); _local3 = (_local4.y - y); barrelShape.rotation = ((Math.atan2(_local3, _local2) * 180) / Math.PI); break; }; }; _local5--; }; } override public function update():void{ super.update(); if (RANGE != START_RANGE){ RANGE = START_RANGE; }; if (GameSpace.instance.upgradeWeapon1){ FIRERATEMOD = 1; } else { FIRERATEMOD = 0; }; if (state == STATE_PLACED){ healthBar.visible = true; energyBar.visible = true; } else { healthBar.visible = false; energyBar.visible = false; }; if (energyLevel != lastEnergyLevel){ energyBar.setValue(energyLevel, operateEnergy); }; lastEnergyLevel = energyLevel; if (health != lastHealth){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ return; }; if (energyLevel >= MISSILE_ENERGY_TAKE){ barrelShape.visible = true; } else { barrelShape.visible = false; }; if (((((((((((_turnedOn) && (_armed))) && ((fireCounter == 0)))) && (((updateCount % 4) == 0)))) && ((energyLevel >= MISSILE_ENERGY_TAKE)))) && ((state == STATE_PLACED)))){ fire(); } else { if (fireCounter > 0){ fireCounter--; }; }; } override protected function getXMLRoot():XML{ return (<ABM/> ); } override public function get operateEnergy():Number{ return ((MISSILE_ENERGY_TAKE * 2)); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.addChild(getBodyShape()); _local2.addChild(getBarrelShape()); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } public static function getBodyShape():DisplayObject{ var _local1:MovieClip = new ABMBody(); _local1.mouseEnabled = false; return (_local1); } public static function getBarrelShape():DisplayObject{ var _local1:MovieClip = new ABMMissileBody(); _local1.mouseEnabled = false; return (_local1); } public static function setUpgradedRange():void{ START_RANGE = 11; } public static function setNormalRange():void{ START_RANGE = 9; } } }//package com.wbwar.creeper
Section 135
//AddPlaceSprite (com.wbwar.creeper.AddPlaceSprite) package com.wbwar.creeper { import flash.display.*; import flash.events.*; import flash.filters.*; public class AddPlaceSprite extends Sprite { private var pathIndicator:Shape; private var _placementSprite:Sprite; private var sourcePlace:String; private var weaponDistIndicator:WeaponDistIndicator; private var legal:Boolean; private var awss:Shape; public function AddPlaceSprite(){ mouseEnabled = false; pathIndicator = new Shape(); addChild(pathIndicator); weaponDistIndicator = new WeaponDistIndicator(); addChild(weaponDistIndicator); awss = new Shape(); awss.filters = [new DropShadowFilter(2)]; addChild(awss); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onEnterFrame(_arg1:Event):void{ if (visible){ if (sourcePlace != null){ refreshPathIndicator(legal, sourcePlace); }; }; } public function refresh(_arg1:Boolean, _arg2:String, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:int; this.legal = _arg1; this.sourcePlace = _arg2; if (_arg2 == "com.wbwar.creeper::ThorsHammer"){ _local6 = (GameSpace.CELL_WIDTH * 2); } else { if (_arg2 == "com.wbwar.creeper::DroneBase"){ _local6 = (GameSpace.CELL_WIDTH + 1); } else { _local6 = GameSpace.CELL_WIDTH; }; }; if (_arg1){ weaponDistIndicator.refresh(_arg2, _arg3, _arg4, _arg5); awss.graphics.clear(); awss.graphics.beginFill(16777136, 0.3); awss.graphics.lineStyle(2, 0); awss.graphics.drawRect(-(_local6), -(_local6), (_local6 * 2), (_local6 * 2)); awss.graphics.endFill(); weaponDistIndicator.visible = true; } else { awss.graphics.clear(); awss.graphics.beginFill(16752800, 0.3); awss.graphics.lineStyle(2, 0xFF0000); awss.graphics.drawRect(-(_local6), -(_local6), (_local6 * 2), (_local6 * 2)); awss.graphics.endFill(); weaponDistIndicator.visible = false; }; } private function refreshPathIndicator(_arg1:Boolean, _arg2:String):void{ var _local3:Array; var _local4:Place; var _local5:int; var _local6:int; pathIndicator.graphics.clear(); if (_arg1){ _local3 = Place.getPossiblePaths(_arg2, x, y); for each (_local4 in _local3) { _local5 = (_local4.x - x); _local6 = (_local4.y - y); pathIndicator.graphics.lineStyle(3, 0); pathIndicator.graphics.moveTo(0, 0); pathIndicator.graphics.lineTo(_local5, _local6); pathIndicator.graphics.lineStyle(1, 0xFF00); pathIndicator.graphics.moveTo(0, 0); pathIndicator.graphics.lineTo(_local5, _local6); }; }; } public function set placementSprite(_arg1:Sprite):void{ if (_placementSprite != null){ removeChild(_placementSprite); }; _placementSprite = _arg1; if (_placementSprite != null){ addChild(_arg1); }; } } }//package com.wbwar.creeper
Section 136
//AirWeapon (com.wbwar.creeper.AirWeapon) package com.wbwar.creeper { import flash.display.*; public class AirWeapon extends Sprite { public function update():void{ } } }//package com.wbwar.creeper
Section 137
//AirWeapons (com.wbwar.creeper.AirWeapons) package com.wbwar.creeper { import flash.display.*; public class AirWeapons extends Sprite { public function AirWeapons(){ mouseEnabled = false; } public function update():void{ var _local1:AirWeapon; var _local2:int = (numChildren - 1); while (_local2 >= 0) { _local1 = (getChildAt(_local2) as AirWeapon); _local1.update(); _local2--; }; } public function removeAirWeapon(_arg1:AirWeapon):void{ removeChild(_arg1); } public function addAirWeapon(_arg1:AirWeapon):void{ addChild(_arg1); } } }//package com.wbwar.creeper
Section 138
//AreaGun (com.wbwar.creeper.AreaGun) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.geom.*; public final class AreaGun extends Weapon { private var mortarFireCounter:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; private var areaGunState:int;// = 0 private var bodyShape:DisplayObject; private var mortarFirePoint:Point; private var fireCounter:int; private var energyBar:Bar; private var lastEnergyLevel:Number;// = 0 private var firedMortars:int; private var barrel:DisplayObject; private var FIRERATEMOD:int; private static const STATE_FIRING:int = 1; private static const MORTAR_ENERGY_TAKE:int = 17; private static const STATE_WAITING_TO_FIRE:int = 0; public static const BASE_COST:int = 250; public static var START_RANGE:int = 9; public static var unitCost:int = 1; public function AreaGun(_arg1:int, _arg2:int){ super(_arg1, _arg2); RANGE = START_RANGE; energyBar = new Bar(20, 3, 0xFF0000, 0); addChild(energyBar); energyBar.x = -10; energyBar.y = -10; energyBar.setValue(0, 20); energyBar.filters = [new DropShadowFilter(1)]; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; addChild(placeBody); addChild(armedShape); addChild(turnedOffShape); bodyShape = getBodyShape(); placeBody.addChild(bodyShape); bodyShape.filters = [new DropShadowFilter(2)]; if (GameSpace.instance != null){ places.addPlace(this); }; } override public function update():void{ super.update(); if (RANGE != START_RANGE){ RANGE = START_RANGE; }; if (GameSpace.instance.upgradeWeapon1){ FIRERATEMOD = 5; } else { FIRERATEMOD = 0; }; if (state == STATE_PLACED){ healthBar.visible = true; energyBar.visible = true; } else { healthBar.visible = false; energyBar.visible = false; }; if (energyLevel != lastEnergyLevel){ energyBar.setValue(energyLevel, operateEnergy); }; lastEnergyLevel = energyLevel; if (health != lastHealth){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ return; }; if (state == STATE_MOVING){ fireCounter++; }; if (((((_turnedOn) && (_armed))) && ((areaGunState == STATE_WAITING_TO_FIRE)))){ checkFireWeapon(); } else { if (areaGunState == STATE_FIRING){ fireMortar(); }; }; } private function checkFireWeapon():void{ var _local2:Number; var _local3:Number; var _local4:Number; if (energyLevel < MORTAR_ENERGY_TAKE){ return; }; if (state != STATE_PLACED){ return; }; var _local1:Point = findDeepestGlop(); if (_local1 != null){ _local2 = (_local1.x - gameSpaceX); _local3 = (_local1.y - gameSpaceY); _local4 = ((Math.atan2(_local3, _local2) * 180) / Math.PI); if (fireCounter < (102 - (28 * level))){ fireCounter++; return; }; mortarFirePoint = _local1; mortarFireCounter = 999; firedMortars = 0; areaGunState = STATE_FIRING; fireCounter = 0; }; } override protected function getXMLRoot():XML{ return (<AreaGun/> ); } override public function get maxHealth():Number{ return (BASE_COST); } override public function get operateEnergy():Number{ return (((MORTAR_ENERGY_TAKE * 3) * 3)); } private function fireMortar():void{ if (state != STATE_PLACED){ areaGunState = STATE_WAITING_TO_FIRE; return; }; if (firedMortars >= 1){ fireCounter = 0; areaGunState = STATE_WAITING_TO_FIRE; }; if (energyLevel < MORTAR_ENERGY_TAKE){ return; }; if (mortarFireCounter < (35 - FIRERATEMOD)){ mortarFireCounter++; return; }; var _local1:int = mortarFirePoint.x; var _local2:int = mortarFirePoint.y; if (firedMortars >= 1){ if (_local1 > gameSpaceX){ _local1 = (_local1 + int((Math.random() * 5))); } else { _local1 = (_local1 - int((Math.random() * 5))); }; if (_local2 > gameSpaceY){ _local2 = (_local2 + int((Math.random() * 5))); } else { _local2 = (_local2 - int((Math.random() * 5))); }; }; if (_local1 < 0){ _local1 = 0; }; if (_local1 >= GameSpace.WIDTH){ _local1 = (GameSpace.WIDTH - 1); }; if (_local2 < 0){ _local2 = 0; }; if (_local2 >= GameSpace.HEIGHT){ _local2 = (GameSpace.HEIGHT - 1); }; new Mortar(gameSpaceX, gameSpaceY, _local1, _local2, level); firedMortars++; energyLevel = (energyLevel - (MORTAR_ENERGY_TAKE - (level * 5))); if (energyLevel < 0){ energyLevel = 0; }; mortarFireCounter = 0; } public static function getBarrelShape():DisplayObject{ return (null); } public static function setNormalRange():void{ START_RANGE = 9; } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite = new Sprite(); _local2.addChild(getBodyShape()); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } public static function legalLocation(_arg1:int, _arg2:int, _arg3:Place=null):Boolean{ var _local4:Place; if (!legalTerrainLocation(_arg1, _arg2)){ return (false); }; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (false); }; var _local5:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local5 >= 0) { _local4 = (GameSpace.instance.places.placesLayer.getChildAt(_local5) as Place); if ((((_local4 is MovingPlace)) && (!(((_local4 as MovingPlace).state == MovingPlace.STATE_PLACED))))){ } else { if (((!((_arg3 == null))) && ((_arg3 == _local4)))){ } else { if ((((Math.abs((_local4.gameSpaceX - _arg1)) < 2)) && ((Math.abs((_local4.gameSpaceY - _arg2)) < 2)))){ return (false); }; }; }; _local5--; }; return (true); } public static function getBodyShape():DisplayObject{ var _local1:MovieClip = new AreaGunBody(); _local1.mouseEnabled = false; return (_local1); } public static function setUpgradedRange():void{ START_RANGE = 11; } } }//package com.wbwar.creeper
Section 139
//BaseGun (com.wbwar.creeper.BaseGun) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.media.*; public final class BaseGun extends MovingPlace { private var energyGridDeployer:EnergyGridDeployer; private var endCounter:int; private var soundCounter:int; private var placeQueueLoc:int; private var healthBar:ArcBar; private var energyPacketCounter:int;// = 0 private var bodyShape:DisplayObject; public static const PLACE_RANGE:int = 7; public static const ENERGYPACKET_RECHARGE:int = 0; public function BaseGun(_arg1:int, _arg2:int){ super(_arg1, _arg2); RANGE = PLACE_RANGE; bodyShape = new BaseGunBody(); bodyShape.filters = [new DropShadowFilter(2)]; placeBody.addChild(bodyShape); ColorUtil.normalColor(placeBody, 0.2); if (GameSpace.instance != null){ GameSpace.instance.places.addPlace(this); hookUp(); }; building = false; if (movePlaceIndicator != null){ movePlaceIndicator.graphics.clear(); movePlaceIndicator.graphics.lineStyle(2, 0x8000); movePlaceIndicator.graphics.drawRect(-30, -30, 60, 60); }; healthBar = new ArcBar(8, -360, -90, 2, 0x7000, 0x900000); addChild(healthBar); healthBar.y = -8; healthBar.setValue(maxHealth, maxHealth); energyGridDeployer = new EnergyGridDeployer(5, this); } override public function get maxHealth():Number{ return (100); } override protected function getXMLRoot():XML{ return (<BaseGun/> ); } override public function load(_arg1:XML):void{ super.load(_arg1); health = maxHealth; } override public function get operateEnergy():Number{ return (0); } override public function update():void{ var _local1:Sound; var _local2:Number; var _local3:Number; var _local4:Number; super.update(); soundCounter--; if (soundCounter < 0){ soundCounter = 0; }; if ((((((state == STATE_PLACED)) && (!(rifted)))) && (!(destroyed)))){ if (calculateDamage()){ if (soundCounter == 0){ soundCounter = 200; _local1 = new CityDamageSound(); _local1.play(); }; }; }; if (destroyed){ endCounter++; if (endCounter >= 180){ GameSpace.instance.destroyedReason = GameSpace.DESTROYED_REASON_SHIP_DESTROYED; Creeper.instance.gameScreen.showResultsScreen(); }; }; if (((!((GameSpace.instance.rift == null))) && (!(GameSpace.instance.suppressCityExit)))){ if ((((GameSpace.instance.rift.state == Rift.STATE_ACTIVATED)) && ((state == STATE_PLACED)))){ move(gameSpaceX, gameSpaceY); }; if ((((GameSpace.instance.rift.state == Rift.STATE_ACTIVATED)) && ((state == STATE_MOVING)))){ _local2 = (GameSpace.instance.rift.x - x); _local3 = (GameSpace.instance.rift.y - y); _local4 = ((_local2 * _local2) + (_local3 * _local3)); state = STATE_RIFT1; }; }; if ((updateCount % 2) == 0){ processEnergyQueue(); }; if ((updateCount % 30) == 0){ if (state == STATE_PLACED){ energyGridDeployer.deployEnergyGrid(); } else { energyGridDeployer.undeployEnergyGrid(); }; }; if (energyPacketCounter > 0){ energyPacketCounter--; }; } override public function destroy(_arg1:Boolean=false):void{ destroyAllPaths(); energyGridDeployer.undeployEnergyGrid(); new Explosion(x, y, 0xFF0000, 0x900000, 0.3, 36); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.5, 36); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.2, 72); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.4, 50); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.6, 36); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.5, 36); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.2, 72); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.4, 50); new Explosion(((x + (Math.random() * 100)) - 50), ((y + (Math.random() * 100)) - 50), 0xFF0000, 0x900000, 0.6, 36); visible = false; destroyed = true; var _local2:Sound = new CityExplosionSound(); _local2.play(); } private function calculateDamage():Boolean{ var _local1:Number; var _local3:Boolean; var _local5:int; var _local2:Boolean; var _local4 = -2; while (_local4 <= 2) { _local5 = -2; while (_local5 <= 2) { _local1 = GameSpace.instance.glop.data[((gameSpaceX + _local5) + ((gameSpaceY + _local4) * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ _local2 = true; health = (health - 0.01); if (health < 0){ health = 0; destroy(); return (true); }; _local3 = true; }; _local5++; }; _local4++; }; if (((!(_local2)) && (!(building)))){ health = (health + 0.01); if (health > maxHealth){ health = maxHealth; } else { _local3 = true; }; }; if (_local3){ healthBar.setValue(health, maxHealth); }; return (_local2); } private function processEnergyQueue():void{ var _local2:Place; var _local5:EnergyRequest; var _local6:EnergyPacket; var _local1:Boolean; var _local3:int; var _local4:int = GameSpace.instance.places.placesLayer.numChildren; if (destroyed){ return; }; if (state == STATE_RIFT3){ return; }; while (((((_local1) && ((GameSpace.instance.stash >= EnergyPacket.WORTH)))) && ((_local3 < _local4)))) { if (placeQueueLoc >= _local4){ placeQueueLoc = 0; }; _local2 = (GameSpace.instance.places.placesLayer.getChildAt(placeQueueLoc) as Place); if (_local2.energyRequestQueue.length > 0){ _local1 = false; _local5 = _local2.energyRequestQueue.shift(); _local6 = new EnergyPacket(this, _local2, _local5.type); if (!_local6.destroyed){ GameSpace.instance.stash = (GameSpace.instance.stash - EnergyPacket.WORTH); GameSpace.instance.energyConsumed = (GameSpace.instance.energyConsumed + EnergyPacket.WORTH); } else { _local1 = true; }; }; placeQueueLoc++; _local3++; }; } public static function legalLocation(_arg1:int, _arg2:int, _arg3:Place=null):Boolean{ var _local4:Place; if (!legalTerrainLocation(_arg1, _arg2)){ return (false); }; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (false); }; var _local5:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local5 >= 0) { _local4 = (GameSpace.instance.places.placesLayer.getChildAt(_local5) as Place); if ((((_local4 is MovingPlace)) && (!(((_local4 as MovingPlace).state == MovingPlace.STATE_PLACED))))){ } else { if (((!((_arg3 == null))) && ((_arg3 == _local4)))){ } else { if ((((Math.abs((_local4.gameSpaceX - _arg1)) < 2)) && ((Math.abs((_local4.gameSpaceY - _arg2)) < 2)))){ return (false); }; }; }; _local5--; }; return (true); } } }//package com.wbwar.creeper
Section 140
//Drone (com.wbwar.creeper.Drone) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.geom.*; public final class Drone extends AirWeapon { private var attackTargetY:int; private var updateCount:int; private var droneBase:DroneBase; private var safetyStraightOverrideCounter:int; private var bombCount:int; public var state:int; private var destroyed:Boolean; private var targetX:int; private var targetY:int; private var body:Sprite; private var safetyCounterTurn:Number;// = 0 private var position:int; private var movementHeight:Number;// = 0 private var MOVEMOD:Number; private var bombCounter:int; private var attackTargetX:int; public static const STATE_RETURN:int = 4; private static const BOMB_RADIUS:Number = 60; private static const TAKEOFF_SPEED:Number = 0.03; private static const BOMB_DROP_RATE:int = 40; public static const STATE_ATTACK:int = 2; public static const STATE_ALIGN:int = 3; public static const STATE_LANDED:int = 0; public static const STATE_TAKEOFF:int = 1; private static const LANDING_SPEED:Number = 0.03; private static const ROT_SPEED:Number = 2; private static const ATTACK_RADIUS:Number = 100; public static const BOMB_LOADOUT:int = 15; public static const STATE_LANDING:int = 5; private static const MOVE_SPEED:Number = 1; private static const OVERRIDE_STRAIGHT_TIME:int = 72; public function Drone(_arg1:DroneBase, _arg2:int){ mouseEnabled = false; mouseChildren = false; this.droneBase = _arg1; this.position = _arg2; body = new DroneBody(); addChild(body); state = STATE_LANDED; bombCount = BOMB_LOADOUT; var _local3:Point = _arg1.getParkingSpot(_arg2); x = (_local3.x + _arg1.x); y = (_local3.y + _arg1.y); GameSpace.instance.landedDronesLayer.addChild(this); } public function destroy():void{ if (destroyed){ return; }; if (GameSpace.instance.airWeapons.contains(this)){ GameSpace.instance.airWeapons.removeAirWeapon(this); }; if (GameSpace.instance.landedDronesLayer.contains(this)){ GameSpace.instance.landedDronesLayer.removeChild(this); }; destroyed = true; } public function attack(_arg1:int, _arg2:int):void{ attackTargetX = ((_arg1 * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); attackTargetY = ((_arg2 * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); targetX = attackTargetX; targetY = attackTargetY; if (state == STATE_LANDED){ state = STATE_TAKEOFF; GameSpace.instance.airWeapons.addAirWeapon(this); body.filters = [new GlowFilter(0xFFFFFF, 1, 8, 8)]; }; } private function move():Boolean{ var _local4:Number; var _local5:Number; if ((updateCount % 5) == 0){ GameSpace.instance.exhaustLayer.addExhaust(x, y); }; if (GameSpace.instance.upgradeWeapon2){ MOVEMOD = 1.3; } else { MOVEMOD = 1; }; if (safetyStraightOverrideCounter > 0){ safetyStraightOverrideCounter--; } else { if (!rotate()){ safetyCounterTurn = (safetyCounterTurn + ROT_SPEED); } else { safetyCounterTurn = 0; }; }; if (safetyCounterTurn > 400){ safetyCounterTurn = 0; safetyStraightOverrideCounter = OVERRIDE_STRAIGHT_TIME; }; var _local1:Number = (targetX - x); var _local2:Number = (targetY - y); var _local3:Number = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); if (_local3 < (MOVE_SPEED * MOVEMOD)){ x = targetX; y = targetY; return (true); }; _local4 = ((Math.cos(((rotation * Math.PI) / 180)) * MOVE_SPEED) * MOVEMOD); _local5 = ((Math.sin(((rotation * Math.PI) / 180)) * MOVE_SPEED) * MOVEMOD); x = (x + _local4); y = (y + _local5); return (false); } private function chooseAlignSpot():void{ var _local1:Number = (Math.cos(((rotation * Math.PI) / 180)) * ATTACK_RADIUS); var _local2:Number = (Math.sin(((rotation * Math.PI) / 180)) * ATTACK_RADIUS); targetX = (targetX + _local1); targetY = (targetY + _local2); targetX = (targetX + ((Math.random() * 50) - 25)); targetY = (targetY + ((Math.random() * 50) - 25)); } override public function update():void{ var _local1:Boolean; var _local2:Point; updateCount++; if (destroyed){ return; }; if (bombCounter > 0){ bombCounter--; }; if (state == STATE_TAKEOFF){ if (movementHeight >= 1){ state = STATE_ATTACK; movementHeight = 1; scaleX = 1.2; scaleY = scaleX; } else { movementHeight = (movementHeight + TAKEOFF_SPEED); rotate(); scaleX = (1 + (movementHeight / 5)); scaleY = scaleX; }; } else { if (state == STATE_ATTACK){ dropBomb(); _local1 = move(); if (_local1){ if (bombCount <= 0){ state = STATE_RETURN; _local2 = droneBase.getParkingSpot(position); targetX = (_local2.x + droneBase.x); targetY = (_local2.y + droneBase.y); } else { state = STATE_ALIGN; chooseAlignSpot(); }; }; } else { if (state == STATE_ALIGN){ dropBomb(); _local1 = move(); if (_local1){ if (bombCount <= 0){ state = STATE_RETURN; _local2 = droneBase.getParkingSpot(position); targetX = (_local2.x + droneBase.x); targetY = (_local2.y + droneBase.y); } else { state = STATE_ATTACK; targetX = attackTargetX; targetY = attackTargetY; }; }; } else { if (state == STATE_RETURN){ _local1 = move(); if (_local1){ state = STATE_LANDING; }; } else { if (state == STATE_LANDING){ if (movementHeight <= 0){ state = STATE_LANDED; GameSpace.instance.landedDronesLayer.addChild(this); body.filters = []; bombCount = BOMB_LOADOUT; movementHeight = 0; scaleX = 1; scaleY = scaleX; } else { movementHeight = (movementHeight - LANDING_SPEED); scaleX = (1 + (movementHeight / 5)); scaleY = scaleX; }; } else { if (state == STATE_LANDED){ }; }; }; }; }; }; } private function rotate(_arg1:Boolean=false):Boolean{ var _local2:Number; var _local5:Number; var _local6:Number; if (_arg1){ _local2 = 0; } else { _local5 = (targetX - x); _local6 = (targetY - y); _local2 = ((Math.atan2(_local6, _local5) * 180) / Math.PI); }; var _local3:Number = Navigation.angleSpan(rotation, _local2); var _local4:Number = ((_local3 < 0)) ? -(_local3) : _local3; if (_local4 < ROT_SPEED){ rotation = _local2; body.scaleY = 1; return (true); }; if (_local3 < 0){ rotation = (rotation - ROT_SPEED); } else { rotation = (rotation + ROT_SPEED); }; body.scaleY = 0.9; return (false); } private function dropBomb():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; if ((((((((((((bombCounter <= 0)) && ((bombCount > 0)))) && ((x > 0)))) && ((y > 0)))) && ((x < (GameSpace.WIDTH * GameSpace.CELL_WIDTH))))) && ((y < (GameSpace.HEIGHT * GameSpace.CELL_HEIGHT))))){ _local1 = (x - attackTargetX); _local2 = (y - attackTargetY); _local3 = ((_local1 * _local1) + (_local2 * _local2)); if (_local3 < (BOMB_RADIUS * BOMB_RADIUS)){ _local4 = (Math.cos(((rotation * Math.PI) / 180)) * MOVE_SPEED); _local5 = (Math.sin(((rotation * Math.PI) / 180)) * MOVE_SPEED); new DroneBomb(x, y, _local4, _local5); bombCount--; bombCounter = BOMB_DROP_RATE; }; }; } } }//package com.wbwar.creeper
Section 141
//DroneBase (com.wbwar.creeper.DroneBase) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import caurina.transitions.*; public final class DroneBase extends Place { private var landedDrones:int; public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; private var damageAmt:Number;// = 0.5 private var bodyShape:DisplayObject; private var lastEnergyLevel:Number;// = 0 public var drones:Array; private var energyBar:Bar; public static const BASE_COST:int = 250; public static const DRONE_ENERGY_COST:int = (8 * Drone.BOMB_LOADOUT); public static var unitCost:int = 4; public function DroneBase(_arg1:int, _arg2:int){ drones = []; super(_arg1, _arg2); cacheAsBitmap = true; energyBar = new Bar(20, 3, 0xFF0000, 0); addChild(energyBar); energyBar.x = -10; energyBar.y = -10; energyBar.setValue(0, 20); energyBar.filters = [new DropShadowFilter(1)]; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; bodyShape = getBodyShape(); placeBody.addChild(bodyShape); bodyShape.filters = [new DropShadowFilter(2)]; if (GameSpace.instance != null){ addEventListener(MouseEvent.CLICK, onMouseClick); hookUp(); }; drones[0] = new Drone(this, 0); drones[0].visible = false; } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } override public function update():void{ var _local1:Drone; super.update(); if (destroyed){ return; }; if (energyLevel != lastEnergyLevel){ energyBar.setValue(energyLevel, operateEnergy); }; lastEnergyLevel = energyLevel; if (energyLevel >= operateEnergy){ energyBar.visible = false; } else { energyBar.visible = true; }; if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; landedDrones = 0; for each (_local1 in drones) { if (_local1.state == Drone.STATE_LANDED){ landedDrones++; if (energyLevel < DRONE_ENERGY_COST){ _local1.visible = false; } else { _local1.visible = true; }; }; }; calculateDamage(); } override public function move(_arg1:int, _arg2:int):void{ var _local3:Drone; var _local4:Sound; if (energyLevel >= DRONE_ENERGY_COST){ for each (_local3 in drones) { if (_local3.state == Drone.STATE_LANDED){ _local3.attack(_arg1, _arg2); energyLevel = (energyLevel - DRONE_ENERGY_COST); landedDrones--; _local4 = new DroneSound(); _local4.play(); break; }; }; }; } override public function fallIntoHole():void{ var _local1:Number = (Math.random() * 2); Tweener.addTween(this, {time:6, delay:_local1, transition:"easeInExpo", x:GameSpace.instance.rift.x, y:GameSpace.instance.rift.y, onComplete:holeComplete}); Tweener.addTween(drones[0], {time:6, delay:_local1, transition:"easeInExpo", x:GameSpace.instance.rift.x, y:GameSpace.instance.rift.y, onComplete:droneInHole}); } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<DroneBase/> ); } private function onMouseClick(_arg1:MouseEvent):void{ if (GameSpace.instance.places.placeToMove == this){ return; }; var _local2:Boolean = selected; GameSpace.instance.places.removeAllSelections(); selected = !(_local2); _arg1.stopImmediatePropagation(); if (!building){ GameSpace.instance.places.placeToMove = this; }; } override public function get operateEnergy():Number{ return ((landedDrones * DRONE_ENERGY_COST)); } private function calculateDamage():Boolean{ var _local1:Number; var _local4:int; var _local2:Boolean; var _local3 = -1; while (_local3 <= 1) { _local4 = -1; while (_local4 <= 1) { _local1 = GameSpace.instance.glop.data[((gameSpaceX + _local4) + ((gameSpaceY + _local3) * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ _local2 = true; health = (health - damageAmt); if (health < 0){ health = 0; destroy(); return (true); }; }; _local4++; }; _local3++; }; if (((!(_local2)) && (!(building)))){ health = (health + 0.01); if (health > maxHealth){ health = maxHealth; }; }; return (_local2); } override public function destroy(_arg1:Boolean=false):void{ var _local2:Drone; if (destroyed){ return; }; super.destroy(); for each (_local2 in drones) { _local2.destroy(); }; } public function getParkingSpot(_arg1:int):Point{ if (_arg1 == 0){ return (new Point(0, 0)); }; if (_arg1 == 1){ return (new Point(-10, -10)); }; return (new Point(10, 10)); } private function droneInHole():void{ drones[0].visible = false; } public static function getBodyShape():DisplayObject{ var _local1:MovieClip = new DroneBaseBody(); _local1.mouseEnabled = false; return (_local1); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.addChild(getBodyShape()); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } private static function draw(_arg1:Sprite):void{ _arg1.graphics.beginFill(12619856); _arg1.graphics.drawRect(-20, -10, 40, 20); _arg1.graphics.endFill(); } } }//package com.wbwar.creeper
Section 142
//DroneBomb (com.wbwar.creeper.DroneBomb) package com.wbwar.creeper { import flash.media.*; public final class DroneBomb extends Projectile { private var explosionSound:Sound; private var dx:Number; private var dy:Number; private var updateCount:int; private static const DROP_TIME:int = 20; private static const SPEED:Number = 0.5; public function DroneBomb(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ this.x = _arg1; this.y = _arg2; this.dx = (_arg3 * SPEED); this.dy = (_arg4 * SPEED); graphics.beginFill(0xFF0000); graphics.drawCircle(0, 0, 5); graphics.endFill(); GameSpace.instance.projectiles.addProjectile(this); explosionSound = new AreaGunExplosionSound(); } private function kaboom():void{ GameSpace.instance.projectiles.removeProjectile(this); var _local1:int = (x / GameSpace.CELL_WIDTH); var _local2:int = (y / GameSpace.CELL_HEIGHT); Weapon.damageGlop(_local1, _local2, 50, 8, -4, 1); new Explosion(x, y, 16732240, 10493984, 0.5, 10); explosionSound.play(); } override public function update():void{ updateCount++; if (updateCount >= DROP_TIME){ kaboom(); } else { scaleX = (1 - (updateCount / DROP_TIME)); scaleY = scaleX; x = (x + dx); y = (y + dy); }; } } }//package com.wbwar.creeper
Section 143
//DynamicContent (com.wbwar.creeper.DynamicContent) package com.wbwar.creeper { import flash.display.*; import flash.geom.*; public final class DynamicContent extends Bitmap { private var level:int; private var glop:Glop; private var CELL_WIDTH:int; private var wallData:Array; private var li:int; private var fullRect:Rectangle; private var mh:Number;// = 0.001 private var glopBmd:Array; public var tpoint:Point; private var CELL_HEIGHT:int; private var HEIGHT:int; private var updateStash:Boolean; private var WIDTH:int; private var energyGridData:Array; private var loc:int; private var updateCount:int; private var cTransform:ColorTransform; private var bm:Bitmap; private var glopData:Array; private var wallRect:Rectangle; private var wdl:Number; public var energyMod:Number; public var trect:Rectangle; private var cc:int; public var energyReactorProduction:Number; private var cellRect:Rectangle; private var i:int; private var j:int; public var energyAccumulationRate:Number;// = 0 private var p:Point; private var updateGraphics:Boolean; private var bmd:BitmapData; public var energyStores:int; private var da:Number; public function DynamicContent(){ p = new Point(); cTransform = new ColorTransform(); trect = new Rectangle(0, 0, (GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT)); tpoint = new Point(0, 0); super(); bmd = new BitmapData((GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT), false, 0); this.bitmapData = bmd; cellRect = new Rectangle(0, 0, GameSpace.CELL_WIDTH, GameSpace.CELL_HEIGHT); fullRect = new Rectangle(0, 0, (GameSpace.WIDTH * GameSpace.CELL_WIDTH), (GameSpace.HEIGHT * GameSpace.CELL_HEIGHT)); WIDTH = GameSpace.WIDTH; HEIGHT = GameSpace.HEIGHT; CELL_WIDTH = GameSpace.CELL_WIDTH; CELL_HEIGHT = GameSpace.CELL_HEIGHT; wallRect = new Rectangle(0, 0, CELL_WIDTH, CELL_HEIGHT); } public function update():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:Object; var _local7:Number; updateCount++; if (GameSpace.instance.upgradeEconomic0){ energyMod = 1.1; } else { energyMod = 1; }; if (((updateCount + 1) % 32) == 0){ GameSpace.instance.controlPanel.stashViewer.update(); updateStash = true; energyAccumulationRate = 0; if (((!((GameSpace.instance.baseGun == null))) && ((GameSpace.instance.baseGun.state == MovingPlace.STATE_PLACED)))){ energyAccumulationRate = (energyAccumulationRate + (3 * energyMod)); GameSpace.instance.stash = (GameSpace.instance.stash + (3 * energyMod)); GameSpace.instance.totalEnergyCollected = (GameSpace.instance.totalEnergyCollected + (3 * energyMod)); }; _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local5 >= 0) { _local6 = GameSpace.instance.places.placesLayer.getChildAt(_local5); if ((_local6 is EnergyStorage)){ if ((((_local6 as EnergyStorage).powered) && ((_local6 as Place).turnedOn))){ _local1++; }; } else { if ((_local6 is Logistics)){ if ((((_local6 as Logistics).powered) && ((_local6 as Place).turnedOn))){ _local2++; }; } else { if ((_local6 is EnergyAmp)){ if ((((_local6 as EnergyAmp).powered) && ((_local6 as Place).turnedOn))){ _local3++; }; } else { if ((_local6 is Gun)){ _local4++; } else { if ((_local6 is AreaGun)){ _local4++; } else { if ((_local6 is DroneBase)){ _local4 = (_local4 + 4); }; }; }; }; }; }; _local5--; }; GameSpace.instance.stashMax = (100 + (100 * _local1)); energyStores = _local1; GameSpace.instance.energyPacketSpeed = (2 + (_local2 * 0.5)); _local3 = (_local3 * 1.5); _local3 = (_local3 * energyMod); energyReactorProduction = _local3; energyAccumulationRate = (energyAccumulationRate + _local3); GameSpace.instance.stash = (GameSpace.instance.stash + _local3); GameSpace.instance.totalEnergyCollected = (GameSpace.instance.totalEnergyCollected + _local3); } else { updateStash = false; }; if (GameSpace.instance.speedUp){ updateGraphics = (((updateCount + 1) % 16) == 0); } else { updateGraphics = true; }; if (((updateCount + 1) % 8) == 0){ if (updateGraphics){ bmd.lock(); bmd.copyPixels(GameSpace.instance.terrain.terrainBMD, trect, tpoint); }; glop = GameSpace.instance.glop; glopBmd = GameSpace.instance.glop.glopBmd; glopData = GameSpace.instance.glop.data; wallData = GameSpace.instance.walls.wallData; energyGridData = GameSpace.instance.energyGrid.energyGridData; j = 0; while (j < HEIGHT) { _local5 = 0; while (_local5 < WIDTH) { loc = int((_local5 + (j * WIDTH))); p.x = (_local5 * CELL_WIDTH); p.y = (j * CELL_HEIGHT); if (energyGridData[loc] > 0){ if (updateStash){ _local7 = (0.02 * energyMod); energyAccumulationRate = (energyAccumulationRate + _local7); GameSpace.instance.stash = (GameSpace.instance.stash + _local7); GameSpace.instance.totalEnergyCollected = (GameSpace.instance.totalEnergyCollected + _local7); }; if (updateGraphics){ bmd.copyPixels(GameSpace.instance.energyGrid.energyBmd, cellRect, p); }; }; if (updateGraphics){ da = glopData[loc]; if (da >= mh){ if (da >= 2){ level = 15; } else { level = (da * 7.5); }; li = glop.getEdgeInt(level, _local5, j); bmd.copyPixels(glopBmd[level][li], cellRect, p, null, null, true); }; }; if (updateGraphics){ wdl = wallData[loc]; if (wdl > 0){ bmd.copyPixels(Walls.wallBmd, cellRect, p); if (wdl < 1){ cTransform.redMultiplier = wdl; cTransform.greenMultiplier = cTransform.redMultiplier; cTransform.blueMultiplier = cTransform.redMultiplier; wallRect.x = (_local5 * CELL_WIDTH); wallRect.y = (j * CELL_HEIGHT); bmd.colorTransform(wallRect, cTransform); }; }; }; _local5++; }; j++; }; if (updateGraphics){ bmd.unlock(); }; }; } } }//package com.wbwar.creeper
Section 144
//DynamicContentUpper (com.wbwar.creeper.DynamicContentUpper) package com.wbwar.creeper { import flash.display.*; import flash.geom.*; public final class DynamicContentUpper extends Bitmap { private var fullRect:Rectangle; private var bmd:BitmapData; private var bm:Bitmap; private var updateCount:int; public function DynamicContentUpper(){ bmd = new BitmapData((GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT), true, 0); this.bitmapData = bmd; fullRect = new Rectangle(0, 0, (GameSpace.WIDTH * GameSpace.CELL_WIDTH), (GameSpace.HEIGHT * GameSpace.CELL_HEIGHT)); } public function update():void{ updateCount++; if (((updateCount + 3) % 12) == 0){ bmd.lock(); bmd.fillRect(fullRect, 0); GameSpace.instance.mistLayer.update(bmd); GameSpace.instance.exhaustLayer.update(bmd); bmd.unlock(); }; } } }//package com.wbwar.creeper
Section 145
//EnergyAmp (com.wbwar.creeper.EnergyAmp) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; public final class EnergyAmp extends Place { private var _powered:Boolean; public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; public static const BASE_COST:int = 200; public function EnergyAmp(_arg1:int, _arg2:int){ super(_arg1, _arg2); cacheAsBitmap = true; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; createBodyShape(placeBody); placeBody.filters = [new GlowFilter(0x200000, 1, 2, 2, 3, 1), new DropShadowFilter(2)]; if (GameSpace.instance != null){ hookUp(); }; } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<EnergyAmp/> ); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } public function set powered(_arg1:Boolean):void{ _powered = _arg1; } override public function update():void{ var _local1:Place; super.update(); if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 == null){ powered = false; } else { powered = true; }; }; calculateDamage(); } public function get powered():Boolean{ return (_powered); } override public function get operateEnergy():Number{ return (0); } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } private static function getEllpise():Shape{ var _local1 = 16; var _local2 = 6; var _local3:Shape = new Shape(); _local3.graphics.lineStyle(2, 7980733); _local3.graphics.drawEllipse((-(_local1) / 2), (-(_local2) / 2), _local1, _local2); return (_local3); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); createBodyShape(_local2); _local2.filters = [new GlowFilter(0x200000, 1, 2, 2, 3, 1)]; if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } private static function createBodyShape(_arg1:Sprite):void{ _arg1.graphics.beginFill(0xFF3000); _arg1.graphics.drawCircle(0, 0, 3); _arg1.graphics.endFill(); var _local2:Shape = getEllpise(); _local2.rotation = -45; var _local3:Shape = getEllpise(); _local3.rotation = 45; _arg1.addChild(_local2); _arg1.addChild(_local3); } } }//package com.wbwar.creeper
Section 146
//EnergyGrid (com.wbwar.creeper.EnergyGrid) package com.wbwar.creeper { import flash.display.*; import flash.geom.*; public final class EnergyGrid { private var i:int; private var j:int; private var updateCount:int; private var p:Point; public var energyBmd:BitmapData; private var fullRect:Rectangle; private var energyRect:Rectangle; public var energyGridData:Array; private static const ENERGY_AMT:Number = 1; public function EnergyGrid(){ energyGridData = new Array((GameSpace.WIDTH * GameSpace.HEIGHT)); super(); var _local1:int; while (_local1 < energyGridData.length) { energyGridData[_local1] = 0; _local1++; }; energyBmd = new BitmapData(GameSpace.CELL_WIDTH, GameSpace.CELL_HEIGHT, true, 2130743296); } } }//package com.wbwar.creeper
Section 147
//EnergyGridDeployer (com.wbwar.creeper.EnergyGridDeployer) package com.wbwar.creeper { import com.wbwar.creeper.util.*; public final class EnergyGridDeployer { private var gameSpaceX:int; private var gameSpaceY:int; private var deployed:Boolean; private var place:Place; private var energyGridCache:Array; private var RANGE:int; public function EnergyGridDeployer(_arg1:int, _arg2:Place){ RANGE = _arg1; this.place = _arg2; energyGridCache = [(int(RANGE) * int(RANGE))]; var _local3:int; while (_local3 < energyGridCache.length) { energyGridCache[_local3] = false; _local3++; }; } public function undeployEnergyGrid():void{ var _local2:int; if (!deployed){ return; }; deployed = false; var _local1:int = (gameSpaceY - RANGE); while (_local1 < (gameSpaceY + RANGE)) { _local2 = (gameSpaceX - RANGE); while (_local2 < (gameSpaceX + RANGE)) { if ((((((((_local2 >= 0)) && ((_local1 >= 0)))) && ((_local2 < GameSpace.WIDTH)))) && ((_local1 < GameSpace.HEIGHT)))){ if (energyGridCache[(((_local2 - gameSpaceX) + RANGE) + (((_local1 - gameSpaceY) + RANGE) * GameSpace.WIDTH))]){ var _local3 = GameSpace.instance.energyGrid.energyGridData; var _local4 = (_local2 + (GameSpace.WIDTH * _local1)); var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; energyGridCache[(((_local2 - gameSpaceX) + RANGE) + (((_local1 - gameSpaceY) + RANGE) * GameSpace.WIDTH))] = false; }; }; _local2++; }; _local1++; }; } public function deployEnergyGrid():void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; if (deployed){ return; }; undeployEnergyGrid(); deployed = true; gameSpaceX = place.gameSpaceX; gameSpaceY = place.gameSpaceY; var _local1:int = (gameSpaceY - RANGE); while (_local1 < (gameSpaceY + RANGE)) { _local2 = (gameSpaceX - RANGE); while (_local2 < (gameSpaceX + RANGE)) { if ((((((((_local2 >= 0)) && ((_local1 >= 0)))) && ((_local2 < GameSpace.WIDTH)))) && ((_local1 < GameSpace.HEIGHT)))){ _local3 = (((gameSpaceX - _local2) * (gameSpaceX - _local2)) + ((gameSpaceY - _local1) * (gameSpaceY - _local1))); if (_local3 < (RANGE * RANGE)){ _local4 = ((_local2 - gameSpaceX) + RANGE); _local5 = ((_local1 - gameSpaceY) + RANGE); if (LOS.hasLOS(gameSpaceX, gameSpaceY, _local2, _local1, false, true)){ var _local6 = GameSpace.instance.energyGrid.energyGridData; var _local7 = (_local2 + (GameSpace.WIDTH * _local1)); var _local8 = (_local6[_local7] + 1); _local6[_local7] = _local8; energyGridCache[(((_local2 - gameSpaceX) + RANGE) + (((_local1 - gameSpaceY) + RANGE) * GameSpace.WIDTH))] = true; }; }; }; _local2++; }; _local1++; }; } } }//package com.wbwar.creeper
Section 148
//EnergyPacket (com.wbwar.creeper.EnergyPacket) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.geom.*; public final class EnergyPacket extends Shape { private var type:int; private var tx:Number; private var ty:Number; private var currentDistance:Number;// = 0 private var goal:Place; private var dx:Number; private var dy:Number; private var oe:Place; public var destroyed:Boolean; private var sqrt:Function; private var sx:Number; private var d:Number; private var frac:Number; private var currentSource:Place; private var sy:Number; private var currentPath:Path; public static const WORTH:Number = 5; public static const TYPE_CONSTRUCTION:int = 0; public static const TYPE_OPERATEENERGY:int = 2; public static const TYPE_WEAPONENERGY:int = 1; private static var matr:Matrix = new Matrix(); public function EnergyPacket(_arg1:Place, _arg2:Place, _arg3:int){ sqrt = Math.sqrt; super(); this.currentSource = _arg1; this.goal = _arg2; this.type = _arg3; init(); } public function update():void{ if (((!((currentPath == null))) && (currentPath.destroyed))){ destroy(); } else { oe = currentPath.getOtherEnd(currentSource); d = currentPath.getDistance(); if (currentDistance >= d){ if (oe == goal){ reachGoal(); return; }; currentSource = oe; currentDistance = (currentDistance - d); nextTarget(); oe = currentPath.getOtherEnd(currentSource); } else { currentDistance = (currentDistance + GameSpace.instance.energyPacketSpeed); }; render(); }; } private function init():void{ var _local1:Number = 0x707070; if (type == TYPE_OPERATEENERGY){ _local1 = 3211056; } else { if (type == TYPE_WEAPONENERGY){ _local1 = 16732208; }; }; graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, _local1], [1, 1], [0, 0xFF], matr); graphics.lineStyle(1, 0x303000); graphics.drawCircle(0, 0, 4); graphics.endFill(); GameSpace.instance.energyPackets.addEnergyPacket(this); nextTarget(); if (!destroyed){ oe = currentPath.getOtherEnd(currentSource); render(); }; } private function render():void{ if (currentPath == null){ return; }; sx = currentSource.x; sy = currentSource.y; tx = oe.x; ty = oe.y; dx = (tx - sx); dy = (ty - sy); d = sqrt(((dx * dx) + (dy * dy))); if (d == 0){ frac = 1; } else { frac = (currentDistance / d); if (frac > 1){ frac = 1; }; }; x = (currentSource.x + (dx * frac)); y = (currentSource.y + (dy * frac)); } private function nextTarget():void{ var _local1:Array = Graph.travelPath(GameSpace.instance.places, currentSource, goal); if (_local1.length <= 1){ destroy(); } else { currentPath = currentSource.getPathTo(_local1[1]); }; } private function reachGoal():void{ goal.applyEnergyPacket(this); destroy(); } public function destroy():void{ destroyed = true; goal.assignedEnergyPacketCount--; if (goal.assignedEnergyPacketCount < 0){ goal.assignedEnergyPacketCount = 0; }; GameSpace.instance.energyPackets.removeEnergyPacket(this); } matr.createGradientBox((2.6 * 4), (2.6 * 4), 0, (-4 * 1.8), (-4 * 1.8)); } }//package com.wbwar.creeper
Section 149
//EnergyPackets (com.wbwar.creeper.EnergyPackets) package com.wbwar.creeper { import flash.display.*; public final class EnergyPackets extends Sprite { private var energyPacketLayer:Sprite; public function EnergyPackets(){ mouseEnabled = false; mouseChildren = false; energyPacketLayer = new Sprite(); energyPacketLayer.mouseEnabled = false; addChild(energyPacketLayer); } public function addEnergyPacket(_arg1:EnergyPacket):void{ energyPacketLayer.addChild(_arg1); } public function removeEnergyPacket(_arg1:EnergyPacket):void{ energyPacketLayer.removeChild(_arg1); } public function update():void{ var _local1:EnergyPacket; var _local2:int = (energyPacketLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (energyPacketLayer.getChildAt(_local2) as EnergyPacket); _local1.update(); _local2--; }; } } }//package com.wbwar.creeper
Section 150
//EnergyRequest (com.wbwar.creeper.EnergyRequest) package com.wbwar.creeper { public final class EnergyRequest { public var target:Place; public var type:int; public function EnergyRequest(_arg1:Place, _arg2:int){ this.target = _arg1; this.type = _arg2; } } }//package com.wbwar.creeper
Section 151
//EnergyStorage (com.wbwar.creeper.EnergyStorage) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; public final class EnergyStorage extends Place { private var _powered:Boolean; public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; public static const BASE_COST:int = 100; public function EnergyStorage(_arg1:int, _arg2:int){ super(_arg1, _arg2); cacheAsBitmap = true; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; draw(placeBody); placeBody.filters = [new DropShadowFilter(2)]; if (GameSpace.instance != null){ hookUp(); }; } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<EnergyStorage/> ); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } public function set powered(_arg1:Boolean):void{ _powered = _arg1; } override public function update():void{ var _local1:Place; super.update(); if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 == null){ powered = false; } else { powered = true; }; }; calculateDamage(); } public function get powered():Boolean{ return (_powered); } override public function get operateEnergy():Number{ return (0); } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); draw(_local2); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } private static function draw(_arg1:Sprite):void{ _arg1.graphics.beginFill(5308240); _arg1.graphics.lineStyle(1, 0); _arg1.graphics.moveTo(-8, 0); _arg1.graphics.lineTo(-3, -8); _arg1.graphics.lineTo(3, -8); _arg1.graphics.lineTo(8, 0); _arg1.graphics.lineTo(3, 8); _arg1.graphics.lineTo(-3, 8); _arg1.graphics.lineTo(-8, 0); _arg1.graphics.endFill(); } } }//package com.wbwar.creeper
Section 152
//ExhaustLayer (com.wbwar.creeper.ExhaustLayer) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.geom.*; public final class ExhaustLayer { private var mi:Mi; private var updateCount:int; private var p:Point; private var miCount:int;// = 0 private var miTail:Mi;// = null private var miHead:Mi;// = null private var miPool:ObjectPool; private static const BMDHEIGHT:int = 15; public static const MAX_AGE:int = 10; private static const VARIANTCOUNT:int = 4; private static const BMDWIDTH:int = 15; private static const ALPHACOUNT:int = 32; private static var dp:Point; private static var exhaustBMD:Array = []; private static var fullRect:Rectangle; private static var sr:Rectangle; public function ExhaustLayer(){ p = new Point(); super(); miPool = new ObjectPool(function ():Mi{ return (new Mi()); }, null, 1000, 5000); } private function removeMi(_arg1:Mi):void{ if (miHead == null){ return; }; if ((((_arg1.prev == null)) && ((_arg1.next == null)))){ miHead = null; } else { if (_arg1.prev != null){ _arg1.prev.next = _arg1.next; }; if (_arg1.next != null){ _arg1.next.prev = _arg1.prev; }; }; miCount--; } public function update(_arg1:BitmapData):void{ var _local2:int; updateCount++; mi = miHead; while (mi != null) { if (mi.age > MAX_AGE){ removeMi(mi); miPool.checkIn(mi); } else { mi.age++; mi.x = (mi.x + mi.deltaX); mi.y = (mi.y + mi.deltaY); _local2 = int(((mi.age / MAX_AGE) * ALPHACOUNT)); if (_local2 >= ALPHACOUNT){ _local2 = (ALPHACOUNT - 1); }; p.x = ((mi.x + (GameSpace.CELL_WIDTH / 2)) - (BMDWIDTH / 2)); p.y = ((mi.y + (GameSpace.CELL_HEIGHT / 2)) - (BMDHEIGHT / 2)); _arg1.copyPixels(exhaustBMD[(_local2 + (ALPHACOUNT * mi.variant))], sr, p, null, null, true); }; mi = mi.next; }; } public function addExhaust(_arg1:int, _arg2:int):void{ var _local3:Mi = miPool.checkOut(); _local3.prev = null; _local3.next = null; _local3.age = 0; _local3.x = (_arg1 - (BMDWIDTH / 4)); _local3.y = (_arg2 - (BMDHEIGHT / 4)); _local3.variant = int((Math.random() * 4)); addMi(_local3); } public function addExhaustMoving(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{ var _local5:Mi = miPool.checkOut(); _local5.prev = null; _local5.next = null; _local5.age = 0; _local5.x = (_arg1 - (BMDWIDTH / 4)); _local5.y = (_arg2 - (BMDHEIGHT / 4)); _local5.deltaX = _arg3; _local5.deltaY = _arg4; _local5.variant = int((Math.random() * 4)); addMi(_local5); } private function addMi(_arg1:Mi):void{ if (miHead == null){ _arg1.prev = null; _arg1.next = null; } else { _arg1.prev = null; _arg1.next = miHead; miHead.prev = _arg1; }; miHead = _arg1; miCount++; } private static function setup():void{ var _local1:int; var _local3:int; var _local4:Shape; var _local5:BitmapData; var _local6:Matrix; fullRect = new Rectangle(0, 0, (GameSpace.WIDTH * GameSpace.CELL_WIDTH), (GameSpace.HEIGHT * GameSpace.CELL_HEIGHT)); sr = new Rectangle(0, 0, BMDWIDTH, BMDHEIGHT); dp = new Point(0, 0); var _local2:int; while (_local2 < VARIANTCOUNT) { _local1 = (1 + int((Math.random() * 10000))); _local3 = 0; while (_local3 < ALPHACOUNT) { _local4 = ColorUtil.cloud(((1 - ((_local3 + 1) / ALPHACOUNT)) * 3), 0xD0D0D0, (1 - (_local3 / (ALPHACOUNT - 1))), 100, _local1); _local5 = new BitmapData(BMDWIDTH, BMDHEIGHT, true, 0); _local6 = new Matrix(); _local6.translate((BMDWIDTH / 2), (BMDHEIGHT / 2)); _local5.draw(_local4, _local6); exhaustBMD.push(_local5); _local3++; }; _local2++; }; } setup(); } }//package com.wbwar.creeper
Section 153
//Explosion (com.wbwar.creeper.Explosion) package com.wbwar.creeper { public final class Explosion extends Projectile { private var rate:Number; private var duration:int; private var explosionCounter:int; public function Explosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int){ this.x = _arg1; this.y = _arg2; this.rate = _arg5; this.duration = _arg6; graphics.lineStyle(1, _arg3); graphics.drawCircle(0, 0, 6); graphics.lineStyle(1, _arg4); graphics.drawCircle(0, 0, 8); GameSpace.instance.projectiles.addProjectile(this); } override public function update():void{ scaleX = (scaleX + rate); scaleY = scaleX; alpha = (1 - (explosionCounter / duration)); explosionCounter++; if (explosionCounter >= duration){ GameSpace.instance.projectiles.removeProjectile(this); }; } } }//package com.wbwar.creeper
Section 154
//GameSpace (com.wbwar.creeper.GameSpace) package com.wbwar.creeper { import flash.display.*; import flash.events.*; import com.wbwar.creeper.games.*; import flash.media.*; import flash.utils.*; import caurina.transitions.*; import com.wbwar.creeper.dialogs.*; import com.wbwar.creeper.controlpanel.*; import com.adobe.images.*; public final class GameSpace extends Sprite { public var moveLayer:Sprite; private var game:Game; public var statsEnergyCollected:Array; public var exitDialog:ExitDialog; private var _points:int; public var glopBlobProducer:GlopBlobProducer; public var placesClickLayer:Sprite; private var controlFrame:Sprite; public var upgradeEconomic0:Boolean; public var upgradeEconomic2:Boolean; public var upgradeEconomic1:Boolean; public var statsCreeperKilled:Array; public var airWeapons:AirWeapons; public var paused:Boolean; private var guns:Array; public var terrain:Terrain; public var dynamicContent:DynamicContent; private var glopProducers:Array; public var speedUp:Boolean; public var energyPackets:EnergyPackets; public var exhaustLayer:ExhaustLayer; public var settingsDialog:SettingsDialog; public var places:Places; public var backgroundSoundChannel:SoundChannel; public var normalTime:int;// = 3600 public var rift:Rift; private var _musicMute:Boolean; public var upperPlacesLayer:Sprite; public var statsEnergyUsed:Array; public var elapsedTime:int; public var mistLayer:MistLayer; public var currentUnitCount:int;// = 0 private var lastTotalEnergyCollected:int;// = 0 public var stash:Number; public var creeperCoverage:Number;// = 0 public var dynamicContentUpper:DynamicContentUpper; public var creeperKilled:Number;// = 0 public var glop:Glop; public var energyConsumed:Number;// = 0 private var lastCreeperKilled:Number;// = 0 public var backgroundSound:Sound; public var tutorialLayer:Sprite; public var landedDronesLayer:Sprite; public var gameArea:Sprite; public var controlPanel:ControlPanel; public var projectiles:Projectiles; public var energyQueueLength:int; public var stashMax:Number;// = 100 public var totalEnergyCollected:Number;// = 0 public var baseGun:BaseGun; public var destroyedReason:int; private var lastEnergyConsumed:Number;// = 0 public var updateCount:int; public var statsCreeperCoverage:Array; public var upgradeWeapon0:Boolean; public var upgradeWeapon1:Boolean; public var upgradeWeapon2:Boolean; public var gameNumber:int; public var walls:Walls; public var paths:Paths; public var hideGlopBlobWaveViewer:Boolean; public var energyPacketSpeed:Number; private var _mute:Boolean; public var glopProducerLayer:Sprite; public var energyGrid:EnergyGrid; public var suppressCityExit:Boolean; public var upgradesDialog:UpgradesDialog; public static const TOTALENERGY_LEVELS:Array = [0, 2000, 6000, 14000, 30000]; public static const DESTROYED_REASON_SHIP_DESTROYED:int = 1; public static const DESTROYED_REASON_SURVIVALPOD_DESTROYED:int = 2; public static const DESTROYED_REASON_NONE:int = 0; public static var WIDTH:int = 70; public static var HEIGHT:int = 48; public static var CELL_WIDTH:int = 10; public static var instance:GameSpace; public static var EVENT_GUN:String = "EVENT_GUN"; public static var CELL_HEIGHT:int = 10; public function GameSpace(){ statsEnergyCollected = []; statsEnergyUsed = []; statsCreeperCoverage = []; statsCreeperKilled = []; stash = stashMax; glopProducers = []; guns = []; super(); Gun.setNormalRange(); AreaGun.setNormalRange(); ABM.setNormalRange(); init(); } public function getGun(_arg1:int):Weapon{ return (guns[_arg1]); } private function onSettingsDismissClicked(_arg1:Event=null):void{ paused = false; } public function pauseGame():void{ paused = true; } public function get mute():Boolean{ return (_mute); } public function loadGame(_arg1:Game):void{ var _local2:XML; var _local3:Place; this.game = _arg1; terrain.background = _arg1.getBackground(); walls.setData(_arg1.getWallData()); walls.update(); terrain.setData(_arg1.getTerrainHeight()); terrain.update(); glop.setData(terrain.terrainHeight, walls.wallData); for each (_local2 in _arg1.xml.specialplaces.elements()) { _local3 = Place.create(_local2); if ((_local3 is BaseGun)){ baseGun = (_local3 as BaseGun); } else { if ((_local3 is Rift)){ rift = (_local3 as Rift); upperPlacesLayer.addChild(rift); } else { places.addPlace(_local3); }; }; }; for each (_local2 in _arg1.xml.places.elements()) { _local3 = Place.create(_local2); places.addPlace(_local3); }; } public function removeGun(_arg1:int):void{ guns[_arg1] = null; dispatchEvent(new Event(EVENT_GUN)); } private function onMouseClick(_arg1:MouseEvent):void{ } public function init():void{ instance = this; gameArea = new Sprite(); gameArea.mouseEnabled = false; addChild(gameArea); gameArea.y = 0; walls = new Walls(); terrain = new Terrain(); glop = new Glop(); energyGrid = new EnergyGrid(); energyPackets = new EnergyPackets(); placesClickLayer = new Sprite(); placesClickLayer.graphics.beginFill(0, 0); placesClickLayer.graphics.drawRect(0, 0, (WIDTH * CELL_WIDTH), (HEIGHT * CELL_HEIGHT)); placesClickLayer.graphics.endFill(); placesClickLayer.visible = false; glopProducerLayer = new Sprite(); glopProducerLayer.mouseEnabled = false; glopProducerLayer.mouseChildren = false; places = new Places(this); landedDronesLayer = new Sprite(); landedDronesLayer.mouseEnabled = false; upperPlacesLayer = new Sprite(); upperPlacesLayer.mouseEnabled = false; projectiles = new Projectiles(); airWeapons = new AirWeapons(); paths = new Paths(); dynamicContent = new DynamicContent(); dynamicContentUpper = new DynamicContentUpper(); mistLayer = new MistLayer(); exhaustLayer = new ExhaustLayer(); moveLayer = new Sprite(); moveLayer.mouseEnabled = false; moveLayer.mouseChildren = false; upgradesDialog = new UpgradesDialog(); upgradesDialog.x = (((CELL_WIDTH * WIDTH) / 2) - (UpgradesDialog.WIDTH / 2)); upgradesDialog.y = (((CELL_HEIGHT * HEIGHT) / 2) - (UpgradesDialog.HEIGHT / 2)); settingsDialog = new SettingsDialog(); settingsDialog.x = (((CELL_WIDTH * WIDTH) / 2) - (SettingsDialog.WIDTH / 2)); settingsDialog.y = (((CELL_HEIGHT * HEIGHT) / 2) - (SettingsDialog.HEIGHT / 2)); settingsDialog.addEventListener(SettingsDialog.DISMISS_CLICKED, onSettingsDismissClicked); exitDialog = new ExitDialog(); exitDialog.x = (((CELL_WIDTH * WIDTH) / 2) - (ExitDialog.WIDTH / 2)); exitDialog.y = (((CELL_HEIGHT * HEIGHT) / 2) - (ExitDialog.HEIGHT / 2)); exitDialog.addEventListener(ExitDialog.NO_CLICKED, onExitNoClicked); exitDialog.addEventListener(ExitDialog.YES_CLICKED, onExitYesClicked); HelpDialog.instance.addEventListener(HelpDialog.DISMISS_CLICKED, onHelpDismissed, false, 0, true); tutorialLayer = new Sprite(); tutorialLayer.mouseEnabled = false; controlFrame = new Sprite(); controlFrame.mouseEnabled = false; controlPanel = new ControlPanel(); gameArea.addChild(dynamicContent); gameArea.addChild(glopProducerLayer); gameArea.addChild(paths); gameArea.addChild(places); gameArea.addChild(landedDronesLayer); gameArea.addChild(energyPackets); gameArea.addChild(projectiles); gameArea.addChild(upperPlacesLayer); gameArea.addChild(placesClickLayer); if (GameData.mistEffects){ gameArea.addChild(dynamicContentUpper); }; gameArea.addChild(airWeapons); gameArea.addChild(moveLayer); addChild(upgradesDialog); addChild(controlFrame); addChild(controlPanel); controlPanel.y = 480; addChild(tutorialLayer); addChild(settingsDialog); addChild(exitDialog); } private function onExitNoClicked(_arg1:Event=null):void{ paused = false; } public function set mute(_arg1:Boolean):void{ var _local2:SoundTransform; _mute = _arg1; if (_arg1 > 0){ _local2 = new SoundTransform(); _local2.volume = 0; SoundMixer.soundTransform = _local2; } else { _local2 = new SoundTransform(); _local2.volume = 1; SoundMixer.soundTransform = _local2; }; } public function start():void{ addEventListener(Event.ENTER_FRAME, onEnterFrame); addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true); } public function takeSnapshot():void{ var _local1:BitmapData = new BitmapData(700, 525, false, 0); _local1.draw(this); var _local2:JPGEncoder = new JPGEncoder(100); var _local3:ByteArray = _local2.encode(_local1); if (Creeper.saveScreenshotFunction != null){ Creeper.saveScreenshotFunction(_local3); }; } public function addGlopProducer(_arg1:GlopProducer):void{ glopProducers.push(_arg1); glopProducerLayer.addChild(_arg1); } public function startGame():void{ paused = false; } public function finish():void{ var _local1:Place; controlPanel.finish(); removeEventListener(Event.ENTER_FRAME, onEnterFrame); removeEventListener(MouseEvent.CLICK, onMouseClick); if (backgroundSoundChannel != null){ backgroundSoundChannel.stop(); backgroundSoundChannel = null; }; Tweener.removeAllTweens(); var _local2:int = (upperPlacesLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (upperPlacesLayer.getChildAt(_local2) as Place); _local2--; }; if (rift != null){ if (rift.riftOpenSoundChannel != null){ rift.riftOpenSoundChannel.stop(); }; if (rift.activatingSoundChannel != null){ rift.activatingSoundChannel.stop(); }; }; } private function onEnterFrame(_arg1:Event):void{ if (!paused){ update(); if (speedUp){ update(); }; }; } public function set musicMute(_arg1:Boolean):void{ _musicMute = _arg1; } public function showSettingsDialog():void{ paused = true; settingsDialog.visible = true; } private function onHelpDismissed(_arg1:Event):void{ paused = false; } private function onExitYesClicked(_arg1:Event=null):void{ Creeper.instance.gameScreen.showTrainingMissionSelection(-1); } public function set points(_arg1:int):void{ _points = _arg1; if (controlPanel != null){ controlPanel.pointViewer.points = _arg1; }; } private function update():void{ var _local1:GlopProducer; var _local2:Place; var _local3:int; if (updateCount == 5){ _local3 = (places.placesLayer.numChildren - 1); while (_local3 >= 0) { _local2 = (places.placesLayer.getChildAt(_local3) as Place); if ((_local2 is UpgradeBox)){ controlPanel.pointViewer.visible = true; break; }; _local3--; }; }; if ((updateCount % 640) == 0){ statsEnergyCollected.push(((totalEnergyCollected - lastTotalEnergyCollected) / 50)); lastTotalEnergyCollected = totalEnergyCollected; statsEnergyUsed.push(((energyConsumed - lastEnergyConsumed) / 50)); lastEnergyConsumed = energyConsumed; statsCreeperCoverage.push(creeperCoverage); statsCreeperKilled.push((creeperKilled - lastCreeperKilled)); lastCreeperKilled = creeperKilled; }; updateCount++; if (rift.state != Rift.STATE_ACTIVATED){ elapsedTime++; }; if (game != null){ game.update(); }; if ((updateCount % 32) == 0){ controlPanel.update(); }; for each (_local1 in glopProducers) { _local1.update(); }; if (glopBlobProducer != null){ glopBlobProducer.update(); }; glop.update(); energyPackets.update(); walls.update(); dynamicContent.update(); dynamicContentUpper.update(); places.update(); projectiles.update(); airWeapons.update(); paths.update(); dynamicContentUpper.update(); if (stash > stashMax){ stash = stashMax; }; } public function calculateScore():int{ var _local1:Number = (normalTime / ((elapsedTime / 36) + normalTime)); var _local2:int = int((10000 * _local1)); return (_local2); } public function addGun(_arg1:Weapon, _arg2:int):void{ guns[_arg2] = _arg1; dispatchEvent(new Event(EVENT_GUN)); } public function get musicMute():Boolean{ return (_musicMute); } public function get points():int{ return (_points); } public function showExitDialog():void{ paused = true; exitDialog.visible = true; } } }//package com.wbwar.creeper
Section 155
//Glop (com.wbwar.creeper.Glop) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.games.*; import flash.geom.*; public final class Glop extends Sprite { private var tAmt1:Number; private var ttlt:Number; private var tAmt0:Number; private var b0:int; private var b1:int; private var wsl:Number; private var b3:int; private var c2a:Boolean; public var glopBmd:Array; private var c2b:Boolean; private var b2:int; private var shadow:Array; private var deltaAmt0a:Number; private var deltaAmt0b:Number; private var wtl:Number; private var c3a:Boolean; private var c3b:Boolean; private var glopNoise:Array; private var tsla:Number; private var deltaAmt1b:Number; private var terrain:Array; private var deltaAmt1a:Number; private var tloc:int; private var glopBitmap:Bitmap; private var sAmt:Number; private var deltaAmt2a:Number; private var deltaAmt2b:Number; private var c:int; private var olevel:int; private var da:Number; private var deltaAmt3a:Number; private var deltaAmt3b:Number; private var de:Number; private var wallData:Number; private var glopBmdRect:Rectangle; private var sourceX:int; private var sourceY:int; public var data:Array; private var updateCount:int; private var c0a:Boolean; private var c0b:Boolean; private var targetX:int; private var walls:Array; private var sloc:int; private var c1a:Boolean; private var c1b:Boolean; private var targetY:int; public var glopIBmd:Array; private var tAmt2:Number; private var tAmt3:Number; private static const CELL_HEIGHT:int = GameSpace.CELL_HEIGHT; private static const WALL_DECAY:Number = 0; private static const WIDTH:int = GameSpace.WIDTH; private static const HEIGHT:int = GameSpace.HEIGHT; private static const CELL_WIDTH:int = GameSpace.CELL_WIDTH; private static const transferRate:Number = 0.25; private static const NUM_LEVELS:int = 16; public static const MIN_HEAT:Number = 0.001; private static const TERRAIN_HEIGHT_MULTIPLE:Number = Game.TERRAIN_HEIGHT_MULTIPLE; public function Glop(){ var _local10:int; data = []; glopBmd = []; glopIBmd = []; glopNoise = []; super(); var _local1:BitmapData = new BitmapData((GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT), true, 0); glopBitmap = new Bitmap(_local1); addChild(glopBitmap); var _local2:int; while (_local2 < (WIDTH * HEIGHT)) { data[_local2] = 0; _local2++; }; var _local3:int; while (_local3 < NUM_LEVELS) { glopBmd[_local3] = []; glopIBmd[_local3] = []; _local10 = 0; while (_local10 < 16) { glopBmd[_local3][_local10] = new BitmapData(CELL_WIDTH, CELL_HEIGHT, true, 0); _local10++; }; _local3++; }; var _local4:Array = []; _local3 = 0; while (_local3 < NUM_LEVELS) { _local4[_local3] = []; _local10 = 0; while (_local10 <= 5) { _local4[_local3][_local10] = generateEdgeShape(_local3, _local10); _local10++; }; _local3++; }; var _local5:Matrix = new Matrix(); _local5.translate((-(CELL_WIDTH) / 2), (-(CELL_HEIGHT) / 2)); _local5.rotate((-(Math.PI) / 2)); _local5.translate((CELL_WIDTH / 2), (CELL_HEIGHT / 2)); var _local6:Matrix = new Matrix(); _local6.translate((-(CELL_WIDTH) / 2), (-(CELL_HEIGHT) / 2)); _local6.rotate((Math.PI / 2)); _local6.translate((CELL_WIDTH / 2), (CELL_HEIGHT / 2)); var _local7:Matrix = new Matrix(); _local7.translate((-(CELL_WIDTH) / 2), (-(CELL_HEIGHT) / 2)); _local7.rotate(Math.PI); _local7.translate((CELL_WIDTH / 2), (CELL_HEIGHT / 2)); var _local8:Rectangle = new Rectangle(0, 0, CELL_WIDTH, CELL_HEIGHT); var _local9:Point = new Point(0, 0); _local10 = 0; while (_local10 < NUM_LEVELS) { if (_local10 == 0){ (glopBmd[_local10][0] as BitmapData).draw(_local4[_local10][0]); (glopBmd[_local10][1] as BitmapData).draw(_local4[_local10][1]); (glopBmd[_local10][2] as BitmapData).draw(_local4[_local10][1], _local5); (glopBmd[_local10][3] as BitmapData).draw(_local4[_local10][2]); (glopBmd[_local10][4] as BitmapData).draw(_local4[_local10][1], _local7); (glopBmd[_local10][5] as BitmapData).draw(_local4[_local10][5]); (glopBmd[_local10][6] as BitmapData).draw(_local4[_local10][2], _local5); (glopBmd[_local10][7] as BitmapData).draw(_local4[_local10][3]); (glopBmd[_local10][8] as BitmapData).draw(_local4[_local10][1], _local6); (glopBmd[_local10][9] as BitmapData).draw(_local4[_local10][2], _local6); (glopBmd[_local10][10] as BitmapData).draw(_local4[_local10][5], _local6); (glopBmd[_local10][11] as BitmapData).draw(_local4[_local10][3], _local6); (glopBmd[_local10][12] as BitmapData).draw(_local4[_local10][2], _local7); (glopBmd[_local10][13] as BitmapData).draw(_local4[_local10][3], _local7); (glopBmd[_local10][14] as BitmapData).draw(_local4[_local10][3], _local5); (glopBmd[_local10][15] as BitmapData).draw(_local4[_local10][4]); } else { (glopBmd[_local10][0] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][0] as BitmapData).draw(_local4[_local10][0]); (glopBmd[_local10][1] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][1] as BitmapData).draw(_local4[_local10][1]); (glopBmd[_local10][2] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][2] as BitmapData).draw(_local4[_local10][1], _local5); (glopBmd[_local10][3] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][3] as BitmapData).draw(_local4[_local10][2]); (glopBmd[_local10][4] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][4] as BitmapData).draw(_local4[_local10][1], _local7); (glopBmd[_local10][5] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][5] as BitmapData).draw(_local4[_local10][5]); (glopBmd[_local10][6] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][6] as BitmapData).draw(_local4[_local10][2], _local5); (glopBmd[_local10][7] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][7] as BitmapData).draw(_local4[_local10][3]); (glopBmd[_local10][8] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][8] as BitmapData).draw(_local4[_local10][1], _local6); (glopBmd[_local10][9] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][9] as BitmapData).draw(_local4[_local10][2], _local6); (glopBmd[_local10][10] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][10] as BitmapData).draw(_local4[_local10][5], _local6); (glopBmd[_local10][11] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][11] as BitmapData).draw(_local4[_local10][3], _local6); (glopBmd[_local10][12] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][12] as BitmapData).draw(_local4[_local10][2], _local7); (glopBmd[_local10][13] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][13] as BitmapData).draw(_local4[_local10][3], _local7); (glopBmd[_local10][14] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][14] as BitmapData).draw(_local4[_local10][3], _local5); (glopBmd[_local10][15] as BitmapData).copyPixels((glopBmd[(_local10 - 1)][15] as BitmapData), _local8, _local9); (glopBmd[_local10][15] as BitmapData).draw(_local4[_local10][4]); }; _local10++; }; glopNoise[0] = new BitmapData(CELL_WIDTH, CELL_HEIGHT, true, 0); (glopNoise[0] as BitmapData).draw(generateNoise(0)); glopBmdRect = new Rectangle(0, 0, CELL_WIDTH, CELL_HEIGHT); } public function applyGlop(_arg1:int, _arg2:int, _arg3:Number):void{ if ((((((((_arg1 >= 0)) && ((_arg1 < WIDTH)))) && ((_arg2 >= 0)))) && ((_arg2 < HEIGHT)))){ data[(_arg1 + (_arg2 * WIDTH))] = _arg3; }; } public function setData(_arg1:Array, _arg2:Array):void{ this.terrain = _arg1; this.walls = _arg2; } private function getLevelAlpha(_arg1:int):Number{ if (_arg1 == 0){ return (0.38); }; return (0.2); } private function getLevelColor(_arg1:int):Number{ return (3355545); } private function getLevelARGB(_arg1:int):Number{ return (((getLevelAlpha(_arg1) << 24) | getLevelColor(_arg1))); } private function generateNoise(_arg1:int):Shape{ var _local2:Shape = new Shape(); _local2.graphics.lineStyle(1, 0xFFFFFF); _local2.graphics.drawCircle((CELL_WIDTH / 2), (CELL_HEIGHT / 2), 3); return (_local2); } public function getEdgeInt(_arg1:int, _arg2:int, _arg3:int):int{ b0 = 0; b1 = 0; b2 = 0; b3 = 0; if (((((((_arg2 + 1) >= WIDTH)) || (!((terrain[(_arg2 + (_arg3 * WIDTH))] == terrain[((_arg2 + 1) + (_arg3 * WIDTH))]))))) || ((walls[((_arg2 + 1) + (_arg3 * WIDTH))] > 0)))){ b0 = 1; }; if (((((((_arg3 - 1) < 0)) || (!((terrain[(_arg2 + (_arg3 * WIDTH))] == terrain[(_arg2 + ((_arg3 - 1) * WIDTH))]))))) || ((walls[(_arg2 + ((_arg3 - 1) * WIDTH))] > 0)))){ b1 = 1; }; if (((((((_arg2 - 1) < 0)) || (!((terrain[(_arg2 + (_arg3 * WIDTH))] == terrain[((_arg2 - 1) + (_arg3 * WIDTH))]))))) || ((walls[((_arg2 - 1) + (_arg3 * WIDTH))] > 0)))){ b2 = 1; }; if (((((((_arg3 + 1) >= HEIGHT)) || (!((terrain[(_arg2 + (_arg3 * WIDTH))] == terrain[(_arg2 + ((_arg3 + 1) * WIDTH))]))))) || ((walls[(_arg2 + ((_arg3 + 1) * WIDTH))] > 0)))){ b3 = 1; }; if (b0 == 0){ da = data[((_arg2 + 1) + (_arg3 * WIDTH))]; if (da >= 2){ olevel = (NUM_LEVELS - 1); } else { olevel = ((da * (NUM_LEVELS - 1)) / 2); }; if (_arg1 == 0){ if (da >= MIN_HEAT){ b0 = 1; }; } else { if (_arg1 <= olevel){ b0 = 1; }; }; }; if (b1 == 0){ da = data[(_arg2 + ((_arg3 - 1) * WIDTH))]; if (da >= 2){ olevel = (NUM_LEVELS - 1); } else { olevel = ((da * (NUM_LEVELS - 1)) / 2); }; if (_arg1 == 0){ if (da >= MIN_HEAT){ b1 = 1; }; } else { if (_arg1 <= olevel){ b1 = 1; }; }; }; if (b2 == 0){ da = data[((_arg2 - 1) + (_arg3 * WIDTH))]; if (da >= 2){ olevel = (NUM_LEVELS - 1); } else { olevel = ((da * (NUM_LEVELS - 1)) / 2); }; if (_arg1 == 0){ if (da >= MIN_HEAT){ b2 = 1; }; } else { if (_arg1 <= olevel){ b2 = 1; }; }; }; if (b3 == 0){ da = data[(_arg2 + ((_arg3 + 1) * WIDTH))]; if (da >= 2){ olevel = (NUM_LEVELS - 1); } else { olevel = ((da * (NUM_LEVELS - 1)) / 2); }; if (_arg1 == 0){ if (da >= MIN_HEAT){ b3 = 1; }; } else { if (_arg1 <= olevel){ b3 = 1; }; }; }; return (((((b3 << 3) | (b2 << 2)) | (b1 << 1)) | b0)); } public function addGlop(_arg1:int, _arg2:int, _arg3:Number):void{ var _local4:Number; var _local5:Number; if ((((((((_arg1 >= 0)) && ((_arg1 < WIDTH)))) && ((_arg2 >= 0)))) && ((_arg2 < HEIGHT)))){ _local4 = data[(_arg1 + (_arg2 * WIDTH))]; _local5 = (_local4 + _arg3); if (_local5 < 0){ _local5 = 0; }; if (_arg3 < 0){ GameSpace.instance.creeperKilled = (GameSpace.instance.creeperKilled + (_local4 - _local5)); }; data[(_arg1 + (_arg2 * WIDTH))] = _local5; }; } public function update():void{ updateCount++; if ((updateCount % 7) != 0){ return; }; updateGlop(); } public function addAllGlop(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:Number; var _local6:Number; _local3 = 0; while (_local3 < HEIGHT) { _local2 = 0; while (_local2 < WIDTH) { _local4 = (_local2 + (_local3 * WIDTH)); _local5 = data[_local4]; _local6 = (_local5 + _arg1); if (_local6 < 0){ _local6 = 0; }; data[_local4] = _local6; _local2++; }; _local3++; }; } private function updateGlop():void{ shadow = data.concat(); var _local1:Number = 0; sourceY = 0; while (sourceY < HEIGHT) { sourceX = 0; while (sourceX < WIDTH) { c0a = false; c0b = false; c1a = false; c1b = false; c2a = false; c2b = false; c3a = false; c3b = false; sloc = (sourceX + (sourceY * WIDTH)); targetX = (sourceX + 1); targetY = sourceY; tloc = (targetX + (targetY * WIDTH)); wtl = walls[tloc]; sAmt = shadow[sloc]; tsla = (terrain[sloc] + sAmt); wsl = walls[sloc]; _local1 = (_local1 + sAmt); if (targetX < WIDTH){ tAmt0 = shadow[tloc]; if ((((sAmt > 0)) || ((tAmt0 > 0)))){ if (wsl > 0){ if (tAmt0 >= MIN_HEAT){ wallData = (wsl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[sloc] = wallData; }; } else { if (wtl > 0){ if (sAmt >= MIN_HEAT){ wallData = (wtl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[tloc] = wallData; }; } else { ttlt = (terrain[tloc] + tAmt0); if (tsla > ttlt){ c0a = true; deltaAmt0a = (tsla - ttlt); if (deltaAmt0a > sAmt){ deltaAmt0a = sAmt; }; } else { c0b = true; deltaAmt0b = (ttlt - tsla); if (deltaAmt0b > tAmt0){ deltaAmt0b = tAmt0; }; }; }; }; }; }; targetX = (sourceX + 1); targetY = (sourceY + 1); tloc = (targetX + (targetY * WIDTH)); wtl = walls[tloc]; if ((((targetX < WIDTH)) && ((targetY < HEIGHT)))){ tAmt1 = shadow[tloc]; if ((((sAmt > 0)) || ((tAmt1 > 0)))){ if (wsl > 0){ if (tAmt1 >= MIN_HEAT){ wallData = (wsl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[sloc] = wallData; }; } else { if (wtl > 0){ if (sAmt >= MIN_HEAT){ wallData = (wtl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[tloc] = wallData; }; } else { ttlt = (terrain[tloc] + tAmt1); if (tsla > ttlt){ c1a = true; deltaAmt1a = (tsla - ttlt); if (deltaAmt1a > sAmt){ deltaAmt1a = sAmt; }; } else { c1b = true; deltaAmt1b = (ttlt - tsla); if (deltaAmt1b > tAmt1){ deltaAmt1b = tAmt1; }; }; }; }; }; }; targetX = sourceX; targetY = (sourceY + 1); tloc = (targetX + (targetY * WIDTH)); wtl = walls[tloc]; if (targetY < HEIGHT){ tAmt2 = shadow[tloc]; if ((((sAmt > 0)) || ((tAmt2 > 0)))){ if (wsl > 0){ if (tAmt2 >= MIN_HEAT){ wallData = (wsl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[sloc] = wallData; }; } else { if (wtl > 0){ if (sAmt >= MIN_HEAT){ wallData = (wtl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[tloc] = wallData; }; } else { ttlt = (terrain[tloc] + tAmt2); if (tsla > ttlt){ c2a = true; deltaAmt2a = (tsla - ttlt); if (deltaAmt2a > sAmt){ deltaAmt2a = sAmt; }; } else { c2b = true; deltaAmt2b = (ttlt - tsla); if (deltaAmt2b > tAmt2){ deltaAmt2b = tAmt2; }; }; }; }; }; }; targetX = (sourceX - 1); targetY = (sourceY + 1); tloc = (targetX + (targetY * WIDTH)); wtl = walls[tloc]; if ((((targetX >= 0)) && ((targetY < HEIGHT)))){ tAmt3 = shadow[tloc]; if ((((sAmt > 0)) || ((tAmt3 > 0)))){ if (wsl > 0){ if (tAmt3 >= MIN_HEAT){ wallData = (wsl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[sloc] = wallData; }; } else { if (wtl > 0){ if (sAmt >= MIN_HEAT){ wallData = (wtl - WALL_DECAY); if (wallData <= 0){ wallData = 0; }; walls[tloc] = wallData; }; } else { ttlt = (terrain[tloc] + tAmt3); if (tsla > ttlt){ c3a = true; deltaAmt3a = (tsla - ttlt); if (deltaAmt3a > sAmt){ deltaAmt3a = sAmt; }; } else { c3b = true; deltaAmt3b = (ttlt - tsla); if (deltaAmt3b > tAmt3){ deltaAmt3b = tAmt3; }; }; }; }; }; }; targetX = (sourceX + 1); targetY = sourceY; tloc = (targetX + (targetY * WIDTH)); if (c0a){ de = ((deltaAmt0a * 0.5) * transferRate); data[sloc] = (data[sloc] - de); data[tloc] = (data[tloc] + de); } else { if (c0b){ de = ((deltaAmt0b * 0.5) * transferRate); data[sloc] = (data[sloc] + de); data[tloc] = (data[tloc] - de); }; }; targetX = (sourceX + 1); targetY = (sourceY + 1); tloc = (targetX + (targetY * WIDTH)); if (c1a){ de = ((deltaAmt1a * 0.5) * transferRate); data[sloc] = (data[sloc] - de); data[tloc] = (data[tloc] + de); } else { if (c1b){ de = ((deltaAmt1b * 0.5) * transferRate); data[sloc] = (data[sloc] + de); data[tloc] = (data[tloc] - de); }; }; targetX = sourceX; targetY = (sourceY + 1); tloc = (targetX + (targetY * WIDTH)); if (c2a){ de = ((deltaAmt2a * 0.5) * transferRate); data[sloc] = (data[sloc] - de); data[tloc] = (data[tloc] + de); } else { if (c2b){ de = ((deltaAmt2b * 0.5) * transferRate); data[sloc] = (data[sloc] + de); data[tloc] = (data[tloc] - de); }; }; targetX = (sourceX - 1); targetY = (sourceY + 1); tloc = (targetX + (targetY * WIDTH)); if (c3a){ de = ((deltaAmt3a * 0.5) * transferRate); data[sloc] = (data[sloc] - de); data[tloc] = (data[tloc] + de); } else { if (c3b){ de = ((deltaAmt3b * 0.5) * transferRate); data[sloc] = (data[sloc] + de); data[tloc] = (data[tloc] - de); }; }; sAmt = data[sloc]; if ((((sAmt < MIN_HEAT)) && ((sAmt > 0)))){ data[sloc] = 0; }; sourceX++; }; sourceY++; }; GameSpace.instance.creeperCoverage = _local1; } private function generateEdgeShape(_arg1:int, _arg2:int):Shape{ var _local8:Shape; var _local9:Shape; var _local10:Shape; var _local11:Shape; var _local12:Shape; var _local13:Shape; var _local3:Array = []; var _local4:Array = []; var _local5:Number = 48; var _local6:Number = 0.5; var _local7:int; while (_local7 < NUM_LEVELS) { _local3[_local7] = getLevelColor(_local7); _local4[_local7] = getLevelAlpha(_local7); _local7++; }; if (_arg2 == 0){ _local8 = new Shape(); _local8.graphics.beginFill(_local3[_arg1], _local4[_arg1]); _local8.graphics.lineStyle(1, _local5, _local6); _local8.graphics.drawRect(0, 0, (CELL_WIDTH - 0.5), (CELL_HEIGHT - 0.5)); _local8.graphics.endFill(); return (_local8); }; if (_arg2 == 1){ _local9 = new Shape(); _local9.graphics.beginFill(_local3[_arg1], _local4[_arg1]); _local9.graphics.lineStyle(1, _local5, _local6); _local9.graphics.drawCircle(CELL_WIDTH, (CELL_HEIGHT / 2), (CELL_WIDTH / 2)); _local9.graphics.endFill(); return (_local9); }; if (_arg2 == 2){ _local10 = new Shape(); _local10.graphics.beginFill(_local3[_arg1], _local4[_arg1]); _local10.graphics.moveTo(0, 0); _local10.graphics.lineTo(CELL_WIDTH, 0); _local10.graphics.lineTo(CELL_WIDTH, CELL_HEIGHT); _local10.graphics.lineTo(0, 0); _local10.graphics.endFill(); _local10.graphics.lineStyle(1, _local5, _local6); _local10.graphics.moveTo(0, 0); _local10.graphics.lineTo(CELL_WIDTH, CELL_HEIGHT); return (_local10); }; if (_arg2 == 3){ _local11 = new Shape(); _local11.graphics.beginFill(_local3[_arg1], _local4[_arg1]); _local11.graphics.drawRect(0, 0, CELL_WIDTH, CELL_HEIGHT); _local11.graphics.endFill(); _local11.graphics.lineStyle(1, _local5, _local6); _local11.graphics.moveTo(0, (CELL_HEIGHT - 0.5)); _local11.graphics.lineTo(CELL_WIDTH, (CELL_HEIGHT - 0.5)); return (_local11); }; if (_arg2 == 4){ _local12 = new Shape(); _local12.graphics.beginFill(_local3[_arg1], _local4[_arg1]); _local12.graphics.drawRect(0, 0, CELL_WIDTH, CELL_HEIGHT); _local12.graphics.endFill(); return (_local12); }; if (_arg2 == 5){ _local13 = new Shape(); _local13.graphics.beginFill(_local3[_arg1], _local4[_arg1]); _local13.graphics.drawRect(0, 0, CELL_WIDTH, CELL_HEIGHT); _local13.graphics.endFill(); _local13.graphics.lineStyle(1, _local5, _local6); _local13.graphics.moveTo(0, (CELL_HEIGHT - 0.5)); _local13.graphics.lineTo(CELL_WIDTH, (CELL_HEIGHT - 0.5)); _local13.graphics.moveTo(0, 0.5); _local13.graphics.lineTo(CELL_WIDTH, 0.5); return (_local13); }; return (new Shape()); } } }//package com.wbwar.creeper
Section 156
//GlopBlob (com.wbwar.creeper.GlopBlob) package com.wbwar.creeper { import flash.media.*; public final class GlopBlob extends Projectile { private var strength:Number; private var tx:Number; private var ty:Number; private var targetX:int; private var targetY:int; private var state:int; private var duration:int; private var distance:Number; private var applyCounter:int; private static const STATE_APPLY:int = 1; private static const SPEED:Number = 1.5; private static const STATE_FLIGHT:int = 0; public function GlopBlob(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int){ this.x = _arg1; this.y = _arg2; this.tx = _arg3; this.ty = _arg4; this.targetX = (_arg3 / GameSpace.CELL_WIDTH); this.targetY = (_arg4 / GameSpace.CELL_HEIGHT); this.strength = _arg5; this.duration = _arg6; addChild(new FlyingGlop()); distance = Math.sqrt((((_arg3 - _arg1) * (_arg3 - _arg1)) + ((_arg4 - _arg2) * (_arg4 - _arg2)))); GameSpace.instance.projectiles.addProjectile(this); } private function kaboom():void{ state = STATE_APPLY; visible = false; dead = true; } override public function update():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; if (state == STATE_FLIGHT){ rotation = (rotation + 5); _local1 = (tx - x); _local2 = (ty - y); _local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); _local4 = (distance - _local3); _local5 = (Math.cos((((_local4 / distance) * Math.PI) / 2)) / 2); scaleX = (1 + _local5); scaleY = scaleX; if (_local3 <= SPEED){ kaboom(); } else { x = (x + ((_local1 / _local3) * SPEED)); y = (y + ((_local2 / _local3) * SPEED)); }; } else { if (state == STATE_APPLY){ applyCounter++; GameSpace.instance.glop.data[(targetX + (targetY * GameSpace.WIDTH))] = strength; if (applyCounter >= duration){ GameSpace.instance.projectiles.removeProjectile(this); }; }; }; } override public function destroy():void{ super.destroy(); visible = false; dead = true; GameSpace.instance.projectiles.removeProjectile(this); var _local1:int = (x / GameSpace.CELL_WIDTH); var _local2:int = (y / GameSpace.CELL_HEIGHT); GameSpace.instance.mistLayer.addMist(_local1, _local2); GameSpace.instance.mistLayer.addMist((_local1 - 2), _local2); GameSpace.instance.mistLayer.addMist((_local1 + 2), _local2); GameSpace.instance.mistLayer.addMist(_local1, (_local2 - 2)); GameSpace.instance.mistLayer.addMist(_local1, (_local2 + 2)); GameSpace.instance.mistLayer.addMist((_local1 - 2), (_local2 - 2)); GameSpace.instance.mistLayer.addMist((_local1 - 2), (_local2 + 2)); GameSpace.instance.mistLayer.addMist((_local1 + 2), (_local2 - 2)); GameSpace.instance.mistLayer.addMist((_local1 + 2), (_local2 + 2)); GameSpace.instance.mistLayer.addMist(_local1, (_local2 - 3)); GameSpace.instance.mistLayer.addMist(_local1, (_local2 + 3)); GameSpace.instance.mistLayer.addMist((_local1 - 3), _local2); GameSpace.instance.mistLayer.addMist((_local1 + 3), _local2); new Explosion(x, y, 12543, 0xFF0000, 1, 5); var _local3:Sound = new BlobExplosionSound(); _local3.play(); } } }//package com.wbwar.creeper
Section 157
//GlopBlobProducer (com.wbwar.creeper.GlopBlobProducer) package com.wbwar.creeper { import flash.media.*; public final class GlopBlobProducer { private var waveIndex:int; private var volleyIndex:int; private var updateCount:int; private var currentWave:GlopBlobProducerWave; private var state:int; private var currentWaveUpdateCount:int; private var volleyUpdateCount:int; public var waves:Array; private static const STATE_FIRING:int = 1; private static const STATE_VOLLEYWAITING:int = 2; private static const STATE_WAITING:int = 0; public function GlopBlobProducer(){ waves = []; super(); } public function get remainingTime():int{ var _local1:int; if (currentWave != null){ _local1 = (currentWave.activateTime - currentWaveUpdateCount); if (_local1 < 0){ _local1 = 0; }; return (_local1); } else { }; return (!NULL!); } public function update():void{ var _local1:Sound; if ((((currentWave == null)) && ((waves.length > 0)))){ currentWave = waves[waveIndex]; waveIndex++; }; if (currentWave != null){ if (state == STATE_WAITING){ if (currentWaveUpdateCount >= currentWave.activateTime){ state = STATE_FIRING; _local1 = new AirAttackSound(); _local1.play(); volleyIndex = 0; }; } else { if (state == STATE_FIRING){ fireVolley(currentWave.volleyGroupSize); volleyIndex++; if (volleyIndex >= currentWave.volleyAmt){ state = STATE_WAITING; currentWaveUpdateCount = 0; nextWave(); } else { state = STATE_VOLLEYWAITING; volleyUpdateCount = 0; }; } else { if (state == STATE_VOLLEYWAITING){ if (volleyUpdateCount >= currentWave.volleyDelay){ state = STATE_FIRING; }; volleyUpdateCount++; }; }; }; currentWaveUpdateCount++; }; updateCount++; } private function nextWave():void{ if (waveIndex < waves.length){ currentWave = waves[waveIndex]; }; waveIndex++; } private function fireVolley(_arg1:int):void{ var _local2:int; while (_local2 < _arg1) { produceBlob(); _local2++; }; } private function produceBlob():void{ var _local2:Place; var _local4:int; var _local5:Place; var _local6:int; var _local7:int; var _local1:Array = []; var _local3:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local3 >= 0) { _local2 = (GameSpace.instance.places.placesLayer.getChildAt(_local3) as Place); if (((!(_local2.building)) && ((((_local2 is Node)) || ((_local2 is Relay)))))){ _local1.push(_local2); }; _local3--; }; if (_local1.length > 0){ _local4 = int((Math.random() * _local1.length)); _local5 = (_local1[_local4] as Place); if (currentWave.volleySide == GlopBlobProducerWave.SIDE_LEFT){ _local6 = -20; _local7 = ((20 + ((Math.random() * GameSpace.HEIGHT) * GameSpace.CELL_HEIGHT)) - 40); } else { if (currentWave.volleySide == GlopBlobProducerWave.SIDE_RIGHT){ _local6 = ((GameSpace.WIDTH * GameSpace.CELL_WIDTH) + 20); _local7 = ((20 + ((Math.random() * GameSpace.HEIGHT) * GameSpace.CELL_HEIGHT)) - 40); } else { if (currentWave.volleySide == GlopBlobProducerWave.SIDE_TOP){ _local6 = ((20 + ((Math.random() * GameSpace.WIDTH) * GameSpace.CELL_WIDTH)) - 40); _local7 = -20; } else { if (currentWave.volleySide == GlopBlobProducerWave.SIDE_BOTTOM){ _local6 = ((20 + ((Math.random() * GameSpace.WIDTH) * GameSpace.CELL_WIDTH)) - 40); _local7 = ((GameSpace.HEIGHT * GameSpace.CELL_HEIGHT) + 20); }; }; }; }; new GlopBlob(_local6, _local7, ((_local5.x + (Math.random() * 40)) - 20), ((_local5.y + (Math.random() * 40)) - 20), currentWave.volleyStrength, 1); }; } } }//package com.wbwar.creeper
Section 158
//GlopBlobProducerWave (com.wbwar.creeper.GlopBlobProducerWave) package com.wbwar.creeper { public final class GlopBlobProducerWave { public var activateTime:int; public var volleySide:int; public var volleyStrength:Number; public var volleyGroupSize:int; public var volleyDelay:int; public var volleyAmt:int; public static const SIDE_BOTTOM:int = 2; public static const SIDE_RIGHT:int = 3; public static const SIDE_TOP:int = 0; public static const SIDE_LEFT:int = 1; public function GlopBlobProducerWave(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Number, _arg6:int){ this.activateTime = _arg1; this.volleyAmt = _arg2; this.volleyGroupSize = _arg3; this.volleyDelay = _arg4; this.volleyStrength = _arg5; this.volleySide = _arg6; } } }//package com.wbwar.creeper
Section 159
//GlopProducer (com.wbwar.creeper.GlopProducer) package com.wbwar.creeper { import flash.display.*; import caurina.transitions.*; public final class GlopProducer extends Sprite { public var finishTime:int;// = 2147483647 private var updateCount:int; public var productionModifierTimeMax:Number;// = 0 public var startTime:int; public var productionModifierTime:Number;// = 0 public var gameSpaceX:int; public var gameSpaceY:int; public var productionModifierEnergyResponseMax:Number;// = 0 private var off:Boolean; public var productionInterval:int; public var productionModifierEnergyResponse:Number;// = 0 public var productionBaseAmt:Number;// = 0 public function GlopProducer(_arg1:int, _arg2:int){ this.gameSpaceX = _arg1; this.gameSpaceY = _arg2; setScreenCoords(); mouseEnabled = false; mouseChildren = false; graphics.lineStyle(2, 0); graphics.moveTo(0, -6); graphics.lineTo(0, 6); graphics.moveTo(-6, 0); graphics.lineTo(6, 0); graphics.moveTo(-4, -4); graphics.lineTo(4, 4); graphics.moveTo(4, -4); graphics.lineTo(-4, 4); graphics.lineStyle(); graphics.moveTo(0, 0); graphics.beginFill(2105504); graphics.drawCircle(0, 0, 4); graphics.endFill(); graphics.beginFill(7373055); graphics.drawCircle(0, 0, 2); graphics.endFill(); } public function update():void{ if (updateCount == 100){ if (Creeper.doubleDownMode){ productionInterval = int((productionInterval / 2)); }; }; var _local1:Number = 0; var _local2:Number = 0; if (((((((!(off)) && ((updateCount >= startTime)))) && ((updateCount <= finishTime)))) && (((updateCount % productionInterval) == 0)))){ _local1 = (productionModifierTime * (updateCount - startTime)); if (_local1 > productionModifierTimeMax){ _local1 = productionModifierTimeMax; }; _local2 = (productionModifierEnergyResponse * GameSpace.instance.dynamicContent.energyAccumulationRate); if (_local2 > productionModifierEnergyResponseMax){ _local2 = productionModifierEnergyResponseMax; }; GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))] = ((productionBaseAmt + _local1) + _local2); }; updateCount++; } private function holeComplete():void{ visible = false; } public function fallIntoHole():void{ off = true; var _local1:Number = (Math.random() * 2); Tweener.addTween(this, {time:6, delay:_local1, transition:"easeInExpo", x:GameSpace.instance.rift.x, y:GameSpace.instance.rift.y, onComplete:holeComplete}); } public function snapTo():void{ var _local1:int = (x / GameSpace.CELL_WIDTH); var _local2:int = (y / GameSpace.CELL_HEIGHT); this.gameSpaceX = _local1; this.gameSpaceY = _local2; setScreenCoords(); } protected function setScreenCoords():void{ x = ((gameSpaceX * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); y = ((gameSpaceY * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); } } }//package com.wbwar.creeper
Section 160
//GlopProducerNexus (com.wbwar.creeper.GlopProducerNexus) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.media.*; import caurina.transitions.*; public class GlopProducerNexus extends Shape { private var md:MessageDialog; public static const HOLE_COMPLETE:String = "Hole_Complete"; public function GlopProducerNexus(){ graphics.lineStyle(2, 0); graphics.moveTo(0, -6); graphics.lineTo(0, 6); graphics.moveTo(-6, 0); graphics.lineTo(6, 0); graphics.moveTo(-4, -4); graphics.lineTo(4, 4); graphics.moveTo(4, -4); graphics.lineTo(-4, 4); graphics.lineStyle(); graphics.moveTo(0, 0); graphics.beginFill(2105504); graphics.drawCircle(0, 0, 4); graphics.endFill(); graphics.beginFill(7373055); graphics.drawCircle(0, 0, 2); graphics.endFill(); scaleX = 3; scaleY = scaleX; } private function holeComplete():void{ new Explosion(GameSpace.instance.rift.x, GameSpace.instance.rift.y, 96, 0xFF, 3, 30); new Explosion(GameSpace.instance.rift.x, GameSpace.instance.rift.y, 96, 0xFF, 2, 30); new Explosion(GameSpace.instance.rift.x, GameSpace.instance.rift.y, 96, 0xFF, 1, 30); var _local1:Sound = new NexusDestroyedSound(); _local1.play(); md.hide(true); visible = false; dispatchEvent(new Event(HOLE_COMPLETE)); } private function message():void{ md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 300, -1, false); md.textField.text = ("[CREEPER NEXUS]\n" + "NOOOOOOOOOOOOOOO!!!!!!!!"); md.show(); } public function fallIntoHole():void{ Tweener.addTween(this, {time:10, delay:5, transition:"easeInExpo", x:GameSpace.instance.rift.x, y:GameSpace.instance.rift.y, onStart:message, onComplete:holeComplete}); } } }//package com.wbwar.creeper
Section 161
//Gun (com.wbwar.creeper.Gun) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import com.wbwar.creeper.games.*; import flash.geom.*; import flash.media.*; public final class Gun extends Weapon { private var bulletShapeVisibleCounter:int; private var lastHealth:Number;// = 0 private var FIRERATEMOD:int; private var healthBar:Bar; private var bodyShape:DisplayObject; private var barrel:DisplayObject; private var energyBar:Bar; private var lastEnergyLevel:Number;// = 0 private var fireCounter:int; private var fireSound:Sound; private var bulletShape:Shape; private static const FIRE_RATE:int = 0; public static const BASE_COST:int = 125; private static var soundCount:int; public static var START_RANGE:int = 6; public static var unitCost:int = 1; public function Gun(_arg1:int, _arg2:int){ super(_arg1, _arg2); RANGE = START_RANGE; energyBar = new Bar(20, 3, 0xFF0000, 0); addChild(energyBar); energyBar.x = -10; energyBar.y = -10; energyBar.setValue(0, 20); energyBar.filters = [new DropShadowFilter(1)]; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; addChild(placeBody); addChild(armedShape); addChild(turnedOffShape); bodyShape = getBodyShape(); placeBody.addChild(bodyShape); bodyShape.filters = [new DropShadowFilter(2)]; bulletShape = new Shape(); bulletShape.filters = [new GlowFilter(9474303, 1, 4, 4, 2, 1)]; placeBody.addChild(bulletShape); barrel = getBarrelShape(); placeBody.addChild(barrel); if (GameSpace.instance != null){ places.addPlace(this); fireSound = new GunSound(); }; } private function fireWeapon():void{ var _local1:Point; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Damage; var _local7:SoundChannel; if (energyLevel <= -999999){ return; }; if (fireCounter < ((6 - (level * 2)) - FIRERATEMOD)){ fireCounter++; return; }; if (state != STATE_PLACED){ return; }; _local1 = findNearestGlop(); if (_local1 != null){ _local2 = (_local1.x - gameSpaceX); _local3 = (_local1.y - gameSpaceY); _local4 = ((Math.atan2(_local3, _local2) * 180) / Math.PI); _local5 = Navigation.angleSpan(barrel.rotation, _local4); barrel.rotation = _local4; damageGlop(_local1.x, _local1.y, 8, 8, -1, 0.2); bulletShape.visible = true; if (GameData.particleEffects){ _local6 = new Damage(15, 15, 3); _local6.x = (x + (_local2 * GameSpace.CELL_WIDTH)); _local6.y = (y + (_local3 * GameSpace.CELL_HEIGHT)); }; bulletShapeVisibleCounter = 0; bulletShape.graphics.clear(); bulletShape.graphics.lineStyle(2, 0xFF0000, 1, false, LineScaleMode.NORMAL, CapsStyle.SQUARE); bulletShape.graphics.moveTo(0, 0); bulletShape.graphics.lineTo((_local2 * GameSpace.CELL_WIDTH), (_local3 * GameSpace.CELL_HEIGHT)); bulletShape.graphics.beginFill(0x800000); bulletShape.graphics.drawCircle(0, 0, 1); bulletShape.graphics.endFill(); fireCounter = 0; energyLevel = (energyLevel - (1 - (0.33333333 * level))); if (energyLevel < 0){ energyLevel = 0; }; if (soundCount < 6){ _local7 = fireSound.play(); if (_local7 != null){ soundCount++; _local7.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true); }; }; }; } override public function update():void{ super.update(); if (RANGE != START_RANGE){ RANGE = START_RANGE; }; if (GameSpace.instance.upgradeWeapon1){ FIRERATEMOD = 1; } else { FIRERATEMOD = 0; }; if (state == STATE_PLACED){ healthBar.visible = true; energyBar.visible = true; } else { healthBar.visible = false; energyBar.visible = false; }; if (energyLevel != lastEnergyLevel){ energyBar.setValue(energyLevel, operateEnergy); }; lastEnergyLevel = energyLevel; if (health != lastHealth){ healthBar.setValue(health, maxHealth); }; lastHealth = health; bulletShapeVisibleCounter++; if (bulletShapeVisibleCounter >= 3){ bulletShape.visible = false; }; if (((((_turnedOn) && (_armed))) && (!(building)))){ fireWeapon(); }; } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<Gun/> ); } private function soundComplete(_arg1:Event):void{ soundCount--; } override public function get operateEnergy():Number{ return (0); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.addChild(getBodyShape()); _local2.addChild(getBarrelShape()); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } public static function getBarrelShape():DisplayObject{ var _local1 = 7; var _local2:Shape = new Shape(); _local2.graphics.lineStyle(3, 0); _local2.graphics.moveTo(0, 0); _local2.graphics.lineTo(_local1, 0); return (_local2); } public static function legalLocation(_arg1:int, _arg2:int, _arg3:Place=null):Boolean{ var _local4:Place; if (!legalTerrainLocation(_arg1, _arg2)){ return (false); }; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (false); }; var _local5:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local5 >= 0) { _local4 = (GameSpace.instance.places.placesLayer.getChildAt(_local5) as Place); if ((((_local4 is MovingPlace)) && (!(((_local4 as MovingPlace).state == MovingPlace.STATE_PLACED))))){ } else { if (((!((_arg3 == null))) && ((_arg3 == _local4)))){ } else { if ((((Math.abs((_local4.gameSpaceX - _arg1)) < 2)) && ((Math.abs((_local4.gameSpaceY - _arg2)) < 2)))){ return (false); }; }; }; _local5--; }; return (true); } public static function getBodyShape():DisplayObject{ var _local1:Sprite; _local1 = new Sprite(); _local1.mouseEnabled = false; _local1.graphics.beginFill(0, 0); _local1.graphics.drawRect(-10, -10, 20, 20); _local1.graphics.endFill(); var _local2:MovieClip = new GunBody(); _local2.mouseEnabled = false; _local1.addChild(_local2); return (_local1); } public static function setUpgradedRange():void{ START_RANGE = 7; } public static function setNormalRange():void{ START_RANGE = 6; } } }//package com.wbwar.creeper
Section 162
//Logistics (com.wbwar.creeper.Logistics) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; public final class Logistics extends Place { private var _powered:Boolean; public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; public static const BASE_COST:int = 175; public function Logistics(_arg1:int, _arg2:int){ super(_arg1, _arg2); cacheAsBitmap = true; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; draw(placeBody); placeBody.filters = [new DropShadowFilter(2)]; if (GameSpace.instance != null){ hookUp(); }; } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<Logistics/> ); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } public function set powered(_arg1:Boolean):void{ _powered = _arg1; } override public function update():void{ var _local1:Place; super.update(); if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 == null){ powered = false; } else { powered = true; }; }; calculateDamage(); } public function get powered():Boolean{ return (_powered); } override public function get operateEnergy():Number{ return (0); } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); draw(_local2); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } private static function draw(_arg1:Sprite):void{ _arg1.graphics.beginFill(0xFF0000); _arg1.graphics.lineStyle(1, 0); _arg1.graphics.moveTo(0, -8); _arg1.graphics.lineTo(8, 0); _arg1.graphics.lineTo(0, 8); _arg1.graphics.lineTo(-8, 0); _arg1.graphics.lineTo(0, -8); _arg1.graphics.endFill(); } } }//package com.wbwar.creeper
Section 163
//Mi (com.wbwar.creeper.Mi) package com.wbwar.creeper { public final class Mi { public var deltaX:Number;// = 0 public var deltaY:Number;// = 0 public var variant:int; public var next:Mi;// = null public var x:Number; public var y:Number; public var prev:Mi;// = null public var age:int; } }//package com.wbwar.creeper
Section 164
//Missile (com.wbwar.creeper.Missile) package com.wbwar.creeper { import com.wbwar.creeper.util.*; import flash.media.*; public final class Missile extends Projectile { private var projectile:Projectile; private var fireSound:Sound; private var noTargetCounter:int; private static const MOVE_SPEED:Number = 3; private static const EXPLODE_RANGE:Number = 10; private static const MAX_NOTARGET_TIME:Number = 100; private static const LOCK_RANGE:Number = 1000; private static const ROT_SPEED:Number = 10; public function Missile(_arg1:Number, _arg2:Number){ this.x = _arg1; this.y = _arg2; findReplacementProjectile(); addChild(new ABMMissileBody()); GameSpace.instance.projectiles.addProjectile(this); fireSound = new MissileLaunchSound(); fireSound.play(); var _local3:Number = (projectile.x - _arg1); var _local4:Number = (projectile.y - _arg2); rotation = ((Math.atan2(_local4, _local3) * 180) / Math.PI); cacheAsBitmap = true; } private function kaboom():void{ GameSpace.instance.projectiles.removeProjectile(this); } override public function update():void{ var _local1:Number; var _local2:Number; var _local3:Number; if ((((projectile == null)) || (projectile.dead))){ findReplacementProjectile(); }; if ((((projectile == null)) || (projectile.dead))){ noTargetCounter++; } else { noTargetCounter = 0; }; move(); if (((!((projectile == null))) && (!(projectile.dead)))){ _local1 = (projectile.x - x); _local2 = (projectile.y - y); _local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); if (_local3 < EXPLODE_RANGE){ projectile.destroy(); kaboom(); }; }; if (noTargetCounter >= MAX_NOTARGET_TIME){ kaboom(); }; } private function rotate():Boolean{ var _local1:Number; if ((((projectile == null)) || (projectile.dead))){ return (true); }; var _local2:Number = (projectile.x - x); var _local3:Number = (projectile.y - y); _local1 = ((Math.atan2(_local3, _local2) * 180) / Math.PI); var _local4:Number = Navigation.angleSpan(rotation, _local1); var _local5:Number = ((_local4 < 0)) ? -(_local4) : _local4; if (_local5 < ROT_SPEED){ rotation = _local1; return (true); }; if (_local4 < 0){ rotation = (rotation - ROT_SPEED); } else { rotation = (rotation + ROT_SPEED); }; return (false); } private function move():Boolean{ var _local1:Boolean; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; rotate(); GameSpace.instance.exhaustLayer.addExhaust(x, y); if ((((projectile == null)) || (projectile.dead))){ _local1 = true; } else { _local2 = (projectile.x - x); _local3 = (projectile.y - y); _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); if (x < MOVE_SPEED){ _local1 = false; } else { _local1 = true; }; }; if (_local1){ _local5 = (Math.cos(((rotation * Math.PI) / 180)) * MOVE_SPEED); _local6 = (Math.sin(((rotation * Math.PI) / 180)) * MOVE_SPEED); x = (x + _local5); y = (y + _local6); return (false); }; x = projectile.x; y = projectile.y; return (true); } private function findReplacementProjectile():Boolean{ var _local1:Projectile; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Projectile; var _local6:Number = Number.MAX_VALUE; var _local7:int = (GameSpace.instance.projectiles.numChildren - 1); while (_local7 >= 0) { _local1 = (GameSpace.instance.projectiles.getChildAt(_local7) as Projectile); if ((_local1 is GlopBlob)){ _local2 = (_local1.x - x); _local3 = (_local1.y - y); _local4 = ((_local2 * _local2) + (_local3 * _local3)); if ((((_local4 <= (LOCK_RANGE * LOCK_RANGE))) && ((_local4 < _local6)))){ _local5 = _local1; _local6 = _local4; }; }; _local7--; }; projectile = _local5; return (!((_local5 == null))); } } }//package com.wbwar.creeper
Section 165
//MistLayer (com.wbwar.creeper.MistLayer) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.geom.*; public final class MistLayer { private var mi:Mi; private var updateCount:int; private var p:Point; private var miCount:int;// = 0 private var miTail:Mi;// = null private var miHead:Mi;// = null private var miPool:ObjectPool; private static const BMDHEIGHT:int = 40; public static const MAX_AGE:int = 20; private static const VARIANTCOUNT:int = 5; private static const BMDWIDTH:int = 40; private static const ALPHACOUNT:int = 32; private static var dp:Point; private static var fullRect:Rectangle; private static var mistBMD:Array = []; private static var sr:Rectangle; public function MistLayer(){ p = new Point(); super(); miPool = new ObjectPool(function ():Mi{ return (new Mi()); }, null, 1000, 5000); } private function removeMi(_arg1:Mi):void{ if (miHead == null){ return; }; if ((((_arg1.prev == null)) && ((_arg1.next == null)))){ miHead = null; } else { if (_arg1.prev != null){ _arg1.prev.next = _arg1.next; }; if (_arg1.next != null){ _arg1.next.prev = _arg1.prev; }; }; miCount--; } public function addMistRandom(_arg1:int, _arg2:int, _arg3:Number):void{ if (Math.random() < _arg3){ addMist(_arg1, _arg2); }; } public function update(_arg1:BitmapData):void{ var _local2:int; updateCount++; mi = miHead; while (mi != null) { if (mi.age > MAX_AGE){ removeMi(mi); miPool.checkIn(mi); } else { mi.age++; mi.x = (mi.x + mi.deltaX); mi.y = (mi.y + mi.deltaY); _local2 = int(((mi.age / MAX_AGE) * ALPHACOUNT)); if (_local2 >= ALPHACOUNT){ _local2 = (ALPHACOUNT - 1); }; p.x = ((mi.x + (GameSpace.CELL_WIDTH / 2)) - (BMDWIDTH / 2)); p.y = ((mi.y + (GameSpace.CELL_HEIGHT / 2)) - (BMDHEIGHT / 2)); _arg1.copyPixels(mistBMD[(_local2 + (ALPHACOUNT * mi.variant))], sr, p, null, null, true); }; mi = mi.next; }; } private function addMi(_arg1:Mi):void{ if (miHead == null){ _arg1.prev = null; _arg1.next = null; } else { _arg1.prev = null; _arg1.next = miHead; miHead.prev = _arg1; }; miHead = _arg1; miCount++; } public function addMist(_arg1:int, _arg2:int, _arg3:int=-1):Mi{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (null); }; var _local4:Mi = miPool.checkOut(); _local4.prev = null; _local4.next = null; _local4.age = 0; _local4.x = ((_arg1 * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); _local4.y = ((_arg2 * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); if (_arg3 == -1){ _local4.variant = int((Math.random() * 4)); } else { _local4.variant = _arg3; }; var _local5:Number = ((Math.random() * 2) * Math.PI); var _local6:Number = (Math.random() * 2); _local4.deltaX = (Math.cos(_local5) * _local6); _local4.deltaY = (Math.sin(_local5) * _local6); addMi(_local4); return (_local4); } private static function setup():void{ var _local1:int; var _local3:int; var _local4:Shape; var _local5:BitmapData; var _local6:Matrix; fullRect = new Rectangle(0, 0, (GameSpace.WIDTH * GameSpace.CELL_WIDTH), (GameSpace.HEIGHT * GameSpace.CELL_HEIGHT)); sr = new Rectangle(0, 0, BMDWIDTH, BMDHEIGHT); dp = new Point(0, 0); var _local2:int; while (_local2 < VARIANTCOUNT) { _local1 = (1 + int((Math.random() * 10000))); _local3 = 0; while (_local3 < ALPHACOUNT) { if (_local2 < 4){ _local4 = ColorUtil.cloud(18, 5263568, (1 - (_local3 / (ALPHACOUNT - 1))), 500, _local1); } else { _local4 = ColorUtil.cloud(18, 0xD0D0D0, (1 - (_local3 / (ALPHACOUNT - 1))), 500, _local1); }; _local5 = new BitmapData(BMDWIDTH, BMDHEIGHT, true, 0); _local6 = new Matrix(); _local6.translate((BMDWIDTH / 2), (BMDHEIGHT / 2)); _local5.draw(_local4, _local6); mistBMD.push(_local5); _local3++; }; _local2++; }; } setup(); } }//package com.wbwar.creeper
Section 166
//Mortar (com.wbwar.creeper.Mortar) package com.wbwar.creeper { import flash.display.*; import flash.media.*; public final class Mortar extends Projectile { private var tx:Number; private var ty:Number; private var level:int; private var state:int; private var explosion:Shape; private var sourceX:int; private var sourceY:int; private var targetX:int; private var targetY:int; private var explosionCounter:int; private var distance:Number; private var fireSound:Sound; private var explosionSound:Sound; private static const STATE_MORTAR:int = 0; private static const SPEED:Number = 1.5; private static const STATE_EXPLOSION:int = 1; public function Mortar(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int){ this.sourceX = _arg1; this.sourceY = _arg2; this.targetX = _arg3; this.targetY = _arg4; this.level = _arg5; graphics.beginFill(0xFF0000); graphics.lineStyle(1, 0); graphics.drawRect(-2, -2, 4, 4); graphics.endFill(); graphics.beginFill(0); graphics.lineStyle(); graphics.drawRect(-1, -1, 2, 2); graphics.endFill(); x = ((_arg1 * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); y = ((_arg2 * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); tx = ((_arg3 * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); ty = ((_arg4 * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); distance = Math.sqrt((((tx - x) * (tx - x)) + ((ty - y) * (ty - y)))); GameSpace.instance.projectiles.addProjectile(this); explosion = new Shape(); addChild(explosion); explosion.visible = false; explosion.graphics.lineStyle(1, 0xFF0000); explosion.graphics.drawCircle(0, 0, 6); explosion.graphics.lineStyle(1, 16732240); explosion.graphics.drawCircle(0, 0, 8); fireSound = new AreaGunSound(); explosionSound = new AreaGunExplosionSound(); fireSound.play(); } override public function update():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; if (state == STATE_MORTAR){ rotation = (rotation + 31); _local1 = (tx - x); _local2 = (ty - y); _local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); _local4 = (distance - _local3); _local5 = Math.sin(((_local4 / distance) * Math.PI)); scaleX = (1 + _local5); scaleY = scaleX; if (_local3 <= SPEED){ kaboom(); } else { x = (x + ((_local1 / _local3) * SPEED)); y = (y + ((_local2 / _local3) * SPEED)); }; } else { if (state == STATE_EXPLOSION){ explosion.scaleX = (explosion.scaleX + 0.8); explosion.scaleY = explosion.scaleX; explosion.alpha = (1 - (explosionCounter / 8)); explosionCounter++; if (explosionCounter >= 8){ GameSpace.instance.projectiles.removeProjectile(this); }; }; }; } private function kaboom():void{ state = STATE_EXPLOSION; explosion.visible = true; Weapon.damageGlop(targetX, targetY, 36, 8, -4, 1); explosionSound.play(); } } }//package com.wbwar.creeper
Section 167
//MoveIndicator (com.wbwar.creeper.MoveIndicator) package com.wbwar.creeper { import flash.display.*; import flash.filters.*; import caurina.transitions.*; public final class MoveIndicator extends Shape { public function MoveIndicator(_arg1:int, _arg2:int, _arg3:int, _arg4:int){ var _local5:int = (((_arg3 - _arg1) * (_arg3 - _arg1)) + ((_arg4 - _arg2) * (_arg4 - _arg2))); if (_local5 > 525){ graphics.beginFill(0x8000); graphics.drawRect(-7, -2, 7, 4); graphics.moveTo(0, -7); graphics.lineTo(7, 0); graphics.lineTo(0, 7); graphics.lineTo(0, -7); graphics.endFill(); alpha = 0.6; filters = [new DropShadowFilter()]; x = _arg1; y = _arg2; rotation = ((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) * 180) / Math.PI); Tweener.addTween(this, {x:_arg3, y:_arg4, time:0.8, transition:"linear", onComplete:moveComplete}); GameSpace.instance.moveLayer.addChild(this); }; } private function done():void{ GameSpace.instance.moveLayer.removeChild(this); } private function moveComplete():void{ GameSpace.instance.moveLayer.removeChild(this); } } }//package com.wbwar.creeper
Section 168
//MovePlaceSprite (com.wbwar.creeper.MovePlaceSprite) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.text.*; import flash.utils.*; public final class MovePlaceSprite extends Sprite { private var droneText:TextField; private var sourcePlace:Place; private var weaponDistIndicator:WeaponDistIndicator; private var pathIndicator:Shape; private var awss:Shape; private var legal:Boolean; public function MovePlaceSprite(){ mouseEnabled = false; pathIndicator = new Shape(); addChild(pathIndicator); weaponDistIndicator = new WeaponDistIndicator(); addChild(weaponDistIndicator); awss = new Shape(); awss.filters = [new DropShadowFilter(2)]; addChild(awss); droneText = Text.text("DRONE CHARGING", 10, 0xFF0000); droneText.filters = [new GlowFilter(0, 1, 2, 2, 2)]; droneText.visible = false; addChild(droneText); droneText.x = (-(droneText.width) / 2); droneText.y = (-(droneText.height) - 12); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function refreshPathIndicator(_arg1:Boolean, _arg2:Place):void{ var _local3:Array; var _local4:Place; var _local5:int; var _local6:int; pathIndicator.graphics.clear(); if (((((_arg1) && (!((_arg2 is DroneBase))))) && (!(((false) && (!(_arg2.building))))))){ _local3 = Place.getPossiblePaths(getQualifiedClassName(_arg2), x, y); pathIndicator.graphics.lineStyle(1, 0xFF00); for each (_local4 in _local3) { _local5 = (_local4.x - x); _local6 = (_local4.y - y); pathIndicator.graphics.lineStyle(3, 0); pathIndicator.graphics.moveTo(0, 0); pathIndicator.graphics.lineTo(_local5, _local6); pathIndicator.graphics.lineStyle(1, 0xFF00); pathIndicator.graphics.moveTo(0, 0); pathIndicator.graphics.lineTo(_local5, _local6); }; }; } private function onEnterFrame(_arg1:Event):void{ if (visible){ if (sourcePlace != null){ refreshPathIndicator(legal, sourcePlace); }; }; } public function refresh(_arg1:Boolean, _arg2:int, _arg3:int, _arg4:int, _arg5:Place):void{ var _local6:int; var _local7:DroneBase; this.legal = _arg1; this.sourcePlace = _arg5; if ((_arg5 is BaseGun)){ _local6 = (GameSpace.CELL_WIDTH * 3); weaponDistIndicator.visible = false; } else { _local6 = GameSpace.CELL_WIDTH; }; if (_arg1){ awss.graphics.clear(); if ((_arg5 is DroneBase)){ awss.graphics.lineStyle(2, 0xFF0000); ColorUtil.drawArrow(awss.graphics, -10, -10, -5, -5); ColorUtil.drawArrow(awss.graphics, 10, -10, 5, -5); ColorUtil.drawArrow(awss.graphics, -10, 10, -5, 5); ColorUtil.drawArrow(awss.graphics, 10, 10, 5, 5); _local7 = (_arg5 as DroneBase); if (_local7.energyLevel < DroneBase.DRONE_ENERGY_COST){ droneText.visible = true; droneText.text = "DRONE ALREADY DEPLOYED"; if (_local7.drones.length > 0){ if ((_local7.drones[0] as Drone).state == Drone.STATE_LANDED){ droneText.text = "DRONE CHARGING"; }; }; droneText.x = (-(droneText.width) / 2); } else { droneText.visible = false; }; } else { droneText.visible = false; awss.graphics.beginFill(16777136, 0.3); awss.graphics.lineStyle(2, 0); awss.graphics.drawRect(-(_local6), -(_local6), (_local6 * 2), (_local6 * 2)); awss.graphics.endFill(); awss.graphics.lineStyle(2, 0); awss.graphics.moveTo(-(_local6), -(_local6)); awss.graphics.lineTo((-(_local6) + 5), (-(_local6) + 5)); awss.graphics.moveTo(_local6, -(_local6)); awss.graphics.lineTo((_local6 - 5), (-(_local6) + 5)); awss.graphics.moveTo(_local6, _local6); awss.graphics.lineTo((_local6 - 5), (_local6 - 5)); awss.graphics.moveTo(-(_local6), _local6); awss.graphics.lineTo((-(_local6) + 5), (_local6 - 5)); }; if (!(_arg5 is BaseGun)){ weaponDistIndicator.refresh(getQualifiedClassName(_arg5), _arg2, _arg3, _arg4); weaponDistIndicator.visible = true; }; } else { if (((weaponDistIndicator.visible) || ((_arg5 is BaseGun)))){ awss.graphics.clear(); awss.graphics.beginFill(16752800, 0.3); awss.graphics.lineStyle(2, 0xFF0000); awss.graphics.drawRect(-(_local6), -(_local6), (_local6 * 2), (_local6 * 2)); awss.graphics.endFill(); weaponDistIndicator.visible = false; }; }; } } }//package com.wbwar.creeper
Section 169
//MovingPlace (com.wbwar.creeper.MovingPlace) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.media.*; import flash.utils.*; import caurina.transitions.*; public class MovingPlace extends Place { public var canMove:Boolean;// = true private var counter:int; private var showRange:Boolean; public var state:int; private var rangeIndicator:WeaponDistIndicator; private var MOVEMOD:Number; public var targetGameSpaceX:int; public var targetGameSpaceY:int; public var rifted:Boolean; protected var moveX:Number; protected var moveY:Number; private var landSound:Sound; private var playMoveSound:Boolean; protected var movementHeight:Number;// = 0 public var movePlaceIndicator:Shape; private var moveSound:Sound; public static const STATE_RIFT3:int = 6; public static const STATE_MOVING:int = 2; protected static const LANDING_SPEED:Number = 0.1; public static const STATE_LANDING:int = 3; public static const STATE_PLACED:int = 0; protected static const TAKEOFF_SPEED:Number = 0.1; private static const RIFTMOVE_SPEED:Number = 1; protected static const MOVE_SPEED:Number = 0.5; public static const STATE_TAKEOFF:int = 1; public static const STATE_RIFT1:int = 4; public static const STATE_RIFT2:int = 5; public function MovingPlace(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); if (GameSpace.instance != null){ addEventListener(MouseEvent.CLICK, onMPMouseClick); rangeIndicator = new WeaponDistIndicator(1622212528); addChild(rangeIndicator); rangeIndicator.visible = false; rangeIndicator.alpha = 0.4; movePlaceIndicator = new Shape(); movePlaceIndicator.graphics.lineStyle(2, 0x8000); movePlaceIndicator.graphics.drawRect(-10, -10, 20, 20); GameSpace.instance.moveLayer.addChild(movePlaceIndicator); movePlaceIndicator.visible = false; moveSound = new MoveSound(); landSound = new LandSound(); }; } override protected function setScreenCoords():void{ super.setScreenCoords(); moveX = x; moveY = y; } public function onMPMouseClick(_arg1:MouseEvent):void{ if (!canMove){ if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; return; }; if (GameSpace.instance.places.placeToMove == this){ return; }; var _local2:Boolean = selected; GameSpace.instance.places.removeAllSelections(); selected = !(_local2); if (_arg1 != null){ _arg1.stopImmediatePropagation(); }; if (!building){ GameSpace.instance.places.placeToMove = this; } else { GameSpace.instance.places.showRanges(null, false, null); GameSpace.instance.places.showRanges(ClassUtil.getClass(this), true, null); }; selected = true; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); GameSpace.instance.moveLayer.removeChild(movePlaceIndicator); } override public function move(_arg1:int, _arg2:int):void{ super.move(_arg1, _arg2); if (!canMove){ return; }; if (building){ return; }; targetGameSpaceX = _arg1; targetGameSpaceY = _arg2; if ((((state == STATE_PLACED)) || ((state == STATE_LANDING)))){ state = STATE_TAKEOFF; GameSpace.instance.places.raisePlace(this); placeBody.filters = [new GlowFilter(0xFFFFFF, 1, 8, 8)]; }; movePlaceIndicator.x = ((targetGameSpaceX * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); movePlaceIndicator.y = ((targetGameSpaceY * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); if (state != STATE_PLACED){ movePlaceIndicator.visible = true; } else { movePlaceIndicator.visible = false; }; playMoveSound = true; } override public function upgrade():void{ if (state == STATE_PLACED){ super.upgrade(); }; } override protected function buildComplete():void{ super.buildComplete(); if (showRange){ showRange = false; showRangeIndicator(true); }; } override public function update():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Mi; var _local7:Number; var _local8:Number; var _local9:int; var _local10:Sound; super.update(); if (playMoveSound){ moveSound.play(); playMoveSound = false; }; if (GameSpace.instance.upgradeWeapon2){ MOVEMOD = 1.3; } else { MOVEMOD = 1; }; if (state != STATE_PLACED){ movePlaceIndicator.visible = true; } else { movePlaceIndicator.visible = false; }; if (state == STATE_TAKEOFF){ if (movementHeight >= 1){ state = STATE_MOVING; movementHeight = 1; scaleX = 1.2; scaleY = scaleX; } else { movementHeight = (movementHeight + TAKEOFF_SPEED); scaleX = (1 + (movementHeight / 5)); scaleY = scaleX; }; } else { if (state == STATE_MOVING){ if ((updateCount % 20) == 0){ new MoveIndicator(x, y, ((targetGameSpaceX * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)), ((targetGameSpaceY * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2))); }; _local1 = (((targetGameSpaceX * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)) - moveX); _local2 = (((targetGameSpaceY * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)) - moveY); _local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); if (_local3 <= (MOVE_SPEED * MOVEMOD)){ gameSpaceX = targetGameSpaceX; gameSpaceY = targetGameSpaceY; setScreenCoords(); state = STATE_LANDING; } else { _local4 = (((_local1 / _local3) * MOVE_SPEED) * MOVEMOD); _local5 = (((_local2 / _local3) * MOVE_SPEED) * MOVEMOD); moveX = (moveX + _local4); moveY = (moveY + _local5); x = moveX; y = moveY; }; hookUp(); } else { if (state == STATE_LANDING){ if (movementHeight <= 0){ placeBody.filters = []; state = STATE_PLACED; if (showRange){ showRange = false; showRangeIndicator(true); }; GameSpace.instance.places.lowerPlace(this); movementHeight = 0; scaleX = 1; scaleY = scaleX; landSound.play(); } else { movementHeight = (movementHeight - LANDING_SPEED); scaleX = (1 + (movementHeight / 5)); scaleY = scaleX; }; } else { if (state == STATE_PLACED){ } else { if (state == STATE_RIFT1){ _local1 = (((GameSpace.instance.rift.gameSpaceX * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)) - moveX); _local2 = (((GameSpace.instance.rift.gameSpaceY * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)) - moveY); _local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2))); if (_local3 <= RIFTMOVE_SPEED){ gameSpaceX = GameSpace.instance.rift.gameSpaceX; gameSpaceY = GameSpace.instance.rift.gameSpaceY; setScreenCoords(); state = STATE_RIFT2; _local9 = 0; while (_local9 < 32) { _local6 = GameSpace.instance.mistLayer.addMist(gameSpaceX, gameSpaceY, 4); if (_local6 != null){ _local7 = ((Math.random() * 2) * Math.PI); _local8 = (1 + (Math.random() * 4)); _local6.deltaX = (Math.cos(_local7) * _local8); _local6.deltaY = (Math.sin(_local7) * _local8); }; _local9++; }; _local10 = new CityInRiftSound(); _local10.play(); if (GameSpace.instance.rift.riftOpenSoundChannel != null){ Tweener.addTween(GameSpace.instance.rift.riftOpenSoundChannel, {_sound_volume:0, time:2, onComplete:GameSpace.instance.rift.riftOpenSoundChannel.stop()}); }; } else { _local4 = ((_local1 / _local3) * RIFTMOVE_SPEED); _local5 = ((_local2 / _local3) * RIFTMOVE_SPEED); moveX = (moveX + _local4); moveY = (moveY + _local5); x = moveX; y = moveY; hookUp(); }; } else { if (state == STATE_RIFT2){ rifted = true; scaleX = (scaleX - 0.05); scaleY = (scaleY - 0.05); if (scaleX > 0.5){ GameSpace.instance.rift.scaleX = (GameSpace.instance.rift.scaleX + 0.05); } else { GameSpace.instance.rift.scaleX = (GameSpace.instance.rift.scaleX - 0.15); if (GameSpace.instance.rift.scaleX < 0){ GameSpace.instance.rift.scaleX = 0; }; }; GameSpace.instance.rift.scaleY = GameSpace.instance.rift.scaleX; if (scaleX < 0){ scaleX = 0; }; if (scaleY < 0){ scaleY = 0; state = STATE_RIFT3; destroyAllPaths(); counter = 0; }; } else { if (state == STATE_RIFT3){ counter++; if (counter >= 108){ state = STATE_PLACED; Creeper.instance.gameScreen.showResultsScreen(); if (GameSpace.instance.rift.riftOpenSoundChannel != null){ GameSpace.instance.rift.riftOpenSoundChannel.stop(); }; }; }; }; }; }; }; }; }; } public function showRangeIndicator(_arg1:Boolean):void{ if (!_arg1){ rangeIndicator.visible = false; showRange = false; } else { if (!(this is ABM)){ return; }; if (state == STATE_PLACED){ rangeIndicator.visible = _arg1; rangeIndicator.refresh(getQualifiedClassName(this), RANGE, gameSpaceX, gameSpaceY); } else { showRange = _arg1; }; }; } } }//package com.wbwar.creeper
Section 170
//Node (com.wbwar.creeper.Node) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.media.*; public final class Node extends Place { private var onShape:Shape; public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; private var buildingSprite:Shape; private var energyGridDeployer:EnergyGridDeployer; private var rotDir:Number; private var onlineSound:Sound; public static const START_RANGE:int = 4; public static const EVENT_PLACED:String = "com.wbwar.creeper.Node.EVENT_PLACED"; public static const STATE_DEPLOYING:int = 2; private static const SHAPERADIUS:int = 6; public static const STATE_DEPLOYED:int = 1; public static const BASE_COST:int = 50; public static const STATE_UNDEPLOYED:int = 0; private static var offlineSound:Sound; private static var soundCount:int; public function Node(_arg1:int, _arg2:int){ rotDir = ((Math.random() < 0.5)) ? -3 : 3; super(_arg1, _arg2); RANGE = START_RANGE; energyGridDeployer = new EnergyGridDeployer(RANGE, this); cacheAsBitmap = true; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; draw(placeBody); placeBody.filters = [new DropShadowFilter(2)]; addChild(placeBody); addChild(turnedOffShape); if (GameSpace.instance != null){ hookUp(); onlineSound = new NodeOnSound(); offlineSound = new NodeOffSound(); }; if (GameSpace.instance != null){ GameSpace.instance.places.dispatchEvent(new Event(EVENT_PLACED, true)); }; onShape = new Shape(); onShape.graphics.beginFill(2121760, 0.5); onShape.graphics.drawRect((-(SHAPERADIUS) + 1), -2, ((SHAPERADIUS * 2) - 2), 4); onShape.graphics.endFill(); onShape.graphics.beginFill(0xFFFFFF); onShape.graphics.drawRect(-(SHAPERADIUS), -1, (SHAPERADIUS * 2), 2); onShape.graphics.endFill(); onShape.graphics.beginFill(2105440); onShape.graphics.drawCircle(0, 0, 2); onShape.graphics.endFill(); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } override public function update():void{ var _local1:Place; super.update(); if (state == STATE_DEPLOYED){ onShape.rotation = (onShape.rotation + rotDir); }; if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; if ((updateCount % 30) == 0){ if (turnedOn){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 == null){ if (state == STATE_DEPLOYED){ state = STATE_UNDEPLOYED; playSound("offline"); energyGridDeployer.undeployEnergyGrid(); }; } else { if (state == STATE_UNDEPLOYED){ state = STATE_DEPLOYED; playSound("online"); energyGridDeployer.deployEnergyGrid(); }; }; } else { if (state == STATE_DEPLOYED){ state = STATE_UNDEPLOYED; playSound("offline"); energyGridDeployer.undeployEnergyGrid(); }; }; }; calculateDamage(); } override public function get operateEnergy():Number{ return (0); } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<Node/> ); } private function soundComplete(_arg1:Event):void{ soundCount--; } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); state = STATE_UNDEPLOYED; energyGridDeployer.undeployEnergyGrid(); } private function playSound(_arg1:String):void{ var _local2:SoundChannel; if (soundCount < 2){ if (_arg1 == "online"){ _local2 = onlineSound.play(); } else { if (_arg1 == "offline"){ _local2 = offlineSound.play(); }; }; if (_local2 != null){ soundCount++; _local2.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true); }; }; } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite = new Sprite(); draw(_local2); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } private static function draw(_arg1:Sprite):void{ var _local2:Matrix = new Matrix(); _local2.createGradientBox(((SHAPERADIUS * 2) - 1), ((SHAPERADIUS * 2) - 1), 0, -(SHAPERADIUS), -(SHAPERADIUS)); _arg1.graphics.beginGradientFill(GradientType.RADIAL, [6136208, 7980733, 3110537], [1, 1, 1], [0, 225, 0xFF], _local2, SpreadMethod.PAD, InterpolationMethod.RGB, 0); _arg1.graphics.drawCircle(0, 0, (SHAPERADIUS + 1)); _arg1.graphics.endFill(); _arg1.graphics.beginFill(2105440); _arg1.graphics.drawCircle(0, 0, 2); _arg1.graphics.endFill(); } } }//package com.wbwar.creeper
Section 171
//Path (com.wbwar.creeper.Path) package com.wbwar.creeper { import flash.display.*; public final class Path extends Shape { public var startPlace:Place; private var lastEndX:Number; private var dx:Number; private var dy:Number; public var destroyed:Boolean; private var lastEndY:Number; private var sqrt:Function; public var endPlace:Place; private var lastStartY:Number; private var lastStartX:Number; public function Path(_arg1:Place, _arg2:Place){ sqrt = Math.sqrt; super(); this.startPlace = _arg1; this.endPlace = _arg2; GameSpace.instance.paths.addPath(this); update(); cacheAsBitmap = true; } public function update():void{ if (((((((!((startPlace.x == lastStartX))) || (!((startPlace.y == lastStartY))))) || (!((endPlace.x == lastEndX))))) || (!((endPlace.y == lastEndY))))){ lastStartX = startPlace.x; lastStartY = startPlace.y; lastEndX = endPlace.x; lastEndY = endPlace.y; render(); }; } private function render():void{ x = startPlace.x; y = startPlace.y; graphics.clear(); graphics.lineStyle(3, 0, 0.5); graphics.moveTo(0, 0); graphics.lineTo((endPlace.x - startPlace.x), (endPlace.y - startPlace.y)); graphics.lineStyle(1, 0xFFFFFF, 1); graphics.moveTo(0, 0); graphics.lineTo((endPlace.x - startPlace.x), (endPlace.y - startPlace.y)); } public function getOtherEnd(_arg1:Place):Place{ if (_arg1 == startPlace){ return (endPlace); }; return (startPlace); } public function getDistance():Number{ dx = (endPlace.x - startPlace.x); dy = (endPlace.y - startPlace.y); return (sqrt(((dx * dx) + (dy * dy)))); } public function destroy():void{ destroyed = true; startPlace.removePath(this); endPlace.removePath(this); GameSpace.instance.paths.removePath(this); } } }//package com.wbwar.creeper
Section 172
//Paths (com.wbwar.creeper.Paths) package com.wbwar.creeper { import flash.display.*; import caurina.transitions.*; public final class Paths extends Sprite { private var pathLayer:Sprite; public function Paths(){ mouseEnabled = false; mouseChildren = false; pathLayer = new Sprite(); pathLayer.mouseEnabled = false; addChild(pathLayer); } private function tweenIn():void{ Tweener.addTween(this, {_Glow_blurX:2, _Glow_blurY:2, time:0.5, transition:"linear", onComplete:tweenOut}); } public function update():void{ var _local1:Path; var _local2:int = (pathLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (pathLayer.getChildAt(_local2) as Path); _local1.update(); _local2--; }; } private function tweenOut():void{ Tweener.addTween(this, {_Glow_blurX:6, _Glow_blurY:6, time:0.5, transition:"linear", onComplete:tweenIn}); } public function addPath(_arg1:Path):void{ pathLayer.addChild(_arg1); } public function removePath(_arg1:Path):void{ pathLayer.removeChild(_arg1); } } }//package com.wbwar.creeper
Section 173
//Place (com.wbwar.creeper.Place) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.utils.*; import caurina.transitions.*; import com.adobe.utils.*; public class Place extends Sprite { protected var _selected:Boolean; private var turnedOnSound:Sound; public var paths:Array; public var h_score:Number; public var destroyed:Boolean; public var RANGE:int; protected var ENERGYPACKET_REQUESTRATE:int;// = 30 protected var _turnedOn:Boolean;// = true public var hookedUp:Boolean; protected var placeBody:Sprite; protected var places:Places; public var health:Number; protected var armedShape:Shape; private var clickSound:Sound; public var energyRequestQueue:Array; protected var turnedOffShape:Shape; public var f_score:Number; public var level:int; public var assignedEnergyPacketCount:int; private var mh:Number; public var gameSpaceX:int; public var gameSpaceY:int; public var building:Boolean;// = true public var g_score:Number; private var energyPacketRequestCounter:int; protected var updateCount:int; protected var selectedShape:Shape; public var came_from:Place; public var upgrading:Boolean; public var energyLevel:Number;// = 0 private var placeExplosionSound:Sound; protected var requestEnergy:Boolean;// = true protected var _armed:Boolean;// = true public static const CHEAPER_RATE:Number = 0.9; private static const WIDTH:int = GameSpace.WIDTH; private static const CONNECT_RANGE:int = 6; private static const HEIGHT:int = GameSpace.HEIGHT; private static const MIN_HEAT:Number = 0.001; public function Place(_arg1:Number, _arg2:Number){ energyRequestQueue = []; paths = []; super(); this.gameSpaceX = _arg1; this.gameSpaceY = _arg2; setScreenCoords(); health = 0; placeBody = new Sprite(); addChild(placeBody); ColorUtil.bwColor(placeBody, 0.1); if (GameSpace.instance != null){ places = GameSpace.instance.places; addEventListener(MouseEvent.CLICK, onMouseClick); clickSound = new ClickSound(); turnedOnSound = new LandSound(); placeExplosionSound = new PlaceExplosionSound(); GameSpace.instance.currentUnitCount = (GameSpace.instance.currentUnitCount + getUnitCost()); }; addTurnedOffShape(); addSelectedShape(); } private function connectToPlace(_arg1:Place):void{ var _local2:Path = new Path(this, _arg1); paths.push(_local2); _arg1.paths.push(_local2); } public function upgrade():void{ if (((!(upgrading)) && (!(building)))){ energyRequestQueue = []; assignedEnergyPacketCount = 0; building = true; upgrading = true; ENERGYPACKET_REQUESTRATE = 30; health = 0; level++; ColorUtil.bwColor(placeBody, 0.5); if (GameSpace.instance.places.placeToMove == this){ GameSpace.instance.places.placeToMove = null; }; }; } protected function hookUp():void{ var _local2:Path; var _local3:Place; var _local1:Array = []; if (!destroyed){ _local1 = getPossiblePaths(getQualifiedClassName(this), x, y); for each (_local2 in paths) { if (_local1.indexOf(_local2.getOtherEnd(this)) == -1){ _local2.destroy(); }; }; for each (_local3 in _local1) { if ((((getPathTo(_local3) == null)) && (!((_local3 == this))))){ connectToPlace(_local3); }; }; }; hookedUp = true; } protected function holeComplete():void{ destroy(); } private function onMouseClick(_arg1:MouseEvent):void{ clickSound.play(); GameSpace.instance.controlPanel.place = this; GameSpace.instance.places.removeAllSelections(); selected = true; _arg1.stopPropagation(); } public function get operateEnergy():Number{ return (0); } public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (selectedShape != null){ selectedShape.visible = _arg1; }; } protected function setScreenCoords():void{ x = ((gameSpaceX * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); y = ((gameSpaceY * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); } protected function findDeepestGlop(_arg1:Boolean=false):Point{ var _local2:int; var _local3:int; var _local4:int; var _local11:Number; var _local5 = -1; var _local6 = -1; var _local7:int = int.MAX_VALUE; var _local8:Number = 0; var _local9:int = (RANGE * RANGE); var _local10:Array = places.gameSpace.glop.data; _local3 = (gameSpaceY - RANGE); while (_local3 <= (gameSpaceY + RANGE)) { if ((((_local3 < 0)) || ((_local3 >= HEIGHT)))){ } else { _local2 = (gameSpaceX - RANGE); while (_local2 <= (gameSpaceX + RANGE)) { if ((((_local2 < 0)) || ((_local2 >= WIDTH)))){ } else { _local4 = (((_local2 - gameSpaceX) * (_local2 - gameSpaceX)) + ((_local3 - gameSpaceY) * (_local3 - gameSpaceY))); if (_local4 > _local9){ } else { _local11 = _local10[(_local2 + (_local3 * WIDTH))]; if ((((_local11 >= Glop.MIN_HEAT)) && ((_local11 >= _local8)))){ if ((((_local11 == _local8)) && ((_local4 > _local7)))){ } else { _local8 = _local11; _local7 = _local4; _local5 = _local2; _local6 = _local3; }; }; }; }; _local2++; }; }; _local3++; }; if (_local5 > -1){ return (new Point(_local5, _local6)); }; return (null); } private function requestEnergyPacket(_arg1:int):void{ assignedEnergyPacketCount++; energyRequestQueue.push(new EnergyRequest(this, _arg1)); } protected function getXMLRoot():XML{ return (<Place/> ); } protected function addTurnedOffShape():void{ addArmedShape(); turnedOffShape = new Shape(); addChild(turnedOffShape); turnedOffShape.graphics.lineStyle(2, 0xFF0000, 0.5); turnedOffShape.graphics.drawCircle(0, 0, 10); turnedOffShape.graphics.moveTo(7, -7); turnedOffShape.graphics.lineTo(-7, 7); turnedOffShape.x = 0; turnedOffShape.y = 0; turnedOffShape.visible = false; turnedOffShape.filters = [new DropShadowFilter(2)]; } public function getPathTo(_arg1:Place):Path{ var _local2:Path; for each (_local2 in paths) { if (_local2.getOtherEnd(this) == _arg1){ return (_local2); }; }; return (null); } private function distToOtherPlace(_arg1:Place):Number{ var _local2:int = (_arg1.x - x); var _local3:int = (_arg1.y - y); return (Math.sqrt(((_local2 * _local2) + (_local3 * _local3)))); } protected function getModMaxHealth(_arg1:int):int{ if (GameSpace.instance.upgradeEconomic1){ return (int((_arg1 * 0.9))); }; return (_arg1); } public function get operateEnergyType():int{ return (EnergyPacket.TYPE_WEAPONENERGY); } protected function findNearestGlop(_arg1:Boolean=false):Point{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6 = -1; var _local7 = -1; var _local8:int = int.MAX_VALUE; var _local9:int = (RANGE * RANGE); var _local10:Array = places.gameSpace.glop.data; _local2 = 1; while (_local2 < RANGE) { _local3 = (gameSpaceX - _local2); while (_local3 <= (gameSpaceX + _local2)) { if ((((_local3 >= 0)) && ((_local3 < WIDTH)))){ _local4 = (gameSpaceY - _local2); _local5 = (((_local3 - gameSpaceX) * (_local3 - gameSpaceX)) + ((_local4 - gameSpaceY) * (_local4 - gameSpaceY))); if (_local5 <= _local9){ if ((((_local4 >= 0)) && ((_local4 < HEIGHT)))){ if ((((_local10[(_local3 + (_local4 * WIDTH))] >= MIN_HEAT)) && ((_local5 < _local8)))){ if (LOS.hasLOS(gameSpaceX, gameSpaceY, _local3, _local4, _arg1)){ _local8 = _local5; _local6 = _local3; _local7 = _local4; }; }; }; if (_local6 == -1){ _local4 = (gameSpaceY + _local2); if ((((_local4 >= 0)) && ((_local4 < HEIGHT)))){ if ((((_local10[(_local3 + (_local4 * WIDTH))] >= MIN_HEAT)) && ((_local5 < _local8)))){ if (LOS.hasLOS(gameSpaceX, gameSpaceY, _local3, _local4, _arg1)){ _local8 = _local5; _local6 = _local3; _local7 = _local4; }; }; }; }; }; }; _local3++; }; _local4 = ((gameSpaceY - _local2) + 1); while (_local4 <= ((gameSpaceY + _local2) - 1)) { if ((((_local4 >= 0)) && ((_local4 < HEIGHT)))){ _local3 = (gameSpaceX - _local2); _local5 = (((_local3 - gameSpaceX) * (_local3 - gameSpaceX)) + ((_local4 - gameSpaceY) * (_local4 - gameSpaceY))); if (_local5 <= _local9){ if ((((_local3 >= 0)) && ((_local3 < WIDTH)))){ if ((((_local10[(_local3 + (_local4 * WIDTH))] >= MIN_HEAT)) && ((_local5 < _local8)))){ if (LOS.hasLOS(gameSpaceX, gameSpaceY, _local3, _local4, _arg1)){ _local8 = _local5; _local6 = _local3; _local7 = _local4; }; }; }; if (_local6 == -1){ _local3 = (gameSpaceX + _local2); if ((((_local3 >= 0)) && ((_local3 < WIDTH)))){ if ((((_local10[(_local3 + (_local4 * WIDTH))] >= MIN_HEAT)) && ((_local5 < _local8)))){ if (LOS.hasLOS(gameSpaceX, gameSpaceY, _local3, _local4, _arg1)){ _local8 = _local5; _local6 = _local3; _local7 = _local4; }; }; }; }; }; }; _local4++; }; if (_local6 > -1){ break; }; _local2++; }; if (_local6 > -1){ return (new Point(_local6, _local7)); }; return (null); } public function get selected():Boolean{ return (_selected); } protected function addSelectedShape():void{ selectedShape = new Shape(); addChild(selectedShape); selectedShape.graphics.lineStyle(2, 0xFF00); selectedShape.graphics.moveTo(2, -15); selectedShape.graphics.curveTo(13, -13, 15, -2); selectedShape.graphics.moveTo(15, 2); selectedShape.graphics.curveTo(13, 13, 2, 15); selectedShape.graphics.moveTo(-2, -15); selectedShape.graphics.curveTo(-13, -13, -15, -2); selectedShape.graphics.moveTo(-15, 2); selectedShape.graphics.curveTo(-13, 13, -2, 15); selectedShape.x = 0; selectedShape.y = 0; selectedShape.visible = false; selectedShape.filters = [new DropShadowFilter(2)]; } public function set turnedOn(_arg1:Boolean):void{ _turnedOn = _arg1; if (turnedOffShape != null){ turnedOffShape.visible = !(_arg1); }; if (!_arg1){ energyRequestQueue = []; assignedEnergyPacketCount = 0; } else { turnedOnSound.play(); }; } public function applyEnergyPacket(_arg1:EnergyPacket):void{ if (building){ health = (health + EnergyPacket.WORTH); if (health > maxHealth){ health = maxHealth; }; } else { energyLevel = (energyLevel + EnergyPacket.WORTH); if (energyLevel > operateEnergy){ energyLevel = operateEnergy; }; }; } protected function buildComplete():void{ building = false; upgrading = false; ENERGYPACKET_REQUESTRATE = 15; if (((selected) && ((this is MovingPlace)))){ (this as MovingPlace).onMPMouseClick(null); }; ColorUtil.normalColor(placeBody, 0.5); } public function update():void{ updateCount++; if (((!((selectedShape == null))) && (selectedShape.visible))){ selectedShape.rotation = (selectedShape.rotation + 2); }; if (energyPacketRequestCounter > 0){ energyPacketRequestCounter--; }; if (GameSpace.instance.upgradeEconomic1){ mh = (maxHealth * CHEAPER_RATE); } else { mh = maxHealth; }; if (GameSpace.instance.upgradeEconomic2){ if (ENERGYPACKET_REQUESTRATE > 15){ ENERGYPACKET_REQUESTRATE = 24; }; }; if (((((requestEnergy) && ((energyPacketRequestCounter == 0)))) && (_turnedOn))){ if (((!((this is MovingPlace))) || ((((this is MovingPlace)) && (((this as MovingPlace).state == MovingPlace.STATE_PLACED)))))){ if (((((!(building)) && (((operateEnergy - (energyLevel + (assignedEnergyPacketCount * EnergyPacket.WORTH))) >= EnergyPacket.WORTH)))) || (((building) && (((mh - (health + (assignedEnergyPacketCount * EnergyPacket.WORTH))) > 0)))))){ if (Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun) != null){ if (building){ requestEnergyPacket(EnergyPacket.TYPE_CONSTRUCTION); } else { requestEnergyPacket(operateEnergyType); }; }; energyPacketRequestCounter = ENERGYPACKET_REQUESTRATE; }; }; }; if (building){ if (health >= mh){ health = maxHealth; buildComplete(); }; }; } public function removePath(_arg1:Path):void{ ArrayUtil.removeValueFromArray(paths, _arg1); } public function move(_arg1:int, _arg2:int):void{ } public function get turnedOn():Boolean{ return (_turnedOn); } public function get maxHealth():Number{ return (0); } public function fallIntoHole():void{ var _local1:Number = (Math.random() * 2); Tweener.addTween(this, {time:6, delay:_local1, transition:"easeInExpo", x:GameSpace.instance.rift.x, y:GameSpace.instance.rift.y, onComplete:holeComplete}); } public function snapTo():void{ var _local1:int = (x / GameSpace.CELL_WIDTH); var _local2:int = (y / GameSpace.CELL_HEIGHT); this.gameSpaceX = _local1; this.gameSpaceY = _local2; setScreenCoords(); } public function load(_arg1:XML):void{ gameSpaceX = _arg1.gameSpaceX; gameSpaceY = _arg1.gameSpaceY; health = _arg1.health; energyLevel = _arg1.energyLevel; } protected function addArmedShape():void{ armedShape = new Shape(); addChild(armedShape); armedShape.graphics.beginFill(0xFF0000, 0.3); armedShape.graphics.drawRect(-10, -10, 20, 20); armedShape.graphics.endFill(); armedShape.visible = false; } public function destroyAllPaths():void{ var _local2:Path; var _local1:Array = paths.concat(); for each (_local2 in _local1) { _local2.destroy(); }; } public function getXML():XML{ var _local1:XML = getXMLRoot(); _local1.gameSpaceX = gameSpaceX; _local1.gameSpaceY = gameSpaceY; _local1.health = health; _local1.energyLevel = energyLevel; return (_local1); } public function getEffectiveEnergy():Number{ return ((energyLevel + (assignedEnergyPacketCount * EnergyPacket.WORTH))); } public function set armed(_arg1:Boolean):void{ _armed = _arg1; if (armedShape != null){ armedShape.visible = !(_arg1); }; if (!_arg1){ } else { turnedOnSound.play(); }; } public function destroy(_arg1:Boolean=false):void{ selected = false; destroyAllPaths(); GameSpace.instance.places.removePlace(this); destroyed = true; if (!_arg1){ placeExplosionSound.play(); new Explosion(x, y, 0xFF00, 0x9000, 0.5, 15); }; GameSpace.instance.currentUnitCount = (GameSpace.instance.currentUnitCount - getUnitCost()); } public function get armed():Boolean{ return (_armed); } public function getUnitCost():int{ return (ClassUtil.getClass(this)["unitCost"]); } public static function getPossiblePaths(_arg1:String, _arg2:Number, _arg3:Number):Array{ var _local6:Place; var _local7:Number; var _local8:Number; var _local9:int; var _local4:Places = GameSpace.instance.places; var _local5:Array = []; _local9 = (_local4.placesLayer.numChildren - 1); while (_local9 >= 0) { _local6 = (_local4.placesLayer.getChildAt(_local9) as Place); if (checkPath(_local6, _arg1, _arg2, _arg3)){ _local5.push(_local6); }; _local9--; }; _local9 = (GameSpace.instance.upperPlacesLayer.numChildren - 1); while (_local9 >= 0) { _local6 = (GameSpace.instance.upperPlacesLayer.getChildAt(_local9) as Place); if (checkPath(_local6, _arg1, _arg2, _arg3)){ _local5.push(_local6); }; _local9--; }; return (_local5); } public static function legalTerrainLocation(_arg1:int, _arg2:int, _arg3:Object=null):Boolean{ var _local5:int; var _local7:int; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (false); }; var _local4:int = GameSpace.instance.terrain.terrainHeight[(_arg1 + (_arg2 * GameSpace.WIDTH))]; if (getQualifiedClassName(_arg3) == "com.wbwar.creeper::BaseGun"){ _local5 = 3; } else { if (getQualifiedClassName(_arg3) == "com.wbwar.creeper::ThorsHammer"){ _local5 = 2; } else { _local5 = 1; }; }; var _local6:int = (_arg2 - _local5); while (_local6 <= (_arg2 + _local5)) { _local7 = (_arg1 - _local5); while (_local7 <= (_arg1 + _local5)) { if ((((((((_local7 < 0)) || ((_local6 < 0)))) || ((_local7 >= GameSpace.WIDTH)))) || ((_local6 >= GameSpace.HEIGHT)))){ return (false); }; if (GameSpace.instance.terrain.terrainHeight[(_local7 + (_local6 * GameSpace.WIDTH))] != _local4){ return (false); }; if (GameSpace.instance.walls.wallData[(_local7 + (_local6 * GameSpace.WIDTH))] > 0){ return (false); }; _local7++; }; _local6++; }; return (true); } private static function checkPath(_arg1:Place, _arg2:String, _arg3:Number, _arg4:Number):Boolean{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; if (_arg1.destroyed){ return (false); }; if ((((_arg2 == "com.wbwar.creeper::Rift")) || ((_arg1 is Rift)))){ return (false); }; if ((((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is Tech)))) || ((((_arg2 == "com.wbwar.creeper::Tech")) && ((_arg1 is BaseGun)))))){ return (false); }; if ((((((((((((((((((((((((((((((_arg2 == "com.wbwar.creeper::Node")) || ((_arg1 is Node)))) || ((_arg2 == "com.wbwar.creeper::Relay")))) || ((_arg1 is Relay)))) || ((_arg1 is BaseGun)))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is Tech)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is Totem)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is EnergyStorage)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is Logistics)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is EnergyAmp)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is Units)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is AreaGun)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is ABM)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is DroneBase)))))) || ((((_arg2 == "com.wbwar.creeper::BaseGun")) && ((_arg1 is Gun)))))){ _local7 = (_arg1.x - _arg3); _local8 = (_arg1.y - _arg4); _local5 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8))); if ((((_arg2 == "com.wbwar.creeper::Relay")) && ((_arg1 is Relay)))){ _local6 = (CONNECT_RANGE * 2); } else { _local6 = CONNECT_RANGE; }; if (_local5 < (_local6 * GameSpace.CELL_WIDTH)){ return (true); }; return (false); }; return (false); } public static function create(_arg1:XML):Place{ var _local2:Place; var _local3:String = _arg1.name(); switch (_local3){ case "Node": _local2 = new Node(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "Relay": _local2 = new Relay(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "EnergyStorage": _local2 = new EnergyStorage(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "Gun": _local2 = new Gun(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "AreaGun": _local2 = new AreaGun(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "DroneBase": _local2 = new DroneBase(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "Totem": _local2 = new Totem(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "Rift": _local2 = new Rift(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; case "BaseGun": _local2 = new BaseGun(_arg1.gameSpaceX, _arg1.gameSpaceY); _local2.load(_arg1); break; }; return (_local2); } } }//package com.wbwar.creeper
Section 174
//Places (com.wbwar.creeper.Places) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.media.*; import flash.utils.*; public final class Places extends Sprite { public var onlyLegalX:int;// = -1 public var onlyLegalY:int;// = -1 private var addPlaceSprite:AddPlaceSprite; private var _placeToMove:Place; public var distLayer:Sprite; private var movePlaceSprite:MovePlaceSprite; public var placesLayer:Sprite; private var clickSound:Sound; private var clickLayer:Sprite; public var gameSpace:GameSpace; private var lastMouseMoveX:int;// = -1 private var lastMouseMoveY:int;// = -1 private var _placeToAdd:String; public function Places(_arg1:GameSpace){ this.gameSpace = _arg1; graphics.beginFill(0, 0); graphics.drawRect(0, 0, (GameSpace.WIDTH * GameSpace.CELL_WIDTH), (GameSpace.HEIGHT * GameSpace.CELL_HEIGHT)); graphics.endFill(); distLayer = new Sprite(); distLayer.mouseEnabled = false; distLayer.mouseChildren = false; addChild(distLayer); placesLayer = new Sprite(); placesLayer.mouseEnabled = false; addChild(placesLayer); clickLayer = GameSpace.instance.placesClickLayer; addPlaceSprite = new AddPlaceSprite(); addPlaceSprite.visible = false; addChild(addPlaceSprite); movePlaceSprite = new MovePlaceSprite(); movePlaceSprite.visible = false; addChild(movePlaceSprite); clickLayer.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); clickLayer.addEventListener(MouseEvent.CLICK, onMouseClick); clickSound = new ClickSound(); } public function removeAllSelections():void{ var _local1:Place; var _local2:int; _local2 = (placesLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (placesLayer.getChildAt(_local2) as Place); _local1.selected = false; _local2--; }; _local2 = (GameSpace.instance.upperPlacesLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (GameSpace.instance.upperPlacesLayer.getChildAt(_local2) as Place); _local1.selected = false; _local2--; }; } public function set placeToAdd(_arg1:String):void{ var _local2:Object; _placeToAdd = _arg1; if (_arg1 != null){ addPlaceSprite.x = 1000; addPlaceSprite.visible = true; _local2 = getDefinitionByName(_placeToAdd); addPlaceSprite.placementSprite = _local2["getPlacementSprite"](); showRanges(null, false, null); showRanges(ClassUtil.getClass(_local2), true, null); clickLayer.visible = true; lastMouseMoveX = -1; lastMouseMoveY = -1; onMouseMove(null); } else { showRanges(null, false, null); addPlaceSprite.visible = false; if (_placeToMove == null){ clickLayer.visible = false; }; }; } public function lowerPlace(_arg1:Place):void{ if (GameSpace.instance.upperPlacesLayer.contains(_arg1)){ GameSpace.instance.upperPlacesLayer.removeChild(_arg1); placesLayer.addChild(_arg1); }; } public function update():void{ var _local1:Place; var _local2:int; var _local3:Boolean; var _local4:int; _local4 = (placesLayer.numChildren - 1); while (_local4 >= 0) { _local1 = (placesLayer.getChildAt(_local4) as Place); _local2 = (_local2 + _local1.energyRequestQueue.length); _local1.update(); _local4--; }; _local4 = (GameSpace.instance.upperPlacesLayer.numChildren - 1); while (_local4 >= 0) { _local1 = (GameSpace.instance.upperPlacesLayer.getChildAt(_local4) as Place); _local2 = (_local2 + _local1.energyRequestQueue.length); _local1.update(); _local4--; }; if (_local3){ GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.enabled = false; } else { GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.enabled = true; }; GameSpace.instance.energyQueueLength = _local2; } public function resetGraphData():void{ var _local1:Place; var _local2:int; _local2 = (placesLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (placesLayer.getChildAt(_local2) as Place); _local1.g_score = 0; _local1.h_score = 0; _local1.f_score = 99999999; _local1.came_from = null; _local2--; }; _local2 = (GameSpace.instance.upperPlacesLayer.numChildren - 1); while (_local2 >= 0) { _local1 = (GameSpace.instance.upperPlacesLayer.getChildAt(_local2) as Place); _local1.g_score = 0; _local1.h_score = 0; _local1.f_score = 99999999; _local1.came_from = null; _local2--; }; } public function get placeToMove():Place{ return (_placeToMove); } public function legalLocation(_arg1:int, _arg2:int, _arg3:Object, _arg4:Place):Boolean{ var _local5:Place; var _local6:Number; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:Number; var _local12:MovingPlace; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (false); }; if (onlyLegalX > -1){ if (((!((onlyLegalX == _arg1))) || (!((onlyLegalY == _arg2))))){ return (false); }; }; if ((_arg4 is DroneBase)){ return (true); }; if ((((_arg4 is BaseGun)) && (((!((GameSpace.instance.rift == null))) && ((GameSpace.instance.rift.state == Rift.STATE_ACTIVATED)))))){ _local8 = (GameSpace.instance.rift.gameSpaceX - _arg1); _local9 = (GameSpace.instance.rift.gameSpaceY - _arg2); _local10 = ((_local8 * _local8) + (_local9 * _local9)); if (_local10 <= 36){ return (true); }; }; if (!Place.legalTerrainLocation(_arg1, _arg2, _arg3)){ return (false); }; _local7 = (GameSpace.instance.places.placesLayer.numChildren - 1); for (;_local7 >= 0;_local7--) { _local5 = (GameSpace.instance.places.placesLayer.getChildAt(_local7) as Place); if (((!((_arg4 == null))) && ((_arg4 == _local5)))){ } else { if ((((_local5 is MovingPlace)) && (!(((_local5 as MovingPlace).state == MovingPlace.STATE_PLACED))))){ continue; } else { if ((((_local5 is BaseGun)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::BaseGun")))){ _local6 = 4; } else { if ((((_local5 is DroneBase)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::DroneBase")))){ _local6 = 2; } else { if ((((_local5 is EnergyStorage)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::EnergyStorage")))){ _local6 = 2; } else { if ((((_local5 is Logistics)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::Logistics")))){ _local6 = 2; } else { if ((((_local5 is EnergyAmp)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::EnergyAmp")))){ _local6 = 2; } else { if ((((_local5 is Units)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::Units")))){ _local6 = 2; } else { _local6 = 2; }; }; }; }; }; }; _local11 = (((_local5.gameSpaceX - _arg1) * (_local5.gameSpaceX - _arg1)) + ((_local5.gameSpaceY - _arg2) * (_local5.gameSpaceY - _arg2))); if (_local11 < (_local6 * _local6)){ return (false); }; }; }; }; _local7 = (GameSpace.instance.upperPlacesLayer.numChildren - 1); while (_local7 >= 0) { _local5 = (GameSpace.instance.upperPlacesLayer.getChildAt(_local7) as Place); if (((!((_arg4 == null))) && ((_arg4 == _local5)))){ } else { if ((((_local5 is MovingPlace)) && (!(((_local5 as MovingPlace).state == MovingPlace.STATE_PLACED))))){ _local12 = (_local5 as MovingPlace); if ((((_local5 is BaseGun)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::BaseGun")))){ _local6 = 4; } else { if ((((_local5 is DroneBase)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::ThorsHammer")))){ _local6 = 3; } else { if ((((_local5 is DroneBase)) || ((getQualifiedClassName(_arg3) == "com.wbwar.creeper::DroneBase")))){ _local6 = 2; } else { _local6 = 2; }; }; }; if ((((Math.abs((_local12.targetGameSpaceX - _arg1)) < _local6)) && ((Math.abs((_local12.targetGameSpaceY - _arg2)) < _local6)))){ return (false); }; }; }; _local7--; }; return (true); } public function get placeToAdd():String{ return (_placeToAdd); } private function onMouseClick(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Object; var _local5:Place; lastMouseMoveX = -1; lastMouseMoveY = -1; if (_placeToAdd){ clickSound.play(); removeAllSelections(); _local2 = (addPlaceSprite.x / GameSpace.CELL_WIDTH); _local3 = (addPlaceSprite.y / GameSpace.CELL_HEIGHT); _local4 = getDefinitionByName(_placeToAdd); if (legalLocation(_local2, _local3, _local4, null)){ if (_placeToAdd == "com.wbwar.creeper::Gun"){ _local5 = new Gun(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::AreaGun"){ _local5 = new AreaGun(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::ABM"){ _local5 = new ABM(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::DroneBase"){ _local5 = new DroneBase(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::Node"){ _local5 = new Node(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::Relay"){ _local5 = new Relay(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::EnergyStorage"){ _local5 = new EnergyStorage(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::Logistics"){ _local5 = new Logistics(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::EnergyAmp"){ _local5 = new EnergyAmp(_local2, _local3); } else { if (_placeToAdd == "com.wbwar.creeper::Units"){ _local5 = new Units(_local2, _local3); }; }; }; }; }; }; }; }; }; }; addPlace(_local5); if (((!((_local5 == null))) && ((_local5 is MovingPlace)))){ (_local5 as MovingPlace).showRangeIndicator(true); }; }; _arg1.stopImmediatePropagation(); } else { if (_placeToMove){ clickSound.play(); _local2 = (movePlaceSprite.x / GameSpace.CELL_WIDTH); _local3 = (movePlaceSprite.y / GameSpace.CELL_HEIGHT); if ((((((((_local2 == _placeToMove.gameSpaceX)) && ((_local3 == _placeToMove.gameSpaceY)))) && ((_placeToMove is MovingPlace)))) && (((_placeToMove as MovingPlace).state == MovingPlace.STATE_PLACED)))){ GameSpace.instance.controlPanel.onCancelButtonClick(); } else { if (legalLocation(_local2, _local3, ClassUtil.getClass(_placeToMove), _placeToMove)){ dispatchEvent(new Event("PLACES_MOVE")); placeToMove.move(_local2, _local3); placeToMove.selected = false; placeToMove = null; GameSpace.instance.controlPanel.place = null; }; }; _arg1.stopImmediatePropagation(); }; }; } public function removePlace(_arg1:Place):void{ if (_placeToMove == _arg1){ GameSpace.instance.controlPanel.onCancelButtonClick(); }; if (placesLayer.contains(_arg1)){ placesLayer.removeChild(_arg1); }; if (GameSpace.instance.upperPlacesLayer.contains(_arg1)){ GameSpace.instance.upperPlacesLayer.removeChild(_arg1); }; } public function set placeToMove(_arg1:Place):void{ _placeToMove = _arg1; if (_arg1 != null){ movePlaceSprite.visible = true; clickLayer.visible = true; showRanges(null, false, null); showRanges(ClassUtil.getClass(_arg1), true, _arg1); lastMouseMoveX = -1; lastMouseMoveY = -1; onMouseMove(null); } else { movePlaceSprite.visible = false; showRanges(null, false, null); if (_placeToAdd == null){ clickLayer.visible = false; }; }; } public function addPlace(_arg1:Place):void{ placesLayer.addChild(_arg1); } private function onMouseMove(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Object; _local2 = (placesLayer.mouseX / GameSpace.CELL_WIDTH); _local3 = (placesLayer.mouseY / GameSpace.CELL_HEIGHT); if (((!((_local2 == lastMouseMoveX))) || (!((_local3 == lastMouseMoveY))))){ lastMouseMoveX = _local2; lastMouseMoveY = _local3; if (_placeToAdd != null){ addPlaceSprite.x = ((_local2 * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); addPlaceSprite.y = ((_local3 * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); _local4 = getDefinitionByName(_placeToAdd); addPlaceSprite.refresh(legalLocation(_local2, _local3, _local4, null), _placeToAdd, _local4["START_RANGE"], _local2, _local3); } else { if (_placeToMove != null){ movePlaceSprite.x = ((_local2 * GameSpace.CELL_WIDTH) + (GameSpace.CELL_WIDTH / 2)); movePlaceSprite.y = ((_local3 * GameSpace.CELL_HEIGHT) + (GameSpace.CELL_HEIGHT / 2)); movePlaceSprite.refresh(legalLocation(_local2, _local3, ClassUtil.getClass(_placeToMove), _placeToMove), _placeToMove.RANGE, _local2, _local3, placeToMove); }; }; }; } public function showRanges(_arg1:Class, _arg2:Boolean, _arg3:Place):void{ var _local4:Place; var _local5:int; _local5 = (placesLayer.numChildren - 1); while (_local5 >= 0) { _local4 = (placesLayer.getChildAt(_local5) as Place); if ((((_local4 is MovingPlace)) && (!((_local4 == _arg3))))){ if ((((_arg1 == null)) || ((_local4 is _arg1)))){ (_local4 as MovingPlace).showRangeIndicator(_arg2); }; }; _local5--; }; _local5 = (GameSpace.instance.upperPlacesLayer.numChildren - 1); while (_local5 >= 0) { _local4 = (GameSpace.instance.upperPlacesLayer.getChildAt(_local5) as Place); if ((((_local4 is MovingPlace)) && (!((_local4 == _arg3))))){ if ((((_arg1 == null)) || ((_local4 is _arg1)))){ (_local4 as MovingPlace).showRangeIndicator(_arg2); }; }; _local5--; }; } public function raisePlace(_arg1:Place):void{ if (placesLayer.contains(_arg1)){ placesLayer.removeChild(_arg1); GameSpace.instance.upperPlacesLayer.addChild(_arg1); }; } private function getUnitCost(_arg1:String):int{ var _local2:Object = getDefinitionByName(_placeToAdd); return (_local2["unitCost"]); } } }//package com.wbwar.creeper
Section 175
//Projectile (com.wbwar.creeper.Projectile) package com.wbwar.creeper { import flash.display.*; public class Projectile extends Sprite { public var dead:Boolean; public function Projectile(){ mouseEnabled = false; mouseChildren = false; } public function update():void{ } public function destroy():void{ } } }//package com.wbwar.creeper
Section 176
//Projectiles (com.wbwar.creeper.Projectiles) package com.wbwar.creeper { import flash.display.*; public final class Projectiles extends Sprite { public function Projectiles(){ mouseEnabled = false; } public function update():void{ var _local1:Projectile; var _local2:int = (numChildren - 1); while (_local2 >= 0) { if (_local2 < numChildren){ _local1 = (getChildAt(_local2) as Projectile); _local1.update(); }; _local2--; }; } public function addProjectile(_arg1:Projectile):void{ addChild(_arg1); } public function removeProjectile(_arg1:Projectile):void{ removeChild(_arg1); } } }//package com.wbwar.creeper
Section 177
//Relay (com.wbwar.creeper.Relay) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.geom.*; public final class Relay extends Place { public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; public static const START_RANGE:int = 0; private static const MIN_RANGE_NODE2:int = 1; public static const EVENT_PLACED:String = "com.wbwar.creeper.Relay.EVENT_PLACED"; private static const ENERGY_CONSUMPTION_RATE:int = 30; public static const EFFECT_RANGE:int = 4; private static const SHAPERADIUS:int = 7; public static const BASE_COST:int = 100; public function Relay(_arg1:int, _arg2:int){ super(_arg1, _arg2); cacheAsBitmap = true; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; draw(placeBody); placeBody.filters = [new DropShadowFilter(2)]; if (GameSpace.instance != null){ hookUp(); }; if (GameSpace.instance != null){ GameSpace.instance.places.dispatchEvent(new Event(EVENT_PLACED, true)); }; } override public function get maxHealth():Number{ return (BASE_COST); } override protected function getXMLRoot():XML{ return (<Relay/> ); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } override public function update():void{ super.update(); if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; calculateDamage(); } override public function get operateEnergy():Number{ return (0); } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } private static function draw(_arg1:Sprite):void{ var _local2:Matrix = new Matrix(); _local2.createGradientBox(((SHAPERADIUS * 2) - 1), ((SHAPERADIUS * 2) - 1), 0, -(SHAPERADIUS), -(SHAPERADIUS)); _arg1.graphics.beginGradientFill(GradientType.RADIAL, [6136208, 7980733, 3110537], [1, 1, 1], [0, 225, 0xFF], _local2, SpreadMethod.PAD, InterpolationMethod.RGB, 0); _arg1.graphics.lineStyle(1, 0); _arg1.graphics.moveTo(0, -(SHAPERADIUS)); _arg1.graphics.lineTo((SHAPERADIUS * 0.8), (SHAPERADIUS * 0.6)); _arg1.graphics.lineTo((-(SHAPERADIUS) * 0.8), (SHAPERADIUS * 0.6)); _arg1.graphics.endFill(); _arg1.graphics.beginFill(2105440); _arg1.graphics.drawCircle(0, 0, 1.5); _arg1.graphics.endFill(); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); draw(_local2); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } } }//package com.wbwar.creeper
Section 178
//Rift (com.wbwar.creeper.Rift) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import caurina.transitions.*; public final class Rift extends Place { private var activatingShape1:Shape; private var activatingShape2:Shape; public var riftOpenSoundChannel:SoundChannel; private var holeOpenSound:Sound; private var activatingSound:Sound; public var activatingSoundChannel:SoundChannel; private var activatingShape0:Shape; public var state:int; public var totems:Array; private var techWarningShown:Boolean; private var riftOpenSound:Sound; private var _powered:Boolean; public var body:RiftBody; private var stateCounter:int; public var blackhole:Boolean; public static const STATE_OFF:int = 0; public static const STATE_ACTIVATED:int = 5; public static const STATE_ACTIVATING0:int = 1; public static const STATE_ACTIVATING1:int = 2; public static const STATE_ACTIVATING2:int = 3; public static const STATE_ACTIVATING3:int = 4; public static const ACTIVATING3_EVENT:String = "ACTIVATING3_EVENT"; public function Rift(_arg1:int, _arg2:int){ var _local4:Matrix; totems = []; super(_arg1, _arg2); mouseEnabled = false; activatingShape0 = new Shape(); activatingShape0.filters = [new GlowFilter(0xFFFF00, 0.8, 4, 4, 2, 1)]; addChild(activatingShape0); activatingShape1 = ColorUtil.star(5, 17, 16, 0xFFFFFF); var _local3:Number = 17; _local4 = new Matrix(); _local4.createGradientBox((_local3 * 2), (_local3 * 2), 0, -(_local3), -(_local3)); activatingShape1.graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, 0xA0A0A0], [1, 0], [64, 225], _local4, SpreadMethod.PAD, InterpolationMethod.RGB, 0); activatingShape1.graphics.drawCircle(0, 0, _local3); activatingShape1.graphics.endFill(); activatingShape1.filters = [new GlowFilter(0xFFFF00, 1, 8, 8, 2, 1)]; addChild(activatingShape1); activatingShape1.visible = false; body = new RiftBody(); body.visible = false; addChild(body); activatingShape2 = new Shape(); addChild(activatingShape2); activatingShape2.visible = false; _local3 = 5; _local4 = new Matrix(); _local4.createGradientBox((_local3 * 2), (_local3 * 2), 0, -(_local3), -(_local3)); activatingShape2.graphics.beginGradientFill(GradientType.RADIAL, [16776992, 0xA0A0A0], [1, 0], [64, 225], _local4, SpreadMethod.PAD, InterpolationMethod.RGB, 0); activatingShape2.graphics.drawCircle(0, 0, _local3); activatingShape2.graphics.endFill(); activatingShape2.graphics.lineStyle(2, 5308240); activatingShape2.graphics.drawCircle(0, 0, 8); activatingSound = new TotemActivateSound(); riftOpenSound = new RiftOpenSound(); holeOpenSound = new HoleOpenSound(); } override public function destroy(_arg1:Boolean=false):void{ if (riftOpenSoundChannel != null){ riftOpenSoundChannel.stop(); }; visible = false; } override public function update():void{ var _local1:Totem; var _local2:Sound; var _local3:int; var _local4:Object; var _local5:Place; var _local6:Boolean; var _local7:Object; super.update(); if (state == STATE_ACTIVATING0){ for each (_local1 in totems) { _local1.setActivated(true); }; state = STATE_ACTIVATING1; } else { if (state == STATE_ACTIVATING1){ activatingShape0.graphics.lineStyle(3, 0xFF00); for each (_local1 in totems) { activatingShape0.graphics.moveTo((_local1.x - x), (_local1.y - y)); activatingShape0.graphics.lineTo(0, 0); }; activatingShape1.visible = true; state = STATE_ACTIVATING2; } else { if (state == STATE_ACTIVATING2){ if (stateCounter == 90){ stateCounter = 0; for each (_local1 in totems) { _local1.setActivated(false); _local1.setDone(); }; if (activatingSoundChannel != null){ Tweener.addTween(activatingSoundChannel, {_sound_volume:0, time:2, onComplete:activatingSoundChannel.stop()}); }; _local2 = new RiftOpenPopSound(); _local2.play(); if (GameSpace.instance.suppressCityExit){ riftOpenSoundChannel = holeOpenSound.play(0, 99999999); } else { riftOpenSoundChannel = riftOpenSound.play(0, 99999999); }; activatingShape0.graphics.clear(); activatingShape0.visible = false; activatingShape1.visible = false; activatingShape2.visible = true; body.visible = true; dispatchEvent(new Event(ACTIVATING3_EVENT)); state = STATE_ACTIVATING3; } else { activatingShape1.rotation = (activatingShape1.rotation + 7); }; stateCounter++; } else { if (state == STATE_ACTIVATING3){ if (stateCounter > 15){ stateCounter = 0; body.scaleX = 1; body.scaleY = 1; activatingShape2.visible = false; state = STATE_ACTIVATED; if (GameSpace.instance.suppressCityExit){ _local3 = (GameSpace.instance.glopProducerLayer.numChildren - 1); while (_local3 >= 0) { _local4 = GameSpace.instance.glopProducerLayer.getChildAt(_local3); if ((_local4 is GlopProducer)){ (_local4 as GlopProducer).fallIntoHole(); } else { if ((_local4 is GlopProducerNexus)){ (_local4 as GlopProducerNexus).fallIntoHole(); }; }; _local3--; }; _local3 = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local3 >= 0) { _local5 = (GameSpace.instance.places.placesLayer.getChildAt(_local3) as Place); if (!(_local5 is BaseGun)){ _local5.fallIntoHole(); }; _local3--; }; }; } else { activatingShape2.scaleX = (activatingShape2.scaleX + 0.5); activatingShape2.scaleY = activatingShape2.scaleX; activatingShape2.alpha = (1 - (stateCounter / 15)); body.scaleX = (stateCounter / 15); body.scaleY = body.scaleX; }; stateCounter++; body.update(); } else { if (state == STATE_ACTIVATED){ body.update(); } else { if ((updateCount % 36) == 0){ _local6 = false; for each (_local1 in totems) { if (_local1.energyLevel < _local1.operateEnergy){ _local6 = true; break; }; }; if (!_local6){ _local3 = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local3 >= 0) { _local7 = GameSpace.instance.places.placesLayer.getChildAt(_local3); if ((((_local7 is Tech)) || ((_local7 is Ruin)))){ _local6 = true; showTechWarning(); break; }; _local3--; }; }; if (!_local6){ activate(); }; }; }; }; }; }; }; } public function set powered(_arg1:Boolean):void{ _powered = _arg1; } override protected function getXMLRoot():XML{ return (<Rift/> ); } override public function get maxHealth():Number{ return (0); } override public function get operateEnergy():Number{ return (0); } public function addTotem(_arg1:Totem):void{ totems.push(_arg1); } private function showTechWarning():void{ var md:MessageDialog; if (!techWarningShown){ techWarningShown = true; md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 450, 100, true); md.textField.text = "[OPS]\nCollect any nano schematics, ruins, and survival pods!\nThen we can energize the Rift."; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); }; } public function get powered():Boolean{ return (_powered); } private function activate():void{ state = STATE_ACTIVATING0; activatingSoundChannel = activatingSound.play(0, 99999999); } public static function legalLocation(_arg1:int, _arg2:int, _arg3:Place=null):Boolean{ return (true); } } }//package com.wbwar.creeper
Section 179
//RiftBody (com.wbwar.creeper.RiftBody) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.geom.*; public final class RiftBody extends Sprite { private var rr:Array; private var rs:Array; private var rings:Array; private var holeSprite:Sprite; private var ringsSprite:Sprite; private var riftSprite:Sprite; private var orbScale:Number;// = -0.01 private var hole:Shape; private var orbStar:Shape; private var holeStar:Shape; private var orb:Shape; public function RiftBody(){ rings = []; rr = []; rs = []; super(); mouseEnabled = false; mouseChildren = false; ringsSprite = new Sprite(); ringsSprite.mouseEnabled = false; ringsSprite.mouseChildren = false; rings[0] = getRing(60, 40); rr[0] = 7; rs[0] = 0.1; ringsSprite.addChild(rings[0]); rings[1] = getRing(60, 40); rr[1] = -12; rs[1] = 0.13; ringsSprite.addChild(rings[1]); rings[2] = getRing(60, 40); rr[2] = 0; rs[2] = 0.17; ringsSprite.addChild(rings[2]); ringsSprite.filters = [new GlowFilter(0xFF0000, 1, 8, 8)]; orbStar = ColorUtil.star(5, 20, 16, 0xFFFFFF); orbStar.filters = [new GlowFilter(0xFFFF00, 1, 8, 8, 2, 1)]; var _local1:Number = 20; orb = new Shape(); var _local2:Matrix = new Matrix(); _local2.createGradientBox((_local1 * 2), (_local1 * 2), 0, -(_local1), -(_local1)); orb.graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, 0xA0A0A0], [1, 0], [64, 225], _local2, SpreadMethod.PAD, InterpolationMethod.RGB, 0); orb.graphics.drawCircle(0, 0, 17); orb.graphics.endFill(); orb.filters = [new GlowFilter(0xFFFF00, 1, 8, 8, 2, 1)]; riftSprite = new Sprite(); riftSprite.mouseEnabled = false; riftSprite.mouseChildren = false; addChild(riftSprite); riftSprite.addChild(orb); riftSprite.addChild(orbStar); riftSprite.addChild(ringsSprite); holeSprite = new Sprite(); holeSprite.mouseEnabled = false; holeSprite.mouseChildren = false; addChild(holeSprite); holeSprite.visible = false; holeStar = ColorUtil.star(20, 30, 16, 0); holeStar.alpha = 0.5; holeStar.filters = [new BlurFilter(16, 16)]; hole = new Shape(); hole.graphics.beginFill(0, 0.1); hole.graphics.drawCircle(0, 0, 15); hole.graphics.endFill(); hole.graphics.beginFill(0, 0.3); hole.graphics.drawCircle(0, 0, 10); hole.graphics.endFill(); hole.graphics.beginFill(0, 0.5); hole.graphics.drawCircle(0, 0, 5); hole.graphics.endFill(); hole.graphics.beginFill(0); hole.graphics.drawCircle(0, 0, 2); hole.graphics.endFill(); holeSprite.addChild(holeStar); holeSprite.addChild(hole); } private function getRing(_arg1:int, _arg2:int):Shape{ var _local3:Shape = new Shape(); _local3.graphics.lineStyle(3, 0xFFFFFF); _local3.graphics.drawEllipse((-(_arg1) / 2), (-(_arg2) / 2), _arg1, _arg2); return (_local3); } public function update():void{ var _local1:Shape; var _local2:int; if (GameSpace.instance.suppressCityExit){ riftSprite.visible = false; holeSprite.visible = true; holeStar.rotation = (holeStar.rotation + 2); } else { riftSprite.visible = true; holeSprite.visible = false; _local2 = 0; while (_local2 < rings.length) { _local1 = (rings[_local2] as Shape); _local1.rotation = (_local1.rotation + rr[_local2]); if ((((_local1.scaleY >= 1)) || ((_local1.scaleY <= 0)))){ rs[_local2] = -(rs[_local2]); }; _local1.scaleY = (_local1.scaleY + rs[_local2]); if (_local1.scaleY < 0){ _local1.scaleY = 0; }; if (_local1.scaleY > 1){ _local1.scaleY = 1; }; _local2++; }; orbStar.rotation = (orbStar.rotation + 3); }; } } }//package com.wbwar.creeper
Section 180
//Ruin (com.wbwar.creeper.Ruin) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.media.*; public final class Ruin extends Place { private var ascaleRate:Number;// = 0.05 private var pulseTimer:int; private var state:int; public var md:MessageDialog; private var ruinShape:MovieClip; private static const STATE_REMOVE:int = 2; private static const STATE_APPLYING:int = 1; private static const STATE_WAITING:int = 0; public function Ruin(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); ruinShape = new RuinBody(); ruinShape.filters = [new GlowFilter(6356832, 1, 8, 8, 3), new DropShadowFilter(2)]; addChild(ruinShape); GameSpace.instance.places.addPlace(this); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, 550, -1, true); md.okButton.addEventListener(MouseEvent.CLICK, onMessageDialogOkClick, false, 99, true); } override public function update():void{ var _local1:Place; if (state == STATE_WAITING){ if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 != null){ applyRuin(); }; }; } else { if (state == STATE_APPLYING){ pulseTimer++; ruinShape.scaleX = (ruinShape.scaleX + ascaleRate); ruinShape.scaleY = ruinShape.scaleX; if ((((ruinShape.scaleX > 1.5)) || ((ruinShape.scaleX <= 1)))){ ascaleRate = -(ascaleRate); }; if (pulseTimer > 50){ state = STATE_REMOVE; }; } else { if (state == STATE_REMOVE){ destroy(true); }; }; }; } private function applyRuin():void{ state = STATE_APPLYING; var _local1:Sound = new UpgradeAvailableSound(); _local1.play(); md.show(); GameSpace.instance.paused = true; } private function onMessageDialogOkClick(_arg1:MouseEvent):void{ GameSpace.instance.paused = false; md.okButton.removeEventListener(MouseEvent.CLICK, onMessageDialogOkClick); } } }//package com.wbwar.creeper
Section 181
//SurvivalPod (com.wbwar.creeper.SurvivalPod) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.media.*; import caurina.transitions.*; public final class SurvivalPod extends Place { private var ascaleRate:Number;// = 0.05 private var pulseTimer:int; private var state:int; public var md:MessageDialog; private var podShape:MovieClip; private static const STATE_REMOVE:int = 2; private static const STATE_APPLYING:int = 1; private static const STATE_WAITING:int = 0; public function SurvivalPod(_arg1:Number, _arg2:Number, _arg3:int=250){ super(_arg1, _arg2); podShape = new SurvivalPodBody(); podShape.filters = [new GlowFilter(16777056, 1, 8, 8, 3), new DropShadowFilter(3)]; addChild(podShape); GameSpace.instance.places.addPlace(this); md = new MessageDialog(MessageDialog.SIDE_TOP, -1, _arg3, -1, true, true); md.okButton.removeEventListener(MouseEvent.CLICK, md.onOkClick); md.okButton.addEventListener(MouseEvent.CLICK, onMessageDialogOkClick); } private function onMessageDialogOkClick(_arg1:MouseEvent):void{ md.okButton.removeEventListener(MouseEvent.CLICK, onMessageDialogOkClick); GameSpace.instance.paused = false; md.hide(true); } private function missionFailure():void{ md.textField.text = "SURVIVORS DESTROYED.\n Mission Failure"; md.show(); GameSpace.instance.destroyedReason = GameSpace.DESTROYED_REASON_SURVIVALPOD_DESTROYED; GameSpace.instance.paused = true; md.okButton.removeEventListener(MouseEvent.CLICK, onMessageDialogOkClick); md.okButton.addEventListener(MouseEvent.CLICK, exitGame); } private function exitGame(_arg1:Event=null):void{ md.okButton.removeEventListener(MouseEvent.CLICK, exitGame); md.hide(true); GameSpace.instance.paused = false; Creeper.instance.gameScreen.showResultsScreen(); } override public function update():void{ var _local1:Place; if (state == STATE_WAITING){ if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 != null){ applyPod(); }; }; } else { if (state == STATE_APPLYING){ pulseTimer++; podShape.scaleX = (podShape.scaleX + ascaleRate); podShape.scaleY = podShape.scaleX; if ((((podShape.scaleX > 1.5)) || ((podShape.scaleX <= 1)))){ ascaleRate = -(ascaleRate); }; if (pulseTimer > 50){ state = STATE_REMOVE; }; } else { if (state == STATE_REMOVE){ destroy(true); }; }; }; calculateDamage(); } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ Tweener.addTween(this, {time:0.75, onComplete:missionFailure}); destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(_arg1); } private function applyPod():void{ state = STATE_APPLYING; var _local1:Sound = new UpgradeAvailableSound(); _local1.play(); md.show(); GameSpace.instance.paused = true; } } }//package com.wbwar.creeper
Section 182
//Tech (com.wbwar.creeper.Tech) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; public final class Tech extends Place { private var ascaleRate:Number;// = 0.05 private var techShape:Shape; private var pulseTimer:int; public var techType:int; private var state:int; public var md:MessageDialog; private var techSprite:Sprite; private static const STATE_APPLYING:int = 1; public static const TECH_RELAY:int = 0; public static const TECH_AREAGUN:int = 5; public static const TECH_LOGISTICS:int = 2; private static const STATE_REMOVE:int = 2; public static const EVENT_TECH_APPLIED:String = "techApplied"; private static const STATE_WAITING:int = 0; public static const TECH_DRONEBASE:int = 7; public static const TECH_ABM:int = 6; public static const TECH_THOR:int = 8; public static const TECH_ENERGYSTORAGE:int = 1; public static const TECH_ENERGYAMP:int = 3; public static const TECH_GUN:int = 4; public function Tech(_arg1:Number, _arg2:Number, _arg3:int){ var _local4:Sprite; super(_arg1, _arg2); this.techType = _arg3; techSprite = new Sprite(); addChild(techSprite); techShape = ColorUtil.star(8, 12, 12, 0x909090); techShape.filters = [new GlowFilter(0xFF00, 1, 8, 8, 3), new DropShadowFilter(2)]; techSprite.addChild(techShape); if (_arg3 == TECH_RELAY){ _local4 = Relay.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_ENERGYSTORAGE){ _local4 = EnergyStorage.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_LOGISTICS){ _local4 = Logistics.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_ENERGYAMP){ _local4 = EnergyAmp.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_GUN){ _local4 = Gun.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_AREAGUN){ _local4 = AreaGun.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_ABM){ _local4 = ABM.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; } else { if (_arg3 == TECH_DRONEBASE){ _local4 = DroneBase.getPlacementSprite(false); _local4.scaleX = 0.7; _local4.scaleY = _local4.scaleX; }; }; }; }; }; }; }; }; if (_local4 != null){ _local4.filters = [new DropShadowFilter(2)]; techSprite.addChild(_local4); }; GameSpace.instance.places.addPlace(this); } override public function update():void{ var _local1:Place; techShape.rotation = (techShape.rotation - 3); if (state == STATE_WAITING){ if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 != null){ applyTech(); }; }; } else { if (state == STATE_APPLYING){ pulseTimer++; techSprite.scaleX = (techSprite.scaleX + ascaleRate); techSprite.scaleY = techSprite.scaleX; if ((((techSprite.scaleX > 1.5)) || ((techSprite.scaleX <= 1)))){ ascaleRate = -(ascaleRate); }; if (pulseTimer > 50){ state = STATE_REMOVE; }; } else { if (state == STATE_REMOVE){ destroy(true); }; }; }; } private function applyTech():void{ state = STATE_APPLYING; if (techType == TECH_RELAY){ GameSpace.instance.controlPanel.buildMenu.relayButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---RELAY TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_ENERGYSTORAGE){ GameSpace.instance.controlPanel.buildMenu.energyStoreButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---ENERGY STORAGE TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_LOGISTICS){ GameSpace.instance.controlPanel.buildMenu.logisticsButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---PACKET SPEED TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_ENERGYAMP){ GameSpace.instance.controlPanel.buildMenu.energyAmpButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---REACTOR TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_GUN){ GameSpace.instance.controlPanel.buildMenu.gunButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---BLASTER TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_AREAGUN){ GameSpace.instance.controlPanel.buildMenu.areaGunButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---MORTAR TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_ABM){ GameSpace.instance.controlPanel.buildMenu.abmButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---SAM TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_DRONEBASE){ GameSpace.instance.controlPanel.buildMenu.droneBaseButton.mystery = false; md = new MessageDialog(MessageDialog.SIDE_RIGHT, 40, 360, -1, true, true); md.textField.text = "---DRONE TECH NOW AVAILABLE---"; md.show(); md.addEventListener(MessageDialog.OK_CLICK, function ():void{ md.remove(); }, false, 0, true); } else { if (techType == TECH_THOR){ GameSpace.instance.controlPanel.buildMenu.thorsHammerButton.mystery = false; GameSpace.instance.paused = true; if (md != null){ md.show(); }; }; }; }; }; }; }; }; }; }; dispatchEvent(new Event(EVENT_TECH_APPLIED)); } } }//package com.wbwar.creeper
Section 183
//Terrain (com.wbwar.creeper.Terrain) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.games.*; import flash.geom.*; public final class Terrain extends Sprite { public var terrainBMD:BitmapData; private var CELL_WIDTH:int; private var terrainBitmap:Bitmap; private var levelBmd:Array; private var levelBmdRect:Rectangle; private var CELL_HEIGHT:int; private var WIDTH:int; private var HEIGHT:int; public var background:int; public var terrainHeight:Array; private static var terrain0Image:Class = Terrain_terrain0Image; private static var terrain4Image:Class = Terrain_terrain4Image; public static var terrain0Bitmap:Bitmap = (new terrain0Image() as Bitmap); public static var terrain1Bitmap:Bitmap = (new terrain1Image() as Bitmap); public static var terrain2Bitmap:Bitmap = (new terrain2Image() as Bitmap); public static var terrain3Bitmap:Bitmap = (new terrain3Image() as Bitmap); public static var terrain4Bitmap:Bitmap = (new terrain4Image() as Bitmap); public static var terrain5Bitmap:Bitmap = (new terrain5Image() as Bitmap); private static var terrain5Image:Class = Terrain_terrain5Image; private static var terrain3Image:Class = Terrain_terrain3Image; private static var terrain2Image:Class = Terrain_terrain2Image; private static var terrain1Image:Class = Terrain_terrain1Image; public function Terrain(){ terrainHeight = []; levelBmd = []; super(); WIDTH = GameSpace.WIDTH; HEIGHT = GameSpace.HEIGHT; CELL_WIDTH = GameSpace.CELL_WIDTH; CELL_HEIGHT = GameSpace.CELL_HEIGHT; terrainBMD = new BitmapData((GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT), false); terrainBitmap = new Bitmap(terrainBMD); addChild(terrainBitmap); } private function hasBottomEdge(_arg1:int, _arg2:int):Boolean{ return (((((_arg2 + 1) < HEIGHT)) && ((terrainHeight[(_arg1 + (_arg2 * WIDTH))] > terrainHeight[(_arg1 + ((_arg2 + 1) * WIDTH))])))); } private function hasRightEdge(_arg1:int, _arg2:int):Boolean{ return (((((_arg1 + 1) < WIDTH)) && ((terrainHeight[(_arg1 + (_arg2 * WIDTH))] > terrainHeight[((_arg1 + 1) + (_arg2 * WIDTH))])))); } private function hasTopEdge(_arg1:int, _arg2:int):Boolean{ return (((((_arg2 - 1) >= 0)) && ((terrainHeight[(_arg1 + (_arg2 * WIDTH))] > terrainHeight[(_arg1 + ((_arg2 - 1) * WIDTH))])))); } public function update():void{ renderTerrain(); } private function hasLeftEdge(_arg1:int, _arg2:int):Boolean{ return (((((_arg1 - 1) >= 0)) && ((terrainHeight[(_arg1 + (_arg2 * WIDTH))] > terrainHeight[((_arg1 - 1) + (_arg2 * WIDTH))])))); } public function setData(_arg1:Array):void{ this.terrainHeight = _arg1; } private function drawHex(_arg1:int, _arg2:Number, _arg3:Number):void{ var _local4:Number = 6; var _local5:Shape = new Shape(); _local5.graphics.beginFill(_arg2, _arg3); _local5.graphics.moveTo((_local4 + _local4), (_local4 + 0)); var _local6:Number = 0; while (_local6 < (2 * Math.PI)) { _local5.graphics.lineTo((_local4 + (Math.cos(_local6) * _local4)), (_local4 + (Math.sin(_local6) * _local4))); _local6 = (_local6 + (Math.PI / 3)); }; _local5.graphics.endFill(); var _local7:BitmapData = new BitmapData((_local4 * 2), (_local4 * 2), true, 0); _local7.draw(_local5); levelBmd[_arg1] = _local7; levelBmdRect = new Rectangle(0, 0, (_local4 * 2), (_local4 * 2)); } private function renderTerrain():void{ var _local1:int; var _local2:int; var _local4:Bitmap; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local10:Bitmap; var _local11:ColorTransform; var _local3:BitmapData = terrainBitmap.bitmapData; var _local9:Number = 0.3; if (background == 0){ _local10 = terrain0Bitmap; } else { if (background == 1){ _local10 = terrain1Bitmap; } else { if (background == 2){ _local10 = terrain2Bitmap; } else { if (background == 3){ _local10 = terrain3Bitmap; } else { if (background == 4){ _local10 = terrain4Bitmap; } else { if (background == 5){ _local10 = terrain5Bitmap; }; }; }; }; }; }; _local3.copyPixels(_local10.bitmapData, new Rectangle(0, 0, _local10.width, terrain2Bitmap.height), new Point(0, 0)); _local1 = 0; while (_local1 < HEIGHT) { _local2 = 0; while (_local2 < WIDTH) { _local11 = new ColorTransform(); _local11.redMultiplier = (0.25 + ((terrainHeight[(_local2 + (_local1 * WIDTH))] / Game.TERRAIN_HEIGHT_MULTIPLE) / 4.5)); _local11.greenMultiplier = _local11.redMultiplier; _local11.blueMultiplier = _local11.redMultiplier; _local3.colorTransform(new Rectangle((_local2 * CELL_WIDTH), (_local1 * CELL_HEIGHT), CELL_WIDTH, CELL_HEIGHT), _local11); if (hasBottomEdge(_local2, _local1)){ _local11 = new ColorTransform(); _local11.redMultiplier = _local9; _local11.greenMultiplier = _local9; _local11.blueMultiplier = _local9; _local3.colorTransform(new Rectangle((_local2 * CELL_WIDTH), ((_local1 + 1) * CELL_HEIGHT), CELL_WIDTH, (CELL_HEIGHT / 2)), _local11); }; if (hasTopEdge(_local2, _local1)){ _local11 = new ColorTransform(); _local11.redMultiplier = _local9; _local11.greenMultiplier = _local9; _local11.blueMultiplier = _local9; _local3.colorTransform(new Rectangle((_local2 * CELL_WIDTH), (_local1 * CELL_HEIGHT), CELL_WIDTH, 1), _local11); }; if (hasLeftEdge(_local2, _local1)){ _local11 = new ColorTransform(); _local11.redMultiplier = _local9; _local11.greenMultiplier = _local9; _local11.blueMultiplier = _local9; _local3.colorTransform(new Rectangle((_local2 * CELL_WIDTH), (_local1 * CELL_HEIGHT), 1, CELL_HEIGHT), _local11); }; if (hasRightEdge(_local2, _local1)){ _local11 = new ColorTransform(); _local11.redMultiplier = _local9; _local11.greenMultiplier = _local9; _local11.blueMultiplier = _local9; if (hasBottomEdge((_local2 + 1), (_local1 - 1))){ _local7 = ((_local1 * CELL_HEIGHT) + (CELL_HEIGHT / 2)); _local8 = (CELL_HEIGHT - (CELL_HEIGHT / 2)); } else { _local7 = (_local1 * CELL_HEIGHT); _local8 = CELL_HEIGHT; }; if (hasBottomEdge(_local2, _local1)){ _local8 = (_local8 + (CELL_HEIGHT / 2)); }; _local3.colorTransform(new Rectangle(((_local2 + 1) * CELL_WIDTH), _local7, 3, _local8), _local11); }; _local2++; }; _local1++; }; } } }//package com.wbwar.creeper
Section 184
//Terrain_terrain0Image (com.wbwar.creeper.Terrain_terrain0Image) package com.wbwar.creeper { import mx.core.*; public class Terrain_terrain0Image extends BitmapAsset { } }//package com.wbwar.creeper
Section 185
//Terrain_terrain1Image (com.wbwar.creeper.Terrain_terrain1Image) package com.wbwar.creeper { import mx.core.*; public class Terrain_terrain1Image extends BitmapAsset { } }//package com.wbwar.creeper
Section 186
//Terrain_terrain2Image (com.wbwar.creeper.Terrain_terrain2Image) package com.wbwar.creeper { import mx.core.*; public class Terrain_terrain2Image extends BitmapAsset { } }//package com.wbwar.creeper
Section 187
//Terrain_terrain3Image (com.wbwar.creeper.Terrain_terrain3Image) package com.wbwar.creeper { import mx.core.*; public class Terrain_terrain3Image extends BitmapAsset { } }//package com.wbwar.creeper
Section 188
//Terrain_terrain4Image (com.wbwar.creeper.Terrain_terrain4Image) package com.wbwar.creeper { import mx.core.*; public class Terrain_terrain4Image extends BitmapAsset { } }//package com.wbwar.creeper
Section 189
//Terrain_terrain5Image (com.wbwar.creeper.Terrain_terrain5Image) package com.wbwar.creeper { import mx.core.*; public class Terrain_terrain5Image extends BitmapAsset { } }//package com.wbwar.creeper
Section 190
//Totem (com.wbwar.creeper.Totem) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; import flash.geom.*; public final class Totem extends Place { private var done:Boolean; private var activatedShape:Shape; private var activated:Boolean; private var lastHealth:Number;// = 0 private var healthBar:Bar; public var infectedBlobStrength:Number;// = 0.5 public var infectedBlobDuration:int;// = 1 private var lastEnergyLevel:Number;// = 0 private var body:MovieClip; private var energyBar:Bar; private var _powered:Boolean; public var infected:Boolean;// = false private var infectedLaunchCounter:int; public var infectedLaunchTime:int; private var playing:Boolean; private static const MIN_RANGE_NODE2:int = 1; public function Totem(_arg1:int, _arg2:int){ infectedLaunchTime = (3000 + (Math.random() * 500)); infectedLaunchCounter = infectedLaunchTime; super(_arg1, _arg2); energyBar = new Bar(20, 3, 0xFF00, 0); addChild(energyBar); energyBar.x = -10; energyBar.y = -10; energyBar.setValue(0, 20); energyBar.filters = [new DropShadowFilter(1)]; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; healthBar.visible = false; body = getPlacementSprite(); body.stop(); addChild(body); this.filters = [new DropShadowFilter(2)]; var _local3:Number = 10; activatedShape = ColorUtil.star(5, 10, 16, 0xFF00); var _local4:Matrix = new Matrix(); _local4.createGradientBox((_local3 * 2), (_local3 * 2), 0, -(_local3), -(_local3)); activatedShape.graphics.beginGradientFill(GradientType.RADIAL, [9502608, 0xA0A0A0], [1, 0], [64, 225], _local4, SpreadMethod.PAD, InterpolationMethod.RGB, 0); activatedShape.graphics.drawCircle(0, 0, _local3); activatedShape.graphics.endFill(); activatedShape.filters = [new GlowFilter(0x50FF00, 1, 8, 8, 2, 1)]; activatedShape.visible = false; addChild(activatedShape); if (GameSpace.instance != null){ hookUp(); }; if (GameSpace.instance != null){ GameSpace.instance.rift.addTotem(this); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } override public function get operateEnergyType():int{ return (EnergyPacket.TYPE_OPERATEENERGY); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } public function set powered(_arg1:Boolean):void{ _powered = _arg1; } override public function update():void{ var _local1:Array; var _local2:Place; var _local3:int; var _local4:int; var _local5:Place; var _local6:Place; if (done){ return; }; super.update(); if (infected){ if (infectedLaunchCounter > 0){ infectedLaunchCounter--; } else { _local1 = []; _local3 = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local3 >= 0) { _local2 = (GameSpace.instance.places.placesLayer.getChildAt(_local3) as Place); if ((((_local2 is Node)) || ((_local2 is Relay)))){ _local1.push(_local2); }; _local3--; }; if (_local1.length > 0){ _local4 = int((Math.random() * _local1.length)); _local5 = (_local1[_local4] as Place); new GlopBlob(gameSpaceX, gameSpaceY, int(((_local5.gameSpaceX + (Math.random() * 4)) - 2)), int(((_local5.gameSpaceY + (Math.random() * 4)) - 2)), infectedBlobStrength, infectedBlobDuration); infectedLaunchCounter = infectedLaunchTime; }; }; }; if ((((energyLevel >= operateEnergy)) && (!(playing)))){ body.play(); infected = false; playing = true; }; if (activated){ activatedShape.rotation = (activatedShape.rotation - 5); }; if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (energyLevel != lastEnergyLevel){ energyBar.setValue(energyLevel, operateEnergy); }; lastEnergyLevel = energyLevel; if (building){ return; }; if (((((updateCount % 30) == 0)) && (!(activated)))){ _local6 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local6 == null){ requestEnergy = false; powered = false; energyBar.visible = false; if (playing){ body.stop(); playing = false; }; energyLevel = 0; } else { requestEnergy = true; powered = true; energyBar.visible = true; }; }; } override public function get operateEnergy():Number{ return (50); } public function setActivated(_arg1:Boolean):void{ this.activated = _arg1; activatedShape.visible = _arg1; if (_arg1){ energyBar.visible = false; }; } public function setDone():void{ done = true; ColorUtil.bwColor(body, 1); body.stop(); } override public function get maxHealth():Number{ return (0); } override protected function getXMLRoot():XML{ return (<Totem/> ); } public function get powered():Boolean{ return (_powered); } public static function getPlacementSprite(_arg1:Boolean=true):MovieClip{ var _local2:MovieClip = new TotemBody(); return (_local2); } private static function draw(_arg1:Sprite):void{ _arg1.graphics.beginFill(0xFFFFFF); _arg1.graphics.lineStyle(1, 0); _arg1.graphics.drawRect(-5, -5, 10, 10); _arg1.graphics.endFill(); } public static function legalLocation(_arg1:int, _arg2:int, _arg3:Place=null):Boolean{ var _local4:Place; var _local5:int; var _local6:int; var _local7:int; if (!legalTerrainLocation(_arg1, _arg2)){ return (false); }; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= GameSpace.WIDTH)))) || ((_arg2 >= GameSpace.HEIGHT)))){ return (false); }; var _local8:int = (GameSpace.instance.places.placesLayer.numChildren - 1); while (_local8 >= 0) { _local4 = (GameSpace.instance.places.placesLayer.getChildAt(_local8) as Place); if ((((_local4 is MovingPlace)) && (!(((_local4 as MovingPlace).state == MovingPlace.STATE_PLACED))))){ } else { if (((!((_arg3 == null))) && ((_arg3 == _local4)))){ } else { _local5 = (_local4.gameSpaceX - _arg1); _local6 = (_local4.gameSpaceY - _arg2); _local7 = ((_local5 * _local5) + (_local6 * _local6)); if (_local7 <= MIN_RANGE_NODE2){ return (false); }; }; }; _local8--; }; return (true); } } }//package com.wbwar.creeper
Section 191
//Units (com.wbwar.creeper.Units) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.filters.*; public final class Units extends Place { private var _powered:Boolean; public var state:int; private var lastHealth:Number;// = 0 private var healthBar:Bar; public function Units(_arg1:int, _arg2:int){ super(_arg1, _arg2); cacheAsBitmap = true; healthBar = new Bar(20, 3, 0xFF00, 0); addChild(healthBar); healthBar.x = -10; healthBar.y = 7; healthBar.setValue(0, 20); healthBar.filters = [new DropShadowFilter(1)]; draw(this); this.filters = [new DropShadowFilter(2)]; if (GameSpace.instance != null){ hookUp(); }; ColorUtil.bwColor(this, 0); addTurnedOffShape(); addSelectedShape(); } override public function get maxHealth():Number{ return (200); } override protected function getXMLRoot():XML{ return (<Units/> ); } override protected function buildComplete():void{ super.buildComplete(); healthBar.visible = false; } public function set powered(_arg1:Boolean):void{ _powered = _arg1; } override public function update():void{ var _local1:Place; super.update(); if (((building) && (!((health == lastHealth))))){ healthBar.setValue(health, maxHealth); }; lastHealth = health; if (building){ calculateDamage(); return; }; if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 == null){ powered = false; } else { powered = true; }; }; calculateDamage(); } public function get powered():Boolean{ return (_powered); } override public function get operateEnergy():Number{ return (0); } private function calculateDamage():void{ var _local1:Number = GameSpace.instance.glop.data[(gameSpaceX + (gameSpaceY * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ destroy(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } public static function getPlacementSprite(_arg1:Boolean=true):Sprite{ var _local2:Sprite; _local2 = new Sprite(); draw(_local2); if (_arg1){ ColorUtil.bwColor(_local2, 0); }; _local2.mouseEnabled = false; return (_local2); } private static function draw(_arg1:Sprite):void{ _arg1.graphics.beginFill(11579536, 0.5); _arg1.graphics.lineStyle(1, 0x303030); _arg1.graphics.drawCircle(0, 0, 14); _arg1.graphics.endFill(); _arg1.graphics.beginFill(16732240); _arg1.graphics.lineStyle(1, 0); _arg1.graphics.drawRect(-5, -5, 10, 10); _arg1.graphics.endFill(); } } }//package com.wbwar.creeper
Section 192
//UpgradeBox (com.wbwar.creeper.UpgradeBox) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import flash.filters.*; import flash.media.*; public final class UpgradeBox extends Place { private var upgradeShape:Shape; private var pulseTimer:int; private var ascaleRate:Number;// = 0.05 private var state:int; private var md:MessageDialog; private static const STATE_REMOVE:int = 2; private static const STATE_APPLYING:int = 1; public static const UPGRADE_APPLIED:String = "UpgradeBox.UPGRADE_APPLIED"; private static const STATE_WAITING:int = 0; public function UpgradeBox(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); upgradeShape = new Shape(); upgradeShape.graphics.beginFill(10119952); upgradeShape.graphics.drawRect(-5, -5, 10, 10); upgradeShape.graphics.endFill(); upgradeShape.graphics.beginFill(0); upgradeShape.graphics.drawRect(-1, -3, 2, 6); upgradeShape.graphics.endFill(); upgradeShape.graphics.beginFill(0); upgradeShape.graphics.drawRect(-3, -1, 6, 2); upgradeShape.graphics.endFill(); upgradeShape.filters = [new GlowFilter(0xFF6000, 1, 8, 8, 3), new DropShadowFilter(2)]; addChild(upgradeShape); GameSpace.instance.places.addPlace(this); } override public function update():void{ var _local1:Place; upgradeShape.rotation = (upgradeShape.rotation - 3); if (state == STATE_WAITING){ if ((updateCount % 30) == 0){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 != null){ applyUpgrade(); }; }; } else { if (state == STATE_APPLYING){ pulseTimer++; upgradeShape.scaleX = (upgradeShape.scaleX + ascaleRate); upgradeShape.scaleY = upgradeShape.scaleX; if ((((upgradeShape.scaleX > 1.5)) || ((upgradeShape.scaleX <= 1)))){ ascaleRate = -(ascaleRate); }; if (pulseTimer > 50){ state = STATE_REMOVE; }; } else { if (state == STATE_REMOVE){ destroy(true); }; }; }; } private function applyUpgrade():void{ state = STATE_APPLYING; GameSpace.instance.points++; var _local1:Sound = new UpgradeAvailableSound(); _local1.play(); dispatchEvent(new Event(UPGRADE_APPLIED, true)); } } }//package com.wbwar.creeper
Section 193
//Walls (com.wbwar.creeper.Walls) package com.wbwar.creeper { import flash.display.*; import flash.geom.*; public final class Walls extends Sprite { private var CELL_WIDTH:int; private var wallRect:Rectangle; private var fullRect:Rectangle; public var wallData:Array; private var CELL_HEIGHT:int; private var HEIGHT:int; private var i:int; private var j:int; private var WIDTH:int; private var p:Point; private var wallsBitmap:Bitmap; private var bmd:BitmapData; private static var wallImage:Class = Walls_wallImage; private static var wallBitmap:Bitmap = (new wallImage() as Bitmap); public static var wallBmd:BitmapData = wallBitmap.bitmapData; public function Walls(){ WIDTH = GameSpace.WIDTH; HEIGHT = GameSpace.HEIGHT; CELL_WIDTH = GameSpace.CELL_WIDTH; CELL_HEIGHT = GameSpace.CELL_HEIGHT; fullRect = new Rectangle(0, 0, (GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT)); bmd = new BitmapData((GameSpace.CELL_WIDTH * GameSpace.WIDTH), (GameSpace.CELL_HEIGHT * GameSpace.HEIGHT), true); wallsBitmap = new Bitmap(bmd); addChild(wallsBitmap); wallRect = new Rectangle(0, 0, CELL_WIDTH, CELL_HEIGHT); p = new Point(); } public function update():void{ } public function setData(_arg1:Array):void{ this.wallData = _arg1; } } }//package com.wbwar.creeper
Section 194
//Walls_wallImage (com.wbwar.creeper.Walls_wallImage) package com.wbwar.creeper { import mx.core.*; public class Walls_wallImage extends BitmapAsset { } }//package com.wbwar.creeper
Section 195
//Weapon (com.wbwar.creeper.Weapon) package com.wbwar.creeper { import com.wbwar.creeper.util.*; public class Weapon extends MovingPlace { protected var damaged:Boolean;// = false protected var damageAmt:Number;// = 0.05 private static const WIDTH:int = GameSpace.WIDTH; private static const HEIGHT:int = GameSpace.HEIGHT; private static const MIN_HEAT:Number = 0.001; public function Weapon(_arg1:int, _arg2:int){ super(_arg1, _arg2); if (GameSpace.instance != null){ this.places = GameSpace.instance.places; }; if (GameSpace.instance != null){ hookUp(); }; } override public function update():void{ var _local1:Place; super.update(); if ((updateCount % 30) == 0){ if (turnedOn){ _local1 = Graph.astar(GameSpace.instance.places, this, GameSpace.instance.baseGun); if (_local1 == null){ requestEnergy = false; } else { requestEnergy = true; }; }; }; if (state == STATE_PLACED){ damaged = calculateDamage(); }; } override public function destroy(_arg1:Boolean=false):void{ super.destroy(); } public function sell():void{ places.removePlace(this); } private function calculateDamage():Boolean{ var _local1:Number; var _local4:int; var _local2:Boolean; var _local3 = -1; while (_local3 <= 1) { _local4 = -1; while (_local4 <= 1) { _local1 = GameSpace.instance.glop.data[((gameSpaceX + _local4) + ((gameSpaceY + _local3) * GameSpace.WIDTH))]; if (_local1 >= Glop.MIN_HEAT){ _local2 = true; health = (health - damageAmt); if (health < 0){ health = 0; destroy(); return (true); }; }; _local4++; }; _local3++; }; if (((!(_local2)) && (!(building)))){ health = (health + 0.01); if (health > maxHealth){ health = maxHealth; }; }; return (_local2); } public static function damageGlop(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Number, _arg6:Number):void{ var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local15:int; var _local11 = -1; var _local12 = -1; var _local13:int = int.MAX_VALUE; var _local14:int = (_arg4 * _arg4); var _local16:Number = GameSpace.instance.terrain.terrainHeight[(_arg1 + (_arg2 * GameSpace.WIDTH))]; var _local17:Array = GameSpace.instance.places.gameSpace.glop.data; _local7 = 0; while (_local7 < _arg4) { _local8 = (_arg1 - _local7); while (_local8 <= (_arg1 + _local7)) { if ((((_local8 >= 0)) && ((_local8 < WIDTH)))){ _local9 = (_arg2 - _local7); _local10 = (((_local8 - _arg1) * (_local8 - _arg1)) + ((_local9 - _arg2) * (_local9 - _arg2))); if (_local10 < _local14){ if ((((_local9 >= 0)) && ((_local9 < HEIGHT)))){ if (GameSpace.instance.terrain.terrainHeight[(_local8 + (_local9 * GameSpace.WIDTH))] <= _local16){ if (_local17[(_local8 + (_local9 * WIDTH))] >= MIN_HEAT){ GameSpace.instance.glop.addGlop(_local8, _local9, _arg5); GameSpace.instance.mistLayer.addMistRandom(_local8, _local9, _arg6); _local15++; if (_local15 >= _arg3){ return; }; }; }; }; _local9 = (_arg2 + _local7); if ((((_local9 >= 0)) && ((_local9 < HEIGHT)))){ if (GameSpace.instance.terrain.terrainHeight[(_local8 + (_local9 * GameSpace.WIDTH))] <= _local16){ if (_local17[(_local8 + (_local9 * WIDTH))] >= MIN_HEAT){ GameSpace.instance.glop.addGlop(_local8, _local9, _arg5); GameSpace.instance.mistLayer.addMistRandom(_local8, _local9, _arg6); _local15++; if (_local15 >= _arg3){ return; }; }; }; }; }; }; _local8++; }; _local9 = ((_arg2 - _local7) + 1); while (_local9 <= ((_arg2 + _local7) - 1)) { if ((((_local9 >= 0)) && ((_local9 < HEIGHT)))){ _local8 = (_arg1 - _local7); _local10 = (((_local8 - _arg1) * (_local8 - _arg1)) + ((_local9 - _arg2) * (_local9 - _arg2))); if (_local10 < _local14){ if ((((_local8 >= 0)) && ((_local8 < WIDTH)))){ if (GameSpace.instance.terrain.terrainHeight[(_local8 + (_local9 * GameSpace.WIDTH))] <= _local16){ if (_local17[(_local8 + (_local9 * WIDTH))] >= MIN_HEAT){ GameSpace.instance.glop.addGlop(_local8, _local9, _arg5); GameSpace.instance.mistLayer.addMistRandom(_local8, _local9, _arg6); _local15++; if (_local15 >= _arg3){ return; }; }; }; }; if (_local11 == -1){ _local8 = (_arg1 + _local7); if ((((_local8 >= 0)) && ((_local8 < WIDTH)))){ if (GameSpace.instance.terrain.terrainHeight[(_local8 + (_local9 * GameSpace.WIDTH))] <= _local16){ if ((((_local17[(_local8 + (_local9 * WIDTH))] >= MIN_HEAT)) && ((_local10 < _local13)))){ GameSpace.instance.glop.addGlop(_local8, _local9, _arg5); GameSpace.instance.mistLayer.addMistRandom(_local8, _local9, _arg6); _local15++; if (_local15 >= _arg3){ return; }; }; }; }; }; }; }; _local9++; }; _local7++; }; } } }//package com.wbwar.creeper
Section 196
//WeaponDistIndicator (com.wbwar.creeper.WeaponDistIndicator) package com.wbwar.creeper { import flash.display.*; import com.wbwar.creeper.util.*; import flash.geom.*; public final class WeaponDistIndicator extends Sprite { private var color:Number; private var distCircles:Array; private var zeroPoint:Point; private var bmd:BitmapData; private var bm:Bitmap; public function WeaponDistIndicator(_arg1:Number=1627389951){ var _local3:*; var _local4:int; var _local5:BitmapData; distCircles = []; zeroPoint = new Point(0, 0); super(); mouseEnabled = false; mouseChildren = false; this.color = _arg1; bmd = new BitmapData(250, 250, true, 0); bm = new Bitmap(bmd); addChild(bm); var _local2:* = 1; while (_local2 < 20) { _local3 = new Shape(); _local3.graphics.lineStyle(2, 0, 0.3); _local3.graphics.drawCircle((_local2 * GameSpace.CELL_WIDTH), (_local2 * GameSpace.CELL_WIDTH), (_local2 * GameSpace.CELL_WIDTH)); _local4 = ((_local2 * GameSpace.CELL_WIDTH) * 2); _local5 = new BitmapData(_local4, _local4, true, 0); _local5.draw(_local3); distCircles[_local2] = _local5; _local2++; }; } public function refresh(_arg1:String, _arg2:int, _arg3:int, _arg4:int):void{ var _local9:int; var _local10:int; var _local5:Boolean; var _local6:Boolean; if ((((((_arg1 == "com.wbwar.creeper::AreaGun")) || ((_arg1 == "com.wbwar.creeper::ABM")))) || ((_arg1 == "com.wbwar.creeper::ThorsHammer")))){ _local5 = false; }; if (_arg1 == "com.wbwar.creeper::Node"){ _local6 = true; }; var _local7:BitmapData = distCircles[_arg2]; bmd.lock(); bmd.fillRect(new Rectangle(0, 0, bmd.width, bmd.height), 0); var _local8:int = (_arg4 - _arg2); while (_local8 < (_arg4 + _arg2)) { _local9 = (_arg3 - _arg2); while (_local9 < (_arg3 + _arg2)) { if ((((((((_local9 >= 0)) && ((_local8 >= 0)))) && ((_local9 < GameSpace.WIDTH)))) && ((_local8 < GameSpace.HEIGHT)))){ _local10 = (((_arg3 - _local9) * (_arg3 - _local9)) + ((_arg4 - _local8) * (_arg4 - _local8))); if (_local10 < (_arg2 * _arg2)){ if (((!(_local5)) || (LOS.hasLOS(_arg3, _arg4, _local9, _local8, false, _local6)))){ bmd.fillRect(new Rectangle(((((_local9 - _arg3) + _arg2) * GameSpace.CELL_WIDTH) - (GameSpace.CELL_WIDTH / 2)), ((((_local8 - _arg4) + _arg2) * GameSpace.CELL_HEIGHT) - (GameSpace.CELL_HEIGHT / 2)), GameSpace.CELL_WIDTH, GameSpace.CELL_HEIGHT), color); } else { bmd.fillRect(new Rectangle(((((_local9 - _arg3) + _arg2) * GameSpace.CELL_WIDTH) - (GameSpace.CELL_WIDTH / 2)), ((((_local8 - _arg4) + _arg2) * GameSpace.CELL_HEIGHT) - (GameSpace.CELL_HEIGHT / 2)), GameSpace.CELL_WIDTH, GameSpace.CELL_HEIGHT), 1627324416); }; }; }; _local9++; }; _local8++; }; if (_local7 != null){ bmd.copyPixels(_local7, _local7.rect, zeroPoint, null, null, true); }; bmd.unlock(); bm.x = (-(_arg2) * GameSpace.CELL_WIDTH); bm.y = (-(_arg2) * GameSpace.CELL_WIDTH); } } }//package com.wbwar.creeper
Section 197
//AdLoader (CPMStar.AdLoader) package CPMStar { import flash.display.*; import flash.events.*; import flash.net.*; import flash.system.*; public class AdLoader extends Sprite { private var cpmstarLoader:Loader; private var contentspotid:String; public function AdLoader(_arg1:String){ this.contentspotid = _arg1; addEventListener(Event.ADDED, addedHandler); } private function dispatchHandler(_arg1:Event):void{ dispatchEvent(_arg1); } private function addedHandler(_arg1:Event):void{ removeEventListener(Event.ADDED, addedHandler); Security.allowDomain("server.cpmstar.com"); var _local2 = "http://server.cpmstar.com/adviewas3.swf"; var _local3:DisplayObjectContainer = parent; cpmstarLoader = new Loader(); cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler); cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler); cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid))); addChild(cpmstarLoader); } } }//package CPMStar
Section 198
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.2.0.3958"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 199
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; } }//package mx.core
Section 200
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.2.0.3958"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 201
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; } }//package mx.core
Section 202
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 203
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 204
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 205
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 206
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.2.0.3958"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = _arg1; try { o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; } catch(e:SecurityError) { }; return (result); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 207
//ABMBody (ABMBody) package { import flash.display.*; public dynamic class ABMBody extends MovieClip { } }//package
Section 208
//ABMMissileBody (ABMMissileBody) package { import flash.display.*; public dynamic class ABMMissileBody extends MovieClip { } }//package
Section 209
//AirAttackSound (AirAttackSound) package { import flash.media.*; public dynamic class AirAttackSound extends Sound { } }//package
Section 210
//AreaGunBody (AreaGunBody) package { import flash.display.*; public dynamic class AreaGunBody extends MovieClip { } }//package
Section 211
//AreaGunExplosionSound (AreaGunExplosionSound) package { import flash.media.*; public dynamic class AreaGunExplosionSound extends Sound { } }//package
Section 212
//AreaGunSound (AreaGunSound) package { import flash.media.*; public dynamic class AreaGunSound extends Sound { } }//package
Section 213
//BaseGunBody (BaseGunBody) package { import flash.display.*; public dynamic class BaseGunBody extends MovieClip { } }//package
Section 214
//BlobExplosionSound (BlobExplosionSound) package { import flash.media.*; public dynamic class BlobExplosionSound extends Sound { } }//package
Section 215
//CityDamageSound (CityDamageSound) package { import flash.media.*; public dynamic class CityDamageSound extends Sound { } }//package
Section 216
//CityExplosionSound (CityExplosionSound) package { import flash.media.*; public dynamic class CityExplosionSound extends Sound { } }//package
Section 217
//CityInRiftSound (CityInRiftSound) package { import flash.media.*; public dynamic class CityInRiftSound extends Sound { } }//package
Section 218
//ClickSound (ClickSound) package { import flash.media.*; public dynamic class ClickSound extends Sound { } }//package
Section 219
//CPMStarPreloader (CPMStarPreloader) package { import flash.display.*; import flash.filters.*; import caurina.transitions.properties.*; import flash.events.*; import com.wbwar.creeper.util.*; import flash.text.*; import flash.utils.*; import com.wbwar.creeper.screens.*; import CPMStar.*; import _-6.*; public class CPMStarPreloader extends MovieClip { private var progressBar:Shape; private var startTime:int; private var playButton:Button; private var cpmstarcontainer:Sprite; private var cpmstar:DisplayObject; private var allowLoad:Boolean; private static const PB_WIDTH:int = 300; private static const PB_HEIGHT:int = 4; public static var titleImage:Class = CPMStarPreloader_titleImage; private static var efont:String = "CPMStarPreloader_efont"; public function CPMStarPreloader(){ if (!_-3._-7(this)){ return; }; var _local5:TextField; super(); stop(); this.stage.scaleMode = StageScaleMode.EXACT_FIT; var _local1:Bitmap = (new titleImage() as Bitmap); addChild(_local1); var _local2:TextFormat = new TextFormat(); _local2.color = 0; _local2.size = 30; _local2.bold = true; FilterShortcuts.init(); var _local3:Logo = new Logo(); addChild(_local3); _local3.x = 300; _local3.y = (525 - _local3.height); var _local4:TextField = Text.text("Creeper World", 64, 5271807); _local4.x = (350 - int((_local4.width / 2))); _local4.y = 3; addChild(_local4); _local4.filters = [new DropShadowFilter(), new GlowFilter(3166336, 1, 32, 32, 3, BitmapFilterQuality.MEDIUM)]; _local5 = Text.text("Training Simulator", 28, 12632224); _local5.filters = [new DropShadowFilter(4, 45, 96)]; _local5.x = (350 - int((_local5.width / 2))); _local5.y = 75; addChild(_local5); playButton = new Button("PLAY!", 24, 200, 45, 0, 5, true, 0x8000, -1); playButton.filters = [new GlowFilter(3178560, 1, 32, 32, 2, BitmapFilterQuality.MEDIUM)]; addChild(playButton); playButton.x = 250; playButton.y = 420; playButton.visible = false; cpmstarcontainer = new Sprite(); cpmstarcontainer.graphics.beginFill(0x7F7F7F); cpmstarcontainer.graphics.drawRect(0, 0, 300, 250); cpmstarcontainer.graphics.endFill(); addChild(cpmstarcontainer); cpmstarcontainer.x = (350 - 150); cpmstarcontainer.y = 140; cpmstar = new AdLoader("1159QE6A831CC"); cpmstarcontainer.addChild(cpmstar); progressBar = new Shape(); addChild(progressBar); progressBar.x = cpmstarcontainer.x; progressBar.y = ((cpmstarcontainer.y + 250) + 5); startTime = getTimer(); var _local6:Timer = new Timer(250, 1); _local6.addEventListener("timer", timerHandler); _local6.start(); } private function onPlay(_arg1:Event):void{ playButton.removeEventListener(MouseEvent.CLICK, onPlay); removeChild(cpmstarcontainer); this.nextFrame(); init(); } private function setProgressBar(_arg1:Number):void{ progressBar.graphics.clear(); progressBar.graphics.beginFill(0xA09000); progressBar.graphics.drawRect(0, 0, (_arg1 * PB_WIDTH), PB_HEIGHT); progressBar.graphics.endFill(); } private function init():void{ var _local2:Object; var _local1:Class = Class(getDefinitionByName("Creeper")); if (_local1){ _local2 = new (_local1); addChild((_local2 as DisplayObject)); _local2.init(); }; } public function timerHandler(_arg1:TimerEvent):void{ var _local4:Timer; var _local2:Number = ((getTimer() - startTime) / 10000); if (_local2 > 1){ _local2 = 1; }; var _local3:Number = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal); setProgressBar(Math.min(_local2, _local3)); if ((((_local2 >= 1)) && ((_local3 >= 1)))){ playButton.visible = true; playButton.addEventListener(MouseEvent.CLICK, onPlay); allowLoad = true; } else { _local4 = new Timer(250, 1); _local4.addEventListener("timer", timerHandler); _local4.start(); }; } } }//package
Section 220
//CPMStarPreloader_efont (CPMStarPreloader_efont) package { import mx.core.*; public class CPMStarPreloader_efont extends FontAsset { } }//package
Section 221
//CPMStarPreloader_titleImage (CPMStarPreloader_titleImage) package { import mx.core.*; public class CPMStarPreloader_titleImage extends BitmapAsset { } }//package
Section 222
//Creeper (Creeper) package { import flash.display.*; import com.wbwar.creeper.util.*; import flash.events.*; import com.wbwar.creeper.screens.*; import caurina.transitions.properties.*; public class Creeper extends Sprite { public var gameScreen:GameScreen; public static const DEMO:Boolean = false; public static var loadGameDataFunction:Function; public static var optimalWindowSizeFunction:Function; public static var airMode:Boolean; public static var doubleDownMode:Boolean; public static var exitGameFunction:Function; public static var saveGameDataFunction:Function; private static var efontsmall:String = "Creeper_efontsmall"; private static var efont:String = "Creeper_efont"; public static var instance:Creeper; public static var version:String = "0284"; public static var saveScreenshotFunction:Function; public function Creeper(){ tabEnabled = false; tabChildren = false; instance = this; FilterShortcuts.init(); SoundShortcuts.init(); DisplayShortcuts.init(); } public function init():void{ onAddedToStage(null); } private function onAddedToStage(_arg1:Event):void{ var _local2:String = this.root.loaderInfo.url; var _local3:Array = _local2.split("://"); var _local4:Array = (_local3[1] as String).split("/"); var _local5:String = _local4[0]; var _local6:int = this.root.loaderInfo.url.indexOf(RC4.decrypt("10de949754c17fedc8997488b3b704c922", "spaceestate11")); var _local7:int = _local5.indexOf(RC4.decrypt("419f8591498259fcdf9d6786a4924fc86266", "spaceestate11")); var _local8:int = _local5.indexOf(RC4.decrypt("4c9d91814a895df2c8906d8ea48e12ce23689c93", "spaceestate11")); startGame(); } public function startGame():void{ MochiBot.track(this, "30e03e5f"); var _local1:SplashScreen = new SplashScreen(); addChild(_local1); _local1.show(); } public function startActualGame():void{ gameScreen = new GameScreen(); addChild(gameScreen); var _local1:Shape = new Shape(); _local1.graphics.beginFill(0); _local1.graphics.drawRect(0, 0, 300, 1125); _local1.graphics.endFill(); addChild(_local1); _local1.x = -300; _local1.y = -300; var _local2:Shape = new Shape(); _local2.graphics.beginFill(0); _local2.graphics.drawRect(0, 0, 300, 1125); _local2.graphics.endFill(); addChild(_local2); _local2.x = 700; _local2.y = -300; var _local3:Shape = new Shape(); _local3.graphics.beginFill(0); _local3.graphics.drawRect(0, 0, 700, 300); _local3.graphics.endFill(); addChild(_local3); _local3.y = -300; var _local4:Shape = new Shape(); _local4.graphics.beginFill(0); _local4.graphics.drawRect(0, 0, 700, 300); _local4.graphics.endFill(); addChild(_local4); _local4.y = 525; } public function mochiBotVisitKC():void{ MochiBot.track(this, "e00dd08c"); } } }//package
Section 223
//Creeper_efont (Creeper_efont) package { import mx.core.*; public class Creeper_efont extends FontAsset { } }//package
Section 224
//Creeper_efontsmall (Creeper_efontsmall) package { import mx.core.*; public class Creeper_efontsmall extends FontAsset { } }//package
Section 225
//DroneBaseBody (DroneBaseBody) package { import flash.display.*; public dynamic class DroneBaseBody extends MovieClip { } }//package
Section 226
//DroneBody (DroneBody) package { import flash.display.*; public dynamic class DroneBody extends MovieClip { } }//package
Section 227
//DroneSound (DroneSound) package { import flash.media.*; public dynamic class DroneSound extends Sound { } }//package
Section 228
//FlyingGlop (FlyingGlop) package { import flash.display.*; public dynamic class FlyingGlop extends MovieClip { } }//package
Section 229
//GunBody (GunBody) package { import flash.display.*; public dynamic class GunBody extends MovieClip { } }//package
Section 230
//GunSound (GunSound) package { import flash.media.*; public dynamic class GunSound extends Sound { } }//package
Section 231
//HoleOpenSound (HoleOpenSound) package { import flash.media.*; public dynamic class HoleOpenSound extends Sound { } }//package
Section 232
//LandSound (LandSound) package { import flash.media.*; public dynamic class LandSound extends Sound { } }//package
Section 233
//LogoCrackSound (LogoCrackSound) package { import flash.media.*; public dynamic class LogoCrackSound extends Sound { } }//package
Section 234
//LogoLeftKnuckle (LogoLeftKnuckle) package { import flash.display.*; public dynamic class LogoLeftKnuckle extends MovieClip { } }//package
Section 235
//LogoRightKnuckle (LogoRightKnuckle) package { import flash.display.*; public dynamic class LogoRightKnuckle extends MovieClip { } }//package
Section 236
//MissileLaunchSound (MissileLaunchSound) package { import flash.media.*; public dynamic class MissileLaunchSound extends Sound { } }//package
Section 237
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4 = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 238
//MoveSound (MoveSound) package { import flash.media.*; public dynamic class MoveSound extends Sound { } }//package
Section 239
//MusicAfricanAfternoon (MusicAfricanAfternoon) package { import flash.media.*; public dynamic class MusicAfricanAfternoon extends Sound { } }//package
Section 240
//MusicOgzTheme (MusicOgzTheme) package { import flash.media.*; public dynamic class MusicOgzTheme extends Sound { } }//package
Section 241
//MusicOperaHouse (MusicOperaHouse) package { import flash.media.*; public dynamic class MusicOperaHouse extends Sound { } }//package
Section 242
//MusicSwampMists (MusicSwampMists) package { import flash.media.*; public dynamic class MusicSwampMists extends Sound { } }//package
Section 243
//MusicTakeFlight (MusicTakeFlight) package { import flash.media.*; public dynamic class MusicTakeFlight extends Sound { } }//package
Section 244
//NexusDestroyedSound (NexusDestroyedSound) package { import flash.media.*; public dynamic class NexusDestroyedSound extends Sound { } }//package
Section 245
//NodeOffSound (NodeOffSound) package { import flash.media.*; public dynamic class NodeOffSound extends Sound { } }//package
Section 246
//NodeOnSound (NodeOnSound) package { import flash.media.*; public dynamic class NodeOnSound extends Sound { } }//package
Section 247
//PlaceExplosionSound (PlaceExplosionSound) package { import flash.media.*; public dynamic class PlaceExplosionSound extends Sound { } }//package
Section 248
//RiftOpenPopSound (RiftOpenPopSound) package { import flash.media.*; public dynamic class RiftOpenPopSound extends Sound { } }//package
Section 249
//RiftOpenSound (RiftOpenSound) package { import flash.media.*; public dynamic class RiftOpenSound extends Sound { } }//package
Section 250
//RuinBody (RuinBody) package { import flash.display.*; public dynamic class RuinBody extends MovieClip { } }//package
Section 251
//StarBlue (StarBlue) package { import flash.display.*; public dynamic class StarBlue extends MovieClip { } }//package
Section 252
//StarGold (StarGold) package { import flash.display.*; public dynamic class StarGold extends MovieClip { } }//package
Section 253
//StarGreen (StarGreen) package { import flash.display.*; public dynamic class StarGreen extends MovieClip { } }//package
Section 254
//StarRed (StarRed) package { import flash.display.*; public dynamic class StarRed extends MovieClip { } }//package
Section 255
//SurvivalPodBody (SurvivalPodBody) package { import flash.display.*; public dynamic class SurvivalPodBody extends MovieClip { } }//package
Section 256
//TotemActivateSound (TotemActivateSound) package { import flash.media.*; public dynamic class TotemActivateSound extends Sound { } }//package
Section 257
//TotemBody (TotemBody) package { import flash.display.*; public dynamic class TotemBody extends MovieClip { } }//package
Section 258
//UpgradeAvailableSound (UpgradeAvailableSound) package { import flash.media.*; public dynamic class UpgradeAvailableSound extends Sound { } }//package

Library Items

Symbol 1 Sound {ClickSound} [ClickSound]
Symbol 2 GraphicUsed by:5
Symbol 3 FontUsed by:4 7
Symbol 4 TextUses:3Used by:5
Symbol 5 MovieClip {LogoLeftKnuckle} [LogoLeftKnuckle]Uses:2 4
Symbol 6 GraphicUsed by:8
Symbol 7 TextUses:3Used by:8
Symbol 8 MovieClip {LogoRightKnuckle} [LogoRightKnuckle]Uses:6 7
Symbol 9 Bitmap {com.wbwar.creeper.screens.MainMenu_titleImage}
Symbol 10 Font {Creeper_efont}
Symbol 76 Bitmap {com.wbwar.creeper.screens.Credits_ssImage3}
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClip {ABMMissileBody} [ABMMissileBody]Uses:36
Symbol 60 GraphicUsed by:63
Symbol 61 FontUsed by:62
Symbol 62 TextUses:61Used by:63
Symbol 63 MovieClip {DroneBaseBody} [DroneBaseBody]Uses:60 62
Symbol 77 Bitmap {com.wbwar.creeper.screens.Credits_ssImage1}
Symbol 78 Bitmap {com.wbwar.creeper.screens.Credits_ssImage12}
Symbol 80 Bitmap {com.wbwar.creeper.Terrain_terrain1Image}
Symbol 79 Bitmap {com.wbwar.creeper.screens.Credits_ssImage8}
Symbol 23 Sound {HoleOpenSound} [HoleOpenSound]
Symbol 81 Bitmap {com.wbwar.creeper.screens.Credits_ssImage14}
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClip {StarGreen} [StarGreen]Uses:41
Symbol 82 Bitmap {com.wbwar.creeper.screens.Credits_ssImage5}
Symbol 65 Sound {AreaGunExplosionSound} [AreaGunExplosionSound]
Symbol 20 Sound {MoveSound} [MoveSound]
Symbol 13 Sound {MusicSwampMists} [MusicSwampMists]
Symbol 52 ShapeTweeningUsed by:55
Symbol 53 ShapeTweeningUsed by:55
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClip {FlyingGlop} [FlyingGlop]Uses:52 53 54
Symbol 83 Bitmap {com.wbwar.creeper.dialogs.help.BasicPage_basic4Image}
Symbol 84 BinaryData {com.wbwar.creeper.games.TrainingGame2_gameData}
Symbol 85 Bitmap {com.wbwar.creeper.screens.Credits_ssImage6}
Symbol 86 Bitmap {com.wbwar.creeper.Terrain_terrain0Image}
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClip {GunBody} [GunBody]Uses:38
Symbol 26 Sound {RiftOpenSound} [RiftOpenSound]
Symbol 89 Bitmap {com.wbwar.creeper.screens.TrainingMissionSelection_backgroundImage}
Symbol 88 Bitmap {com.wbwar.creeper.screens.Credits_ssImage16}
Symbol 87 BinaryData {com.wbwar.creeper.games.TrainingGame99_gameData}
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClip {ABMBody} [ABMBody]Uses:34
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {AreaGunBody} [AreaGunBody]Uses:21
Symbol 90 Bitmap {com.wbwar.creeper.screens.Credits_ssImage7}
Symbol 91 Bitmap {com.wbwar.creeper.screens.Credits_ssImage10}
Symbol 92 Bitmap {com.wbwar.creeper.dialogs.help.BasicPage_basic3Image}
Symbol 93 Bitmap {com.wbwar.creeper.screens.Credits_ssImage13}
Symbol 33 Sound {UpgradeAvailableSound} [UpgradeAvailableSound]
Symbol 12 Sound {MusicTakeFlight} [MusicTakeFlight]
Symbol 28 GraphicUsed by:31
Symbol 29 GraphicUsed by:31
Symbol 30 GraphicUsed by:31
Symbol 31 MovieClip {BaseGunBody} [BaseGunBody]Uses:28 29 30
Symbol 95 BinaryData {com.wbwar.creeper.games.TrainingGame1_gameData}
Symbol 94 BinaryData {com.wbwar.creeper.games.TrainingGame4_gameData}
Symbol 67 Sound {NexusDestroyedSound} [NexusDestroyedSound]
Symbol 18 Sound {LandSound} [LandSound]
Symbol 50 Sound {NodeOffSound} [NodeOffSound]
Symbol 96 Bitmap {com.wbwar.creeper.screens.Credits_ssImage2}
Symbol 14 Sound {MusicAfricanAfternoon} [MusicAfricanAfternoon]
Symbol 97 Bitmap {com.wbwar.creeper.dialogs.help.AdvPage_adv1Image}
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClip {RuinBody} [RuinBody]Uses:68
Symbol 51 Sound {BlobExplosionSound} [BlobExplosionSound]
Symbol 98 BinaryData {com.wbwar.creeper.games.TrainingGame0_gameData}
Symbol 27 Sound {CityDamageSound} [CityDamageSound]
Symbol 100 Font {Creeper_efontsmall}
Symbol 99 Bitmap {com.wbwar.creeper.dialogs.help.AdvPage_adv3Image}
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClip {StarRed} [StarRed]Uses:43
Symbol 24 Sound {TotemActivateSound} [TotemActivateSound]
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClip {StarGold} [StarGold]Uses:45
Symbol 101 BinaryData {com.wbwar.creeper.games.TrainingGame3_gameData}
Symbol 64 Sound {DroneSound} [DroneSound]
Symbol 102 Bitmap {com.wbwar.creeper.dialogs.help.AdvPage_adv4Image}
Symbol 73 Sound {MusicOperaHouse} [MusicOperaHouse]
Symbol 15 Sound {LogoCrackSound} [LogoCrackSound]
Symbol 103 Bitmap {com.wbwar.creeper.dialogs.help.BasicPage_basic1Image}
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClip {StarBlue} [StarBlue]Uses:47
Symbol 105 Bitmap {com.wbwar.creeper.screens.Credits_ssImage15}
Symbol 104 Bitmap {com.wbwar.creeper.games.Prelude_backgroundImage}
Symbol 106 Bitmap {com.wbwar.creeper.dialogs.help.AdvPage_adv2Image}
Symbol 17 Sound {PlaceExplosionSound} [PlaceExplosionSound]
Symbol 107 Bitmap {com.wbwar.creeper.screens.AchievementsScreen_backgroundImage}
Symbol 32 Sound {CityExplosionSound} [CityExplosionSound]
Symbol 25 Sound {RiftOpenPopSound} [RiftOpenPopSound]
Symbol 108 Bitmap {com.wbwar.creeper.dialogs.help.BasicPage_basic2Image}
Symbol 56 GraphicUsed by:59
Symbol 57 GraphicUsed by:59
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip {TotemBody} [TotemBody]Uses:56 57 58
Symbol 109 Bitmap {com.wbwar.creeper.screens.BBLogo_bbImage}
Symbol 70 Sound {MissileLaunchSound} [MissileLaunchSound]
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClip {DroneBody} [DroneBody]Uses:71
Symbol 110 Bitmap {com.wbwar.creeper.screens.Credits_ssImage4}
Symbol 11 Sound {MusicOgzTheme} [MusicOgzTheme]
Symbol 49 Sound {NodeOnSound} [NodeOnSound]
Symbol 111 Bitmap {com.wbwar.creeper.Walls_wallImage}
Symbol 16 Sound {AirAttackSound} [AirAttackSound]
Symbol 112 Bitmap {com.wbwar.creeper.Terrain_terrain4Image}
Symbol 40 Sound {GunSound} [GunSound]
Symbol 66 Sound {AreaGunSound} [AreaGunSound]
Symbol 19 Sound {CityInRiftSound} [CityInRiftSound]
Symbol 113 Bitmap {com.wbwar.creeper.screens.Credits_ssImage9}
Symbol 114 Bitmap {com.wbwar.creeper.dialogs.help.BasicPage_basic5Image}
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClip {SurvivalPodBody} [SurvivalPodBody]Uses:74
Symbol 115 Bitmap {com.wbwar.creeper.Terrain_terrain5Image}
Symbol 116 Bitmap {com.wbwar.creeper.Terrain_terrain3Image}
Symbol 118 Bitmap {com.wbwar.creeper.Terrain_terrain2Image}
Symbol 117 Bitmap {com.wbwar.creeper.screens.Credits_ssImage11}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 1 as "ClickSound"
ExportAssets (56)Timeline Frame 1Symbol 5 as "LogoLeftKnuckle"
ExportAssets (56)Timeline Frame 1Symbol 8 as "LogoRightKnuckle"
ExportAssets (56)Timeline Frame 2Symbol 11 as "MusicOgzTheme"
ExportAssets (56)Timeline Frame 2Symbol 12 as "MusicTakeFlight"
ExportAssets (56)Timeline Frame 2Symbol 13 as "MusicSwampMists"
ExportAssets (56)Timeline Frame 2Symbol 14 as "MusicAfricanAfternoon"
ExportAssets (56)Timeline Frame 2Symbol 15 as "LogoCrackSound"
ExportAssets (56)Timeline Frame 2Symbol 16 as "AirAttackSound"
ExportAssets (56)Timeline Frame 2Symbol 17 as "PlaceExplosionSound"
ExportAssets (56)Timeline Frame 2Symbol 18 as "LandSound"
ExportAssets (56)Timeline Frame 2Symbol 19 as "CityInRiftSound"
ExportAssets (56)Timeline Frame 2Symbol 20 as "MoveSound"
ExportAssets (56)Timeline Frame 2Symbol 22 as "AreaGunBody"
ExportAssets (56)Timeline Frame 2Symbol 23 as "HoleOpenSound"
ExportAssets (56)Timeline Frame 2Symbol 24 as "TotemActivateSound"
ExportAssets (56)Timeline Frame 2Symbol 25 as "RiftOpenPopSound"
ExportAssets (56)Timeline Frame 2Symbol 26 as "RiftOpenSound"
ExportAssets (56)Timeline Frame 2Symbol 27 as "CityDamageSound"
ExportAssets (56)Timeline Frame 2Symbol 31 as "BaseGunBody"
ExportAssets (56)Timeline Frame 2Symbol 32 as "CityExplosionSound"
ExportAssets (56)Timeline Frame 2Symbol 33 as "UpgradeAvailableSound"
ExportAssets (56)Timeline Frame 2Symbol 35 as "ABMBody"
ExportAssets (56)Timeline Frame 2Symbol 37 as "ABMMissileBody"
ExportAssets (56)Timeline Frame 2Symbol 39 as "GunBody"
ExportAssets (56)Timeline Frame 2Symbol 40 as "GunSound"
ExportAssets (56)Timeline Frame 2Symbol 42 as "StarGreen"
ExportAssets (56)Timeline Frame 2Symbol 44 as "StarRed"
ExportAssets (56)Timeline Frame 2Symbol 46 as "StarGold"
ExportAssets (56)Timeline Frame 2Symbol 48 as "StarBlue"
ExportAssets (56)Timeline Frame 2Symbol 49 as "NodeOnSound"
ExportAssets (56)Timeline Frame 2Symbol 50 as "NodeOffSound"
ExportAssets (56)Timeline Frame 2Symbol 51 as "BlobExplosionSound"
ExportAssets (56)Timeline Frame 2Symbol 55 as "FlyingGlop"
ExportAssets (56)Timeline Frame 2Symbol 59 as "TotemBody"
ExportAssets (56)Timeline Frame 2Symbol 63 as "DroneBaseBody"
ExportAssets (56)Timeline Frame 2Symbol 64 as "DroneSound"
ExportAssets (56)Timeline Frame 2Symbol 65 as "AreaGunExplosionSound"
ExportAssets (56)Timeline Frame 2Symbol 66 as "AreaGunSound"
ExportAssets (56)Timeline Frame 2Symbol 67 as "NexusDestroyedSound"
ExportAssets (56)Timeline Frame 2Symbol 69 as "RuinBody"
ExportAssets (56)Timeline Frame 2Symbol 70 as "MissileLaunchSound"
ExportAssets (56)Timeline Frame 2Symbol 72 as "DroneBody"
ExportAssets (56)Timeline Frame 2Symbol 73 as "MusicOperaHouse"
ExportAssets (56)Timeline Frame 2Symbol 75 as "SurvivalPodBody"
Tag 0x0FF (255)Timeline Frame 11 bytes "."
SerialNumber (41)Timeline Frame 1

Labels

"CPMStarPreloader"Frame 1
"Creeper"Frame 2




http://swfchan.com/19/94306/info.shtml
Created: 26/3 -2019 07:25:53 Last modified: 26/3 -2019 07:25:53 Server time: 22/12 -2024 05:32:56