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

Juggerdome - piloting a JUGGERNAUT and win battles.swf

This is the info page for
Flash #89126

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


ActionScript [AS1/AS2]
Combined Code
movieClip 2 { } movieClip 3 mouseCursorSecondary { } movieClip 5 blankBlock { } movieClip 8 { } movieClip 11 { frame 1 { stop(); } } movieClip 13 { } movieClip 15 { } movieClip 17 { } movieClip 18 { } movieClip 21 { } movieClip 23 { } movieClip 25 { } movieClip 27 { } movieClip 34 { } movieClip 35 { frame 1 { stop(); } instance of movieClip 5 blankBlock { onClipEvent (load) { this._visible = false; } } instance of movieClip 34 { onClipEvent (load) { this.onEnterFrame = function () { _root.damageSmokeParticle(this._parent._parent._parent._x, this._parent._parent._parent._y); }; } } instance of movieClip 34 { onClipEvent (load) { this.onEnterFrame = function () { _root.heavyDamageSmokeParticle(this._parent._parent._parent._x, this._parent._parent._parent._y); }; } } } movieClip 37 { } movieClip 38 { } movieClip 41 { } movieClip 43 { } movieClip 46 { } movieClip 49 { } movieClip 62 { } movieClip 63 { instance of movieClip 62 { onClipEvent (load) { this.gotoAndStop(random(10) + 1); } } } movieClip 70 { } movieClip 105 { } movieClip 106 effect_burn { frame 25 { stop(); removeMovieClip(this); } } movieClip 110 { } movieClip 111 { frame 1 { stop(); } instance legs of movieClip 18 { onClipEvent (enterFrame) { if (this._parent._parent.dirX == 'none' && this._parent._parent.dirY == 'none') { this.stop(); } else { this.play(); } } } frame 63 { if (this._parent.empShutdown == true) { gotoAndPlay('prisoner_shocked'); } else { gotoAndStop('prisoner'); } } frame 66 { stop(); } frame 71 { stop(); } frame 75 { stop(); } frame 98 { stop(); } frame 112 { stop(); } frame 113 { stop(); } frame 129 { _root.showHitEffect(this._parent, 'deathExplosion'); } instance of movieClip 110 { onClipEvent (load) { this._rotation = random(360); } } frame 132 { _root.showHitEffect(this._parent, 'deathExplosion'); } frame 143 { _root.showHitEffect(this._parent, 'deathExplosion'); } frame 144 { stop(); } } movieClip 113 { } movieClip 114 mech { } movieClip 117 fpsChecker { } movieClip 119 adBox { } // unknown tag 88 length 62 movieClip 125 { } movieClip 126 adMessage { } frame 1 { Stage.showMenu = false; _global.$createTweenController = function () { var v3 = _root.createEmptyMovieClip('__tweenController__', 123432); v3.$_tweenPropList = new Array(); v3.$_tTime = getTimer(); v3.onEnterFrame = _global.$updateTweens; }; ASSetPropFlags(_global, '$createTweenController', 1, 0); _global.$removeTweenController = function () { delete _root.__tweenController__.$_tweenPropList; delete _root.__tweenController__.$_tTime; delete _root.__tweenController__.onEnterFrame; _root.__tweenController__.removeMovieClip(); }; ASSetPropFlags(_global, '$removeTweenController', 1, 0); _global.$addTween = function (mtarget, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2, extras) { if (timeSeconds == undefined) { timeSeconds = 0; } if (animType == undefined || animType == '') { animType = 'easeOutExpo'; } if (delay == undefined) { delay = 0; } if (typeof prop == 'string') { var v7 = [prop]; var v11 = [mtarget[prop]]; var v9 = [propDest]; } else { var v7 = []; var v11 = []; var v9 = []; for (var v32 in prop) { v11.push(mtarget[prop[v32]]); } for (v32 in prop) { v7.push(prop[v32]); } for (v32 in propDest) { v9.push(propDest[v32]); } } var v12 = false; if (_root.__tweenController__ == undefined) { _global.$createTweenController(); } var v4 = _root.__tweenController__.$_tweenPropList; var v8 = _root.__tweenController__.$_tTime; for (v32 in v11) { if (v9[v32] != undefined && !mtarget.$_isTweenLocked) { if (mtarget.$_tweenCount > 0) { var v3 = 0; while (v3 < v4.length) { if (v4[v3]._targ == mtarget && v4[v3]._prop == v7[v32]) { if (v8 + delay * 1000 < v4[v3]._timeDest) { v4.splice(v3, 1); --v3; --mtarget.$_tweenCount; } } ++v3; } } v4.push({'_prop': v7[v32], '_targ': mtarget, '_propStart': undefined, '_propDest': v9[v32], '_timeStart': v8, '_timeDest': v8 + timeSeconds * 1000, '_animType': animType, '_extra1': extra1, '_extra2': extra2, '_extras': extras, '_delay': delay, '_isPaused': false, '_timePaused': 0, '_callback': v12 ? undefined : callback}); mtarget.$_tweenCount = mtarget.$_tweenCount > 0 ? mtarget.$_tweenCount + 1 : 1; v12 = true; } } ASSetPropFlags(mtarget, '$_tweenCount', 1, 0); }; ASSetPropFlags(_global, '$addTween', 1, 0); _global.$updateTweens = function () { this.$_tTime = getTimer(); var v8 = this.$_tTime; var v6 = 0; while (v6 < this.$_tweenPropList.length) { var v3 = this.$_tweenPropList[v6]; if (v3._targ.toString() == undefined) { this.$_tweenPropList.splice(v6, 1); --v6; } else { if (v3._timeStart + v3._delay * 1000 <= v8 && !v3._isPaused) { if (v3._propStart == undefined) { if (v3._prop.substr(0, 10) == '__special_') { if (v3._prop == '__special_mc_frame__') { v3._propStart = v3._targ._currentframe; } else { if (v3._prop == '__special_mc_ra__') { v3._propStart = ((new Color(v3._targ)).getTransform()).ra; } else { if (v3._prop == '__special_mc_rb__') { v3._propStart = ((new Color(v3._targ)).getTransform()).rb; } else { if (v3._prop == '__special_mc_ga__') { v3._propStart = ((new Color(v3._targ)).getTransform()).ga; } else { if (v3._prop == '__special_mc_gb__') { v3._propStart = ((new Color(v3._targ)).getTransform()).gb; } else { if (v3._prop == '__special_mc_ba__') { v3._propStart = ((new Color(v3._targ)).getTransform()).ba; } else { if (v3._prop == '__special_mc_bb__') { v3._propStart = ((new Color(v3._targ)).getTransform()).bb; } else { if (v3._prop == '__special_mc_aa__') { v3._propStart = ((new Color(v3._targ)).getTransform()).aa; } else { if (v3._prop == '__special_mc_ab__') { v3._propStart = ((new Color(v3._targ)).getTransform()).ab; } else { if (v3._prop == '__special_text_r__') { v3._propStart = v3._targ.textColor >> 16; } else { if (v3._prop == '__special_text_g__') { v3._propStart = (v3._targ.textColor & 65280) >> 8; } else { if (v3._prop == '__special_text_b__') { v3._propStart = v3._targ.textColor & 255; } else { if (v3._prop == '__special_sound_volume__') { v3._propStart = v3._targ.getVolume(); } else { if (v3._prop == '__special_sound_pan__') { v3._propStart = v3._targ.getPan(); } else { if (v3._prop == '__special_bst_t__') { v3._propStart = 0; v3._extras.__special_bst_ix__ = v3._targ._x; v3._extras.__special_bst_iy__ = v3._targ._y; } else { if (v3._prop == '__special_blur_x__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BlurFilter) { v3._propStart = v3._targ.filters[v5].blurX; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_blur_y__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BlurFilter) { v3._propStart = v3._targ.filters[v5].blurY; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_glow_color__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.GlowFilter) { v3._propStart = v3._targ.filters[v5].color; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 16777215; } } else { if (v3._prop == '__special_glow_alpha__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.GlowFilter) { v3._propStart = v3._targ.filters[v5].alpha; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 1; } } else { if (v3._prop == '__special_glow_blurX__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.GlowFilter) { v3._propStart = v3._targ.filters[v5].blurX; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_glow_blurY__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.GlowFilter) { v3._propStart = v3._targ.filters[v5].blurY; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_glow_strength__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.GlowFilter) { v3._propStart = v3._targ.filters[v5].strength; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 1; } } else { if (v3._prop == '__special_bevel_distance__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].distance; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_bevel_angle__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].angle; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 45; } } else { if (v3._prop == '__special_bevel_highlightColor__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].highlightColor; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 16777215; } } else { if (v3._prop == '__special_bevel_highlightAlpha__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].highlightAlpha; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 1; } } else { if (v3._prop == '__special_bevel_shadowColor__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].shadowColor; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_bevel_shadowAlpha__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].shadowAlpha; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 1; } } else { if (v3._prop == '__special_bevel_blurX__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].blurX; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_bevel_blurY__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].blurY; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 0; } } else { if (v3._prop == '__special_bevel_strength__') { var v5 = 0; while (v5 < v3._targ.filters.length) { if (v3._targ.filters[v5] instanceof flash.filters.BevelFilter) { v3._propStart = v3._targ.filters[v5].strength; } ++v5; } if (v3._propStart == undefined) { v3._propStart = 1; } } else { v3._propStart = v3._targ[v3._prop]; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } else { v3._propStart = v3._targ[v3._prop]; } } var v10 = v3._timeDest + v3._delay * 1000; if (v10 <= v8) { var v4 = v3._propDest; } else { var v4 = _global.findTweenValue(v3._propStart, v3._propDest, v3._timeStart, v8 - v3._delay * 1000, v3._timeDest, v3._animType, v3._extra1, v3._extra2); } v3._targ[v3._prop] = v3._extras.mustRound ? Math.round(v4) : v4; if (v3._prop == '__special_mc_frame__') { v3._targ.gotoAndStop(Math.round(v4)); } else { if (v3._prop == '__special_mc_ra__') { (new Color(v3._targ)).setTransform({'ra': v4}); } else { if (v3._prop == '__special_mc_rb__') { (new Color(v3._targ)).setTransform({'rb': v4}); } else { if (v3._prop == '__special_mc_ga__') { (new Color(v3._targ)).setTransform({'ga': v4}); } else { if (v3._prop == '__special_mc_gb__') { (new Color(v3._targ)).setTransform({'gb': v4}); } else { if (v3._prop == '__special_mc_ba__') { (new Color(v3._targ)).setTransform({'ba': v4}); } else { if (v3._prop == '__special_mc_bb__') { (new Color(v3._targ)).setTransform({'bb': v4}); } else { if (v3._prop == '__special_mc_aa__') { (new Color(v3._targ)).setTransform({'aa': v4}); } else { if (v3._prop == '__special_mc_ab__') { (new Color(v3._targ)).setTransform({'ab': v4}); } } } } } } } } } if (v3._prop == '__special_bst_t__') { var v7 = v3._extras; var v9 = _global.findPointOnCurve(v7.__special_bst_ix__, v7.__special_bst_iy__, v7.__special_bst_cx__, v7.__special_bst_cy__, v7.__special_bst_dx__, v7.__special_bst_dy__, v4); if (v3._extras.mustRound) { v3._targ._x = Math.round(v9.x); v3._targ._y = Math.round(v9.y); } else { v3._targ._x = v9.x; v3._targ._y = v9.y; } } if (typeof v3._targ != 'movieclip' && v3._prop == '__special_text_b__') { v3._targ.textColor = (v3._targ.__special_text_r__ << 16) + (v3._targ.__special_text_g__ << 8) + v3._targ.__special_text_b__; } if (v3._prop == '__special_sound_volume__') { v3._targ.setVolume(v4); } if (v3._prop == '__special_sound_pan__') { v3._targ.setPan(v4); } if (v3._prop == '__special_blur_x__') { _global.$setFilterProperty(v3._targ, 'blur_blurX', v4, v3._extras); } if (v3._prop == '__special_blur_y__') { _global.$setFilterProperty(v3._targ, 'blur_blurY', v4, v3._extras); } if (v3._prop == '__special_glow_color__') { _global.$setFilterProperty(v3._targ, 'glow_color', _global.findTweenColor(v3, v8), v3._extras); } if (v3._prop == '__special_glow_alpha__') { _global.$setFilterProperty(v3._targ, 'glow_alpha', v4, v3._extras); } if (v3._prop == '__special_glow_blurX__') { _global.$setFilterProperty(v3._targ, 'glow_blurX', v4, v3._extras); } if (v3._prop == '__special_glow_blurY__') { _global.$setFilterProperty(v3._targ, 'glow_blurY', v4, v3._extras); } if (v3._prop == '__special_glow_strength__') { _global.$setFilterProperty(v3._targ, 'glow_strength', v4, v3._extras); } if (v3._prop == '__special_bevel_distance__') { _global.$setFilterProperty(v3._targ, 'bevel_distance', v4, v3._extras); } if (v3._prop == '__special_bevel_angle__') { _global.$setFilterProperty(v3._targ, 'bevel_angle', v4, v3._extras); } if (v3._prop == '__special_bevel_highlightColor__') { _global.$setFilterProperty(v3._targ, 'bevel_highlightColor', _global.findTweenColor(v3, v8), v3._extras); } if (v3._prop == '__special_bevel_highlightAlpha__') { _global.$setFilterProperty(v3._targ, 'bevel_highlightAlpha', v4, v3._extras); } if (v3._prop == '__special_bevel_shadowColor__') { _global.$setFilterProperty(v3._targ, 'bevel_shadowColor', _global.findTweenColor(v3, v8), v3._extras); } if (v3._prop == '__special_bevel_shadowAlpha__') { _global.$setFilterProperty(v3._targ, 'bevel_shadowAlpha', v4, v3._extras); } if (v3._prop == '__special_bevel_blurX__') { _global.$setFilterProperty(v3._targ, 'bevel_blurX', v4, v3._extras); } if (v3._prop == '__special_bevel_blurY__') { _global.$setFilterProperty(v3._targ, 'bevel_blurY', v4, v3._extras); } if (v3._prop == '__special_bevel_strength__') { _global.$setFilterProperty(v3._targ, 'bevel_strength', v4, v3._extras); } if (v3._targ.onTweenUpdate != undefined) { v3._targ.onTweenUpdate(v3._prop); } if (v10 <= v8) { if (v3._targ.onTweenComplete != undefined) { v3._targ.onTweenComplete(v3._prop); } _global.$stopTween(v3._targ, [v3._prop], false); --v6; if (v3._callback != undefined) { if (_global.backwardCallbackTweening) { var v11 = v3._targ.createEmptyMovieClip('__child__', 122344); v3._callback.apply(v11, null); v11.removeMovieClip(); } else { v3._callback.apply(v3._targ, null); } } } } } ++v6; } if (this.$_tweenPropList.length == 0) { _global.$removeTweenController(); } }; ASSetPropFlags(_global, '$updateTween', 1, 0); _global.$stopTween = function (mtarget, props, wipeFuture) { var v4 = _root.__tweenController__.$_tweenPropList; var v7; for (var v9 in v4) { v7 = v4[v9]._prop; var v5 = 0; for (;;) { if (!(v5 < props.length || v5 < 1 && props == undefined)) break; if (v4[v9]._targ == mtarget && (v7 == props[v5] || props == undefined) && (wipeFuture || v4[v9]._timeDest + v4[v9]._delay * 1000 <= getTimer())) { switch (v7) { case '__special_mc_frame__': case '__special_mc_ra__': case '__special_mc_rb__': case '__special_mc_ga__': case '__special_mc_gb__': case '__special_mc_ba__': case '__special_mc_bb__': case '__special_mc_aa__': case '__special_mc_ab__': case '__special_sound_volume__': case '__special_bst_t__': delete mtarget[v7]; break; case '__special_text_b__': delete mtarget.__special_text_r__; delete mtarget.__special_text_g__; delete mtarget.__special_text_b__; } v4.splice(v9, 1); } ++v5; } } if (props == undefined) { delete mtarget.$_tweenCount; } else { mtarget.$_tweenCount = 0; for (v9 in v4) { if (v4[v9]._targ == mtarget) { ++mtarget.$_tweenCount; } } if (mtarget.$_tweenCount == 0) { delete mtarget.$_tweenCount; } } if (v4.length == 0) { _global.$removeTweenController(); } }; ASSetPropFlags(_global, '$stopTween', 1, 0); _global.$setFilterProperty = function (mtarget, propName, propValue, extras) { var v1; var v7 = false; var v3 = []; v1 = 0; while (v1 < mtarget.filters.length) { v3.push(mtarget.filters[v1]); ++v1; } if (propName.substr(0, 5) == 'blur_') { v1 = 0; while (v1 < mtarget.filters.length) { if (v3[v1] instanceof flash.filters.BlurFilter) { v3[v1][propName.substr(5)] = propValue; if (extras.__special_blur_quality__ != undefined) { v3[v1].quality = extras.__special_blur_quality__; } v7 = true; break; } ++v1; } if (!v7) { var v9; var v8 = (extras.__special_blur_quality__ == undefined) ? 2 : extras.__special_blur_quality__; if (propName == 'blur_blurX') { v9 = new flash.filters.BlurFilter(propValue, 0, v8); } if (propName == 'blur_blurY') { v9 = new flash.filters.BlurFilter(0, propValue, v8); } v3.push(v9); } } else { if (propName.substr(0, 5) == 'glow_') { v1 = 0; while (v1 < mtarget.filters.length) { if (v3[v1] instanceof flash.filters.GlowFilter) { v3[v1][propName.substr(5)] = propValue; if (extras.__special_glow_quality__ != undefined) { v3[v1].quality = extras.__special_glow_quality__; } if (extras.__special_glow_inner__ != undefined) { v3[v1].inner = extras.__special_glow_inner__; } if (extras.__special_glow_knockout__ != undefined) { v3[v1].knockout = extras.__special_glow_knockout__; } v7 = true; break; } ++v1; } if (!v7) { var v8 = (extras.__special_glow_quality__ == undefined) ? 2 : extras.__special_glow_quality__; var v12 = (extras.__special_glow_inner__ == undefined) ? false : extras.__special_glow_inner__; var v10 = (extras.__special_glow_knockout__ == undefined) ? false : extras.__special_glow_knockout__; if (propName == 'glow_color') { var v9 = new flash.filters.GlowFilter(propValue, 1, 0, 0, 1, v8, v12, v10); } if (propName == 'glow_alpha') { v9 = new flash.filters.GlowFilter(16777215, propValue, 0, 0, 1, v8, v12, v10); } if (propName == 'glow_blurX') { v9 = new flash.filters.GlowFilter(16777215, 1, propValue, 0, 1, v8, v12, v10); } if (propName == 'glow_blurY') { v9 = new flash.filters.GlowFilter(16777215, 1, 0, propValue, 1, v8, v12, v10); } if (propName == 'glow_strength') { v9 = new flash.filters.GlowFilter(16777215, 1, 0, 0, propValue, v8, v12, v10); } v3.push(v9); } } else { if (propName.substr(0, 6) == 'bevel_') { v1 = 0; while (v1 < mtarget.filters.length) { if (v3[v1] instanceof flash.filters.BevelFilter) { v3[v1][propName.substr(6)] = propValue; if (extras.__special_bevel_quality__ != undefined) { v3[v1].quality = extras.__special_bevel_quality__; } if (extras.__special_bevel_type__ != undefined) { v3[v1].inner = extras.__special_bevel_type__; } if (extras.__special_bevel_knockout__ != undefined) { v3[v1].knockout = extras.__special_bevel_knockout__; } v7 = true; break; } ++v1; } if (!v7) { var v8 = (extras.__special_bevel_quality__ == undefined) ? 2 : extras.__special_bevel_quality__; var v11 = (extras.__special_bevel_type__ == undefined) ? 'inner' : extras.__special_bevel_type__; var v10 = (extras.__special_bevel_knockout__ == undefined) ? false : extras.__special_bevel_knockout__; if (propName == 'bevel_distance') { var v9 = new flash.filters.BevelFilter(propValue, 45, 16777215, 1, 0, 1, 0, 0, 1, v8, v11, v10); } if (propName == 'bevel_angle') { v9 = new flash.filters.BevelFilter(0, propValue, 16777215, 1, 0, 1, 0, 0, 1, v8, v11, v10); } if (propName == 'bevel_highlightColor') { v9 = new flash.filters.BevelFilter(0, 45, propValue, 1, 0, 1, 0, 0, 1, v8, v11, v10); } if (propName == 'bevel_highlightAlpha') { v9 = new flash.filters.BevelFilter(0, 45, 16777215, propValue, 0, 1, 0, 0, 1, v8, v11, v10); } if (propName == 'bevel_shadowColor') { v9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, propValue, 1, 0, 0, 1, v8, v11, v10); } if (propName == 'bevel_shadowAlpha') { v9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, propValue, 0, 0, 1, v8, v11, v10); } if (propName == 'bevel_blurX') { v9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, propValue, 0, 1, v8, v11, v10); } if (propName == 'bevel_blurY') { v9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, 0, propValue, 1, v8, v11, v10); } if (propName == 'bevel_strength') { v9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, 0, 0, propValue, v8, v11, v10); } v3.push(v9); } } else { return undefined; } } } mtarget.filters = v3; }; Sound.prototype.tween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2); }; TextField.prototype.tween = Sound.prototype.tween; MovieClip.prototype.tween = Sound.prototype.tween; ASSetPropFlags(MovieClip.prototype, 'tween', 1, 0); ASSetPropFlags(TextField.prototype, 'tween', 1, 0); ASSetPropFlags(Sound.prototype, 'tween', 1, 0); Sound.prototype.roundedTween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2, {'mustRound': true}); }; TextField.prototype.roundedTween = Sound.prototype.roundedTween; MovieClip.prototype.roundedTween = Sound.prototype.roundedTween; ASSetPropFlags(MovieClip.prototype, 'roundedTween', 1, 0); ASSetPropFlags(TextField.prototype, 'roundedTween', 1, 0); ASSetPropFlags(Sound.prototype, 'roundedTween', 1, 0); Sound.prototype.stopTween = function (props) { if (typeof props == 'string') { props = [props]; } if (props != undefined) { var v4 = 1; while (v4 < arguments.length) { props.push(arguments[v4]); ++v4; } } _global.$stopTween(this, props, true); }; TextField.prototype.stopTween = Sound.prototype.stopTween; MovieClip.prototype.stopTween = Sound.prototype.stopTween; ASSetPropFlags(MovieClip.prototype, 'stopTween', 1, 0); ASSetPropFlags(TextField.prototype, 'stopTween', 1, 0); ASSetPropFlags(Sound.prototype, 'stopTween', 1, 0); Sound.prototype.pauseTween = function (props) { if (props != undefined) { if (typeof props == 'string') { props = [props]; } var v6 = 1; while (v6 < Arguments.length) { props.push(Arguments[v6]); ++v6; } } var v4 = _root.__tweenController__.$_tweenPropList; var v5; for (var v7 in v4) { if (v4[v7]._targ == this && !v4[v7]._isPaused) { if (props != undefined) { v5 = false; for (v6 in props) { if (props[v6] == v4[v7]._prop) { v5 = true; break; } } } if (props == undefined || v5) { v4[v7]._isPaused = true; v4[v7]._timePaused = _root.__tweenController__.$_tTime; } } } }; TextField.prototype.pauseTween = Sound.prototype.pauseTween; MovieClip.prototype.pauseTween = Sound.prototype.pauseTween; ASSetPropFlags(MovieClip.prototype, 'pauseTween', 1, 0); ASSetPropFlags(TextField.prototype, 'pauseTween', 1, 0); ASSetPropFlags(Sound.prototype, 'pauseTween', 1, 0); Sound.prototype.resumeTween = function (props) { if (props != undefined) { if (typeof props == 'string') { props = [props]; } var v7 = 1; while (v7 < Arguments.length) { props.push(Arguments[v7]); ++v7; } } var v3 = _root.__tweenController__.$_tweenPropList; var v5; var v6; for (var v8 in v3) { if (v3[v8]._targ == this && v3[v8]._isPaused) { if (props != undefined) { v5 = false; for (v7 in props) { if (props[v7] == v3[v8]._prop) { v5 = true; break; } } } if (props == undefined || v5) { v3[v8]._isPaused = false; v6 = _root.__tweenController__.$_tTime - v3[v8]._timePaused; v3[v8]._timeStart += v6; v3[v8]._timeDest += v6; v3[v8]._timePaused = 0; } } } }; TextField.prototype.resumeTween = Sound.prototype.resumeTween; MovieClip.prototype.resumeTween = Sound.prototype.resumeTween; ASSetPropFlags(MovieClip.prototype, 'resumeTween', 1, 0); ASSetPropFlags(TextField.prototype, 'resumeTween', 1, 0); ASSetPropFlags(Sound.prototype, 'resumeTween', 1, 0); Sound.prototype.lockTween = function () { this.$_isTweenLocked = true; ASSetPropFlags(this, 'this.$_isTweenLocked', 1, 0); }; TextField.prototype.lockTween = Sound.prototype.lockTween; MovieClip.prototype.lockTween = Sound.prototype.lockTween; ASSetPropFlags(MovieClip.prototype, 'lockTween', 1, 0); ASSetPropFlags(TextField.prototype, 'lockTween', 1, 0); ASSetPropFlags(Sound.prototype, 'lockTween', 1, 0); Sound.prototype.unlockTween = function () { delete this.$_isTweenLocked; }; TextField.prototype.unlockTween = Sound.prototype.unlockTween; MovieClip.prototype.unlockTween = Sound.prototype.unlockTween; ASSetPropFlags(MovieClip.prototype, 'unlockTween', 1, 0); ASSetPropFlags(TextField.prototype, 'unlockTween', 1, 0); ASSetPropFlags(Sound.prototype, 'unlockTween', 1, 0); Sound.prototype.getTweens = function () { return this.$_tweenCount; }; TextField.prototype.getTweens = Sound.prototype.getTweens; MovieClip.prototype.getTweens = Sound.prototype.getTweens; ASSetPropFlags(MovieClip.prototype, 'getTweens', 1, 0); ASSetPropFlags(TextField.prototype, 'getTweens', 1, 0); ASSetPropFlags(Sound.prototype, 'getTweens', 1, 0); Sound.prototype.isTweening = function () { return this.$_tweenCount > 0 ? true : false; }; TextField.prototype.isTweening = Sound.prototype.isTweening; MovieClip.prototype.isTweening = Sound.prototype.isTweening; ASSetPropFlags(MovieClip.prototype, 'isTweening', 1, 0); ASSetPropFlags(TextField.prototype, 'isTweening', 1, 0); ASSetPropFlags(Sound.prototype, 'isTweening', 1, 0); TextField.prototype.alphaTo = function (propDest_a, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_alpha', propDest_a, timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.alphaTo = TextField.prototype.alphaTo; ASSetPropFlags(MovieClip.prototype, 'alphaTo', 1, 0); ASSetPropFlags(TextField.prototype, 'alphaTo', 1, 0); MovieClip.prototype.frameTo = function (propDest_frame, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '__special_mc_frame__', propDest_frame, timeSeconds, animType, delay, callback, extra1, extra2); }; ASSetPropFlags(MovieClip.prototype, 'frameTo', 1, 0); TextField.prototype.resizeTo = function (propDest_width, propDest_height, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['_width', '_height'], [propDest_width, propDest_height], timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.resizeTo = TextField.prototype.resizeTo; ASSetPropFlags(MovieClip.prototype, 'resizeTo', 1, 0); ASSetPropFlags(TextField.prototype, 'resizeTo', 1, 0); TextField.prototype.rotateTo = function (propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_rotation', propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.rotateTo = TextField.prototype.rotateTo; ASSetPropFlags(MovieClip.prototype, 'rotateTo', 1, 0); ASSetPropFlags(TextField.prototype, 'rotateTo', 1, 0); TextField.prototype.scaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['_xscale', '_yscale'], [propDest_scale, propDest_scale], timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.scaleTo = TextField.prototype.scaleTo; ASSetPropFlags(MovieClip.prototype, 'scaleTo', 1, 0); ASSetPropFlags(TextField.prototype, 'scaleTo', 1, 0); TextField.prototype.xScaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_xscale', propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.xScaleTo = TextField.prototype.xScaleTo; ASSetPropFlags(MovieClip.prototype, 'xScaleTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xScaleTo', 1, 0); TextField.prototype.yScaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_yscale', propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.yScaleTo = TextField.prototype.yScaleTo; ASSetPropFlags(MovieClip.prototype, 'yScaleTo', 1, 0); ASSetPropFlags(TextField.prototype, 'yScaleTo', 1, 0); TextField.prototype.scrollTo = function (propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, 'scroll', propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2); }; ASSetPropFlags(TextField.prototype, 'scrollTo', 1, 0); TextField.prototype.slideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['_x', '_y'], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.slideTo = TextField.prototype.slideTo; ASSetPropFlags(MovieClip.prototype, 'slideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'slideTo', 1, 0); TextField.prototype.roundedSlideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['_x', '_y'], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2, {'mustRound': true}); }; MovieClip.prototype.roundedSlideTo = TextField.prototype.roundedSlideTo; ASSetPropFlags(MovieClip.prototype, 'roundedSlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'roundedSlideTo', 1, 0); TextField.prototype.xSlideTo = function (propDest_x, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_x', propDest_x, timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.xSlideTo = TextField.prototype.xSlideTo; ASSetPropFlags(MovieClip.prototype, 'xSlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xSlideTo', 1, 0); TextField.prototype.roundedXSlideTo = function (propDest_x, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_x', propDest_x, timeSeconds, animType, delay, callback, extra1, extra2, {'mustRound': true}); }; MovieClip.prototype.roundedXSlideTo = TextField.prototype.roundedXSlideTo; ASSetPropFlags(MovieClip.prototype, 'roundedXSlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'roundedXSlideTo', 1, 0); TextField.prototype.ySlideTo = function (propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_y', propDest_y, timeSeconds, animType, delay, callback, extra1, extra2); }; MovieClip.prototype.ySlideTo = TextField.prototype.ySlideTo; ASSetPropFlags(MovieClip.prototype, 'ySlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'ySlideTo', 1, 0); TextField.prototype.roundedYSlideTo = function (propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '_y', propDest_y, timeSeconds, animType, delay, callback, extra1, extra2, {'mustRound': true}); }; MovieClip.prototype.roundedYSlideTo = TextField.prototype.roundedYSlideTo; ASSetPropFlags(MovieClip.prototype, 'roundedYSlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'roundedYSlideTo', 1, 0); TextField.prototype.bezierSlideTo = function (cpoint_x, cpoint_y, propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) { var v3 = new Object(); v3.__special_bst_ix__ = undefined; v3.__special_bst_iy__ = undefined; v3.__special_bst_cx__ = cpoint_x; v3.__special_bst_cy__ = cpoint_y; v3.__special_bst_dx__ = propDest_x; v3.__special_bst_dy__ = propDest_y; _global.$addTween(this, '__special_bst_t__', 1, timeSeconds, animType, delay, callback, extra1, extra2, v3); }; MovieClip.prototype.bezierSlideTo = TextField.prototype.bezierSlideTo; ASSetPropFlags(MovieClip.prototype, 'bezierSlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'bezierSlideTo', 1, 0); TextField.prototype.roundedBezierSlideTo = function (cpoint_x, cpoint_y, propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) { var v3 = new Object(); v3.__special_bst_ix__ = undefined; v3.__special_bst_iy__ = undefined; v3.__special_bst_cx__ = cpoint_x; v3.__special_bst_cy__ = cpoint_y; v3.__special_bst_dx__ = propDest_x; v3.__special_bst_dy__ = propDest_y; v3.mustRound = true; _global.$addTween(this, '__special_bst_t__', 1, timeSeconds, animType, delay, callback, extra1, extra2, v3); }; MovieClip.prototype.roundedBezierSlideTo = TextField.prototype.roundedBezierSlideTo; ASSetPropFlags(MovieClip.prototype, 'roundedBezierSlideTo', 1, 0); ASSetPropFlags(TextField.prototype, 'roundedBezierSlideTo', 1, 0); Sound.prototype.volumeTo = function (propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '__special_sound_volume__', propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2); }; ASSetPropFlags(Sound.prototype, 'volumeTo', 1, 0); Sound.prototype.panTo = function (propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '__special_sound_pan__', propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2); }; ASSetPropFlags(Sound.prototype, 'panTo', 1, 0); MovieClip.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) { if (propDest_color == null) { this.colorTransformTo(100, 0, 100, 0, 100, 0, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2); } else { var v3 = propDest_color >> 16; var v5 = (propDest_color & 65280) >> 8; var v4 = propDest_color & 255; this.colorTransformTo(0, v3, 0, v5, 0, v4, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2); } }; ASSetPropFlags(MovieClip.prototype, 'colorTo', 1, 0); TextField.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) { var v3 = propDest_color >> 16; var v6 = (propDest_color & 65280) >> 8; var v4 = propDest_color & 255; _global.$addTween(this, ['__special_text_r__', '__special_text_g__', '__special_text_b__'], [v3, v6, v4], timeSeconds, animType, delay, callback, extra1, extra2); }; ASSetPropFlags(TextField.prototype, 'colorTo', 1, 0); MovieClip.prototype.colorTransformTo = function () { if (typeof arguments[0] == 'object' && arguments[0] != undefined) { _global.$addTween(this, ['__special_mc_ra__', '__special_mc_rb__', '__special_mc_ga__', '__special_mc_gb__', '__special_mc_ba__', '__special_mc_bb__', '__special_mc_aa__', '__special_mc_ab__'], [arguments[0].ra, arguments[0].rb, arguments[0].ga, arguments[0].gb, arguments[0].ba, arguments[0].bb, arguments[0].aa, arguments[0].ab], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]); } else { _global.$addTween(this, ['__special_mc_ra__', '__special_mc_rb__', '__special_mc_ga__', '__special_mc_gb__', '__special_mc_ba__', '__special_mc_bb__', '__special_mc_aa__', '__special_mc_ab__'], [arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13]); } }; ASSetPropFlags(MovieClip.prototype, 'colorTransformTo', 1, 0); TextField.prototype.blurTo = function () { if (typeof arguments[0] == 'object' && arguments[0] != undefined) { _global.$addTween(this, ['__special_blur_x__', '__special_blur_y__'], [arguments[0].blurX, arguments[0].blurY], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {'__special_blur_quality__': arguments[0].quality}); } else { _global.$addTween(this, ['__special_blur_x__', '__special_blur_y__'], [arguments[0], arguments[0]], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], {'__special_blur_quality__': arguments[1]}); } }; MovieClip.prototype.blurTo = TextField.prototype.blurTo; ASSetPropFlags(MovieClip.prototype, 'blurTo', 1, 0); ASSetPropFlags(TextField.prototype, 'blurTo', 1, 0); TextField.prototype.xyBlurTo = function (propDest_blurX, propDest_blurY, quality, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['__special_blur_x__', '__special_blur_y__'], [propDest_blurX, propDest_blurY], timeSeconds, animType, delay, callback, extra1, extra2, {'__special_blur_quality__': quality}); }; MovieClip.prototype.xyBlurTo = TextField.prototype.xyBlurTo; ASSetPropFlags(MovieClip.prototype, 'xyBlurTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xyBlurTo', 1, 0); TextField.prototype.xBlurTo = function (propDest_blur, quality, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '__special_blur_x__', propDest_blur, timeSeconds, animType, delay, callback, extra1, extra2, {'__special_blur_quality__': quality}); }; MovieClip.prototype.xBlurTo = TextField.prototype.xBlurTo; ASSetPropFlags(MovieClip.prototype, 'xBlurTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xBlurTo', 1, 0); TextField.prototype.yBlurTo = function (propDest_blur, quality, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, '__special_blur_y__', propDest_blur, timeSeconds, animType, delay, callback, extra1, extra2, {'__special_blur_quality__': quality}); }; MovieClip.prototype.yBlurTo = TextField.prototype.yBlurTo; ASSetPropFlags(MovieClip.prototype, 'yBlurTo', 1, 0); ASSetPropFlags(TextField.prototype, 'yBlurTo', 1, 0); TextField.prototype.glowTo = function () { if (typeof arguments[0] == 'object' && arguments[0] != undefined) { _global.$addTween(this, ['__special_glow_color__', '__special_glow_alpha__', '__special_glow_blurX__', '__special_glow_blurY__', '__special_glow_strength__'], [arguments[0].color, arguments[0].alpha, arguments[0].blurX, arguments[0].blurY, arguments[0].strength], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {'__special_glow_quality__': arguments[0].quality, '__special_glow_inner__': arguments[0].inner, '__special_glow_knockout__': arguments[0].knockout}); } else { _global.$addTween(this, ['__special_glow_color__', '__special_glow_alpha__', '__special_glow_blurX__', '__special_glow_blurY__', '__special_glow_strength__'], [arguments[0], arguments[1], arguments[2], arguments[2], arguments[3]], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], {'__special_glow_quality__': arguments[4], '__special_glow_inner__': arguments[5], '__special_glow_knockout__': arguments[6]}); } }; MovieClip.prototype.glowTo = TextField.prototype.glowTo; ASSetPropFlags(MovieClip.prototype, 'glowTo', 1, 0); ASSetPropFlags(TextField.prototype, 'glowTo', 1, 0); TextField.prototype.xyGlowTo = function (propDest_color, propDest_alpha, propDest_blurX, propDest_blurY, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['__special_glow_color__', '__special_glow_alpha__', '__special_glow_blurX__', '__special_glow_blurY__', '__special_glow_strength__'], [propDest_color, propDest_alpha, propDest_blurX, propDest_blurY, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {'__special_glow_quality__': quality, '__special_glow_inner__': inner, '__special_glow_knockout__': knockout}); }; MovieClip.prototype.xyGlowTo = TextField.prototype.xyGlowTo; ASSetPropFlags(MovieClip.prototype, 'xyGlowTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xyGlowTo', 1, 0); TextField.prototype.xGlowTo = function (propDest_color, propDest_alpha, propDest_blur, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['__special_glow_color__', '__special_glow_alpha__', '__special_glow_blurX__', '__special_glow_strength__'], [propDest_color, propDest_alpha, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {'__special_glow_quality__': quality, '__special_glow_inner__': inner, '__special_glow_knockout__': knockout}); }; MovieClip.prototype.xGlowTo = TextField.prototype.xGlowTo; ASSetPropFlags(MovieClip.prototype, 'xGlowTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xGlowTo', 1, 0); TextField.prototype.yGlowTo = function (propDest_color, propDest_alpha, propDest_blur, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['__special_glow_color__', '__special_glow_alpha__', '__special_glow_blurY__', '__special_glow_strength__'], [propDest_color, propDest_alpha, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {'__special_glow_quality__': quality, '__special_glow_inner__': inner, '__special_glow_knockout__': knockout}); }; MovieClip.prototype.yGlowTo = TextField.prototype.yGlowTo; ASSetPropFlags(MovieClip.prototype, 'yGlowTo', 1, 0); ASSetPropFlags(TextField.prototype, 'yGlowTo', 1, 0); TextField.prototype.bevelTo = function () { if (typeof arguments[0] == 'object' && arguments[0] != undefined) { _global.$addTween(this, ['__special_bevel_distance__', '__special_bevel_angle__', '__special_bevel_highlightColor__', '__special_bevel_highlightAlpha__', '__special_bevel_shadowColor__', '__special_bevel_shadowAlpha__', '__special_bevel_blurX__', '__special_bevel_blurY__', '__special_bevel_strength__'], [arguments[0].distance, arguments[0].angle, arguments[0].highlightColor, arguments[0].highlightAlpha * 100, arguments[0].shadowColor, arguments[0].shadowAlpha * 100, arguments[0].blurX, arguments[0].blurY, arguments[0].strength], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {'__special_bevel_quality__': arguments[0].quality, '__special_bevel_type__': arguments[0].type, '__special_bevel_knockout__': arguments[0].knockout}); } else { _global.$addTween(this, ['__special_bevel_distance__', '__special_bevel_angle__', '__special_bevel_highlightColor__', '__special_bevel_highlightAlpha__', '__special_bevel_shadowColor__', '__special_bevel_shadowAlpha__', '__special_bevel_blurX__', '__special_bevel_blurY__', '__special_bevel_strength__'], [arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[6], arguments[7]], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], {'__special_bevel_quality__': arguments[8], '__special_bevel_type__': arguments[9], '__special_bevel_knockout__': arguments[10]}); } }; MovieClip.prototype.bevelTo = TextField.prototype.bevelTo; ASSetPropFlags(MovieClip.prototype, 'bevelTo', 1, 0); ASSetPropFlags(TextField.prototype, 'bevelTo', 1, 0); TextField.prototype.xyBevelTo = function (propDest_distance, propDest_angle, propDest_highlightColor, propDest_highlightAlpha, propDest_shadowColor, propDest_shadowAlpha, propDest_blurX, propDest_blurY, propDest_strength, quality, type, knockout, timeSeconds, animType, delay, callback, extra1, extra2) { _global.$addTween(this, ['__special_bevel_distance__', '__special_bevel_angle__', '__special_bevel_highlightColor__', '__special_bevel_highlightAlpha__', '__special_bevel_shadowColor__', '__special_bevel_shadowAlpha__', '__special_bevel_blurX__', '__special_bevel_blurY__', '__special_bevel_blurY__', '__special_bevel_strength__'], [propDest_distance, propDest_angle, propDest_highlightColor, propDest_highlightAlpha, propDest_shadowColor, propDest_shadowAlpha, propDest_blur, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {'__special_bevel_quality__': quality, '__special_bevel_type__': type, '__special_bevel_knockout__': knockout}); }; MovieClip.prototype.xyBevelTo = TextField.prototype.xyBevelTo; ASSetPropFlags(MovieClip.prototype, 'xyBevelTo', 1, 0); ASSetPropFlags(TextField.prototype, 'xyBevelTo', 1, 0); _global.findPointOnCurve = function (p1x, p1y, cx, cy, p2x, p2y, t) { return {'x': p1x + t * (2 * (1 - t) * (cx - p1x) + t * (p2x - p1x)), 'y': p1y + t * (2 * (1 - t) * (cy - p1y) + t * (p2y - p1y))}; }; ASSetPropFlags(_global, 'findPointOnCurve', 1, 0); _global.findTweenColor = function (objProp, tTime) { var v8 = objProp._propStart >> 16; var v4 = objProp._propDest >> 16; var v5 = objProp._propStart >> 8 & 255; var v6 = objProp._propDest >> 8 & 255; var v9 = objProp._propStart & 255; var v7 = objProp._propDest & 255; var v12 = Math.round(_global.findTweenValue(v8, v4, objProp._timeStart, tTime - objProp._delay * 1000, objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2)); var v10 = Math.round(_global.findTweenValue(v5, v6, objProp._timeStart, tTime - objProp._delay * 1000, objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2)); var v3 = Math.round(_global.findTweenValue(v9, v7, objProp._timeStart, tTime - objProp._delay * 1000, objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2)); return (v12 << 16) + (v10 << 8) + v3; }; _global.findTweenValue = function (_propStart, _propDest, _timeStart, _timeNow, _timeDest, _animType, _extra1, _extra2) { var v1 = _timeNow - _timeStart; var v4 = _propStart; var v2 = _propDest - _propStart; var v3 = _timeDest - _timeStart; var v6 = _extra1; var v7 = _extra2; var v5 = _extra1; switch (_animType.toLowerCase()) { return 0; case 'linear': return v2 * v1 / v3 + v4; case 'easeinquad': v1 /= v3; return v2 * v1 * v1 + v4; case 'easeoutquad': v1 /= v3; return -v2 * v1 * (v1 - 2) + v4; case 'easeinoutquad': v1 /= v3 / 2; if (v1 < 1) { return (v2 / 2) * v1 * v1 + v4; } return (-v2 / 2) * (--v1 * (v1 - 2) - 1) + v4; case 'easeoutinquad': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutQuad') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInQuad') * 0.5 + v2 * 0.5 + v4; case 'easeincubic': v1 /= v3; return v2 * v1 * v1 * v1 + v4; case 'easeoutcubic': v1 = v1 / v3 - 1; return v2 * (v1 * v1 * v1 + 1) + v4; case 'easeinoutcubic': v1 /= v3 / 2; if (v1 < 1) { return (v2 / 2) * v1 * v1 * v1 + v4; } v1 -= 2; return (v2 / 2) * (v1 * v1 * v1 + 2) + v4; case 'easeoutincubic': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutCubic') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInCubic') * 0.5 + v2 * 0.5 + v4; case 'easeinquart': v1 /= v3; return v2 * v1 * v1 * v1 * v1 + v4; case 'easeoutquart': v1 = v1 / v3 - 1; return -v2 * (v1 * v1 * v1 * v1 - 1) + v4; case 'easeinoutquart': v1 /= v3 / 2; if (v1 < 1) { return (v2 / 2) * v1 * v1 * v1 * v1 + v4; } v1 -= 2; return (-v2 / 2) * (v1 * v1 * v1 * v1 - 2) + v4; case 'easeoutinquart': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutQuart') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInQuart') * 0.5 + v2 * 0.5 + v4; case 'easeinquint': v1 /= v3; return v2 * v1 * v1 * v1 * v1 * v1 + v4; case 'easeoutquint': v1 = v1 / v3 - 1; return v2 * (v1 * v1 * v1 * v1 * v1 + 1) + v4; case 'easeinoutquint': v1 /= v3 / 2; if (v1 < 1) { return (v2 / 2) * v1 * v1 * v1 * v1 * v1 + v4; } v1 -= 2; return (v2 / 2) * (v1 * v1 * v1 * v1 * v1 + 2) + v4; case 'easeoutinquint': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutQuint') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInQuint') * 0.5 + v2 * 0.5 + v4; case 'easeinsine': return -v2 * Math.cos((v1 / v3) * 1.570796326794897) + v2 + v4; case 'easeoutsine': return v2 * Math.sin((v1 / v3) * 1.570796326794897) + v4; case 'easeinoutsine': return (-v2 / 2) * (Math.cos(Math.PI * v1 / v3) - 1) + v4; case 'easeoutinsine': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutSine') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInSine') * 0.5 + v2 * 0.5 + v4; case 'easeinexpo': return (v1 == 0) ? v4 : v2 * Math.pow(2, 10 * (v1 / v3 - 1)) + v4; case 'easeoutexpo': return (v1 == v3) ? v4 + v2 : v2 * (-Math.pow(2, -10 * v1 / v3) + 1) + v4; case 'easeinoutexpo': if (v1 == 0) { return v4; } if (v1 == v3) { return v4 + v2; } v1 /= v3 / 2; if (v1 < 1) { return (v2 / 2) * Math.pow(2, 10 * (v1 - 1)) + v4; } return (v2 / 2) * (-Math.pow(2, -10 * --v1) + 2) + v4; case 'easeoutinexpo': if (v1 == 0) { return v4; } if (v1 == v3) { return v4 + v2; } v1 /= v3 / 2; if (v1 < 1) { return (v2 / 2) * (-Math.pow(2, -10 * v1 / 1) + 1) + v4; } return (v2 / 2) * (Math.pow(2, 10 * (v1 - 2) / 1) + 1) + v4; case 'easeincirc': v1 /= v3; return -v2 * (Math.sqrt(1 - v1 * v1) - 1) + v4; case 'easeoutcirc': v1 = v1 / v3 - 1; return v2 * Math.sqrt(1 - v1 * v1) + v4; case 'easeinoutcirc': v1 /= v3 / 2; if (v1 < 1) { return (-v2 / 2) * (Math.sqrt(1 - v1 * v1) - 1) + v4; } v1 -= 2; return (v2 / 2) * (Math.sqrt(1 - v1 * v1) + 1) + v4; case 'easeoutincirc': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutCirc') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInCirc') * 0.5 + v2 * 0.5 + v4; case 'easeinelastic': if (v1 == 0) { return v4; } v1 /= v3; if (v1 == 1) { return v4 + v2; } if (!v7) { v7 = v3 * 0.3; } if (!v6 || v6 < Math.abs(v2)) { v6 = v2; v5 = v7 / 4; } else { v5 = (v7 / 6.283185307179586) * Math.asin(v2 / v6); } v1 -= 1; return -(v6 * Math.pow(2, 10 * v1) * Math.sin((v1 * v3 - v5) * 6.283185307179586 / v7)) + v4; case 'easeoutelastic': if (v1 == 0) { return v4; } v1 /= v3; if (v1 == 1) { return v4 + v2; } if (!v7) { v7 = v3 * 0.3; } if (!v6 || v6 < Math.abs(v2)) { v6 = v2; v5 = v7 / 4; } else { v5 = (v7 / 6.283185307179586) * Math.asin(v2 / v6); } return v6 * Math.pow(2, -10 * v1) * Math.sin((v1 * v3 - v5) * 6.283185307179586 / v7) + v2 + v4; case 'easeinoutelastic': if (v1 == 0) { return v4; } v1 /= v3 / 2; if (v1 == 2) { return v4 + v2; } if (!v7) { v7 = v3 * 0.45; } if (!v6 || v6 < Math.abs(v2)) { v6 = v2; v5 = v7 / 4; } else { v5 = (v7 / 6.283185307179586) * Math.asin(v2 / v6); } if (v1 < 1) { v1 -= 1; return -0.5 * (v6 * Math.pow(2, 10 * v1) * Math.sin((v1 * v3 - v5) * 6.283185307179586 / v7)) + v4; } v1 -= 1; return v6 * Math.pow(2, -10 * v1) * Math.sin((v1 * v3 - v5) * 6.283185307179586 / v7) * 0.5 + v2 + v4; case 'easeoutinelastic': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutElastic') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInElastic') * 0.5 + v2 * 0.5 + v4; case 'easeinback': if (v5 == undefined) { v5 = 1.70158; } v1 /= v3; return v2 * v1 * v1 * ((v5 + 1) * v1 - v5) + v4; case 'easeoutback': if (v5 == undefined) { v5 = 1.70158; } v1 = v1 / v3 - 1; return v2 * (v1 * v1 * ((v5 + 1) * v1 + v5) + 1) + v4; case 'easeinoutback': if (v5 == undefined) { v5 = 1.70158; } v1 /= v3 / 2; if (v1 < 1) { v5 *= 1.525; return (v2 / 2) * (v1 * v1 * ((v5 + 1) * v1 - v5)) + v4; } v1 -= 2; v5 *= 1.525; return (v2 / 2) * (v1 * v1 * ((v5 + 1) * v1 + v5) + 2) + v4; case 'easeoutinback': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutBack') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInBack') * 0.5 + v2 * 0.5 + v4; case 'easeinbounce': return v2 - findTweenValue(0, v2, 0, v3 - v1, v3, 'easeOutBounce') + v4; case 'easeoutbounce': v1 /= v3; if (v1 < 0.3636363636363637) { return v2 * (7.5625 * v1 * v1) + v4; } else { if (v1 < 0.7272727272727273) { v1 -= 0.5454545454545454; return v2 * (7.5625 * v1 * v1 + 0.75) + v4; } else { if (v1 < 0.9090909090909091) { v1 -= 0.8181818181818182; return v2 * (7.5625 * v1 * v1 + 0.9375) + v4; } else { v1 -= 0.9545454545454546; return v2 * (7.5625 * v1 * v1 + 0.984375) + v4; } } } case 'easeinoutbounce': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeInBounce') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeOutBounce') * 0.5 + v2 * 0.5 + v4; case 'easeoutinbounce': if (v1 < v3 / 2) { return findTweenValue(0, v2, 0, v1 * 2, v3, 'easeOutBounce') * 0.5 + v4; } return findTweenValue(0, v2, 0, v1 * 2 - v3, v3, 'easeInBounce') * 0.5 + v2 * 0.5 + v4; } return 0; }; ASSetPropFlags(_global, 'findTweenValue', 1, 0); } frame 2 { var versionNumber = 'v1.1 X'; verNumber.text = versionNumber; } frame 2 { function urlChecker() { if (urlCheckerOn == true) { mainAd.gotoAndStop('ad'); urlStart = _url.indexOf('://') + 3; urlEnd = _url.indexOf('/', urlStart); domain = _url.substring(urlStart, urlEnd); LastDot = domain.lastIndexOf('.') - 1; pfixEnd = domain.lastIndexOf('.', LastDot) + 1; domain = domain.substring(pfixEnd, domain.length); if (domain == 'armorgames.com' || domain == 'conartistgames.com' || domain == '') { armorGamesVersion = true; mainAd.gotoAndStop('hints'); mainAd.hintText.text = ''; } else { nextHintButton._visible = false; } if (domain != 'armorgames.com' && domain != '' && domain != 'conartistgames.com') { securityImage._visible = true; securityImage.domainName.text = _url; preloaderPlayButton._x = -30000; preloaderPlayButton._y = -30000; } else { securityImage._visible = false; init(); } } else { securityImage._visible = false; init(); } } function init() { this.onEnterFrame = function () { update(); }; } function update() { var v3 = this.getBytesLoaded(); var v4 = this.getBytesTotal(); var v2 = Math.round((v3 / v4) * 100); percentage = v2 + '%'; preLoaderCombo.percentageTotal.text = percentage; preLoaderCombo.preloader.loadBar._xscale = v2; if (v2 >= 100) { onLoadComplete(); delete this.onEnterFrame; } } function onLoadComplete() { preloaderPlayButton.playText._alpha = 100; preloaderPlayButton.backing.colorTransformTo(220, 0, 220, 0, 220, 0, 100, 0, 0.4, 'easeOutSine'); preloaderPlayButton.backing.colorTransformTo(100, 0, 100, 0, 100, 0, 100, 0, 0.4, 'easeOutSine', 0.5); preloaderPlayButton.onRelease = function () { _root.gotoAndStop('logo'); _root.removeAd(); }; preloaderPlayButton.onRollOver = function () { this.gotoAndStop('over'); _root.playLabel.colorTo(16777215); }; preloaderPlayButton.onRollOut = function () { this.gotoAndStop('off'); _root.playLabel.colorTo(null); }; } stop(); var goodURL = false; var armorGamesVersion = false; var urlCheckerOn = false; var everyWhereVersion = false; urlChecker(); preLoaderCombo.versionNumber.text = versionNumber; } frame 2 { function loadAdMessage() { _root.attachMovie('adMessage', 'adMessage', 13); adMessage.opened = false; adMessage._x = 301; adMessage._y = 158; adMessage.onEnterFrame = function () { if (_root._xmouse > 150 && _root._xmouse < 450 && _root._ymouse > 145 && _root._ymouse < 395) { if (adMessage.opened == false) { adMessage._alpha = 0; adMessage.alphaTo(100, 0.2); adMessage.box.ySlideTo(-30, 0.2); adMessage.opened = true; } } else { adMessage.box.ySlideTo(0, 0.2, 'linear'); adMessage.alphaTo(0, 0.2, 'linear', 0, function () { this.opened = false; }); } }; } function loadAd() { System.security.allowDomain('server.cpmstar.com'); _root.attachMovie('adBox', 'adBox', 12); adBox._x = 150; adBox._y = 143; adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?poolid=' + CPMStarPoolID + '&subpoolid=' + CPMStarSubPoolID); } function removeAd() { loadMovie('', adBox); adBox._x = -500; adBox._y = -500; removeMovieClip(this); removeMovieClip(adMessage); } var CPMStarPoolID = 1052; var CPMStarSubPoolID = 41; loadAd(); loadAdMessage(); } movieClip 129 { } movieClip 132 { frame 1 { stop(); } } // unknown tag 88 length 67 movieClip 135 { } // unknown tag 88 length 67 movieClip 140 { } // unknown tag 88 length 67 // unknown tag 88 length 67 movieClip 150 { } instance securityImage of movieClip 150 { onClipEvent (load) { this.onPress = function () {}; } } movieClip 159 { } button 164 { on (press) { getURL('http://www.armorgames.com', '_blank'); } } movieClip 167 { frame 1 { _root.stop(); gotoAndPlay(2); } frame 218 { _root.nextFrame(); } } movieClip 169 { } movieClip 173 { } movieClip 176 { } movieClip 179 { } movieClip 180 { } movieClip 181 { } movieClip 184 { } movieClip 185 { } movieClip 187 { } movieClip 201 { } movieClip 202 { } movieClip 203 { frame 244 { stop(); _root.gotoAndStop('main'); } } movieClip 206 { } movieClip 208 projectile_mine { frame 5 { stop(); } } movieClip 215 systemConsole { } movieClip 218 { } movieClip 222 gateBlackOut { } movieClip 223 map_warehouse { } movieClip 226 { } movieClip 227 map_drain { } movieClip 230 { } movieClip 231 map_trench { } movieClip 234 { } movieClip 235 map_compound { } movieClip 238 { } movieClip 239 map_railway { } movieClip 242 { } movieClip 243 map_smallWarehouse { } movieClip 246 { } movieClip 247 map_smallDrain { } movieClip 250 { } movieClip 251 map_hellPit { } movieClip 253 { } movieClip 254 { } movieClip 255 projectile_tracer { frame 6 { stop(); } instance of movieClip 254 { onClipEvent (load) { this._xscale = random(80) + 70; this._yscale = random(80) + 20; } } } movieClip 257 { } movieClip 258 particle_shellCasing { frame 30 { stop(); } } movieClip 260 { } movieClip 261 instantCollisionBlock { } movieClip 263 { } movieClip 265 projectile_laser { frame 10 { stop(); } } movieClip 268 particle_smoke { } movieClip 274 { } movieClip 276 { } movieClip 277 projectile_rocket { frame 6 { stop(); } instance of movieClip 276 { onClipEvent (load) { this.onEnterFrame = function () { _root.rocketSmokeParticle(this._parent._x, this._parent._y); }; } } } movieClip 279 { } movieClip 280 { } movieClip 281 projectile_grenade { frame 4 { stop(); } } movieClip 313 projectile_flame { frame 27 { stop(); } } movieClip 314 projectile_dumbRocket { frame 6 { stop(); } instance of movieClip 276 { onClipEvent (load) { this.onEnterFrame = function () { _root.rocketSmokeParticle(this._parent._x, this._parent._y); }; } } } movieClip 316 { } movieClip 317 { } movieClip 318 projectile_emp { frame 6 { stop(); } } movieClip 319 { } movieClip 320 effect_emp { frame 17 { removeMovieClip(this); } } movieClip 324 { } movieClip 328 particle_smokeDamage { frame 7 { stop(); } } movieClip 331 { } movieClip 332 projectile_bertha { frame 40 { stop(); } } movieClip 399 { } movieClip 401 effect_explosion { frame 48 { removeMovieClip(this); } } movieClip 403 { } movieClip 405 { } movieClip 407 { } movieClip 408 effect_nuke { frame 61 { removeMovieClip(this); } } movieClip 411 waypoint { } movieClip 416 { } movieClip 419 { } movieClip 423 { } movieClip 425 { } movieClip 426 { } movieClip 427 { } movieClip 428 capturePoint { } movieClip 431 { } movieClip 432 { } movieClip 433 pickUp { frame 86 { gotoAndPlay('loop'); } frame 99 { removeMovieClip(this); } frame 115 { removeMovieClip(this); } } movieClip 440 { frame 1 { stop(); _root.playSound('sound_buttonUp'); } } movieClip 441 trapTrigger { } movieClip 448 { } movieClip 449 { frame 1 { stop(); } } movieClip 450 { frame 1 { stop(); } frame 13 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 40 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 452 rocketTrap { } movieClip 453 { frame 1 { stop(); } frame 21 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); } } frame 48 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 455 laserTrap { } movieClip 462 { frame 6 { stop(); } } movieClip 463 decal_bulletHit { instance of movieClip 462 { onClipEvent (load) { this._rotation = random(60) - 70; this._yscale = random(30) + 20; this._xscale = this._yscale; } } instance of movieClip 462 { onClipEvent (load) { this._rotation = random(90) - 70; this._yscale = random(30) + 20; this._xscale = this._yscale; } } } movieClip 470 { } movieClip 471 particle_concrete { frame 1 { stop(); } instance of movieClip 470 { onClipEvent (load) { this.gotoAndStop(random(6) + 1); } } } movieClip 474 particle_fireSpark { } movieClip 476 particle_blood { } movieClip 477 decal_bulletHitMech { instance of movieClip 462 { onClipEvent (load) { this._rotation = random(60) - 70; this._yscale = random(50) + 30; this._xscale = this._yscale; } } instance of movieClip 462 { onClipEvent (load) { this._rotation = random(90) - 70; this._yscale = random(50) + 30; this._xscale = this._yscale; } } } movieClip 479 particle_leg { } movieClip 481 particle_arm { } movieClip 483 particle_bodyChunk { } movieClip 485 particle_bigBlood { } movieClip 492 particle_metalFragment { frame 12 { stop(); } } movieClip 495 { } movieClip 498 { } movieClip 500 { } movieClip 501 repeater { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 15 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 505 { } movieClip 506 { } movieClip 507 laser { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } frame 50 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 510 { } movieClip 513 rocketLauncher { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 16 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 519 flamer { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } frame 7 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 520 dumbRocketLauncher { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 40 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 523 { } movieClip 524 assaultCannon { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 10 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 527 { } movieClip 530 shotCannon { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 20 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 532 { } movieClip 536 { } movieClip 537 grenadeLauncher { frame 1 { stop(); } instance overheat of movieClip 536 { onClipEvent (load) { this._alpha = 0; } } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } frame 16 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 538 assaultRifle { frame 1 { stop(); } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 15 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 540 { } movieClip 541 { } movieClip 545 { } movieClip 546 emp { frame 1 { stop(); } instance overheat of movieClip 500 { onClipEvent (load) { this._alpha = 0; } } frame 6 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } frame 60 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 548 { } movieClip 552 proxMine { frame 1 { stop(); } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); } } frame 31 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 554 { } movieClip 555 RPG { frame 1 { stop(); } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); } } instance of movieClip 449 { onClipEvent (load) { this.gotoAndStop(random(4) + 1); } } frame 100 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 560 { } movieClip 561 bertha { frame 1 { stop(); } frame 5 { if (this.heat < this.heatMax) { this.firingAnim = true; _root.fireWeapon(this._name, this, this._parent, this._parent._parent); play(); } else { this.firingAnim = false; gotoAndStop('idle'); if (this.ai == false) { _root.checkOverheat(this); } } } frame 90 { this.firingAnim = false; if (this.ai == true) { this.firing = false; } if (this.firing == true) { gotoAndPlay('fire'); } else { gotoAndStop('idle'); } } } movieClip 564 { } movieClip 567 { } movieClip 570 { } movieClip 572 { } movieClip 575 { } movieClip 577 { } movieClip 580 { } movieClip 581 { } movieClip 583 { } // unknown tag 88 length 67 movieClip 586 { } movieClip 588 { } movieClip 590 { } movieClip 592 { } movieClip 594 { } movieClip 596 { } movieClip 598 { } movieClip 600 { } movieClip 602 { } movieClip 603 { } movieClip 604 { frame 1 { stop(); } } movieClip 606 { } // unknown tag 88 length 67 movieClip 615 { } movieClip 616 { } movieClip 619 { } movieClip 622 { } movieClip 624 { } movieClip 626 { frame 1 { stop(); } } // unknown tag 88 length 46 // unknown tag 88 length 46 movieClip 643 { } // unknown tag 88 length 46 movieClip 655 { frame 1 { stop(); } frame 11 { _root.endBattleText(_root.wonCurrentBattle); } frame 27 { stop(); } frame 56 { _root.destroyInterface(); } } movieClip 656 hud { } movieClip 658 { } movieClip 659 { } movieClip 660 mouseCursor { } movieClip 662 { } movieClip 663 saveAnim { frame 50 { removeMovieClip(this); } } movieClip 674 preBattleScreen { frame 11 { var battleReady = new Array('GET READY', 'PUNCH IT', 'GO GET \'EM', 'DO IT', 'READY', 'COME ON', 'BRING IT'); hints.text = battleReady[random(battleReady.length)]; gameType.text = _root.currentLevel.name; gameTask.text = _root.currentLevel.desc; } frame 120 { _root.game.state = 'unpaused'; removeMovieClip(this); } } // unknown tag 88 length 67 movieClip 681 achievementPanel { } movieClip 683 { } movieClip 685 { } movieClip 686 { } // unknown tag 88 length 67 movieClip 690 { } movieClip 691 dialogBox { instance blackOut of movieClip 683 { onClipEvent (load) { this.onRelease = function () {}; this.useHandCursor = false; } } } movieClip 699 { } movieClip 700 { instance continueCampaign of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } instance newCampaign of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } instance options of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } instance playMoreGames of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } instance howToPlay of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } instance credits of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } instance achievements of movieClip 626 { onClipEvent (load) { _root.buttonSetup_mainMenu(this._name); } } } movieClip 701 { frame 13 { stop(); } } movieClip 707 { instance low of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance medium of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance high of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance effectsOff of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance effectsOn of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance musicOff of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance musicOn of movieClip 626 { onClipEvent (load) { _root.buttonSetup_options(this._name); } } instance back of movieClip 626 { onClipEvent (load) { _root.buttonSetup_optionsBack(this._name); } } } movieClip 709 { } movieClip 714 { frame 1 { stop(); } } movieClip 715 { } movieClip 718 { instance back of movieClip 626 { onClipEvent (load) { _root.buttonSetup_genericBack('achievements', this._name); } } instance crowdPleaser of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance explosivo of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance centurian of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance fireman of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance failure of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance bigMoney of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance prepared of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance domemaster of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance juggernaut of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance slaughterMaster of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } } movieClip 724 { instance back of movieClip 626 { onClipEvent (load) { _root.buttonSetup_genericBack('credits', this._name); } } } movieClip 739 { instance back of movieClip 626 { onClipEvent (load) { _root.buttonSetup_genericBack('instructions', this._name); } } } movieClip 742 { } movieClip 743 { frame 9 { stop(); } } movieClip 744 menu { instance options of movieClip 707 { onClipEvent (load) { this._visible = false; } } instance achievements of movieClip 718 { onClipEvent (load) { this._visible = false; } } instance credits of movieClip 724 { onClipEvent (load) { this._visible = false; } } instance instructions of movieClip 739 { onClipEvent (load) { this._visible = false; } } } movieClip 745 blackOut { } // unknown tag 88 length 67 // unknown tag 88 length 67 // unknown tag 88 length 67 movieClip 760 { } movieClip 762 { } movieClip 765 { } movieClip 802 { frame 1 { stop(); } } // unknown tag 88 length 67 // unknown tag 88 length 67 movieClip 812 { } movieClip 814 { } movieClip 816 { } movieClip 819 { } movieClip 827 { } movieClip 829 { } movieClip 830 { instance of movieClip 819 { onClipEvent (load) { this.onPress = function () {}; } } instance cont of movieClip 132 { onClipEvent (load) { this.onRollOver = function () { this.gotoAndStop('over'); _root.playRollOverSound(); _root.inventory.welcome.continue_label.colorTo(16777215); }; this.onRollOut = function () { this.gotoAndStop('off'); _root.inventory.welcome.continue_label.colorTo(null); }; this.onRelease = function () { _root.playClickSound(); _root.inventory.welcome._visible = false; _root.inventory.distort.gotoAndPlay(1); }; } } } movieClip 832 { } movieClip 833 { instance back of movieClip 626 { onClipEvent (load) { _root.buttonSetup_genericBackAch('achievements', this._name); } } instance crowdPleaser of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance explosivo of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance centurian of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance fireman of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance failure of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance bigMoney of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance prepared of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance domemaster of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance juggernaut of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } instance slaughterMaster of movieClip 715 { onClipEvent (load) { this.backing._visible = false; } } } movieClip 834 { frame 9 { stop(); } } movieClip 851 { } movieClip 853 { } movieClip 866 { instance of movieClip 819 { onClipEvent (load) { this.onPress = function () {}; } } instance cont of movieClip 132 { onClipEvent (load) { this.onRollOver = function () { this.gotoAndStop('over'); _root.playRollOverSound(); _root.inventory.ending.continue_label.colorTo(16777215); }; this.onRollOut = function () { this.gotoAndStop('off'); _root.inventory.ending.continue_label.colorTo(null); }; this.onRelease = function () { _root.playClickSound(); _root.loadMenu(); _root.removeInventory(); }; } } instance moreGames of movieClip 132 { onClipEvent (load) { this.onRollOver = function () { this.gotoAndStop('over'); _root.playRollOverSound(); _root.inventory.ending.moreGames_label.colorTo(16777215); }; this.onRollOut = function () { this.gotoAndStop('off'); _root.inventory.ending.moreGames_label.colorTo(null); }; this.onRelease = function () { _root.playClickSound(); getURL('http://armorgames.com/', '_blank'); }; } } } movieClip 869 { } movieClip 870 { } movieClip 879 { } movieClip 881 { } movieClip 883 { } movieClip 885 { } // unknown tag 88 length 67 movieClip 893 { } // unknown tag 88 length 67 movieClip 897 { } movieClip 899 { } movieClip 906 btn_weaponsList { } movieClip 909 { frame 1 { stop(); } instance of movieClip 899 { onClipEvent (load) { this.onRelease = function () {}; } } instance repeater of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance assaultCannon of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance flamer of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance shotCannon of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance grenadeLauncher of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance rocketLauncher of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance proxMine of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance dumbRocketLauncher of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance emp of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance laser of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance remove of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance cancel of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name); } } instance bertha of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'weapon'); } } instance heatSync of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'gear'); } } instance impactShield of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'gear'); } } instance burnShield of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'gear'); } } instance empShield of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'gear'); } } instance remove of movieClip 906 btn_weaponsList { onClipEvent (load) { _root.buttonSetup_mechWeapons(this._name, 'gear'); } } } movieClip 911 { } movieClip 918 { } movieClip 919 { } movieClip 920 { } movieClip 922 { } movieClip 923 { instance blackOut of movieClip 683 { onClipEvent (load) { this.onPress = function () {}; this.useHandCursor = false; } } instance cont of movieClip 132 { onClipEvent (load) { this.onRollOver = function () { this.gotoAndStop('over'); _root.playRollOverSound(); _root.inventory.help.continue_label.colorTo(16777215); }; this.onRollOut = function () { this.gotoAndStop('off'); _root.inventory.help.continue_label.colorTo(null); }; this.onRelease = function () { _root.playClickSound(); _root.inventory.help._visible = false; _root.inventory.distort.gotoAndPlay(1); }; } } } movieClip 924 inventoryScreen { frame 1 { stop(); } instance buy of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance sell of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance battle of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance slot1 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot2 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot3 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot4 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot5 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot6 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot7 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot8 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot9 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot10 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot11 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot12 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot14 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot13 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot17 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot15 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot16 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance slot18 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_shop(this._name); } } instance gearSlot1 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'gear'); this.ownedText.text = ''; } } instance gearSlot2 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'gear'); this.ownedText.text = ''; } } instance gearSlot3 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'gear'); this.ownedText.text = ''; } } instance gearSlot4 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'gear'); this.ownedText.text = ''; } } instance weaponSlot2 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'weapon'); this.ownedText.text = ''; } } instance weaponSlot3 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'weapon'); this.ownedText.text = ''; } } instance weaponSlot1 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'weapon'); this.ownedText.text = ''; } } instance weaponSlot4 of movieClip 802 { onClipEvent (load) { _root.buttonSetup_mech(this._name, 'weapon'); this.ownedText.text = ''; } } instance equip of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance abort of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance achieve of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance welcome of movieClip 830 { onClipEvent (load) { if (_root.playingContinue) { this._visible = false; } } } instance achBG of movieClip 832 { onClipEvent (load) { this._visible = false; } } instance achievements of movieClip 833 { onClipEvent (load) { this._visible = false; } } frame 4 { _root.updateInventory(); } instance abort of movieClip 132 { onClipEvent (load) { _root.buttonSetup_inventory(this._name); } } instance popUp of movieClip 909 { onClipEvent (load) { this._visible = false; } } instance help of movieClip 923 { onClipEvent (load) { if (_root.playingContinue) { this._visible = false; } } } } movieClip 928 { } movieClip 931 gate { } movieClip 937 { frame 1 { gotoAndPlay(random(10)); } } movieClip 938 { instance of movieClip 615 { onClipEvent (load) { gotoAndPlay(random(4)); } } instance of movieClip 615 { onClipEvent (load) { gotoAndPlay(random(4)); } } instance of movieClip 615 { onClipEvent (load) { gotoAndPlay(random(4)); } } instance of movieClip 615 { onClipEvent (load) { gotoAndPlay(random(4)); } } } movieClip 941 electricTrap { instance bottomSpark of movieClip 938 { onClipEvent (load) { this._visible = false; } } instance topSpark of movieClip 70 { onClipEvent (load) { this._visible = false; } } } movieClip 942 blankMovie { } movieClip 943 { frame 1 { stop(); } } movieClip 1008 { frame 1 { stop(); } } frame 6 { function setupAchievements() { achievementCount = 0; for (aan in allAchievementNames) { if (saveGameData.data[allAchievementNames[aan]] == true) { ++achievementCount; } } if (achievementCount >= allAchievementNames.length) { allAchievementsUnlocked = true; bertha_owned = 1; } } function unlockAchievement(aName) { if (saveGameData.data[aName] != true) { ++achPanels; if (achPanels > 50) { achPanels = 1; } ++numActiveAchPanels; _root.attachMovie('achievementPanel', 'achievementPanel' + achPanels, depth_achievementPanel + achPanels); _root['achievementPanel' + achPanels]._x = Stage.width / 2; _root['achievementPanel' + achPanels]._y = -50; saveGameData.data[aName] = true; achievementCount = 0; for (aan in allAchievementNames) { if (saveGameData.data[allAchievementNames[aan]] == true) { ++achievementCount; } } if (achievementCount >= allAchievementNames.length) { allAchievementsUnlocked = true; bertha_owned = 1; } _root['achievementPanel' + achPanels].title.text = _root['achievement_' + aName].name.toUpperCase(); if (_root['achievement_' + aName].name == 'crowdPleaser') { _root['achievementPanel' + achPanels].title.text = 'CROWD PLEASER'; } if (_root['achievement_' + aName].name == 'frickenLasers') { _root['achievementPanel' + achPanels].title.text = 'FRICKEN\' LASERS'; } if (_root['achievement_' + aName].name == 'bigMoney') { _root['achievementPanel' + achPanels].title.text = 'BIG MONEY'; } if (_root['achievement_' + aName].name == 'gunNut') { _root['achievementPanel' + achPanels].title.text = 'GUN NUT'; } if (_root['achievement_' + aName].name == 'runninHot') { _root['achievementPanel' + achPanels].title.text = 'RUNNIN\' HOT'; } if (_root['achievement_' + aName].name == 'iComeInPeace') { _root['achievementPanel' + achPanels].title.text = 'I COME IN PEACE'; } if (_root['achievement_' + aName].name == 'juggernaut') { _root['achievementPanel' + achPanels].title.text = 'I\'M THE JUGGERNAUT'; } if (_root['achievement_' + aName].name == 'slaughterMaster') { _root['achievementPanel' + achPanels].title.text = 'SLAUGHTER MASTER'; } _root['achievementPanel' + achPanels].desc.text = _root['achievement_' + aName].description.toUpperCase(); _root['achievementPanel' + achPanels].bonus.text = achievementCount + '/' + allAchievementNames.length; achPanelSlideLoc = 25; if (numActiveAchPanels > 1) { achPanelSlideLoc = _root['achievementPanel' + achPanels]._height * numActiveAchPanels - 25; } _root['achievementPanel' + achPanels].ySlideTo(achPanelSlideLoc, 0.2); _root['achievementPanel' + achPanels].ySlideTo(-50, 0.3, 'linear', achievementShowTime, function () { --_root.numActiveAchPanels; }); _root['achievementPanel' + achPanels]._visible = true; playSound('sound_achievementUnlocked'); } else {} } function setupAchievementsPage(source) { for (sap in allAchievementNames) { _root[source].achievements[allAchievementNames[sap]].title.text = _root['achievement_' + allAchievementNames[sap]].name.toUpperCase(); if (_root['achievement_' + allAchievementNames[sap]].name == 'crowdPleaser') { _root[source].achievements[allAchievementNames[sap]].title.text = 'CROWD PLEASER'; } if (_root['achievement_' + allAchievementNames[sap]].name == 'frickenLasers') { _root[source].achievements[allAchievementNames[sap]].title.text = 'FRICKEN\' LASERS'; } if (_root['achievement_' + allAchievementNames[sap]].name == 'bigMoney') { _root[source].achievements[allAchievementNames[sap]].title.text = 'BIG MONEY'; } if (_root['achievement_' + allAchievementNames[sap]].name == 'gunNut') { _root[source].achievements[allAchievementNames[sap]].title.text = 'GUN NUT'; } if (_root['achievement_' + allAchievementNames[sap]].name == 'runninHot') { _root[source].achievements[allAchievementNames[sap]].title.text = 'RUNNIN\' HOT'; } if (_root['achievement_' + allAchievementNames[sap]].name == 'iComeInPeace') { _root[source].achievements[allAchievementNames[sap]].title.text = 'I COME IN PEACE'; } if (_root['achievement_' + aName].name == 'juggernaut') { _root['achievementPanel' + achPanels].title.text = 'I\'M THE JUGGERNAUT'; } if (_root['achievement_' + allAchievementNames[sap]].name == 'slaughterMaster') { _root[source].achievements[allAchievementNames[sap]].title.text = 'SLAUGHTER MASTER'; } _root[source].achievements[allAchievementNames[sap]].desc.text = _root['achievement_' + allAchievementNames[sap]].description.toUpperCase(); if (saveGameData.data[allAchievementNames[sap]] == true) { _root[source].achievements[allAchievementNames[sap]]._alpha = 100; _root[source].achievements[allAchievementNames[sap]].lockIcon.gotoAndStop('unlocked'); } else { _root[source].achievements[allAchievementNames[sap]]._alpha = 50; } } } function showSavingGameIcon(upgrades) { _root.attachMovie('saveAnim', 'saveAnim', depth_saveAnim); saveAnim._yscale = 70; saveAnim._xscale = 70; saveAnim._alpha = 70; saveAnim._x = 300; saveAnim._y = 480; if (upgrades == true) { saveAnim._alpha = 0; } } function checkForSaveGame() { if (saveGameData.data.gameName != undefined) { saveGameExists = true; } else { saveGameExists = false; } } function saveGameSettings() { saveGameData.data.qualitySetting = _quality; saveGameData.data.soundEffectsOn = soundEffectsOn; saveGameData.data.musicOn = musicOn; saveGameData.data.helpEnabled = helpEnabled; saveGameData.data.helpArrayIndex = helpArrayIndex; } function loadGameSettings() { if (saveGameData.data.qualitySetting != undefined) { _quality = saveGameData.data.qualitySetting; soundEffectsOn = saveGameData.data.soundEffectsOn; musicOn = saveGameData.data.musicOn; if (saveGameData.data.helpEnabled != undefined) { helpEnabled = saveGameData.data.helpEnabled; helpArrayIndex = saveGameData.data.helpArrayIndex; } } } function saveGame(upgrades) { saveGameData.data.difficulty = difficulty; saveGameData.data.gameName = 'Juggerdome'; saveGameData.data.currentLevelName = currentLevel.name; saveGameData.data.missionNumber = mission; saveGameData.data.totalCredits = totalCredits; saveGameData.data.repeater_owned = repeater_owned; saveGameData.data.assaultCannon_owned = assaultCannon_owned; saveGameData.data.shotCannon_owned = shotCannon_owned; saveGameData.data.rocketLauncher_owned = rocketLauncher_owned; saveGameData.data.dumbRocketLauncher_owned = dumbRocketLauncher_owned; saveGameData.data.laser_owned = laser_owned; saveGameData.data.flamer_owned = flamer_owned; saveGameData.data.grenadeLauncher_owned = grenadeLauncher_owned; saveGameData.data.proxMine_owned = proxMine_owned; saveGameData.data.emp_owned = emp_owned; saveGameData.data.heatSync_owned = heatSync_owned; saveGameData.data.impactShield_owned = impactShield_owned; saveGameData.data.burnShield_owned = burnShield_owned; saveGameData.data.empShield_owned = empShield_owned; saveGameData.data.armorLevel = weapon_armor.level; saveGameData.data.speedLevel = weapon_speed.level; saveGameData.data.turretSlotsLevel = weapon_turretSlots.level; saveGameData.data.turretSpeedLevel = weapon_turretSpeed.level; saveGameData.data.career_shotsFired = career_shotsFired; saveGameData.data.career_shotsMissed = career_shotsMissed; saveGameData.data.career_prisonersKilled = career_prisonersKilled; saveGameData.data.career_mechsKilled = career_mechsKilled; saveGameData.data.career_eventsWon = career_eventsWon; saveGameData.data.career_eventsLost = career_eventsLost; saveGameData.data.career_itemsPurchased = career_itemsPurchased; saveGameData.data.career_itemsSold = career_itemsSold; saveGameData.data.career_collectedCredits = career_collectedCredits; saveGameData.data.career_bonusCredits = career_bonusCredits; saveGameData.data.career_prizeCredits = career_prizeCredits; sgs = 1; while (sgs < 5) { saveGameData.data['weaponSlot' + sgs] = _root.inventory['weaponSlot' + sgs].lastWeapon; saveGameData.data['gearSlot' + sgs] = _root.inventory['gearSlot' + sgs].lastWeapon; ++sgs; } if (saveGameData.data.gameName != undefined) { showSavingGameIcon(upgrades); } } function loadGameInfo() { playerTeam.team = saveGameData.data.teamName; compTeam.team = saveGameData.data.enemyTeamName; loadedMission = saveGameData.data.missionNumber; difficulty = saveGameData.data.difficulty; if (saveGameData.data.difficulty == undefined) { difficulty = 'regular'; } } function loadGame() { saveGameData.data.difficulty = difficulty; difficulty = saveGameData.data.difficulty; mission = saveGameData.data.missionNumber; totalCredits = saveGameData.data.totalCredits; repeater_owned = saveGameData.data.repeater_owned; assaultCannon_owned = saveGameData.data.assaultCannon_owned; shotCannon_owned = saveGameData.data.shotCannon_owned; rocketLauncher_owned = saveGameData.data.rocketLauncher_owned; dumbRocketLauncher_owned = saveGameData.data.dumbRocketLauncher_owned; laser_owned = saveGameData.data.laser_owned; flamer_owned = saveGameData.data.flamer_owned; grenadeLauncher_owned = saveGameData.data.grenadeLauncher_owned; proxMine_owned = saveGameData.data.proxMine_owned; emp_owned = saveGameData.data.emp_owned; heatSync_owned = saveGameData.data.heatSync_owned; impactShield_owned = saveGameData.data.impactShield_owned; burnShield_owned = saveGameData.data.burnShield_owned; empShield_owned = saveGameData.data.empShield_owned; weapon_armor.level = saveGameData.data.armorLevel; weapon_speed.level = saveGameData.data.speedLevel; weapon_turretSlots.level = saveGameData.data.turretSlotsLevel; weapon_turretSpeed.level = saveGameData.data.turretSpeedLevel; career_shotsFired = saveGameData.data.career_shotsFired; career_shotsMissed = saveGameData.data.career_shotsMissed; career_prisonersKilled = saveGameData.data.career_prisonersKilled; career_mechsKilled = saveGameData.data.career_mechsKilled; career_eventsWon = saveGameData.data.career_eventsWon; career_eventsLost = saveGameData.data.career_eventsLost; career_itemsPurchased = saveGameData.data.career_itemsPurchased; career_itemsSold = saveGameData.data.career_itemsSold; career_collectedCredits = saveGameData.data.career_collectedCredits; career_bonusCredits = saveGameData.data.career_bonusCredits; career_prizeCredits = saveGameData.data.career_prizeCredits; sgs = 1; while (sgs < 5) { _root.inventory['weaponSlot' + sgs].lastWeapon = saveGameData.data['weaponSlot' + sgs]; _root.inventory['gearSlot' + sgs].lastWeapon = saveGameData.data['gearSlot' + sgs]; ++sgs; } } function resetCareerStats() { career_shotsFired = 0; career_shotsMissed = 0; career_prisonersKilled = 0; career_mechsKilled = 0; career_eventsWon = 0; career_eventsLost = 0; career_itemsPurchased = 0; career_itemsSold = 0; career_collectedCredits = 0; career_bonusCredits = 0; career_prizeCredits = 0; } function showEndingStats() { inventory.ending.shotsFired.text = _root.career_shotsFired; _root.endingAccuracy = (_root.career_shotsMissed / _root.career_shotsFired) * 100; _root.endingAccuracy *= 1000; _root.endingAccuracy = Math.round(_root.endingAccuracy); _root.endingAccuracy /= 1000; inventory.ending.accuracy.text = _root.endingAccuracy + '%'; inventory.ending.prisonersKilled.text = _root.career_prisonersKilled; inventory.ending.mechsKilled.text = _root.career_mechsKilled; inventory.ending.eventsWon.text = _root.career_eventsWon; inventory.ending.eventsLost.text = _root.career_eventsLost; inventory.ending.itemsPurchased.text = _root.career_itemsPurchased; inventory.ending.itemsSold.text = _root.career_itemsSold; inventory.ending.collectedCredits.text = _root.career_collectedCredits; inventory.ending.bonusCredits.text = _root.career_bonusCredits; inventory.ending.prizeCredits.text = _root.career_prizeCredits; _root.endingTotalCredits = _root.career_collectedCredits + _root.career_prizeCredits + _root.career_bonusCredits; inventory.ending.totalCredits.text = _root.endingTotalCredits; } function showDialogBox(contents) { _root.attachMovie('dialogBox', 'dialogBox', depth_dialog); dialogBox.blackOut._alpha = 0; dialogBox.backing._alpha = 0; dialogBox.button1._alpha = 0; dialogBox.button2._alpha = 0; dialogBox.button3._alpha = 0; dialogBox.button1._visible = false; dialogBox.button2._visible = false; dialogBox.button3._visible = false; dialogBox.backing._visible = true; dialogBox.textBoxes._alpha = 0; dialogBox.textBoxes.headingText.autoSize = 'center'; dialogBox.textBoxes.bodyText.autoSize = 'center'; dialogBox.textBoxes.headingText.text = contents.heading; dialogBox.textBoxes.bodyText.text = contents.body; dialogBox.backing._width = dialogBox.textBoxes.bodyText._width + 30; dialogBox.backing._height = dialogBox.textBoxes.headingText._height + dialogBox.textBoxes.bodyText._height + 20; if (contents.button1Active == true) { dialogBox.backing._height += 40; } if (contents.button1Active == true && contents.button2Active != true && contents.button3Active != true) { dialogBox.button1.textClip.btnText.text = contents.button1Desc; dialogBox.button1.backing.gotoAndStop('over'); dialogBox.button1._y = dialogBox.backing._height - 100; dialogBox.button1._visible = true; dialogBox.button1.alphaTo(100, 0.6, 'easeOutSine', 0.4); dialogBox.button1.onRelease = contents.button1Action; dialogBox.button1.onRollOver = playRollOverSound; } if (contents.button1Active == true && contents.button2Active == true && contents.button3Active != true) { dialogBox.button1.textClip.btnText.text = contents.button1Desc; dialogBox.button2.textClip.btnText.text = contents.button2Desc; dialogBox.button1.backing.gotoAndStop('over'); dialogBox.button2.backing.gotoAndStop('over'); dialogBox.button1._x = -50; dialogBox.button2._x = 50; dialogBox.button2._y = dialogBox.backing._height - 100; dialogBox.button1._y = dialogBox.button2._y; dialogBox.button1._visible = true; dialogBox.button2._visible = true; dialogBox.button1.alphaTo(100, 0.6, 'easeOutSine', 0.4); dialogBox.button2.alphaTo(100, 0.6, 'easeOutSine', 0.4); dialogBox.button1.onRelease = contents.button1Action; dialogBox.button2.onRelease = contents.button2Action; dialogBox.button1.onRollOver = playRollOverSound; dialogBox.button2.onRollOver = playRollOverSound; } if (contents.button1Active == true && contents.button2Active == true && contents.button3Active == true) { dialogBox.backing._height = 150; dialogBox.button1.textClip.btnText.text = contents.button1Desc; dialogBox.button2.textClip.btnText.text = contents.button2Desc; dialogBox.button3.textClip.btnText.text = contents.button3Desc; dialogBox.button1._visible = true; dialogBox.button2._visible = true; dialogBox.button3._visible = true; dialogBox.button3._y = dialogBox.backing._height - 40; dialogBox.button2._y = dialogBox.backing._height - 75; dialogBox.button1._y = dialogBox.backing._height - 110; dialogBox.button1.alphaTo(100, 0.6, 'easeOutSine', 0.4); dialogBox.button2.alphaTo(100, 0.6, 'easeOutSine', 0.4); dialogBox.button3.alphaTo(100, 0.6, 'easeOutSine', 0.4); dialogBox.button1.onRelease = contents.button1Action; dialogBox.button2.onRelease = contents.button2Action; dialogBox.button3.onRelease = contents.button3Action; dialogBox.button1.onRollOver = playRollOverSound; dialogBox.button2.onRollOver = playRollOverSound; dialogBox.button3.onRollOver = playRollOverSound; } dialogBox._x = 305; dialogBox._y = 240; dialogBox.blackOut.alphaTo(60, 0.8, 'easeOutSine'); dialogBox.backing.alphaTo(100, 0.6, 'easeOutSine'); dialogBox.textBoxes.alphaTo(100, 0.6, 'easeOutSine', 0.4); } function closeDialogBox() { dialogBox.alphaTo(0, 0.1, 'easeOutSine', 0, function () { removeMovieClip(this); }); } function initDialogBoxes() { dialog_selectDifficulty = new Object(); dialog_selectDifficulty.heading = 'SELECT DIFFICULTY'; dialog_selectDifficulty.body = 'What kind of commander are you?'; dialog_selectDifficulty.button1Active = true; dialog_selectDifficulty.button2Active = true; dialog_selectDifficulty.button3Active = true; dialog_selectDifficulty.button1Desc = 'RECRUIT'; dialog_selectDifficulty.button2Desc = 'REGULAR'; dialog_selectDifficulty.button3Desc = 'HARDENED'; dialog_selectDifficulty.button1Action = function () { _root.menu.teamSelect.alphaTo(0, 0.4, 'easeOutSine', 0, function () { this._visible = false; }); _root.difficulty = 'recruit'; playClickSound(); loadMapScreen(); closeDialogBox(); }; dialog_selectDifficulty.button2Action = function () { _root.menu.teamSelect.alphaTo(0, 0.4, 'easeOutSine', 0, function () { this._visible = false; }); _root.difficulty = 'regular'; playClickSound(); loadMapScreen(); closeDialogBox(); }; dialog_selectDifficulty.button3Action = function () { _root.menu.teamSelect.alphaTo(0, 0.4, 'easeOutSine', 0, function () { this._visible = false; }); _root.difficulty = 'hardened'; playClickSound(); loadMapScreen(); closeDialogBox(); }; dialog_startNewCampaign = new Object(); dialog_startNewCampaign.heading = 'START A NEW GAME?'; dialog_startNewCampaign.body = 'Starting a new game will overwrite\ryour previous save game:\r\rEVENT - ' + saveGameData.data.missionNumber + '\r\rAchievements will NOT be reset.\rAre you sure?'; dialog_startNewCampaign.button1Active = true; dialog_startNewCampaign.button2Active = true; dialog_startNewCampaign.button1Desc = 'ACCEPT'; dialog_startNewCampaign.button2Desc = 'CANCEL'; dialog_startNewCampaign.button1Action = function () { playClickSound(); newGameReset(); loadWelcomeScreen(); setupInventory(); closeDialogBox(); }; dialog_startNewCampaign.button2Action = function () { playClickSound(); closeDialogBox(); }; dialog_continueCampaign = new Object(); dialog_continueCampaign.heading = 'CONTINUE GAME?'; dialog_continueCampaign.body = 'Continue battling your way through\rJuggerdome from:\r\rEVENT - ' + saveGameData.data.missionNumber + '\r\rAre you sure?'; dialog_continueCampaign.button1Active = true; dialog_continueCampaign.button2Active = true; dialog_continueCampaign.button1Desc = 'ACCEPT'; dialog_continueCampaign.button2Desc = 'CANCEL'; dialog_continueCampaign.button1Action = function () { playingContinue = true; playClickSound(); loadGame(); setupInventory(); resetEquipped(); closeDialogBox(); }; dialog_continueCampaign.button2Action = function () { playClickSound(); closeDialogBox(); }; dialog_newGameSaved = new Object(); dialog_newGameSaved.heading = 'NEW GAME'; dialog_newGameSaved.body = 'A new save game has been created.\r\rProgress will be saved for you\rautomatically during the campaign.'; dialog_newGameSaved.button1Active = true; dialog_newGameSaved.button2Active = false; dialog_newGameSaved.button1Desc = 'OK'; dialog_newGameSaved.button1Action = function () { playClickSound(); newGameReset(); setupInventory(); closeDialogBox(); }; dialog_tutorial = new Object(); dialog_tutorial.heading = 'TUTORIAL'; dialog_tutorial.body = 'This is your first time playing Warfare 1944, it is highly recommended\ryou watch the short tutorial presentation.'; dialog_tutorial.button1Active = true; dialog_tutorial.button2Active = true; dialog_tutorial.button1Desc = 'OK'; dialog_tutorial.button2Desc = 'NO THANKS'; dialog_tutorial.button1Action = function () { playClickSound(); closeDialogBox(); loadTutorial(); }; dialog_tutorial.button2Action = function () { playClickSound(); closeDialogBox(); loadCampaignSelect(); }; } function debugTools() { if (debugMode == true) { setupConsole(); _root.attachMovie('fpsChecker', 'fpsCheck', depth_DEBUG_fps); _root.fpsCheck._x = Stage.width / 2; _root.fpsCheck._y = 25; _root.fpsCheck._alpha = 70; _root.fpsCheck._visible = false; _root.fpsCheck.onEnterFrame = function () { fpsTime = getTimer(); framerate = Math.round(1000 / (fpsTime - oldTime)); --updateFPScount; if (updateFPScount < 0) { this.fpsText.text = 'FPS: ' + framerate; updateFPScount = updateFPScountMax; if (framerate <= 20) { this.fpsText.colorTo(10027008); } else { this.fpsText.colorTo(16777215); } } oldTime = fpsTime; }; } } function showfps() { if (_root.fpsCheck._visible == true) { _root.fpsCheck._visible = false; } else { _root.fpsCheck._visible = true; } } function newGameReset() { endBattleReset(); mission = 1; currentLevel = level1; weaponSlotsAvailable = 2; weapon_armor.level = 1; weapon_speed.level = 1; weapon_turretSlots.level = 1; weapon_turretSpeed.level = 1; weaponListPlayer = new Array('empty', 'empty', 'empty', 'empty'); playingContinue = false; resetCareerStats(); initPlayerStocks(); } function endBattleReset() { lastRandomSpawn = 'left'; hudTintedGreen = false; hudTintedRed = false; hudTintedYellow = false; eventOverheats = 0; eventShotsFired = 0; lastPlayerHealth = 100; numEnemies = 0; numEffects = 0; rounds = 0; enemyCount = 0; bonusCollected = 0; crowd_bonusCredits = 0; allOnScreen = new Array(); targetArray = new Array(); friendsOnScreen = new Array(); enemiesOnScreen = new Array(); roundsOnScreen = new Array(); allDrops = new Array(); } function setTimer() { timerSeconds = currentLevel.timerSeconds; timerMinutes = currentLevel.timerMinutes; } function timerTick() { if (timerActive) { --timerSeconds; if (timerSeconds < 0) { timerSeconds = timerSecondsMax; --timerMinutes; } if (timerSeconds < 10 && timerMinutes < 10) { timerDisplay = '0' + timerMinutes + ':0' + timerSeconds; } else { if (timerSeconds < 10 && timerMinutes > 10) { timerDisplay = timerMinutes + ':0' + timerSeconds; } else { if (timerSeconds > 10 && timerMinutes < 10) { timerDisplay = '0' + timerMinutes + ':' + timerSeconds; } else { timerDisplay = timerMinutes + ':' + timerSeconds; } } } if (timerMinutes < 0) { timerDisplay = '00:00'; if (numEnemies > 1) { timerDisplay = 'FINISH THEM!'; } spawnEnemyActive = false; if (numEnemies < 1) { endBattle(true); } if (currentLevel.gameMode == 'battleRoyal') { setTimeout(defaultWin, 6000); } } updateTimer(); } } function updateTimer() { if (currentLevel.gameMode == 'survival' || 'battleRoyal') { hud.survival.textClip.timer.text = timerDisplay; } } function defaultWin() { if (game.state != 'endBattle') { endBattle(true); } } function missionTimerTick() { ++missionTimerSeconds; ++missionTotalSeconds; if (missionTimerSeconds > missionTimerMax) { missionTimerSeconds = 0; ++missionTimerMinutes; } if (missionTimerSeconds < 10 && missionTimerMinutes < 10) { missionTime = '0' + missionTimerMinutes + ':0' + missionTimerSeconds; } else { if (missionTimerSeconds < 10 && missionTimerMinutes > 10) { missionTime = missionTimerMinutes + ':0' + missionTimerSeconds; } else { if (missionTimerSeconds > 10 && missionTimerMinutes < 10) { missionTime = '0' + missionTimerMinutes + ':' + missionTimerSeconds; } else { missionTime = missionTimerMinutes + ':' + missionTimerSeconds; } } } } function crowdVoice() { if (crowd_killCount >= currentLevel.crowdReact) { playCrowdReact(); crowd_bonusCredits += crowdBonus; showBonus('crowd'); unlockAchievement('crowdPleaser'); } if (crowd_killCount >= 6) { unlockAchievement('slaughterMaster'); } crowd_killCount = 0; } function playCrowdReact() { playSound('sound_crowdReact' + (random(4) + 1)); } function initBattleStats() {} function winBattle() { endBattle(true); } function startBattle() { loop_compAmb.volumeTo(0, 2); spawnEnemyActive = true; hud.attachMovie('preBattleScreen', 'preBattle', depth_HUD_battleScreen); initBattleStats(); eventBodyCount = 0; endOfBattle = false; lastPlayerHealth = 9999999999.0; friendlyFire = currentLevel.friendlyFire; wonCurrentBattle = false; setupGameMode(currentLevel.gameMode); setupEnemyAI(); if (mission == totalMissions) { spawnEnemy('mechHeavyBertha', 'boss'); } } function endBattle(battleWon) { keyListener = null; weaponKeyListener = null; loop_capture.stop(); playSound('sound_endRoundHorn'); setTimeout(playCrowdReact, 1500); Mouse.show(); hud.mouseCursor._visible = false; hud.headsUp.alphaTo(100, 0, 'linear', 1.8, function () { this._visible = true; this.gotoAndPlay('open'); }); game.state = 'endBattle'; bonusCrowd = crowd_bonusCredits; wonCurrentBattle = battleWon; if (battleWon) { prizeTotal = 0; prizeTotal = currentLevel.prizeMoney + bonusCrowd + bonusCollected; totalCredits += prizeTotal; career_collectedCredits += bonusCollected; career_bonusCredits += bonusCrowd; career_prizeCredits += currentLevel.prizeMoney; ++career_eventsWon; } else { prizeTotal = 0; prizeTotal = bonusCrowd + bonusCollected; totalCredits += prizeTotal; ++career_eventsLost; } if (career_prizeCredits + career_collectedCredits + career_bonusCredits >= 100000) { unlockAchievement('bigMoney'); } if (eventShotsFired == 0 && battleWon == true) { unlockAchievement('iComeInPeace'); } if (bodyCount > 100) { unlockAchievement('centurian'); } if (bonusCrowd > 3000) { unlockAchievement('entertainer'); } if (bonusCollected > 2000) { unlockAchievement('hoarder'); } if (bonusCrowd > 5000) { unlockAchievement('domemaster'); } if (eventOverheats > 30) { unlockAchievement('runninHot'); } if (mission >= totalMissions && battleWon == true) { unlockAchievement('freedom'); } hud.headsUp.continueButton.textClip.btnText.text = 'OK'; hud.headsUp.continueButton.backing.gotoAndStop('over'); hud.headsUp.continueButton.onRollOver = function () { playRollOverSound(); this.backing.gotoAndStop('off'); this.textClip.colorTo(0); }; hud.headsUp.continueButton.onRollOut = function () { this.backing.gotoAndStop('over'); this.textClip.colorTo(null); }; hud.headsUp.continueButton.onRelease = function () { playClickSound(); loop_crowdBase.stop(); if (battleWon == true && mission <= totalMissions) { ++mission; currentLevel = _root['level' + mission]; } if (battleWon == true && mission == totalMissions + 1) { showEndingStats(); inventory.ending._visible = true; mission = totalMissions; } endBattleReset(); destroyWorld(); endOfBattle = true; music_gameMusic.stop(); hud.headsUp.gotoAndPlay('close'); restoreInventory(battleWon); updateInventory(); }; } function endBattleText(battleWon) { if (battleWon == true) { hud.headsUp.titleText.text = 'EVENT WON'; hud.headsUp.goalText.text = currentLevel.desc; hud.headsUp.prizeText.text = currentLevel.prizeMoney; hud.headsUp.collectedText.text = bonusCollected; hud.headsUp.crowdText.text = bonusCrowd; hud.headsUp.totalText.text = prizeTotal; } else { hud.headsUp.titleText.text = 'FAILED'; hud.headsUp.goalText.text = deathMessageArray[random(deathMessageArray.length)]; hud.headsUp.prizeText.text = '0'; hud.headsUp.collectedText.text = bonusCollected; hud.headsUp.crowdText.text = bonusCrowd; prizeTotal = 0; prizeTotal = bonusCrowd + bonusCollected; hud.headsUp.totalText.text = prizeTotal; } } function initPlayerStocks() { totalCredits = 2500; repeater_owned = 1; assaultCannon_owned = 0; shotCannon_owned = 0; rocketLauncher_owned = 0; dumbRocketLauncher_owned = 0; laser_owned = 0; flamer_owned = 0; grenadeLauncher_owned = 0; proxMine_owned = 0; emp_owned = 0; bertha_owned = 2; heatSync_owned = 0; impactShield_owned = 0; burnShield_owned = 0; empShield_owned = 0; for (ips in allItems) { _root[allItems[ips].ref + '_equipped'] = 0; } } function resetEquipped() { for (ips in allItems) { _root[allItems[ips].ref + '_equipped'] = 0; } } function updateInventory() { inventory.eventType.text = currentLevel.name; inventory.objective.text = currentLevel.desc; inventory.eventNumber.text = 'EVENT #' + currentLevel.missionNumber; inventory.details.text = currentLevel.details; inventory.opponents.text = currentLevel.opponents; inventory.prizeMoney.text = '$' + currentLevel.prizeMoney; inventory.arenaName.text = _root[currentLevel.arena].name; var v5 = 1; while (v5 < allItems.length + 1) { inventory['slot' + v5].ownedText.text = '' + _root[inventory['slot' + v5].name + '_owned']; ++v5; } inventory.credits.text = totalCredits; inventory.weaponSlot1.active = false; inventory.weaponSlot2.active = false; inventory.weaponSlot3.active = false; inventory.weaponSlot4.active = false; if (weaponSlotsAvailable == 1) { inventory.weaponSlot1.active = true; } if (weaponSlotsAvailable == 2) { inventory.weaponSlot1.active = true; inventory.weaponSlot4.active = true; inventory.weaponSlot2_name.text = 'LOCKED'; inventory.weaponSlot3_name.text = 'LOCKED'; inventory.weaponSlot2.gotoAndStop('locked'); inventory.weaponSlot3.gotoAndStop('locked'); } if (weaponSlotsAvailable == 3) { inventory.weaponSlot1.active = true; inventory.weaponSlot2.active = true; inventory.weaponSlot4.active = true; inventory.weaponSlot3_name.text = 'LOCKED'; inventory.weaponSlot3.gotoAndStop('locked'); } if (weaponSlotsAvailable == 4) { inventory.weaponSlot1.active = true; inventory.weaponSlot2.active = true; inventory.weaponSlot3.active = true; inventory.weaponSlot4.active = true; } var v2 = 1; while (v2 < 5) { if (_root['weapon_' + inventory['weaponSlot' + v2].lastWeapon].name != undefined) { inventory['weaponSlot' + v2 + '_name'].text = _root['weapon_' + inventory['weaponSlot' + v2].lastWeapon].name.toUpperCase(); inventory['weaponSlot' + v2].gotoAndStop(_root['weapon_' + inventory['weaponSlot' + v2].lastWeapon].name); inventory['weaponSlot' + v2].activeCross._visible = false; } else { if (inventory['weaponSlot' + v2].active) { inventory['weaponSlot' + v2 + '_name'].text = 'EMPTY'; inventory['weaponSlot' + v2].gotoAndStop('empty'); } } ++v2; } var v3 = 1; while (v3 < 5) { var v6 = _root['weapon_' + inventory['weaponSlot' + v3].lastWeapon]; inventory['heatBar_slot' + v3].bar._xscale = 0; if (_root['weapon_' + inventory['weaponSlot' + v3].lastWeapon].name != 'empty') { inventory['heatBar_slot' + v3].bar._xscale = Math.round((_root['weapon_' + inventory['weaponSlot' + v3].lastWeapon].heatPerShot / 500) * 100); } ++v3; } var v4 = 1; while (v4 < allItems.length + 1) { inventory.popUp[allItems[v4].ref].weaponText.text = _root['weapon_' + allItems[v4].ref].name.toUpperCase(); inventory.popUp[allItems[v4].ref].ownedText.text = 'x' + Math.round(_root[allItems[v4].ref + '_owned'] - _root[allItems[v4].ref + '_equipped']); ++v4; } totalWeaponStocks(); totalGearStocks(); if (totalWeapons >= 5) { unlockAchievement('gunNut'); } if (totalGear >= 5) { unlockAchievement('prepared'); } if (weapon_speed.level == weapon_speed.maxLevel && weapon_armor.level == weapon_armor.maxLevel && weapon_turretSlots.level == weapon_turretSlots.maxLevel && weapon_turretSpeed.level == weapon_turretSpeed.maxLevel) { unlockAchievement('juggernaut'); } if (allAchievementsUnlocked == false) { inventory.popUp.bertha._visible = false; inventory.berthaMessage._visible = false; } if (allAchievementsUnlocked == true) { inventory.popUp.bertha._visible = true; inventory.berthaMessage._visible = true; } } function setupInventory() { playSoundLoop('sound_compAmb', 999, 'compAmb'); saveGame(); currentLevel = _root['level' + mission]; if (weapon_turretSlots.level == 1) { weaponSlotsAvailable = 2; } if (weapon_turretSlots.level == 2) { weaponSlotsAvailable = 3; } if (weapon_turretSlots.level == 3) { weaponSlotsAvailable = 4; } if (soundMuted == false) { music_menuMusic.volumeTo(20, 3); } hideMenu(); _root.attachMovie('inventoryScreen', 'inventory', depth_inventory); inventory._alpha = 100; inventory._y = 0; inventory.ending._visible = false; inventory.popUp.errorMessage._alpha = 0; if (playingContinue) { inventory.welcome._visible = false; } setTimeout(function () { if (blackOut._x != undefined) { blackOut._visible = false; } }, 2000); var v2 = 1; while (v2 < 5) { if (_root['weapon_' + inventory['weaponSlot' + v2].lastWeapon].name != undefined) { inventory['heatBar_slot' + v2].bar._xscale = 0; inventory['heatBar_slot' + v2].bar._xscale = Math.round((_root['weapon_' + inventory['weaponSlot' + v2].lastWeapon].heatPerShot / 500) * 100); } ++v2; } setupItems(); setupShop(); updateInventory(); } function hideInventory() { inventory.alphaTo(0, 1, 'easeOutSine', 2, function () { inventory._y = -800; inventory._visible = false; }); } function removeInventory() { inventory._visible = false; } function restoreInventory(battleWon) { playingContinue = true; loop_compAmb.volumeTo(100, 3); saveGame(); inventory.errorNoWeapon._visible = false; inventory._y = 0; inventory._visible = true; inventory.alphaTo(100, 1, 'easeOutSine'); if (battleWon == true) { inventory.gotoAndStop('event'); } else { inventory.gotoAndStop('inventory'); inventory.errorNoWeapon._visible = false; } updateInventory(); } function buttonSetup_inventory(btnName) { inventory[btnName].selected = false; inventory.buy.selected = true; inventory.buy.gotoAndStop('over'); inventory.buy_label.colorTo(16777215, 0.1); inventory[btnName].onRollOver = function () { this.gotoAndStop('over'); playRollOverSound(); _root.inventory[btnName + '_label'].colorTo(16777215, 0.1); }; inventory[btnName].onReleaseOutside = function () { if (this.selected == false) { this.gotoAndStop('off'); _root.inventory.errorNoWeapon._visible = false; _root.inventory[btnName + '_label'].colorTo(null, 0.1); } }; inventory[btnName].onDragOut = inventory[btnName].onReleaseOutside; inventory[btnName].onRollOut = inventory[btnName].onReleaseOutside; switch (btnName) { case 'buy': inventory[btnName].onRelease = function () { playClickSound(); buying = true; selling = false; this.selected = true; inventory.buy.gotoAndStop('over'); inventory.buy_label.colorTo(16777215, 0.1); inventory.sell.selected = false; inventory.sell.gotoAndStop('off'); inventory.sell_label.colorTo(null, 0.1); }; break; case 'sell': inventory[btnName].onRelease = function () { playClickSound(); buying = false; selling = true; this.selected = true; inventory.sell.gotoAndStop('over'); inventory.sell_label.colorTo(16777215, 0.1); inventory.buy.selected = false; inventory.buy.gotoAndStop('off'); inventory.buy_label.colorTo(null, 0.1); }; break; case 'equip': inventory[btnName].onRelease = function () { playClickSound(); inventory.gotoAndStop('inventory'); inventory.buy_label.colorTo(16777215, 0.1); inventory.errorNoWeapon._visible = false; setupShop(); updateInventory(); }; break; case 'achieve': inventory[btnName].onRelease = function () { playClickSound(); inventory.distort.gotoAndPlay('distort'); inventory.achievements._visible = true; inventory.achBG._visible = true; setupAchievementsPage('inventory'); }; break; case 'abort': inventory[btnName].onRelease = function () { saveGame(); playClickSound(); loadMenu(); removeInventory(); }; break; case 'battle': inventory[btnName].onRelease = function () { var v2 = false; _root.inventory.errorNoWeapon._visible = false; for (bwc in _root.weaponListPlayer) { if (_root.weaponListPlayer[bwc] != 'empty') { v2 = true; } } if (v2 == true) { saveGame(); playClickSound(); hideInventory(); setupSound(); setupWorld(); setupPlayer(); setupInterface(); setupFireButton(); keyUpDetection(); startBattle(); if (debugMode == true) { debugTools(); } } else { playSound('sound_buyError'); _root.inventory.errorNoWeapon._visible = true; } }; break; default: } } function buttonSetup_shop(btnName) { inventory[btnName].onRollOver = function () { playRollOverSound(); _root.inventory.popUp.gotoAndStop(1); _root.inventory.popUp.errorMessage._alpha = 0; _root.inventory.popUp._visible = true; _root.inventory.popUp.title.text = _root['weapon_' + this.name].name.toUpperCase(); _root.inventory.popUp.desc.text = _root['weapon_' + this.name].description; if (_root['weapon_' + this.name].upgrade == true) { _root.inventory.popUp.desc.text = _root['weapon_' + this.name].description + '\rCURRENT LEVEL: ' + _root['weapon_' + this.name].level; } if (buying == true) { if (_root['weapon_' + this.name].upgrade != true) { _root.inventory.popUp.price.text = 'BUY FOR ' + _root['weapon_' + this.name].cost + ' CREDITS'; } else { _root.inventory.popUp.price.text = 'UPGRADE FOR ' + _root['weapon_' + this.name]['cost_level' + _root['weapon_' + this.name].level] + ' CREDITS'; if (_root['weapon_' + this.name].level == _root['weapon_' + this.name].maxLevel) { _root.inventory.popUp.price.text = 'MAXIMUM LEVEL REACHED'; } if (totalCredits < _root['weapon_' + this.name]['cost_level' + _root['weapon_' + this.name].level]) { _root.inventory.popUp.errorMessage._alpha = 100; } } if (totalCredits < _root['weapon_' + this.name].cost) { _root.inventory.popUp.errorMessage._alpha = 100; } } else { _root.inventory.popUp.price.text = 'SELL FOR ' + Math.round(_root['weapon_' + this.name].cost * sellRate) + ' CREDITS'; if (_root['weapon_' + this.name].upgrade == true) { _root.inventory.popUp.price.text = 'UPGRADES CANNOT BE SOLD'; } } }; inventory[btnName].onRollOut = function () { if (settingUpMech == false) { _root.inventory.popUp._visible = false; } }; inventory[btnName].onRelease = function () { if (buying == true) { if (_root['weapon_' + this.name].upgrade != true) { if (totalCredits >= _root['weapon_' + this.name].cost) { playEquipSound(); totalCredits -= _root['weapon_' + this.name].cost; ++_root[this.name + '_owned']; updateInventory(); ++career_itemsPurchased; } else { playSound('sound_buyError'); inventory.popUp.errorMessage._alpha = 100; inventory.popUp.errorMessage.alphaTo(0, 0, 'linear', 1.5); } } else { if (totalCredits >= _root['weapon_' + this.name]['cost_level' + _root['weapon_' + this.name].level] && _root['weapon_' + this.name].level < _root['weapon_' + this.name].maxLevel) { playEquipSound(); totalCredits -= _root['weapon_' + this.name]['cost_level' + _root['weapon_' + this.name].level]; ++career_itemsPurchased; ++_root['weapon_' + this.name].level; if (this.name == 'turretSlots') { ++weaponSlotsAvailable; } if (_root['weapon_' + this.name].upgrade == true) { _root.inventory.popUp.desc.text = _root['weapon_' + this.name].description + '\rCURRENT LEVEL: ' + _root['weapon_' + this.name].level; _root.inventory.popUp.price.text = 'UPGRADE FOR ' + _root['weapon_' + this.name]['cost_level' + _root['weapon_' + this.name].level] + ' CREDITS'; if (_root['weapon_' + this.name].level == _root['weapon_' + this.name].maxLevel) { _root.inventory.popUp.price.text = 'MAXIMUM LEVEL REACHED'; } } updateInventory(); } else { playSound('sound_buyError'); inventory.popUp.errorMessage._alpha = 100; inventory.popUp.errorMessage.alphaTo(0, 0, 'linear', 1.5); } } } if (selling == true) { if (_root[this.name + '_owned'] >= 1 && _root['weapon_' + this.name].upgrade != true) { if (_root['weapon_' + this.name].gear != true) { playSellSound(); totalCredits += Math.round(_root['weapon_' + this.name].cost * sellRate); if (career_prizeCredits + career_collectedCredits + career_bonusCredits >= 100000) { unlockAchievement('bigMoney'); } --_root[this.name + '_owned']; ++career_itemsSold; aws = 1; while (aws < 5) { if (inventory['weaponSlot' + aws].lastWeapon == this.name && _root[this.name + '_owned'] < _root[this.name + '_equipped']) { inventory['weaponSlot' + aws].lastWeapon = 'empty'; inventory['weaponSlot' + aws + '_name'].text = 'EMPTY'; inventory['weaponSlot' + aws].gotoAndStop('empty'); weaponListPlayer.splice(_root.inventory['weaponSlot' + aws].id, 1, 'empty'); --_root[this.name + '_equipped']; break; } ++aws; } } else { playSellSound(); totalCredits += Math.round(_root['weapon_' + this.name].cost * sellRate); if (career_prizeCredits + career_collectedCredits + career_bonusCredits >= 100000) { unlockAchievement('bigMoney'); } --_root[this.name + '_owned']; ++career_itemsSold; aws = 1; while (aws < 5) { if (inventory['gearSlot' + aws].lastWeapon == this.name && _root[this.name + '_owned'] < _root[this.name + '_equipped']) { inventory['gearSlot' + aws].lastWeapon = 'empty'; inventory['gearSlot' + aws + '_name'].text = 'EMPTY'; inventory['gearSlot' + aws].gotoAndStop('empty'); gearListPlayer.splice(_root.inventory['gearSlot' + aws].id, 1, 'empty'); --_root[this.name + '_equipped']; break; } ++aws; } } updateInventory(); } else { playSound('sound_buyError'); } } }; } function setupShop() { var v1 = 1; while (v1 < allItems.length + 1) { inventory['slot' + v1].name = allItems[v1 - 1].ref; inventory['slot' + v1].gotoAndStop(allItems[v1 - 1].ref); if (allItems[v1 - 1].gear == true) { inventory['slot' + v1].border.colorTo(10461075); } else { inventory['slot' + v1].border.colorTo(6708315); } if (allItems[v1 - 1].upgrade == true) { inventory['slot' + v1].border._alpha = 0; } ++v1; } } function buttonSetup_mech(btnName, btnType) { this.activeCross._visible = false; sug = 1; while (sug < 5) { inventory['gearSlot' + sug].activeCross._visible = true; inventory['gearSlot' + sug].border.colorTo(10461075); ++sug; } sug = 1; while (sug < 5) { inventory['weaponSlot' + sug].activeCross._visible = true; inventory['weaponSlot' + sug].border.colorTo(6708315); ++sug; } if (weaponSlotsAvailable == 1) { inventory.weaponSlot1.active = true; inventory.weaponSlot1.activeCross._visible = true; inventory.weaponSlot2_name.text = ''; inventory.weaponSlot3_name.text = ''; inventory.weaponSlot4_name.text = ''; inventory.weaponSlot2_name.gotoAndStop('locked'); inventory.weaponSlot3_name.gotoAndStop('locked'); inventory.weaponSlot4_name.gotoAndStop('locked'); } if (weaponSlotsAvailable == 2) { inventory.weaponSlot1.active = true; inventory.weaponSlot1.activeCross._visible = true; inventory.weaponSlot4.active = true; inventory.weaponSlot4.activeCross._visible = true; inventory.weaponSlot2_name.text = ''; inventory.weaponSlot3_name.text = ''; inventory.weaponSlot2.gotoAndStop('locked'); inventory.weaponSlot3.gotoAndStop('locked'); } if (weaponSlotsAvailable == 3) { inventory.weaponSlot1.active = true; inventory.weaponSlot1.activeCross._visible = true; inventory.weaponSlot2.active = true; inventory.weaponSlot2.activeCross._visible = true; inventory.weaponSlot4.active = true; inventory.weaponSlot4.activeCross._visible = true; inventory.weaponSlot3_name.text = ''; inventory.weaponSlot3.gotoAndStop('locked'); } if (weaponSlotsAvailable == 4) { inventory.weaponSlot1.active = true; inventory.weaponSlot1.activeCross._visible = true; inventory.weaponSlot2.active = true; inventory.weaponSlot2.activeCross._visible = true; inventory.weaponSlot3.active = true; inventory.weaponSlot3.activeCross._visible = true; inventory.weaponSlot4.active = true; inventory.weaponSlot4.activeCross._visible = true; } inventory[btnName].onRollOver = function () { playRollOverSound(); if (btnType == 'weapon') { if (this.active == true) { inventory.popUp.title.text = 'WEAPON SLOT'; inventory.popUp.desc.text = 'Attach weapons to your Juggernaut. Try to match heat ratings.'; inventory.popUp.price.text = 'CLICK TO ATTACH WEAPON'; _root.inventory.popUp._visible = true; } } if (btnType == 'gear') { inventory.popUp.title.text = 'GEAR SLOT'; inventory.popUp.desc.text = 'Add gear to help with defence against certain attacks.'; inventory.popUp.price.text = 'CLICK TO ATTACH GEAR'; _root.inventory.popUp._visible = true; } _root.inventory.popUp.errorNoWeapon._alpha = 0; _root.inventory.popUp.errorMessage._alpha = 0; }; inventory[btnName].onRollOut = function () { if (settingUpMech == false) { _root.inventory.popUp._visible = false; _root.inventory.popUp.errorNoWeapon._visible = false; } }; inventory[btnName].onRelease = function () { if (btnType == 'weapon') { if (this.active == true) { settingUpMech = true; _root.inventory.popUp._visible = true; _root.inventory.popUp.gotoAndStop(btnType); selectedWeaponSlot = btnName; updateInventory(); } } if (btnType == 'gear') { settingUpMech = true; _root.inventory.popUp._visible = true; _root.inventory.popUp.gotoAndStop(btnType); selectedGearSlot = btnName; updateInventory(); } }; } function buttonSetup_mechWeapons(btnName, btnType) { inventory.weaponSlot1.id = 0; inventory.weaponSlot2.id = 1; inventory.weaponSlot3.id = 2; inventory.weaponSlot4.id = 3; inventory.gearSlot1.id = 0; inventory.gearSlot2.id = 1; inventory.gearSlot3.id = 2; inventory.gearSlot4.id = 3; inventory.popUp[btnName].weaponText.text = _root['weapon_' + btnName].name.toUpperCase(); inventory.popUp[btnName].ownedText.text = 'x' + Math.round(_root[btnName + '_owned'] - _root[btnName + '_equipped']); if (allAchievementsUnlocked == false) { inventory.popUp.bertha._visible = false; inventory.berthaMessage._visible = false; } if (btnName == 'cancel') { inventory.popUp[btnName].weaponText.text = 'CANCEL'; inventory.popUp[btnName].ownedText.text = ''; } if (btnName == 'remove') { inventory.popUp[btnName].weaponText.text = 'REMOVE'; inventory.popUp[btnName].ownedText.text = ''; } inventory.popUp[btnName].disabled = false; if (_root[btnName + '_owned'] < 1 || _root[btnName + '_equipped'] >= _root[btnName + '_owned']) { inventory.popUp[btnName].disabled = true; inventory.popUp[btnName]._alpha = 50; } if (btnName == _root.inventory[selectedWeaponSlot].lastWeapon) { inventory.popUp[btnName].colorTo(16750848); } inventory.popUp[btnName].onRollOver = function () { playRollOverSound(); }; inventory.popUp[btnName].onRollOut = function () {}; inventory.popUp[btnName].onRelease = function () { if (btnName == 'cancel') { closePopUp(); } if (btnName == 'remove') { if (btnType == 'weapon') { --_root[inventory[selectedWeaponSlot].lastWeapon + '_equipped']; _root.inventory[selectedWeaponSlot].lastWeapon = btnName; var v3 = _root.inventory[selectedWeaponSlot].id + 1; inventory['weaponSlot' + v3 + '_name'].text = 'EMPTY'; inventory['weaponSlot' + v3].gotoAndStop('empty'); inventory['weaponSlot' + v3].activeCross._visible = true; weaponListPlayer.splice(_root.inventory[selectedWeaponSlot].id, 1, 'empty'); updateInventory(); } if (btnType == 'gear') { --_root[inventory[selectedGearSlot].lastWeapon + '_equipped']; _root.inventory[selectedGearSlot].lastWeapon = 'empty'; var v2 = _root.inventory[selectedGearSlot].id + 1; inventory['gearSlot' + v2].gotoAndStop('empty'); inventory['gearSlot' + v2].activeCross._visible = true; gearListPlayer.splice(_root.inventory[selectedGearSlot].id, 1, 'empty'); updateInventory(); } closePopUp(); } if (_root[btnName + '_equipped'] < _root[btnName + '_owned'] && _root[btnName + '_owned'] > 0) { playEquipSound(); if (btnType == 'weapon') { --_root[inventory[selectedWeaponSlot].lastWeapon + '_equipped']; _root.inventory[selectedWeaponSlot].lastWeapon = btnName; ++_root[btnName + '_equipped']; _root.inventory[selectedWeaponSlot].gotoAndStop(btnName); weaponListPlayer.splice(_root.inventory[selectedWeaponSlot].id, 1, btnName); v3 = _root.inventory[selectedWeaponSlot].id + 1; inventory['weaponSlot' + v3 + '_name'].text = _root['weapon_' + btnName].name.toUpperCase(); } if (btnType == 'gear') { --_root[inventory[selectedGearSlot].lastWeapon + '_equipped']; _root.inventory[selectedGearSlot].lastWeapon = btnName; ++_root[btnName + '_equipped']; _root.inventory[selectedGearSlot].gotoAndStop(btnName); gearListPlayer.splice(_root.inventory[selectedGearSlot].id, 1, btnName); } closePopUp(); } }; } function closePopUp() { updateInventory(); settingUpMech = false; _root.inventory.popUp.gotoAndStop(1); _root.inventory.popUp.errorNoWeapon._visible = false; _root.inventory.popUp._visible = false; } function setupConsole() { _root.attachMovie('systemConsole', 'systemConsole', depth_DEBUG_console); systemConsole._x = 0; systemConsole._y = -480; systemConsole.opened = false; systemConsole.consoleHistory.autoSize = true; var v2 = new Object(); v2.onKeyUp = function () { switch (Key.getCode()) { case 192: openCloseConsole(); break; case 13: executeCommand(_root.systemConsole.consoleInput.text); } }; Key.addListener(v2); } function openCloseConsole() { if (systemConsole._y > -100) { systemConsole.consoleInput.text = ''; systemConsole.ySlideTo(-480, 0.5, 'easeOutSine', 0); systemConsole.opened = false; } if (systemConsole._y <= -100) { systemConsole.opened = true; systemConsole.ySlideTo(-90, 0.5); systemConsole.consoleInput.text = ''; Selection.setFocus('_root.systemConsole.consoleInput'); systemConsole.consoleInput.text = ''; } } function executeCommand(funcName) { _root[funcName](); _root.systemConsole.consoleHistory.text += _root.systemConsole.consoleInput.text + '\r'; _root.systemConsole.consoleHistory._y -= 16; _root.systemConsole.consoleInput.text = ''; } function playVoice(voiceType) { switch (voiceType) { case 'dragonAttack': if (random(4) == 0) { playSound('sound_dragonAttack' + (random(2) + 1)); } break; default: } } function checkOverheat(weaponMC) { if (weaponMC.overheated == false) { ++eventOverheats; weaponMC.overheat.alphaTo(100, 1); weaponMC.overheated = true; hud['overheatWeapon' + weaponMC.slotID]._visible = true; hud['overheatWeapon' + weaponMC.slotID]._alpha = 0; hud['overheatWeapon' + weaponMC.slotID].alphaTo(100, 0.5); playSound('sound_overheat'); } } function setupFireButton() { world.onPress = function () { if (world.player.empShutDown == false) { world.player.torso.weapon4.firing = true; if (world.player.torso.weapon4.firingAnim == false && world.player.torso.weapon4.heat < world.player.torso.weapon4.heatMax - world.player.torso.weapon4.heatPerShot) { world.player.torso.weapon4.gotoAndPlay('fire'); } world.player.torso.weapon3.firing = true; if (world.player.torso.weapon3.firingAnim == false && world.player.torso.weapon3.heat < world.player.torso.weapon3.heatMax - world.player.torso.weapon3.heatPerShot) { world.player.torso.weapon3.gotoAndPlay('fire'); } } }; world.onRelease = function () { world.player.torso.weapon4.firing = false; world.player.torso.weapon3.firing = false; if (world.player.torso.weapon4.name == 'weapon_flamer') { loop_flameLoophero.stop(); world.player.torso.weapon4.flameLoop = false; playSound('sound_weapon_flameEnd'); } if (world.player.torso.weapon3.name == 'weapon_flamer') { loop_flameLoophero.stop(); world.player.torso.weapon3.flameLoop = false; playSound('sound_weapon_flameEnd'); } }; weaponKeyUp(); } function weaponKeyControls() { if (Key.isDown(32)) { if (world.player.empShutDown == false) { world.player.torso.weapon1.firing = true; if (world.player.torso.weapon1.firingAnim == false && world.player.torso.weapon1.heat < world.player.torso.weapon1.heatMax - world.player.torso.weapon1.heatPerShot) { world.player.torso.weapon1.gotoAndPlay('fire'); } world.player.torso.weapon2.firing = true; if (world.player.torso.weapon2.firingAnim == false && world.player.torso.weapon2.heat < world.player.torso.weapon2.heatMax - world.player.torso.weapon2.heatPerShot) { world.player.torso.weapon2.gotoAndPlay('fire'); } } } } function weaponKeyUp() { var v1 = new Object(); v1.onKeyUp = function () { switch (Key.getCode()) { case 32: world.player.torso.weapon1.firing = false; world.player.torso.weapon2.firing = false; if (world.player.torso.weapon1.name == 'weapon_flamer') { loop_flameLoophero.stop(); world.player.torso.weapon1.flameLoop = false; playSound('sound_weapon_flameEnd'); } if (world.player.torso.weapon2.name == 'weapon_flamer') { loop_flameLoophero.stop(); world.player.torso.weapon2.flameLoop = false; playSound('sound_weapon_flameEnd'); } break; default: } }; Key.addListener(v1); } function coolWeapons() { for (cw in enemiesOnScreen) { var v1 = enemiesOnScreen[cw].torso; w = 1; while (w < 5) { if (v1['weapon' + w].heat > 0) { v1['weapon' + w].heat -= v1['weapon' + w].coolDown; if (v1['weapon' + w].overheated == true && v1['weapon' + w].heat < v1['weapon' + w].heatMax - v1['weapon' + w].heatPerShot) { v1['weapon' + w].overheat.alphaTo(0, 2); v1['weapon' + w].overheated = false; hud['overheatWeapon' + v1['weapon' + w].slotID].alphaTo(0, 2); } } ++w; } } } function fireWeapon(weaponName, weaponMC, torsoMC, juggerMC) { if (juggerMC.name == 'hero') { ++career_shotsFired; ++eventShotsFired; } if (weaponMC.name != 'weapon_flamer') { playSound('sound_' + weaponMC.name + '_fire' + (random(2) + 1)); } else { if (weaponMC.flameLoop == false) { weaponMC.flameLoop = true; playSound('sound_weapon_flameStart'); playSoundLoop('sound_weapon_flameLoop', 999, 'flameLoop' + juggerMC.name); } } weaponMC.currentHeat = _root[weaponMC.name].heatPerShot; if (juggerMC.name == 'hero') { for (cgla in gearListPlayer) { if (gearListPlayer[cgla] == 'heatSync') { weaponMC.currentHeat *= weapon_heatSync.bonus; Math.round(weaponMC.currentHeat); } } } weaponMC.heat += weaponMC.currentHeat; ms = 0; while (ms < weaponMC.roundsPerShot) { ++rounds; if (rounds > 1000) { rounds = 1; } var v3 = world.attachMovie('projectile_' + weaponMC.projectile, 'round' + rounds, depth_world_projectiles + rounds); v3._visible = false; wPoint = new flash.geom.Point(weaponMC._x + random(60), weaponMC._y); v3.name = 'round' + rounds; v3.angle = torsoMC._rotation + (random(_root[weaponMC.name].accuracy) - _root[weaponMC.name].accuracy / 2); v3._rotation = v3.angle; v3.owner = juggerMC; if (juggerMC.name == undefined) { v3.owner = 'arena'; } v3.weaponSlot = weaponMC; v3.weaponName = weaponMC.name; v3.damage = _root[weaponMC.name].damage; v3.hitEffect = _root[weaponMC.name].hitEffect; v3.splash = _root[weaponMC.name].splash; v3.splashDamage = _root[weaponMC.name].splashDamage; v3.splashSize = _root[weaponMC.name].splashSize; v3.grenade = _root[weaponMC.name].grenade; v3.dumbRocket = _root[weaponMC.name].dumbRocket; v3.delay = _root[weaponMC.name].delay; v3.dirCount = _root[weaponMC.name].dirCount; v3.splashSize = _root[weaponMC.name].splashSize; v3.splashDamage = _root[weaponMC.name].splashDamage; v3.life = _root[weaponMC.name].life; v3.speedMod = 1; if (v3.grenade == true) { wPoint = new flash.geom.Point(weaponMC._x, weaponMC._y + 5); } torsoMC.localToGlobal(wPoint); world.globalToLocal(wPoint); v3._x = wPoint.x; v3._y = wPoint.y; v3._visible = true; v3.onEnterFrame = function () { if (this.dumbRocket == true) { --this.dirCount; if (this.dirCount == 0) { var v4 = random(8) - 4; this.angle += v4; this._rotation += v4; this.dirCount = 2; } } if (this.grenade == true) { --this.dirCount; if (this.dirCount == 0) { this.angle += random(50) - 25; if (this.weaponName != 'weapon_proxMine') { this._rotation += 35; } this.dirCount = 4; if (this.speedMod > 0.01) { this.speedMod -= 0.1; } else { this.speedMod = 0; } } --this.delay; if (this.delay <= 0) { _root.showHitEffect(this, this.hitEffect); _root.splashDamage(this._x, this._y, this.hitEffect, this.splashSize, this.splashDamage); for (var v3 in _root.roundsOnScreen) { if (_root.roundsOnScreen[v3].name == this.name) { _root.roundsOnScreen.splice(v3, 1); } } if (this.owner.name == 'hero') { ++_root.career_shotsMissed; } this.onEnterFrame = null; removeMovieClip(this); } } --this.life; if (this.life < 0) { for (v3 in _root.roundsOnScreen) { if (_root.roundsOnScreen[v3].name == this.name) { _root.roundsOnScreen.splice(v3, 1); } } if (this.owner.name == 'hero') { ++_root.career_shotsMissed; } this.onEnterFrame = null; removeMovieClip(this); } this.x = Math.cos(this.angle * Math.PI / 180) * (_root[this.weaponSlot.name].roundSpeed * this.speedMod); this.y = Math.sin(this.angle * Math.PI / 180) * (_root[this.weaponSlot.name].roundSpeed * this.speedMod); this._x -= this.x; this._y -= this.y; }; roundsOnScreen.push(v3); v3 = null; ++ms; } ++decals; if (decals > 10000) { decals = 1; } var v8 = world.attachMovie('particle_' + weaponMC.caseType, 'shell' + decals, depth_world_decals + decals); ejectPoint = new flash.geom.Point(weaponMC._x + weaponMC.ejectPoint, weaponMC._y); torsoMC.localToGlobal(ejectPoint); world.globalToLocal(ejectPoint); v8._x = ejectPoint.x; v8._y = ejectPoint.y; switch (weaponName) { case 'weapon1': v8.angle = torsoMC._rotation - 90 + (random(18) - 9); break; case 'weapon4': v8.angle = torsoMC._rotation + 90 + (random(18) - 9); } v8._rotation = v8.angle; v8.moveSpeed = random(5) + 5; v8.rotationRate = random(10) + 10; v8.moveTime = casingMoveTime + random(10); v8.onEnterFrame = function () { if (this._x < casingEdge || this._x > _root.world.bg._width - casingEdge || this._y < casingEdge || this._y > _root.world.bg._height - casingEdge) { this.stop(); setTimeout(_root.removeCasing, _root.casingRemoveTime, this); this.cacheAsBitmap = true; delete this.onEnterFrame; } --this.moveTime; if (this.moveTime > 0) { this.x = Math.cos(this.angle * Math.PI / 180) * this.moveSpeed; this.y = Math.sin(this.angle * Math.PI / 180) * this.moveSpeed; this._rotation += this.rotationRate; this._x -= this.x; this._y -= this.y; } else { setTimeout(_root.removeCasing, _root.casingRemoveTime, this); this.cacheAsBitmap = true; this.onEnterFrame = null; } }; v8 = null; } function removeCasing(casingName) { casingName.alphaTo(0, 0.5, 'linear', 0, function () { removeMovieClip(this); }); } function setupSound() { _root.attachMovie('blankMovie', 'sound_effects', 50); _root.attachMovie('blankMovie', 'sound_music', 51); _root.attachMovie('blankMovie', 'sound_loops', 52); } function playSound(soundName) { if (soundEffectsOn) { ++soundEffects; _root['effect' + soundEffects] = new Sound(sound_effects); _root['effect' + soundEffects].attachSound(soundName); _root['effect' + soundEffects].setVolume(100); _root['effect' + soundEffects].start(); _root['effect' + soundEffects] = null; } } function playSoundLoop(soundName, loops, loopID) { if (soundEffectsOn) { ++soundEffects; _root.attachMovie('blankMovie', 'soundLoop' + loopID, depth_soundLoops + soundEffects); _root['loop_' + loopID] = new Sound('soundLoop' + loopID); _root['loop_' + loopID].attachSound(soundName); _root['loop_' + loopID].setVolume(100); _root['loop_' + loopID].start(0, loops); } } function playMusicLoop(soundName, loops, loopID) { if (musicOn) { ++musicTracks; _root.createEmptyMovieClip('holder' + loopID, depth_music + musicTracks); _root['music_' + loopID] = new Sound(_root['holder' + loopID]); _root['music_' + loopID].attachSound(soundName); _root['music_' + loopID].setVolume(65); _root['music_' + loopID].start(0, loops); } } function muteAllSound() { if (soundMuted) { showQuickMessage('Mute: Off'); soundMuted = false; music_inGameMusic.start(); musicOn = true; soundEffectsOn = true; } else { showQuickMessage('Mute: On'); soundMuted = true; music_inGameMusic.stop(); musicOn = false; soundEffectsOn = false; } } function playerControls() { if (Key.isDown(27)) { _root.pauseGame(); } if (Key.isDown(65)) { playerMove('left'); } else { if (Key.isDown(68)) { playerMove('right'); } } if (Key.isDown(87)) { playerMove('up'); } else { if (Key.isDown(83)) { playerMove('down'); } else { if (Key.isDown(32)) { } } } } function keyUpDetection() { var v1 = new Object(); v1.onKeyUp = function () { switch (Key.getCode()) { case 65: momentumMoveX = 'left'; lastMoveX = 'none'; break; case 68: momentumMoveX = 'right'; lastMoveX = 'none'; break; case 87: momentumMoveY = 'up'; lastMoveY = 'none'; break; case 83: momentumMoveY = 'down'; lastMoveY = 'none'; break; default: } }; Key.addListener(v1); } function playerMove(dir) { if (world.player.empShutDown == false) { for (epm in enemiesOnScreen) { enemiesOnScreen[epm].onTarget = false; } world.player.xPower.text = world.player.moveSpeedX; world.player.yPower.text = world.player.moveSpeedY; if (lastMoveX == 'left' && dir == 'right' || lastMoveX == 'right' && dir == 'left' || lastMoveX == 'none') { lastMoveX = dir; world.player.moveSpeedX = 0; } if (lastMoveY == 'up' && dir == 'down' || lastMoveY == 'down' && dir == 'up' || lastMoveY == 'none') { lastMoveY = dir; world.player.moveSpeedY = 0; } if ((dir == 'left' || dir == 'right') && world.player.moveSpeedX < world.player.maxMoveSpeed) { world.player.moveSpeedX += world.player.acceleration; } if ((dir == 'up' || dir == 'down') && world.player.moveSpeedY < world.player.maxMoveSpeed) { world.player.moveSpeedY += world.player.acceleration; } if (dir == 'left' && world.player.collideLeft == false && world.player.collideEnemyLeft == false) { if (world.player.legs._rotation > -180) { world.player.legs._rotation -= world.player.legRotationRate; } world.player._x -= world.player.moveSpeedX; } if (dir == 'right' && world.player.collideRight == false && world.player.collideEnemyRight == false) { if (world.player.legs._rotation < 180) { world.player.legs._rotation += world.player.legRotationRate; } world.player._x += world.player.moveSpeedX; } if (dir == 'down' && world.player.collideBottom == false && world.player.collideEnemyBottom == false) { if (world.player.legs._rotation < 180) { world.player.legs._rotation += world.player.legRotationRate; } world.player._y += world.player.moveSpeedY; } if (dir == 'up' && world.player.collideTop == false && world.player.collideEnemyTop == false) { if (world.player.legs._rotation > -180) { world.player.legs._rotation -= world.player.legRotationRate; } world.player._y -= world.player.moveSpeedY; } if (dir == 'left' || dir == 'right') { lastMoveX = dir; } else { lastMoveY = dir; } } } function playerMomentum() { if (momentumMoveX == 'left' && world.player.moveSpeedX > 0 && world.player.collideLeft == false && world.player.collideEnemyLeft == false) { world.player.moveSpeedX -= world.player.weight; world.player._x -= world.player.moveSpeedX; if (world.player.moveSpeedX < 0) { world.player.moveSpeedX = 0; momentumMoveX = 'none'; } } if (momentumMoveX == 'right' && world.player.moveSpeedX > 0 && world.player.collideRight == false && world.player.collideEnemyRight == false) { world.player.moveSpeedX -= world.player.weight; world.player._x += world.player.moveSpeedX; if (world.player.moveSpeedX < 0) { world.player.moveSpeedX = 0; momentumMoveX = 'none'; } } if (momentumMoveY == 'up' && world.player.moveSpeedY > 0 && world.player.collideTop == false && world.player.collideEnemyTop == false) { world.player.moveSpeedY -= world.player.weight; world.player._y -= world.player.moveSpeedY; if (world.player.moveSpeedY < 0) { world.player.moveSpeedY = 0; momentumMoveY = 'none'; } } if (momentumMoveY == 'down' && world.player.moveSpeedY > 0 && world.player.collideBottom == false && world.player.collideEnemyBottom == false) { world.player.moveSpeedY -= world.player.weight; world.player._y += world.player.moveSpeedY; if (world.player.moveSpeedY < 0) { world.player.moveSpeedY = 0; momentumMoveY = 'none'; } } } function aimJugger(juggerName, targetObject) { if (juggerName.empShutDown == false) { hud.mouseCursor.aimRing._alpha = 0; juggerName.currAngle = juggerName.torso._rotation; turretPoint = new flash.geom.Point(juggerName._x, juggerName._y); if (juggerName.name == 'hero') { targetPoint = new flash.geom.Point(_root._xmouse, _root._ymouse); } else { targetPoint = new flash.geom.Point(juggerName.enemyTarget._x, juggerName.enemyTarget._y); world.localToGlobal(targetPoint); } world.localToGlobal(turretPoint); var v4 = turretPoint.x - targetPoint.x; var v3 = turretPoint.y - targetPoint.y; juggerName.angle = Math.round(Math.atan2(v3, v4) * 57.29577951308232); juggerName.difference = Math.round(juggerName.angle - juggerName.torso._rotation); if (juggerName.difference > 180) { juggerName.difference -= 360; } else { if (juggerName.difference < -180) { juggerName.difference += 360; } } if (juggerName.difference > 0) { juggerName.rotateDir = 'cw'; } else { juggerName.rotateDir = 'acw'; } if (juggerName.angle - juggerName.currAngle >= -2 && juggerName.angle - juggerName.currAngle <= 2) { juggerName.rotateDir = 'none'; juggerName.onTarget = true; hud.mouseCursor.aimRing._alpha = 100; } else { juggerName.onTarget = false; } juggerName.currentAngle = Math.round(angle); if (juggerName.rotateDir == 'acw' && juggerName.torso._rotation != juggerName.currentAngle) { juggerName.torso._rotation -= juggerName.turretRotationRate; } if (juggerName.rotateDir == 'cw' && juggerName.torso._rotation != juggerName.currentAngle) { juggerName.torso._rotation += juggerName.turretRotationRate; } juggerName.rotDir.text = juggerName.rotateDir; juggerName.torsoRot.text = juggerName.torso._rotation; juggerName.angle.text = juggerName.currentAngle; } } function god() { playerStartHealth = 9999999999.0; world.player.health = 9999999999.0; } function setupPlayer() { enemiesOnScreen = new Array(); world.attachMovie('mech', 'player', depth_world_player); world.player._x = world.bg._width / 2; world.player._y = world.bg._height / 2; world.player.player = true; world.player.alive = true; world.player.name = 'hero'; world.player.human = false; world.player.unitClass = 'mech'; world.player.health = playerStartHealth; world.player.maxHealth = world.player.health; world.player.acceleration = 0.25; world.player.weight = 0.5; world.player.moveSpeedX = 0; world.player.moveSpeedY = 0; world.player.maxMoveSpeed = 4; world.player.legRotationRate = 2; world.player.rotateDir = 'none'; world.player.turretRotationRate = 3; world.player.currDamageDisplay = 100; world.player.damagedMedium = false; world.player.damagedHeavy = false; world.player.health += Math.round(weapon_armor.level * weapon_armor.bonus); world.player.maxMoveSpeed += Math.round(weapon_speed.level * weapon_speed.bonus); world.player.turretRotationRate += Math.round(weapon_turretSpeed.level * weapon_turretSpeed.bonus); world.player.collideLeft = false; world.player.collideRight = false; world.player.collideTop = false; world.player.collideBottom = false; world.player.collideEnemyLeft = false; world.player.collideEnemyRight = false; world.player.collideEnemyTop = false; world.player.collideEnemyBottom = false; world.player.angle = 0; world.player.currAngle = 0; world.player.empShutDown = false; world.player.torso.gotoAndStop('hero'); world.player.legs.gotoAndStop(_root['unit_' + unitType].body); var v2 = 0; while (v2 < 4) { world.player.torso.attachMovie(weaponListPlayer[v2], 'weapon' + (v2 + 1), 10 - v2); world.player.torso['weapon' + (v2 + 1)].name = 'weapon_' + weaponListPlayer[v2]; world.player.torso['weapon' + (v2 + 1)].flameLoop = false; world.player.torso['weapon' + (v2 + 1)].ai = false; world.player.torso['weapon' + (v2 + 1)].overheat._alpha = 0; world.player.torso['weapon' + (v2 + 1)].overheated = false; ++v2; } pts = 1; while (pts < 5) { if (pts == 1 || pts == 2) { world.player.torso['weapon' + pts]._yscale = -100; } world.player.torso['weapon' + pts]._x = world.player.torso['holder_weapon' + pts]._x; world.player.torso['weapon' + pts]._y = world.player.torso['holder_weapon' + pts]._y; world.player.torso['weapon' + pts].firing = false; world.player.torso['weapon' + pts].firingAnim = false; world.player.torso['weapon' + pts].heat = 0; world.player.torso['weapon' + pts].slotID = pts; world.player.torso['weapon' + pts].life = _root[world.player.torso['weapon' + pts].name].life; world.player.torso['weapon' + pts].coolDown = _root[world.player.torso['weapon' + pts].name].coolDown; world.player.torso['weapon' + pts].heatMax = _root[world.player.torso['weapon' + pts].name].heatMax; world.player.torso['weapon' + pts].heatPerShot = _root[world.player.torso['weapon' + pts].name].heatPerShot; world.player.torso['weapon' + pts].caseType = _root[world.player.torso['weapon' + pts].name].caseType; world.player.torso['weapon' + pts].ejectPoint = _root[world.player.torso['weapon' + pts].name].ejectPoint; world.player.torso['weapon' + pts].projectile = _root[world.player.torso['weapon' + pts].name].projectile; world.player.torso['weapon' + pts].roundsPerShot = _root[world.player.torso['weapon' + pts].name].roundsPerShot; world.player.torso['weapon' + pts].hitEffect = _root[world.player.torso['weapon' + pts].name].hitEffect; world.player.torso['weapon' + pts].splashDamage = _root[world.player.torso['weapon' + pts].name].splashDamage; world.player.torso['weapon' + pts].splashSize = _root[world.player.torso['weapon' + pts].name].splashSize; ++pts; } friendsOnScreen.push(world.player); enemiesOnScreen.push(world.player); allOnScreen.push(world.player); } function playerEMPTimer() { if (world.player.empShutDown == true) { --world.player.empShutDownTime; if (world.player.empShutDownTime <= 0) { world.player.empShutDown = false; hud.empWarning._visible = false; } } } function spawnEnemy(unitType, loc) { ++enemyCount; ++numEnemies; if (enemyCount > 10000) { enemyCount = 0; } var v2 = world.attachMovie('mech', 'enemy' + enemyCount, depth_world_enemies + enemyCount); switch (loc) { case 'top': v2._x = world.gateTop._x + (random(80) - 40); v2._y = 80 - (random(40) - 20); v2.torso._rotation = -90; v2.dirX = 'none'; v2.dirY = 'down'; break; case 'topLeft': v2._x = world.gateTopLeft._x + (random(80) - 40); v2._y = 80 - (random(40) - 20); v2.torso._rotation = -90; v2.dirX = 'none'; v2.dirY = 'down'; break; case 'topRight': v2._x = world.gateTopRight._x + (random(80) - 40); v2._y = 80 - (random(40) - 20); v2.torso._rotation = -90; v2.dirX = 'none'; v2.dirY = 'down'; break; case 'right': v2._x = world.bg._width + (random(40) - 20); v2._y = world.gateRight._y + (random(80) - 40); v2.torso._rotation = 0; v2.dirX = 'left'; v2.dirY = 'none'; break; case 'bottom': v2._x = world.gateBottom._x + (random(80) - 40); v2._y = world.bg._height + (random(40) - 20); v2.torso._rotation = 90; v2.dirX = 'none'; v2.dirY = 'up'; break; case 'left': v2._x = 50 + (random(40) - 20); v2._y = world.gateLeft._y + (random(80) - 40); v2.torso._rotation = 180; v2.dirX = 'right'; v2.dirY = 'none'; break; case 'boss': v2._x = world.gateTop._x; v2._y = 150; v2.torso._rotation = -90; v2.dirX = 'none'; v2.dirY = 'down'; } v2.ai = true; v2.player = false; v2.unitType = unitType; v2.unitClass = _root['unit_' + unitType].unitClass; if (unitType == 'prisoner1' || unitType == 'prisoner2' || unitType == 'prisoner3' || unitType == 'prisonerChase') { v2.human = true; } else { v2.human = false; } v2.name = 'enemy' + enemyCount; v2.health = _root['unit_' + unitType].health; v2.alive = true; v2.acceleration = _root['unit_' + unitType].acceleration; v2.weight = _root['unit_' + unitType].weight; v2.moveSpeedX = 0; v2.moveSpeedY = 0; v2.maxMoveSpeed = _root['unit_' + unitType].maxMoveSpeed; v2.aiMoveSpeed = _root['unit_' + unitType].aiMoveSpeed; v2.legRotationRate = _root['unit_' + unitType].legRotationRate; v2.rotateDir = 'none'; v2.turretRotationRate = _root['unit_' + unitType].turretRotationRate; v2.currDamageDisplay = 100; v2.damagedMedium = false; v2.damagedHigh = false; v2.empShutDown = false; v2.moveSwitchTime = 100; v2.movementWait = 100; v2.masterMoveMode = _root['unit_' + unitType].moveMode; v2.moveMode = 'wander'; v2.dirCountX = -30; v2.dirCountY = -30; v2.range = _root['unit_' + unitType].range; v2.angle = 0; v2.currAngle = 0; v2.waitTime = 0; v2.wayPointSet = false; v2.onTarget = false; v2.enemyTarget = 'none'; v2.xProx = 0; v2.yProx = 0; v2.enemyProx = 9999999; v2.enemyTargetProx = 9999999; v2.collideLeft = false; v2.collideRight = false; v2.collideTop = false; v2.collideBottom = false; v2.torso.gotoAndStop(_root['unit_' + unitType].body); v2.legs.gotoAndStop(_root['unit_' + unitType].body); var v3 = 1; while (v3 < 5) { v2.torso.attachMovie(_root['unit_' + unitType]['weapon' + v3], 'weapon' + v3, 10 + v3); v2.torso['weapon' + v3].name = 'weapon_' + _root['unit_' + unitType]['weapon' + v3]; v2.torso['weapon' + v3].ref = _root['unit_' + unitType]['weapon' + v3]; v2.torso['weapon' + v3].overheat._alpha = 0; ++v3; } ew = 1; while (ew < 5) { if (ew == 1 || ew == 2) { v2.torso['weapon' + ew]._yscale = -100; } v2.torso['weapon' + ew]._x = v2.torso['holder_weapon' + ew]._x; v2.torso['weapon' + ew]._y = v2.torso['holder_weapon' + ew]._y; v2.torso['weapon' + ew].firing = false; v2.torso['weapon' + ew].firingAnim = false; v2.torso['weapon' + ew].heat = 0; v2.torso['weapon' + ew].life = _root[v2.torso['weapon' + ew].name].life; v2.torso['weapon' + ew].coolDown = _root[v2.torso['weapon' + ew].name].coolDown; v2.torso['weapon' + ew].heatMax = _root[v2.torso['weapon' + ew].name].heatMax; v2.torso['weapon' + ew].heatPerShot = _root[v2.torso['weapon' + ew].name].heatPerShot; v2.torso['weapon' + ew].caseType = _root[v2.torso['weapon' + ew].name].caseType; v2.torso['weapon' + ew].ejectPoint = _root[v2.torso['weapon' + ew].name].ejectPoint; v2.torso['weapon' + ew].projectile = _root[v2.torso['weapon' + ew].name].projectile; v2.torso['weapon' + ew].roundsPerShot = _root[v2.torso['weapon' + ew].name].roundsPerShot; v2.torso['weapon' + ew].hitEffect = _root[v2.torso['weapon' + ew].name].hitEffect; v2.torso['weapon' + ew].splashDamage = _root[v2.torso['weapon' + ew].name].splashDamage; v2.torso['weapon' + ew].splashSize = _root[v2.torso['weapon' + ew].name].splashSize; ++ew; } enemiesOnScreen.push(v2); allOnScreen.push(v2); } function setupWorld() { currentMap = _root[currentLevel.arena]; gameMode = currentLevel.gameMode; _root.attachMovie(currentMap.mapName, 'world', depth_world); world._x = -(world.bg._width / 2 - Stage.width / 2); world._y = -(world.bg._height / 2 - Stage.height / 2); playSoundLoop('sound_crowdBase', 999, 'crowdBase'); playMusicLoop('music_' + currentLevel.music, 999, 'gameMusic'); allTraps = new Array(); allTrapTriggers = new Array(); tr = 0; while (tr < currentLevel.trapX.length) { world.attachMovie(currentLevel.trapType[tr], 'trap' + tr, depth_world_traps + tr); world['trap' + tr].type = currentLevel.trapType[tr]; world['trap' + tr].activated = false; world['trap' + tr]._x = currentLevel.trapX[tr]; world['trap' + tr]._y = currentLevel.trapY[tr]; if (currentLevel.trapType[tr] == 'rocketTrap') { world['trap' + tr].weapon.name = 'weapon_arenaRocketLauncher'; world['trap' + tr].weapon.owner = 'arena'; world['trap' + tr].weapon.firing = false; world['trap' + tr].weapon.firingAnim = false; world['trap' + tr].weapon.heat = 0; world['trap' + tr].weapon.heatMax = 100000; world['trap' + tr].weapon.projectile = 'rocket'; world['trap' + tr].weapon.roundsPerShot = 1; world['trap' + tr].weapon.hitEffect = 'smallExplosion'; world['trap' + tr].weapon.splashDamage = 200; world['trap' + tr].weapon.splashSize = 10; } if (currentLevel.trapType[tr] == 'laserTrap') { world['trap' + tr].weapon.name = 'weapon_arenaLaser'; world['trap' + tr].weapon.owner = 'arena'; world['trap' + tr].weapon.firing = false; world['trap' + tr].weapon.firingAnim = false; world['trap' + tr].weapon.heat = 0; world['trap' + tr].weapon.heatMax = 100000; world['trap' + tr].weapon.projectile = 'laser'; world['trap' + tr].weapon.roundsPerShot = 1; world['trap' + tr].weapon.hitEffect = 'smallExplosion'; world['trap' + tr].weapon.splashDamage = 0; world['trap' + tr].weapon.splashSize = 10; } if (currentLevel.trapX[tr] == 'left') { world['trap' + tr]._x = 100; if (currentLevel.arena == 'arena_warehouse') { world['trap' + tr]._x = 85; } world['trap' + tr]._rotation = 180; } if (currentLevel.trapX[tr] == 'right') { world['trap' + tr]._x = world.bg._width - 100; if (currentLevel.arena == 'arena_warehouse') { world['trap' + tr]._x = world.bg._width - 85; } world['trap' + tr]._rotation = 0; } if (currentLevel.trapY[tr] == 'top') { world['trap' + tr]._y = 100; if (currentLevel.arena == 'arena_warehouse') { world['trap' + tr]._y = 85; } world['trap' + tr]._rotation = -90; } if (currentLevel.trapY[tr] == 'bottom') { world['trap' + tr]._y = world.bg._height - 100; if (currentLevel.arena == 'arena_warehouse') { world['trap' + tr]._y = world.bg._height - 85; } world['trap' + tr]._rotation = 90; } allTraps.push(world['trap' + tr]); ++tr; } tr = 0; while (tr < currentLevel.numTriggers) { world.attachMovie('trapTrigger', 'trapTrigger' + tr, depth_world_trapTriggers + tr); world['trapTrigger' + tr]._x = currentLevel.trapTriggerX[tr]; world['trapTrigger' + tr]._y = currentLevel.trapTriggerY[tr]; world['trapTrigger' + tr].timer = 0; world['trapTrigger' + tr].traps = currentLevel['trapTrigger' + tr]; if (currentLevel.trapTriggerX[tr] == 'middle' || currentLevel.trapTriggerY[tr] == 'middle') { world['trapTrigger' + tr]._x = world.bg._width / 2; world['trapTrigger' + tr]._y = world.bg._height / 2; } allTrapTriggers.push(world['trapTrigger' + tr]); ++tr; } if (currentLevel.gameMode == 'KOTH') { controlPoints = new Array(); world.attachMovie('capturePoint', 'capture1', depth_world_captures + 1); world.attachMovie('capturePoint', 'capture2', depth_world_captures + 2); world.attachMovie('capturePoint', 'capture3', depth_world_captures + 3); world.attachMovie('capturePoint', 'capture4', depth_world_captures + 4); world.attachMovie('capturePoint', 'capture5', depth_world_captures + 5); world.capture1._x = Math.round(world.bg._width / 4); world.capture1._y = Math.round(world.bg._height / 4); world.capture2._x = Math.round(world.bg._width - world.bg._width / 4); world.capture2._y = Math.round(world.bg._height / 4); world.capture2._xscale = -100; world.capture3._x = Math.round(world.bg._width / 2); world.capture3._y = Math.round(world.bg._height / 2); world.capture3._rotation = 90; world.capture4._x = Math.round(world.bg._width / 4); world.capture4._y = Math.round(world.bg._height - world.bg._height / 4); world.capture5._x = Math.round(world.bg._width - world.bg._width / 4); world.capture5._y = Math.round(world.bg._height - world.bg._height / 4); world.capture5._xscale = -100; pcp = 1; while (pcp < 6) { world['capture' + pcp].lights._alpha = 0; world['capture' + pcp].red._visible = false; world['capture' + pcp].green._visible = false; controlPoints.push(world['capture' + pcp]); ++pcp; } } for (sg in currentLevel.spawns) { if (currentLevel.spawns[sg] == 'top') { world.attachMovie('gate', 'gateTop', depth_gateTop); if (currentMap.gateX[0] != undefined) { world.gateTop._x = currentMap.gateX[0]; } else { world.gateTop._x = world.bg._width / 2; } world.gateTop._y = 0; world.gateTop._rotation = -90; world.attachMovie('gateBlackOut', 'gateTopBlack', depth_gateTopBlack + 1); world.gateTopBlack._x = world.gateTop._x; world.gateTopBlack._y = world.gateTop._y; world.gateTopBlack._rotation = world.gateTop._rotation; } if (currentLevel.spawns[sg] == 'right') { world.attachMovie('gate', 'gateRight', depth_gateRight); world.gateRight._x = world.bg._width; if (currentMap.gateY[0] != undefined) { world.gateRight._y = currentMap.gateY[0]; } else { world.gateRight._y = world.bg._height / 2; } world.gateRight._rotation = 0; world.attachMovie('gateBlackOut', 'gateRightBlack', depth_gateBlackOuts + 2); world.gateRightBlack._x = world.gateRight._x; world.gateRightBlack._y = world.gateRight._y; world.gateRightBlack._rotation = world.gateRight._rotation; } if (currentLevel.spawns[sg] == 'bottom') { world.attachMovie('gate', 'gateBottom', depth_gateBottom); if (currentMap.gateX[1] != undefined) { world.gateBottom._x = currentMap.gateX[1]; } else { world.gateBottom._x = world.bg._width / 2; } world.gateBottom._y = world.bg._height - 5; world.gateBottom._rotation = 90; world.attachMovie('gateBlackOut', 'gateBottomBlack', depth_gateBlackOuts + 3); world.gateBottomBlack._x = world.gateBottom._x; world.gateBottomBlack._y = world.gateBottom._y; world.gateBottomBlack._rotation = world.gateBottom._rotation; } if (currentLevel.spawns[sg] == 'left') { world.attachMovie('gate', 'gateLeft', depth_gateLeft); world.gateLeft._x = 0; if (currentMap.gateY[1] != undefined) { world.gateLeft._y = currentMap.gateY[1]; } else { world.gateLeft._y = world.bg._height / 2; } world.gateLeft._rotation = 180; world.attachMovie('gateBlackOut', 'gateLeftBlack', depth_gateBlackOuts + 4); world.gateLeftBlack._x = world.gateLeft._x; world.gateLeftBlack._y = world.gateLeft._y; world.gateLeftBlack._rotation = world.gateLeft._rotation; } } numEnemies = 0; mapObjects = new Array(); mapHitObjects = new Array(); for (c in world.collisions) { mapObjects.push(world.collisions[c]); } for (h in world.hitCollisions) { mapHitObjects.push(world.hitCollisions[h]); } spawnCounterMax = currentLevel.respawnTime; } function destroyWorld() { for (dw in enemiesOnScreen) { _root['loop_flameLoop' + enemiesOnScreen[dw].name].stop(); } removeMovieClip(world); loop_crowdBase.stop(); } function movementCollisions() { for (mc in enemiesOnScreen) { if (enemiesOnScreen[mc]._y < arenaBorder) { enemiesOnScreen[mc].collideTop = true; } else { enemiesOnScreen[mc].collideTop = false; } if (enemiesOnScreen[mc]._y > world.bg._height - arenaBorder) { enemiesOnScreen[mc].collideBottom = true; } else { enemiesOnScreen[mc].collideBottom = false; } if (enemiesOnScreen[mc]._x < arenaBorder) { enemiesOnScreen[mc].collideLeft = true; } else { enemiesOnScreen[mc].collideLeft = false; } if (enemiesOnScreen[mc]._x > world.bg._width - arenaBorder) { enemiesOnScreen[mc].collideRight = true; } else { enemiesOnScreen[mc].collideRight = false; } } } function playerCollisionEnemy() { world.player.lowestCollideProx = 99999; for (pec in enemiesOnScreen) { if (enemiesOnScreen[pec].name != 'hero') { var v4 = new flash.geom.Point(world.player._x, world.player._y); world.localToGlobal(v4); var v3 = new flash.geom.Point(enemiesOnScreen[pec]._x, enemiesOnScreen[pec]._y); world.localToGlobal(v3); var v5 = v3.x - v4.x; var v6 = v3.y - v4.y; var v2 = Math.sqrt(v5 * v5 + v6 * v6); if (v2 < 10 && enemiesOnScreen[pec].unitClass == 'prisoner') { enemiesOnScreen[pec].alive = false; var v1 = 1; while (v1 < 5) { enemiesOnScreen[pec].torso['weapon' + v1].firing = false; enemiesOnScreen[pec].torso['weapon' + v1]._visible = false; ++v1; } enemiesOnScreen[pec].torso.gotoAndPlay(enemiesOnScreen[pec].unitClass + '_exploded'); enemiesOnScreen[pec].legs._visible = false; goreParticle(enemiesOnScreen[pec]._x, enemiesOnScreen[pec]._y, hitAngle); playSound('sound_gore1'); enemiesOnScreen[pec].cacheAsBitmap = true; enemiesOnScreen.splice(pec, 1); ++crowd_killCount; ++bodyCount; --numEnemies; if (currentLevel.gameMode == 'bodyCount') { updateGameModeInterface(currentLevel.gameMode); } checkGameMode(currentLevel.gameMode); } if (v2 < mechBarrier && enemiesOnScreen[pec].unitClass == 'mech') { if (v2 < world.player.lowestCollideProx) { world.player.lowestCollideProx = v2; } if (world.player._y > enemiesOnScreen[pec]._y) { world.player.collideEnemyTop = true; } if (world.player._y < enemiesOnScreen[pec]._y) { world.player.collideEnemyBottom = true; } if (world.player._x > enemiesOnScreen[pec]._x) { world.player.collideEnemyLeft = true; } if (world.player._x < enemiesOnScreen[pec]._x) { world.player.collideEnemyRight = true; } } } } if (world.player.lowestCollideProx >= mechBarrier) { world.player.collideEnemyLeft = false; world.player.collideEnemyRight = false; world.player.collideEnemyTop = false; world.player.collideEnemyBottom = false; } } function projectileCollisions() { for (r in roundsOnScreen) { if (roundsOnScreen[r]._x < arenaEdge || roundsOnScreen[r]._x > world.bg._width - arenaEdge || roundsOnScreen[r]._y < arenaEdge || roundsOnScreen[r]._y > world.bg._height - arenaEdge) { if (roundsOnScreen[r].owner.name == 'hero') { ++career_shotsMissed; } showHitEffect(roundsOnScreen[r], roundsOnScreen[r].hitEffect); placeDecal('bulletHit', roundsOnScreen[r]); concreteChunkParticle(roundsOnScreen[r]._x, roundsOnScreen[r]._y, roundsOnScreen[r]._rotation); removeMovieClip(roundsOnScreen[r]); roundsOnScreen[r].onEnterFrame = null; roundsOnScreen.splice(r, 1); } for (v in enemiesOnScreen) { if (enemiesOnScreen[v].name != roundsOnScreen[r].owner.name) { var v3 = false; if (roundsOnScreen[r].owner.unitClass == enemiesOnScreen[v].unitClass && friendlyFire == true) { v3 = true; } if (roundsOnScreen[r].owner.unitClass != enemiesOnScreen[v].unitClass) { v3 = true; } if (roundsOnScreen[r].owner.name == 'hero' || roundsOnScreen[r].owner == 'arena') { v3 = true; } if (v3) { var v4 = new flash.geom.Point(roundsOnScreen[r]._x, roundsOnScreen[r]._y); world.localToGlobal(v4); var v5 = new flash.geom.Point(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y); world.localToGlobal(v5); var v6 = v5.x - v4.x; var v8 = v5.y - v4.y; var v7 = Math.sqrt(v6 * v6 + v8 * v8); if (v7 < hitCollisionBuffer) { v7 = 999999; if (enemiesOnScreen[v].hitTest(roundsOnScreen[r].collision)) { showHitEffect(enemiesOnScreen[v], roundsOnScreen[r].hitEffect); if (roundsOnScreen[r].splash == true) { splashDamage(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, roundsOnScreen[r].hitEffect, roundsOnScreen[r].splashSize, roundsOnScreen[r].splashDamage, -roundsOnScreen[r]._rotation, roundsOnScreen[r].owner); } var v2 = roundsOnScreen[r].damage + random(Math.round(roundsOnScreen[r].damage / damageVariance)); if (enemiesOnScreen[v].name == 'hero') { if (roundsOnScreen[r].hitEffect == 'explosion') { screenShake(8, 12); } if (roundsOnScreen[r].hitEffect == 'smallExplosion') { screenShake(5, 8); } for (cgl in gearListPlayer) { if (gearListPlayer[cgl] == 'burnShield' && roundsOnScreen[r].hitEffect == 'explosion' || 'smallExplosion') { v2 *= weapon_burnShield.bonus; } if (gearListPlayer[cgl] == 'impactShield' && roundsOnScreen[r].hitEffect == 'ballistic') { v2 *= weapon_impactShield.bonus; } if (gearListPlayer[cgl] == 'empShield' && roundsOnScreen[r].hitEffect == 'emp') { v2 *= weapon_empShield.bonus; } } } if (enemiesOnScreen[v].name == 'hero') { v2 *= heroDamageMod; } enemiesOnScreen[v].health -= v2; enemiesOnScreen[v].currDamageDisplay = Math.round((enemiesOnScreen[v].health / enemiesOnScreen[v].maxHealth) * 100); if (enemiesOnScreen[v].currDamageDisplay < 60 && enemiesOnScreen[v].currDamageDisplay > 40 && enemiesOnScreen[v].damagedMedium == false) { enemiesOnScreen[v].damagedMedium = true; enemiesOnScreen[v].torso.damageClip.gotoAndStop('medium'); } if (enemiesOnScreen[v].currDamageDisplay < 40 && enemiesOnScreen[v].damagedHeavy == false) { enemiesOnScreen[v].damagedHeavy = true; enemiesOnScreen[v].torso.damageClip.gotoAndStop('heavy'); } if (enemiesOnScreen[v].human == true && roundsOnScreen[r].hitEffect != 'burn') { bloodParticle(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, -roundsOnScreen[r]._rotation); } if (roundsOnScreen[r].weaponName == 'weapon_proxMine') { unlockAchievement('saboteur'); } if (enemiesOnScreen[v].health <= 0 && enemiesOnScreen[v].alive == true) { if (roundsOnScreen[r].owner == 'arena') { crowd_bonusCredits += environmentKillBonus; showBonus('arena'); if (roundsOnScreen[r].weaponName == 'weapon_arenaRocketLauncher') { unlockAchievement('explosivo'); } if (roundsOnScreen[r].weaponName == 'weapon_arenaLaser') { unlockAchievement('frickenLasers'); } } enemiesOnScreen[v].alive = false; dropPickup(enemiesOnScreen[v]); var v1 = 1; while (v1 < 5) { enemiesOnScreen[v].torso['weapon' + v1].firing = false; enemiesOnScreen[v].torso['weapon' + v1]._visible = false; ++v1; } if (enemiesOnScreen[v].human == true) { ++career_prisonersKilled; playSound('sound_soldierDeath' + random(8)); enemiesOnScreen[v].torso.gotoAndPlay(enemiesOnScreen[v].unitClass + '_dead' + (random(3) + 1)); if (roundsOnScreen[r].weaponName == 'weapon_flamer') { enemiesOnScreen[mv].torso.gotoAndPlay(enemiesOnScreen[mv].unitClass + '_deathBurned' + (random(2) + 1)); unlockAchievement('fireman'); } enemiesOnScreen[v].legs._visible = false; } if (enemiesOnScreen[v].human == false) { ++career_mechsKilled; enemiesOnScreen[v].torso.gotoAndPlay(enemiesOnScreen[v].unitClass + '_dead'); weaponParticle(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, 'random', enemiesOnScreen[v].torso.weapon1.ref); weaponParticle(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, 'random', enemiesOnScreen[v].torso.weapon2.ref); weaponParticle(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, 'random', enemiesOnScreen[v].torso.weapon3.ref); weaponParticle(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, 'random', enemiesOnScreen[v].torso.weapon4.ref); metalChunkParticle(enemiesOnScreen[v]._x, enemiesOnScreen[v]._y, 'random'); } if (enemiesOnScreen[v].name == 'hero') { endBattle(false); unlockAchievement('failure'); } if (enemiesOnScreen[v].unitType == 'mechHeavyBertha') { endBattle(true); showHitEffect(enemiesOnScreen[v], 'nuke'); } enemiesOnScreen[v].cacheAsBitmap = true; if (enemiesOnScreen[v].name != 'hero') { setTimeout(corpseRemoval, corpseDelay, enemiesOnScreen[v]); } enemiesOnScreen[v] = null; enemiesOnScreen.splice(v, 1); ++crowd_killCount; ++bodyCount; --numEnemies; if (currentLevel.gameMode == 'bodyCount') { updateGameModeInterface(currentLevel.gameMode); } checkGameMode(currentLevel.gameMode); } removeMovieClip(roundsOnScreen[r]); roundsOnScreen[r].onEnterFrame = null; roundsOnScreen.splice(r, 1); break; } } } } } } } function splashDamage(targetX, targetY, splashType, splashSize, splashDamage, hitAngle, owner) { var v5 = 99999999999.0; for (sd in enemiesOnScreen) { var v3 = enemiesOnScreen[sd]._x - targetX; var v2 = enemiesOnScreen[sd]._y - targetY; v5 = Math.sqrt(v3 * v3 + v2 * v2); if (v5 <= splashSize) { var v4 = splashDamage; if (enemiesOnScreen[sd].name == 'hero') { v4 *= heroDamageMod; } enemiesOnScreen[sd].health -= v4; if (enemiesOnScreen[sd].health <= 0 && enemiesOnScreen[sd].alive == true) { enemiesOnScreen[sd].alive = false; if (enemiesOnScreen[sd].name == 'hero') { endBattle(false); unlockAchievement('failure'); } if (enemiesOnScreen[sd].unitType == 'mechHeavyBertha') { endBattle(true); showHitEffect(enemiesOnScreen[sd], 'nuke'); } if (roundsOnScreen[r].owner == 'arena') { crowd_bonusCredits += environmentKillBonus; showBonus('arena'); } var v1 = 1; while (v1 < 5) { enemiesOnScreen[sd].torso['weapon' + v1].firing = false; enemiesOnScreen[sd].torso['weapon' + v1]._visible = false; ++v1; } if (enemiesOnScreen[sd].human == false) { enemiesOnScreen[sd].torso.gotoAndPlay(enemiesOnScreen[sd].unitClass + '_dead'); weaponParticle(enemiesOnScreen[sd]._x, enemiesOnScreen[sd]._y, 'random', enemiesOnScreen[sd].torso.weapon1.ref); weaponParticle(enemiesOnScreen[sd]._x, enemiesOnScreen[sd]._y, 'random', enemiesOnScreen[sd].torso.weapon2.ref); weaponParticle(enemiesOnScreen[sd]._x, enemiesOnScreen[sd]._y, 'random', enemiesOnScreen[sd].torso.weapon3.ref); weaponParticle(enemiesOnScreen[sd]._x, enemiesOnScreen[sd]._y, 'random', enemiesOnScreen[sd].torso.weapon4.ref); metalChunkParticle(enemiesOnScreen[sd]._x, enemiesOnScreen[sd]._y, 'random'); } if (enemiesOnScreen[sd].human == true) { enemiesOnScreen[sd].torso.gotoAndPlay(enemiesOnScreen[sd].unitClass + '_exploded'); enemiesOnScreen[sd].legs._visible = false; goreParticle(enemiesOnScreen[sd]._x, enemiesOnScreen[sd]._y, hitAngle); playSound('sound_gore' + random(2)); } enemiesOnScreen[sd].cacheAsBitmap = true; if (enemiesOnScreen[v].name != 'hero') { setTimeout(corpseRemoval, corpseDelay, enemiesOnScreen[sd]); } enemiesOnScreen[sd] = null; enemiesOnScreen.splice(sd, 1); ++crowd_killCount; ++bodyCount; --numEnemies; if (currentLevel.gameMode == 'bodyCount') { updateGameModeInterface(currentLevel.gameMode); } checkGameMode(currentLevel.gameMode); } } } } function corpseRemoval(target) { target.cacheAsBitmap = false; target.alphaTo(0, 0.3, 'linear', 0, function () { removeMovieClip(this); }); } function placeDecal(decalType, roundName) { ++decals; world.attachMovie('decal_' + decalType, 'decal' + decals, depth_world_decals + decals); world['decal' + decals]._x = roundName._x; world['decal' + decals]._y = roundName._y; world['decal' + decals]._rotation = roundName._rotation; world['decal' + decals]._yscale = random(40) + 70; world['decal' + decals]._xscale = world['decal' + decals]._yscale; world['decal' + decals].cacheAsBitmap = true; } function trapTriggerCollisions() { for (mm in allTrapTriggers) { --allTrapTriggers[mm].timer; if (allTrapTriggers[mm].timer < 0) { allTrapTriggers[mm].button.gotoAndStop('on'); for (mv in enemiesOnScreen) { if (enemiesOnScreen[mv].hitTest(allTrapTriggers[mm].collision)) { playSound('sound_buttonDown'); allTrapTriggers[mm].timer = triggerTimerMax; allTrapTriggers[mm].button.gotoAndStop('off'); for (ttt in allTrapTriggers[mm].traps) { var v3 = _root.world[allTrapTriggers[mm].traps[ttt]]; if (v3.type == 'electricTrap') { playSound('sound_trapElectric'); v3.topSpark._alpha = 100; v3.bottomSpark._alpha = 100; v3.topSpark._visible = true; v3.bottomSpark._visible = true; v3.activated = true; v3.topSpark.alphaTo(0, 1, 'linear', 2, function () { this._visible = false; this._parent.activated = false; }); v3.bottomSpark.alphaTo(0, 1, 'linear', 2, function () { this._visible = false; this._parent.activated = false; }); } if (v3.type == 'rocketTrap') { v3.weapon.gotoAndPlay('fire'); } if (v3.type == 'laserTrap') { v3.weapon.gotoAndPlay('fire'); } } } } } } } function trapCollisions() { for (mm in allTraps) { for (mv in enemiesOnScreen) { if (allTraps[mm].activated == true) { if (enemiesOnScreen[mv].hitTest(allTraps[mm].collision)) { if (enemiesOnScreen[mv].name == 'hero') { enemiesOnScreen[mv].health -= Math.round(electricTrapDamage * heroDamageMod); } else { enemiesOnScreen[mv].health -= electricTrapDamage; } if (enemiesOnScreen[mv].human == true) { if (enemiesOnScreen[mv].empShutDown == false) { enemiesOnScreen[mv].empShutDown = true; enemiesOnScreen[mv].torso.gotoAndPlay('prisoner_shocked'); } } else { if (enemiesOnScreen[mv].empShutDown == false) { if (enemiesOnScreen[mv].unitType != 'mechHeavyBertha') { showHitEffect(enemiesOnScreen[mv], 'emp'); } else { if (random(100) > 95) { showHitEffect(enemiesOnScreen[mv], 'emp'); } } } } if (enemiesOnScreen[mv].health <= 0 && enemiesOnScreen[mv].alive == true) { unlockAchievement('shocker'); crowd_bonusCredits += environmentKillBonus; showBonus('arena'); enemiesOnScreen[mv].alive = false; dropPickup(enemiesOnScreen[mv]); var v1 = 1; while (v1 < 5) { enemiesOnScreen[mv].torso['weapon' + v1].firing = false; enemiesOnScreen[mv].torso['weapon' + v1]._visible = false; ++v1; } if (enemiesOnScreen[mv].name == 'hero') { endBattle(false); } if (enemiesOnScreen[mv].unitType == 'mechHeavyBertha') { endBattle(true); showHitEffect(enemiesOnScreen[mv], 'nuke'); } if (enemiesOnScreen[mv].human == true) { playSound('sound_soldierDeath' + random(8)); enemiesOnScreen[mv].torso.gotoAndPlay(enemiesOnScreen[mv].unitClass + '_deathBurned' + (random(2) + 1)); enemiesOnScreen[mv].legs._visible = false; } if (enemiesOnScreen[mv].human == false) { enemiesOnScreen[mv].torso.gotoAndPlay(enemiesOnScreen[mv].unitClass + '_dead'); weaponParticle(enemiesOnScreen[mv]._x, enemiesOnScreen[mv]._y, 'random', enemiesOnScreen[mv].torso.weapon1.ref); weaponParticle(enemiesOnScreen[mv]._x, enemiesOnScreen[mv]._y, 'random', enemiesOnScreen[mv].torso.weapon2.ref); weaponParticle(enemiesOnScreen[mv]._x, enemiesOnScreen[mv]._y, 'random', enemiesOnScreen[mv].torso.weapon3.ref); weaponParticle(enemiesOnScreen[mv]._x, enemiesOnScreen[mv]._y, 'random', enemiesOnScreen[mv].torso.weapon4.ref); metalChunkParticle(enemiesOnScreen[mv]._x, enemiesOnScreen[mv]._y, 'random'); } enemiesOnScreen[mv].cacheAsBitmap = true; enemiesOnScreen.splice(mv, 1); ++crowd_killCount; ++bodyCount; --numEnemies; if (currentLevel.gameMode == 'bodyCount') { updateGameModeInterface(currentLevel.gameMode); } checkGameMode(currentLevel.gameMode); } } } } } } function cameraSetup() { var v1 = new Object(); v1.onKeyDown = function () { if (Key.isDown(37)) { cameraPanKeys('left'); } if (Key.isDown(39)) { cameraPanKeys('right'); } }; Key.addListener(v1); } function cameraControl() { if (game.state != 'paused' && camera.state != 'locked') { playerCamPoint = new flash.geom.Point(world.player._x, world.player._y); worldCamPoint = new flash.geom.Point(world.bg._x, world.bg._y); world.localToGlobal(worldCamPoint); world.localToGlobal(playerCamPoint); if (playerCamPoint.x <= playerPanBuffer) { if (world._x <= -panEdgeBuffer && playerCamPoint.x <= Stage.width - panEdgeBufferPlayer) { world._x += world.player.moveSpeedX; } } if (playerCamPoint.x > Stage.width - playerPanBuffer) { if (world._x > -world.bg._width + Stage.width + panEdgeBuffer && playerCamPoint.x >= panEdgeBufferPlayer) { world._x -= world.player.moveSpeedX; } } if (playerCamPoint.y <= playerPanBuffer) { if (world._y <= -panEdgeBuffer && playerCamPoint.y <= Stage.height - panEdgeBufferPlayer) { world._y += world.player.moveSpeedY; } } if (playerCamPoint.y > Stage.height - playerPanBuffer) { if (world._y > -world.bg._height + Stage.height + panEdgeBuffer && playerCamPoint.y >= panEdgeBufferPlayer) { world._y -= world.player.moveSpeedY; } } if (mouseControlPan == true) { if (_xmouse <= panBuffer && world._x <= -panEdgeBuffer && playerCamPoint.x <= Stage.width - panEdgeBufferPlayer) { world._x += panSpeed * 2; } if (_xmouse >= Stage.width - panBuffer && world._x > -world.bg._width + Stage.width + panEdgeBuffer && playerCamPoint.x >= panEdgeBufferPlayer) { world._x -= panSpeed * 2; } if (_ymouse <= panBuffer && world._y <= -panEdgeBuffer && playerCamPoint.y <= Stage.height - panEdgeBufferPlayer) { world._y += panSpeed * 2; } if (_ymouse >= Stage.height - panBuffer && world._y > -world.bg._height + Stage.height + panEdgeBuffer && playerCamPoint.y >= panEdgeBufferPlayer) { world._y -= panSpeed * 2; } } } } function cameraPanKeys(panDir) { if (game.state != 'paused' && camera.state != 'locked') { if (panDir == 'left' && world._x <= -panBuffer) { world._x += panSpeed; } if (panDir == 'right' && world._x > -world.bg._width + Stage.width + panBuffer) { world._x -= panSpeed; } } } function screenShake(magnitude, time) { if (screenShaking == false) { screenShakeTimer = time; screenShaking = true; screenOrigin.x = world._x; screenOrigin.y = world._y; s = screenShakeTimer; while (s > 0) { setTimeout(shakeScreen, screenShakeDelay * s, magnitude); --s; } setTimeout(resetScreenShake, time * screenShakeDelay); } } function shakeScreen(magnitude) { world._x -= random(magnitude) - magnitude / 2; world._y -= random(magnitude) - magnitude / 2; if (world._y < -(world.bg._height / 2)) { world._y = -(world.bg._height / 2); } if (world._y > world.bg._height / 2) { world._y = world.bg._height / 2; } if (world._x > 0) { world._x = 0; } if (world._x < -world.bg._width) { world._x = -world.bg._width; } } function resetScreenShake() { screenShaking = false; } function setupItems() { allWeapons = new Array(weapon_repeater, weapon_assaultCannon, weapon_flamer, weapon_shotCannon, weapon_grenadeLauncher, weapon_rocketLauncher, weapon_proxMine, weapon_emp, weapon_dumbRocketLauncher, weapon_laser); allItems = new Array(weapon_repeater, weapon_assaultCannon, weapon_flamer, weapon_shotCannon, weapon_grenadeLauncher, weapon_rocketLauncher, weapon_proxMine, weapon_emp, weapon_dumbRocketLauncher, weapon_laser, weapon_heatSync, weapon_impactShield, weapon_burnShield, weapon_empShield, weapon_speed, weapon_armor, weapon_turretSlots, weapon_turretSpeed); } function totalWeaponStocks() { totalWeapons = 0; for (tws in allWeapons) { totalWeapons += _root[allWeapons[tws].ref + '_owned']; } } function totalGearStocks() { totalGear = 0; for (tgs in allItems) { if (allItems[tgs].gear == true) { totalGear += _root[allItems[tgs].ref + '_owned']; } } } function particleEmitter(particleType, particleName, particleDepth, particleX, particleY, particleHitAngle, particleGravity, particleQuantity, particleHorizontalEnergy, particleVerticalEnergy, particleFade, particleRotationRate, particleScaling, particleChangeAngle, particleHitGround, particleFalling) { i = 0; while (i <= particleQuantity) { ++particleCount; if (particleCount > 10000) { particleCount = 1; } if (particleType == 'particle_smokeDamage') { var v2 = world.attachMovie(particleType, particleName + particleCount, depth_world_topParticles + particleCount); } else { var v2 = world.attachMovie(particleType, particleName + particleCount, depth_world_particles + particleCount); } v2.ref = particleName + particleCount; v2.partType = particleType; v2.gravity = particleGravity; if (random(2) > 0) { v2.HorzEnergy = Math.random() * particleHorizontalEnergy; } else { v2.HorzEnergy = Math.random() * -particleHorizontalEnergy; } v2.VertEnergy = -particleVerticalEnergy + Math.random() * particleVerticalEnergy / 2; if (particleFalling == false) { if (random(2) > 0) { v2.VertEnergy = particleVerticalEnergy + Math.random() * particleVerticalEnergy / 2; } else { v2.VertEnergy = -particleVerticalEnergy + Math.random() * particleVerticalEnergy / 2; } } if (particleScaling == true) { v2._yscale = random(50) + 50; v2._xscale = v2._yscale; } v2._x = particleX; v2._y = particleY; v2.hitGround = particleHitGround; v2.originY = particleY; v2.angle = particleHitAngle + (random(45) - 24); if (particleHitAngle == 'random') { v2.angle = random(360); } v2._rotation = v2.angle; v2.rotation = particleRotationRate; v2.acceleration = 5; v2.particleFade = particleFade; v2.splash = particleSplash; v2.life = 10; v2.onEnterFrame = _root.moveParticle; ++i; } } function moveParticle() { with (this) { this._alpha -= particleFade; if (this._alpha <= 15) { this.onEnterFrame = null; removeMovieClip(this); } this.life -= 1; if (this.life <= 0 && particleFade == 0) { this.cacheAsBitmap = true; setTimeout(_root.removeParticle, _root.particleFadeOutDelay, this); this.onEnterFrame = null; } this._rotation += rotation; this.x = Math.cos(this.angle * Math.PI / 180) * HorzEnergy; this.y = Math.sin(this.angle * Math.PI / 180) * VertEnergy; this._x -= this.x; this._y -= this.y; } } function removeParticle(target) { target.cacheAsBitmap = false; target.onEnterFrame = null; removeMovieClip(target); } function concreteChunkParticle(targetX, targetY, hitAngle) { particleEmitter('particle_concrete', 'particle', 100, targetX, targetY, 'random', 0.1, random(2), random(10) + 5, random(10) + 3, 0, true, false, true, true); } function weaponParticle(targetX, targetY, hitAngle, weaponName) { particleEmitter(weaponName, 'particle', 100, targetX, targetY, 'random', 0.1, 0, random(7) + 3, random(7) + 3, 0, 5, true, false, true, true); } function metalChunkParticle(targetX, targetY, hitAngle) { particleEmitter('particle_metalFragment', 'particle', 100, targetX, targetY, 'random', 0.1, 6, random(6) + 2, random(6) + 2, 0, 0, true, true, false, true); } function bloodParticle(targetX, targetY, hitAngle) { particleEmitter('particle_blood', 'particle', 100, targetX, targetY, hitAngle, 0.1, 2, random(2) + 3, random(2) + 3, 0, 0, true, false, true, true); } function goreParticle(targetX, targetY, hitAngle) { particleEmitter('particle_blood', 'particle', 100, targetX, targetY, hitAngle, 0.1, 3, random(2) + 3, random(2) + 3, 0, 0, true, false, true, true); particleEmitter('particle_bigBlood', 'particle', 100, targetX, targetY, hitAngle, 0.1, 2, random(2) + 2, random(2) + 2, 0, 0, true, false, true, true); particleEmitter('particle_bodyChunk', 'particle', 100, targetX, targetY, hitAngle, 0.1, 2, random(6) + 3, random(6) + 3, 0, 5, true, false, true, true); particleEmitter('particle_leg', 'particle', 100, targetX, targetY, hitAngle, 0.1, 0, random(6) + 3, random(6) + 3, 0, 5, true, false, true, true); particleEmitter('particle_arm', 'particle', 100, targetX, targetY, hitAngle, 0.1, 0, random(6) + 3, random(6) + 3, 0, 8, true, false, true, true); particleEmitter('particle_arm', 'particle', 100, targetX, targetY, hitAngle, 0.1, 0, random(6) + 3, random(6) + 3, 0, 5, true, false, true, true); particleEmitter('particle_head', 'particle', 100, targetX, targetY, hitAngle, 0.1, 0, random(6) + 3, random(6) + 3, 0, 5, true, false, true, true); } function rocketSmokeParticle(targetX, targetY, hitAngle) { particleEmitter('particle_smoke', 'particle', 100, targetX + (random(8) - 4), targetY + (random(8) - 4), 0, 0.1, 0, 0, 0, 8, 0, false, false, false, true); } function damageSmokeParticle(targetX, targetY, hitAngle) { if (random(8) == 0) { particleEmitter('particle_smokeDamage', 'particle', 100, targetX, targetY + (random(14) - 6), 67, 0.1, 0, random(3), random(3), 3, 3, true, true, false, true); } } function heavyDamageSmokeParticle(targetX, targetY, hitAngle) { if (random(4) == 0) { particleEmitter('particle_smokeDamage', 'particle', 100, targetX, targetY + (random(14) - 6), 67, 0.1, 0, random(3), random(3), 3, 3, true, true, false, true); } } function setupInterface() { _root.attachMovie('hud', 'hud', depth_HUD); hud.headsUp._visible = false; hud.bonusDisplay._visible = false; hud.overheatWeapon1._visible = false; hud.overheatWeapon2._visible = false; hud.overheatWeapon3._visible = false; hud.overheatWeapon4._visible = false; hud.empWarning._visible = false; hud.leftShoulder._visible = false; hud.rightShoulder._visible = false; if (weaponSlotsAvailable == 3) { hud.leftShoulder._visible = true; } if (weaponSlotsAvailable == 4) { hud.leftShoulder._visible = true; hud.rightShoulder._visible = true; } setupMouse(); updateInterface(); } function destroyInterface() { Mouse.show(); hud.alphaTo(0, 0, 'linear', 0, function () { removeMovieClip(this); }); } function pauseGame() {} function updateInterface() { var v2 = _root.world.player.torso; hud.health.healthText.text = Math.round(_root.world.player.health); hud.heat_rightShoulder.bar._xscale = Math.round((v2.weapon3.heat / v2.weapon3.heatMax) * 100); hud.heat_leftShoulder.bar._xscale = Math.round((v2.weapon2.heat / v2.weapon2.heatMax) * 100); hud.heat_rightArm.bar._xscale = Math.round((v2.weapon4.heat / v2.weapon4.heatMax) * 100); hud.heat_leftArm.bar._xscale = Math.round((v2.weapon1.heat / v2.weapon1.heatMax) * 100); if (v2.weapon1.heatMax == undefined) { hud.heat_leftArm.bar._xscale = 0; } if (v2.weapon2.heatMax == undefined) { hud.heat_leftShoulder.bar._xscale = 0; } if (v2.weapon3.heatMax == undefined) { hud.heat_rightShoulder.bar._xscale = 0; } if (v2.weapon4.heatMax == undefined) { hud.heat_rightArm.bar._xscale = 0; } var v3 = Math.round((_root.world.player.health / _root.world.player.maxHealth) * 100); if (v3 < lastPlayerHealth) { hud.redFlash.gotoAndPlay('flash'); lastPlayerHealth = v3; if (v3 >= 99 && hudTintedGreen == false) { hudTintedGreen = true; hud.holoback.colorTransformTo(98, 0, 128, 0, 77, 0, 100, 0); hud.shield.colorTransformTo(98, 0, 128, 0, 77, 0, 100, 0); hud.health.colorTransformTo(98, 0, 128, 0, 77, 0, 100, 0); } if (v3 >= 30 && v3 < 60 && hudTintedYellow == false) { hudTintedYellow = true; hud.holoback.colorTransformTo(204, 0, 153, 0, 0, 0, 100, 0); hud.shield.colorTransformTo(204, 0, 153, 0, 0, 0, 100, 0); hud.health.colorTransformTo(204, 0, 153, 0, 0, 0, 100, 0); } if (v3 > 0 && v3 < 30 && hudTintedRed == false) { hudTintedRed = true; hud.holoback.colorTransformTo(190, 0, 100, 0, 100, 0, 100, 0); hud.shield.colorTransformTo(190, 0, 100, 0, 100, 0, 100, 0); hud.health.colorTransformTo(190, 0, 100, 0, 100, 0, 100, 0); } } } function showBonus(bonusType, amount) { hud.bonusDisplay._alpha = 0; if (bonusType == 'crowd') { hud.bonusDisplay.title.text = 'CROWD BONUS!'; hud.bonusDisplay.textClip.cash.text = '+$' + crowdBonus; } if (bonusType == 'arena') { hud.bonusDisplay.title.text = 'ARENA KILL!'; hud.bonusDisplay.textClip.cash.text = '+$' + environmentKillBonus; } if (bonusType == 'pickup') { hud.bonusDisplay.title.text = 'CREDITS!'; hud.bonusDisplay.textClip.cash.text = '+$' + amount; } playSound('sound_interface_buysell'); hud.bonusDisplay._visible = true; hud.bonusDisplay.alphaTo(100, 0.2); hud.bonusDisplay.alphaTo(0, 0.5, 'linear', 2); } function showToolTip(quickSlotObj, tipType, locale) { _root[locale].toolTip.backing._width = 10; _root[locale].toolTip.backing._height = 10; _root[locale].toolTip.desc._width = 10; _root[locale].toolTip.header.autoSize = 'left'; _root[locale].toolTip.desc.autoSize = 'left'; _root[locale].toolTip.header.text = _root[quickSlotObj.arrowType].spellName; _root[locale].toolTip.desc.text = 'Mana Cost: ' + _root[quickSlotObj.arrowType].manaCost + ' per cast'; if (tipType == 'trinket') { _root[locale].toolTip.header.text = _root['trinket_' + trinketEquipped].trinketName; _root[locale].toolTip.desc.text = ''; } if (tipType == 'runeStones') { var v4 = quickSlotObj; _root[locale].toolTip.header.text = ' ' + (v4.charAt(0)).toUpperCase() + v4.slice(1) + ' '; _root[locale].toolTip.desc.text = ''; } _root[locale].toolTip.backing._width = _root[locale].toolTip.desc._width + 20; _root[locale].toolTip.backing._height = _root[locale].toolTip.desc._height + 20; if (_root[locale].toolTip.desc._width <= _root[locale].toolTip.header._width) { _root[locale].toolTip.backing._width = _root[locale].toolTip.header._width + 10; } _root[locale].toolTip._alpha = 0; _root[locale].toolTip._visible = true; _root[locale].toolTip.alphaTo(100, 0.4, 'easeOutSine', 0.2); } function hideToolTip() { hud.toolTip._visible = false; inventory.toolTip._visible = false; } function setupMouse() { Mouse.hide(); hud.attachMovie('mouseCursor', 'mouseCursor', depth_HUD_mouse); hud.mouseCursor._visible = true; hud.mouseCursor.onEnterFrame = function () { this._x = _root._xmouse; this._y = _root._ymouse; }; } function normaliseMouse() { Mouse.show(); } function setupEnemyAI() { if (gameMode == 'battleRoyal') { targetArray = enemiesOnScreen; } else { targetArray = friendsOnScreen; } } function enemyAI() { for (e in enemiesOnScreen) { if (enemiesOnScreen[e].empShutDown == true) { --enemiesOnScreen[e].empShutDownTime; if (enemiesOnScreen[e].empShutDownTime <= 0) { enemiesOnScreen[e].empShutDown = false; } } if (enemiesOnScreen[e].player == false && enemiesOnScreen[e].empShutDown == false) { --enemiesOnScreen[e].waitTime; --enemiesOnScreen[e].targetWait; --enemiesOnScreen[e].movementWait; --enemiesOnScreen[e].moveSwitchTime; enemiesOnScreen[e].enemyProx = 600; if (enemiesOnScreen[e].waitTime <= 0) { aimJugger(enemiesOnScreen[e], enemiesOnScreen[e].enemyTarget); } if (enemiesOnScreen[e].enemyTarget.alive == true) { } else { enemiesOnScreen[e].enemyTarget = null; enemiesOnScreen[e].waitTime = 0; enemiesOnScreen[e].targetWait = 0; enemiesOnScreen[e].enemyProx = 99999999; enemiesOnScreen[e].torso.weapon1.firing = false; enemiesOnScreen[e].torso.weapon2.firing = false; enemiesOnScreen[e].torso.weapon3.firing = false; enemiesOnScreen[e].torso.weapon4.firing = false; } if (enemiesOnScreen[e].wayPointSet == false && enemiesOnScreen[e].waitTime <= 0) { for (x in targetArray) { if (targetArray[x].name != enemiesOnScreen[e].name) { enemiesOnScreen[e].xProx = enemiesOnScreen[e]._x - targetArray[x]._x; enemiesOnScreen[e].yProx = enemiesOnScreen[e]._y - targetArray[x]._y; enemiesOnScreen[e].enemyProx = Math.sqrt(enemiesOnScreen[e].xProx * enemiesOnScreen[e].xProx + enemiesOnScreen[e].yProx * enemiesOnScreen[e].yProx); if (enemiesOnScreen[e].enemyProx < enemiesOnScreen[e].enemyTargetProx) { enemiesOnScreen[e].enemyTargetProx = enemiesOnScreen[e].enemyProx; enemiesOnScreen[e].enemyTarget = targetArray[x]; var v3 = targetArray[x]._x - enemiesOnScreen[e]._x; var v1 = -1 * (targetArray[x]._y - enemiesOnScreen[e]._y); var v4 = Math.atan2(v1, v3); var v2 = Math.round((v4 / Math.PI) * 180); enemiesOnScreen[e].enemyTargetAngle = v2; enemiesOnScreen[e].waitTime = random(20); enemiesOnScreen[e].targetWait = random(300); } } } } if (enemiesOnScreen[e].enemyProx > enemiesOnScreen[e].range || enemiesOnScreen[e].empShutDown == true || enemiesOnScreen[e].enemyTarget.name == undefined) { enemiesOnScreen[e].torso.weapon1.firing = false; enemiesOnScreen[e].torso.weapon2.firing = false; enemiesOnScreen[e].torso.weapon3.firing = false; enemiesOnScreen[e].torso.weapon4.firing = false; } if (enemiesOnScreen[e].onTarget && enemiesOnScreen[e].enemyProx <= enemiesOnScreen[e].range && enemiesOnScreen[e].empShutDown == false) { efw = 1; while (efw < 5) { if (random(aiFiringGap) == 0) { if (enemiesOnScreen[e].torso['weapon' + efw].firingAnim == false && enemiesOnScreen[e].torso['weapon' + efw].heat < enemiesOnScreen[e].torso['weapon' + efw].heatMax - enemiesOnScreen[e].torso['weapon' + efw].heatPerShot) { enemiesOnScreen[e].torso['weapon' + efw].firing = true; enemiesOnScreen[e].torso['weapon' + efw].gotoAndPlay('fire'); } } ++efw; } } for (eb in enemiesOnScreen) { if (enemiesOnScreen[eb] != enemiesOnScreen[e]) { if (enemiesOnScreen[e].torso.frontCollision.hitTest(enemiesOnScreen[eb].collision)) { enemiesOnScreen[e].waitTime = random(20); break; } } } if (enemiesOnScreen[e].moveSwitchTime <= 0) { enemiesOnScreen[e].moveMode = enemiesOnScreen[e].masterMoveMode; enemiesOnScreen[e].moveSwitchTime = 99999999999999.0; } if (enemiesOnScreen[e].masterMoveMode == 'multi') { if (enemiesOnScreen[e].movementWait <= 0) { if (random(2) == 1) { enemiesOnScreen[e].moveMode = 'wander'; } else { enemiesOnScreen[e].moveMode = 'chase'; } enemiesOnScreen[e].movementWait = random(150); } } if (enemiesOnScreen[e].moveMode == 'wander') { ++enemiesOnScreen[e].dirCountX; if (enemiesOnScreen[e].dirCountX > random(100)) { enemiesOnScreen[e].dirCountX = 0; switch (random(3)) { case 0: enemiesOnScreen[e].dirX = 'none'; break; case 1: enemiesOnScreen[e].dirX = 'left'; break; case 2: enemiesOnScreen[e].dirX = 'right'; } } ++enemiesOnScreen[e].dirCountY; if (enemiesOnScreen[e].dirCountY > random(100)) { enemiesOnScreen[e].dirCountY = 0; switch (random(3)) { case 0: enemiesOnScreen[e].dirY = 'none'; break; case 1: enemiesOnScreen[e].dirY = 'up'; break; case 2: enemiesOnScreen[e].dirY = 'down'; } } if (enemiesOnScreen[e].dirX == 'left' && enemiesOnScreen[e]._x > arenaBorder) { enemiesOnScreen[e]._x -= enemiesOnScreen[e].aiMoveSpeed; } if (enemiesOnScreen[e].dirX == 'right' && enemiesOnScreen[e]._x < world.bg._width - arenaBorder) { enemiesOnScreen[e]._x += enemiesOnScreen[e].aiMoveSpeed; } if (enemiesOnScreen[e].dirY == 'up' && enemiesOnScreen[e]._y > arenaBorder) { enemiesOnScreen[e]._y -= enemiesOnScreen[e].aiMoveSpeed; } if (enemiesOnScreen[e].dirY == 'down' && enemiesOnScreen[e]._y < world.bg._height - arenaBorder) { enemiesOnScreen[e]._y += enemiesOnScreen[e].aiMoveSpeed; } } if (enemiesOnScreen[e].moveMode == 'chase') { if (enemiesOnScreen[e].onTarget && enemiesOnScreen[e].enemyProx > enemiesOnScreen[e].range) { enemiesOnScreen[e].x = Math.cos(enemiesOnScreen[e].torso._rotation * Math.PI / 180) * enemiesOnScreen[e].aiMoveSpeed; enemiesOnScreen[e].y = Math.sin(enemiesOnScreen[e].torso._rotation * Math.PI / 180) * enemiesOnScreen[e].aiMoveSpeed; enemiesOnScreen[e]._x -= enemiesOnScreen[e].x; enemiesOnScreen[e]._y -= enemiesOnScreen[e].y; enemiesOnScreen[e].dirX = 'left'; enemiesOnScreen[e].dirY = 'down'; } if (enemiesOnScreen[e].enemyProx <= enemiesOnScreen[e].range) { enemiesOnScreen[e].dirX = 'none'; enemiesOnScreen[e].dirY = 'none'; } } } } } function animateGate(gateName) { world[gateName].gate.xSlideTo(50, 0.5, 'easeOutSine'); world[gateName].gate.xSlideTo(0, 0.5, 'easeOutSine', 3); } function enemyGenerator() { --spawnCounter; if (spawnCounter <= 0 && numEnemies < currentLevel.maxEnemies && spawnEnemyActive) { spawnCounter = spawnCounterMax; while (currentRandomSpawn == lastRandomSpawn) { currentRandomSpawn = currentLevel.spawns[random(currentLevel.spawns.length)]; } lastRandomSpawn = currentRandomSpawn; switch (currentRandomSpawn) { case 'top': currSpawnLoc = 'top'; animateGate('gateTop'); break; case 'topLeft': currSpawnLoc = 'topLeft'; animateGate('gateTopLeft'); break; case 'topRight': currSpawnLoc = 'topRight'; animateGate('gateTopRight'); break; case 'right': currSpawnLoc = 'right'; animateGate('gateRight'); break; case 'bottom': currSpawnLoc = 'bottom'; animateGate('gateBottom'); break; case 'left': currSpawnLoc = 'left'; animateGate('gateLeft'); break; case 'boss': currSpawnLoc = 'boss'; } esp = 0; while (esp < currentLevel.spawnCount) { if (numEnemies < currentLevel.maxEnemies) { spawnEnemy(currentLevel.enemyTypes[random(currentLevel.enemyTypes.length)], currSpawnLoc); if (mission == totalMissions) { spawnEnemy('prisoner' + (random(3) + 1), currSpawnLoc); spawnEnemy('prisoner' + (random(3) + 1), currSpawnLoc); spawnEnemy('prisoner' + (random(3) + 1), currSpawnLoc); spawnEnemy('prisoner' + (random(3) + 1), currSpawnLoc); } } ++esp; } } } function showHitEffect(target, hitType) { switch (hitType) { case 'ballistic': ++numEffects; if (numEffects > 1000) { numEffects = 0; } world.attachMovie('decal_bulletHitMech', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x; world['effect' + numEffects]._y = target._y; playSound('sound_ricochetMetal' + (random(6) + 1)); break; case 'nuke': ++numEffects; if (numEffects > 1000) { numEffects = 0; } screenShake(10, 20); world.attachMovie('effect_nuke', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x; world['effect' + numEffects]._y = target._y; world['effect' + numEffects]._yscale = random(60) + 70; world['effect' + numEffects]._xscale = world['effect' + numEffects]._yscale; world['effect' + numEffects]._rotation = random(360); world.colorTransformTo(255, 100, 255, 100, 255, 100, 255, 0, 0.2, 'linear'); world.colorTransformTo(100, 0, 100, 0, 100, 0, 100, 0, 0.2, 'linear', 0.6); playSound('sound_explosion_nuke'); break; case 'explosion': ++numEffects; if (numEffects > 1000) { numEffects = 0; } world.attachMovie('effect_explosion', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x; world['effect' + numEffects]._y = target._y; world['effect' + numEffects]._yscale = random(60) + 70; world['effect' + numEffects]._xscale = world['effect' + numEffects]._yscale; world['effect' + numEffects]._rotation = random(360); playSound('sound_explosion_big' + (random(2) + 1)); break; case 'smallExplosion': ++numEffects; if (numEffects > 1000) { numEffects = 0; } world.attachMovie('effect_explosion', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x; world['effect' + numEffects]._y = target._y; world['effect' + numEffects]._yscale = random(40) + 80; world['effect' + numEffects]._xscale = world['effect' + numEffects]._yscale; world['effect' + numEffects]._rotation = random(360); playSound('sound_explosion_small' + (random(2) + 1)); break; case 'burn': ++numEffects; if (numEffects > 1000) { numEffects = 0; } world.attachMovie('effect_burn', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x; world['effect' + numEffects]._y = target._y; world['effect' + numEffects]._yscale = random(60) + 60; world['effect' + numEffects]._xscale = world['effect' + numEffects]._yscale; world['effect' + numEffects]._rotation = random(360); break; case 'emp': ++numEffects; if (numEffects > 1000) { numEffects = 0; } world.attachMovie('effect_emp', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x; world['effect' + numEffects]._y = target._y; world['effect' + numEffects]._yscale = random(60) + 70; world['effect' + numEffects]._xscale = world['effect' + numEffects]._yscale; world['effect' + numEffects]._rotation = random(360); playSound('sound_empExplosion'); if (target.name == 'hero') { var v2 = 20; if (empShield_equipped > 0) { v2 = Math.round(v2 * empShield_equipped); } if (random(100) > v2 && target.unitClass == 'mech' && target.empShutDown == false) { hud.empWarning._visible = true; target.empShutDown = true; target.empShutDownTime = 60; target.torso.weapon1.firing = false; target.torso.weapon2.firing = false; target.torso.weapon3.firing = false; target.torso.weapon4.firing = false; } } else { if (random(100) > 20 && target.unitClass == 'mech' && target.empShutDown == false) { unlockAchievement('shutdown'); target.empShutDown = true; target.empShutDownTime = 60; target.torso.weapon1.firing = false; target.torso.weapon2.firing = false; target.torso.weapon3.firing = false; target.torso.weapon4.firing = false; } } break; case 'deathExplosion': ++numEffects; if (numEffects > 1000) { numEffects = 0; } world.attachMovie('effect_explosion', 'effect' + numEffects, depth_world_effects + numEffects); world['effect' + numEffects]._x = target._x + (random(30) - 15); world['effect' + numEffects]._y = target._y + (random(30) - 15); world['effect' + numEffects]._yscale = random(70) + 180; world['effect' + numEffects]._xscale = world['effect' + numEffects]._yscale; world['effect' + numEffects]._rotation = random(360); playSound('sound_explosion_big' + (random(2) + 1)); } } function playRollOverSound() { playSound('sound_interface_over'); } function playClickSound() { playSound('sound_interface_click'); } function playSellSound() { playSound('sound_interface_buysell'); } function playEquipSound() { playSound('sound_interface_equip'); } function loadMenu() { debugTools(); music_inGameMusic.volumeTo(0, 3, 'linear', 0, function () { this.stop(); }); normaliseMouse(); initDialogBoxes(); checkForSaveGame(); loadGameInfo(); if (music_menuMusic == undefined) { } music_menuMusic.volumeTo(100, 3); _root.attachMovie('menu', 'menu', depth_menu); menu.mainMenu.versionNumber.text = _root.versionNumber; menu.instructions._visible = false; menu.mainMenu.logo._alpha = 0; menu.mainMenu.pages._alpha = 0; menu.mainMenu.menuItems._alpha = 0; menu.mainMenu.logo.colorTo(16777215); menu.mainMenu.logo.alphaTo(100, 1.2, 'easeOutSine'); menu.mainMenu.pages.alphaTo(100, 1.2, 'easeOutSine', 1); menu.mainMenu.menuItems.alphaTo(100, 1.2, 'easeOutSine', 1); menu.mainMenu.logo.colorTo(16777215, 0.8, 'easeOutSine'); } function hideMenu() { menu.alphaTo(0, 0, 'easeOutSine', 0, function () { removeMovieClip(this); }); } function loadCredits() { menu.distort.gotoAndPlay('distort'); menu.mainMenu._visible = false; menu.credits._visible = true; } function hideCredits() { menu.distort.gotoAndPlay('distort'); menu.credits._visible = false; menu.mainMenu._visible = true; } function loadAchievements() { menu.distort.gotoAndPlay('distort'); menu.mainMenu._visible = false; menu.achievements._visible = true; setupAchievementsPage('menu'); } function hideAchievements() { menu.distort.gotoAndPlay('distort'); menu.achievements._visible = false; menu.mainMenu._visible = true; } function loadInstructions() { menu.distort.gotoAndPlay('distort'); menu.mainMenu._visible = false; menu.instructions._visible = true; } function hideInstructions() { menu.distort.gotoAndPlay('distort'); menu.instructions._visible = false; menu.mainMenu._visible = true; } function loadOptions() { menu.distort.gotoAndPlay('distort'); menu.mainMenu._visible = false; menu.options._visible = true; } function optionsToMainMenu() { menu.distort.gotoAndPlay('distort'); menu.mainMenu._visible = true; menu.options._visible = false; } function loadSurvival() { menu.mainMenu.alphaTo(0, 0.8, 'easeOutSine', 0, function () { this._visible = false; }); menu.survival._alpha = 0; menu.survival._visible = true; menu.survival.alphaTo(100, 0.6, 'easeOutSine', 0.8); } function survivalToMainMenu() { menu.survival.alphaTo(0, 0.6, 'easeOutSine', 0, function () { this._visible = false; }); menu.mainMenu._visible = true; menu.mainMenu.alphaTo(100, 0.8, 'easeOutSine', 0.8); } function buttonSetup_survivalBack(btnName) { _root.menu.survival[btnName].buttonText.text = 'BACK'; _root.menu.survival[btnName].onRelease = function () { playClickSound(); survivalToMainMenu(); }; } function buttonSetup_survivalLaunch(btnName) { _root.menu.survival[btnName].onRelease = function () { survivalGameReset(); playClickSound(); resetLevelVariables(); survivalMode = true; currentLevel = btnName; showLoadScreen(); }; } function buttonSetup_mainMenu(btnName) { checkForSaveGame(); _root.menu.mainMenu.menuItems[btnName].activated = true; _root.menu.mainMenu.menuItems[btnName].textClip.btnText.autoSize = 'center'; if (saveGameExists == false && btnName == 'continueCampaign') { _root.menu.mainMenu.menuItems[btnName].activated = false; _root.menu.mainMenu.menuItems[btnName]._alpha = 50; _root.menu.mainMenu.menuItems[btnName].textClip.alphaTo(50); _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'CONTINUE'; } if (_root.menu.mainMenu.menuItems[btnName].activated == true) { _root.menu.mainMenu.menuItems[btnName].backing.gotoAndStop('over'); _root.menu.mainMenu.menuItems[btnName].gotoAndStop('white'); _root.menu.mainMenu.menuItems[btnName].onRollOver = function () { playRollOverSound(); if (this.activated == true) { this.backing.gotoAndStop('off'); this.gotoAndStop('black'); } }; _root.menu.mainMenu.menuItems[btnName].onRollOut = function () { if (this.activated == true) { this.backing.gotoAndStop('over'); this.gotoAndStop('white'); } }; switch (btnName) { case 'continueCampaign': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'CONTINUE'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { showDialogBox(dialog_continueCampaign); }; break; case 'newCampaign': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'NEW GAME'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); if (saveGameExists == true) { showDialogBox(dialog_startNewCampaign); } else { newGameReset(); setupInventory(); } }; break; case 'options': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'OPTIONS'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); loadOptions(); }; break; case 'survival': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'SURVIVAL'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { if (armorGamesVersion == true) { playClickSound(); loadSurvival(); } else { showDialogBox(dialog_survivalLocked); } }; break; case 'credits': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'CREDITS'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); loadCredits(); }; break; case 'achievements': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'ACHIEVEMENTS'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); loadAchievements(); }; break; case 'howToPlay': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'INSTRUCTIONS'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); loadInstructions(); }; break; case 'strategyGuide': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'STRATEGY GUIDE'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); getURL('http://armorgames.com/guide/Sin-Mark-Strategy-Guide-and-Walkthrough', '_blank'); }; break; case 'addToWebsite': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'USE THIS GAME ON YOUR WEBSITE'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); getURL('http://armorgames.com/free-website-games', '_blank'); }; break; case 'playMoreGames': _root.menu.mainMenu.menuItems[btnName].textClip.btnText.text = 'MORE...'; _root.menu.mainMenu.menuItems[btnName].onRelease = function () { playClickSound(); getURL('http://armorGames.com', '_blank'); }; break; default: } } } function buttonSetup_options(btnName) { _root.menu.options[btnName].textClip.btnText.autoSize = 'center'; _root.menu.options[btnName].backing.gotoAndStop('over'); _root.menu.options[btnName].textClip.colorTo(16777215); switch (btnName) { case 'low': _root.menu.options[btnName].textClip.btnText.text = 'LOW'; if (_quality == 'LOW') { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.medium.textClip.colorTo(16777215, 0); _root.menu.options.high.textClip.colorTo(16777215, 0); _quality = 'LOW'; }; break; case 'medium': _root.menu.options[btnName].textClip.btnText.text = 'MEDIUM'; if (_quality == 'MEDIUM') { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.low.textClip.colorTo(16777215, 0); _root.menu.options.high.textClip.colorTo(16777215, 0); _quality = 'MEDIUM'; }; break; case 'high': _root.menu.options[btnName].textClip.btnText.text = 'HIGH'; if (_quality == 'HIGH') { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.medium.textClip.colorTo(16777215, 0); _root.menu.options.low.textClip.colorTo(16777215, 0); _quality = 'HIGH'; }; break; case 'effectsOn': _root.menu.options[btnName].textClip.btnText.text = 'ON'; if (soundEffectsOn == true) { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.effectsOff.textClip.colorTo(16777215, 0); soundEffectsOn = true; }; break; case 'effectsOff': _root.menu.options[btnName].textClip.btnText.text = 'OFF'; if (soundEffectsOn == false) { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.effectsOn.textClip.colorTo(16777215, 0); soundEffectsOn = false; }; break; case 'musicOn': _root.menu.options[btnName].textClip.btnText.text = 'ON'; if (musicOn == true) { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.musicOff.textClip.colorTo(16777215, 0); music_menuMusic.setVolume(100); music_menuMusic.start(); musicOn = true; }; break; case 'musicOff': _root.menu.options[btnName].textClip.btnText.text = 'OFF'; if (musicOn == false) { _root.menu.options[btnName].textClip.colorTo(15987699, 0); } _root.menu.options[btnName].onRelease = function () { playClickSound(); _root.menu.options[btnName].textClip.colorTo(15987699, 0); _root.menu.options.musicOn.textClip.colorTo(16777215, 0); musicOn = false; music_menuMusic.stop(); }; break; default: } _root.menu.options[btnName].onRollOver = function () { playRollOverSound(); this.backing.gotoAndStop('off'); this.textClip.colorTo(0); }; _root.menu.options[btnName].onDragOut = function () { this.backing.gotoAndStop('over'); this.textClip.colorTo(16777215); }; _root.menu.options[btnName].onRollOut = _root.menu.options[btnName].onDragOut; } function buttonSetup_optionsBack(btnName) { _root.menu.options[btnName].textClip.btnText.text = 'BACK'; _root.menu.options[btnName].backing.gotoAndStop('off'); _root.menu.options[btnName].textClip.colorTo(0); _root.menu.options[btnName].onRelease = function () { playClickSound(); saveGameSettings(); optionsToMainMenu(); }; _root.menu.options[btnName].onRollOver = function () { playRollOverSound(); this.backing.gotoAndStop('over'); this.textClip.colorTo(16777215); }; _root.menu.options[btnName].onDragOut = function () { this.backing.gotoAndStop('off'); this.textClip.colorTo(0); }; _root.menu.options[btnName].onRollOut = _root.menu.options[btnName].onDragOut; } function buttonSetup_genericBack(papa, btnName) { _root.menu[papa][btnName].textClip.btnText.text = 'BACK'; _root.menu[papa][btnName].backing.gotoAndStop('off'); _root.menu[papa][btnName].textClip.colorTo(0); _root.menu[papa][btnName].onRelease = function () { playClickSound(); saveGameSettings(); hideAchievements(); hideCredits(); hideInstructions(); _root.inventory.distort.gotoAndPlay('distort'); _root.inventory.achievements._visible = false; _root.inventory.achBG._visible = false; }; _root.menu[papa][btnName].onRollOver = function () { playRollOverSound(); this.backing.gotoAndStop('over'); this.textClip.colorTo(16777215); }; _root.menu[papa][btnName].onDragOut = function () { this.backing.gotoAndStop('off'); this.textClip.colorTo(0); }; _root.menu[papa][btnName].onRollOut = _root.menu[papa][btnName].onDragOut; } function buttonSetup_genericBackAch(papa, btnName) { _root.inventory[papa][btnName].textClip.btnText.text = 'BACK'; _root.inventory[papa][btnName].backing.gotoAndStop('off'); _root.inventory[papa][btnName].textClip.colorTo(0); _root.inventory[papa][btnName].onRelease = function () { playClickSound(); saveGameSettings(); hideAchievements(); hideCredits(); hideInstructions(); _root.inventory.distort.gotoAndPlay('distort'); _root.inventory.achievements._visible = false; _root.inventory.achBG._visible = false; }; _root.inventory[papa][btnName].onRollOver = function () { playRollOverSound(); this.backing.gotoAndStop('over'); this.textClip.colorTo(16777215); }; _root.inventory[papa][btnName].onDragOut = function () { this.backing.gotoAndStop('off'); this.textClip.colorTo(0); }; _root.inventory[papa][btnName].onRollOut = _root.inventory[papa][btnName].onDragOut; } function endgame() { mission = 10; endBattle(true); totalCredits = 9999999; } function dropPickup(dropper) { if (random(100) + 1 < dropChance) { if (drops > 1000) { drops = 1; } ++drops; world.attachMovie('pickUp', 'pickUp' + drops, depth_world_drops + drops); world['pickUp' + drops]._x = Math.round(dropper._x); world['pickUp' + drops]._y = Math.round(dropper._y); world['pickUp' + drops].name = 'drop' + drops; world['pickUp' + drops].life = pickUpLife; world['pickUp' + drops].alive = true; switch (random(3)) { case 0: if (dropper.unitClass == 'prisoner') { world['pickUp' + drops].amount = 50; } else { world['pickUp' + drops].amount = 150; } break; case 1: if (dropper.unitClass == 'prisoner') { world['pickUp' + drops].amount = 75; } else { world['pickUp' + drops].amount = 250; } break; case 2: if (dropper.unitClass == 'prisoner') { world['pickUp' + drops].amount = 100; } else { world['pickUp' + drops].amount = 400; } break; default: } allDrops.push(world['pickUp' + drops]); world['pickUp' + drops].onEnterFrame = function () { --this.life; if (this.life <= 0 && this.alive == true) { this.alive = false; this.gotoAndPlay('remove'); for (ddfl in _root.allDrops) { if (this.name == _root.allDrops[ddfl].name) { _root.allDrops.splice(ddfl, 1); } } delete this.onEnterFrame; } }; } } function pickUpDrops() { for (puad in allDrops) { if (allDrops[puad].collision.hitTest(world.player.collision)) { allDrops[puad].gotoAndPlay('pickup'); showBonus('pickup', allDrops[puad].amount); bonusCollected += allDrops[puad].amount; allDrops.splice(puad, 1); } } } function setupGameMode(gameMode) { hud.bodyCount._visible = false; hud.koth._visible = false; hud.survival._visible = false; timerActive = false; switch (gameMode) { case 'bodyCount': bodyCount = 0; hud.bodyCount._visible = true; break; case 'survival': bodyCount = 0; hud.survival._visible = true; setTimer(); timerActive = true; break; case 'battleRoyal': bodyCount = 0; hud.survival._visible = true; setTimer(); timerActive = true; break; case 'KOTH': kothCounter = kothCounterMax; kothCapturePoints = 0; hud.koth._visible = true; break; default: } } function updateGameModeInterface(gameMode) { switch (gameMode) { case 'bodyCount': hud.bodyCount.textClip.scaleTo(130, 0.2); hud.bodyCount.textClip.scaleTo(100, 0.2, 'linear', 0.2); if (bodyCount < 10) { hud.bodyCount.textClip.count.text = '00' + bodyCount; } if (bodyCount >= 10 && bodyCount < 100) { hud.bodyCount.textClip.count.text = '0' + bodyCount; } if (bodyCount >= 100) { hud.bodyCount.textClip.count.text = bodyCount; } break; case 'KOTH': if (kothCapturePoints < 10) { hud.koth.textClip.count.text = '00' + kothCapturePoints + '/' + currentLevel.goal; } if (kothCapturePoints >= 10 && kothCapturePoints < 100) { hud.koth.textClip.count.text = '0' + kothCapturePoints + '/' + currentLevel.goal; } if (kothCapturePoints >= 100) { hud.koth.textClip.count.text = kothCapturePoints + '/' + currentLevel.goal; } break; default: } } function checkGameMode(gameMode) { switch (gameMode) { case 'survival': break; case 'bodyCount': if (bodyCount >= currentLevel.goal) { endBattle(true); } break; case 'KOTH': --kothCounter; if (kothCounter < 0) { kothCounter = kothCounterMax; koth_changeControlPoint(); } if (world.player.collision.hitTest(currentControlPoint.collision)) { if (captureLoop == false) { captureLoop = true; playSoundLoop('sound_captureLoop', 999, 'capture'); playSound('sound_captureStart'); } if (currentControlPoint.lights._alpha == 0) { currentControlPoint.lights.alphaTo(100, 0.5, 'linear'); } ++kothCapturePoints; updateGameModeInterface(currentLevel.gameMode); } else { if (captureLoop == true) { captureLoop = false; loop_capture.stop(); } if (currentControlPoint.lights._alpha == 100) { currentControlPoint.lights.alphaTo(0, 0.5, 'linear'); } } if (kothCapturePoints == currentLevel.goal) { endBattle(true); } break; default: } } function koth_changeControlPoint() { var v1 = random(controlPoints.length); if (controlPoints[v1]._name != currentControlPoint._name) { currentControlPoint.red._visible = true; currentControlPoint.red._alpha = 100; currentControlPoint.green._alpha = 0; currentControlPoint.red.alphaTo(0, 0.5, 'linear', 1); currentControlPoint.lights.alphaTo(0, 0.5, 'linear'); currentControlPoint = controlPoints[v1]; currentControlPoint.green._visible = true; currentControlPoint.green._alpha = 0; currentControlPoint.green.alphaTo(100, 0.5, 'linear'); playSound('sound_captureEnd'); } } function slowEnterFrame() { --slowEFcount; if (slowEFcount <= 0) { enemyGenerator(); crowdVoice(); timerTick(); slowEFcount = slowEFcountMax; } } function mediumEnterFrame() { --mediumEFcount; if (mediumEFcount <= 0) { checkGameMode(currentLevel.gameMode); playerCollisionEnemy(); trapCollisions(); trapTriggerCollisions(); coolWeapons(); updateInterface(); mediumEFcount = mediumEFcountMax; } } stop(); removeAd(); _quality = 'medium'; var debugMode = false; var intoMenu = true; var slowEFcount = 0; var slowEFcountMax = 30; var mediumEFcount = 0; var mediumEFcountMax = 4; var depth_soundLoops = 60; var depth_music = 75; var depth_menu = 550; var depth_inventory = 600; var depth_blackOut = 800; var depth_saveAnim = 125000; var depth_dialog = 130000; var depth_world = 1000; var depth_world_traps = 1100; var depth_gateBlackOuts = 1050; var depth_world_decals = 2000; var depth_world_traps = 25000; var depth_world_trapTriggers = 26000; var depth_world_captures = 95000; var depth_world_instantCollision = 395000; var depth_world_enemies = 400000; var depth_world_drops = 450000; var depth_world_particles = 475000; var depth_world_waypoints = 500000; var depth_world_projectiles = 600000; var depth_world_player = 800000; var depth_world_topParticles = 825000; var depth_world_effects = 850000; var depth_gateLeft = 1205000; var depth_gateTop = 1205001; var depth_gateTopLeft = 1205051; var depth_gateTopRight = 1205052; var depth_gateBottom = 1205002; var depth_gateRight = 1205003; var depth_HUD = 2000; var depth_HUD_mouse = 2500; var depth_HUD_preBattle = 5000; var depth_achievementPanel = 1450000; var depth_DEBUG_fps = 1500000; var depth_DEBUG_console = 1500001; var achievementShowTime = 5; var achievementCount = 0; var achPanels = 0; var numActiveAchPanels = 0; var achPanelSlideLoc = 25; var allAchievementsUnlocked = false; var allAchievements = new Array(); var allAchievementNames = new Array('crowdPleaser', 'shocker', 'explosivo', 'frickenLasers', 'centurian', 'saboteur', 'fireman', 'shutdown', 'failure', 'entertainer', 'hoarder', 'bigMoney', 'gunNut', 'prepared', 'runninHot', 'domemaster', 'iComeInPeace', 'juggernaut', 'freedom', 'slaughterMaster'); var allAchievementDescriptions = new Array('Get a Crowd Bonus', 'Get a kill with an electric trap', 'Get a kill with a rocket trap', 'Get a kill with a laser trap', 'Kill 100 enemies in an event', 'Get a kill with a Proximity Mine', 'Burn an enemy to death', 'Hit an enemy with an EMP', 'Get yourself killed', 'Get 3000 in Crowd Bonuses in an event', 'Collect 2000 credits in an event', 'Earned over 100,000 credits', 'Own 5 Weapons at once', 'Own 5 Gear items at once', 'Overheat weapons 30 times in an event', 'Get over 5000 in Crowd Bonuses', 'Win an event without firing a shot', 'Purchase all upgrades', 'Earn your Freedom', 'Get 6 kills in a second'); var allAchievementBonuses = new Array('2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '5000', '5000', '5000', '5000', '5000', '5000', '10000', '10000', '10000', '10000', '10000'); for (ach in allAchievementNames) { _root['achievement_' + allAchievementNames[ach]] = new Object(); currentAchievement = _root['achievement_' + allAchievementNames[ach]]; currentAchievement.name = allAchievementNames[ach]; currentAchievement.description = allAchievementDescriptions[ach]; currentAchievement.bonus = allAchievementBonuses[ach]; allAchievements.push(currentAchievement); currentAchievement = null; } achievement_bertha = new Object(); achievement_bertha.name = 'BERTHA'; achievement_bertha.description = 'Got all achievements. Bertha unlocked.'; var saveGameExists = false; var loadedMission = 0; saveGameData = SharedObject.getLocal('ConArtists_Juggerdome'); checkForSaveGame(); var endingAccuracy = 0; var endingTotalCredits = 0; var career_shotsFired = 0; var career_shotsMissed = 0; var career_prisonersKilled = 0; var career_mechsKilled = 0; var career_eventsWon = 0; var career_eventsLost = 0; var career_itemsPurchased = 0; var career_itemsSold = 0; var career_collectedCredits = 0; var career_bonusCredits = 0; var career_prizeCredits = 0; initDialogBoxes(); var updateFPScountMax = 30; var updateFPScount = updateFPScountMax; var timerSeconds = 60; var timerSecondsMax = 59; var timerMinutes = 1; var missionTimerMax = 59; var missionTimerSeconds = 0; var missionTimerMinutes = 0; var missionTimerHours = 0; var missionTotalSeconds = 0; var missionTime = ''; var timerDisplay = '00:00'; var timerActive = true; var crowd_killCount = 0; var crowd_reactPoint = 3; var crowd_bonusCredits = 0; var crowdBonus = 500; var environmentKillBonus = 50; var unit_prisoner1 = new Object(); unit_prisoner1.unitClass = 'prisoner'; unit_prisoner1.body = 'prisoner'; unit_prisoner1.health = 50; unit_prisoner1.acceleration = 0.2; unit_prisoner1.weight = 0.6; unit_prisoner1.maxMoveSpeed = 6; unit_prisoner1.aiMoveSpeed = 1.8; unit_prisoner1.legRotationRate = 2; unit_prisoner1.turretRotationRate = 5; unit_prisoner1.range = 300; unit_prisoner1.weapon1 = 'none'; unit_prisoner1.weapon2 = 'none'; unit_prisoner1.weapon3 = 'none'; unit_prisoner1.weapon4 = 'none'; unit_prisoner1.moveMode = 'wander'; var unit_prisoner2 = new Object(); unit_prisoner2.unitClass = 'prisoner'; unit_prisoner2.body = 'prisoner'; unit_prisoner2.health = 50; unit_prisoner2.acceleration = 0.2; unit_prisoner2.weight = 0.6; unit_prisoner2.maxMoveSpeed = 6; unit_prisoner2.aiMoveSpeed = 1.8; unit_prisoner2.legRotationRate = 2; unit_prisoner2.turretRotationRate = 5; unit_prisoner2.range = 190; unit_prisoner2.weapon1 = 'assaultRifle'; unit_prisoner2.weapon2 = 'none'; unit_prisoner2.weapon3 = 'none'; unit_prisoner2.weapon4 = 'none'; unit_prisoner2.moveMode = 'multi'; var unit_prisoner3 = new Object(); unit_prisoner3.unitClass = 'prisoner'; unit_prisoner3.body = 'prisoner'; unit_prisoner3.health = 50; unit_prisoner3.acceleration = 0.2; unit_prisoner3.weight = 0.6; unit_prisoner3.maxMoveSpeed = 6; unit_prisoner3.aiMoveSpeed = 1.8; unit_prisoner3.legRotationRate = 2; unit_prisoner3.turretRotationRate = 5; unit_prisoner3.range = 250; unit_prisoner3.weapon1 = 'RPG'; unit_prisoner3.weapon2 = 'none'; unit_prisoner3.weapon3 = 'none'; unit_prisoner3.weapon4 = 'none'; unit_prisoner3.moveMode = 'multi'; var unit_prisonerChase = new Object(); unit_prisonerChase.unitClass = 'prisoner'; unit_prisonerChase.body = 'prisoner'; unit_prisonerChase.health = 50; unit_prisonerChase.acceleration = 0.2; unit_prisonerChase.weight = 0.6; unit_prisonerChase.maxMoveSpeed = 6; unit_prisonerChase.aiMoveSpeed = 1.8; unit_prisonerChase.legRotationRate = 2; unit_prisonerChase.turretRotationRate = 5; unit_prisonerChase.range = 190; unit_prisonerChase.weapon1 = 'assaultRifle'; unit_prisonerChase.weapon2 = 'none'; unit_prisonerChase.weapon3 = 'none'; unit_prisonerChase.weapon4 = 'none'; unit_prisonerChase.moveMode = 'chase'; var unit_mechFlamer = new Object(); unit_mechFlamer.unitClass = 'mech'; unit_mechFlamer.body = 'MkI'; unit_mechFlamer.health = 2800; unit_mechFlamer.acceleration = 0.2; unit_mechFlamer.weight = 0.6; unit_mechFlamer.maxMoveSpeed = 7; unit_mechFlamer.aiMoveSpeed = 3.5; unit_mechFlamer.legRotationRate = 2; unit_mechFlamer.turretRotationRate = 4; unit_mechFlamer.range = 100; unit_mechFlamer.weapon1 = 'none'; unit_mechFlamer.weapon2 = 'none'; unit_mechFlamer.weapon3 = 'none'; unit_mechFlamer.weapon4 = 'flamer'; unit_mechFlamer.moveMode = 'multi'; var unit_mechRepeater = new Object(); unit_mechRepeater.unitClass = 'mech'; unit_mechRepeater.body = 'MkI'; unit_mechRepeater.health = 1800; unit_mechRepeater.acceleration = 0.2; unit_mechRepeater.weight = 0.6; unit_mechRepeater.maxMoveSpeed = 5; unit_mechRepeater.aiMoveSpeed = 1.5; unit_mechRepeater.legRotationRate = 2; unit_mechRepeater.turretRotationRate = 3.4; unit_mechRepeater.range = 250; unit_mechRepeater.weapon1 = 'repeater'; unit_mechRepeater.weapon2 = 'none'; unit_mechRepeater.weapon3 = 'none'; unit_mechRepeater.weapon4 = 'repeater'; unit_mechRepeater.moveMode = 'multi'; var unit_mechLightGrenadier = new Object(); unit_mechLightGrenadier.unitClass = 'mech'; unit_mechLightGrenadier.body = 'MkI'; unit_mechLightGrenadier.health = 1800; unit_mechLightGrenadier.acceleration = 0.2; unit_mechLightGrenadier.weight = 0.6; unit_mechLightGrenadier.maxMoveSpeed = 5; unit_mechLightGrenadier.aiMoveSpeed = 1.5; unit_mechLightGrenadier.legRotationRate = 2; unit_mechLightGrenadier.turretRotationRate = 3.4; unit_mechLightGrenadier.range = 250; unit_mechLightGrenadier.weapon1 = 'repeater'; unit_mechLightGrenadier.weapon2 = 'none'; unit_mechLightGrenadier.weapon3 = 'none'; unit_mechLightGrenadier.weapon4 = 'grenadeLauncher'; unit_mechLightGrenadier.moveMode = 'multi'; var unit_mechShotCannon = new Object(); unit_mechShotCannon.unitClass = 'mech'; unit_mechShotCannon.body = 'MkI'; unit_mechShotCannon.health = 3000; unit_mechShotCannon.acceleration = 0.2; unit_mechShotCannon.weight = 0.6; unit_mechShotCannon.maxMoveSpeed = 4; unit_mechShotCannon.aiMoveSpeed = 1.5; unit_mechShotCannon.legRotationRate = 2; unit_mechShotCannon.turretRotationRate = 3; unit_mechShotCannon.range = 200; unit_mechShotCannon.weapon1 = 'shotCannon'; unit_mechShotCannon.weapon2 = 'none'; unit_mechShotCannon.weapon3 = 'none'; unit_mechShotCannon.weapon4 = 'shotCannon'; unit_mechShotCannon.moveMode = 'multi'; var unit_mechGrenadier = new Object(); unit_mechGrenadier.unitClass = 'mech'; unit_mechGrenadier.body = 'MkII'; unit_mechGrenadier.health = 2200; unit_mechGrenadier.acceleration = 0.2; unit_mechGrenadier.weight = 0.6; unit_mechGrenadier.maxMoveSpeed = 4; unit_mechGrenadier.aiMoveSpeed = 1.5; unit_mechGrenadier.legRotationRate = 2; unit_mechGrenadier.turretRotationRate = 3; unit_mechGrenadier.range = 300; unit_mechGrenadier.weapon1 = 'grenadeLauncher'; unit_mechGrenadier.weapon2 = 'none'; unit_mechGrenadier.weapon3 = 'none'; unit_mechGrenadier.weapon4 = 'grenadeLauncher'; unit_mechGrenadier.moveMode = 'multi'; var unit_mechAssaulter = new Object(); unit_mechAssaulter.unitClass = 'mech'; unit_mechAssaulter.body = 'MkII'; unit_mechAssaulter.health = 2200; unit_mechAssaulter.acceleration = 0.2; unit_mechAssaulter.weight = 0.6; unit_mechAssaulter.maxMoveSpeed = 6; unit_mechAssaulter.aiMoveSpeed = 1.5; unit_mechAssaulter.legRotationRate = 2; unit_mechAssaulter.turretRotationRate = 4; unit_mechAssaulter.range = 300; unit_mechAssaulter.weapon1 = 'assaultCannon'; unit_mechAssaulter.weapon2 = 'none'; unit_mechAssaulter.weapon3 = 'none'; unit_mechAssaulter.weapon4 = 'repeater'; unit_mechAssaulter.moveMode = 'chase'; var unit_mechRocketeer = new Object(); unit_mechRocketeer.unitClass = 'mech'; unit_mechRocketeer.body = 'MkIV'; unit_mechRocketeer.health = 2100; unit_mechRocketeer.acceleration = 0.2; unit_mechRocketeer.weight = 0.6; unit_mechRocketeer.maxMoveSpeed = 6; unit_mechRocketeer.aiMoveSpeed = 1.5; unit_mechRocketeer.legRotationRate = 2; unit_mechRocketeer.turretRotationRate = 4; unit_mechRocketeer.range = 300; unit_mechRocketeer.weapon1 = 'repeater'; unit_mechRocketeer.weapon2 = 'none'; unit_mechRocketeer.weapon3 = 'none'; unit_mechRocketeer.weapon4 = 'rocketLauncher'; unit_mechRocketeer.moveMode = 'multi'; var unit_mechEMP = new Object(); unit_mechEMP.unitClass = 'mech'; unit_mechEMP.body = 'MkII'; unit_mechEMP.health = 3000; unit_mechEMP.acceleration = 0.2; unit_mechEMP.weight = 0.6; unit_mechEMP.maxMoveSpeed = 6; unit_mechEMP.aiMoveSpeed = 1.5; unit_mechEMP.legRotationRate = 2; unit_mechEMP.turretRotationRate = 4; unit_mechEMP.range = 300; unit_mechEMP.weapon1 = 'none'; unit_mechEMP.weapon2 = 'assaultCannon'; unit_mechEMP.weapon3 = 'none'; unit_mechEMP.weapon4 = 'emp'; unit_mechEMP.moveMode = 'multi'; var unit_mechDragon = new Object(); unit_mechDragon.unitClass = 'mech'; unit_mechDragon.body = 'MkII'; unit_mechDragon.health = 3000; unit_mechDragon.acceleration = 0.2; unit_mechDragon.weight = 0.6; unit_mechDragon.maxMoveSpeed = 6; unit_mechDragon.aiMoveSpeed = 3; unit_mechDragon.legRotationRate = 2; unit_mechDragon.turretRotationRate = 5; unit_mechDragon.range = 100; unit_mechDragon.weapon1 = 'flamer'; unit_mechDragon.weapon2 = 'assaultCannon'; unit_mechDragon.weapon3 = 'assaultCannon'; unit_mechDragon.weapon4 = 'flamer'; unit_mechDragon.moveMode = 'multi'; var unit_mechLaser = new Object(); unit_mechLaser.unitClass = 'mech'; unit_mechLaser.body = 'MkI'; unit_mechLaser.health = 2500; unit_mechLaser.acceleration = 0.2; unit_mechLaser.weight = 0.6; unit_mechLaser.maxMoveSpeed = 7; unit_mechLaser.aiMoveSpeed = 2; unit_mechLaser.legRotationRate = 2; unit_mechLaser.turretRotationRate = 5; unit_mechLaser.range = 300; unit_mechLaser.weapon1 = 'laser'; unit_mechLaser.weapon2 = 'none'; unit_mechLaser.weapon3 = 'none'; unit_mechLaser.weapon4 = 'laser'; unit_mechLaser.moveMode = 'multi'; var unit_mechHeavyRepeater = new Object(); unit_mechHeavyRepeater.unitClass = 'mech'; unit_mechHeavyRepeater.body = 'MkII'; unit_mechHeavyRepeater.health = 4500; unit_mechHeavyRepeater.acceleration = 0.2; unit_mechHeavyRepeater.weight = 0.6; unit_mechHeavyRepeater.maxMoveSpeed = 4; unit_mechHeavyRepeater.aiMoveSpeed = 1.5; unit_mechHeavyRepeater.legRotationRate = 2; unit_mechHeavyRepeater.turretRotationRate = 3; unit_mechHeavyRepeater.range = 350; unit_mechHeavyRepeater.weapon1 = 'repeater'; unit_mechHeavyRepeater.weapon2 = 'repeater'; unit_mechHeavyRepeater.weapon3 = 'repeater'; unit_mechHeavyRepeater.weapon4 = 'repeater'; unit_mechHeavyRepeater.moveMode = 'multi'; var unit_mechHeavyLaser = new Object(); unit_mechHeavyLaser.unitClass = 'mech'; unit_mechHeavyLaser.body = 'MkIV'; unit_mechHeavyLaser.health = 4500; unit_mechHeavyLaser.acceleration = 0.2; unit_mechHeavyLaser.weight = 0.6; unit_mechHeavyLaser.maxMoveSpeed = 4; unit_mechHeavyLaser.aiMoveSpeed = 1.5; unit_mechHeavyLaser.legRotationRate = 2; unit_mechHeavyLaser.turretRotationRate = 3; unit_mechHeavyLaser.range = 350; unit_mechHeavyLaser.weapon1 = 'laser'; unit_mechHeavyLaser.weapon2 = 'none'; unit_mechHeavyLaser.weapon3 = 'none'; unit_mechHeavyLaser.weapon4 = 'laser'; unit_mechHeavyLaser.moveMode = 'multi'; var unit_mechHeavyBertha = new Object(); unit_mechHeavyBertha.unitClass = 'mech'; unit_mechHeavyBertha.body = 'MkIII'; unit_mechHeavyBertha.health = 30500; unit_mechHeavyBertha.acceleration = 0.2; unit_mechHeavyBertha.weight = 0.6; unit_mechHeavyBertha.maxMoveSpeed = 4; unit_mechHeavyBertha.aiMoveSpeed = 1.5; unit_mechHeavyBertha.legRotationRate = 2; unit_mechHeavyBertha.turretRotationRate = 3; unit_mechHeavyBertha.range = 350; unit_mechHeavyBertha.weapon1 = 'assaultCannon'; unit_mechHeavyBertha.weapon2 = 'assaultCannon'; unit_mechHeavyBertha.weapon3 = 'none'; unit_mechHeavyBertha.weapon4 = 'bertha'; unit_mechHeavyBertha.moveMode = 'multi'; var unit_mech1 = new Object(); unit_mech1.unitClass = 'mech'; unit_mech1.body = 'MkII'; unit_mech1.health = 2000; unit_mech1.acceleration = 0.2; unit_mech1.weight = 0.6; unit_mech1.maxMoveSpeed = 5; unit_mech1.aiMoveSpeed = 1.5; unit_mech1.legRotationRate = 2; unit_mech1.turretRotationRate = 4; unit_mech1.range = 350; unit_mech1.weapon1 = 'none'; unit_mech1.weapon2 = 'none'; unit_mech1.weapon3 = 'none'; unit_mech1.weapon4 = 'none'; unit_mech1.moveMode = 'multi'; var unit_mech2 = new Object(); unit_mech2.unitClass = 'mech'; unit_mech2.body = 'MkIII'; unit_mech2.health = 2000; unit_mech2.acceleration = 0.2; unit_mech2.weight = 0.6; unit_mech2.maxMoveSpeed = 6; unit_mech2.aiMoveSpeed = 2; unit_mech2.legRotationRate = 2; unit_mech2.turretRotationRate = 4; unit_mech2.range = 350; unit_mech2.weapon1 = 'rocketLauncher'; unit_mech2.weapon2 = 'none'; unit_mech2.weapon3 = 'none'; unit_mech2.weapon4 = 'assaultCannon'; unit_mech2.moveMode = 'multi'; var unit_mech3 = new Object(); unit_mech3.unitClass = 'mech'; unit_mech3.body = 'MkI'; unit_mech3.health = 2000; unit_mech3.acceleration = 0.2; unit_mech3.weight = 0.6; unit_mech3.maxMoveSpeed = 6; unit_mech3.aiMoveSpeed = 2; unit_mech3.legRotationRate = 2; unit_mech3.turretRotationRate = 4; unit_mech3.range = 350; unit_mech3.weapon1 = 'shotCannon'; unit_mech3.weapon2 = 'none'; unit_mech3.weapon3 = 'none'; unit_mech3.weapon4 = 'grenadeLauncher'; unit_mech3.moveMode = 'multi'; var gameMode = 'juggerSplat'; var friendlyFire = false; var battleWon = false; var wonCurrentBattle = false; var bonusCrowd = 0; var bonusCollected = 0; var prizeTotal = 0; var eventBodyCount = 0; var totalMissions = 11; var mission = 1; deathMessageArray = new Array('You got blown into a bunch of pieces.', 'You dead.', 'Come on chuckles, stop with the being dead.', 'EPIC FAILZ or whatever it is idiots say these days.', 'Deader than dead.', 'Nice try. Come back when you\'re not DEAD.', 'Next time kiddo, I believe in you.', 'You died.', 'Next please, this customer is dead.', 'Failed to achieve primary objective. Boop.'); var buying = true; var selling = false; var sellRate = 0.6; var selectedWeaponSlot = ''; var selectedGearSlot = ''; var settingUpMech = false; var weaponSlotsAvailable = 2; var totalCredits = 0; var repeater_owned = 0; var assaultCannon_owned = 0; var shotCannon_owned = 0; var rocketLauncher_owned = 0; var dumbRocketLauncher_owned = 0; var laser_owned = 0; var flamer_owned = 0; var grenadeLauncher_owned = 0; var proxMine_owned = 0; var emp_owned = 0; var bertha_owned = 1; var heatSync_owned = 0; var impactShield_owned = 0; var burnShield_owned = 0; var empShield_owned = 0; var repeater_equipped = 0; var assaultCannon_equipped = 0; var shotCannon_equipped = 0; var rocketLauncher_equipped = 0; var dumbRocketLauncher_equipped = 0; var laser_equipped = 0; var flamer_equipped = 0; var grenadeLauncher_equipped = 0; var proxMine_equipped = 0; var emp_equipped = 0; var bertha_equipped = 0; var heatSync_equipped = 0; var impactShield_equipped = 0; var burnShield_equipped = 0; var empShield_equipped = 0; var fullFunctionName = ''; var startParam = 0; var endParam = 0; var functionName = ''; var param = ''; var rounds = 0; var casingMoveTime = 5; var casingEdge = 64; var casingRemoveTime = 2000; var roundsOnScreen = new Array(); var instantRounds = new Array(); var eventShotsFired = 0; var eventOverheats = 0; var instantCollisions = 0; var soundEffects = 0; var soundEffectsOn = true; var musicOn = true; var musicTracks = 0; var soundMuted = false; var lastMoveX = 'none'; var lastMoveY = 'none'; var momentumMoveX = 'none'; var momentumMoveY = 'none'; var playerStartHealth = 2000; var friendsOnScreen = new Array(); var allOnScreen = new Array(); var weaponListPlayer = new Array('empty', 'empty', 'empty', 'empty'); var gearListPlayer = new Array('empty0', 'empty1', 'empty2', 'empty3'); var enemiesOnScreen = new Array(); var enemyCount = 0; var traps = 0; var allTraps = new Array(); var arenaBorder = 80; var objectCollisionBuffer = 50; var mechBarrier = 35; var arenaEdge = 55; var hitCollisionBuffer = 600; var heroDamageMod = 0.2; var damageVariance = 10; var decals = 0; var decalRemoveTime = 5; var corpseDelay = 30000; var trapCollisionRadius = 50; var trapHitEnemyProx = 999999999; var triggerTimerMax = 30; var electricTrapDamage = 25; var panSpeed = 3; var panEdgeBuffer = 10; var panEdgeBufferPlayer = 280; var panBuffer = 40; var playerPanBuffer = 280; var panInterfaceBlock = Stage.height - 80; var mouseControlPan = false; var camera; camera.state = 'free'; var screenShaking = false; var screenShakeXMax = 10; var screenShakeYMax = 10; var screenShakeTimer = 0; var screenShakeDelay = 50; var screenOrigin = new Object(); var allItems = new Array(); var allWeapons = new Array(); var totalWeapons = 0; var totalGear = 0; weapon_bertha = new Object(); weapon_bertha.ref = 'bertha'; weapon_bertha.name = 'BERTHA'; weapon_bertha.cost = 0; weapon_bertha.damage = 1500; weapon_bertha.accuracy = 1; weapon_bertha.roundSpeed = 11; weapon_bertha.heatMax = 1000; weapon_bertha.heatPerShot = 800; weapon_bertha.coolDown = 50; weapon_bertha.ejectPoint = 0; weapon_bertha.grenade = true; weapon_bertha.dirCount = 90000; weapon_bertha.delay = 30; weapon_bertha.splash = true; weapon_bertha.splashDamage = weapon_bertha.damage / 1.5; weapon_bertha.splashSize = 100; weapon_bertha.hitEffect = 'nuke'; weapon_bertha.caseType = 'none'; weapon_bertha.projectile = 'bertha'; weapon_bertha.roundsPerShot = 1; weapon_bertha.description = ''; weapon_assaultRifle = new Object(); weapon_assaultRifle.ref = 'assaultRifle'; weapon_assaultRifle.name = 'M1 Repeater'; weapon_assaultRifle.cost = 2500; weapon_assaultRifle.damage = 25; weapon_assaultRifle.accuracy = 5; weapon_assaultRifle.roundSpeed = 70; weapon_assaultRifle.heatMax = 1000; weapon_assaultRifle.heatPerShot = 100; weapon_assaultRifle.coolDown = 15; weapon_assaultRifle.ejectPoint = 0; weapon_assaultRifle.hitEffect = 'ballistic'; weapon_assaultRifle.caseType = 'none'; weapon_assaultRifle.projectile = 'tracer'; weapon_assaultRifle.roundsPerShot = 1; weapon_assaultRifle.description = ''; weapon_RPG = new Object(); weapon_RPG.ref = 'RPG'; weapon_RPG.name = 'RPG'; weapon_RPG.description = ''; weapon_RPG.cost = 5000; weapon_RPG.damage = 350; weapon_RPG.accuracy = 4; weapon_RPG.roundSpeed = 10; weapon_RPG.heatMax = 1000; weapon_RPG.heatPerShot = 250; weapon_RPG.coolDown = 50; weapon_RPG.ejectPoint = 0; weapon_RPG.splash = true; weapon_RPG.splashDamage = weapon_RPG.damage / 1.5; weapon_RPG.splashSize = 30; weapon_RPG.hitEffect = 'smallExplosion'; weapon_RPG.caseType = 'none'; weapon_RPG.projectile = 'dumbRocket'; weapon_RPG.roundsPerShot = 1; weapon_repeater = new Object(); weapon_repeater.ref = 'repeater'; weapon_repeater.name = 'M1 Repeater'; weapon_repeater.cost = 2500; weapon_repeater.damage = 45; weapon_repeater.accuracy = 5; weapon_repeater.roundSpeed = 70; weapon_repeater.heatMax = 1000; weapon_repeater.heatPerShot = 100; weapon_repeater.coolDown = 35; weapon_repeater.ejectPoint = 0; weapon_repeater.hitEffect = 'ballistic'; weapon_repeater.caseType = 'shellCasing'; weapon_repeater.projectile = 'tracer'; weapon_repeater.roundsPerShot = 1; weapon_repeater.description = 'BALLISTIC WEAPON\rDMG: ' + weapon_repeater.damage + ' HEAT: ' + weapon_repeater.heatPerShot; weapon_assaultCannon = new Object(); weapon_assaultCannon.ref = 'assaultCannon'; weapon_assaultCannon.name = 'Assault Cannon'; weapon_assaultCannon.description = ''; weapon_assaultCannon.cost = 5000; weapon_assaultCannon.damage = 15; weapon_assaultCannon.accuracy = 8; weapon_assaultCannon.roundSpeed = 50; weapon_assaultCannon.heatMax = 1000; weapon_assaultCannon.heatPerShot = 50; weapon_assaultCannon.coolDown = 30; weapon_assaultCannon.ejectPoint = 0; weapon_assaultCannon.hitEffect = 'ballistic'; weapon_assaultCannon.caseType = 'shellCasing'; weapon_assaultCannon.projectile = 'tracer'; weapon_assaultCannon.roundsPerShot = 1; weapon_assaultCannon.description = 'BALLISTIC WEAPON\rDMG: ' + weapon_assaultCannon.damage + ' HEAT: ' + weapon_assaultCannon.heatPerShot; weapon_shotCannon = new Object(); weapon_shotCannon.ref = 'shotCannon'; weapon_shotCannon.name = 'Shot Cannon'; weapon_shotCannon.description = ''; weapon_shotCannon.cost = 10000; weapon_shotCannon.damage = 30; weapon_shotCannon.accuracy = 12; weapon_shotCannon.roundSpeed = 40; weapon_shotCannon.heatMax = 1000; weapon_shotCannon.heatPerShot = 150; weapon_shotCannon.coolDown = 25; weapon_shotCannon.ejectPoint = 0; weapon_shotCannon.hitEffect = 'ballistic'; weapon_shotCannon.caseType = 'shellCasing'; weapon_shotCannon.projectile = 'tracer'; weapon_shotCannon.roundsPerShot = 5; weapon_shotCannon.description = 'BALLISTIC WEAPON\rMAX DMG: ' + Math.round(weapon_shotCannon.damage * weapon_shotCannon.roundsPerShot) + ' HEAT: ' + weapon_shotCannon.heatPerShot; weapon_rocketLauncher = new Object(); weapon_rocketLauncher.ref = 'rocketLauncher'; weapon_rocketLauncher.name = 'RAM-7 RPG Launcher'; weapon_rocketLauncher.description = ''; weapon_rocketLauncher.cost = 15000; weapon_rocketLauncher.damage = 150; weapon_rocketLauncher.accuracy = 2; weapon_rocketLauncher.roundSpeed = 14; weapon_rocketLauncher.heatMax = 900; weapon_rocketLauncher.heatPerShot = 250; weapon_rocketLauncher.coolDown = 25; weapon_rocketLauncher.ejectPoint = 0; weapon_rocketLauncher.splash = true; weapon_rocketLauncher.splashDamage = weapon_rocketLauncher.damage / 1.5; weapon_rocketLauncher.splashSize = 30; weapon_rocketLauncher.hitEffect = 'explosion'; weapon_rocketLauncher.caseType = 'none'; weapon_rocketLauncher.projectile = 'rocket'; weapon_rocketLauncher.roundsPerShot = 1; weapon_rocketLauncher.description = 'EXPLOSIVE WEAPON\rDMG: ' + weapon_rocketLauncher.damage + ' HEAT: ' + weapon_rocketLauncher.heatPerShot; weapon_arenaRocketLauncher = new Object(); weapon_arenaRocketLauncher.ref = 'arenaRocketLauncher'; weapon_arenaRocketLauncher.name = 'RAM-7 RPG Launcher'; weapon_arenaRocketLauncher.description = ''; weapon_arenaRocketLauncher.cost = 15000; weapon_arenaRocketLauncher.damage = 200; weapon_arenaRocketLauncher.accuracy = 2; weapon_arenaRocketLauncher.roundSpeed = 10; weapon_arenaRocketLauncher.heatMax = 900; weapon_arenaRocketLauncher.heatPerShot = 250; weapon_arenaRocketLauncher.coolDown = 25; weapon_arenaRocketLauncher.ejectPoint = 0; weapon_arenaRocketLauncher.splash = true; weapon_arenaRocketLauncher.splashDamage = weapon_arenaRocketLauncher.damage / 1.5; weapon_arenaRocketLauncher.splashSize = 30; weapon_arenaRocketLauncher.hitEffect = 'smallExplosion'; weapon_arenaRocketLauncher.caseType = 'none'; weapon_arenaRocketLauncher.projectile = 'rocket'; weapon_arenaRocketLauncher.roundsPerShot = 1; weapon_emp = new Object(); weapon_emp.ref = 'emp'; weapon_emp.name = 'EMP Launcher'; weapon_emp.description = ''; weapon_emp.cost = 25000; weapon_emp.damage = 25; weapon_emp.accuracy = 2; weapon_emp.roundSpeed = 6; weapon_emp.heatMax = 1000; weapon_emp.heatPerShot = 400; weapon_emp.coolDown = 50; weapon_emp.ejectPoint = 0; weapon_emp.grenade = true; weapon_emp.dirCount = 30; weapon_emp.delay = 60; weapon_emp.splash = true; weapon_emp.splashDamage = weapon_emp.damage / 1.5; weapon_emp.splashSize = 30; weapon_emp.hitEffect = 'emp'; weapon_emp.caseType = 'none'; weapon_emp.projectile = 'emp'; weapon_emp.roundsPerShot = 1; weapon_emp.description = 'ELECTRIC WEAPON\rDMG: ' + weapon_emp.damage + ' HEAT: ' + weapon_emp.heatPerShot; weapon_dumbRocketLauncher = new Object(); weapon_dumbRocketLauncher.ref = 'dumbRocketLauncher'; weapon_dumbRocketLauncher.name = 'RAM-10 Multi Launch'; weapon_dumbRocketLauncher.description = ''; weapon_dumbRocketLauncher.cost = 25000; weapon_dumbRocketLauncher.damage = 50; weapon_dumbRocketLauncher.accuracy = 8; weapon_dumbRocketLauncher.roundSpeed = 10; weapon_dumbRocketLauncher.heatMax = 1000; weapon_dumbRocketLauncher.heatPerShot = 400; weapon_dumbRocketLauncher.coolDown = 50; weapon_dumbRocketLauncher.ejectPoint = 0; weapon_dumbRocketLauncher.splash = true; weapon_dumbRocketLauncher.splashDamage = weapon_dumbRocketLauncher.damage / 1.5; weapon_dumbRocketLauncher.splashSize = 30; weapon_dumbRocketLauncher.dumbRocket = true; weapon_dumbRocketLauncher.dirCount = 2; weapon_dumbRocketLauncher.hitEffect = 'smallExplosion'; weapon_dumbRocketLauncher.caseType = 'none'; weapon_dumbRocketLauncher.projectile = 'dumbRocket'; weapon_dumbRocketLauncher.roundsPerShot = 4; weapon_dumbRocketLauncher.description = 'EXPLOSIVE WEAPON\rMAX DMG: ' + Math.round(weapon_dumbRocketLauncher.damage * weapon_dumbRocketLauncher.roundsPerShot) + ' HEAT: ' + weapon_dumbRocketLauncher.heatPerShot; weapon_grenadeLauncher = new Object(); weapon_grenadeLauncher.ref = 'grenadeLauncher'; weapon_grenadeLauncher.name = 'Grenade Launcher'; weapon_grenadeLauncher.description = ''; weapon_grenadeLauncher.cost = 11500; weapon_grenadeLauncher.damage = 90; weapon_grenadeLauncher.accuracy = 2; weapon_grenadeLauncher.roundSpeed = 6; weapon_grenadeLauncher.heatMax = 1000; weapon_grenadeLauncher.heatPerShot = 300; weapon_grenadeLauncher.coolDown = 50; weapon_grenadeLauncher.ejectPoint = 0; weapon_grenadeLauncher.grenade = true; weapon_grenadeLauncher.dirCount = 30; weapon_grenadeLauncher.delay = 60; weapon_grenadeLauncher.splash = true; weapon_grenadeLauncher.splashDamage = weapon_grenadeLauncher.damage / 1.5; weapon_grenadeLauncher.splashSize = 30; weapon_grenadeLauncher.hitEffect = 'smallExplosion'; weapon_grenadeLauncher.caseType = 'none'; weapon_grenadeLauncher.projectile = 'grenade'; weapon_grenadeLauncher.roundsPerShot = 1; weapon_grenadeLauncher.description = 'EXPLOSIVE WEAPON\rDMG: ' + weapon_grenadeLauncher.damage + ' HEAT: ' + weapon_grenadeLauncher.heatPerShot; weapon_proxMine = new Object(); weapon_proxMine.ref = 'proxMine'; weapon_proxMine.name = 'Proximity Mines'; weapon_proxMine.description = ''; weapon_proxMine.cost = 15000; weapon_proxMine.damage = 400; weapon_proxMine.accuracy = 0; weapon_proxMine.roundSpeed = 0; weapon_proxMine.heatMax = 1000; weapon_proxMine.heatPerShot = 600; weapon_proxMine.coolDown = 50; weapon_proxMine.ejectPoint = 0; weapon_proxMine.grenade = true; weapon_proxMine.dirCount = 30; weapon_proxMine.delay = 6000; weapon_proxMine.splash = true; weapon_proxMine.splashDamage = weapon_proxMine.damage / 1.5; weapon_proxMine.splashSize = 30; weapon_proxMine.hitEffect = 'explosion'; weapon_proxMine.caseType = 'none'; weapon_proxMine.projectile = 'mine'; weapon_proxMine.roundsPerShot = 1; weapon_proxMine.description = 'EXPLOSIVE WEAPON\rDMG: ' + weapon_proxMine.damage + ' HEAT: ' + weapon_proxMine.heatPerShot; weapon_laser = new Object(); weapon_laser.ref = 'laser'; weapon_laser.name = 'L.A.S Tek Laser'; weapon_laser.description = ''; weapon_laser.cost = 50000; weapon_laser.damage = 350; weapon_laser.accuracy = 2; weapon_laser.roundSpeed = 80; weapon_laser.heatMax = 1000; weapon_laser.heatPerShot = 180; weapon_laser.coolDown = 50; weapon_laser.ejectPoint = 0; weapon_laser.hitEffect = 'explosion'; weapon_laser.caseType = 'none'; weapon_laser.projectile = 'laser'; weapon_laser.roundsPerShot = 1; weapon_laser.description = 'LASER WEAPON\rDMG: ' + weapon_laser.damage + ' HEAT: ' + weapon_laser.heatPerShot; weapon_arenaLaser = new Object(); weapon_arenaLaser.ref = 'laser'; weapon_arenaLaser.name = 'L.A.S Tek Laser'; weapon_arenaLaser.description = ''; weapon_arenaLaser.cost = 50000; weapon_arenaLaser.damage = 200; weapon_arenaLaser.accuracy = 2; weapon_arenaLaser.roundSpeed = 60; weapon_arenaLaser.heatMax = 1000; weapon_arenaLaser.heatPerShot = 300; weapon_arenaLaser.coolDown = 50; weapon_arenaLaser.ejectPoint = 0; weapon_arenaLaser.hitEffect = 'explosion'; weapon_arenaLaser.caseType = 'none'; weapon_arenaLaser.projectile = 'laser'; weapon_arenaLaser.roundsPerShot = 1; weapon_flamer = new Object(); weapon_flamer.ref = 'flamer'; weapon_flamer.name = 'Burninator'; weapon_flamer.description = ''; weapon_flamer.cost = 5000; weapon_flamer.damage = 25; weapon_flamer.accuracy = 8; weapon_flamer.roundSpeed = 4; weapon_flamer.life = 25; weapon_flamer.heatMax = 1000; weapon_flamer.heatPerShot = 50; weapon_flamer.coolDown = 50; weapon_flamer.ejectPoint = 0; weapon_flamer.hitEffect = 'burn'; weapon_flamer.caseType = 'none'; weapon_flamer.projectile = 'flame'; weapon_flamer.roundsPerShot = 1; weapon_flamer.description = 'FLAME WEAPON\rDMG: ' + weapon_flamer.damage + ' HEAT: ' + weapon_flamer.heatPerShot; weapon_heatSync = new Object(); weapon_heatSync.ref = 'heatSync'; weapon_heatSync.name = 'Heat Sink'; weapon_heatSync.description = 'Reduces overall weapon heat generated by 10%'; weapon_heatSync.cost = 1500; weapon_heatSync.bonus = 0.9; weapon_heatSync.gear = true; weapon_impactShield = new Object(); weapon_impactShield.ref = 'impactShield'; weapon_impactShield.name = 'Impact Shield'; weapon_impactShield.description = 'Reduces impact damage by 10%'; weapon_impactShield.cost = 1500; weapon_impactShield.bonus = 0.9; weapon_impactShield.gear = true; weapon_burnShield = new Object(); weapon_burnShield.ref = 'burnShield'; weapon_burnShield.name = 'Explosive Shield'; weapon_burnShield.description = 'Reduces explosive damage by 15%'; weapon_burnShield.cost = 1000; weapon_burnShield.bonus = 0.85; weapon_burnShield.gear = true; weapon_empShield = new Object(); weapon_empShield.ref = 'empShield'; weapon_empShield.name = 'EMP Shield'; weapon_empShield.description = 'Reduces chance of shutdown due to EMP blasts by 25%'; weapon_empShield.cost = 3000; weapon_empShield.bonus = 0.75; weapon_empShield.gear = true; weapon_speed = new Object(); weapon_speed.ref = 'speed'; weapon_speed.name = 'Leg Speed Upgrade'; weapon_speed.description = 'Increases mobility.'; weapon_speed.cost_level1 = 3000; weapon_speed.cost_level2 = 7500; weapon_speed.cost_level3 = 15000; weapon_speed.cost_level4 = 25000; weapon_speed.bonus = 0.5; weapon_speed.level = 1; weapon_speed.maxLevel = 4; weapon_speed.upgrade = true; weapon_armor = new Object(); weapon_armor.ref = 'armor'; weapon_armor.name = 'Armor Upgrade'; weapon_armor.description = 'Adds armor plating.'; weapon_armor.cost_level1 = 3000; weapon_armor.cost_level2 = 7500; weapon_armor.cost_level3 = 15000; weapon_armor.cost_level4 = 25000; weapon_armor.bonus = 500; weapon_armor.level = 1; weapon_armor.maxLevel = 4; weapon_armor.upgrade = true; weapon_turretSpeed = new Object(); weapon_turretSpeed.ref = 'turretSpeed'; weapon_turretSpeed.name = 'Turret Speed Upgrade'; weapon_turretSpeed.description = 'Increases turret rotation speed.'; weapon_turretSpeed.cost_level1 = 3000; weapon_turretSpeed.cost_level2 = 7500; weapon_turretSpeed.cost_level3 = 15000; weapon_turretSpeed.cost_level4 = 25000; weapon_turretSpeed.bonus = 0.75; weapon_turretSpeed.level = 1; weapon_turretSpeed.maxLevel = 4; weapon_turretSpeed.upgrade = true; weapon_turretSlots = new Object(); weapon_turretSlots.ref = 'turretSlots'; weapon_turretSlots.name = 'Weapon Slots'; weapon_turretSlots.description = 'Upgrades hull to carry more weapons.'; weapon_turretSlots.cost_level1 = 5000; weapon_turretSlots.cost_level2 = 10000; weapon_turretSlots.cost_level3 = 25000; weapon_turretSlots.bonus = ''; weapon_turretSlots.level = 1; weapon_turretSlots.maxLevel = 3; weapon_turretSlots.upgrade = true; var particleFadeOutDelay = 9000; var particleCount = 0; var damageSmokeCounterMax = 3; var damageSmokeCounter = damageSmokeCounterMax; var lastPlayerHealth = 100; var hudTintedGreen = false; var hudTintedRed = false; var hudTintedYellow = false; var waypoints = 0; var enemiesOnScreen = new Array(); var allOnScreen = new Array(); var targetArray = new Array(); var enemyCount = 0; var aiFiringGap = 15; var spawnCounter = 0; var spawnCounterMax = 0; var maxEnemies = 0; var numEnemies = 0; var currSpawnLoc = ''; var spawnEnemyActive = true; var currentRandomSpawn = 'left'; var lastRandomSpawn = 'left'; var numEffects = 0; var screenShaking = false; var screenShakeXMax = 10; var screenShakeYMax = 10; var screenShakeTimer = 0; var screenShakeDelay = 50; var screenOrigin = new Object(); var playingContinue = false; arena_warehouse = new Object(); arena_warehouse.mapName = 'map_warehouse'; arena_warehouse.name = 'Warehouse'; arena_warehouse.description = ''; arena_warehouse.gateX = new Array(); arena_warehouse.gateY = new Array(); arena_warehouse.spawnCounterMax = 4; arena_smallWarehouse = new Object(); arena_smallWarehouse.mapName = 'map_smallWarehouse'; arena_smallWarehouse.name = 'Small Warehouse'; arena_smallWarehouse.description = ''; arena_smallWarehouse.gateX = new Array(); arena_smallWarehouse.gateY = new Array(); arena_smallWarehouse.spawnCounterMax = 4; arena_drain = new Object(); arena_drain.mapName = 'map_drain'; arena_drain.name = 'Drain'; arena_drain.description = ''; arena_drain.gateX = new Array(); arena_drain.gateY = new Array(); arena_drain.spawnCounterMax = 1; arena_drain.trapX = new Array(); arena_drain.trapY = new Array(); arena_smallDrain = new Object(); arena_smallDrain.mapName = 'map_smallDrain'; arena_smallDrain.name = 'Small Drain'; arena_smallDrain.description = ''; arena_smallDrain.gateX = new Array(); arena_smallDrain.gateY = new Array(); arena_smallDrain.spawnCounterMax = 1; arena_smallDrain.trapX = new Array(); arena_smallDrain.trapY = new Array(); arena_trench = new Object(); arena_trench.mapName = 'map_trench'; arena_trench.name = 'The Trench'; arena_trench.description = ''; arena_trench.gateX = new Array('300', '600'); arena_trench.gateY = new Array('250', '250'); arena_trench.spawnCounterMax = 1; arena_trench.trapX = new Array(); arena_trench.trapY = new Array(); arena_railway = new Object(); arena_railway.mapName = 'map_railway'; arena_railway.name = 'Railway'; arena_railway.description = ''; arena_railway.gateX = new Array(); arena_railway.gateY = new Array(); arena_railway.spawnCounterMax = 1; arena_railway.trapX = new Array(); arena_railway.trapY = new Array(); arena_compound = new Object(); arena_compound.mapName = 'map_compound'; arena_compound.name = 'Compound'; arena_compound.description = ''; arena_compound.gateX = new Array(); arena_compound.gateY = new Array(); arena_compound.spawnCounterMax = 1; arena_compound.trapX = new Array(); arena_compound.trapY = new Array(); arena_hellPit = new Object(); arena_hellPit.mapName = 'map_hellPit'; arena_hellPit.name = 'HELL PIT'; arena_hellPit.description = ''; arena_hellPit.gateX = new Array(); arena_hellPit.gateY = new Array(); arena_hellPit.spawnCounterMax = 1; arena_hellPit.trapX = new Array(); arena_hellPit.trapY = new Array(); var currentLevel = null; level1 = new Object(); level1.name = 'BODY COUNT'; level1.desc = 'GET 50 KILLS'; level1.details = 'Rack up 50 Kills.'; level1.opponents = 'Prisoners. Just like you, but not the same.'; level1.missionNumber = 1; level1.arena = 'arena_smallWarehouse'; level1.friendlyFire = false; level1.spawnCount = 4; level1.maxEnemies = 10; level1.respawnTime = 2; level1.crowdReact = 4; level1.spawns = new Array('left', 'right'); level1.gameMode = 'bodyCount'; level1.goal = 50; level1.prizeMoney = 5000; level1.music = 'speedFreaks'; level1.enemyTypes = new Array('prisoner1', 'prisoner2', 'prisoner2', 'prisoner2', 'prisonerChase', 'prisonerChase'); level2 = new Object(); level2.name = 'SURVIVAL'; level2.desc = 'SURVIVE FOR 1 MIN 30 SEC'; level2.details = 'Out last all enemies. Watch out for the ELECTRIC TRAP!'; level2.opponents = 'Prisoners. Like lambs to the slaughter.'; level2.missionNumber = 2; level2.arena = 'arena_smallWarehouse'; level2.friendlyFire = false; level2.spawnCount = 5; level2.maxEnemies = 8; level2.respawnTime = 2; level2.gameMode = 'survival'; level2.goal = 10; level2.prizeMoney = 7500; level2.crowdReact = 4; level2.spawns = new Array('top', 'left', 'bottom'); level2.trapX = new Array('300'); level2.trapY = new Array('300'); level2.trapType = new Array('electricTrap'); level2.numTriggers = 4; level2.trapTrigger0 = new Array('trap0'); level2.trapTrigger1 = new Array('trap0'); level2.trapTrigger2 = new Array('trap0'); level2.trapTrigger3 = new Array('trap0'); level2.trapTriggerX = new Array('150', '300', '450', '300'); level2.trapTriggerY = new Array('300', '150', '300', '450'); level2.timerSeconds = 30; level2.timerMinutes = 1; level2.music = 'deadOn'; level2.enemyTypes = new Array('prisoner1', 'prisoner2', 'prisoner2', 'prisoner3', 'prisonerChase', 'prisonerChase'); level3 = new Object(); level3.name = 'KING OF THE HILL'; level3.desc = '300 CAPTURE POINTS'; level3.details = 'Move onto the capture areas as they change to gather points.'; level3.opponents = 'Prisoners, after your blood.'; level3.missionNumber = 3; level3.arena = 'arena_compound'; level3.friendlyFire = false; level3.spawnCount = 5; level3.maxEnemies = 6; level3.respawnTime = 2; level3.crowdReact = 5; level3.gameMode = 'KOTH'; level3.goal = 300; level3.prizeMoney = 10000; level3.spawns = new Array('top', 'left', 'right', 'bottom'); level3.trapX = new Array('150', '450'); level3.trapY = new Array('top', 'bottom'); level3.trapType = new Array('rocketTrap', 'rocketTrap'); level3.numTriggers = 2; level3.trapTrigger0 = new Array('trap1'); level3.trapTrigger1 = new Array('trap0'); level3.trapTriggerX = new Array('157.3', '447.3'); level3.trapTriggerY = new Array('298.3', '298.3'); level3.timerSeconds = 0; level3.timerMinutes = 0; level3.music = 'speedKills'; level3.enemyTypes = new Array('prisoner1', 'prisoner2', 'prisoner3', 'prisoner2', 'prisoner2'); level4 = new Object(); level4.name = 'SURVIVAL'; level4.desc = 'SURVIVE FOR 2 MINUTES'; level4.details = 'Destroy all comers.'; level4.opponents = 'Prisoners and Light Juggernauts.'; level4.missionNumber = 4; level4.arena = 'arena_warehouse'; level4.friendlyFire = true; level4.spawnCount = 4; level4.maxEnemies = 4; level4.respawnTime = 2; level4.crowdReact = 3; level4.gameMode = 'survival'; level4.goal = 300; level4.prizeMoney = 15000; level4.spawns = new Array('top', 'bottom', 'left', 'right'); level4.trapX = new Array('left', 'right', 'left', 'right', 'left', 'right'); level4.trapY = new Array('150', '200', '250', '590', '640', '690'); level4.trapType = new Array('rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap'); level4.numTriggers = 2; level4.trapTrigger0 = new Array('trap3', 'trap4', 'trap5'); level4.trapTrigger1 = new Array('trap0', 'trap1', 'trap2'); level4.trapTriggerX = new Array('311.3', '311.3'); level4.trapTriggerY = new Array('450.3', '350.3'); level4.timerSeconds = 60; level4.timerMinutes = 1; level4.music = 'speedFreaks'; level4.enemyTypes = new Array('mechRepeater', 'mechLightGrenadier', 'prisoner2', 'prisoner1', 'prisoner2', 'prisoner3'); level5 = new Object(); level5.name = 'BIG BODY COUNT'; level5.desc = '100 KILLS'; level5.details = 'Kill \'em! 100 of \'em!'; level5.opponents = 'Prisoners.'; level5.missionNumber = 5; level5.arena = 'arena_warehouse'; level5.friendlyFire = false; level5.spawnCount = 5; level5.maxEnemies = 10; level5.respawnTime = 2; level5.crowdReact = 4; level5.gameMode = 'bodyCount'; level5.goal = 100; level5.prizeMoney = 10000; level5.spawns = new Array('top', 'bottom', 'left', 'right'); level5.trapX = new Array('320', '490', '320', '150'); level5.trapY = new Array('150', '400', '650', '400'); level5.trapType = new Array('electricTrap', 'electricTrap', 'electricTrap', 'electricTrap'); level5.numTriggers = 1; level5.trapTrigger0 = new Array('trap0', 'trap1', 'trap2', 'trap3'); level5.trapTriggerX = new Array('310'); level5.trapTriggerY = new Array('403'); level5.timerSeconds = 60; level5.timerMinutes = 1; level5.music = 'deadOn'; level5.enemyTypes = new Array('prisoner1', 'prisoner2', 'prisoner3'); level6 = new Object(); level6.name = 'BATTLE ROYALE'; level6.desc = 'SURVIVE FOR 2 MINUTES'; level6.details = 'It\'s every man for himself. Get \'em!'; level6.opponents = 'Medium and Light Juggernauts.'; level6.missionNumber = 6; level6.arena = 'arena_railway'; level6.friendlyFire = true; level6.spawnCount = 1; level6.maxEnemies = 4; level6.respawnTime = 2; level6.crowdReact = 2; level6.gameMode = 'battleRoyal'; level6.goal = 75; level6.prizeMoney = 30000; level6.spawns = new Array('top', 'bottom', 'left', 'right'); level6.trapX = new Array('200', '400', 'left', 'right'); level6.trapY = new Array('top', 'top', '600', '300'); level6.trapType = new Array('laserTrap', 'laserTrap', 'laserTrap', 'laserTrap'); level6.numTriggers = 4; level6.trapTrigger0 = new Array('trap0', 'trap3'); level6.trapTrigger1 = new Array('trap1', 'trap2'); level6.trapTrigger2 = new Array('trap0', 'trap3'); level6.trapTrigger3 = new Array('trap1', 'trap2'); level6.trapTriggerX = new Array('300', '450', '300', '150'); level6.trapTriggerY = new Array('300', '450', '650', '450'); level6.timerSeconds = 60; level6.timerMinutes = 1; level6.music = 'speedKills'; level6.enemyTypes = new Array('mechRepeater', 'mechShotCannon', 'mechAssaulter', 'mechRocketeer'); level7 = new Object(); level7.name = 'KING OF THE HILL'; level7.desc = '300 CAPTURE POINTS'; level7.details = 'Control those points!'; level7.opponents = 'Medium and Light Juggernauts.'; level7.missionNumber = 7; level7.arena = 'arena_smallDrain'; level7.friendlyFire = true; level7.spawnCount = 1; level7.maxEnemies = 2; level7.respawnTime = 5; level7.crowdReact = 2; level7.gameMode = 'KOTH'; level7.goal = 300; level7.prizeMoney = 35000; level7.spawns = new Array('top', 'bottom', 'left', 'right'); level7.trapX = new Array('left', 'left', '150', '450', 'right', 'right'); level7.trapY = new Array('150', '450', 'top', 'top', '150', '450'); level7.trapType = new Array('rocketTrap', 'rocketTrap', 'laserTrap', 'laserTrap', 'rocketTrap', 'rocketTrap'); level7.numTriggers = 2; level7.trapTrigger0 = new Array('trap0', 'trap1', 'trap4', 'trap5'); level7.trapTrigger1 = new Array('trap3', 'trap2'); level7.trapTriggerX = new Array('225', '375'); level7.trapTriggerY = new Array('300', '300'); level7.timerSeconds = 60; level7.timerMinutes = 1; level7.music = 'speedFreaks'; level7.enemyTypes = new Array('mechGrenadier', 'mechShotCannon', 'mechAssaulter', 'mechRocketeer'); level8 = new Object(); level8.name = 'SURVIVAL'; level8.desc = 'SURVIVE FOR 2 MINS'; level8.details = 'You wouldn\'t last 2 minutes in my world!'; level8.opponents = 'Medium Juggernauts, look out they\'ve got EMP\'s.'; level8.missionNumber = 8; level8.arena = 'arena_warehouse'; level8.friendlyFire = true; level8.spawnCount = 1; level8.maxEnemies = 3; level8.respawnTime = 5; level8.crowdReact = 2; level8.gameMode = 'survival'; level8.goal = 300; level8.prizeMoney = 40000; level8.spawns = new Array('top', 'bottom', 'left', 'right'); level8.trapX = new Array('120', '200', '160', '440', '520', '480'); level8.trapY = new Array('top', 'top', 'bottom', 'top', 'top', 'bottom'); level8.trapType = new Array('rocketTrap', 'rocketTrap', 'laserTrap', 'laserTrap', 'rocketTrap', 'rocketTrap'); level8.numTriggers = 2; level8.trapTrigger0 = new Array('trap0', 'trap1', 'trap4', 'trap5'); level8.trapTrigger1 = new Array('trap3', 'trap2'); level8.trapTriggerX = new Array('313.4', '313.4'); level8.trapTriggerY = new Array('212.3', '592.4'); level8.timerSeconds = 60; level8.timerMinutes = 1; level8.music = 'deadOn'; level8.enemyTypes = new Array('mechGrenadier', 'mechEMP', 'mechAssaulter', 'mechRocketeer'); level9 = new Object(); level9.name = 'BODY COUNT'; level9.desc = 'GET 150 KILLS'; level9.details = 'You wouldn\'t last 2 minutes in my world!'; level9.opponents = 'Back to fighting some prisoners, just for the slaughter.'; level9.missionNumber = 9; level9.arena = 'arena_smallDrain'; level9.friendlyFire = false; level9.spawnCount = 5; level9.maxEnemies = 8; level9.respawnTime = 2; level9.crowdReact = 5; level9.gameMode = 'bodyCount'; level9.goal = 150; level9.prizeMoney = 45000; level9.spawns = new Array('top', 'bottom', 'left', 'right'); level9.trapX = new Array('300', '130', '170', 'right', 'right', '470', '430', 'left', 'left'); level9.trapY = new Array('300', 'top', 'top', '130', '170', 'bottom', 'bottom', '430', '470'); level9.trapType = new Array('electricTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap'); level9.numTriggers = 4; level9.trapTrigger0 = new Array('trap1', 'trap2', 'trap3', 'trap4'); level9.trapTrigger1 = new Array('trap5', 'trap6', 'trap7', 'trap8'); level9.trapTrigger2 = new Array('trap0'); level9.trapTrigger3 = new Array('trap0'); level9.trapTriggerX = new Array('200', '400', '200', '400'); level9.trapTriggerY = new Array('200', '400', '400', '200'); level9.timerSeconds = 60; level9.timerMinutes = 1; level9.music = 'speedKills'; level9.enemyTypes = new Array('prisoner1', 'prisoner2', 'prisoner2', 'prisoner3', 'prisoner3'); level10 = new Object(); level10.name = 'SURVIVAL'; level10.desc = 'SURVIVE 2 MINS'; level10.details = 'All the big guns have come to play'; level10.opponents = 'Medium and Heavy Mechs, with LASERS!'; level10.missionNumber = 10; level10.arena = 'arena_drain'; level10.friendlyFire = true; level10.spawnCount = 2; level10.maxEnemies = 4; level10.respawnTime = 5; level10.crowdReact = 2; level10.gameMode = 'survival'; level10.goal = 150; level10.prizeMoney = 50000; level10.spawns = new Array('top', 'bottom', 'left', 'right'); level10.trapX = new Array('401', '305', '505', '305', '504', 'left', 'right'); level10.trapY = new Array('275', '490', '490', 'top', 'top', '622', '666'); level10.trapType = new Array('electricTrap', 'electricTrap', 'electricTrap', 'laserTrap', 'laserTrap', 'laserTrap', 'laserTrap'); level10.numTriggers = 2; level10.trapTrigger0 = new Array('trap0', 'trap1', 'trap2', 'trap4', 'trap6'); level10.trapTrigger1 = new Array('trap0', 'trap1', 'trap2', 'trap3', 'trap5'); level10.trapTriggerX = new Array('165', '617'); level10.trapTriggerY = new Array('397', '397'); level10.timerSeconds = 60; level10.timerMinutes = 1; level10.music = 'deadOn'; level10.enemyTypes = new Array('mechHeavyRepeater', 'mechEMP', 'mechAssaulter', 'mechRocketeer', 'mechHeavyLaser', 'mechDragon'); level11 = new Object(); level11.name = 'HELL PIT'; level11.desc = 'DESTROY THE CHAMP'; level11.details = 'FREEDOM IS HERE!'; level11.opponents = 'Take down the Juggerdome Champion.'; level11.missionNumber = 11; level11.arena = 'arena_hellPit'; level11.friendlyFire = true; level11.spawnCount = 1; level11.maxEnemies = 2; level11.respawnTime = 6; level11.crowdReact = 2; level11.gameMode = 'survival'; level11.goal = 50; level11.prizeMoney = 50000; level11.spawns = new Array('top', 'bottom', 'left', 'right'); level11.trapX = new Array('170', '438', '720', '170', '437', '720', '118', '163', '205', 'left', 'left', 'right', 'right', '672', '716', '764'); level11.trapY = new Array('201', '201', '201', '712', '712', '712', 'top', 'top', 'top', '563', '615', '285', '346', 'bottom', 'bottom', 'bottom'); level11.trapType = new Array('electricTrap', 'electricTrap', 'electricTrap', 'electricTrap', 'electricTrap', 'electricTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap', 'rocketTrap'); level11.numTriggers = 4; level11.trapTrigger0 = new Array('trap6', 'trap7', 'trap8', 'trap9', 'trap10'); level11.trapTrigger1 = new Array('trap0', 'trap1', 'trap2'); level11.trapTrigger2 = new Array('trap11', 'trap12', 'trap13', 'trap14', 'trap15'); level11.trapTrigger3 = new Array('trap3', 'trap4', 'trap5'); level11.trapTriggerX = new Array('381', '436', '501', '436'); level11.trapTriggerY = new Array('451', '316', '451', '584'); level11.timerSeconds = 60; level11.timerMinutes = 4; level11.music = 'speedFreaks'; level11.enemyTypes = new Array('mechHeavyRepeater', 'mechEMP', 'mechShotCannon', 'mechRocketeer', 'mechAssaulter', 'mechAssaulter', 'mechRocketeer', 'mechRocketeer', 'mechHeavyLaser', 'mechDragon'); currentLevel = level1; var drops = 0; var dropChance = 50; var pickUpLife = 150; var allDrops = new Array(); var bodyCount = 0; var currentControlPoint = null; var kothCounter = 0; var kothCounterMax = 75; var kothCapturePoints = 0; var captureLoop = false; gameMode_bodyCount = new Object(); gameMode_bodyCount.name = 'Body Count'; gameMode_bodyCount.name = 'Body Count'; game = new Object(); game.state = 'paused'; if (intoMenu == true) { setupAchievements(); setupSound(); loadMenu(); } if (intoMenu == false) { setupSound(); setupWorld(); setupPlayer(); setupInterface(); setupFireButton(); keyUpDetection(); game.state = 'unpaused'; if (debugMode == true) { debugTools(); } } _root.onEnterFrame = function () { if (game.state == 'unpaused') { cameraControl(); enemyAI(); playerEMPTimer(); movementCollisions(); projectileCollisions(); playerControls(); weaponKeyControls(); aimJugger(world.player); pickUpDrops(); slowEnterFrame(); mediumEnterFrame(); } }; }




http://swfchan.com/18/89126/info.shtml
Created: 29/3 -2019 04:29:09 Last modified: 29/3 -2019 04:29:09 Server time: 22/12 -2024 12:34:22