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

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

Madness Accelerant - he clown cannot die... Or can he---.swf

This is the info page for
Flash #89365

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


ActionScript [AS1/AS2]
Combined Code
movieClip 7 { } movieClip 9 { } movieClip 10 { instance of movieClip 9 { onClipEvent (load) { _root.f_InsertObject(_parent, _root.a_Ladders); } onClipEvent (unload) { _root.f_RemoveObject(_parent, _root.a_Ladders); } } } movieClip 11 l7 { frame 1 { _root.f_AddLadder(this); gotoAndStop(2); } } movieClip 15 { } movieClip 16 { } movieClip 17 empty { } movieClip 23 { } movieClip 24 { } movieClip 26 { } movieClip 28 { } movieClip 30 { } movieClip 32 { frame 1 { _root.f_SetGunHand(this); } } movieClip 34 { frame 1 { if (_parent._parent._parent._parent._parent._parent.pipe) { gotoAndStop('blank'); } else { _root.f_SetGunHand(this); } } } movieClip 35 { } movieClip 41 { } movieClip 42 { frame 6 { _parent.gotoAndStop('idle'); } } movieClip 43 { frame 10 { _parent.gotoAndStop('idle'); } } movieClip 44 { frame 1 { _root.gunshooting = false; stop(); } } movieClip 46 { } movieClip 47 { } movieClip 48 { frame 1 { _root.u_point.x = 0; _root.u_point.y = 0; var par = _parent._parent._parent._parent._parent; _parent._parent.bullet_pt.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var u_temp = _root.f_FX(x, y, par.y - 1, 'berreta_blast', 100, 100); u_temp.body._rotation = _parent._parent._parent._rotation; if (par._xscale < 0) { u_temp._xscale *= -1; } play(); } frame 13 { _parent.gotoAndStop('idle'); } } movieClip 49 { frame 10 { _parent.gotoAndStop('idle'); } } movieClip 50 { frame 1 { _root.gunshooting = false; stop(); } frame 2 { _parent._parent._parent._parent.shot1 = true; } } movieClip 53 { } movieClip 56 { } movieClip 60 { } movieClip 61 { frame 6 { _parent.gotoAndStop('idle'); } } movieClip 62 { frame 10 { _parent.gotoAndStop('idle'); } } movieClip 63 { frame 1 { _root.gunshooting = false; stop(); } } movieClip 68 { } movieClip 71 { } movieClip 72 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 73 { } movieClip 74 { frame 1 { body.gotoAndStop(2); } frame 4 { _parent.gotoAndStop('idle'); } } movieClip 75 { frame 10 { _parent.gotoAndStop('idle'); } } movieClip 76 { frame 1 { _root.gunshooting = false; stop(); } frame 2 { _root.gunshooting = true; } } movieClip 78 { } movieClip 82 { frame 1 { play(); } frame 7 { stop(); } } movieClip 83 { frame 1 { body.gotoAndPlay(1); play(); } frame 3 { _root.gunshooting = false; } frame 12 { _parent.gotoAndStop('idle'); } } movieClip 84 { frame 10 { _parent.gotoAndStop('idle'); } } movieClip 85 { frame 1 { _root.gunshooting = false; stop(); } frame 2 { _root.gunshooting = true; _parent._parent._parent._parent.shot1 = true; } } movieClip 88 { } movieClip 91 { frame 1 { _root.u_point.x = 0; _root.u_point.y = 0; var par = _parent._parent._parent._parent._parent; _parent._parent.bullet_pt.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var u_temp = _root.f_FX(x, y, par.y - 1, 'shotgun_blast', 100, 100); u_temp.body._rotation = _parent._parent._parent._rotation; if (par._xscale < 0) { u_temp._xscale *= -1; } play(); } frame 3 { _root.gunshooting = false; } frame 10 { _root.u_point.x = 0; _root.u_point.y = 0; shell.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var u_temp = _root.f_ShrapnelGeneral(x, y, _parent._parent._parent._parent._parent.y + 1, 2 + random(4), -(8 + random(6)), 'shotgunshell'); u_temp.bounce_limit = 2; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelVanish; u_temp._xscale = 70; u_temp._yscale = 70; } frame 18 { _parent.gotoAndStop(1); } } movieClip 92 { frame 10 { _parent.gotoAndStop('idle'); } } movieClip 93 { frame 1 { _root.gunshooting = false; stop(); } frame 2 { _root.gunshooting = true; _parent._parent._parent._parent.shot1 = true; } } movieClip 95 { } movieClip 96 { } movieClip 98 { } movieClip 99 { frame 9 { _parent.gotoAndStop('idle'); } } movieClip 100 { frame 1 { _root.gunshooting = false; stop(); } frame 2 { _root.gunshooting = true; } } movieClip 102 { } movieClip 103 { } movieClip 107 { } movieClip 108 { } movieClip 109 { frame 7 { _parent.gotoAndStop('idle'); } } movieClip 110 { frame 1 { _root.gunshooting = false; stop(); } frame 2 { _root.gunshooting = false; } } movieClip 112 { } movieClip 114 { } movieClip 116 { } movieClip 117 { } movieClip 118 { frame 1 { if (_parent._parent._parent._parent.pipe) { gotoAndStop('blank'); } } } movieClip 119 { frame 1 { _root.f_SetGun(this); } frame 102 { _root.f_SetGun(this); } } movieClip 120 { } movieClip 125 { frame 199 { _parent.active = false; _root.f_ObjectPop(_parent, _root.a_Items); _parent.gotoAndStop('blank'); } } movieClip 128 { } movieClip 130 item { frame 1 { _root.f_AddNeutral(this); x = _x; y = _y; nojumpanim = true; launch = -12; isitem = true; } frame 2 { gotoAndStop('blank'); } frame 3 { fp_Pickup = _root.f_PickupCrack; } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_PickupItem(_parent); } } frame 4 { fp_Pickup = _root.f_PickupDefense; } frame 5 { fp_Pickup = _root.f_PickupAttack; } frame 6 { fp_Pickup = _root.f_PickupHealthMaxUp; } frame 7 { fp_Pickup = _root.f_GetGun1; } frame 8 { fp_Pickup = _root.f_GetGun2; } frame 9 { fp_Pickup = _root.f_GetGun3; } frame 10 { fp_Pickup = _root.f_GetGun4; } frame 11 { fp_Pickup = _root.f_GetGun5; } frame 12 { fp_Pickup = _root.f_GetGun6; } frame 13 { fp_Pickup = _root.f_GetGun30; } frame 14 { fp_Pickup = _root.f_EatHotdog; } frame 15 { fp_Pickup = _root.f_GetGun101; } } movieClip 132 { instance of movieClip 9 { onClipEvent (load) { _root.f_InsertObject(_parent, _root.a_Platforms); } onClipEvent (unload) { _root.f_RemoveObject(_parent, _root.a_Platforms); } } } movieClip 133 l4 { frame 1 { _root.f_AddPlatform(this, z_platform); z_platform.diagonal = true; z_platform.incline = true; _root.f_GetSlope(z_platform); if (z_platform.y_mod == undefined) { z_platform.y_mod = 100; } gotoAndStop(2); } } movieClip 136 { } movieClip 137 shadow { frame 1 { active = true; stop(); } instance body of movieClip 136 { onClipEvent (load) { _root.f_Shadow(_parent); } onClipEvent (enterFrame) { _root.f_Shadow(_parent); } } frame 2 { active = false; } } movieClip 139 l1 { frame 1 { _root.f_AddPlatform(this, z_platform); z_platform.slope = 0; z_platform.dropthru = true; if (z_platform.y_mod == undefined) { z_platform.y_mod = 100; } gotoAndStop(2); } } movieClip 141 l5 { frame 1 { _root.f_AddPlatform(this, z_platform); z_platform.diagonal = true; z_platform.incline = false; _root.f_GetSlope(z_platform); if (z_platform.y_mod == undefined) { z_platform.y_mod = 100; } } frame 2 { stop(); } } movieClip 143 { instance of movieClip 9 { onClipEvent (load) { _root.f_InsertObject(_parent, _root.a_Walls); _parent._parent.w = _parent._width; _parent._parent.h = _parent._height; } onClipEvent (unload) { _root.f_RemoveObject(_parent, _root.a_Walls); } } } movieClip 144 l3 { frame 1 { _root.f_AddWall(this, z_wall); _root.f_AddPlatform(this, z_platform); w2 = z_wall._width / 2; gotoAndStop(2); } } movieClip 145 l8 { frame 1 { _root.f_AddWall(this, z_wall); gotoAndStop(2); } } movieClip 146 l2 { frame 1 { if (!z_platform.removed) { _root.f_AddPlatform(this, z_platform); z_platform.slope = 0; } gotoAndStop(2); } } movieClip 155 { frame 1 { play(); } frame 10 { _parent.gotoAndStop('blank'); } } movieClip 161 { frame 1 { play(); } frame 7 { _parent.gotoAndStop('blank'); } } movieClip 175 { frame 24 { stop(); } } movieClip 190 { frame 25 { stop(); } } movieClip 207 { frame 27 { stop(); } } movieClip 208 { frame 1 { var u_size = 70 + random(30); _xscale = u_size; _yscale = u_size; gotoAndStop(random(3) + 1); } frame 2 { _rotation = random(360); } frame 3 { _rotation = random(360); } } movieClip 221 { } movieClip 223 { } movieClip 225 { } movieClip 227 { frame 11 { _parent.gotoAndStop('flameball_die'); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownFireball(_parent); } } frame 21 { _parent.gotoAndStop('flameball_die'); } } movieClip 235 { frame 1 { stop(); } } movieClip 236 { instance line of movieClip 235 { onClipEvent (load) { speed_x = _parent._parent._parent.speed_x; speed_y = _parent._parent._parent.speed_y; } onClipEvent (enterFrame) { if (_parent._parent.active) { _width = _width + Math.sqrt(speed_x * speed_x + speed_y * speed_y); _x = -_width; } } } } movieClip 237 { frame 1 { stop(); } frame 2 { play(); } frame 31 { stop(); } } movieClip 239 { } movieClip 242 { } movieClip 244 { } movieClip 246 { } movieClip 248 { } movieClip 249 { frame 1 { stop(); } } movieClip 250 { frame 8 { stop(); } } movieClip 255 { frame 5 { stop(); } } movieClip 256 { instance of movieClip 9 { onClipEvent (load) { _root.f_InsertObject(_parent._parent, _root.a_Enemies); _parent._parent.w = _parent._width / 2; _parent._parent.h = _parent._height; } onClipEvent (unload) { _root.f_RemoveObject(_parent._parent, _root.a_Enemies); } } } movieClip 257 { frame 6 { _parent.gotoAndStop('remove'); } } movieClip 260 { } movieClip 263 { } movieClip 264 { frame 16 { gotoAndPlay(1); } } movieClip 265 { frame 1 { stop(); } frame 8 { gotoAndPlay(1); } } movieClip 280 { frame 1 { gotoAndStop(random(7) + 1); } } movieClip 282 { } movieClip 283 { } movieClip 284 { } movieClip 286 { } movieClip 287 { } movieClip 289 { } movieClip 290 { } movieClip 292 { } movieClip 293 { } movieClip 296 { } movieClip 298 { frame 1 { _root.f_SetHead(this); } } movieClip 300 { } movieClip 302 { } movieClip 304 { } movieClip 306 { } movieClip 307 { } movieClip 310 { } movieClip 311 { frame 1 { _root.f_SetFace(this); } } movieClip 312 { } movieClip 317 { } movieClip 319 { } movieClip 321 { frame 1 { stop(); } } movieClip 322 { frame 1 { _root.f_SetBody(this); } } movieClip 325 { } movieClip 327 { } movieClip 331 { } movieClip 332 { frame 1 { stop(); } } movieClip 333 { frame 1 { _root.f_SetBody(this); } } movieClip 334 { } movieClip 336 { } movieClip 338 { } movieClip 339 { } movieClip 346 { } movieClip 349 { frame 1 { _root.f_SetHand(this); } } movieClip 350 { } movieClip 358 { frame 8 { stop(); } } movieClip 359 { frame 14 { stop(); } } movieClip 376 { frame 14 { stop(); } } movieClip 384 { frame 1 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownFireball(_parent); } } frame 18 { stop(); } } movieClip 385 { frame 1 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownFireball(_parent); } } frame 18 { stop(); } } movieClip 388 { } movieClip 439 { frame 26 { stop(); } } movieClip 440 { frame 15 { stop(); } } movieClip 464 { frame 24 { stop(); } } movieClip 482 { frame 28 { stop(); } } movieClip 497 { frame 20 { stop(); } } movieClip 510 { frame 13 { stop(); } } movieClip 511 { } movieClip 512 { } movieClip 524 { frame 24 { _parent.gotoAndStop('blank'); } } movieClip 527 { } movieClip 528 { frame 20 { gotoAndPlay(1); } } movieClip 529 { frame 40 { gotoAndPlay(1); } } movieClip 530 { frame 1 { body.gotoAndPlay(random(38) + 1); } frame 21 { _parent.gotoAndStop('blank'); } } movieClip 531 { frame 10 { stop(); } } movieClip 542 { frame 16 { stop(); } } movieClip 545 { } movieClip 546 { frame 16 { stop(); } } movieClip 558 { } movieClip 568 { } movieClip 569 { } movieClip 570 { } movieClip 571 { frame 21 { stop(); } } movieClip 575 { frame 4 { stop(); } } movieClip 580 { frame 1 { play(); } frame 6 { _parent.gotoAndStop('remove'); } } movieClip 583 { } movieClip 584 { frame 8 { stop(); } } movieClip 610 { frame 36 { stop(); } } movieClip 621 { frame 16 { stop(); } } movieClip 626 { frame 1 { gotoAndStop(random(4) + 1); } } movieClip 627 { frame 32 { _parent.gotoAndStop('blank'); } } movieClip 628 fx { frame 1 { stop(); } frame 4 { if (victim.face_type == 5) { gotoAndStop('blood_y'); } } frame 5 { noturn = true; u_size = 80 + random(20); body._xscale = u_size; body._yscale = u_size; } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Bullet(_parent); } } frame 6 { noturn = true; line.active = true; line.gotoAndStop(1); line.line.line.gotoAndStop(gun_type); } frame 7 { noturn = true; line.active = true; line.gotoAndStop(1); line.line.line.gotoAndStop(gun_type); } frame 8 { noturn = true; line.active = true; line.gotoAndStop(1); line.line.line.gotoAndStop(gun_type); } frame 9 { noturn = true; line.active = true; line.gotoAndStop(1); line.line.line.gotoAndStop(gun_type); } frame 10 { scale = random(60) + 90; body._xscale = scale; body._yscale = scale; body._rotation = random(360); if (line.active) { line.active = false; line.gotoAndPlay(2); } else { line.gotoAndStop('blank'); } if (!owner.goodguy) { body.body.gotoAndStop(2); } } frame 11 { scale = random(60) + 90; body._xscale = scale; body._yscale = scale; body._rotation = random(360); if (line.active) { line.active = false; line.gotoAndPlay(2); } else { line.gotoAndStop('blank'); } } frame 12 { if (line.active) { line.active = false; line.gotoAndPlay(2); } else { line.gotoAndStop('blank'); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Bullet(_parent); } } frame 14 { noturn = false; } instance of movieClip 225 { onClipEvent (load) { _parent.speed_y -= 10; } onClipEvent (enterFrame) { _parent.speed_y += 2; } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Shrapnel(_parent); } } frame 28 { body._xscale = u_size; body._yscale = u_size; } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Bullet(_parent); _parent.body._xscale += 30; _parent.body._yscale += 30; } } frame 31 { _root.s_explosion1.start(0, 0); } frame 33 { _root.s_explosion2.start(0, 0); } frame 34 { if (victim.face_type == 5) { gotoAndStop('chainsawblood_y'); } else { body._rotation = random(360); } } frame 35 { var u_scale = 70 + random(30); body._rotation = random(50) - 25; body._xscale = u_scale; body._yscale = u_scale; } frame 36 { if (!owner.goodguy) { body.body.gotoAndStop(2); } } frame 37 { if (!owner.goodguy) { body.body.gotoAndStop(2); } } frame 43 { body._rotation = random(360); } frame 46 { var u_scale = 70 + random(30); body._xscale = u_scale; body._yscale = u_scale; } instance body of movieClip 571 { onClipEvent (enterFrame) { _parent._x += _parent.force_x; _parent._y += _parent.force_y; } } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_BloodShrapnel(_parent); } } } frame 1 { _root.API_Settings = {'movie_id': 9195, 'enc_key': '4hXuxsgAuWHVGID5EXeUjpTpUHNrxJlb', 'debug_mode': false, 'movie_version': ''}; NewgroundsAPI.addCustomLink(1, 'Madness Day 2008'); NewgroundsAPI.addCustomLink(2, 'Madness Day 2007'); NewgroundsAPI.addCustomLink(3, 'Madness'); NewgroundsAPI.addCustomLink(4, 'Madness Day 2009'); stop(); } movieClip 634 { } movieClip 636 { } movieClip 638 { } movieClip 640 { } movieClip 642 { } movieClip 644 { } movieClip 649 { } button 651 { on (release) { com.Newgrounds.NewgroundsAPI.loadCustomLink('Madness Day 2007'); } } button 652 { on (release) { com.Newgrounds.NewgroundsAPI.loadCustomLink('Madness Day 2008'); } } button 654 { on (release) { com.Newgrounds.NewgroundsAPI.loadCustomLink('Madness'); } } button 655 { on (release) { com.Newgrounds.NewgroundsAPI.loadCustomLink('Madness Day 2009'); } } movieClip 656 { } movieClip 659 { } movieClip 663 { } movieClip 673 { frame 40 { stop(); } } movieClip 686 { } button 687 { on (press) { gotoAndStop('end'); _root.play(); } } movieClip 688 { instance of movieClip 663 { onClipEvent (load) { _root.stop(); PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); if (PercentLoaded != 100) { _parent.gotoAndStop(PercentLoaded); } else { _parent.gotoAndStop('lastframe'); } } onClipEvent (enterFrame) { PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); if (PercentLoaded != 100) { _parent.gotoAndStop(PercentLoaded); } else { _parent.gotoAndPlay('loaded'); } } } frame 101 { play(); } frame 165 { stop(); } } movieClip 690 { } movieClip 695 { } movieClip 696 { frame 1 { com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]); var attachAd = function () { com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]); }; com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, attachAd); background._visible = false; } } movieClip 698 { } button 701 { on (release) { this._visible = false; } } movieClip 708 { frame 1 { _visible = false; var checkConnection = function (event) { if (!event.success) { _visible = true; gotoAndStop(3); } }; if (com.Newgrounds.NewgroundsAPI.isNewgrounds() || _root.API_Settings.debug_mode) { com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection); if (!com.Newgrounds.NewgroundsAPI.hasUserSession() && !_root.API_Settings.debug_mode) { _visible = true; gotoAndStop(2); } } com.Newgrounds.NewgroundsAPI.setMovieVersion(_root.API_Settings.movie_version); com.Newgrounds.NewgroundsAPI.connectMovie(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode); com.Newgrounds.NewgroundsAPI.loadMedals(); stop(); } } movieClip 2576 __Packages.com.Newgrounds.BaseN { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.BaseN) { var v1 = function (hash) { this.ceiling = 100000000000000.0; if (hash) { this.hashIndex = hash; } else { this.hashIndex = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/'; } this.bitSize = this.hashIndex.length; this.hashVal = new Object(); this.i = 0; while (this.i < this.bitSize) { this.hashVal[this.hashIndex.charAt(this.i)] = this.i; ++this.i; } }; com.Newgrounds.BaseN = v1; var v2 = v1.prototype; v2.verify = function (s) { if (this.hashVal[s] != undefined) { return true; } else { return false; } }; v2.encode = function (n, minchars) { this.debug.lastencode = ''; if (typeof this.i != 'string') { n = n.toString(); } if (n.charAt(0) == '-') { var v3 = '-'; n = n.substring(1); } else { var v3 = ''; } if ((String(n)).indexOf('.') > -1) { var v4 = (String(n)).split('.', 2); return v3 + this.baseNEncoder(v4[0], minchars) + '.' + this.baseNEncoder(v4[1]); } else { this.debug.lastencode += '\tNo decimal\r'; return v3 + this.baseNEncoder(n, minchars); } }; v2.decode = function (s) { var v4 = 1; if (s.charAt(0) == '-') { v4 = -1; s = s.substring(1, s.length); } var v3 = s.indexOf('.'); if (v3 > -1) { var v5 = Math.pow(10, this.baseNDecoder(s.substring(v3 + 1, s.length))); return (this.baseNDecoder(s.substring(0, v3)) / v5) * v4; } else { return this.baseNDecoder(s) * v4; } }; v2.baseNEncoder = function (n, minchars) { if (!minchars) { minchars = 1; } var v4 = ''; while (n != 0) { n = Math.round(n); var v3 = n % this.bitSize; if (Math.round(v3) != v3) { trace('BaseN failed on ' + n + '%' + this.bitSize + ' = ' + v3 + ' ' + int(n) + ' ' + int(this.bitSize)); } v4 = this.hashIndex.charAt(v3) + v4; this.debug.lastencode += '\t-> n:' + n + ' % bitSize:' + this.bitSize + ' = ' + v3 + ', final char=' + v4 + '\n'; n -= v3; n /= this.bitSize; } if (minchars) { while (v4.length < minchars) { v4 = this.hashIndex.charAt(0) + v4; } } return v4; }; v2.baseNDecoder = function (s) { var v2 = 0; var v6 = 0; this.i = 0; while (this.i < s.length) { var v3 = s.charAt(s.length - this.i - 1); if (v3 == this.hashIndex.charAt(0)) { var v5 = 0; } else { var v5 = this.hashVal[v3] * Math.pow(this.bitSize, this.i); } v2 += v5; if (v2 >= this.ceiling) { v6 += (v2 - v2 % this.ceiling) / this.ceiling; v2 %= this.ceiling; } ++this.i; } if (v6 > 0) { v2 = '' + v2; while (v2.length < (this.ceiling.toString()).length - 1) { v2 = '0' + v2; } v2 = '' + v6 + v2; } return v2; }; v2.debug = new Object(); ASSetPropFlags(com.Newgrounds.BaseN.prototype, null, 1); } #endinitclip } movieClip 2577 __Packages.com.Newgrounds.NewgroundsAPIError { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPIError) { var v1 = function (error, msg) { if ((Number(error)).toString() == String(error)) { error = Number(error); } else { if (com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]) { error = com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]; } else { error = 0; } } this.code = error; this.message = msg; this.name = com.Newgrounds.NewgroundsAPIError.error_names[error]; this.alias = com.Newgrounds.NewgroundsAPIError.aliases[error]; }; com.Newgrounds.NewgroundsAPIError = v1; var v2 = v1.prototype; v1.init_codes = function () { var v2 = new Object(); var v1 = 0; while (v1 < com.Newgrounds.NewgroundsAPIError.aliases.length) { v2[com.Newgrounds.NewgroundsAPIError.aliases[v1]] = v1; ++v1; } return v2; }; v1.init_names = function () { var v5 = new Array(); var v3 = 0; while (v3 < com.Newgrounds.NewgroundsAPIError.aliases.length) { var v2 = (com.Newgrounds.NewgroundsAPIError.aliases[v3].toLowerCase()).split('_'); var v1 = 0; while (v1 < v2.length) { v2[v1] = (v2[v1].substr(0, 1)).toUpperCase() + v2[v1].substr(1, v2[v1].length); for (var v4 in com.Newgrounds.NewgroundsAPIError.always_caps) { if (v2[v1].toUpperCase() == com.Newgrounds.NewgroundsAPIError.always_caps[v4]) { v2[v1] = v2[v1].toUpperCase(); } } ++v1; } v5[v3] = v2.join(' '); ++v3; } return v5; }; v2.isError = function () { return true; }; v1.aliases = new Array('UNKNOWN_ERROR', 'INVALID_API_ID', 'MISSING_PARAM', 'INVALID_STAT_ID', 'INVALID_COMMAND_ID', 'FLASH_ADS_NOT_APPROVED', 'PERMISSION_DENIED', 'IDENTIFICATION_REQUIRED', 'INVALID_EMAIL_ADDRESS', 'BANNED_USER', 'SESSION_EXPIRED', 'INVALID_SCORE', 'INVALID_MEDAL', 'INVALID_FOLDER', 'FILE_NOT_FOUND', 'SITE_ID_REQUIRED', 'UPLOAD_IN_PROGRESS', 'USER_CANCELLED', 'CONFIRM_REQUEST', 'CONNECTION_FAILED'); v1.always_caps = new Array('API', 'URL', 'ID'); v1.error_codes = com.Newgrounds.NewgroundsAPIError.init_codes(); v1.error_names = com.Newgrounds.NewgroundsAPIError.init_names(); v2.code = 0; ASSetPropFlags(com.Newgrounds.NewgroundsAPIError.prototype, null, 1); } #endinitclip } movieClip 2578 __Packages.com.Newgrounds.NewgroundsAPI { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPI) { var v1 = function () {}; com.Newgrounds.NewgroundsAPI = v1; var v2 = v1.prototype; v1.setMovieVersion = function (v) { if (v) { com.Newgrounds.NewgroundsAPI.version = String(v); } }; v1.setUserEmail = function (e) { com.Newgrounds.NewgroundsAPI.user_email = e; }; v1.getOfficialVersionURL = function () { var v1 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?tracker_id=' + com.Newgrounds.NewgroundsAPI.movie_id + '&command_id=' + com.Newgrounds.NewgroundsAPI.getCommandID('loadOfficalVersion') + '&seed=' + Math.random(); if (com.Newgrounds.NewgroundsAPI.debug) { v1 += '&debug=1'; } return v1; }; v1.hasUserSession = function () { if (com.Newgrounds.NewgroundsAPI.session_id && com.Newgrounds.NewgroundsAPI.publisher_id) { return true; return false; } if (_root.NewgroundsAPI_PublisherID && _root.NewgroundsAPI_SessionID) { return true; } return false; }; v1.isNewgrounds = function () { return com.Newgrounds.NewgroundsAPI.publisher_id == 1 || _root.NewgroundsAPI_PublisherID == 1 || ((com.Newgrounds.NewgroundsAPI.getHost()).toLowerCase()).indexOf('ungrounded.net') > -1; }; v1.hasPublisher = function () { return com.Newgrounds.NewgroundsAPI.publisher_id || _root.NewgroundsAPI_PublisherID; }; v1.hasUserEmail = function () { if (com.Newgrounds.NewgroundsAPI.user_email) { return true; } return false; }; v1.connectionTimeOut = function () { clearInterval(com.Newgrounds.NewgroundsAPI.timeout); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError('CONNECTION_FAILED', 'Connection to NewgroundsAPI gateway timed out.')); }; v1.connectMovie = function (m_id, encrypt_key, debug_mode) { if (com.Newgrounds.NewgroundsAPI.connected) { return undefined; } var v2 = function () { com.Newgrounds.NewgroundsAPI.connectionTimeOut(); }; com.Newgrounds.NewgroundsAPI.timeout = setInterval(v2, 8000, null); if (!m_id) { com.Newgrounds.NewgroundsAPI.fatalError('NewgroundsAPI.connectMovie() - missing required movie_id parameter', 'connectMovie'); } com.Newgrounds.NewgroundsAPI.movie_id = String(m_id); com.Newgrounds.NewgroundsAPI.tracker_id = Number(com.Newgrounds.NewgroundsAPI.movie_id.substring(0, com.Newgrounds.NewgroundsAPI.movie_id.indexOf(':'))); com.Newgrounds.NewgroundsAPI.encryption_key = encrypt_key; com.Newgrounds.NewgroundsAPI.debug = debug_mode; if (_root.NewgroundsAPI_PublisherID) { com.Newgrounds.NewgroundsAPI.publisher_id = _root.NewgroundsAPI_PublisherID; if (_root.NewgroundsAPI_SessionID) { com.Newgrounds.NewgroundsAPI.session_id = _root.NewgroundsAPI_SessionID; } } else { com.Newgrounds.NewgroundsAPI.publisher_id = 1; com.Newgrounds.NewgroundsAPI.session_id = null; com.Newgrounds.NewgroundsAPI.user_id = 0; com.Newgrounds.NewgroundsAPI.user_name = 'Guest'; } if (_root.NewgroundsAPI_UserName) { com.Newgrounds.NewgroundsAPI.user_name = _root.NewgroundsAPI_UserName; } if (_root.NewgroundsAPI_UserID) { com.Newgrounds.NewgroundsAPI.user_id = _root.NewgroundsAPI_UserID; } com.Newgrounds.NewgroundsAPI.connected = true; com.Newgrounds.NewgroundsAPI.sendCommand('connectMovie', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'movie_version': com.Newgrounds.NewgroundsAPI.version}); }; v1.getHost = function () { if (!com.Newgrounds.NewgroundsAPI.host) { var v1 = _url; if (v1.indexOf('http://') > -1 or v1.indexOf('https://') > -1) { com.Newgrounds.NewgroundsAPI.host = (v1.split('/'))[2].toLowerCase(); return com.Newgrounds.NewgroundsAPI.host; } com.Newgrounds.NewgroundsAPI.host = 'localhost'; } return com.Newgrounds.NewgroundsAPI.host; }; v1.loadNewgrounds = function () { com.Newgrounds.NewgroundsAPI.sendCommand('loadNewgrounds', {'host': com.Newgrounds.NewgroundsAPI.getHost()}, true); }; v1.loadMySite = function () { com.Newgrounds.NewgroundsAPI.sendCommand('loadMySite', {'host': com.Newgrounds.NewgroundsAPI.getHost()}); }; v1.loadCustomLink = function (link) { com.Newgrounds.NewgroundsAPI.sendCommand('loadCustomLink', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'link': link}, true); }; v1.logCustomEvent = function (event) { com.Newgrounds.NewgroundsAPI.sendCommand('logCustomEvent', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'event': event}); }; v1.postScore = function (score, value, get_best) { if (!score or value == undefined) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('postScore')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required parameter(s)')); return undefined; } com.Newgrounds.NewgroundsAPI.sendSecureCommand('postScore', {'score': score, 'value': value, 'get_best': get_best}); }; v1.getTodaysScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 't', params, 'getTodaysScores'); }; v1.getYesterdaysScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getYesterdaysScores'); }; v1.getThisWeeksScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'w', params, 'getThisWeeksScores'); }; v1.getThisMonthsScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'm', params, 'getThisMonthsScores'); }; v1.getThisYearsScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getThisYearsScores'); }; v1.getAlltimeScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'a', params, 'getAlltimeScores'); }; v1.getScores = function (score, period, params, command_name) { if (!score) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required score name')); return undefined; } if (!params) { params = new Object(); } if (!com.Newgrounds.NewgroundsAPI.hasUserSession()) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError('SITE_ID_REQUIRED', 'Host \'' + com.Newgrounds.NewgroundsAPI.getHost() + '\' does not have high scores enabled')); return undefined; } params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; params.period = period; params.score = score; if (params.user_id) { var v3 = period; } else { var v3 = period + '-u'; } if (com.Newgrounds.NewgroundsAPI.score_page_counts[v3] == undefined) { params.request_page_count = true; } com.Newgrounds.NewgroundsAPI.sendCommand('getScores', params); }; v1.unlockMedal = function (medal, get_score) { if (!medal) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('unlockMedal')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required medal name')); return undefined; } var v1 = new Object(); v1.medal = medal; if (get_score) { v1.get_score = get_score; } com.Newgrounds.NewgroundsAPI.sendSecureCommand('unlockMedal', v1); }; v1.loadMedals = function () { if (com.Newgrounds.NewgroundsAPI.medals) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, true, {'medals': com.Newgrounds.NewgroundsAPI.medals}); return undefined; } var v1 = new Object(); if (com.Newgrounds.NewgroundsAPI.hasUserSession()) { v1.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; v1.user_id = com.Newgrounds.NewgroundsAPI.user_id; } com.Newgrounds.NewgroundsAPI.sendCommand('getMedals', v1); }; v1.getMedals = function () { return com.Newgrounds.NewgroundsAPI.medals; }; v1.saveLocal = function (save_id, save_data, size_allocation) { if (!com.Newgrounds.NewgroundsAPI.sharedObjects[save_id]) { com.Newgrounds.NewgroundsAPI.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.Newgrounds.NewgroundsAPI.movie_id + '_' + save_id); } com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id] = com.Newgrounds.NewgroundsAPI.encodeData(save_data); com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].flush(); }; v1.loadLocal = function (save_id) { if (!com.Newgrounds.NewgroundsAPI.sharedObjects[save_id]) { com.Newgrounds.NewgroundsAPI.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.Newgrounds.NewgroundsAPI.movie_id + '_' + save_id); } com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].flush(); if (com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id]) { return com.Newgrounds.NewgroundsAPI.decodeData(com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id]); } else { return null; } }; v1.encodeData = function (data) { return com.Newgrounds.NewgroundsAPI.compressHex(com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(data), com.Newgrounds.NewgroundsAPI.encryption_key)); }; v1.decodeData = function (base) { return com.Newgrounds.JSON.decode(com.Newgrounds.RC4.decrypt(com.Newgrounds.NewgroundsAPI.uncompressHex(base), com.Newgrounds.NewgroundsAPI.encryption_key)); }; v1.compressHex = function (hex_value) { var v5 = hex_value.length % 6; var v4 = ''; var v1 = 0; while (v1 < hex_value.length) { var v2 = Number('0x' + hex_value.substr(v1, 6)); v4 += com.Newgrounds.NewgroundsAPI.compressor.encode(v2, 4); v1 += 6; } return v5 + v4; }; v1.uncompressHex = function (base_value) { var v8 = Number(base_value.charAt(0)); var v7 = ''; var v3; var v2 = 1; while (v2 < base_value.length) { var v6 = base_value.substr(v2, 4); var v5 = com.Newgrounds.NewgroundsAPI.compressor.decode(v6); var v1 = com.Newgrounds.NewgroundsAPI.dec2hex(v5); if (v2 + 4 < base_value.length) { v3 = 6; } else { v3 = v8; } while (v1.length < v3) { v1 = '0' + v1; } v7 += v1; v2 += 4; } return v7; }; v1.dec2hex = function (dec) { var v4 = '0123456789ABCDEF'; var v3 = ''; while (dec > 0) { var v2 = dec % 16; v3 = v4.charAt(v2) + v3; dec = (dec - v2) / 16; } return v3; }; v1.saveFile = function (folder, filename, contents, thumbnail_source) { if (!com.Newgrounds.NewgroundsAPI.save_file) { com.Newgrounds.NewgroundsAPI.save_file = new com.Newgrounds.NewgroundsAPISaveFile(com.Newgrounds.NewgroundsAPI.movie_id, folder, filename); com.Newgrounds.NewgroundsAPI.save_file.setContents(contents); if (thumbnail_source) { com.Newgrounds.NewgroundsAPI.save_file.setThumbnail(thumbnail_source); } com.Newgrounds.NewgroundsAPI.save_file.onError = function (msg) { var v1 = new com.Newgrounds.NewgroundsAPIError('PERMISSION_DENIED', msg); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); }; com.Newgrounds.NewgroundsAPI.save_file.onCancel = function (msg) { var v1 = new com.Newgrounds.NewgroundsAPIError('USER_CANCELLED', msg); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); }; com.Newgrounds.NewgroundsAPI.save_file.submit(); } else { var v1 = new com.Newgrounds.NewgroundsAPIError('UPLOAD_IN_PROGRESS', 'Please wait for the previous file to finish uploading'); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); } }; v1.checkFilePrivs = function (folder, filename) { if (com.Newgrounds.NewgroundsAPI.user_id) { var v1 = com.Newgrounds.NewgroundsAPI.user_id; } else { var v1 = 0; } var v2 = {'folder': folder, 'filename': filename, 'user_id': v1, 'publisher_id': com.Newgrounds.NewgroundsAPI.publisher_id}; com.Newgrounds.NewgroundsAPI.sendCommand('checkFilePrivs', v2); }; v1.finishFileSave = function (folder, filename, description, share, file, thumbnail) { var v2; v2 = {'folder': folder, 'filename': filename, 'description': description, 'share': share}; var v1; v1 = {'file': file, 'thumbnail': thumbnail}; com.Newgrounds.NewgroundsAPI.sendSecureCommand('saveFile', v2, null, v1); }; v1.getFiles = function (folder, options) { var v7 = {'name': 1, 'date': 2, 'score': 3}; var v2 = {'user_only': false, 'sort_on': 'date', 'page': 1, 'results_per_page': 20, 'sort_descending': true}; var v6 = new Array(); for (var v10 in v7) { v6.push('\'' + v10 + '\''); } var v4 = new Array(); for (var v9 in v2) { v4.push('\'' + v9 + '\''); } if (options.sort_descending && !v7[options.sort_descending]) { var v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + options.sort_descending + '\' is not a valid sort_on value. Valid values are: ' + v6.join(', ')); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options.sort_descending; } var v8; if (options) { for (v10 in options) { if (v2[v10] == undefined) { v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + v10 + '\' is not a valid option. Valid options are: ' + v4.join(', ')); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options[v10]; } else { if (typeof options[v10] != typeof v2[v10]) { v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'option \'' + v10 + '\' should be the following type: ' + typeof v2[v10]); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options[v10]; } } } v8 = options; } else { v8 = new Object(); } if (com.Newgrounds.NewgroundsAPI.hasUserSession()) { v8.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; v8.user_id = com.Newgrounds.NewgroundsAPI.user_id; } v8.folder = folder; com.Newgrounds.NewgroundsAPI.sendCommand('getFiles', v8); }; v1.getConfirmation = function (command_name, event, msg, target, confirm, cancel) { var v1 = new com.Newgrounds.NewgroundsAPIError('CONFIRM_REQUEST', msg); v1.confirm = function () { target[confirm](); }; v1.cancel = function () { target[cancel](); }; v1.command = com.Newgrounds.NewgroundsAPI.getCommandID(command_name); com.Newgrounds.NewgroundsAPI.callListener(event, false, v1); }; v1.doBlockHost = function (event) { _root.stop(); com.Newgrounds.NewgroundsAPI.initTextFormats(); _root.createEmptyMovieClip('NGAPI_deny_host_overlay', _root.getNextHighestDepth()); _root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100); _root.NGAPI_deny_host_overlay.beginFill(6684672); _root.NGAPI_deny_host_overlay.moveTo(0, 0); _root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0); _root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height); _root.NGAPI_deny_host_overlay.lineTo(0, Stage.height); _root.NGAPI_deny_host_overlay.lineTo(0, 0); _root.NGAPI_deny_host_overlay.endFill(); var v2 = 'This movie has not been approved for use on ' + com.Newgrounds.NewgroundsAPI.getHost() + '.'; v2 += '\r\rFor an aproved copy, please visit:\r'; var v4 = v2.length; v2 += event.data.movie_url; var v3 = v2.length; _root.NGAPI_deny_host_overlay.createTextField('mousekill', 100, 0, 0, Stage.width, Stage.height); _root.NGAPI_deny_host_overlay.createTextField('error', 101, (Stage.width - 400) / 2, Stage.height / 2 - 100, 400, 200); _root.NGAPI_deny_host_overlay.error.text = 'ERROR!'; _root.NGAPI_deny_host_overlay.error.setTextFormat(com.Newgrounds.NewgroundsAPI.error_format); _root.NGAPI_deny_host_overlay.createTextField('message', 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200); _root.NGAPI_deny_host_overlay.message.text = v2; _root.NGAPI_deny_host_overlay.message.multiline = true; _root.NGAPI_deny_host_overlay.message.wordWrap = true; _root.NGAPI_deny_host_overlay.message.html = true; _root.NGAPI_deny_host_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format); com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url; _root.NGAPI_deny_host_overlay.message.setTextFormat(v4, v3, com.Newgrounds.NewgroundsAPI.link_format); }; v1.onNewVersionAvailable = function (event) { _root.stop(); com.Newgrounds.NewgroundsAPI.initTextFormats(); var v2 = new Object(); v2.x = Stage.width / 2; v2.y = Stage.height / 2; _root.createEmptyMovieClip('NGAPI_new_version_overlay', _root.getNextHighestDepth()); _root.NGAPI_new_version_overlay.lineStyle(1, 0, 100); _root.NGAPI_new_version_overlay.beginFill(0, 70); _root.NGAPI_new_version_overlay.moveTo(-10, -10); _root.NGAPI_new_version_overlay.lineTo(-10, 1000); _root.NGAPI_new_version_overlay.lineTo(1000, 1000); _root.NGAPI_new_version_overlay.lineTo(1000, -10); _root.NGAPI_new_version_overlay.lineTo(-10, -10); _root.NGAPI_new_version_overlay.endFill(); _root.NGAPI_new_version_overlay.lineStyle(10, 0, 100); _root.NGAPI_new_version_overlay.beginFill(51); _root.NGAPI_new_version_overlay.moveTo(v2.x - 240, v2.y - 120); _root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y - 120); _root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y + 80); _root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y + 80); _root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y - 120); _root.NGAPI_new_version_overlay.endFill(); _root.NGAPI_new_version_overlay.createEmptyMovieClip('exit', 1000); _root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100); _root.NGAPI_new_version_overlay.exit.beginFill(0, 50); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 210, v2.y - 110); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 110); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 90); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 90); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 110); _root.NGAPI_new_version_overlay.exit.endFill(); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 214, v2.y - 106); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 226, v2.y - 94); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 226, v2.y - 106); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 214, v2.y - 94); _root.NGAPI_new_version_overlay.exit.onMouseUp = function () { if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) { _root.NGAPI_new_version_overlay.removeMovieClip(); } }; var v3 = 'Version ' + event.data.movie_version + ' is now available at:' + '\n'; var v6 = v3.length; v3 += event.data.movie_url; var v4 = v3.length; _root.NGAPI_new_version_overlay.createTextField('mouseblocker', 99, -10, -10, 1000, 1000); _root.NGAPI_new_version_overlay.createTextField('newversion', 100, v2.x - 210, v2.y - 90, 400, 80); _root.NGAPI_new_version_overlay.newversion.text = 'New Version Available!'; _root.NGAPI_new_version_overlay.newversion.setTextFormat(com.Newgrounds.NewgroundsAPI.header_format); _root.NGAPI_new_version_overlay.createTextField('message', 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40); _root.NGAPI_new_version_overlay.message.text = v3; _root.NGAPI_new_version_overlay.message.multiline = true; _root.NGAPI_new_version_overlay.message.wordWrap = true; _root.NGAPI_new_version_overlay.message.html = true; _root.NGAPI_new_version_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format); com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url; _root.NGAPI_new_version_overlay.message.setTextFormat(v6, v4, com.Newgrounds.NewgroundsAPI.link_format); }; v1.initTextFormats = function () { if (!com.Newgrounds.NewgroundsAPI.error_format) { com.Newgrounds.NewgroundsAPI.error_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.error_format.font = 'Arial Black'; com.Newgrounds.NewgroundsAPI.error_format.size = 48; com.Newgrounds.NewgroundsAPI.error_format.color = 16711680; } if (!com.Newgrounds.NewgroundsAPI.header_format) { com.Newgrounds.NewgroundsAPI.header_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.header_format.font = 'Arial Black'; com.Newgrounds.NewgroundsAPI.header_format.size = 24; com.Newgrounds.NewgroundsAPI.header_format.color = 16777215; } if (!com.Newgrounds.NewgroundsAPI.normal_format) { com.Newgrounds.NewgroundsAPI.normal_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.normal_format.font = 'Arial'; com.Newgrounds.NewgroundsAPI.normal_format.bold = true; com.Newgrounds.NewgroundsAPI.normal_format.size = 12; com.Newgrounds.NewgroundsAPI.normal_format.color = 16777215; } if (!com.Newgrounds.NewgroundsAPI.link_format) { com.Newgrounds.NewgroundsAPI.link_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.link_format.color = 16776960; com.Newgrounds.NewgroundsAPI.link_format.underline = true; } }; v1.doEvent = function (e) { switch (com.Newgrounds.NewgroundsAPI.getCommandName(e.command_id)) { case 'connectMovie': clearInterval(com.Newgrounds.NewgroundsAPI.timeout); com.Newgrounds.NewgroundsAPI.sendMessage('You have successfully connected to the Newgrounds API Gateway'); com.Newgrounds.NewgroundsAPI.sendMessage('Movie identified as "' + e.movie_name + '"'); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, e.success, {'movie_name': e.movie_name}); var v4 = false; if (e.ad_status === -1) { var v6 = 'This movie was not approved to run Flash Ads.'; com.Newgrounds.NewgroundsAPI.sendWarning(v6); com.Newgrounds.NewgroundsAPI.sendWarning('visit ' + com.Newgrounds.NewgroundsAPI.AD_TERMS_URL + ' to view our approval guidelines'); if (!e.ad_url) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6)); } else { v4 = true; } } else { if (e.ad_status === 0) { var v6 = 'Flash Ads are currently awaiting approval.'; com.Newgrounds.NewgroundsAPI.sendNotice(v6); if (!e.ad_url) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6)); } else { v4 = true; } } } if (e.ad_url) { com.Newgrounds.NewgroundsAPI.ad_url = unescape(e.ad_url); if (!v4) { com.Newgrounds.NewgroundsAPI.sendMessage('This movie has been approved to run Flash Ads!'); } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, true); } if (e.deny_host) { v6 = com.Newgrounds.NewgroundsAPI.getHost() + ' does not have permission to run this movie!'; com.Newgrounds.NewgroundsAPI.sendWarning(v6); com.Newgrounds.NewgroundsAPI.sendWarning('\tUpdate your API configuration to unblock ' + com.Newgrounds.NewgroundsAPI.getHost()); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED, true, {'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()}); } if (e.movie_version) { com.Newgrounds.NewgroundsAPI.sendWarning('According to your API Configuration, this version is out of date.'); if (com.Newgrounds.NewgroundsAPI.version) { com.Newgrounds.NewgroundsAPI.sendWarning('\tThe this movie is version ' + com.Newgrounds.NewgroundsAPI.version); } com.Newgrounds.NewgroundsAPI.sendWarning('\tThe most current version is ' + e.movie_version); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE, true, {'movie_version': e.movie_version, 'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()}); } if (e.request_portal_url) { com.Newgrounds.NewgroundsAPI.sendCommand('setPortalID', {'portal_url': _url}); } break; case 'logCustomEvent': if (e.success) { com.Newgrounds.NewgroundsAPI.sendMessage('Event \'' + e.event + '\' was logged.'); } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.EVENT_LOGGED, e.success, {'event': e.event}); break; case 'postScore': var v7; if (e.success) { var v3 = 'User'; if (com.Newgrounds.NewgroundsAPI.user_email) { v3 = com.Newgrounds.NewgroundsAPI.user_email; } else { if (com.Newgrounds.NewgroundsAPI.user_name) { v3 = com.Newgrounds.NewgroundsAPI.user_name; } } com.Newgrounds.NewgroundsAPI.sendMessage(v3 + ' posted ' + e.value + ' to \'' + e.score + '\''); v7 = {'score': e.score, 'value': e.value, 'username': v3}; } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORE_POSTED, e.success, v7); break; case 'getScores': var v7 = new Object(); if (e.user_id) { var v5 = e.period; } else { var v5 = e.period + '-u'; } if (e.total_pages) { com.Newgrounds.NewgroundsAPI.score_page_counts[v5] = e.total_pages; } v7.user_id = e.user_id; v7.current_page = e.current_page; v7.total_pages = com.Newgrounds.NewgroundsAPI.score_page_counts[v5]; v7.scores = e.scores; v7.period = com.Newgrounds.NewgroundsAPI.getPeriodName(e.period); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, e.success, v7); break; case 'unlockMedal': if (com.Newgrounds.NewgroundsAPI.medals) { var v2 = 0; while (v2 < com.Newgrounds.NewgroundsAPI.medals.length) { if (com.Newgrounds.NewgroundsAPI.medals[v2].medal_name === e.medal_name) { com.Newgrounds.NewgroundsAPI.medals[v2].medal_unlocked = true; break; } ++v2; } } var v7 = {'medal_name': e.medal_name, 'medal_value': e.medal_value, 'medal_difficulty': e.medal_difficulty}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDAL_UNLOCKED, e.success, v7); break; case 'getMedals': com.Newgrounds.NewgroundsAPI.medals = e.medals; var v7 = {'medals': e.medals}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, e.success, v7); break; break; case 'getFiles': case 'getSystemFiles': break; case 'saveFile': com.Newgrounds.NewgroundsAPI.save_file = null; var v7 = {'file_id': e.file_id, 'filename': e.filename, 'file_url': e.file_url, 'thumbnail': e.thumbnail, 'icon': e.icon}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, e.success, v7); break; case 'checkFilePrivs': if (com.Newgrounds.NewgroundsAPI.save_file) { com.Newgrounds.NewgroundsAPI.save_file.checkPrivs(e); } else { var v7 = {'filename': e.filename, 'folder': e.folder, 'can_read': e.can_read, 'can_write': e.can_write}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_PRIVS_LOADED, e.success, v7); } } }; v1.setDefaultListeners = function () { var v1 = new Array(); v1[com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED] = {'listener': com.Newgrounds.NewgroundsAPI.doBlockHost}; v1[com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE] = {'listener': com.Newgrounds.NewgroundsAPI.onNewVersionAvailable}; return v1; }; v1.addEventListener = function (event, listener, params) { com.Newgrounds.NewgroundsAPI.listeners[event] = {'listener': listener, 'params': params}; }; v1.removeEventListener = function (event) { delete com.Newgrounds.NewgroundsAPI.listeners[event]; }; v1.getEventName = function (event) { for (var v2 in com.Newgrounds.NewgroundsAPI.events) { if (com.Newgrounds.NewgroundsAPI.events[v2] == event) { return v2; } } return undefined; }; v1.callListener = function (event, success, data, target) { com.Newgrounds.NewgroundsAPI.echo('Fired Event: ' + com.Newgrounds.NewgroundsAPI.getEventName(event)); if (com.Newgrounds.NewgroundsAPI.listeners[event]) { if (data.isError()) { com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'error': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params); } else { com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'data': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params); } } }; v1.getCommandName = function (id) { return id; }; v1.getCommandID = function (name) { return name; }; v1.getPeriodAliases = function () { var v1 = new Object(); for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { v1[com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias] = v2; } return v1; }; v1.getPeriodName = function (p) { for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { if (v2 == p) { return com.Newgrounds.NewgroundsAPI.period_aliases[v2].name; } } return null; }; v1.getPeriodAlias = function (p) { for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { if (v2 == p) { return com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias; } } return null; }; v1.sendError = function (c, e) { trace('[NewgroundsAPI ERROR] :: ' + com.Newgrounds.NewgroundsAPI.getCommandName(c.command_id) + '() - ' + e.name + ':' + '\n' + '\t\t\t\t' + e.message); }; v1.sendWarning = function (m, c) { if (c) { m += '\r[NewgroundsAPI WARNING] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[NewgroundsAPI WARNING] :: ' + m); }; v1.sendNotice = function (m, c) { if (c) { m += '\r[NewgroundsAPI NOTICE] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[NewgroundsAPI NOTICE] :: ' + m); }; v1.fatalError = function (m, c) { if (c) { m += '\r\tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } throw '***ERROR*** frame=' + _root._currentframe + ', class=NewgroundsAPI' + '\n' + '\n' + m; }; v1.sendSecureCommand = function (command, secure_params, unsecure_params, files) { if (!com.Newgrounds.NewgroundsAPI.debug && !com.Newgrounds.NewgroundsAPI.hasUserSession() && !com.Newgrounds.NewgroundsAPI.hasUserEmail()) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command)}, new com.Newgrounds.NewgroundsAPIError('IDENTIFICATION_REQUIRED', 'You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail("name@domain.com"); ) to use ' + command + '().')); return undefined; } if (!command) { com.Newgrounds.NewgroundsAPI.fatalError('Missing command', 'sendSecureCommand'); } if (!secure_params) { com.Newgrounds.NewgroundsAPI.fatalError('Missing secure_params', 'sendSecureCommand'); } if (!unsecure_params) { unsecure_params = new Object(); } var v2 = ''; var v1 = 0; while (v1 < 16) { v2 += com.Newgrounds.NewgroundsAPI.compression_radix.charAt(Math.floor(Math.random() * com.Newgrounds.NewgroundsAPI.compression_radix.length)); ++v1; } if (com.Newgrounds.NewgroundsAPI.debug) { secure_params.session_id = ''; } else { secure_params.session_id = com.Newgrounds.NewgroundsAPI.session_id; } secure_params.as_version = 2; secure_params.user_email = com.Newgrounds.NewgroundsAPI.user_email; secure_params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; secure_params.seed = v2; secure_params.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command); var v8 = com.Newgrounds.MD5.calculate(v2); var v6 = com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), com.Newgrounds.NewgroundsAPI.encryption_key); var v7 = v8 + v6; unsecure_params.secure = com.Newgrounds.NewgroundsAPI.compressHex(v7); com.Newgrounds.NewgroundsAPI.sendCommand('securePacket', unsecure_params, false, files); }; v1.sendCommand = function (command, params, open_browser, files) { if (!com.Newgrounds.NewgroundsAPI.connected and command != 'connectMovie') { var v11 = 'NewgroundsAPI.' + command + '() - NewgroundsAPI.connectMovie() must be called before this command can be called' + '\n'; com.Newgrounds.NewgroundsAPI.fatalError(v11, 'connectMovie'); } if (open_browser) { var v1 = new Object(); } else { var v1 = new LoadVars(); } v1.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command); v1.tracker_id = com.Newgrounds.NewgroundsAPI.movie_id; if (com.Newgrounds.NewgroundsAPI.debug) { v1.debug = com.Newgrounds.NewgroundsAPI.debug; } if (params) { for (var v8 in params) { v1[v8] = params[v8]; } } if (files) { for (v8 in files) { v1[v8] = files[v8]; } } com.Newgrounds.NewgroundsAPI.echo('OUTPUT: \r' + com.Newgrounds.JSON.encode(v1) + '\n'); if (open_browser) { var v5 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(); for (v8 in v1) { v5 += '&' + escape(v8) + '=' + escape(v1[v8]); } getURL(v5, '_blank'); v1.removeMovieClip(); } else { var v9 = new LoadVars(); v9.onData = function (data) { com.Newgrounds.NewgroundsAPI.echo('INPUT: \r' + data + '\n'); if (data) { var v1 = com.Newgrounds.JSON.decode(data); } else { var v1 = {'success': false}; } if (!v1.success) { var v3 = new com.Newgrounds.NewgroundsAPIError(v1.error_code, v1.error_msg); com.Newgrounds.NewgroundsAPI.sendError(v1, v3); } else { com.Newgrounds.NewgroundsAPI.doEvent(v1); } }; var v4 = new Array(); for (var v7 in v1) { v4.push(v7 + '=' + escape(v1[v7])); } com.Newgrounds.NewgroundsAPI.echo('POST ' + com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?' + v4.join('&')); v1.sendAndLoad(com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(), v9, 'POST'); } }; v1.renderAd = function (target) { if (com.Newgrounds.NewgroundsAPI.ad_swf_url) { target.background = target.createEmptyMovieClip('background', 100); target.background.beginFill(0); target.background.moveTo(0, 0); target.background.lineTo(300, 0); target.background.lineTo(300, 250); target.background.lineTo(0, 250); target.background.lineTo(0, 0); target.background.endFill(); target.mask = target.createEmptyMovieClip('mask', 101); target.mask.beginFill(0); target.mask.moveTo(0, 0); target.mask.lineTo(300, 0); target.mask.lineTo(300, 250); target.mask.lineTo(0, 250); target.mask.lineTo(0, 0); target.mask.endFill(); target.clip = target.createEmptyMovieClip('clip', 102); target.clip.ad = target.clip.createEmptyMovieClip('ad', 100); target.clip.setMask(target.mask); loadMovie(com.Newgrounds.NewgroundsAPI.ad_swf_url, target.clip.ad); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, true, null, target); } else { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', 'Unable to render ad')); } }; v1.attachFlashAd = function (target) { System.security.allowDomain('http://server.cpmstar.com'); System.security.allowDomain('http://www.cpmstar.com'); System.security.allowDomain('https://server.cpmstar.com'); System.security.allowDomain('https://www.cpmstar.com'); System.security.allowInsecureDomain('http://server.cpmstar.com'); System.security.allowInsecureDomain('http://www.cpmstar.com'); System.security.allowInsecureDomain('https://server.cpmstar.com'); System.security.allowInsecureDomain('https://www.cpmstar.com'); com.Newgrounds.NewgroundsAPI.sendMessage('You may get a security sandbox violation from this ad. This is nothing to worry about!'); if (com.Newgrounds.NewgroundsAPI.resetAdTimer()) { if (com.Newgrounds.NewgroundsAPI.ad_url) { var v1 = new LoadVars(); v1.onData = function (data) { if (data) { com.Newgrounds.NewgroundsAPI.ad_swf_url = data; } else { com.Newgrounds.NewgroundsAPI.ad_swf_url = null; } com.Newgrounds.NewgroundsAPI.renderAd(target); }; if (com.Newgrounds.NewgroundsAPI.ad_url.indexOf('?') > -1) { v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '&random=' + Math.random()); } else { v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '?random=' + Math.random()); } } } else { com.Newgrounds.NewgroundsAPI.renderAd(target); } }; v1.resetAdTimer = function () { if (!com.Newgrounds.NewgroundsAPI.ad_url) { return false; } var v1 = new Date(); if (v1.getTime() >= com.Newgrounds.NewgroundsAPI.ad_reset) { com.Newgrounds.NewgroundsAPI.ad_reset = v1.getTime() + 300000; return true; } return false; }; v1.sendMessage = function (m, r) { var v1 = '[NewgroundsAPI] :: ' + m; if (r) { return v1; } else { trace(v1); } }; v1.echo = function (m) { if (com.Newgrounds.NewgroundsAPI.do_echo) { trace(m); } }; v1.do_echo = false; v1.GATEWAY_URL = 'http://www.ngads.com/gateway_v2.php'; v1.AD_TERMS_URL = 'http://www.newgrounds.com/wiki/flashads/terms/'; v1.COMMANDS_WIKI_URL = 'http://www.newgrounds.com/wiki/flashapi/commands/'; v1.ad_reset = 0; v1.save_file = null; v1.medals = null; v1.score_page_counts = new Object(); v1.compression_radix = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X'; v1.compressor = new com.Newgrounds.BaseN(com.Newgrounds.NewgroundsAPI.compression_radix); v1.errors = com.Newgrounds.NewgroundsAPIError.init_codes(); v1.sharedObjects = new Object(); v1.events = {'MOVIE_CONNECTED': 1, 'ADS_APPROVED': 2, 'AD_ATTACHED': 3, 'HOST_BLOCKED': 4, 'NEW_VERSION_AVAILABLE': 5, 'EVENT_LOGGED': 6, 'SCORE_POSTED': 7, 'SCORES_LOADED': 8, 'MEDAL_UNLOCKED': 9, 'MEDALS_LOADED': 10, 'FILE_PRIVS_LOADED': 11, 'FILE_SAVED': 12}; v1.listeners = com.Newgrounds.NewgroundsAPI.setDefaultListeners(); v1.periods = com.Newgrounds.NewgroundsAPI.getPeriodAliases(); v1.period_aliases = {'t': {'name': 'Today', 'alias': 'TODAY'}, 'p': {'name': 'Yesterday', 'alias': 'YESTERDAY'}, 'w': {'name': 'This Week', 'alias': 'THIS_WEEK'}, 'm': {'name': 'This Month', 'alias': 'THIS_MONTH'}, 'y': {'name': 'This Year', 'alias': 'THIS_YEAR'}, 'a': {'name': 'All-Time', 'alias': 'ALL_TIME'}}; ASSetPropFlags(com.Newgrounds.NewgroundsAPI.prototype, null, 1); } #endinitclip } movieClip 2579 __Packages.com.Newgrounds.NewgroundsAPISaveFile { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPISaveFile) { var v1 = function (tracker_id, folder, filename) { this.tracker_id = tracker_id; this.folder = folder; this.filename = filename; this.contents = null; this.thumbnail = null; this.icon_url = null; this.thumbnail_url = null; }; com.Newgrounds.NewgroundsAPISaveFile = v1; var v2 = v1.prototype; v2.setDescription = function (description) { this.description = description; }; v2.setShared = function (share) { this.share = share; }; v2.setContents = function (contents) { this.contents = contents; }; v2.setThumbnail = function (thumb) { if (thumb) { this.thumbnail = thumb; } else { this.thumbnail = null; } }; v2.onError = function (msg) { trace('[NewgroundsAPISaveFile ERROR] :: ' + msg); }; v2.onCancel = function (msg) { trace('[NewgroundsAPISaveFile] :: ' + msg); }; v2.submit = function () { this.scan = null; com.Newgrounds.NewgroundsAPI.checkFilePrivs(this.folder, this.filename); }; v2.checkPrivs = function (p) { if (p.success) { if (p.can_write) { this.can_write = p.can_write; if (p.exists) { com.Newgrounds.NewgroundsAPI.getConfirmation('saveFile', com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, 'File \'' + this.filename + '\' exists, overwrite?', this, 'startFile', 'cancelFile'); } else { this.startFile(); } } else { this.onError('This filename is owned by another user.'); } } else { this.onError('There was a problem looking up your file\'s details'); } }; v2.cancelFile = function () { this.onCancel('Overwrite was cancelled'); }; v2.startFile = function () { if (this.can_write) { if (this.thumbnail) { this.scanner = new com.Newgrounds.ImageScanner(this.thumbnail); this.scanner.setCallback(this, 'writeFile'); this.scanner.startScan(100, 100, true); } else { this.writeFile(); } } else { this.onError('You cannot write to filename "' + this.filename + '"'); } }; v2.writeFile = function (img) { trace('FINISHED'); com.Newgrounds.NewgroundsAPI.finishFileSave(this.folder, this.filename, this.description, this.share, com.Newgrounds.JSON.encode(this.contents), img); }; v2.can_write = false; v2.share = true; ASSetPropFlags(com.Newgrounds.NewgroundsAPISaveFile.prototype, null, 1); } #endinitclip } movieClip 2580 __Packages.com.Newgrounds.ImageScanner { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.ImageScanner) { var v1 = function (the_source) { if (the_source) { this.image_source = the_source; } else { this.image_source = _root; } this.reset(); if (typeof this.image_source == 'movieclip') { if (this.image_source == _root) { this.source_width = Stage.width; this.source_height = Stage.height; } else { this.source_width = Math.floor(this.image_source._width); this.source_height = Math.floor(this.image_source._height); } this.sourceBitmap = new flash.display.BitmapData(this.source_width, this.source_height, false, 4294967295.0); this.sourceBitmap.draw(_root); } else { if (this.image_source.width) { this.source_width = this.image_source.width; this.source_height = this.image_source.height; this.sourceBitmap = this.image_source; } else { this.error('You can only use BitMaptData and MovieClip objects to create images'); } } }; com.Newgrounds.ImageScanner = v1; var v2 = v1.prototype; v2.setCallback = function (target, funct) { if (target && funct) { this.callback_target = target; this.callback_function = funct; } }; v2.reset = function () { this.callback_target = null; this.callback_function = null; this.debug.bad_pixels = 0; this.hash = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&'; var v3 = Math.pow(this.hash.length, 2); trace('MAX COLORS: ' + v3); var v2 = Math.floor(Math.pow(v3, 0.3333333333333333)) - 1; var v4 = Math.pow(v2, 3); this.cube = v2; this.basen = new com.Newgrounds.BaseN(this.hash); this.xpos = 0; this.ypos = 0; this.pixels = 0; this.busy = false; }; v2.startScan = function (w, h, s) { if (w) { this.image_width = w; } if (h) { this.image_height = h; } if (s != undefined) { this.crop = s; } var v7 = _root.getNextHighestDepth(); var v6 = _root.createEmptyMovieClip('API_image_container_' + v7, v7); var v5 = v6.createEmptyMovieClip('canvas', 100); v5.attachBitmap(this.sourceBitmap, 100); if (this.crop) { if (this.image_width / this.source_width > this.image_height / this.source_height) { this.canvas_width = this.image_width; this.canvas_height = Math.ceil(this.source_height * (this.image_width / this.source_width)); } else { this.canvas_height = this.image_height; this.canvas_width = Math.ceil(this.source_width * (this.image_height / this.source_height)); } } else { this.canvas_width = this.image_width; this.canvas_height = this.image_height; } v5._x = Math.round((this.image_width - this.canvas_width) / 2); v5._width = this.canvas_width; v5._height = this.canvas_height; this.resizedBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); this.resizedBitmap.draw(v6); v6.removeMovieClip(); this.copyBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); var v3 = '' + this.image_width; while (v3.length < 3) { v3 = '0' + v3; } var v4 = '' + this.image_height; while (v4.length < 3) { v4 = '0' + v4; } this.output = v3 + v4; this.draw_interval = setInterval(this, 'drawChunk', 10); this.busy = false; return this.resizedBitmap; }; v2.getBitmapData = function () { return this.copyBitmap; }; v2.getBytesTotal = function () { return this.image_width * this.image_height * 2; }; v2.getBytesScanned = function () { return this.pixels * 2; }; v2.drawChunk = function () { if (!this.busy) { this.busy = true; var v2 = 0; while (v2 < 250) { if (!this.nextPixel()) { clearInterval(this.draw_interval); this.callback_interval = setInterval(this, 'doCallback', 25); this.busy = true; break; } ++v2; } this.busy = false; } }; v2.doCallback = function () { this.busy = false; clearInterval(this.callback_interval); if (this.callback_target and this.callback_function) { this.callback_target[this.callback_function](this.output); } else { this.onScanComplete(this.output); } }; v2.onScanComplete = function (packet) { this.sendMessage('packet size: ' + this.output.length + ' bytes', 'onScanComplete'); }; v2.nextPixel = function () { var v15 = this.xpos; var v14 = this.ypos; var v7 = this.resizedBitmap.getPixel(v15, v14); var v17 = v7 >> 16 & 255; var v20 = v7 >> 8 & 255; var v16 = v7 >> 0 & 255; var v11 = Math.round(((v17 + 1) / 256) * this.cube); var v10 = Math.round(((v20 + 1) / 256) * this.cube); var v13 = Math.round(((v16 + 1) / 256) * this.cube); var v12 = v11 * (this.cube + 1) * (this.cube + 1) + v10 * (this.cube + 1) + v13; var v6 = this.basen.encode(v12, 2); this.output += v6; if (v6.length != 2) { trace('bad pixel ' + v6); } var v5 = this.basen.decode(v6); var v18 = v5; var v8 = v5 % (this.cube + 1); v5 = (v5 - v8) / (this.cube + 1); var v9 = v5 % (this.cube + 1); var v19 = (v5 - v9) / (this.cube + 1); if (v13 != v8 and v10 != v9 and v11 != v10) { ++this.debug.bad_pixels; trace('BAD PIXEL ' + this.debug.bad_pixels + ') ' + v12 + ' != ' + v18 + ' ' + v6); trace(this.basen.debug.lastencode); } var v2 = (Math.round((v19 / this.cube) * 255)).toString(16); var v4 = (Math.round((v9 / this.cube) * 255)).toString(16); var v3 = (Math.round((v8 / this.cube) * 255)).toString(16); while (v2.length < 2) { v2 = '0' + v2; } while (v4.length < 2) { v4 = '0' + v4; } while (v3.length < 2) { v3 = '0' + v3; } this.copyBitmap.setPixel(v15, v14, Number('0x' + v2 + v4 + v3)); ++this.pixels; if (this.pixels >= this.image_width * this.image_height) { return false; } ++this.xpos; if (this.xpos >= this.image_width) { this.xpos = 0; ++this.ypos; } return true; }; v2.error = function (e, f) { this.sendMessage(e, f, 'ERROR'); }; v2.sendMessage = function (msg, func, type) { var v1 = 'ImageScanner'; if (func) { v1 += '.' + func + '()'; } if (type) { v1 = type + ' in ' + v1; } v1 += ' :: ' + msg; trace(v1); }; v2.image_width = 100; v2.image_height = 100; v2.crop = true; v2.debug = new Object(); ASSetPropFlags(com.Newgrounds.ImageScanner.prototype, null, 1); } #endinitclip } movieClip 2581 __Packages.com.Newgrounds.JSON { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.JSON) { var v1 = function () {}; com.Newgrounds.JSON = v1; var v2 = v1.prototype; v1.encode = function (arg, noquotes) { var v3; var v2; var v6; var v1 = ''; var v4; if (arg.isSServerVar()) { var v8 = 'sservervariable'; } else { var v8 = typeof arg; } switch (v8) { return 'null'; case 'sservervariable': return '?' + arg.getEncodedValue(); break; case 'object': if (arg) { if (arg instanceof Array) { v2 = 0; while (v2 < arg.length) { v4 = com.Newgrounds.JSON.encode(arg[v2]); if (v1) { v1 += ','; } v1 += v4; ++v2; } return '[' + v1 + ']'; } else { if (typeof arg.toString != 'undefined') { for (v2 in arg) { v4 = arg[v2]; if (typeof v4 != 'undefined' && typeof v4 != 'function') { v4 = com.Newgrounds.JSON.encode(v4); if (v1) { v1 += ','; } v1 += com.Newgrounds.JSON.encode(v2) + ':' + v4; } } return '{' + v1 + '}'; } } } return 'null'; case 'number': return isFinite(arg) ? String(arg) : 'null'; case 'string': v6 = arg.length; if (noquotes) { var v7 = ''; } else { var v7 = '"'; } v1 = v7; v2 = 0; while (v2 < v6) { v3 = arg.charAt(v2); if (v3 >= ' ') { if (v3 == '\\' || v3 == '"') { v1 += '\\'; } v1 += v3; } else { switch (v3) { case '\b': v1 += '\\b'; break; case '\f': v1 += '\\f'; break; case '\n': v1 += '\\n'; break; case '\r': v1 += '\\r'; break; case '\t': v1 += '\\t'; break; default: v3 = v3.charCodeAt(); v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16); } } v2 += 1; } return v1 + v7; case 'boolean': return String(arg); default: return 'null'; } }; v1.decode = function (text) { var at = 0; var ch = ' '; var _value; var _error = function (m) { throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text}; }; var _next = function () { ch = text.charAt(at); at += 1; return ch; }; var _white = function () { while (ch) { if (ch <= ' ') { _next(); } else { if (ch == '/') { switch (_next()) { case '/': for (;;) { if (!(_next() && ch != '\n' && ch != '\r')) break; } break; case '*': _next(); for (;;) { if (ch) { if (ch == '*') { if (_next() == '/') { _next(); break; } } else { _next(); } continue; } _error('Unterminated comment'); } break; default: _error('Syntax error'); } } else { break; } } } }; var _string = function () { var v4; var v1 = ''; var v3; var v2; var v5 = false; if (ch == '"') { while (_next()) { if (ch == '"') { _next(); return v1; } else { if (ch == '\\') { switch (_next()) { case 'b': v1 += '\b'; break; case 'f': v1 += '\f'; break; case 'n': v1 += '\n'; break; case 'r': v1 += '\r'; break; case 't': v1 += '\t'; break; case 'u': v2 = 0; v4 = 0; while (v4 < 4) { v3 = parseInt(_next(), 16); if (!isFinite(v3)) { v5 = true; break; } v2 = v2 * 16 + v3; v4 += 1; } if (v5) { v5 = false; } else { v1 += String.fromCharCode(v2); break; default: v1 += ch; } } } else { v1 += ch; } } } } _error('Bad string'); }; var _array = function () { var v1 = []; if (ch == '[') { _next(); _white(); if (ch == ']') { _next(); return v1; } while (ch) { v1.push(_value()); _white(); if (ch == ']') { _next(); return v1; } else { if (ch != ',') { break; } } _next(); _white(); } } _error('Bad array'); }; var _object = function () { var v2; var v1 = {}; if (ch == '{') { _next(); _white(); if (ch == '}') { _next(); return v1; } while (ch) { v2 = _string(); _white(); if (ch != ':') { break; } _next(); v1[v2] = _value(); _white(); if (ch == '}') { _next(); return v1; } else { if (ch != ',') { break; } } _next(); _white(); } } _error('Bad object'); }; var _number = function () { var v1 = ''; var v2; if (ch == '-') { v1 = '-'; _next(); } for (;;) { if (!(ch >= '0' && ch <= '9')) break; v1 += ch; _next(); } if (ch == '.') { v1 += '.'; for (;;) { if (!(_next() && ch >= '0' && ch <= '9')) break; v1 += ch; } } v2 = 1 * v1; if (!isFinite(v2)) { _error('Bad number'); } else { return v2; } }; var _word = function () { switch (ch) { case 't': if (_next() == 'r' && _next() == 'u' && _next() == 'e') { _next(); return true; } break; case 'f': if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') { _next(); return false; } break; case 'n': if (_next() == 'u' && _next() == 'l' && _next() == 'l') { _next(); return null; } } _error('Syntax error'); }; _value = function () { _white(); switch (ch) { case '{': return _object(); case '[': return _array(); case '"': return _string(); case '-': return _number(); } return (ch >= '0' && ch <= '9') ? _number() : _word(); }; return _value(); }; ASSetPropFlags(com.Newgrounds.JSON.prototype, null, 1); } #endinitclip } movieClip 2582 __Packages.com.Newgrounds.RC4 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.RC4) { var v1 = function () {}; com.Newgrounds.RC4 = v1; var v2 = v1.prototype; v1.encrypt = function (src, key) { var v3 = com.Newgrounds.RC4.strToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return com.Newgrounds.RC4.charsToHex(v2); }; v1.encryptbin = function (src, key) { var v3 = com.Newgrounds.RC4.strToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return v2; }; v1.decrypt = function (src, key) { var v3 = com.Newgrounds.RC4.hexToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return com.Newgrounds.RC4.charsToStr(v2); }; v1.initialize = function (pwd) { var v2 = 0; var v3; var v4 = pwd.length; var v1 = 0; while (v1 <= 255) { com.Newgrounds.RC4.mykey[v1] = pwd[v1 % v4]; com.Newgrounds.RC4.sbox[v1] = v1; ++v1; } v1 = 0; while (v1 <= 255) { v2 = (v2 + com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.mykey[v1]) % 256; v3 = com.Newgrounds.RC4.sbox[v1]; com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2]; com.Newgrounds.RC4.sbox[v2] = v3; ++v1; } }; v1.calculate = function (plaintxt, psw) { com.Newgrounds.RC4.initialize(psw); var v1 = 0; var v2 = 0; var v9 = new Array(); var v7; var v5; var v6; var v3 = 0; while (v3 < plaintxt.length) { v1 = (v1 + 1) % 256; v2 = (v2 + com.Newgrounds.RC4.sbox[v1]) % 256; v5 = com.Newgrounds.RC4.sbox[v1]; com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2]; com.Newgrounds.RC4.sbox[v2] = v5; var v4 = (com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.sbox[v2]) % 256; v7 = com.Newgrounds.RC4.sbox[v4]; v6 = plaintxt[v3] ^ v7; v9.push(v6); ++v3; } return v9; }; v1.charsToHex = function (chars) { var v4 = new String(''); var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); var v1 = 0; while (v1 < chars.length) { v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15]; ++v1; } return v4; }; v1.hexToChars = function (hex) { var v3 = new Array(); var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0; while (v1 < hex.length) { v3.push(parseInt(hex.substr(v1, 2), 16)); v1 += 2; } return v3; }; v1.charsToStr = function (chars) { var v3 = new String(''); var v1 = 0; while (v1 < chars.length) { v3 += String.fromCharCode(chars[v1]); ++v1; } return v3; }; v1.strToChars = function (str) { var v3 = new Array(); var v1 = 0; while (v1 < str.length) { v3.push(str.charCodeAt(v1)); ++v1; } return v3; }; v1.sbox = new Array(255); v1.mykey = new Array(255); ASSetPropFlags(com.Newgrounds.RC4.prototype, null, 1); } #endinitclip } movieClip 2583 __Packages.com.Newgrounds.MD5 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.MD5) { var v1 = function () {}; com.Newgrounds.MD5 = v1; var v2 = v1.prototype; v1.calculate = function (src) { return com.Newgrounds.MD5.hex_md5(src); }; v1.hex_md5 = function (src) { return com.Newgrounds.MD5.binl2hex(com.Newgrounds.MD5.core_md5(com.Newgrounds.MD5.str2binl(src), src.length * 8)); }; v1.core_md5 = function (x, len) { x[len >> 5] |= 128 << len % 32; x[(len + 64 >>> 9 << 4) + 14] = len; var v4 = 1732584193; var v3 = -271733879; var v2 = -1732584194; var v1 = 271733878; var v5 = 0; while (v5 < x.length) { var v10 = v4; var v9 = v3; var v8 = v2; var v7 = v1; v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551); v4 = com.Newgrounds.MD5.safe_add(v4, v10); v3 = com.Newgrounds.MD5.safe_add(v3, v9); v2 = com.Newgrounds.MD5.safe_add(v2, v8); v1 = com.Newgrounds.MD5.safe_add(v1, v7); v5 += 16; } return new Array(v4, v3, v2, v1); }; v1.md5_cmn = function (q, a, b, x, s, t) { return com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.bit_rol(com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.safe_add(a, q), com.Newgrounds.MD5.safe_add(x, t)), s), b); }; v1.md5_ff = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t); }; v1.md5_gg = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t); }; v1.md5_hh = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t); }; v1.md5_ii = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t); }; v1.bit_rol = function (num, cnt) { return num << cnt | num >>> 32 - cnt; }; v1.safe_add = function (x, y) { var v1 = (x & 65535) + (y & 65535); var v2 = (x >> 16) + (y >> 16) + (v1 >> 16); return v2 << 16 | v1 & 65535; }; v1.str2binl = function (str) { var v3 = new Array(); var v4 = 255; var v1 = 0; while (v1 < str.length * 8) { v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32; v1 += 8; } return v3; }; v1.binl2hex = function (binarray) { var v4 = new String(''); var v3 = new String('0123456789abcdef'); var v1 = 0; while (v1 < binarray.length * 4) { v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15); ++v1; } return v4; }; ASSetPropFlags(com.Newgrounds.MD5.prototype, null, 1); } #endinitclip } movieClip 2584 __Packages.ScreenOverlay { #initclip if (!_global.ScreenOverlay) { var v1 = function (parent) { if (parent == null) { parent = _root; } this._scale = 1; this._scaleMatrix = new flash.geom.Matrix(this._scale, 0, 0, this._scale, 0, 0); this._inverseScaleMatrix = new flash.geom.Matrix(1 / this._scale, 0, 0, 1 / this._scale, 0, 0); this._overlayContainerMatrix = new flash.geom.Matrix(); this._overlayClips = []; this._overlayParent = parent; this.createBitmaps(parent); this._overlayMatrix = new flash.geom.Matrix(); this._overlayColorTransform = new flash.geom.ColorTransform(); this._overlayBlendMode = 'normal'; this._overlayFilter = null; this._onTop = true; this._accumulate = true; this._iterations = 1; this._overlayFunction = null; this._overlayDepth = ScreenOverlay._curOverlayDepth; ++ScreenOverlay._curOverlayDepth; this._drawMatrix = new flash.geom.Matrix(); this._drawColorTransform = new flash.geom.ColorTransform(); ScreenOverlay._screenOverlays.push(this); }; _global.ScreenOverlay = v1; var v2 = v1.prototype; v2.start = function () { this._started = true; this._overlayDisplay.fillRect(this._overlayDisplay.rectangle, 0); }; v2.stop = function () { this._started = false; this._overlayContainer._visible = false; }; v2.setClipsVisible = function (b) { var v2 = 0; while (v2 < this._overlayClips.length) { this._overlayClips[v2]._visible = b; ++v2; } }; v2.__get__started = function () { return this._started; }; v2.__get__overlayClips = function () { return this._overlayClips; }; v2.__set__overlayClips = function (a) { if (!a) { a = []; } this._overlayClips = a; return this.__get__overlayClips(); }; v2.__get__overlayMatrix = function () { return this._overlayMatrix; }; v2.__set__overlayMatrix = function (m) { this._overlayMatrix = m; return this.__get__overlayMatrix(); }; v2.__get__overlayColorTransform = function () { return this._overlayColorTransform; }; v2.__set__overlayColorTransform = function (c) { this._overlayColorTransform = c; return this.__get__overlayColorTransform(); }; v2.__get__overlayBlendMode = function () { return this._overlayBlendMode; }; v2.__set__overlayBlendMode = function (b) { this._overlayBlendMode = b; return this.__get__overlayBlendMode(); }; v2.__get__overlayFilter = function () { return this._overlayFilter; }; v2.__set__overlayFilter = function (f) { this._overlayFilter = f; return this.__get__overlayFilter(); }; v2.__get__overlayFunction = function () { return this._overlayFunction; }; v2.__set__overlayFunction = function (f) { this._overlayFunction = f; return this.__get__overlayFunction(); }; v2.__get__overlayParent = function () { return this._overlayParent; }; v2.__set__overlayParent = function (m) { this._overlayParent = m; this.createBitmaps(this._overlayParent); return this.__get__overlayParent(); }; v2.__get__accumulate = function () { return this._accumulate; }; v2.__set__accumulate = function (b) { this._accumulate = b; return this.__get__accumulate(); }; v2.__get__iterations = function () { return this._iterations; }; v2.__set__iterations = function (n) { this._iterations = Math.floor(n); if (this._iterations < 1) { this._iterations = 1; } return this.__get__iterations(); }; v2.__get__scale = function () { return this._scale; }; v2.__set__scale = function (n) { this._scale = n; if (this._scale < 0.1) { this._scale = 0.1; } if (this._scale > 1) { this._scale = 1; } this._scaleMatrix = new flash.geom.Matrix(this._scale, 0, 0, this._scale, 0, 0); this._inverseScaleMatrix = new flash.geom.Matrix(1 / this._scale, 0, 0, 1 / this._scale, 0, 0); this.createBitmaps(this._overlayParent); return this.__get__scale(); }; v2.resetParameters = function () { this._overlayColorTransform = new flash.geom.ColorTransform(); this._overlayMatrix = new flash.geom.Matrix(); this._overlayFilter = null; this._overlayBlendMode = 'normal'; this._overlayFunction = null; this._iterations = 1; this._accumulate = true; }; v2.createBitmaps = function (parent) { if (this._overlayDisplay) { this._overlayDisplay.dispose(); } if (this._overlayBuffer) { this._overlayBuffer.dispose(); } if (this._overlayContainer) { this._overlayContainer.removeMovieClip(); } this._overlayDisplay = new flash.display.BitmapData(Math.ceil(Stage.width * this._scale), Math.ceil(Stage.height * this._scale), true, 0); this._overlayBuffer = new flash.display.BitmapData(Math.ceil(Stage.width * this._scale), Math.ceil(Stage.height * this._scale), true, 0); this._overlayContainer = parent.createEmptyMovieClip('overlay', this._overlayDepth); this._overlayContainer.attachBitmap(this._overlayDisplay, 0, 'auto', true); }; v1.tick = function () { var v1 = 0; while (v1 < ScreenOverlay._screenOverlays.length) { ScreenOverlay._screenOverlays[v1].render(); ++v1; } }; v2.drawClip = function (clip, buffer) { var v2 = clip.transform.concatenatedMatrix; v2.concat(this._scaleMatrix); buffer.draw(clip, v2); }; v2.render = function () { if (!this._started) { return undefined; } this._overlayContainer._visible = false; this._overlayContainerMatrix.identity(); this._overlayContainerMatrix.concat(this._inverseScaleMatrix); var v3 = this._overlayParent.transform.concatenatedMatrix; v3.invert(); this._overlayContainerMatrix.concat(v3); this._overlayContainer.transform.matrix = this._overlayContainerMatrix; this._overlayDisplay.fillRect(this._overlayDisplay.rectangle, 0); if (!this._accumulate) { this._overlayBuffer.fillRect(this._overlayBuffer.rectangle, 0); var v2 = 0; while (v2 < this._overlayClips.length) { this.drawClip(this._overlayClips[v2], this._overlayBuffer); ++v2; } } this._drawMatrix.a = 1; this._drawMatrix.b = 0; this._drawMatrix.c = 0; this._drawMatrix.d = 1; this._drawMatrix.tx = 0; this._drawMatrix.ty = 0; this._drawColorTransform.alphaMultiplier = 1; this._drawColorTransform.redMultiplier = 1; this._drawColorTransform.greenMultiplier = 1; this._drawColorTransform.blueMultiplier = 1; this._drawColorTransform.alphaOffset = 0; this._drawColorTransform.redOffset = 0; this._drawColorTransform.greenOffset = 0; this._drawColorTransform.blueOffset = 0; if (this._overlayFunction) { this._overlayFunction(this._overlayBuffer); } v2 = 0; while (v2 < this._iterations) { this._drawMatrix.translate(-Stage.width / 2, -Stage.height / 2); this._drawMatrix.concat(this._overlayMatrix); this._drawMatrix.translate(Stage.width / 2, Stage.height / 2); this._drawColorTransform.concat(this._overlayColorTransform); if (this._overlayFilter) { this._overlayBuffer.applyFilter(this._overlayBuffer, this._overlayBuffer.rectangle, ScreenOverlay.ORIGIN, this._overlayFilter); } this._overlayDisplay.draw(this._overlayBuffer, this._drawMatrix, this._drawColorTransform, this._overlayBlendMode, this._overlayDisplay.rectangle, true); ++v2; } if (this._accumulate) { this._overlayBuffer.fillRect(this._overlayBuffer.rectangle, 0); v2 = 0; while (v2 < this._overlayClips.length) { this.drawClip(this._overlayClips[v2], this._overlayBuffer); ++v2; } this._overlayBuffer.copyPixels(this._overlayDisplay, this._overlayDisplay.rectangle, ScreenOverlay.ORIGIN, null, null, true); } this._overlayContainer._visible = true; }; v2.dispose = function () { stop(); var v2 = 0; while (v2 < ScreenOverlay._screenOverlays.length) { if (ScreenOverlay._screenOverlays[v2] == this) { ScreenOverlay._screenOverlays.splice(v2, 1); break; } ++v2; } if (this._overlayDisplay) { this._overlayDisplay.dispose(); } if (this._overlayBuffer) { this._overlayBuffer.dispose(); } if (this._overlayContainer) { this._overlayContainer.removeMovieClip(); } this._overlayClips = []; this._overlayDisplay = null; this._overlayBuffer = null; this._overlayContainer = null; this._overlayMatrix = null; this._drawMatrix = null; this._overlayParent = null; this._overlayColorTransform = null; this._overlayFilter = null; this._overlayFunction = null; this._scaleMatrix = null; this._inverseScaleMatrix = null; this._overlayContainerMatrix = null; }; v1._screenOverlays = []; v2._overlayDepth = 9999990; v1._curOverlayDepth = 999990; v1.ORIGIN = new flash.geom.Point(); v2.addProperty('accumulate', v2.__get__accumulate, v2.__set__accumulate); v2.addProperty('iterations', v2.__get__iterations, v2.__set__iterations); v2.addProperty('overlayBlendMode', v2.__get__overlayBlendMode, v2.__set__overlayBlendMode); v2.addProperty('overlayClips', v2.__get__overlayClips, v2.__set__overlayClips); v2.addProperty('overlayColorTransform', v2.__get__overlayColorTransform, v2.__set__overlayColorTransform); v2.addProperty('overlayFilter', v2.__get__overlayFilter, v2.__set__overlayFilter); v2.addProperty('overlayFunction', v2.__get__overlayFunction, v2.__set__overlayFunction); v2.addProperty('overlayMatrix', v2.__get__overlayMatrix, v2.__set__overlayMatrix); v2.addProperty('overlayParent', v2.__get__overlayParent, v2.__set__overlayParent); v2.addProperty('scale', v2.__get__scale, v2.__set__scale); v2.addProperty('started', v2.__get__started, function () {}); ASSetPropFlags(_global.ScreenOverlay.prototype, null, 1); } #endinitclip } movieClip 789 { frame 1 { stop(); } } frame 3 { s_shotgun = new Sound(); s_shotgun.attachSound('sound_shotgun1.wav'); s_explosion2 = new Sound(); s_explosion2.attachSound('sound_BANG.wav'); s_steam = new Sound(); s_steam.attachSound('sound_steam.wav'); s_song3.s_song3 = new Sound(s_song3); s_song3.s_song3.attachSound('234285_Hopeku'); stop(); } movieClip 792 { } movieClip 795 { } movieClip 796 { } movieClip 801 { } movieClip 804 { } movieClip 805 { } movieClip 811 { } movieClip 832 { frame 55 { stop(); } } movieClip 833 { frame 56 { stop(); } } movieClip 837 { } movieClip 840 { } movieClip 844 { } button 845 { on (release) { gotoAndPlay('go'); } } movieClip 849 { } button 851 { on (release) { com.Newgrounds.NewgroundsAPI.loadCustomLink('Madness'); } } movieClip 855 { } button 856 { on (release) { com.Newgrounds.NewgroundsAPI.loadNewgrounds(); } } movieClip 860 { } button 861 { on (release) { gotoAndPlay('credits'); } } movieClip 865 { } button 866 { on (release) { gotoAndPlay('gallery'); } } button 870 { on (release) { getURL('http://tomfulp.newgrounds.com', '_blank'); } } button 871 { on (release) { getURL('http://mindchamber.newgrounds.com', '_blank'); } } button 872 { on (release) { getURL('http://krinkels.newgrounds.com', '_blank'); } } button 873 { on (release) { _parent.vol = 0; _root.s_song3.s_song3.setVolume(_parent.vol); getURL('http://www.newgrounds.com/audio/listen/56173', '_blank'); } } button 874 { on (release) { _parent.vol = 0; _root.s_song3.s_song3.setVolume(_parent.vol); getURL('http://www.newgrounds.com/audio/listen/234285', '_blank'); } } button 875 { on (release) { _parent.vol = 0; _root.s_song3.s_song3.setVolume(_parent.vol); getURL('http://www.newgrounds.com/audio/listen/103721', '_blank'); } } button 876 { on (release) { _parent.vol = 0; _root.s_song3.s_song3.setVolume(_parent.vol); getURL('http://www.newgrounds.com/audio/listen/92334', '_blank'); } } button 877 { on (release) { _parent.vol = 0; _root.s_song3.s_song3.setVolume(_parent.vol); getURL('http://www.newgrounds.com/audio/listen/140436', '_blank'); } } button 879 { on (release) { getURL('http://mike.newgrounds.com', '_blank'); } } button 880 { on (release) { getURL('http://stamper.newgrounds.com', '_blank'); } } button 881 { on (release) { getURL('http://johnnyutah.newgrounds.com', '_blank'); } } button 882 { on (release) { getURL('http://aprilfulp.newgrounds.com', '_blank'); } } movieClip 888 { } movieClip 891 { } movieClip 903 { } movieClip 904 { } movieClip 907 { } movieClip 908 { } movieClip 910 { } movieClip 914 { } movieClip 915 { } movieClip 918 { } movieClip 922 { } movieClip 925 { } movieClip 926 { } movieClip 928 { } movieClip 929 { } movieClip 930 { } movieClip 931 { } movieClip 933 { } button 934 { on (release) { com.Newgrounds.NewgroundsAPI.loadNewgrounds(); } } movieClip 935 { } button 937 { on (release) { com.Newgrounds.NewgroundsAPI.loadCustomLink('Madness Day 2009'); } } movieClip 938 { } movieClip 941 { } button 942 { on (release) { getURL('http://www.newgrounds.com/store/product/madness-error-shirt', '_blank'); } } movieClip 945 { } button 946 { on (release) { getURL('http://www.newgrounds.com/store/product/madness-hank-shirt', '_blank'); } } button 949 { on (release) { _parent.play(); } } movieClip 952 { } button 957 { on (release) { getURL('http://www.newgrounds.com/art', '_blank'); } } button 958 { on (release) { getURL('http://www.newgrounds.com/art/view/rhunyc/hank', '_blank'); } } button 959 { on (release) { getURL('http://www.newgrounds.com/art/view/jkamovies/total-madness-2', '_blank'); } } button 960 { on (release) { getURL('http://www.newgrounds.com/art/view/kaptain-karmel/sanford', '_blank'); } } button 961 { on (release) { getURL('http://www.newgrounds.com/art/view/hyperjive/madness-day-09-collab-piece', '_blank'); } } button 962 { on (release) { getURL('http://www.newgrounds.com/art/view/rhunyc/hank-wallpaper', '_blank'); } } button 963 { on (release) { getURL('http://www.newgrounds.com/art/view/jkamovies/total-madness-1', '_blank'); } } button 964 { on (release) { getURL('http://www.newgrounds.com/art/view/rhunyc/ng-calendar-submission', '_blank'); } } button 965 { on (release) { getURL('http://www.newgrounds.com/art/view/thepsychosheep/madness-combat-fan-art', '_blank'); } } button 966 { on (release) { getURL('http://www.newgrounds.com/art/view/rhunyc/the-protagonist', '_blank'); } } button 967 { on (release) { getURL('http://www.newgrounds.com/art/view/rhunyc/hank-in-godmode', '_blank'); } } button 968 { on (release) { getURL('http://www.newgrounds.com/art/view/nekow/mad-artist', '_blank'); } } button 969 { on (release) { getURL('http://www.newgrounds.com/art/view/mindchamber/crustacean-hank', '_blank'); } } button 970 { on (release) { getURL('http://www.newgrounds.com/art/view/almightyhans/the-protagonist', '_blank'); } } button 971 { on (release) { getURL('http://www.newgrounds.com/art/view/almightyhans/the-savior', '_blank'); } } button 972 { on (release) { getURL('http://www.newgrounds.com/art/view/rhunyc/hank2', '_blank'); } } button 973 { on (release) { getURL('http://www.newgrounds.com/art/view/otaku666/l33t-dude', '_blank'); } } button 974 { on (release) { getURL('http://www.newgrounds.com/art/view/m-vero/madness-priest', '_blank'); } } button 975 { on (release) { getURL('http://www.newgrounds.com/art/view/stickdinosaur/madness-good-bad-and-ugly', '_blank'); } } movieClip 976 { } movieClip 977 { } movieClip 980 { } movieClip 981 { } movieClip 983 { } movieClip 984 { frame 2 { } frame 105 { _x = _x + 5; _y = _y - 5; } frame 105 { _root.s_shotgun.start(0, 0); var vol = 100; } frame 106 { _x = _x - 5; _y = _y + 5; } frame 107 { _x = _x + 4; _y = _y - 4; } frame 108 { _x = _x - 4; _y = _y + 4; } frame 109 { _x = _x + 3; _y = _y - 3; } frame 110 { _x = _x - 3; _y = _y + 3; } frame 111 { _x = _x + 2; _y = _y - 2; } frame 112 { _x = _x - 2; _y = _y + 2; } frame 125 { _x = _x + 5; _y = _y - 5; } frame 125 { _root.s_explosion2.start(0, 0); } frame 126 { _x = _x - 5; _y = _y + 5; } frame 127 { _x = _x + 4; _y = _y - 4; } frame 128 { _x = _x - 4; _y = _y + 4; } frame 129 { _x = _x + 3; _y = _y - 3; } frame 130 { _x = _x - 3; _y = _y + 3; } frame 131 { _x = _x + 5; _y = _y - 5; } frame 131 { _root.s_explosion2.start(0, 0); } frame 132 { _x = _x - 5; _y = _y + 5; } frame 133 { _x = _x + 4; _y = _y - 4; } frame 134 { _x = _x - 4; _y = _y + 4; } frame 135 { _x = _x + 3; _y = _y - 3; } frame 136 { _x = _x - 3; _y = _y + 3; } frame 137 { _x = _x + 5; _y = _y - 5; } frame 137 { _root.s_explosion2.start(0, 0); } frame 138 { _x = _x - 5; _y = _y + 5; } frame 139 { _x = _x + 4; _y = _y - 4; } frame 140 { _x = _x - 4; _y = _y + 4; } frame 141 { _x = _x + 3; _y = _y - 3; } frame 142 { _x = _x - 3; _y = _y + 3; } frame 143 { _x = _x + 5; _y = _y - 5; } frame 143 { _root.s_explosion2.start(0, 0); } frame 144 { _x = _x - 5; _y = _y + 5; } frame 145 { _x = _x + 4; _y = _y - 4; } frame 146 { _x = _x - 4; _y = _y + 4; } frame 147 { _x = _x + 3; _y = _y - 3; } frame 148 { _x = _x - 3; _y = _y + 3; } frame 149 { _x = _x + 5; _y = _y - 5; } frame 149 { _root.s_explosion2.start(0, 0); } frame 150 { _x = _x - 5; _y = _y + 5; } frame 151 { _x = _x + 4; _y = _y - 4; } frame 152 { _x = _x - 4; _y = _y + 4; } frame 153 { _x = _x + 3; _y = _y - 3; } frame 154 { _x = _x - 3; _y = _y + 3; } frame 155 { _x = _x + 5; _y = _y - 5; } frame 155 { _root.s_explosion2.start(0, 0); } frame 156 { _x = _x - 5; _y = _y + 5; } frame 157 { _x = _x + 4; _y = _y - 4; } frame 158 { _x = _x - 4; _y = _y + 4; } frame 159 { _x = _x + 3; _y = _y - 3; } frame 160 { _x = _x - 3; _y = _y + 3; } frame 161 { _x = _x + 5; _y = _y - 5; } frame 161 { _root.s_explosion2.start(0, 0); } frame 162 { _x = _x - 5; _y = _y + 5; } frame 163 { _x = _x + 4; _y = _y - 4; } frame 164 { _x = _x - 4; _y = _y + 4; } frame 165 { _x = _x + 3; _y = _y - 3; } frame 166 { _x = _x - 3; _y = _y + 3; } frame 167 { _x = _x + 5; _y = _y - 5; } frame 167 { _root.s_explosion2.start(0, 0); } frame 168 { _x = _x - 5; _y = _y + 5; } frame 169 { _x = _x + 4; _y = _y - 4; } frame 170 { _x = _x - 4; _y = _y + 4; } frame 171 { _x = _x + 3; _y = _y - 3; } frame 172 { _x = _x - 3; _y = _y + 3; } frame 173 { _x = _x + 5; _y = _y - 5; } frame 173 { _root.s_explosion2.start(0, 0); } frame 174 { _x = _x - 5; _y = _y + 5; } frame 175 { _x = _x + 4; _y = _y - 4; } frame 176 { _x = _x - 4; _y = _y + 4; } frame 177 { _x = _x + 3; _y = _y - 3; } frame 178 { _x = _x - 3; _y = _y + 3; } frame 179 { _x = _x + 5; _y = _y - 5; } frame 179 { _root.s_explosion2.start(0, 0); } frame 180 { _x = _x - 5; _y = _y + 5; } frame 181 { _x = _x + 4; _y = _y - 4; } frame 182 { _x = _x - 4; _y = _y + 4; } frame 183 { _x = _x + 3; _y = _y - 3; } frame 184 { _x = _x - 3; _y = _y + 3; } frame 185 { _x = _x + 2; _y = _y - 2; } frame 186 { _x = _x - 2; _y = _y + 2; } frame 214 { _root.s_steam.start(0, 0); } frame 295 { _root.s_song3.s_song3.start(0, 999); } frame 296 { stop(); } frame 323 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent.vol < 100) { _parent.vol += 4; if (_parent.vol > 100) { _parent.vol = 100; } _root.s_song3.s_song3.setVolume(_parent.vol); } } } frame 349 { gotoAndStop('menu'); } frame 376 { stop(); } frame 404 { gotoAndStop('menu'); } frame 405 { _root.s_song3.s_song3.setVolume(100); _root.s_song3.s_song3.stop(); } frame 441 { s_static.stop(); } frame 601 { _root.nextFrame(); } } frame 4 { function f_ExplosionTime(zone, range_x, range_y) { zone.hit_damage_val = 1; zone.force_y = -(20 + random(10)); zone.force_x = random(10) - 5; for (n in a_Enemies) { var v1 = a_Enemies[n]; if (v1.humanoid and v1 != zone.victim) { if (Math.abs(v1.x - zone._x) < range_x) { if (Math.abs(v1.y - zone.y) < range_y) { v1.hitby = zone; v1.fp_Hit1(v1); } } } } } function f_NewEnemy(x, y, enemy_type) { var v2 = 1; while (game.game['e' + v2]) { var v1 = game.game['e' + v2]; if (!v1.active) { v1.x = x; v1._x = x; v1.y = y; v1._y = y; v1.shot_timer = undefined; v1.shot_total_default = undefined; v1.goframe = undefined; if (enemy_type == 5) { v1.face_type = 5; v1.head_type = 1; v1.body_type = 5; } if (currentlevel == 'level1_27') { v1.gun_type = undefined; v1.phase = 1; } else { v1.gun_type = f_RandomGun(); v1.phase = 3; } v1.gotoAndStop('activate'); return v1; } ++v2; } } function f_KillEnemies() { for (var v2 in a_Enemies) { var v1 = a_Enemies[v2]; if (v1.humanoid) { v1.health = 0; v1.alive = false; f_TossInit(v1, 0, -10); } } } function f_PunchSound() { this['s_punch' + (random(2) + 1)].start(0, 0); } function f_MakeZombies() { for (n in a_EnemiesLog) { var v1 = a_EnemiesLog[n]; v1.body.gotoAndPlay('zombie'); } } function f_ShakeY(value) { if (shake_y < value) { shake_y = value; } } function f_ShakeX(value) { if (shake_x < value) { shake_x = value; } } function f_DamagePlayer(value) { p1.health -= value; if (p1.health <= 0) { p1.alive = false; p1.health = 0; } health.gotoAndPlay(2); } function f_Quality(zone) { if (Key.isDown(81)) { if (!zone.active) { zone.active = true; zone.timer = 90; if (zone.i == 1) { _quality = 'low'; zone.i = 2; zone.gotoAndStop('l'); } else { if (zone.i == 2) { _quality = 'high'; zone.i = 3; zone.gotoAndStop('h'); } else { zone.i = 1; _quality = 'medium'; zone.gotoAndStop('m'); } } } } else { zone.active = false; } } function f_SetForceX(zone, force_x) { if (zone._xscale > 0) { zone.force_x = force_x; } else { zone.force_x = -force_x; } } function f_HealthBeam(zone) { if (Math.abs(zone._x - p1.x) < 100) { if (p1.y < zone._y) { if (p1.y >= zone._y - 300) { f_Health(p1, 1); var v2 = 60 + random(40); var v3 = f_FX(zone._x - 70 + random(140), zone._y - 20, zone._y - 5, 'pixel_health', v2, v2); v3.speed_y = -(4 + random(14)); } } } } function f_GetPlayerClip(zone) { if (zone._parent._parent.container) { return zone._parent; } else { if (zone._parent._parent._parent.container) { return zone._parent._parent; } else { if (zone._parent._parent._parent._parent.container) { return zone._parent._parent._parent; } else { if (zone._parent._parent._parent._parent._parent.container) { return zone._parent._parent._parent._parent; } else { if (zone._parent._parent._parent._parent._parent._parent.container) { return zone._parent._parent._parent._parent._parent; } else { if (zone._parent._parent._parent._parent._parent._parent._parent.container) { return zone._parent._parent._parent._parent._parent._parent; } else { if (zone._parent._parent._parent._parent._parent._parent._parent._parent.container) { return zone._parent._parent._parent._parent._parent._parent._parent; } } } } } } } } function f_SetGun(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.gun_type); } function f_SetFace(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.face_type); } function f_SetBody(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.body_type); } function f_SetHand(zone) { var v1 = f_GetPlayerClip(zone); if (v1.hasgun) { zone.gotoAndStop(100); } else { zone.gotoAndStop(v1.body_type); } } function f_SetGunHand(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.body_type); } function f_SetHead(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.head_type); } function f_Gun(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.gun_type); } function f_Thruster(zone) { var v1 = f_GetPlayerClip(zone); zone.gotoAndStop(v1.thruster_type); } function f_EatHotdog(zone, u_temp) { s_eat.start(0, 0); f_DamagePlayer(-3); f_FX(u_temp.x, u_temp.y, zone.y + 10, 'plusone', 100, 100); } function f_RandomGun() { return random(6) + 1; } function f_GetGun1(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 1; zone.gun_timer = 3; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'bullet1'; zone.explosion_type = 'explosion_small'; zone.explosion2_type = 'explosion2_small'; zone.bullet_speed = 35; zone.ammo_pow = 1; zone.force_mod = 1; zone.shot_total_default = 3; if (!gun) { zone.ammo = 50; } else { zone.ammo = gun.ammo; } } function f_GetGun2(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 2; zone.gun_timer = 30; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'bullet3'; zone.explosion_type = 'explosion_small'; zone.explosion2_type = 'explosion2_small'; zone.bullet_speed = 35; zone.ammo_pow = 3; zone.force_mod = 2; zone.shot_total_default = 2; if (!gun) { zone.ammo = 8; } else { zone.ammo = gun.ammo; } } function f_GetGun3(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 3; zone.gun_timer = 2; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'bullet2'; zone.explosion_type = 'explosion_small'; zone.explosion2_type = 'explosion2_small'; zone.bullet_speed = 30; zone.ammo_pow = 1; zone.force_mod = 1; zone.shot_total_default = 3; if (!gun) { zone.ammo = 60; } else { zone.ammo = gun.ammo; } } function f_GetGun4(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 4; zone.gun_timer = 2; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'flameball'; zone.explosion_type = 'flameball_die'; zone.explosion2_type = 'flameball_die'; zone.bullet_speed = 16; zone.ammo_pow = 1; zone.force_mod = 1; zone.shot_total_default = 5; if (!gun) { zone.ammo = 100; } else { zone.ammo = gun.ammo; } } function f_GetGun5(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 5; zone.gun_timer = 99999; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'grenade'; zone.explosion_type = 'explosion_grenade'; zone.explosion2_type = 'explosion_grenade'; zone.bullet_speed = 20; zone.ammo_pow = 4; zone.force_mod = 4; zone.shot_total_default = 1; if (!gun) { zone.ammo = 12; } else { zone.ammo = gun.ammo; } } function f_GetGun6(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 6; zone.gun_timer = 20; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'bullet2'; zone.explosion_type = 'explosion_small'; zone.explosion2_type = 'explosion2_small'; zone.bullet_speed = 40; zone.ammo_pow = 2; zone.force_mod = 3; zone.shot_total_default = 1; if (!gun) { zone.ammo = 20; } else { zone.ammo = gun.ammo; } } function f_GetGun30(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 30; zone.gun_timer = 2; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'chainshot'; zone.explosion_type = 'explosion_small'; zone.explosion2_type = 'chainblood'; zone.bullet_speed = 20; zone.ammo_pow = 1; zone.force_mod = 1; s_chainsaw.s_chainsaw3.start(0, 9999); if (!gun) { zone.ammo = 999; } else { zone.ammo = gun.ammo; } } function f_GetGun31(zone, gun) { f_PlayerDropGun(zone); zone.gun_type = 31; zone.gun_timer = 2; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = 'bullet1'; zone.explosion_type = 'explosion_small'; zone.explosion2_type = 'explosion2_small'; zone.bullet_speed = 35; zone.ammo_pow = 1; zone.force_mod = 1; if (!gun) { zone.ammo = 100; } else { zone.ammo = gun.ammo; } } function f_GetGun101(zone, gun) { zone.gun_type = 101; zone.gun_timer = 2; zone.gun.gun.gun.gotoAndStop(zone.gun_type); zone.bullet_name = ''; zone.explosion_type = ''; zone.explosion2_type = ''; zone.bullet_speed = 20; zone.ammo_pow = 1; zone.force_mod = 1; } function f_InRange(zone, x_range, y_range) { if (Math.abs(zone.x - zone.prey.x) <= x_range) { if (Math.abs(zone.y - zone.prey.y) <= y_range) { return true; } } return false; } function f_EnemiesWait() { for (n in a_Enemies) { var v1 = a_Enemies[n]; v1.wait = true; } } function f_EnemiesWaitEnd() { for (n in a_Enemies) { var v1 = a_Enemies[n]; v1.wait = false; } } function f_DiagonalSpringboard(zone) { var v3 = false; for (n in a_Enemies) { var v2 = a_Enemies[n]; if (v2.platform) { if (Math.abs(v2.x - zone._x) < zone._width / 2) { if (v2.y <= zone._y) { if (v2.y >= zone._y - zone._height) { if (zone._xscale > 0) { v3 = true; if (v2._xscale < 0) { v2._xscale *= -1; } f_ForceJump(v2, 20, -38); } else { if (v2._xscale > 0) { v2._xscale *= -1; } f_ForceJump(v2, -20, -38); } } } } } } for (n in a_Players) { v2 = a_Players[n]; if (v2.platform) { if (Math.abs(v2.x - zone._x) < zone._width / 2) { if (v2.y <= zone._y) { if (v2.y >= zone._y - zone._height) { if (zone._xscale > 0) { v3 = true; if (v2._xscale < 0) { v2._xscale *= -1; } f_ForceJump(v2, 20, -38); } else { if (v2._xscale > 0) { v2._xscale *= -1; } f_ForceJump(v2, -20, -38); } } } } } } if (v3) { s_spring.start(0, 0); zone.bumper.gotoAndPlay(2); } } function f_BulletImpactSound(zone) { if (zone.texture == 100) { return undefined; } ++current_hit; if (current_hit > 3) { current_hit = 1; } if (!zone.texture) { zone.texture = level_texture; } if (zone.texture == 1) { _root['s_hit_dirt' + current_hit].start(0, 0); } else { if (zone.texture == 2) { _root['s_hit_metal' + current_hit].start(0, 0); } else { if (zone.texture == 3) { _root['s_hit_default' + current_hit].start(0, 0); } else { if (zone.texture == 4) { _root['s_bullethitbody' + (random(2) + 1)].start(0, 0); } } } } } function f_Bullet(zone) { if (zone.speed_x != 0) { var v3 = f_W(zone, zone.speed_x); if (v3 != zone.speed_x) { zone.y += zone.speed_y; zone._y = zone.y; zone.x += zone.speed_x; zone._x = zone.x; f_BulletImpactSound(zone.wall_pt); zone.gotoAndStop(zone.explosion_type); return undefined; } else { for (n in a_Slopes) { var v4 = a_Slopes[n]; var v2 = v4.w; var v7 = v4.h; var v6 = v4.x; var v5 = v4.y; if (zone.x + zone._width / 2 >= v6 - v2 and zone.x - zone._width / 2 <= v6 + v2) { if (zone.y <= v5 and zone.y >= v5 - v7) { if (v4.incline) { var v11 = 1 - (zone.y - v5) / v7; var v12 = v6 + v2 * v11; v11 = (zone.x - (v6 - v2)) / v2 * 2; var v9 = v5 - v7 * v11; } else { var v11 = 1 - Math.abs(zone.y - v5) / v7; var v12 = v6 - v2 + v2 * 2 * v11; v11 = 1 - (zone.x - (v6 - v2)) / v2 * 2; var v9 = v5 - v7 * v11; } if (zone.y > v9) { if (zone.y < v9 + Math.abs(zone.speed_x) * 3) { if (v4.incline and zone._xscale > 0 or !v4.incline and zone._xscale < 0) { f_BulletImpactSound(v4); zone.gotoAndStop(zone.explosion_type); return undefined; } } } } } } zone.x += zone.speed_x; zone._x = zone.x; } } if (zone.speed_y < 0) { if (f_BulletWallAbove(zone, zone.speed_y)) { zone.y += zone.speed_y; zone._y = zone.y; f_BulletImpactSound(zone.wall_pt); zone.gotoAndStop(zone.explosion_type); return undefined; } else { zone.y += zone.speed_y; zone._y = zone.y; } } else { if (zone.speed_y > 0) { if (f_PY(zone, zone.speed_y, false)) { f_BulletImpactSound(zone.platform); zone.gotoAndStop(zone.explosion_type); return undefined; } else { zone.y += zone.speed_y; zone._y = zone.y; } } } if (zone.owner.goodguy or zone.hitall) { for (n in a_Enemies) { v3 = a_Enemies[n]; if (f_ImpactCheck(zone, v3, zone.x, zone.y, zone.w, zone.h)) { if (zone.x < v3.x) { var v10 = v3.x - random(v3.zone._width / 2); } else { var v10 = v3.x + random(v3.zone._width / 2); } var v8 = f_FX(v10, zone.y, v3.y + 5, zone.explosion2_type, 100, 100); v8.owner = zone; v8.victim = v3; zone.gotoAndStop('remove'); f_BulletImpactSound(v3); return undefined; } } } if (!zone.owner.goodguy) { for (n in a_Players) { v3 = a_Players[n]; if (f_ImpactCheck(zone, v3, zone.x, zone.y, zone.w, zone.h)) { zone.gotoAndStop('remove'); if (zone.x < v3.x) { v10 = v3.x - random(v3.zone._width / 2); } else { v10 = v3.x + random(v3.zone._width / 2); } v8 = f_FX(v10, zone.y, v3.y + 5, zone.explosion2_type, 100, 100); v8.owner = zone; v8.victim = v3; f_BulletImpactSound(v3); return undefined; } } } if (zone.x + game_x + zone.w * 2 < -200) { if (zone.speed_x < 0) { zone.gotoAndStop('remove'); } } else { if (zone.x + game_x - zone.w * 2 > screenWidth + 200) { if (zone.speed_x > 0) { zone.gotoAndStop('remove'); } } else { if (zone.y + game_y < 0) { if (zone.speed_y < 0) { zone.gotoAndStop('remove'); } } else { if (zone.y + game_y - zone.h > screenHeight) { if (zone.speed_y > 0) { zone.gotoAndStop('remove'); } } } } } } function f_BulletWallAbove(zone, u_speed) { var v4 = false; for (n in a_Walls) { var v2 = a_Walls[n]; pw = v2.w; ph = v2.h; px = v2.x; py = v2.y; if (zone.y - zone.h + u_speed <= py) { if (zone.y + u_speed >= py - ph or zone.y - zone.h > py) { if (zone.x - zone.w < px + pw) { if (zone.x + zone.w > px - pw) { zone.wall_pt = v2; return true; } } } } } return false; } function f_ParryBullet(zone) { zone.owner = p1; zone.hitall = false; zone.success = false; zone.speed_x *= -1; zone.speed_y *= -1; zone._xscale *= -1; zone.damage_val *= 1.5; } function f_BodyFallSound() { _root['s_bodyfall' + (random(5) + 1)].start(0, 0); } function f_Shoot(zone) { u_point.x = 0; u_point.y = 0; zone.localToGlobal(u_point); var v4 = u_point.x * u_scale - game_x; var v3 = u_point.y * u_scale - game_y; var v1 = f_FX(v4, v3, v3, zone._parent.bullet_type, 100, 100); v1.fp_Parry = f_ParryBullet; v1.x = v1._x; v1.y = v1._y; v1.h = v1._height; v1.y += v1.h / 2; v1._y = v1.y; v1.damage_val = zone._parent.damage_val; v1.w = 10; v1.w2 = 2; v1.owner = zone._parent; if (zone._parent.force_y != 0) { v1.speed_x = zone._parent.force_x; v1.speed_y = zone._parent.force_y; } else { v1.speed_x = zone._parent.force_x * Math.cos(PI * zone._parent._parent._rotation); v1.speed_y = zone._parent.force_x * Math.sin(PI * zone._parent._parent._rotation); } if (v1.speed_x < 0) { v1._xscale *= -1; } } function f_EnemyShootSound() {} function f_GunSound(gun_type) { switch (gun_type) { case 1: _root['s_enemy_shoot' + (random(4) + 1)].start(0, 0); break; case 2: s_berreta.start(0, 0); break; case 3: _root['s_enemy_shoot' + (random(4) + 1)].start(0, 0); break; case 4: s_flamethrower1.start(0, 0); break; case 5: s_thwomp.start(0, 0); break; case 6: s_shotgun.start(0, 0); case 31: _root['s_shot' + current_shot].start(0, 0); } } function f_EnemyBulletPreset(zone, x, y, speed_x, speed_y, damage_val) { var v1 = f_FX(x, y, y + 1, zone.bullet_name, 100, 100); v1.x = x; v1.y = y; v1.h = v1._height; v1.w = 10; v1.w2 = 2; if (damage_val) { v1.damage_val = damage_val; } else { v1.damage_val = 1; } v1.hitall = true; v1.owner = zone; v1.speed_x = speed_x; v1.speed_y = speed_y; v1.force_x = speed_x / 2; v1.force_y = speed_y; v1.bullet = true; if (speed_x < 0) { v1._xscale *= -1; } return v1; } function f_EnemyBullet(zone, mod) { u_point.x = 0; u_point.y = 0; if (zone.gun.gun.gun.bullet_pt) { zone.gun.gun.gun.bullet_pt.localToGlobal(u_point); } else { zone.gun.gun.localToGlobal(u_point); } var v4 = u_point.x * u_scale - game_x; var v3 = u_point.y * u_scale - game_y; var v1 = f_FX(v4, v3, zone.y - 1, zone.bullet_name, 100, 100); v1.x = v1._x; v1.y = v1._y; v1.h = v1._height; v1.w = 10; v1.w2 = 2; v1.damage_val = zone.ammo_pow; v1.gun_type = zone.gun_type; v1.owner = zone; v1.speed_y = 0; v1.speed_x = 0; v1.bullet = true; v1.explosion_type = zone.explosion_type; v1.explosion2_type = zone.explosion2_type; v1.force_mod = zone.force_mod; v1.speed_x = zone.bullet_speed * Math.cos(PI * zone.gun.gun._rotation); v1.speed_y = zone.bullet_speed * Math.sin(PI * zone.gun.gun._rotation); v1.speed_x += (random(6) - 3) * 0.2; v1.speed_y += (random(6) - 3) * 0.2; if (mod) { if (Math.abs(v1.speed_x) > Math.abs(v1.speed_y)) { v1.speed_y += mod; } else { v1.speed_x += mod; } } else { if (zone.gun_type == 4) { v1.speed_x += random(6) - 3; v1.speed_y += random(6) - 3; v1.speed_x += Math.abs(zone.speed_x); } } v1.body._rotation = Math.atan2(v1.speed_y, v1.speed_x) * 180 / Math.PI; v1.line._rotation = Math.atan2(v1.speed_y, v1.speed_x) * 180 / Math.PI; if (zone._xscale < 0) { v1._xscale *= -1; v1.speed_x *= -1; } v1.force_x = v1.speed_x / 2; v1.force_y = v1.speed_y; if (v1.force_y > -10) { v1.force_y = -10; } v1.speed_x *= 3; v1.speed_y *= 3; v1.x -= v1.speed_x; v1.y -= v1.speed_y; v1._x = v1.x; v1._y = v1.y; f_Bullet(v1); v1.speed_x /= 3; v1.speed_y /= 3; } function f_TestBullet(zone, mod) { u_point.x = 0; u_point.y = 0; if (zone.gun.gun.gun.bullet_pt) { zone.gun.gun.gun.bullet_pt.localToGlobal(u_point); } else { zone.gun.gun.localToGlobal(u_point); } var v6 = u_point.x * u_scale - game_x; var v5 = u_point.y * u_scale - game_y; var v1 = f_FX(v6, v5, zone.y - 1, zone.bullet_name, 100, 100); v1.x = v1._x; v1.y = v1._y; v1.h = v1._height; v1.w = 10; v1.w2 = 2; v1.damage_val = zone.ammo_pow; v1.owner = zone; v1.gun_type = zone.gun_type; v1.speed_y = 0; v1.speed_x = 0; v1.bullet = true; v1.explosion_type = zone.explosion_type; v1.explosion2_type = zone.explosion2_type; v1.force_mod = zone.force_mod; v1.speed_x = zone.bullet_speed * Math.cos(PI * zone.gun.gun._rotation); v1.speed_y = zone.bullet_speed * Math.sin(PI * zone.gun.gun._rotation); if (mod) { if (Math.abs(v1.speed_x) > Math.abs(v1.speed_y)) { v1.speed_y += mod; } else { v1.speed_x += mod; } } else { if (zone.gun_type == 4) { v1.speed_x += random(6) - 3; v1.speed_y += random(6) - 3; v1.speed_x += Math.abs(zone.speed_x); } else { v1.speed_x += (random(6) - 3) * 0.2; v1.speed_y += (random(6) - 3) * 0.2; } } v1.body._rotation = Math.atan2(v1.speed_y, v1.speed_x) * 180 / Math.PI; v1.line._rotation = Math.atan2(v1.speed_y, v1.speed_x) * 180 / Math.PI; if (zone._xscale < 0) { v1._xscale *= -1; v1.speed_x *= -1; } v1.force_x = (v1.speed_x / 2) * v1.force_mod; v1.force_y = v1.speed_y; if (v1.force_y < 3 and v1.force_y > -12 and v1.force_mod > 1) { v1.force_y = -12; } var v4 = v1.speed_x; var v3 = v1.speed_y; v1.speed_x = v1.x - zone.x; v1.speed_y = v1.y - (zone.y - 50); v1.x -= v1.speed_x; v1.y -= v1.speed_y; v1._x = v1.x; v1._y = v1.y; f_Bullet(v1); v1.speed_x = v4; v1.speed_y = v3; } function f_Flash() { game.game.flash._x = p1.x; game.game.flash._y = p1.y; game.game.flash.gotoAndPlay(2); } function f_PickupItem(zone) { for (n in a_Players) { var v2 = a_Players[n]; if (Math.abs(zone.x - v2.x) < 60) { if (Math.abs(zone.y - v2.y) < 50) { zone.fp_Pickup(v2, zone); zone.active = false; f_ObjectPop(zone, a_Items); zone.gotoAndStop('blank'); return undefined; } } } } function f_OffScreen(zone) { if (zone.x + game_x + zone.w * 2 < 0) { return true; } else { if (zone.x + game_x - zone.w * 2 > screenWidth) { return true; } else { if (zone.y + game_y < 0) { return true; } else { if (zone.y + game_y - zone.h > screenHeight) { return true; } else { return false; } } } } } function f_ColorSwap(zone, u_color) { CharacterColor = new Color(zone); CharacterColor.setTransform(u_color); } function f_NewColor(u_color) { u_color.ra = 100; u_color.ga = 100; u_color.ba = 100; u_color.aa = 100; u_color.rb = 0; u_color.gb = 0; u_color.bb = 0; u_color.ab = 0; } function f_FlipChar(u_flipchar) { u_flipchar._xscale *= -1; } function f_PushChar(zone, new_push_speed, u_p) { var v4 = 0; if (!u_p.inrecursion) { if (zone.y - zone.h + 1 <= u_p.y) { if (zone.y - 1 >= u_p.y - u_p.h) { if (zone.x + zone.w <= u_p.x) { if (zone.x + zone.w + new_push_speed > u_p.x - u_p.w) { new_push_speed = int(f_MoveH(u_p, new_push_speed) + v4); f_UpdateWall(u_p, u_p.z_wall); f_MovePlatformH(u_p, new_push_speed); } return new_push_speed; } if (zone.x - zone.w >= u_p.x) { if (zone.x - zone.w + new_push_speed < u_p.x + u_p.w) { new_push_speed = int(f_MoveH(u_p, new_push_speed) - v4); f_UpdateWall(u_p, u_p.z_wall); f_MovePlatformH(u_p, new_push_speed); } } } } } return new_push_speed; } function f_CheckPush(zone, push_speed) { var v1 = push_speed; for (n in a_Players) { var v2 = a_Players[n]; v1 = f_PushChar(zone, v1, v2); } for (n in a_Enemies) { v2 = a_Enemies[n]; if (v2 != zone) { v1 = f_PushChar(zone, v1, v2); } } return v1; } function f_CheckEnemiesPush(zone, speed) { if (zone.pushesenemies) { if (!zone.dashing) { if (!zone.tossed) { for (n in a_EnemiesPush) { var v1 = a_EnemiesPush[n]; if (v1.platform or !zone.platform) { if (!v1.onground and v1.alive) { if (zone.y - zone.h < v1.y) { if (zone.y > v1.y - v1.h / 2) { if (!v1.platform or zone.punching) { var v5 = v1.x; var v4 = v1.x; } else { var v5 = v1.x - v1.w; var v4 = v1.x + v1.w; } if (zone.x < v5 and zone.x + speed > v1.x - v1.w) { if (v1.platform or zone.punching) { f_MoveH(v1, speed); } } else { if (zone.x > v4 and zone.x + speed < v1.x + v1.w) { if (v1.platform or zone.punching) { f_MoveH(v1, speed); } } } } } } } } } } } } function f_MoveH(zone, speed) { zone.hitwall = false; if (!zone.autowalk_timer) { speed = f_W(zone, speed); } f_CheckEnemiesPush(zone, speed); zone.x += speed; zone._x = zone.x; if (zone.z_wall) { f_UpdateWall(zone, zone.z_wall); } f_PH(zone, speed); return speed; } function f_MoveV(zone, speed) { zone.y += speed; zone._y = zone.y; if (!zone.platform and zone.prevplatformy) { f_Depth(zone, zone.prevplatformy); } else { f_Depth(zone, zone.y); } if (zone.z_platform) { f_MovePlatformV(zone, speed); } if (zone.z_wall) { f_UpdateWall(zone, zone.z_wall); } } function f_MakeGunPickup(zone) { if (zone.ammo > 0) { var v2 = f_Item(zone._x, zone._y, zone._y + 1, 'gun' + zone.gun_type, 100, 100); v2.body_type = 100; v2.ammo = zone.ammo; v2.gun_type = zone.gun_type; v2.body.ammo.text = v2.ammo; zone.gotoAndStop('blank'); } else { zone.gotoAndStop('jumpdust2'); } } function f_PlayerDropGun(zone) { if (zone.gun_type < 100) { if (zone.gun_type == 30) { s_chainsaw.s_chainsaw1.stop(); s_chainsaw.s_chainsaw3.stop(); zone.chainsawing = false; } if (zone._xscale > 0) { var v5 = -(3 + random(6)); } else { var v5 = 3 + random(6); } var v4 = -(8 + random(10)); var v3 = _root.f_ShrapnelGeneral(zone.x, zone.y - 70, zone.y + 1, v5, v4, 'gun1'); v3.bounce_limit = 2; v3.gun_type = zone.gun_type; v3.body_type = 100; v3.ammo = zone.ammo; v3._xscale = zone._xscale; v3.owner = zone; v3.fp_ShrapnelEnd = _root.f_MakeGunPickup; zone.ammo = 0; f_GetGun101(zone); } } function f_DropGun(zone) { if (zone.hasgun) { zone.hasgun = false; zone.prey = p1; if (zone._xscale > 0) { var v5 = -(3 + random(6)); } else { var v5 = 3 + random(6); } var v4 = -(8 + random(10)); var v3 = _root.f_ShrapnelGeneral(zone.x, zone.y - 70, zone.y + 1, v5, v4, 'gun1'); v3.bounce_limit = 2; v3.gun_type = zone.gun_type; v3.body_type = 100; v3.ammo = zone.ammo; v3._xscale = zone._xscale; v3.owner = zone; v3.fp_ShrapnelEnd = _root.f_MakeGunPickup; zone.phase = 1; zone.gun.gun.gun.gotoAndStop('blank'); zone.gun_type = 100; } } function f_ImpactCheck(zone, u_temp, x, y, w, h) { if (u_temp.alive and u_temp.active) { if (!u_temp.nohit and !u_temp.onground and u_temp.invincible_timer <= 0 and u_temp != zone.owner) { var v6 = u_temp._x + u_temp.zone._x; var v5 = u_temp._y + u_temp.zone._y; var v7 = u_temp.zone._width / 2; var v12 = u_temp.zone._height; if (y + h >= v5 - v12) { if (y - h <= v5) { if (x + w >= v6 - v7) { if (x - w <= v6 + v7) { if (zone._parent.fx_pt) { u_point.x = 0; u_point.y = 0; zone._parent.fx_pt.localToGlobal(u_point); var v4 = u_point.x * u_scale - game_x; var v14 = u_point.y * u_scale - game_y; if (zone.y > u_temp.y) { var v8 = zone.y + 5; } else { var v8 = u_temp.y + 5; } var v9 = 80 + random(20); if (u_temp.x > zone.owner.x) { v9 *= -1; } f_FX(v4, v14, v8, 'impact2', v9, v9); } else { var v4 = x - 10 + random(20); var v14 = y - h / 2 - 5 + random(10); if (!zone.bullet) { if (u_temp != p1) { f_FX(v4, v14, storedv8, 'impact1', storedv9, storedv9); } } } if (zone.y > u_temp.y) { var v8 = zone.y + 5; } else { var v8 = u_temp.y + 5; } if (zone.bullet and zone.gun_type == 4) { f_FX(v4, u_temp.y, v8, 'burnoff', 100, 100); } else { if (u_temp.bloodtype > 0) { var v9 = random(30) + 70; var v3 = f_FX(v4, u_temp.y, v8, 'blood', v9, v9); v3.victim = u_temp; } } v3.body._y = -60; v3.speed_x = 4 + random(6); if (u_temp._xscale < 0) { v3.speed_x *= -1; } v3.speed_y = -(1 + random(10)); v3.gravity = 0.5; if (zone.owner == p1) { if (zone.owner.platform == undefined) { if (zone.ladder == undefined) { if (zone.speed_y > 0) { if (zone.owner.speed_y > 1) { zone.owner.speed_y = 1; } } } } if (zone.bullet) { if (zone.gun_type == 30) { if (u_temp.humanoid) { f_MoveH(u_temp, zone.x - u_temp.x); f_MoveV(u_temp, zone.y + 40 - u_temp.y); u_temp.hitby.force_y = -5; u_temp.platform = undefined; } } } } else { if (u_temp == p1) { if (zone.owner.recover) { if (zone.owner.recover > p1.invincible_timer) { p1.invincible_timer = zone.owner.recover; } } } if (!zone.bullet) { zone.owner.wait_timer = 30; } } shake_x = 3; shake_y = 3; u_temp.impact_x = x; u_temp.impact_y = y; u_temp.hitby = zone; u_temp.hit_damage_val = zone.damage_val; u_temp.force_x = u_temp.hitby.force_x; u_temp.force_y = u_temp.hitby.force_y; zone.success = true; u_temp.prev_hit_timer = 2; u_temp.fp_Hit1(u_temp); return zone.success; } } } } } } return false; } function f_ImpactPoint(zone) { u_point.x = 0; u_point.y = 0; zone.localToGlobal(u_point); var v3 = u_point.x * u_scale - game_x; var v2 = u_point.y * u_scale - game_y; var v5 = (zone._width / 2) * Math.abs(zone._parent._xscale / 100); var v4 = (zone._height / 2) * (zone._parent._yscale / 100); zone.owner = zone._parent._parent; zone.owner.u_hit = false; zone.force_x = zone.owner.force_x; zone.force_y = zone.owner.force_y; zone.noturn = zone.owner.noturn; zone.damage_val = zone.owner.damage_val; zone.x = zone.owner.x; zone.y = zone.owner.y; if (zone.owner._xscale > 0) { if (zone._xscale < 0) { zone._xscale *= -1; } } else { if (zone._xscale > 0) { zone._xscale *= -1; } } if (zone._parent._parent == p1) { if (rockbreaker > 0) { if (zone._parent.fx_pt) { u_point.x = 0; u_point.y = 0; zone._parent.fx_pt.localToGlobal(u_point); var v9 = u_point.x * u_scale - game_x - 10 + random(20); var v8 = u_point.y * u_scale - game_y - 5 + random(10); } else { var v9 = v3 - 10 + random(20); var v8 = v2 - 5 + random(10); } var v7 = random(30) + 80; f_FX(v9, v8, zone.y - 1, 'pixelhit', v7, v7); } } if (zone.owner.goodguy) { for (n in a_Enemies) { var v6 = a_Enemies[n]; u_hit = f_ImpactCheck(zone, v6, v3, v2, v5, v4); if (u_hit) { zone.owner.u_hit = true; } } } else { if (zone.owner.hitall) { for (n in a_Enemies) { var v6 = a_Enemies[n]; if (v6 != zone._parent._parent and v6 != game.game.clownhead) { u_hit = f_ImpactCheck(zone, v6, v3, v2, v5, v4); if (u_hit) { zone.owner.u_hit = true; } } } } } if (!zone._parent._parent.goodguy) { for (n in a_Players) { v6 = a_Players[n]; u_hit = f_ImpactCheck(zone, v6, v3, v2, v5, v4); if (u_hit) { zone.owner.u_hit = true; } } } if (zone.owner.u_hit and zone.owner == p1) { f_PunchSound(); if (Math.abs(zone.owner.force_x) > Math.abs(zone.owner.force_y)) { shake_x = Math.abs(zone.owner.force_x) * 0.5; shake_y = Math.abs(zone.owner.force_x) * 0.5; } else { shake_x = Math.abs(zone.owner.force_y) * 0.5; shake_y = Math.abs(zone.owner.force_y) * 0.5; } f_Slowdown(17, 2); } } function f_Punch(zone) { if (!zone.midpunch) { if (Key.isDown(zone.b_punch1)) { if (zone.gun_type == 101) { if (!zone.punched1) { zone.punched1 = true; if (zone.pipe) { zone.punching = true; zone.midpunch = true; zone.gotoAndStop('pipe_punch'); } else { if (!zone.platform) { zone.punching = true; if (zone.kicks < 5) { zone.gotoAndStop('jumpkick'); } } else { if (!zone.punch1) { zone.punch1 = true; zone.gotoAndStop('punch1'); } else { zone.punch1 = false; zone.gotoAndStop('punch2'); } } } } return undefined; } if (!zone.shot1) { zone.gun.gun.gun.gun.gotoAndStop('shoot'); if (zone.gun_type == 2 or zone.gun_type == 5 or zone.gun_type == 6) { zone.shot1 = true; zone.gun.gun.gun.gun.body.gotoAndPlay(1); } ++zone.bullet_timer; if (zone.gun_type == 30) { if (!zone.chainsawing) { zone.chainsawing = true; s_chainsaw.s_chainsaw3.stop(); s_chainsaw.s_chainsaw1.start(0, 9999); } } if (zone.bullet_timer % zone.gun_timer == 0) { ++current_shot; if (current_shot > 4) { current_shot = 1; } f_GunSound(zone.gun_type); f_TestBullet(zone); if (zone.gun_type == 6) { f_TestBullet(zone, -3); f_TestBullet(zone, 3); } --zone.ammo; if (zone.ammo <= 0) { f_PlayerDropGun(zone); } } } } else { if (zone.gun_type == 30) { if (zone.chainsawing) { zone.chainsawing = false; s_chainsaw.s_chainsaw1.stop(); s_chainsaw4.start(0, 0); s_chainsaw.s_chainsaw3.start(0, 9999); } } zone.punched1 = false; zone.shot1 = false; zone.bullet_timer = zone.gun_timer - 1; } } --zone.punch1_timer; --zone.punch2_timer; } function f_ResetRotation(zone) { zone._rotation = 0; } function f_LeftRightTimers(zone) { if (Key.isDown(zone.b_left)) { if (zone.left_timer <= 0) { zone.left_last2 = zone.left_timer; zone.left_timer = 1; } else { ++zone.left_timer; } } else { if (zone.left_timer > 0) { zone.left_last = zone.left_timer; zone.left_timer = 0; } else { --zone.left_timer; } } if (Key.isDown(zone.b_right)) { if (zone.right_timer <= 0) { zone.right_last2 = zone.right_timer; zone.right_timer = 1; } else { ++zone.right_timer; } } else { if (zone.right_timer > 0) { zone.right_last = zone.right_timer; zone.right_timer = 0; } else { --zone.right_timer; } } } function f_Walk(zone) { zone.walking = false; if (zone.wait) { return undefined; } f_LeftRightTimers(zone); if (zone.left_timer > 0 and zone.left_timer > zone.right_timer) { if (zone._xscale > 0) { f_FlipChar(zone); zone.dashing = false; } if (zone.punching == false or zone.platform == undefined) { if (zone.left_last < dash_timer and zone.left_last2 > -dash_timer and !zone.punching and chronicdash > 0) { zone.left_last = dash_timer + 1; zone.dashing = true; } if (!zone.platform and zone.jump_speed_x != 0) { if (zone.jump_speed_x > 0) { --zone.jump_speed_x; if (zone.jump_speed_x < 0) { zone.jump_speed_x = 0; } } else { if (zone.jump_speed_x < 0) { ++zone.jump_speed_x; if (zone.jump_speed_x > 0) { zone.jump_speed_x = 0; } } } } else { if (zone.dashing) { zone.speed_x -= 0.5; if (zone.speed_x > 0) { zone.speed_x = 0; } if (zone.speed_x <= -zone.speed_x_dash) { zone.speed_x = -zone.speed_x_dash; } } else { zone.speed_x -= 4; if (zone.speed_x <= -zone.speed_x_max) { zone.speed_x = -zone.speed_x_max; } } if (zone.x + game_x + zone.speed_x > 0) { f_MoveH(zone, zone.speed_x); } } zone.walking = true; } } else { if (zone.speed_x < 0) { ++zone.speed_x; } } if (zone.right_timer > 0 and zone.right_timer > zone.left_timer) { if (zone._xscale < 0) { f_FlipChar(zone); zone.dashing = false; } if (zone.punching == false or zone.platform == undefined) { if (zone.right_last < dash_timer and zone.right_last2 > -dash_timer and !zone.punching and chronicdash > 0) { zone.right_last = dash_timer + 1; zone.dashing = true; } if (!zone.platform and zone.jump_speed_x != 0) { if (zone.jump_speed_x < 0) { ++zone.jump_speed_x; } } else { if (zone.dashing) { zone.speed_x += 0.5; if (zone.speed_x < 0) { zone.speed_x = 0; } if (zone.speed_x >= zone.speed_x_dash) { zone.speed_x = zone.speed_x_dash; } } else { zone.speed_x += 4; if (zone.speed_x >= zone.speed_x_max) { zone.speed_x = zone.speed_x_max; } } if (zone.x + game_x + zone.speed_x < screenWidth) { f_MoveH(zone, zone.speed_x); } } zone.walking = true; } } else { if (zone.speed_x > 0) { --zone.speed_x; } } } function f_ForceJump(zone, speed_x, speed_y, nodouble) { if (doublejump > 0 and !nodouble) { zone.jumps = doublejump + 1; } else { zone.jumps = 0; } zone.platform = undefined; zone.jumping = true; zone.speed_y = speed_y; zone.jump_speed_x = speed_x; zone.punching = false; zone.midpunch = false; zone.crouch = false; if (!zone.nojumpanim) { zone.gotoAndStop('jump1'); } } function f_SpringBoard(zone) { for (n in a_Players) { var v1 = a_Players[n]; if (v1.platform == zone.z_platform) { f_ForceJump(v1, 0, -70); } } for (n in a_Enemies) { v1 = a_Enemies[n]; if (v1.platform == zone.z_platform) { if (v1.toss_speed_x == 0) { f_ForceJump(v1, 0, -70); } else { f_TossInit(v1, v1.toss_speed_x, -70); } } } } function f_CheckJump(zone) { if (Key.isDown(zone.b_jump)) { if (zone.pressed_jump == false) { if (doublejump > 0) { if (!zone.platform and !zone.ladder) { --zone.jumps; } else { zone.jumps = doublejump + 1; } } else { zone.jumps = 0; } zone.kicks = 0; if (zone.platform != undefined or zone.ladder != undefined or zone.jumps > 0) { zone.pressed_jump = true; zone.jumping = true; if (Key.isDown(zone.b_down) and zone.platform.dropthru) { f_FX(zone.x, zone.y, zone.y + 21, 'dustpuff', 100, 100); zone.speed_y = 1; zone.y += 20; zone._y = zone.y; f_Depth(zone, zone.y); } else { if (zone.speed_y > zone.launch) { zone.speed_y = zone.launch; } } zone.punching = false; zone.midpunch = false; zone.crouch = false; zone.jump_speed_x = 0; if (!zone.nojumpanim) { if (!zone.platform and !zone.ladder and !zone.punching) { s_swing1.start(0, 0); zone.gotoAndStop('jump1_mid'); zone.body.gotoAndPlay(1); } else { s_swing6.start(0, 0); if (zone._xscale > 0) { var v2 = 100; } else { var v2 = -100; } if (zone.speed_y < 0) { if (Key.isDown(zone.b_left) or Key.isDown(zone.b_right)) { f_FX(zone.x, zone.y, zone.y + 1, 'jumpdust', v2, 100); } else { f_FX(zone.x, zone.y, zone.y + 1, 'jumpdust2', v2, 100); } } zone.gotoAndStop('jump1'); } } zone.platform = undefined; zone.ladder = undefined; } } } else { zone.pressed_jump = false; } } function f_WallHang(zone) { if (Key.isDown(zone.b_jump)) { if (zone.pressed_jump == false) { zone.pressed_jump = true; var v2 = Math.abs(zone.launch) / 2; if (zone._xscale < 0) { v2 *= -1; } zone.jumping = true; if (Key.isDown(zone.b_down)) { zone.speed_y = 1; } else { zone.speed_y = zone.launch; } zone.punching = false; zone.midpunch = false; zone.crouch = false; zone.jump_speed_x = 0; if (!zone.nojumpanim) { zone.gotoAndStop('jump1'); if (!zone.platform and !zone.ladder) { zone.body.gotoAndPlay('loop'); } } zone.platform = undefined; zone.ladder = undefined; } } else { zone.pressed_jump = false; } } function f_EndJump(zone) { f_GoFrame(zone, 'stand'); } function f_EndPunch(zone) { zone.punching = false; zone.midpunch = false; zone.dashing = false; zone.onground = false; zone.jump_speed_x = 0; if (zone.prev_hit_timer <= 0) { if (zone.pipe) { zone.gotoAndStop('pipe_idle'); } else { zone.gotoAndStop('stand'); } } } function f_GoFrame(zone, u_frame) { if (!zone.punching) { zone.gotoAndStop(u_frame); } } function f_MPRange(zone) { zone.limit_left = zone._x; zone.limit_right = zone._x + zone.range._width - zone.z_platform._width; zone.total_range = zone.limit_right - zone.limit_left; zone.speed_x_max = 15; zone._x += zone.total_range / 2 - zone.z_platform._width / 2; zone.x = zone._x; } function f_MovePlatformH(zone, u_speed) { if (zone.z_platform != undefined) { var v5 = zone.z_platform.x; f_UpdatePlatform(zone, zone.z_platform); var v4 = zone.z_platform.x - v5; for (n in a_Players) { var v2 = a_Players[n]; if (v2.platform == zone.z_platform) { f_MoveH(v2, v4); } } for (n in a_Enemies) { var v1 = a_Enemies[n]; if (v1.platform == zone.z_platform) { f_MovePlatformH(v1, f_MoveH(v1, v4)); } } } } function f_MovePlatformV(zone, u_speed) { f_UpdatePlatform(zone, zone.z_platform); if (zone.z_platform != undefined) { for (n in a_Players) { var v1 = a_Players[n]; if (v1.platform == zone.z_platform) { if (u_speed < 20) { f_MoveV(v1, u_speed); } else { v1.platform = undefined; } } else { if (u_speed < 0) { var v6 = zone.z_platform.x; var v5 = zone.z_platform.y; var v7 = zone.z_platform.w; var v8 = zone.z_platform.h; if (v1.x + v1.w2 > v6 - v7 and v1.x - v1.w2 < v6 + v7) { if (v1.y <= v5 - u_speed and v1.y >= v5 - v8) { f_AssignPlatform(v1, zone.z_platform); v1.speed_y = 0; v1.y = zone.z_platform.y; v1._y = v1.y; f_Depth(v1, v1.y); v1.prevplatformx = v1.x; v1.prevplatformy = v1.y; } } } } } for (n in a_Enemies) { var v4 = a_Enemies[n]; if (v4.platform == zone.z_platform) { if (u_speed < 5) { f_MoveV(v4, u_speed); } else { v4.platform = undefined; } } } } } function f_MovingPlatform(zone) { var v2 = 0.75 - Math.abs((zone.x - zone.limit_left) / zone.total_range - 0.5); zone.speed_x = zone.speed_x_max * v2; zone.x += zone.speed_x; zone._x = zone.x; f_MovePlatformH(zone, zone.speed_x); if (zone.x >= zone.limit_right) { if (zone.speed_x_max > 0) { zone.speed_x_max *= -1; } } else { if (zone.x <= zone.limit_left) { if (zone.speed_x_max < 0) { zone.speed_x_max *= -1; } } } } function f_WallAbove(zone, u_speed) { var v5 = false; for (n in a_Walls) { var v2 = a_Walls[n]; if (zone != v2._parent) { if (zone.passwall and v2._parent.enemypass) { } else { pw = v2.w; ph = v2.h; px = v2.x; py = v2.y; if (zone.y - zone.h + u_speed <= py) { if (zone.y + u_speed >= py - ph or zone.y - zone.h > py) { if (zone.x - zone.w < px + pw) { if (zone.x + zone.w > px - pw) { if (zone.y - zone.h <= py and zone.y > py - ph) { if (zone.pushes and v2.pushes) { f_MoveV(v2._parent, zone.y - zone.h + u_speed - v2._parent.y); } else { if (zone.y < py and v2._parent.z_platform or u_speed >= 0) { var v4 = v2._parent.z_platform.y - zone.y; zone.platform = v2._parent.z_platform; f_MoveV(zone, v4); u_speed = 0; } else { var v4 = py + zone.h + 1 - zone.y; if (f_PY(zone, v4) == false) { f_MoveV(zone, v4); } } } } zone.speed_y = 1; zone.jumping = false; v5 = true; } } } } } } } return v5; } function f_WallBelow(zone) { for (n in a_Walls) { var v2 = a_Walls[n]; if (zone != v2._parent) { if (zone.passwall and v2._parent.enemypass) { } else { pw = v2.w; ph = v2.h; px = v2.x; py = v2.y; if (zone.y - zone.h + zone.speed_y < py - 1) { if (zone.y + zone.speed_y > py - ph + 1) { if (zone.x - zone.w < px + pw - 1) { if (zone.x + zone.w > px - pw + 1) { if (zone.x > px) { if (Math.abs(zone.x - (px + pw + zone.w)) < 50) { zone.x = px + pw + zone.w; zone._x = zone.x; } } else { if (Math.abs(zone.x - (px - pw - zone.w)) < 50) { zone.x = px - pw - zone.w; zone._x = zone.x; } } } } } } } } } } function f_MoveDust(u_object, rside) { if (u_object.dust_timer <= 0) { if (u_object.platform.slope == 0) { if (rside) { f_FX(u_object.x - u_object.w / 2, u_object.y, u_object.y, 'dust1', -100, 100); } else { f_FX(u_object.x + u_object.w / 2, u_object.y, u_object.y, 'dust1', 100, 100); } u_object.dust_timer = 10; } } else { --u_object.dust_timer; } } function f_W(zone, speed) { var v7 = speed; var v5 = speed; zone.wall_pt = undefined; for (n in a_Walls) { var v2 = a_Walls[n]; if (zone != v2._parent) { if (zone.passwall and v2._parent.enemypass) { } else { var v4 = v2.w; var v10 = v2.h; var v3 = v2.x; var v9 = v2.y; if (zone.y - zone.h < v9 - 1) { if (zone.y >= v9 - v10 + 1) { if (zone.x + zone.w <= v3 + v4) { if (zone.x + zone.w + speed >= v3 - v4) { if (v2.pushes and speed > 0) { if (zone.platform != undefined and !zone.inrecursion and !u_wall._parent.inrecursion) { zone.inrecursion = true; var v8 = v3 - v4 - (zone.x + zone.w); if (v2._parent.weight > zone.weight) { var v11 = v2._parent.weight / zone.weight; } else { var v11 = 1; } v5 = v8 + int(f_MoveH(v2._parent, (speed - v8) / v11)); f_UpdateWall(v2._parent, v2); f_MovePlatformH(v2._parent, v5); if (v7 != 0) { f_MoveDust(v2._parent, true); } } else { v5 = int(v3 - v4 - (zone.x + zone.w)); } } else { if (speed > 0) { zone.wall_pt = v2; v5 = int(v3 - v4 - (zone.x + zone.w)); } } } } else { if (zone.x - zone.w >= v3 - v4) { if (zone.x - zone.w + speed <= v3 + v4) { if (v2.pushes and speed < 0) { if (zone.platform != undefined and !zone.inrecursion and !u_wall._parent.inrecursion) { zone.inrecursion = true; var v8 = v3 + v4 - (zone.x - zone.w); if (v2._parent.weight > zone.weight) { var v11 = v2._parent.weight / zone.weight; } else { var v11 = 1; } v5 = v8 + int(f_MoveH(v2._parent, (speed - v8) / v11)); f_UpdateWall(v2._parent, v2); f_MovePlatformH(v2._parent, v5); if (v7 != 0) { f_MoveDust(v2._parent, false); } } else { v5 = int(v3 + v4 - (zone.x - zone.w)); } } else { if (speed < 0) { zone.wall_pt = v2; v5 = int(v3 + v4 - (zone.x - zone.w)); } } } } else { if (zone.x + zone.w > v3 - v4 and zone.x - zone.w < v3 + v4) { if (zone.x < v3) { zone.x = v3 - v4 - zone.w; zone._x = zone.x; } else { zone.x = v3 + v4 + zone.w; zone._x = zone.x; } trace('Error in f_W - Got Inside Box'); } } } } } } } if (speed < 0) { if (v5 > v7) { v7 = v5; } } else { if (v5 < v7) { v7 = v5; } } } zone.inrecursion = false; if (zone.pushes) { v7 = f_CheckPush(zone, v7); } if (v7 != speed) { zone.hitwall = true; } if (Math.abs(v7 - speed) > 40) { v7 = 0; } return v7; } function f_AssignPlatform(zone, u_p) { zone.platform = u_p; } function f_PY(zone, speed, u_pass) { r = false; if (speed > 0) { for (n in a_Platforms) { var v2 = a_Platforms[n]; if (u_pass and !v2.nopass) { } else { if (zone.bullet and v2.dropthru) { } else { var v3 = v2.w; var v6 = v2.h; var v4 = v2.x; var v5 = v2.y; if (zone.x + zone.w2 > v4 - v3 and zone.x - zone.w2 < v4 + v3) { if (zone.y <= v5 and zone.y + speed >= v5 - v6) { if (v2.diagonal) { if (zone.x > v4 - v3 and zone.x < v4 + v3) { if (v2.incline) { var v8 = (zone.x - (v4 - v3)) / v3 * 2; var v7 = v5 - v6 * v8; zone.platform_percent = v8; } else { var v8 = 1 - (zone.x - (v4 - v3)) / v3 * 2; var v7 = v5 - v6 * v8; zone.platform_percent = v8; } if (zone.y <= v7 + 5 and zone.y + speed >= v7 - 5) { f_AssignPlatform(zone, v2); zone.speed_y = 0; f_MoveV(zone, v7 - zone.y); zone.prevplatformx = zone.x; zone.prevplatformy = v7; return true; } } } else { f_AssignPlatform(zone, v2); if (zone.bullet) { zone.y += zone.speed_y; zone._y = zone.y; zone.speed_y = 0; } else { f_MoveV(zone, v5 - v6 - zone.y); zone.speed_y = 0; zone.prevplatformx = zone.x; zone.prevplatformy = zone.y; if (v2.springboard) { s_spring.start(0, 0); v2._parent.bumper.gotoAndPlay(2); if (zone == p1) { f_ForceJump(zone, 0, -70); } else { if (zone.toss_speed_x == 0) { f_ForceJump(zone, 0, -70); } else { f_TossInit(zone, zone.toss_speed_x, -70); } } } } return true; } } } } } } } if (r == false) { f_WallBelow(zone); } return r; } function f_PH(zone, u_speed) { if (zone.platform != undefined) { var v3 = zone.platform; var v2 = v3.w; var v5 = v3.x; var v4 = v3.y; if (zone.x + zone.w2 < v5 - v2 or zone.x - zone.w2 > v5 + v2) { zone.platform = undefined; zone.speed_y = 1; if (zone.jumping == false) { zone.speed_y = 50; zone.y -= 25; zone._y = zone.y; if (!f_PY(zone, zone.speed_y)) { zone.y += 25; zone._y = zone.y; } } zone.speed_y = 1; } else { if (v3.diagonal) { if (zone.y <= v4) { var v6 = v3.h; if (v3.incline) { var v10 = (zone.x - (v5 - v2)) / v2 * 2; var v8 = v4 - v6 * v10; zone.platform_percent = v10; } else { var v10 = 1 - (zone.x - (v5 - v2)) / v2 * 2; var v8 = v4 - v6 * v10; zone.platform_percent = v10; } if (v8 >= v4 - v6) { zone.y = v8; zone._y = zone.y; f_Depth(zone, zone.y); } else { zone.platform = undefined; if (zone.jumping == false) { zone.speed_y = 50; zone.y -= 25; zone._y = zone.y; if (!f_PY(zone, zone.speed_y)) { zone.y += 25; zone._y = zone.y; } } zone.speed_y = 1; } } else { zone.platform = undefined; if (zone.jumping == false) { zone.speed_y = 50; zone.y -= 25; zone._y = zone.y; if (!f_PY(zone, zone.speed_y)) { zone.y += 25; zone._y = zone.y; } } zone.speed_y = 1; } } } if (!zone.platform) { if (doublejump > 0) { zone.jumps = doublejump + 2; } else { zone.jumps = 0; } } } else { for (n in a_Slopes) { var v3 = a_Slopes[n]; var v2 = v3.w; var v6 = v3.h; var v5 = v3.x; var v4 = v3.y; if (zone.x + zone.w2 >= v5 - v2 and zone.x - zone.w2 <= v5 + v2) { if (zone.y <= v4 and zone.y >= v4 - v6) { if (v3.incline) { var v10 = 1 - (zone.y - v4) / v6; var v7 = v5 + v2 * v10; v10 = (zone.x - (v5 - v2)) / v2 * 2; var v8 = v4 - v6 * v10; } else { var v10 = 1 - Math.abs(zone.y - v4) / v6; var v7 = v5 - v2 + v2 * 2 * v10; v10 = 1 - (zone.x - (v5 - v2)) / v2 * 2; var v8 = v4 - v6 * v10; } if (zone.y > v8) { if (zone.y < v8 + 50) { if (v3.incline and u_speed > 0 or !v3.incline and u_speed < 0) { f_MoveV(zone, v8 - zone.y); } } } if (zone.x - u_speed <= v7 and zone.x >= v7 or zone.x - u_speed >= v7 and zone.x <= v7) { zone.x = v7; zone._x = zone.x; r = true; } } } } } } function f_GetSlope(zone) { var v2 = Math.atan2(zone._parent._height, zone._parent._width) * 57.29577951308232; if (zone.incline) { zone.slope = -v2; } else { zone.slope = v2; } if (Math.abs(zone.slope) != 0) { f_ObjectPush(zone, a_Slopes); } } function f_PullUp(zone, speed) { r = false; for (n in a_Platforms) { var v2 = a_Platforms[n]; var v6 = v2.w; var v3 = v2.h; var v5 = v2.x; var v4 = v2.y; if (zone.x + zone.w2 > v5 - v6 and zone.x - zone.w2 < v5 + v6) { if (zone.y - zone.h >= v4 - v3 and zone.y - zone.h + speed <= v4 - v3) { f_AssignPlatform(zone, v2); zone.speed_y = 0; zone.y = v4 - v3; zone._y = zone.y; f_Depth(zone, zone.y); r = true; return r; } } } return r; } function f_Ladder(zone) { var v4 = 0; var v6 = false; if (Key.isDown(zone.b_down)) { if (zone.platform) { if (!zone.crouch) { zone.crouch_timer = 0; } ++zone.crouch_timer; v4 = zone.speed_ladder; v6 = true; } } else { if (zone.crouch) { zone.crouch = false; } if (Key.isDown(zone.b_up)) { v4 = -zone.speed_ladder * 2; v6 = true; } } if (v6) { if (zone.platform.elevator) { if (v4 > 0) { zone.crouch = false; v4 = zone.platform.speed_y; } else { v4 = -zone.platform.speed_y; } if (zone.platform._parent.y + v4 > zone.platform._parent.limit_bottom) { v4 = zone.platform._parent.limit_bottom - zone.platform._parent.y; if (shake_y == 0) { shake_y = 5; } } else { if (zone.platform._parent.y + v4 < zone.platform._parent.limit_top) { v4 = zone.platform._parent.limit_top - zone.platform._parent.y; if (shake_y == 0) { shake_y = 5; } } } if (shake_x == 0) { shake_x = 3; } f_MoveV(zone.platform._parent, v4); } else { var v5 = 1; while (v5 <= total_ladders) { var v3 = _root['ladder' + v5]; pw = v3.w; ph = v3.h; px = v3.x; py = v3.y; if (zone.y + v4 <= py) { if (zone.y + v4 >= py - ph) { if (zone.x >= px - pw) { if (zone.x <= px + pw) { zone.ladder = v3; zone.platform = undefined; zone.speed_x = 0; zone.speed_y = 0; zone.crouch = false; if (v4 > 0) { zone.y += 75; zone._y = zone.y; f_Depth(zone, zone.y); } if (v4 > 0) { zone.gotoAndStop('ladderdown'); } else { zone.gotoAndStop('ladderup'); } } } } } ++v5; } } } if (zone.crouch) { zone.gotoAndStop('crouch'); } } function f_CheckLadder(zone) { var v2 = zone.ladder; var v6 = v2.w; var v7 = v2.h; var v5 = v2.x; var v3 = v2.y; if (zone.punching == false) { if (Key.isDown(zone.b_up)) { f_MoveV(zone, -zone.speed_ladder); if (f_PullUp(zone, -zone.speed_ladder)) { zone.ladder = undefined; zone.paused = true; zone.gotoAndStop('laddertop'); } else { zone.gotoAndStop('ladderup'); zone.body.play(); } } else { if (Key.isDown(zone.b_down)) { if (f_PY(zone, zone.speed_ladder, true) == false) { f_MoveV(zone, zone.speed_ladder); zone.gotoAndStop('ladderdown'); zone.body.play(); } else { zone.ladder = undefined; return undefined; } } else { zone.gotoAndStop('ladderup'); zone.body.stop(); } } } var v4 = false; if (zone.y <= v3) { if (zone.y >= v3 - v7) { if (zone.x >= v5 - v6) { if (zone.x <= v5 + v6) { v4 = true; } } } } if (v4 == false) { zone.ladder = undefined; f_Ladder(zone); } } function f_GeneralTimers(zone) { if (zone.smoke_timer > 0) { --zone.smoke_timer; if (zone.smoke_timer % 2 == 0) { var v2 = 90 + random(50); f_FX(zone.x - 50 + random(100), zone.y - random(100), int(zone.y - 5 + random(10)), 'dustpuff', v2, v2); } } if (zone.poison_timer > 0) { --zone.poison_timer; if (zone.poison_timer % 3 == 0) { v2 = 70 + random(30); f_FX(zone.x, zone.y - random(zone.h), zone.y + 1, 'poison_puff', v2, v2); } } if (zone.prev_hit_timer > 0) { --zone.prev_hit_timer; } if (zone.invincible_timer > 0) { --zone.invincible_timer; } if (zone.hit_timer < 1000) { ++zone.hit_timer; } if (zone == p1) { if (zone.wait) { zone.invincible_timer = 1; if (zone.platform) { gunshooting = false; zone.gotoAndStop('wait'); } } } } function f_Timers(zone) { if (hud.health.bar._xscale < zone.health) { ++hud.health.bar._xscale; } if (hud.mana.bar._xscale < zone.mana) { ++hud.mana.bar._xscale; } f_GeneralTimers(zone); if (zone.invincible_timer <= 0) { if (zone.gotpixel > 0) { --zone.gotpixel; if (zone.gotpixel == 1) { if (zone._xscale > 0) { zone._xscale = 115; } else { zone._xscale = -115; } zone._yscale = 115; f_ColorSwap(zone, color_yellow2); } else { if (zone.gotpixel == 0) { f_ColorSwap(zone, color_default); if (zone._xscale > 0) { zone._xscale = 100; } else { zone._xscale = -100; } zone._yscale = 100; } } } } } function f_PipeControls(zone) { zone.walking = false; f_LeftRightTimers(zone); if (!zone.punching) { if (zone.left_timer > 0 and zone.left_timer > zone.right_timer) { if (zone._xscale > 0) { f_FlipChar(zone); } if (!zone.punching and !Key.isDown(zone.b_punch1)) { zone.speed_x -= 4; if (zone.speed_x <= -zone.speed_x_max / 2) { zone.speed_x = -zone.speed_x_max / 2; } if (zone.x + game_x + zone.speed_x > 0) { f_MoveH(zone, zone.speed_x); } zone.walking = true; if (zone.x < zone.pipe.x - zone.pipe.w) { zone.pipe = undefined; zone.speed_y = 1; s_swing1.start(0, 0); zone.gotoAndStop('jump1_mid'); zone.body.gotoAndPlay(1); return undefined; } } } else { if (zone.speed_x < 0) { ++zone.speed_x; } } if (zone.right_timer > 0 and zone.right_timer > zone.left_timer) { if (zone._xscale < 0) { f_FlipChar(zone); } if (!zone.punching and !Key.isDown(zone.b_punch1)) { zone.speed_x += 4; if (zone.speed_x >= zone.speed_x_max / 2) { zone.speed_x = zone.speed_x_max / 2; } if (zone.x + game_x + zone.speed_x < screenWidth) { f_MoveH(zone, zone.speed_x); } zone.walking = true; if (zone.x > zone.pipe.x + zone.pipe.w) { zone.pipe = undefined; zone.speed_y = 1; s_swing1.start(0, 0); zone.gotoAndStop('jump1_mid'); zone.body.gotoAndPlay(1); return undefined; } } } else { if (zone.speed_x > 0) { --zone.speed_x; } } if (zone.walking) { zone.gotoAndStop('pipe_walk'); f_Punch(zone); } else { zone.gotoAndStop('pipe_idle'); f_GunPlay(zone); } } if (Key.isDown(zone.b_jump)) { if (zone.pressed_jump == false) { if (doublejump > 0) { zone.jumps = doublejump + 1; } else { zone.jumps = 0; } zone.pressed_jump = true; zone.speed_y = 1; zone.pipe = undefined; zone.punching = false; zone.midpunch = false; zone.jump_speed_x = 0; s_swing1.start(0, 0); zone.gotoAndStop('jump1_mid'); zone.body.gotoAndPlay(1); return undefined; } } else { zone.pressed_jump = false; } } function f_GunPlay(zone) { if (zone.prev_hit_timer <= 0) { if (Key.isDown(zone.b_down)) { if (!Key.isDown(zone.b_left) and !Key.isDown(zone.b_right) and !zone.platform or !zone.platform) { zone.gun_frame = 1; } else { zone.gun_frame = 10; } } else { if (Key.isDown(zone.b_up)) { if (!Key.isDown(zone.b_left) and !Key.isDown(zone.b_right)) { zone.gun_frame = 29; } else { zone.gun_frame = 21; } } else { zone.gun_frame = 15; } } if (zone.gun_type == 101) { zone.gun_frame = 15; zone.gun.gotoAndStop(15); } else { if (zone.gun._currentframe < zone.gun_frame) { if (zone.gun_frame > zone.gun._currentframe + 4) { zone.gun.gotoAndStop(zone.gun._currentframe + int((zone.gun_frame - zone.gun._currentframe) / 4)); } else { zone.gun.gotoAndStop(zone.gun._currentframe + 1); } } else { if (zone.gun._currentframe > zone.gun_frame) { if (zone.gun_frame < zone.gun._currentframe - 4) { zone.gun.gotoAndStop(zone.gun._currentframe - int((zone.gun._currentframe - zone.gun_frame) / 4)); } else { zone.gun.gotoAndStop(zone.gun._currentframe - 1); } } } } f_Punch(zone); } } function f_Controls(zone) { if (!zone.paused) { f_CheckJump(zone); if (!zone.punching) { if (zone.ladder == undefined) { if (!zone.jumping) { f_Ladder(zone); } } else { f_CheckLadder(zone); } } if (zone.freeze_timer <= 0) { if (!zone.crouch and !(zone.ladder and zone.punching)) { f_Walk(zone); if (zone.wall_pt) { if (zone.wallstick > 0) { if (zone.wall_pt.sticky) { if (zone.speed_y >= -5 and !zone.platform) { if (zone.x < zone.wall_pt.x and zone._xscale > 0 or zone.x > zone.wall_pt.x and zone._xscale < 0) { zone._xscale *= -1; zone.gotoAndStop('wall_idle'); return undefined; } } } } } } } else { --zone.freeze_timer; } if (zone.ladder == undefined and !zone.paused) { if (zone.platform == undefined or zone.jumping) { if (zone.float_timer > 0) { --zone.float_timer; } else { if (zone.jump_speed_x != 0) { f_MoveH(zone, zone.jump_speed_x); } if (zone.speed_y >= 0) { var v4 = 1; while (v4 <= total_pipes) { var v3 = _root['pipe' + v4]; pw = v3.w; ph = v3.h; px = v3.x; py = v3.y; if (zone.y - zone.h <= py) { if (zone.y - zone.h >= py - ph) { if (zone.x >= px - pw) { if (zone.x <= px + pw) { zone.pipe = v3; zone.platform = undefined; zone.speed_x = 0; zone.speed_y = 0; zone.crouch = false; zone.y = py + 190; zone._y = zone.y; zone.gotoAndStop('pipe_idle'); } } } } ++v4; } if (!zone.pipe) { if (f_PY(zone, zone.speed_y) == false) { f_MoveV(zone, zone.speed_y); zone.speed_y += zone.weight; zone.jumping = false; f_GoFrame(zone, 'jump1_mid'); } else { zone.jump_speed_x = 0; zone.punching = false; zone.midpunch = false; f_FX(zone.x, zone.y, zone.y + 10, 'dustpuff', 100, 100); f_GoFrame(zone, 'stand'); } } } else { if (doublejump > 0 and zone.jumps <= doublejump) { f_GoFrame(zone, 'jump1_mid'); } else { f_GoFrame(zone, 'jump1'); } if (f_WallAbove(zone, zone.speed_y) == false) { f_MoveV(zone, zone.speed_y); } zone.speed_y += zone.weight; } if (zone.speed_y > zone.speed_y_max) { zone.speed_y = zone.speed_y_max; } } } else { zone.dashing_timer = 0; if (zone.crouch) { f_LeftRightTimers(zone); if (zone.left_timer > 0 and zone.left_timer > zone.right_timer) { if (zone._xscale > 0) { f_FlipChar(zone); } } if (zone.right_timer > 0 and zone.right_timer > zone.left_timer) { if (zone._xscale < 0) { f_FlipChar(zone); } } f_GoFrame(zone, 'crouch'); } else { if (zone.walking) { if (zone.dashing and (zone.speed_x == -zone.speed_x_dash or zone.speed_x == zone.speed_x_dash)) { f_GoFrame(zone, 'dash'); } else { f_GoFrame(zone, 'walk'); } } else { if (zone.platform.diagonal) { f_GoFrame(zone, 'stand'); } else { f_GoFrame(zone, 'stand'); } } } } } f_GunPlay(zone); } } function f_Depth(u_char, u_depth) { var v2 = 200 * ((u_depth - abs_top) / abs_bottom); if (u_char.depth_mod == undefined) { trace('NO DEPTH: ' + u_char); } u_char.current_depth = int(v2 * 200 + u_char.depth_mod); u_char.swapDepths(u_char.current_depth); } function f_SetDepths() { for (n in a_Players) { var v1 = a_Players[n]; f_Depth(v1, v1.y); } for (n in a_Enemies) { v1 = a_Enemies[n]; if (!v1.nodepth) { f_Depth(v1, v1.y); } } } function f_ClearDepth(u_char) { u_char.swapDepths(u_char.depth_mod); } function f_SetDepthMod() { ++current_depth_mod; if (current_depth_mod > depth_mod_max) { current_depth_mod = 1; } return current_depth_mod; } function f_AddNeutral(zone) { zone.depth_mod = f_SetDepthMod(); f_Depth(zone, zone._y); } function f_OptionalForceSlide(zone) { if (zone._xscale > 0 and Key.isDown(zone.b_right) or zone._xscale < 0 and Key.isDown(zone.b_left)) { f_ForceSlide(zone); } } function f_ForceSlide(zone) { if (zone._xscale > 0) { if (zone.x + game_x + zone.slide_x < screenWidth) { f_MoveH(zone, zone.slide_x); } } else { if (zone.x + game_x - zone.slide_x > 0) { f_MoveH(zone, -zone.slide_x); } } --zone.slide_x; if (zone.slide_x <= 0) { zone.slide_x = 0; } if (zone.slide_y < 0) { if (f_WallAbove(zone, zone.slide_y) == false) { f_MoveV(zone, zone.slide_y); } ++zone.slide_y; } } function f_ForceSlideBack(zone) { if (zone.force_x < 0) { if (zone.x + game_x + zone.force_x > 0) { f_MoveH(zone, zone.force_x); } ++zone.force_x; if (zone.force_x > 0) { zone.force_x = 0; } } else { if (zone.x + game_x + zone.force_x < screenWidth) { f_MoveH(zone, zone.force_x); } --zone.force_x; if (zone.force_x < 0) { zone.force_x = 0; } } } function f_Health(zone, u_temp) { zone.health += u_temp; if (zone.health < 0) { zone.health = 0; } else { if (zone.health > zone.health_max) { zone.health = zone.health_max; } } if (zone == p1) { hud.health.bar._xscale = zone.health; } } function f_Damage(zone, damage_val) { var v2 = damage_val - zone.defense; if (v2 < 1) { if (damage_val > 0) { v2 = 1; } else { v2 = 0; } } if (v2 > 0) { var v3 = f_FX(zone.x, zone.impact_y - 50, zone.y + 200, 'damage_val', 100, 100); f_ShowVal(v3, v2, color_red); if (zone._xscale > 0) { v3.force_x = -zone.force_x * 0.5; } else { v3.force_x = zone.force_x * 0.5; } v3.force_y = zone.force_y * 0.5; zone.health -= v2; if (zone.health < 0) { zone.health = 0; } if (zone == p1) { hud.health.bar._xscale = zone.health; hud.health.flasher._xscale = v2; hud.health.flasher._x = zone.health; hud.health.flasher.gotoAndPlay(2); } } } function f_GameOver() { if (!gameover) { stats.health = stats.health_max; gameover = true; clown_health = clown_health_cp; agent_health = agent_health_cp; fader.warpto = 'reset'; fader.spawnpoint = spawnpoint; fader.gotoAndPlay('fadeout'); } } function f_HitPlayer(zone) { var v3 = 80 + random(30); var v4 = f_FX(zone.x, zone.y - 40, zone.y + 10, 'impact1', v3, v3); v4._rotation = random(180); _root.f_DamagePlayer(1); if (!zone.hitby.bullet) { if (Math.abs(zone.force_x) > 12) { s_punch3.start(0, 0); } else { f_PunchSound(); } } zone.nojumpanim = false; zone.gun.gun.gun.gun.gotoAndStop('idle'); gunshooting = false; if (zone.gun_type == 30) { if (zone.chainsawing) { zone.chainsawing = false; s_chainsaw.s_chainsaw1.stop(); s_chainsaw4.start(0, 0); s_chainsaw.s_chainsaw3.start(0, 9999); } } if (zone.platform and zone.force_y >= -10) { zone.force_y = -10; } if (zone.hitby.x < zone.x or zone.hitby.force_x > 0) { if (!zone.hitby.noturn) { if (zone._xscale > 0) { zone._xscale *= -1; } } f_TossInit(zone, zone.force_x, zone.force_y); } else { if (!zone.hitby.noturn) { if (zone._xscale < 0) { zone._xscale *= -1; } } f_TossInit(zone, zone.force_x, zone.force_y); } } function f_DefaultStats() { stats = new Object(); stats.health_max = 20; stats.health = stats.health_max; stats.mana_max = 100; stats.mana = 0; stats.attack = 1; stats.defense = 1; } function f_LoadStats() { p1.health_max = stats.health_max; p1.health = stats.health; p1.mana_max = stats.mana_max; p1.mana = stats.mana; p1.attack = stats.attack; p1.defense = stats.defense; p1.gun_type = stats.gun_type; p1.gun_timer = stats.gun_timer; p1.bullet_name = stats.bullet_name; p1.explosion_type = stats.explosion_type; p1.explosion2_type = stats.explosion2_type; p1.bullet_speed = stats.bullet_speed; p1.ammo = stats.ammo; p1.ammo_pow = stats.ammo_pow; p1.force_mod = stats.force_mod; } function f_BackupStats() { stats = new Object(); stats.health_max = p1.health_max; stats.health = p1.health; stats.mana_max = p1.mana_max; stats.mana = p1.mana; stats.attack = p1.attack; stats.defense = p1.defense; stats.gun_type = p1.gun_type; stats.gun_timer = p1.gun_timer; stats.bullet_name = p1.bullet_name; stats.explosion_type = p1.explosion_type; stats.explosion2_type = p1.explosion2_type; stats.bullet_speed = p1.bullet_speed; stats.ammo = p1.ammo; stats.ammo_pow = p1.ammo_pow; stats.force_mod = p1.force_mod; } function f_InitPlayer(zone) { if (zone == p1) { zone.b_punch1 = 65; zone.b_punch2 = 68; zone.b_jump = 83; zone.b_left = 37; zone.b_up = 38; zone.b_right = 39; zone.b_down = 40; zone.x = zone._x; zone.y = zone._y; zone.depth_mod = p1_depth_mod; } else { if (zone == p2) { zone.b_punch1 = 219; zone.b_punch2 = 221; zone.b_jump = 220; zone.b_left = 74; zone.b_up = 73; zone.b_right = 76; zone.b_down = 75; zone.x = screenWidth / 1.7 - game_x; zone.y = screenHeight / 1.7 - game_y; zone.depth_mod = p2_depth_mod; } } f_Depth(zone, zone.y); f_NewShadow(zone); zone.speed_x_max = 12; zone.speed_x_dash = 30; zone.speed_x = 0; zone.speed_y = 0; zone.speed_y_max = speed_y_max; zone.jump_speed_x = 0; zone.speed_ladder = 8; zone.launch = -25; zone.weight = 1.75; zone.bounce = 0.25; zone.h = zone.zone._height; zone.invincible_timer = 0; zone.face_type = 1; zone.body_type = 4; zone.head_type = 1; zone.bounce_limit = 2; f_LoadStats(); if (!zone.gun_type) { f_GetGun31(zone); } zone.damage_val = zone.attack; zone.left_timer = 0; zone.right_timer = 0; zone.fp_Hit1 = f_HitPlayer; zone.fp_HitGround = f_HitGround1; zone.w2 = 2; zone._xscale = 100; zone._yscale = 100; zone.goodguy = true; zone.pushesenemies = true; zone._x = zone.x; zone._y = zone.y; zone.noremove = true; zone.platform = undefined; zone.ladder = undefined; zone.punching = false; zone.active = true; zone.alive = true; zone.float_timer = 0; zone.bullet_timer = 1; zone.texture = 4; f_PlayerPush(zone); ++players; zone.gotoAndStop('stand'); } function f_CreateFX() { i = 1; while (i <= total_fx) { var v3 = 'fx' + i; var v1 = f_SetDepthMod(); game.game.attachMovie('fx', v3, v1); var v2 = game.game['fx' + i]; v2.depth_mod = v1; v2.noremove = true; ++i; } } function f_CreateShadows(u_temp) { total_shadows = u_temp; i = 1; while (i <= total_shadows) { u_temp = 's' + i; var v1 = f_SetDepthMod(); game.game.attachMovie('shadow', u_temp, v1); u_temp = game.game['s' + i]; u_temp.depth_mod = v1; u_temp.gotoAndStop('off'); ++i; } } function f_CreateItems(u_temp) { total_items = u_temp; i = 1; while (i <= total_items) { u_temp = 'item' + i; var v1 = f_SetDepthMod(); game.game.attachMovie('item', u_temp, v1); u_temp = game.game['item' + i]; u_temp.depth_mod = v1; ++i; } } function f_FX(fx_x, fx_y, fx_depth, fx_type, fx_xscale, fx_yscale) { var v1 = game.game['fx' + current_fx]; v1._x = fx_x; v1._y = fx_y; if (fx_xscale != undefined) { v1._xscale = fx_xscale; } else { v1._xscale = 100; } if (fx_yscale != undefined) { v1._yscale = fx_yscale; } else { v1._yscale = 100; } v1.noturn = false; v1.force_x = 0; v1.force_y = 0; v1.damage_val = 0; v1.hitall = false; v1.attribute_poison = false; v1.bullet = false; v1._rotation = 0; v1.gotoAndStop('blank'); v1.gotoAndStop(fx_type); ++current_fx; if (current_fx > total_fx) { current_fx = 1; } f_Depth(v1, fx_depth); return v1; } function f_Item(u_x, u_y, u_depth, item_type, u_xscale, u_yscale) { var v1 = game.game['item' + current_item]; v1.x = u_x; v1.y = u_y; v1._x = v1.x; v1._y = v1.y; v1.speed_y = 0; v1.speed_y_max = 30; v1.jump_speed_x = 0; v1.platform = undefined; v1.jumping = false; v1.nojumpanim = true; v1.launch = -20; v1.weight = 1.5; v1.active = true; if (u_xscale != undefined) { v1._xscale = u_xscale; } else { v1._xscale = 100; } if (u_yscale != undefined) { v1._yscale = fx_yscale; } else { v1._yscale = 100; } v1.gotoAndStop('blank'); v1.gotoAndStop(item_type); v1.w = v1._width / 2; v1.w2 = v1._width / 2; v1.h = v1._height; ++current_item; if (current_item > total_items) { current_item = 1; } f_Depth(v1, u_depth); f_ObjectPush(v1, a_Items); return v1; } function f_NewShadow(zone) { var v1 = game.game['s' + current_shadow]; v1.x = zone.x; v1.y = zone.y; v1._x = v1.x; v1._y = v1.y; v1.w = 25; v1.w2 = 2; ++current_shadow; if (current_shadow > total_shadows) { current_shadow = 1; } f_Depth(v1, zone.y - 1); v1.gotoAndStop('on'); v1.owner = zone; zone.shadow = v1; } function f_Shadow(zone) { zone.x = zone.owner.x; zone.y = zone.owner.y; if (!zone.owner.platform) { zone.y -= 10; zone.platform = false; f_PY(zone, 900, false); } u_size = zone.y - zone.owner.y; if (u_size > 50) { u_size = 50; } u_size = 100 - u_size; zone.body._xscale = u_size; zone.body._yscale = u_size; zone._x = zone.x; zone._y = zone.y; f_Depth(zone, zone.y - 3); } function f_CheckStart() { if (Key.isDown(b_start1)) { if (pressed_start1 == false) { pressed_start1 = true; if (p1.active) { f_RemovePlayer(p1); } else { f_InitPlayer(p1); } } } else { pressed_start1 = false; } if (Key.isDown(b_start2)) { if (pressed_start2 == false) { pressed_start2 = true; if (p2.active) { f_RemovePlayer(p2); } else { f_InitPlayer(p2); } } } else { pressed_start2 = false; } if (players == 1) { f_GetPlayer(); } } function f_ShrapnelExplode(zone) { zone.gotoAndStop('explosion3'); } function f_ShrapnelSplatter(zone) { zone.gotoAndStop('blood1'); } function f_ShrapnelRemove(zone) { zone.gotoAndStop('remove'); } function f_ShrapnelVanish(zone) { zone.gotoAndStop('blank'); } function f_ShrapnelGeneral(x, y, u_depth, u_speed_x, u_speed_y, item) { var v1 = f_FX(x, y, u_depth, item, 100, 100); v1.x = v1._x; v1.y = v1._y; v1.w = 1; v1.w2 = 2; v1.h = 1; v1.platform = undefined; v1.bounces = 0; v1.bounce_limit = 1; v1.weight = 2; v1.bounce = 0.6; v1.spin = true; v1.speed_y = u_speed_y; v1.toss_speed_x = u_speed_x; v1.fp_ShrapnelEnd = f_ShrapnelRemove; return v1; } function f_Shrapnel(zone) { zone.old_speed_y = zone.speed_y; if (zone.speed_y < 0) { f_WallAbove(zone, zone.speed_y); } var v2 = f_MoveH(zone, zone.toss_speed_x); if (zone.spin) { if (zone._xscale < 0) { zone.body._rotation -= v2; } else { zone.body._rotation += v2; } } if (v2 == 0) { zone.toss_speed_x *= -zone.bounce; } var v3 = zone.y; if (f_PY(zone, zone.speed_y) == false) { f_MoveV(zone, zone.speed_y); zone.speed_y += zone.weight; } else { if (zone.old_speed_y > 4 and zone.bounces < zone.bounce_limit) { zone.speed_y = zone.old_speed_y * -zone.bounce; zone.platform = undefined; ++zone.bounces; } else { zone.fp_ShrapnelEnd(zone); } } } function f_BloodShrapnel(zone) { zone._x += zone.speed_x; zone.body._y += zone.speed_y; zone.speed_y += zone.gravity; if (zone.body._y > 0) { zone.gotoAndStop('blank'); } } function f_TossHitChar(zone, u_p) { if (zone != u_p) { if (u_p.platform != undefined and u_p.humanoid) { if (u_p.invincible_timer <= 0) { if (zone.y - zone.h + 1 < u_p.y) { if (zone.y >= u_p.y - u_p.h / 3) { if (zone.x + zone.w > u_p.x - u_p.w) { if (zone.x - zone.w < u_p.x + u_p.w) { var v5 = zone.x + zone.w; var v4 = u_p.x - u_p.w; if (u_p.x > zone.x and zone.toss_speed_x > 0) { u_p.x = zone.x + zone.w + u_p.w; var v3 = Math.abs(zone.toss_speed_x); f_FX(u_p.x, u_p.y - 50, u_p.y + 10, 'impact1', 90, 90); s_punch2.start(0, 0); u_p.invincible_timer = 10; f_TossInit(u_p, v3, -10); } else { if (u_p.x < zone.x and zone.toss_speed_x < 0) { u_p.x = zone.x - zone.w - u_p.w; var v3 = -Math.abs(zone.toss_speed_x); f_FX(u_p.x, u_p.y - 50, u_p.y + 10, 'impact1', 90, 90); s_punch2.start(0, 0); u_p.invincible_timer = 10; f_TossInit(u_p, v3, -10); } } } } } } } } } } function f_TossHit(zone) { for (n in a_Players) { var v1 = a_Players[n]; f_TossHitChar(zone, v1); } for (n in a_Enemies) { v1 = a_Enemies[n]; f_TossHitChar(zone, v1); } } function f_Toss(zone) { var v2 = zone.speed_y; var v6 = zone.toss_speed_x; var v3 = f_MoveH(zone, zone.toss_speed_x); if (zone.hitwall) { if (zone.fp_HitWall(zone)) { return undefined; } } if (zone.spin and !zone.platform) { zone.body._rotation += v3; } else { zone.fp_FixRotation(zone); } if (zone == p1) { var v4 = screenWidth; var v5 = 0; } else { var v4 = screenWidth + 100; var v5 = -100; } if (v3 == 0) { if (zone.pushes) { zone.toss_speed_x *= -1; } else { zone.toss_speed_x *= -zone.bounce; } } else { if (zone.x - zone.w + game_x > v4 or zone.x + zone.w + game_x < v5) { if (zone == p1 and nostopping) { } else { v3 = 0; zone.toss_speed_x = 0; } } else { zone.toss_speed_x = v3; } } var v7 = zone.y; if (f_PY(zone, zone.speed_y) == false) { if (zone.speed_y <= 0) { if (f_WallAbove(zone, zone.speed_y * 2) == false) { f_MoveV(zone, zone.speed_y); } } else { f_MoveV(zone, zone.speed_y); } zone.speed_y += zone.weight; if (zone.speed_y - zone.weight <= 0 and zone.speed_y > 0) { if (!zone.blocking) { zone.gotoAndStop('fish2'); } } } else { f_FX(zone.x, zone.y, zone.y + 10, 'dust1', 100, 100); if (zone.platform.diagonal) { if (zone.bounces <= zone.temp_bounce_limit) { s_bodyfall2.start(0, 0); if (zone.platform.incline) { if (zone.toss_speed_x > 0) { zone.toss_speed_x *= zone.bounce / 2; if (v2 <= 4 * (1 / zone.bounce)) { v2 = 5; } } } else { if (zone.toss_speed_x < 0) { zone.toss_speed_x *= zone.bounce / 2; if (v2 <= 4) { v2 = 5; } } } } } if (zone.weight >= 3) { if (f_OnScreen(zone)) { shake_y = 6; } } if (v2 > 4 and zone.bounces < zone.temp_bounce_limit) { zone.speed_y = v2 * -zone.bounce; zone.platform = undefined; ++zone.bounces; s_bodyfall2.start(0, 0); if (!zone.blocking) { zone.gotoAndStop('fish1'); } } else { zone.jumping = false; } } if (zone == p1) { f_TossHit(zone); } if (zone.y > abs_bottom) { zone.health = 0; zone.fp_HitGround(zone); return undefined; } if (zone.speed_y == 0 and zone.platform) { if (zone.pushes) { if (zone.toss_speed_x > 0) { zone.toss_speed_x -= 1; if (zone.toss_speed_x < 0) { zone.toss_speed_x = 0; } } else { if (zone.toss_speed_x < 0) { zone.toss_speed_x += 1; if (zone.toss_speed_x > 0) { zone.toss_speed_x = 0; } } else { zone.tossed = false; if (zone.blocking) { zone.blocking = false; zone.gotoAndStop('stand'); } else { zone.fp_HitGround(zone); } } } } else { zone.tossed = false; if (zone.blocking) { zone.blocking = false; zone.gotoAndStop('stand'); } else { zone.fp_HitGround(zone); } } } } function f_HitGround1(zone) { f_ShakeY(5); f_BodyFallSound(); zone.onground = true; zone.gotoAndStop('hitground'); } function f_HitGround2(zone) { zone.gotoAndStop('stand'); } function f_TossPose(zone) { if (Math.abs(zone.speed_y) > Math.abs(zone.toss_speed_x)) { zone.body.gotoAndStop(2); } else { zone.body.gotoAndStop(1); } } function f_TossInit(tossee, speedx, speedy) { tossee.toss_speed_x = speedx; if (zone.pushes) { if (speedx > 0 and speed_x < 20) { tossee.toss_speed_x = 20; } else { if (speedx < 0 and speed_x > -20) { tossee.toss_speed_x = -20; } } } tossee.rotate_speed = speedx; tossee.speed_y = speedy; if (speedy != 0) { tossee.platform = undefined; } tossee.tossed = true; tossee.jumping = true; tossee.punching = false; tossee.midpunch = false; tossee.float_timer = 0; tossee.bounces = 0; if (tossee.bounce_limit >= 0) { tossee.temp_bounce_limit = tossee.bounce_limit; } else { tossee.temp_bounce_limit = 1000; } tossee.gotoAndStop('toss'); tossee.body.gotoAndPlay(1); } function f_QueueFall(zone) { zone.queue_y_speed += zone.queue_y_speed + zone.weight; zone.speed_y = zone.queue_y_speed; f_PY(zone, zone.speed_y); zone.speed_y = zone.speed_y_max; } function f_FixRotation(zone) { var v2 = zone.body._rotation; if (v2 > -180 and v2 < -90) { if (zone.rotate_speed > 0) { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); ++zone.rotate_speed; if (v2 > -90) { v2 = -90; } } else { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); --zone.rotate_speed; if (v2 < -180) { v2 = -180; } } zone.body._rotation = v2; } else { if (v2 > -90 and v2 < 0) { if (zone.rotate_speed > 0) { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); ++zone.rotate_speed; if (v2 > 0) { v2 = 0; } } else { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); --zone.rotate_speed; if (v2 < -90) { v2 = -90; } } zone.body._rotation = v2; } else { if (v2 > 0 and v2 < 90) { if (zone.rotate_speed > 0) { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); ++zone.rotate_speed; if (v2 > 90) { v2 = 90; } } else { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); --zone.rotate_speed; if (v2 < 0) { v2 = 0; } } zone.body._rotation = v2; } else { if (v2 > 90 and v2 < 180) { if (zone.rotate_speed > 0) { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); ++zone.rotate_speed; if (v2 > 180) { v2 = 180; } } else { v2 += zone.rotate_speed; f_MoveH(zone, zone.rotate_speed); f_MovePlatformH(zone, zone.rotate_speed); f_UpdateWall(zone, zone.z_wall); --zone.rotate_speed; if (v2 < 90) { v2 = 90; } } zone.body._rotation = v2; } } } } } function f_InitGeneral(zone) { zone.speed_y = 0; zone.speed_y_max = 30; zone.active = true; zone.alive = true; zone.platform = undefined; zone.hitby = undefined; zone.nohit = false; zone.float_timer = 0; zone.jumping = false; zone.x = zone._x; zone.y = zone._y; zone.depth_mod = f_SetDepthMod(); zone.fp_HitGround = f_HitGround1; } function f_RemovePlatform(u_platform) { for (n in a_Players) { var v2 = a_Players[n]; if (v2.platform == u_platform) { v2.platform = undefined; } } for (n in a_Enemies) { var v1 = a_Enemies[n]; if (v1.platform == u_platform) { v1.platform = undefined; } } f_ObjectPop(u_platform, a_Platforms); } function f_UpdatePlatform(zone, u_platform) { u_platform.x = zone._x + u_platform._x * (zone._xscale / 100); u_platform.y = zone._y + u_platform._y * (zone._yscale / 100); } function f_AddPlatform(zone, u_platform) { u_platform.x = zone._x + u_platform._x * (zone._xscale / 100); u_platform.y = zone._y + u_platform._y * (zone._yscale / 100); u_platform.w = (u_platform._width / 2) * (zone._xscale / 100); u_platform.h = u_platform._height * (zone._yscale / 100); f_ObjectPush(u_platform, a_Platforms); } function f_UpdateWall(zone, u_wall) { u_wall.x = zone._x + u_wall._x; u_wall.y = zone._y + u_wall._y; } function f_AddWall(zone, u_wall) { u_wall.x = zone._x + u_wall._x; u_wall.y = zone._y + u_wall._y; u_wall.w = (u_wall._width / 2) * (zone._xscale / 100); u_wall.h = u_wall._height * (zone._yscale / 100); zone.w = u_wall.w; zone.h = u_wall.h; f_ObjectPush(u_wall, a_Walls); } function f_RemoveWall(u_wall) { f_ObjectPop(u_wall, a_Walls); } function f_AddEnemyPush(zone) { f_ObjectPush(zone, a_EnemiesPush); } function f_AddLadder(zone) { ++total_ladders; zone.id = total_ladders; zone.x = zone._x; zone.y = zone._y; zone.w = zone._width / 2; zone.h = zone._height; _root['ladder' + total_ladders] = zone; } function f_AddPipe(zone) { ++total_pipes; zone.id = total_pipes; zone.x = zone._x; zone.y = zone._y; zone.w = zone._width / 2; zone.h = zone._height; _root['pipe' + total_pipes] = zone; } function f_AddEnemy(zone) { ++total_enemies; zone.id = total_enemies; zone.x = zone._x; zone.y = zone._y; if (zone.z_wall) { zone.w = zone.z_wall._width / 2; zone.h = zone.z_wall._height; } else { zone.w = zone._width / 2; zone.h = zone._height; } zone.active = true; a_EnemiesLog.push(zone); f_EnemyPush(zone); } function f_Clear() { a_tiles = new Array(0); a_Platforms = new Array(0); a_Walls = new Array(0); a_Slopes = new Array(0); a_Ladders = new Array(0); a_Players = new Array(0); a_Enemies = new Array(0); a_EnemiesLog = new Array(0); a_EnemiesPush = new Array(); a_Events = new Array(); a_ObjectData = new Array(0); a_Items = new Array(0); total_platforms = 0; total_walls = 0; total_ladders = 0; total_pipes = 0; total_enemies = 0; cleanup(); hand1ScreenOverlay.dispose(); hand2ScreenOverlay.dispose(); bossScreenOverlay.dispose(); screenOverlay.dispose(); if (total_shadows) { i = 1; while (i <= total_shadows) { var v1 = game.game['s' + i]; v1.removeMovieClip(); ++i; } } } function f_Blur(zone, blurx, blury, blurq) { var v1 = new flash.filters.BlurFilter(blurx, blury, blurq); zone.filters = [v1]; } function f_Slowdown(u_rate, u_timer) { slowdown_delay = 2; slowdown_timer_default = u_timer; slowdown_timer_rate = u_rate; } function f_LevelDefaults() { clown_health_cp = clown_health; agent_health_cp = agent_health; y_expanse = game.game.abs_bottom._y - game.game.abs_top._y; abs_bottom = game.game.abs_bottom._y; abs_top = game.game.abs_top._y; target_scale = 100; u_scale = 100 / game._xscale; p1 = game.game.p1; camera = game.game.camera; limit_left = undefined; limit_right = undefined; limit_top = undefined; limit_bottom = undefined; game.game.container = true; slowdown_timer = 0; f_CreateFX(); f_CreateItems(10); f_CreateShadows(10); camera_lag = camera_lag_default; bosshealth.gotoAndStop(1); nostopping = false; bg_default_x = game.game._x; bg_default_y = game.game._y; root_default_x = game.game._x + game._x; root_default_y = game.game._y + game._y; if (game.game.bg1) { game.game.bg1._x = game.game.bg1_lock._x; game.game.bg1._y = game.game.bg1_lock._y; bg1_default_x = game.game.bg1._x + bg_default_x; bg1_default_y = game.game.bg1._y + bg_default_y; } if (game.game.bg2) { game.game.bg2._x = game.game.bg2_lock._x; game.game.bg2._y = game.game.bg2_lock._y; bg2_default_x = game.game.bg2._x + bg_default_x; bg2_default_y = game.game.bg2._y + bg_default_y; } } function f_MakeGlow(buffer) { var v1 = screenOverlay.overlayClip.transform.concatenatedMatrix; v1.scale(screenOverlay.scale, screenOverlay.scale); game.game.glow._visible = true; game.game.glow2._visible = true; game.game.glow3._visible = true; game.game.glow4._visible = true; glowBuffer.draw(screenOverlay.overlayClip, v1, new ColorTransform(), 'normal', glowBuffer.rectangle); buffer.threshold(glowBuffer, glowBuffer.rectangle, new Point(), '!=', 16711935, 0, 16777215, false); game.game.glow._visible = false; game.game.glow2._visible = false; game.game.glow3._visible = false; game.game.glow4._visible = false; } function f_Level1_19Init() { currentlevel = 'level1_19'; game.game.event2.autodir = 1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top2._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.gotoAndStop('stand'); p1.x = p1._x; p1.y = p1._y; } game.game.bg2._x = game.game.bg2_lock._x; game.game.bg2._y = game.game.bg2_lock._y; game.game.bg3._x = game.game.bg3_lock._x; game.game.bg3._y = game.game.bg3_lock._y; } function f_Level1_20Init() { currentlevel = 'level1_20'; game.game.event2.autodir = 1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; game.game.door1.gotoAndPlay('intro'); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 80; f_ScalePop(); f_CameraPop(); p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_21Init() { currentlevel = 'level1_21'; game.game.event2.autodir = 1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; game.game.door1.gotoAndPlay('intro'); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_22Init() { currentlevel = 'level1_22'; game.game.event2.autodir = -1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; elevator_speed = 0; game.game.door1.gotoAndPlay('intro'); f_Item(game.game.hotdog._x, game.game.hotdog._y, game.game.hotdog._y, 'hotdog', 100, 100); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_23Init() { currentlevel = 'level1_23'; game.game.event2.warpto = 'level1_24'; game.game.event2.warpspawn = 1; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 2; game.game.door2.gotoAndPlay('intro'); f_Item(game.game.hotdog._x, game.game.hotdog._y, game.game.hotdog._y, 'hotdog', 100, 100); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1._xscale *= -1; p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_24Init() { currentlevel = 'level1_24'; game.game.event2.autodir = -1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.gotoAndStop('hide'); } } function f_Level1_25Init() { currentlevel = 'level1_25'; game.game.event2.warpto = 'level1_26'; game.game.event2.warpspawn = 1; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; game.game.door1.gotoAndPlay('intro'); f_Item(game.game.hotdog._x, game.game.hotdog._y, game.game.hotdog._y, 'hotdog', 100, 100); f_Item(game.game.hotdog2._x, game.game.hotdog2._y, game.game.hotdog2._y, 'hotdog', 100, 100); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1._xscale *= -1; p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_26Init() { currentlevel = 'level1_26'; game.game.event2.warpto = 'level1_261'; game.game.event2.warpspawn = 1; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 65; f_ScalePop(); f_CameraPop(); p1.gun.gun.gun.gotoAndStop(p1.gun_type); p1.gotoAndStop('jump1_mid'); p1.body.gotoAndPlay('end'); } f_Item(game.game.hotdog._x, game.game.hotdog._y, game.game.hotdog._y, 'hotdog', 100, 100); f_InitGiant(); f_InitGiantBody(); } function f_Level1_261Init() { currentlevel = 'level1_261'; game.game.event2.autodir = -1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.gotoAndStop('hide'); } } function f_Level1_27Init() { currentlevel = 'level1_27'; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; game.game.door1.gotoAndPlay('intro'); f_Item(game.game.hotdog._x, game.game.hotdog._y, game.game.hotdog._y, 'hotdog', 100, 100); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1._xscale *= -1; p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_28Init() { currentlevel = 'level1_28'; game.game.event2.autodir = 1; game.game.event2.autowalk = true; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; game.game.door1.gotoAndPlay('intro'); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_29Init() { currentlevel = 'level1_29'; game.game.event2.warpto = 'level1_30'; game.game.event2.warpspawn = 1; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; game.game.door1.gotoAndPlay('intro'); if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.wait = false; p1.autowalk_timer = 20; p1.gotoAndStop('stand'); } } function f_Level1_30Init() { currentlevel = 'level1_30'; limit_left = game.game.limit_left._x; limit_right = game.game.limit_right._x; limit_top = game.game.limit_top._y; limit_bottom = game.game.limit_bottom._y; level_texture = 3; if (spawnpoint == 1) { camera._x = game.game.spawn1._x + 200; camera._y = game.game.spawn1._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = p1; f_CameraPop(); target_scale = 60; f_ScalePop(); f_CameraPop(); p1.gotoAndStop('hide'); } var v1 = f_Item(game.game.item1xy._x, game.game.item1xy._y, game.game.item1xy._y + 1, 'gun1', 100, 100); v1.body_type = 100; v1.ammo = 50; v1.gun_type = 1; v1.body.ammo.text = v1.ammo; } function f_Training() { camera._x = game.game.chase_cam._x; camera._y = game.game.chase_cam._y; f_CameraPop(); p1._x = game.game.spawn1._x; p1._y = game.game.spawn1._y; f_InitPlayer(p1); camera.prey = game.game.chase_cam; f_CameraPop(); p1.gotoAndStop('stand'); } function f_rad2deg(radian) { return 57.29577951308232 * radian; } function f_NewGame() { f_Clear(); f_DefaultStats(); kills = 0; clown_health = 1200; clown_health_cp = clown_health; clown_cp1 = clown_health * 0.9; clown_cp2 = clown_health * 0.7; clown_cp3 = clown_health * 0.55; clown_cp4 = clown_health * 0.35; clown_cp5 = clown_health * 0.15; agent_health = 400; stair_boss = false; lives = 3; got_pacifist = false; current_hit = 0; current_shot = 0; spawnpoint = 1; } function f_GameXY() { game_x = game._x * u_scale + game.game._x; game_y = game._y * u_scale + game.game._y; f_Parallax(); } function f_CameraPop() { do { var u_x = game_x; var u_y = game_y; draw(); } while (Math.abs(u_x - game_x) > 0.1 or Math.abs(u_y - game_y) > 0.1); return undefined; u_point.x = 0; u_point.y = 0; camera.prey.localToGlobal(u_point); camera._x = u_point.x * u_scale - game_x; camera._y = u_point.y * u_scale - game_y; u_point.x = 0; u_point.y = 0; camera.localToGlobal(u_point); var u_x = u_point.x * u_scale; var u_y = u_point.y * u_scale; var v2 = screenWidthDefault / 2; if (Math.abs(v2 - u_x) > 10) { var v3 = v2 - u_x; game.game._x += v3; } var v1 = screenHeightDefault - 80; if (Math.abs(v1 - u_y) > 10) { v3 = v1 - u_y; game.game._y += v3; } f_GameXY(); } function f_ScalePop() { var v1 = target_scale - game._xscale; f_ScreenScale(v1); } function f_MoveGameX(u_speed) { game.game._x += u_speed; } function f_MoveGameY(u_speed) { game.game._y += u_speed; if (bg2vert) { game.game.bg2._y -= u_speed * ((game._xscale / 100) * 0.6); } else { game.game.bg2._y -= u_speed * (game._xscale / 100); } if (bg3vert) { game.game.bg3._y -= u_speed * ((game._xscale / 100) * 0.9); } else { game.game.bg3._y -= u_speed * (game._xscale / 100); } } function draw() { if (camera.prey == p1) { if (p1._xscale > 0 or p1.jump_speed_x > 0) { if (Key.isDown(p1.b_right) and p1.right_timer >= 15 or p1.jump_speed_x > 0 or Key.isDown(p1.b_punch1) and p1.gun_type < 100 and !Key.isDown(p1.b_up) and p1._xscale > 0) { camera._x = p1.x + 200 * u_scale; } else { camera._x = p1.x + 100 * u_scale; camera._x = p1.x; } } else { if (Key.isDown(p1.b_left) and p1.left_timer >= 15 or p1.jump_speed_x < 0 or Key.isDown(p1.b_punch1) and p1.gun_type < 100 and !Key.isDown(p1.b_up) and p1._xscale < 0) { camera._x = p1.x - 200 * u_scale; } else { camera._x = p1.x - 100 * u_scale; camera._x = p1.x; } } if (!p1.platform) { camera._y = p1.y + 70 + p1.speed_y * 1.5; } else { if (p1.crouch and p1.crouch_timer > 30) { if (camera._y + 5 < p1.y + 300) { camera._y += 5; } else { if (camera._y < p1.y) { camera._y = p1.y; } } } else { if (p1.platform.y_mod) { if (p1.platform.diagonal) { camera._y = p1.y + p1.platform.y_mod * p1.platform_percent; } else { camera._y = p1.y + p1.platform.y_mod; } } else { camera._y = p1.y; } } } } else { if (camera.prey) { u_point.x = 0; u_point.y = 0; camera.prey.localToGlobal(u_point); camera._x = int(int(u_point.x) * u_scale - int(game_x)); camera._y = int(int(u_point.y) * u_scale - int(game_y)); } } if (camera._y > game.game.camera_bottom._y) { camera._y = game.game.camera_bottom._y; } var v9 = false; var v8 = false; if (limit_left) { if (camera._x - screenWidth / 2 < limit_left) { camera._x = limit_left + screenWidth / 2; v9 = true; } } if (limit_right) { if (camera._x + screenWidth / 2 > limit_right) { camera._x = limit_right - screenWidth / 2; v8 = true; } } if (v9 or v8) { var v6 = (screenWidthDefault / (limit_right - limit_left)) * 100; if (v6 > target_scale) { camera._x = limit_left + (limit_right - limit_left) / 2; target_scale = v6; } } if (limit_top) { if (camera._y < limit_top) { camera._y = limit_top; } } if (limit_bottom) { if (camera._y > limit_bottom) { camera._y = limit_bottom; } } u_point.x = 0; u_point.y = 0; camera.localToGlobal(u_point); var v3 = u_point.x; var v2 = u_point.y; var v5 = screenWidthDefault / 2; camera_lag = camera_lag_default; if (nostopping) { camera_lag = 5; } if (Math.abs(v5 - v3) > 1) { var v7 = camera_lag; if (game._xscale - target_scale != 0) { v7 = 6; } var v10 = (v5 - v3) / v7; f_MoveGameX(v10 * u_scale); } else { f_MoveGameX(v5 - v3); } game_x = game._x * u_scale + game.game._x; var v4 = false; if (currentlevel != 'level1_30') { if (limit_left) { if (limit_left + game_x > 0) { v4 = true; f_MoveGameX(-(limit_left + game_x)); } } if (!v4) { if (limit_right) { if (limit_right + game_x < screenWidth) { v4 = true; f_MoveGameX(screenWidth - (limit_right + game_x)); } } } } var v1 = screenHeightDefault - 80 * (game._xscale / 100); if (Math.abs(v1 - v2) > 1) { var v7 = 6; if (game._xscale - target_scale != 0) { v7 = 3; } var v10 = (v1 - v2) / v7; f_MoveGameY(v10 * u_scale); } else { f_MoveGameY(v1 - v2); } if (shake_x != 0) { f_MoveGameX(shake_x); shake_x *= -1; if (shake_x > 0) { --shake_x; } else { ++shake_x; } } if (shake_y != 0) { f_MoveGameY(shake_y); shake_y *= -1; if (shake_y > 0) { --shake_y; } else { ++shake_y; } } f_GameXY(); } function f_CameraFollowX(zone, u_temp, u_cam) { u_cam._x = zone.x + (u_temp.x - zone.x) / 2; } function f_CameraFollowCY(zone, u_temp, u_cam) { u_cam.x = zone.x + (u_temp.x - zone.x) / 2; if (zone == p1) { if (zone.x + game_x > screenWidth - 100) { u_cam.x += zone.x + game_x - (screenWidth - 100); } else { if (zone.x + game_x < 100) { u_cam.x += zone.x + game_x - 100; } } } u_cam.y = zone.y + (u_temp.y + 450 - zone.y) / 2; u_cam._x = u_cam.x; u_cam._y = u_cam.y; } function f_CameraFollow(zone, u_temp, u_cam) { u_cam.x = zone.x + (u_temp.x - zone.x) / 2; if (zone == p1) { if (zone.x + game_x > screenWidth - 100) { u_cam.x += zone.x + game_x - (screenWidth - 100); } else { if (zone.x + game_x < 100) { u_cam.x += zone.x + game_x - 100; } } } if (zone.y > u_temp.y) { u_cam.y = zone.y; } else { u_cam.y = u_temp.y; } u_cam._x = u_cam.x; u_cam._y = u_cam.y; } function f_CameraFollow3(zone, u_temp, u_temp2, u_cam) { if (zone.x < u_temp.x) { var v5 = zone; var v6 = u_temp; } else { var v5 = u_temp; var v6 = zone; } if (u_temp2.x < v5.x) { v5 = u_temp2; } else { if (u_temp2.x > v6.x) { v6 = u_temp2; } } u_cam.x = v5.x + (v6.x - v5.x) / 2; if (zone.y > u_temp.y) { u_cam.y = zone.y; } else { u_cam.y = u_temp.y; } if (u_temp2.y > u_cam.y) { u_cam.y = u_temp2.y; } u_cam._x = u_cam.x; u_cam._y = u_cam.y; } function f_ScaleFollow(zone, u_temp, max_scale, min_scale) { if (!max_scale) { max_scale = 100; } if (!min_scale) { min_scale = 10; } var v4 = Math.abs(zone.x - u_temp.x) + screenWidthDefault / 2; if (v4 > screenWidthDefault) { target_scale = max_scale * (screenWidthDefault / v4); } else { target_scale = max_scale; } v4 = Math.abs(zone.y - u_temp.y) + screenHeightDefault / 2 + 100; if (v4 > screenHeightDefault) { var v2 = max_scale * (screenHeightDefault / v4); } else { var v2 = max_scale; } if (v2 < target_scale) { target_scale = v2; } if (target_scale < min_scale) { target_scale = min_scale; } else { if (target_scale > max_scale) { target_scale = max_scale; } } } function f_ScaleFollow3(zone, u_temp, u_temp2) { if (zone.x < u_temp.x) { var v9 = zone; var v6 = u_temp; } else { var v9 = u_temp; var v6 = zone; } if (u_temp2.x < v9.x) { v9 = u_temp2; } else { if (u_temp2.x > v6.x) { v6 = u_temp2; } } if (zone.y > u_temp.y) { var v7 = zone; var v8 = u_temp; } else { var v7 = u_temp; var v8 = zone; } if (u_temp2.y > v7.y) { v7 = u_temp2; } else { if (u_temp2.y < v8.y) { v8 = u_temp2; } } var v5 = Math.abs(v9.x - v6.x) + screenWidthDefault / 2; if (v5 > screenWidthDefault) { target_scale = 100 * (screenWidthDefault / v5); } else { target_scale = 100; } v5 = Math.abs(v8.y - v7.y) + screenHeightDefault / 2 + 100; if (v5 > screenHeightDefault) { var v4 = 100 * (screenHeightDefault / v5); } else { var v4 = 100; } if (v4 < target_scale) { target_scale = v4; } if (target_scale < 1) { target_scale = 1; } } function f_ScreenScale(scale_speed) { var v2 = camera._x + game_x; var v1 = camera._y + game_y; u_point.x = 0; u_point.y = 0; camera.localToGlobal(u_point); v2 = u_point.x; v1 = u_point.y; game._xscale += scale_speed; game._yscale += scale_speed; u_scale = 100 / game._xscale; screenHeight = screenHeightDefault * u_scale; screenWidth = screenWidthDefault * u_scale; f_GameXY(); u_point.x = 0; u_point.y = 0; camera.localToGlobal(u_point); var v4 = u_point.x; var v3 = u_point.y; game.game._x += (v2 - v4) * u_scale; game.game._y += (v1 - v3) * u_scale; f_GameXY(); } function main() { for (n in a_Events) { var v1 = a_Events[n]; if (Math.abs(p1.x - v1._x) < v1._width / 2) { if (p1.y < v1._y) { if (p1.y > v1._y - v1._height) { if (v1.warpto) { p1.wait = true; if (currentlevel != 'level1_26') { camera.paused = true; } fader.spawnpoint = v1.warpspawn; fader.warpto = v1.warpto; fader.gotoAndPlay('fadeout'); v1.warpto = undefined; if (v1.autowalk) { if (p1._xscale > 0 and v1.autodir < 0 or p1._xscale < 0 and v1.autodir > 0) { p1._xscale *= -1; } p1.wait = false; p1.autowalk_timer = 600; p1.invincible_timer = 200; if (p1.platform) { p1.gotoAndStop('autowalk'); } p1.gun.gun.gun.gun.gotoAndStop('idle'); v1.autowalk = false; } return undefined; } else { if (v1.camplay) { game.game.chase_cam.gotoAndPlay(v1.camplay); v1.camplay = undefined; } else { if (v1.respawn) { p1._x = v1.respawn._x; p1._y = v1.respawn._y; p1.x = p1._x; p1.y = p1._y; p1.platform = undefined; } else { if (v1.otherplay) { v1.other.gotoAndPlay(v1.otherplay); v1.otherplay = undefined; } } } } } } } } if (camera.paused) { fp_fpsLimiter(); return undefined; } if (game._xscale - target_scale != 0) { if (Math.abs(target_scale - game._xscale) < 1) { var v2 = target_scale - game._xscale; } else { var v2 = (target_scale - game._xscale) / 20; if (v2 < 1 and v2 > 0) { v2 = 1; } else { if (v2 > -1 and v2 < 0) { v2 = -1; } } } f_ScreenScale(v2); } draw(); fp_fpsLimiter(); } function startEngine() { go = true; } function f_RemovePlayer(zone) { f_ObjectPop(zone, a_Players); zone.active = false; zone.gotoAndStop('blank'); --players; if (players == 1) { f_GetPlayer(); } } function f_GetPlayer() { for (n in a_Players) { player = a_Players[n]; } } function f_PlayerPush(zone) { a_Players.push(zone); } function f_EnemyPush(zone) { a_Enemies.push(zone); } function f_RemoveEnemy(zone) { zone.active = false; if (zone.z_platform) { f_RemovePlatform(zone.z_platform); } if (zone.z_wall) { f_ObjectPop(zone.z_wall, a_Walls); } f_ObjectPop(zone, a_Enemies); } function f_ObjectPush(zone, a_Array) { a_Array.push(zone); } function f_ObjectPop(zone, a_Array) { for (n in a_Array) { if (a_Array[n] == zone) { a_Array.splice(n, 1); return undefined; } } } function f_SpawnPlayer(p_num, fileName) { u_char = game.game['p' + p_num]; loadMovie(fileName, u_char); } function f_Parallax() { var v3 = game._xscale / 100; var v7 = (Stage.width / 2 - game._x) / v3 - game.game._x; var v6 = (Stage.height / 2 - game._y) / v3 - game.game._y; var v5 = Stage.width / 2 - game._x - v7; var v4 = Stage.height / 2 - game._y - v6; var v2 = bg_default_x - v5; var v1 = bg_default_y - v4; game.game.bg1._x = bg1_default_x - bg_default_x + v2 * 0.4; game.game.bg2._x = bg2_default_x - bg_default_x + v2 * 0.6; game.game.bg1._y = bg1_default_y - bg_default_y + v1 * 0.4; game.game.bg2._y = bg2_default_y - bg_default_y + v1 * 0.6; } function fpsLimiter() { newT = getTimer(); while (Math.abs(newT - oldT) < maxF) { newT = getTimer(); } oldT = getTimer(); } function f_FacePrey(zone) { if (zone.x < zone.prey.x) { if (zone._xscale < 0) { zone._xscale *= -1; } } else { if (zone.x > zone.prey.x) { if (zone._xscale > 0) { zone._xscale *= -1; } } } } function f_FlameOn(sideView) { if (_quality == 'low') { return undefined; } screenOverlay = new ScreenOverlay(); screenOverlay.resetParameters(); if (sideView) { screenOverlay.overlayClips = [game.game.clownbody, game.game.clownhead.head.head.horn, game.game.hand1.body, game.game.hand2.body]; screenOverlay.overlayParent = game.game.hand2.trails; } else { screenOverlay.overlayClips = [game.game.clownbody, game.game.clownhead.head.head.horn, game.game.hand1.body, game.game.hand2.body]; screenOverlay.overlayParent = game.game.clownbody.trails; } screenOverlay.overlayColorTransform.redMultiplier = 1.5; screenOverlay.overlayColorTransform.alphaMultiplier = 0.9; screenOverlay.overlayBlendMode = 'add'; screenOverlay.accumulate = true; screenOverlay.iterations = 1; screenOverlay.scale = 0.2; screenOverlay.start(); } function f_ChasePrey(zone, u_range) { var v3 = zone.x; zone.target_x = zone.prey.x; for (i in a_Enemies) { var v2 = a_Enemies[i]; if (v2 != zone) { if (v2.target_x == zone.target_x) { if (zone.x > zone.target_x and v2.x > zone.target_x) { if (zone.x > v2.x) { zone.target_x += 150; } } else { if (zone.x < zone.target_x and v2.x < zone.target_x) { if (zone.x < v2.x) { zone.target_x -= 150; } } } } } } if (zone.x < zone.target_x - u_range) { f_MoveH(zone, zone.speed_x); zone.gotoAndStop('run'); } else { if (zone.x > zone.target_x + u_range) { f_MoveH(zone, -zone.speed_x); zone.gotoAndStop('run'); } else { zone.gotoAndStop('stand'); } } if (zone.prey.y < zone.y - 30 and zone.prey.y > zone.y - 300) { if (zone.x < zone.prey.platform.x - zone.prey.platform.w) { if (zone.x > zone.prey.platform.x - zone.prey.platform.w - 400) { f_CharJump(zone); zone.jump_speed_x = zone.speed_x * 0.7; } } else { if (zone.x > zone.prey.platform.x + zone.prey.platform.w) { if (zone.x < zone.prey.platform.x + zone.prey.platform.w + 400) { f_CharJump(zone); zone.jump_speed_x = -zone.speed_x * 0.7; } } } } if (zone.platform == undefined) { f_CharJump(zone); if (zone.prey.y > zone.y) { zone.speed_y = 1; } if (zone._xscale > 0) { zone.jump_speed_x = zone.speed_x_min; } else { zone.jump_speed_x = -zone.speed_x_min; } } else { if (v3 == zone.x and zone.prey.y > zone.y - 300 and (zone.prey.y < zone.y - 30 or !zone.platform.dropthru)) { f_CharJump(zone); if (zone._xscale > 0) { zone.jump_speed_x = zone.speed_x; } else { zone.jump_speed_x = -zone.speed_x; } } else { if (zone.prey.platform and Math.abs(zone.x - zone.prey.x) < 100 and zone.prey.y > zone.y - 300) { if (zone.prey.y < zone.y - 100) { f_CharJump(zone); } else { if (zone.prey.y > zone.y + 100 and zone.platform.dropthru) { f_CharJump(zone); zone.y += 20; zone._y = zone.y; zone.speed_y = 1; } } } } } } function f_CharJump(zone) { zone.jumping = true; zone.speed_y = zone.launch; zone.jump_speed_x = 0; zone.punching = false; zone.midpunch = false; zone.platform = undefined; zone.ladder = undefined; zone.crouch = false; f_ResetRotation(zone); if (!zone.nojumpanim) { zone.gotoAndStop('jump1'); } } function f_CharJumping(zone) { if (zone.platform == undefined or zone.jumping) { if (zone.float_timer > 0) { --zone.float_timer; } else { if (zone.speed_y >= 0) { if (f_PY(zone, zone.speed_y) == false) { f_MoveV(zone, zone.speed_y); zone.speed_y += zone.weight; if (zone.speed_y > speed_y_max) { zone.speed_y = speed_y_max; } zone.jumping = false; if (!zone.nojumpanim) { f_GoFrame(zone, 'jump1_mid'); } } else { zone.punching = false; zone.midpunch = false; if (zone.firstland) { zone.firstland = false; zone.gotoAndStop('stand'); } else { if (zone.landanim) { if (zone.newspawn) { zone.gotoAndStop('stand'); } else { zone.gotoAndStop(zone.landanim); } } else { if (!zone.nojumpanim) { f_GoFrame(zone, 'stand'); } } } } } else { if (f_WallAbove(zone, zone.speed_y) == false) { f_MoveV(zone, zone.speed_y); } zone.speed_y += zone.weight; if (zone.speed_y > speed_y_max) { zone.speed_y = speed_y_max; } } if (zone.speed_y > zone.speed_y_max) { zone.speed_y = zone.speed_y_max; } } if (zone.jump_speed_x != 0) { f_MoveH(zone, zone.jump_speed_x); } return true; } return false; } function f_HitSkylight(zone) { --zone.health; if (zone.health <= 0) { i = 1; while (i <= 6) { var v4 = _root.f_ShrapnelGeneral(zone.x - zone._width / 2 + zone._width * (i / 6), zone.y - 150, zone.y + 1, -15 + random(30), -(12 + random(10)), 'glass'); v4.bounce_limit = 2; v4.fp_ShrapnelEnd = _root.f_ShrapnelVanish; ++i; } game.game.building.skylight.gotoAndStop(2); game.game.skylight.active = false; game.game.skylight.alive = false; s_glass1.start(0, 0); f_RemovePlatform(game.game.skylight.z_platform); } else { _root.f_BulletImpactSound(this); var v4 = _root.f_ShrapnelGeneral(zone.hitby.x, zone.y - 150, zone.y + 1, -15 + random(30), -(12 + random(10)), 'glass'); v4.bounce_limit = 2; v4.fp_ShrapnelEnd = _root.f_ShrapnelVanish; } } function f_HitType1(zone) { if (zone.hitby.x > zone.x or zone.hitby.force_x < 0) { if (zone._xscale < 0) { zone._xscale *= -1; } } else { if (zone.hitby.x < zone.x or zone.hitby.force_x > 0) { if (zone._xscale > 0) { zone._xscale *= -1; } } } zone.health -= zone.hit_damage_val; if (zone.health <= 0) { zone.alive = false; zone.health = 0; if (zone.force_y > -10 and zone.force_y < 5) { zone.force_y = -10; } } if (!zone.hitby.bullet and zone.hitby != p1) { if (Math.abs(zone.force_x) > 12) { s_punch3.start(0, 0); } else { f_PunchSound(); } } if (zone.platform == undefined or zone.force_y < -5 or Math.abs(zone.force_x) > 20) { f_HitToss(zone); } else { if (zone.hit_timer < 30) { zone.hit_timer = 0; if (zone.hit_last == 1) { zone.hit_last = 2; zone.gotoAndStop('hit2'); } else { zone.hit_last = 1; zone.gotoAndStop('hit1'); } } else { zone.hit_timer = 0; zone.hit_last = 1; zone.gotoAndStop('hit1'); } } } function f_HitType2(zone) { f_PixelFly(zone.x + random(50) - 25, zone.y - 100); f_PixelFly(zone.x + random(50) - 25, zone.y - 75); f_PixelFly(zone.x + random(50) - 25, zone.y - 50); f_Damage(zone, zone.hit_damage_val); if (zone.hitby.x > zone.x) { if (zone._xscale < 0) { zone._xscale *= -1; } } else { if (zone._xscale > 0) { zone._xscale *= -1; } } if (zone.health <= 0) { zone.gotoAndStop('die'); return undefined; } } function f_HitToss(zone) { f_TossInit(zone, zone.force_x, zone.force_y); } function f_HitTossDamage(zone) { if (zone.hitby._xscale > 0) { f_TossInit(zone, zone.force_x, zone.force_y); } else { f_TossInit(zone, -zone.force_x, zone.force_y); } zone.body.body.nextFrame(); } function f_HitDie(zone) { f_Damage(zone, zone.hit_damage_val); zone.gotoAndStop('die'); } function f_Scout(zone) { if (!f_CharJumping(zone)) { if (zone.scout_timer > 0) { --zone.scout_timer; if (zone.scout_timer <= 0) { zone._xscale *= -1; } else { return undefined; } } if (zone._xscale > 0) { if (zone.x + game_x - zone.w * 2 > screenWidth or zone.x > p1.x + 400) { zone._xscale *= -1; } } else { if (zone.x + game_x + zone.w * 2 < 0 or zone.x < p1.x - 400) { zone._xscale *= -1; } } if (zone._xscale > 0) { if (zone.x < p1.x and zone.x > p1.x - 100 and Math.abs(zone.y - p1.y) < 20) { zone.gotoAndStop('stand'); } else { if (zone.x + zone.speed_x > zone.platform.x + zone.platform.w - 75) { zone.scout_timer = 30; zone.gotoAndStop('stand'); } else { zone.gotoAndStop('walk'); if (f_MoveH(zone, zone.speed_x) != zone.speed_x) { zone._xscale *= -1; } } } } else { if (zone.x > p1.x and zone.x < p1.x + 100 and Math.abs(zone.y - p1.y) < 20) { zone.gotoAndStop('stand'); } else { if (zone.x - zone.speed_x < zone.platform.x - zone.platform.w + 75) { zone.scout_timer = 30; zone.gotoAndStop('stand'); } else { zone.gotoAndStop('walk'); if (f_MoveH(zone, -zone.speed_x) != -zone.speed_x) { zone._xscale *= -1; } } } } } } function f_Scout2(zone) { if (!f_CharJumping(zone)) { if (zone.scout_timer > 0) { --zone.scout_timer; if (zone.scout_timer <= 0) { if (zone.x > p1.x and zone._xscale > 0 or zone.x < p1.x and zone._xscale < 0) { zone._xscale *= -1; } else { zone.scout_timer = 1; } } else { return undefined; } } if (zone._xscale > 0) { if (zone.x + game_x - zone.w * 2 > screenWidth or zone.x > p1.x + 400) { zone._xscale *= -1; } } else { if (zone.x + game_x + zone.w * 2 < 0 or zone.x < p1.x - 400) { zone._xscale *= -1; } } if (zone._xscale > 0) { if (zone.x <= p1.x and zone.x > p1.x - 100 and Math.abs(zone.y - p1.y) < 20) { zone.gotoAndStop('stand'); } else { if (zone.x + zone.speed_x > zone.platform.x + zone.platform.w - 75) { zone.scout_timer = 30; zone.gotoAndStop('stand'); } else { u_wait = false; for (i in a_Enemies) { var v2 = a_Enemies[i]; if (v2 == zone) { break; } else { if (v2.humanoid) { if (Math.abs(zone.x - v2.x) < 40) { u_wait = true; } } } } if (u_wait) { zone.gotoAndStop('stand'); } else { zone.gotoAndStop('walk'); if (f_MoveH(zone, zone.speed_x) != zone.speed_x) { zone._xscale *= -1; } } } } } else { if (zone.x > p1.x and zone.x < p1.x + 100 and Math.abs(zone.y - p1.y) < 20) { zone.gotoAndStop('stand'); } else { if (zone.x - zone.speed_x < zone.platform.x - zone.platform.w + 75) { zone.scout_timer = 30; zone.gotoAndStop('stand'); } else { zone.gotoAndStop('walk'); if (f_MoveH(zone, -zone.speed_x) != -zone.speed_x) { zone._xscale *= -1; } } } } } } function f_ScoutAttack(zone) { if (!f_CharJumping(zone)) { if (zone.scout_timer <= 0) { if (zone._xscale > 0) { if (zone.x + zone.speed_x > zone.platform.x + zone.platform.w - 50) { zone._xscale *= -1; zone.gotoAndStop('stand'); } else { if (f_MoveH(zone, zone.speed_x) != zone.speed_x) { zone._xscale *= -1; zone.gotoAndStop('stand'); } } } else { if (zone.x - zone.speed_x < zone.platform.x - zone.platform.w + 50) { zone._xscale *= -1; zone.gotoAndStop('stand'); } else { if (f_MoveH(zone, -zone.speed_x) != -zone.speed_x) { zone._xscale *= -1; zone.gotoAndStop('stand'); } } } } else { --zone.scout_timer; } } } function f_HencherDefaults(zone) { zone.speed_x = zone.speed_x_min; } function f_HencherMelee(zone) { if (zone.punch_timer <= 0) { if (Math.abs(zone.x - p1.x) < 100) { if (zone.x > p1.x and zone._xscale < 0 or zone.x < p1.x and zone._xscale > 0) { if (Math.abs(zone.y - p1.y) < 10) { zone.skipwait = false; zone.punch_timer = zone.punch_timer_default; if (zone.hasgun) { zone.gun.gun.gun.gun.gotoAndStop('melee'); zone.shot_total = zone.shot_total_default; zone.shot_timer = 0; zone.gotoAndStop('punch1'); } else { zone.gotoAndStop('punch1'); } } } } } } function f_EnemyShooter(zone) { if (!_root.f_OnScreen(zone)) { return undefined; } if (zone.hasgun) { u_point.x = 0; u_point.y = 0; zone.gun.localToGlobal(u_point); zone_x = u_point.x * u_scale - game_x; zone_y = u_point.y * u_scale - game_y; u_x = zone.prey.x; u_y = zone.prey.y - 50; var v3 = f_rad2deg(Math.atan2(u_y - zone_y, u_x - zone_x)); if (zone._xscale < 0) { if (v3 < 0) { v3 = -(180 - Math.abs(v3)); } else { v3 = 180 - v3; } } zone.gun_frame = 30 - int(Math.abs((v3 + 106) / 212) * 29); if (zone.shot_timer <= 0) { if (zone.x < zone.prey.x and zone._xscale < 0 or zone.x > zone.prey.x and zone._xscale > 0) { zone.gun_frame = 15; if (zone._xscale > 0) { v3 = 0; } else { v3 = 0; } } var v6 = Math.abs(zone.gun._currentframe - zone.gun_frame); var v7 = Math.abs(zone.gun.gun._rotation - v3); if (v6 < v7) { var v5 = 4 * (v6 / v7); var v4 = 4; } else { var v5 = 4; var v4 = 4 * (v7 / v6); } if (zone.gun._currentframe < zone.gun_frame - v5) { zone.gun.gotoAndStop(zone.gun._currentframe + int(v5)); } else { if (zone.gun._currentframe > zone.gun_frame + v5) { zone.gun.gotoAndStop(zone.gun._currentframe - int(v5)); } } if (zone.gun.gun._rotation < v3 - v4) { zone.gun.gun._rotation += v4; } else { if (zone.gun.gun._rotation > v3 + v4) { zone.gun.gun._rotation -= v4; } else { var v8 = false; if (zone.x < zone.prey.x and zone._xscale > 0 or zone.x > zone.prey.x and zone._xscale < 0) { if (Math.abs(zone.y - zone.prey.y) < zone.shot_range_y or Math.abs(zone.x - zone.prey.x) < zone.shot_range_x) { zone.gun.gun._rotation = v3; zone.gun.gotoAndStop(zone.gun_frame); zone.punching = true; zone.gotoAndStop('stand'); f_EnemyBullet(zone); if (zone.gun_type == 6) { f_EnemyBullet(zone, -3); f_EnemyBullet(zone, 3); } f_GunSound(zone.gun_type); zone.gun.gun.gun.gun.gotoAndStop('shoot'); if (zone.gun_type == 2 or zone.gun_type == 5 or zone.gun_type == 6) { zone.shot1 = true; zone.gun.gun.gun.gun.body.gotoAndPlay(1); } --zone.shot_total; if (zone.shot_total > 0) { zone.skipwait = true; zone.shot_timer = 3; v8 = true; } } } if (!v8) { zone.shot_total = zone.shot_total_default; zone.shot_timer = 90; zone.punching = false; } } } } else { --zone.shot_timer; } zone.gun.gun._x = zone.gun.gun_pt._x; zone.gun.gun._y = zone.gun.gun_pt._y; } } function f_Hencher(zone) { --zone.punch_timer; if (!f_CharJumping(zone)) { if (zone.wait or zone.wait_timer > 0) { --zone.wait_timer; zone.gotoAndStop('stand'); return undefined; } else { if (zone.phase == 1) { if (zone.hasgun) { f_Scout(zone); f_HencherMelee(zone); } else { f_FacePrey(zone); if (!f_InRange(zone, 80, 5000) or Math.abs(zone.y - zone.prey.y) > 20 and zone.prey.platform) { zone.speed_x = zone.speed_x_max; f_ChasePrey(zone, 80); } else { if (zone.prey.y < zone.y - 20) { zone.gotoAndStop('lookup'); } else { zone.gotoAndStop('stand'); } f_HencherMelee(zone); } } } else { if (zone.phase == 3) { if (f_OnScreen(zone)) { f_EnemyShooter(zone); if (!zone.punching) { f_Scout2(zone); } } } else { if (zone.phase == 10) { f_EnemyShooter(zone); if (!zone.punching) { f_Scout(zone); f_HencherMelee(zone); } } else { if (zone.phase == 11) { zone.gotoAndStop('weld'); } else { if (zone.phase == 12) { zone.prey = game.game.target_pt; ++zone.rapidfire; if (zone.rapidfire < 100) { zone.shot_total = 2; if (zone.rapidfire % 3 == 0) { zone.shot_timer = 0; } } else { if (zone.rapidfire > 200) { zone.rapidfire = 0; } else { zone.shot_total = 0; zone.shot_timer = 1000; zone.gun.gun.gun.gun.gotoAndStop('idle'); } } f_EnemyShooter(zone); } else { if (zone.phase == 13) { if (f_OnScreen(zone)) { f_EnemyShooter(zone); } } } } } } } } } } function f_EnemyDefaults(zone) { zone.x = zone._x; zone.y = zone._y; if (!zone.nodepth) { zone.depth_mod = f_SetDepthMod(); f_Depth(zone, zone.y); } zone.speed_x = 6; zone.speed_y = 0; zone.speed_y_max = speed_y_max; zone.jump_speed_x = 0; zone.speed_ladder = 8; zone.launch = -38; zone.weight = 1.75; zone.bounce = 0.5; zone.force_x = 0; zone.force_y = 0; if (zone.zone) { zone.w = zone.zone._width / 2; } else { zone.w = zone._width / 2; } zone.h = zone._height; zone.fp_HitGround = f_HitGround1; zone.w2 = 2; zone.platform = undefined; zone.ladder = undefined; zone.punching = false; zone.active = true; zone.alive = true; zone.float_timer = 0; zone.texture = 4; zone.prey = p1; } function f_InitHencher(zone) { zone.fp_Hit1 = f_HitType1; f_EnemyDefaults(zone); zone.fp_HitGround = f_HitGround1; zone.health_max = 12; zone.health = zone.health_max; zone.bullet_type = 'bullet2'; zone.attack = 1; zone.defense = 1; zone.damage_val = zone.attack; zone.bloodtype = 1; zone.tossed = false; zone.onground = false; zone.x_range = 50 + random(60); zone.y_range = 6 + random(60); zone.attack_timer = 30; zone.landanim = 'land'; zone.w2 = 20; zone.w = 70; zone.punch_timer_default = 60; zone.punch_timer = 0; zone.wait_timer = 0; zone.newspawn = true; zone.humanoid = true; if (zone.gun_type) { zone.gun_init = zone.gun_type; } else { zone.gun_init = 0; } zone.gun_type = 100; if (zone.gun_init > 0) { switch (zone.gun_init) { case 1: f_GetGun1(zone); break; case 2: f_GetGun2(zone); break; case 3: f_GetGun3(zone); break; case 4: f_GetGun4(zone); break; case 5: f_GetGun5(zone); break; case 6: f_GetGun6(zone); } zone.hasgun = true; if (zone.shot_range_y == undefined) { zone.shot_range_y = 70; zone.shot_range_x = 50; } if (zone.shot_timer == undefined) { zone.shot_timer = 90; } if (zone.shot_total_default == undefined) { zone.shot_total_default = 1; } zone.shot_total = zone.shot_total_default; zone.gun.gun._rotation = 0; zone.gun.gotoAndStop(15); } else { zone.gun_type = 100; } zone.speed_x_max = 10; zone.speed_x_min = 5; zone.speed_x = 5; } function f_PushOut(zone) { if (Math.abs(p1.x - zone.x) < zone.w) { if (p1.y - p1.h <= zone.y) { if (p1.y >= zone.y - zone.h) { if (p1.x > zone.x) { f_MoveH(p1, zone.x + zone.w - p1.x); } else { f_MoveH(p1, zone.x - zone.w - p1.x); } } } } } function f_OnScreen(zone) { if (zone.x + game_x < screenWidth + zone.w * 2) { if (zone.x + game_x > -zone.w * 2) { if (zone.y + game_y > -10) { if (zone.y + game_y < screenHeight + zone.h + 10) { return true; } } } } return false; } function f_OnScreenActivate(zone) { if (f_OnScreen(zone)) { zone.gotoAndStop('activate'); } } function f_CrateHitWall(zone) { if (Math.abs(zone.toss_speed_x) > 20) { f_CrateExplode(zone); return true; } else { return false; } } function f_InitClownDemon2() { clown_lag = 1; game.game.moves.gotoAndPlay('on'); zone = game.game.clownhead; game.game.moves.clownhead.body.gotoAndPlay('idle'); zone.timer = 100; zone.phase = 1; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHead; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); zone = game.game.hand1; game.game.moves.hand1.body.gotoAndPlay('idle2'); _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone.gotoAndStop('idle'); zone = game.game.hand2; game.game.moves.hand2.body.gotoAndPlay('idle3'); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone.gotoAndStop('idle'); game.game.clownbody.timer = 0; game.game.clownbody.gotoAndStop('on'); game.game.clownhead.shot = 0; if (clown_health < clown_cp4 - 100) { clown_health = clown_cp4 - 100; } bosshealth.gotoAndStop('on'); bosshealth.health.health.text = clown_health; game.game.clownbody.gotoAndStop('idle'); game.game.clownbody._x += 300; game.game.clownhead._x += 300; game.game.hand1._x += 300; game.game.hand2._x += 300; f_FlameOn(true); } function f_InitClownDemon0() { clown_lag = 6; game.game.moves.gotoAndPlay('on'); zone = game.game.clownhead; game.game.moves.clownhead.gotoAndPlay('idle'); zone.timer = 100; zone.phase = 1; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHead; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); zone = game.game.hand1; game.game.moves.hand1.gotoAndPlay('idle2'); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone._xscale *= -1; zone.gotoAndStop('idle'); zone.body.body.gotoAndStop('palm'); zone = game.game.hand2; game.game.moves.hand2.gotoAndPlay('idle3'); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone.gotoAndStop('idle'); zone.body.body.gotoAndStop('palm'); game.game.clownbody._y = game.game.clownhead._y + 300; game.game.clownbody.gotoAndStop('on'); f_FlameOn(false); game.game.clownhead.shot = 0; bosshealth.gotoAndStop('on'); bosshealth.health.health.text = clown_health; } function f_InitClownDemon3() { clown_lag = 1; game.game.moves.gotoAndPlay('intro'); zone = game.game.clownhead; game.game.moves.clownhead.body.gotoAndPlay('idle'); zone.timer = 100; zone.phase = 1; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHead; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); zone = game.game.hand1; game.game.moves.hand1.body.gotoAndPlay('idle2'); _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone._xscale *= -1; zone.gotoAndStop('idle'); zone.body.body.gotoAndStop('palm'); zone = game.game.hand2; game.game.moves.hand2.body.gotoAndPlay('idle3'); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone.gotoAndStop('idle'); zone.body.body.gotoAndStop('palm'); game.game.clownbody.timer = 0; game.game.clownbody.gotoAndStop('on'); game.game.clownhead.shot = 0; if (clown_health < clown_cp3 - 100) { clown_health = clown_cp3 - 100; } bosshealth.gotoAndStop('on'); bosshealth.health.health.text = clown_health; f_FlameOn(false); } function f_InitClownDemon4() { clown_lag = 6; zone = game.game.clownbody; zone.x = zone._x; zone.y = zone._y; zone.w = 20; zone.h = 100; zone.w2 = 1; zone.speed_x = 0; zone.fx_timer = 1; zone.phase = 100; zone.phase_timer = 0; zone.gotoAndStop('on'); zone.body.gotoAndPlay('intro'); zone.body._xscale = -100; clown_lag = 1; zone = game.game.clownhead; zone.timer = 100; zone.phase = 1; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHead; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndPlay('intro'); f_ClownSmallMove(zone); zone = game.game.hand1; zone.gotoAndPlay('intro'); zone.body.body.gotoAndStop('fist2'); f_AddNeutral(zone); f_ClownSmallMove(zone); zone = game.game.hand2; zone.gotoAndPlay('intro'); zone.body.body.gotoAndStop('palm'); f_ClownSmallMove(zone); f_FlameOn(true); game.game.clownhead.shot = 0; if (clown_health < clown_cp5 - 100) { clown_health = clown_cp5 - 100; } bosshealth.gotoAndStop('on'); bosshealth.health.health.text = clown_health; } function f_InitClownDemon5() { clown_lag = 6; game.game.moves.gotoAndPlay('on'); zone = game.game.clownhead; game.game.moves.clownhead.body.gotoAndPlay('idle'); zone.timer = 100; zone.phase = 1; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHead; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); zone = game.game.hand1; game.game.moves.hand1.body.gotoAndPlay('idle2'); _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone._xscale *= -1; zone.gotoAndStop('idle'); zone = game.game.hand2; game.game.moves.hand2.body.gotoAndPlay('idle3'); zone.fp_Hit1 = f_HitClownHand; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; zone._xscale *= -1; zone.gotoAndStop('idle'); game.game.clownbody.timer = 0; game.game.clownbody.gotoAndStop('on'); game.game.clownhead.shot = 0; if (clown_health < clown_cp2 - 100) { clown_health = clown_cp2 - 100; } bosshealth.gotoAndStop('on'); bosshealth.health.health.text = clown_health; game.game.clownbody.gotoAndStop('idle'); f_FlameOn(true); } function f_HealthText(health) { if (health < 10) { var v2 = '00' + health.toString(); return v2; } if (health < 100) { v2 = '0' + health.toString(); return v2; } v2 = health; return v2; } function f_HitClownHead(zone) { zone.slide_x = zone.hitby.force_x / 2; zone.slide_y = zone.hitby.force_y / 2; clown_health -= zone.hitby.damage_val; if (clown_health <= 0) { clown_health = 0; } bosshealth.health.health.text = f_HealthText(clown_health); zone.gotoAndPlay('hit'); } function f_HitClownHand(zone) { zone.slide_x = zone.hitby.force_x; zone.slide_y = zone.hitby.force_y; zone.gotoAndPlay('hit'); } function f_ClownShot(zone) { --zone.shot_timer; if (zone.shot_timer <= 0) { zone.shot_timer = 2; u_point.x = 0; u_point.y = 0; game.game.clownhead.bullet_pt.localToGlobal(u_point); var v6 = u_point.x * u_scale - game_x; var v4 = u_point.y * u_scale - game_y; ++game.game.clownhead.shot; if (game.game.clownhead.shot > 16) { game.game.clownhead.shot = 1; } var v1 = game.game.fireballs['e' + game.game.clownhead.shot]; v1._xscale = 90 + random(30); v1._yscale = 90 + random(30); v1._rotation = random(180); v1.gotoAndPlay(2); v1._x = v6 - game.game.fireballs._x; v1._y = v4 - game.game.fireballs._y; var u_scale = 100 + random(40); v1.body._xscale = u_scale; v1.body._yscale = u_scale; var v2 = game.game.clownhead._rotation + 90; var v3 = 40; v1.speed_x = v3 * Math.cos(PI * v2); v1.speed_y = v3 * Math.sin(PI * v2); v1._rotation = random(180); v1.force_x = Math.abs(v1.speed_x / 2); v1.force_y = v1.speed_y; } } function f_ClownMode1Timer(zone) { --zone.timer; if (zone.timer <= 0) { if (zone.phase == 1) { zone.timer = 100; if (clown_health < clown_cp4) { game.game.moves.hand2.busy = true; game.game.moves.hand2.gotoAndPlay('punch2'); } else { if (p1.pipe) { game.game.moves.hand2.busy = true; game.game.moves.hand2.gotoAndPlay('punch1'); } else { zone.head.gotoAndPlay('fire'); } } } } } function f_ClownHeadFireRotate(zone, new_rotation) { if (zone._rotation < new_rotation) { zone._rotation += 2; if (zone._rotation >= new_rotation) { zone._rotation = new_rotation; } } else { if (zone._rotation > new_rotation) { zone._rotation -= 2; if (zone._rotation <= new_rotation) { zone._rotation = new_rotation; } } } } function f_ClownHeadFollow(zone) { var v4 = p1.x; var v3 = p1.y - 50; var v2 = 110 * ((p1.x + game_x) / screenWidth); new_rotation = (1 - (p1.y + game_y) / screenHeight) * v2 - v2 * 0.3; if (zone._rotation < new_rotation) { zone._rotation += 2; if (zone._rotation >= new_rotation) { zone._rotation = new_rotation; } } else { if (zone._rotation > new_rotation) { zone._rotation -= 2; if (zone._rotation <= new_rotation) { zone._rotation = new_rotation; } } } } function f_ClownHandMove(zone) { if (zone == game.game.clownhead) { var v3 = game.game.moves._x + game.game.moves.clownhead._x + game.game.moves.clownhead.body._x; var v4 = game.game.moves._y + game.game.moves.clownhead._y + game.game.moves.clownhead.body._y; if (currentlevel == 'level1_22') { zone._rotation = game.game.moves.clownhead._rotation; } var v5 = 6; } else { if (zone == game.game.hand1) { var v5 = clown_lag; var v3 = game.game.moves._x + game.game.moves.hand1._x - game.game.moves.hand1.body._x; var v4 = game.game.moves._y + game.game.moves.hand1._y + game.game.moves.hand1.body._y; zone._rotation = game.game.moves.hand1.body._rotation; } else { var v5 = clown_lag; var v3 = game.game.moves._x + game.game.moves.hand2._x + game.game.moves.hand2.body._x; if (zone.knockout) { var v4 = p1.y; if (p1.x > v3) { f_MoveH(p1, v3 - p1.x); if (!zone.u_hit) { zone.u_hit = true; s_punch3.start(0, 0); f_TossInit(p1, -30, -12); } } if (p1.wall_pt) { p1.wall_pt = undefined; p1.gotoAndStop('hide'); if (game.game.hankhole._y > p1.y - 35) { game.game.hankhole._y = p1.y - 35; game.game.hankhole2._y = p1.y - 35; } game.game.hankhole.gotoAndStop('on'); game.game.hankhole2.gotoAndStop('on'); _root.hole_y = p1.y - 35; shake_y = 14; s_explosion3.start(0, 0); fader.spawnpoint = 1; fader.warpto = 'level1_24'; fader.gotoAndPlay('fadeout'); } } else { var v4 = game.game.moves._y + game.game.moves.hand2._y + game.game.moves.hand2.body._y; } zone._rotation = game.game.moves.hand2.body._rotation; } } if (Math.abs(zone.slide_x) > 1 and Math.abs(zone.x - v3) < 200) { zone.x += zone.slide_x; zone.slide_x *= 0.75; } else { if (Math.abs(zone.x - v3) > 1) { zone.x += (v3 - zone.x) / v5; } else { zone.x = v3; } } if (Math.abs(zone.slide_y) > 1 and Math.abs(zone.y - v4) < 200) { zone.y += zone.slide_y; zone.slide_y *= 0.75; } else { if (Math.abs(zone.y - v4) > 1) { zone.y += (v4 - zone.y) / v5; } else { zone.y = v4; } } if (zone == game.game.clownhead) { if (game.game.clown_bottom) { if (zone.y > game.game.clown_bottom._y) { zone.y = game.game.clown_bottom._y; } } if (game.game.jaw) { game.game.jaw._x = zone._x; game.game.jaw._y = zone._y; game.game.jaw._rotation = zone._rotation; } } zone._x = zone.x; zone._y = zone.y; } function f_ClownBodySide(zone) { if (currentlevel == 'level1_23') { zone._x = game.game.clownhead._x; zone._yscale = ((zone._y - (game.game.clownhead._y - 100)) / 400) * 100; } else { var v3 = game.game.moves._x + game.game.moves.clownbody._x + game.game.moves.clownbody.body._x; var v2 = game.game.moves._y + game.game.moves.clownbody._y + game.game.moves.clownbody.body._y; zone._x = v3; zone._y = v2; zone._rotation = game.game.moves.clownbody._rotation; } } function f_ClownBody(zone) { if (zone._y > zone.default_y) { zone._y = game.game.clownhead._y + 300; if (zone._y < zone.default_y) { zone._y = zone.default_y; } } var v3 = zone._x + zone.center._x; var v2 = zone._y + zone.center._y; var v4 = 0; zone.hand1._x = v3 + (game.game.hand1._x - v3) * 0.9 - zone._x; zone.hand1._y = v2 + (game.game.hand1._y - v4 - v2) * 0.75 - zone._y; zone.hand2._x = v3 + (game.game.hand2._x - v3) * 0.9 - zone._x; zone.hand2._y = v2 + (game.game.hand2._y - v4 - v2) * 0.75 - zone._y; zone.hand3._x = v3 + (game.game.hand1._x - v3) * 0.5 - zone._x; zone.hand3._y = v2 + (game.game.hand1._y - v4 - v2) * 0.25 - zone._y; zone.hand4._x = v3 + (game.game.hand2._x - v3) * 0.5 - zone._x; zone.hand4._y = v2 + (game.game.hand2._y - v4 - v2) * 0.25 - zone._y; zone.body1._x = v3 + (game.game.clownhead._x - v3) * 0.25 - zone._x; zone.body1._y = v2 + (game.game.clownhead._y - v2) * 0.25 - zone._y; zone.hair._x = game.game.clownhead._x - zone._x; zone.hair._y = game.game.clownhead._y - 175 - zone._y; zone.hair._rotation = game.game.clownhead._rotation; if (game.game.clownhead.alive) { game.game.moves._x = game.game.center_pt._x + (game.game.p1.x - game.game.center_pt._x) * 0.25; game.game.moves.clownhead._x = game.game.center_pt._x + (game.game.p1.x - game.game.center_pt._x) * 0.5 - game.game.moves._x; game.game.clownbody._x = game.game.moves._x; ++zone.timer; if (zone.timer > 180) { if (zone.timer % 600 == 0) { if (game.game.moves._x < game.game.center_pt._x) { game.game.moves.clownhead.busy = true; game.game.moves.clownhead.gotoAndPlay('attack1'); } else { game.game.moves.clownhead.busy = true; game.game.moves.clownhead.gotoAndPlay('attack2'); } } else { if (zone.timer % 400 == 0) { game.game.moves.hand2.gotoAndPlay('swipe'); } else { if (zone.timer % 200 == 0) { game.game.moves.hand1.gotoAndPlay('swipe'); } } } } } else { if (game.game.moves._x < game.game.center_pt._x - 10) { game.game.moves._x += 10; } else { if (game.game.moves._x > game.game.center_pt._x + 10) { game.game.moves._x -= 10; } } if (game.game.moves.clownhead._x + game.game.moves._x < game.game.center_pt._x - 10) { game.game.moves.clownhead._x += 10; } else { if (game.game.moves.clownhead._x + game.game.moves._x > game.game.center_pt._x + 10) { game.game.moves.clownhead._x -= 10; } } game.game.clownbody._x = game.game.center_pt._x + (game.game.clownhead._x - game.game.center_pt._x) * 0.5; } } function f_ClownFireball(zone) { zone._x += zone.speed_x; if (zone.speed_y != 0) { var v5 = zone._x + game.game.fireballs._x; var v4 = zone._y + game.game.fireballs._y; for (n in a_Platforms) { var v2 = a_Platforms[n]; if (Math.abs(v5 - v2.x) < v2.w) { if (v4 < v2.y) { if (v4 + zone.speed_y >= v2.y) { zone.speed_y = 0; } } } } } zone._y += zone.speed_y; v5 = zone._x + game.game.fireballs._x; v4 = zone._y + game.game.fireballs._y; if (Math.abs(v5 - p1.x) < 75) { if (Math.abs(v4 - p1.y) < 75) { if (p1.invincible_timer <= 0) { p1.force_x = 0; p1.force_y = -20; p1.smoke_timer = 30; p1.fp_Hit1(p1); p1.invincible_timer = 30; shake_x = 10; } } } for (n in a_Enemies) { var v1 = a_Enemies[n]; if (v1 != game.game.clownhead) { if (Math.abs(v5 - v1.x) < 75) { if (Math.abs(v4 - v1.y) < 75) { if (v1.invincible_timer <= 0) { v1.force_x = 0; v1.force_y = -5; v1.smoke_timer = 60; v1.health = 0; v1.fp_Hit1(v1); v1.invincible_timer = 30; } } } } } } function f_ClownHandSmash(zone) { if (zone._xscale < 0) { var v4 = game.game.hand1._x; var v1 = game.game.hand1._y; var v3 = 35; } else { var v4 = game.game.hand2._x; var v1 = game.game.hand2._y; var v3 = -35; } var v5 = game.game.hand1.zone._width / 2; var v2 = game.game.hand1.zone._height / 2; if (Math.abs(v4 - p1.x) < v5) { if (p1.y - p1.zone._height < v1 + v2) { if (p1.y > v1 - v2) { if (p1.invincible_timer <= 0) { p1.force_x = v3; p1.force_y = -17; p1.fp_Hit1(p1); p1.invincible_timer = 30; shake_y = 10; s_punch3.start(0, 0); if (zone._xscale < 0) { game.game.hand1.gotoAndPlay('smack'); } else { game.game.hand2.gotoAndPlay('smack'); } } } } } } function f_ClownSideFire1(zone) { --zone.shot_timer; if (zone.shot_timer <= 0) { zone.shot_timer = 2; u_point.x = 0; u_point.y = 0; game.game.clownhead.bullet_pt.localToGlobal(u_point); var v6 = u_point.x * u_scale - game_x; var v4 = u_point.y * u_scale - game_y; ++game.game.clownhead.shot; if (game.game.clownhead.shot > 16) { game.game.clownhead.shot = 1; } var v1 = game.game.fireballs['e' + game.game.clownhead.shot]; v1._xscale = 80 + random(30); v1._yscale = 80 + random(30); v1._rotation = random(180); v1.gotoAndPlay(2); v1._x = v6 - game.game.fireballs._x; v1._y = v4 - game.game.fireballs._y; var u_scale = 70 + random(40); v1.body._xscale = u_scale; v1.body._yscale = u_scale; if (currentlevel == 'level1_22') { var v2 = game.game.clownhead._rotation + 90; } else { if (currentlevel == 'level1_21') { var v2 = game.game.clownhead._rotation + 45; } else { if (currentlevel == 'level1_29') { var v2 = -90; } else { var v2 = game.game.clownhead._rotation + 135; } } } var v3 = 40; v1.speed_x = v3 * Math.cos(PI * v2); v1.speed_y = v3 * Math.sin(PI * v2); v1._rotation = random(180); v1.force_x = Math.abs(v1.speed_x / 2); v1.force_y = v1.speed_y; } } function f_GiantAgentHealth() { if (agent_health <= 200) { game.game.hand1.grandslam = true; game.game.clownbody.body.gotoAndStop('walk'); } } function f_HitGiantHead(zone) { zone.slide_x = zone.hitby.force_x / 2; zone.slide_y = zone.hitby.force_y / 2; agent_health -= zone.hitby.damage_val; bosshealth.health.health.text = f_HealthText(agent_health); f_GiantAgentHealth(); zone.gotoAndPlay('hit'); } function f_HitGiantBody(zone) { zone.slide_x = zone.hitby.force_x / 2; zone.slide_y = zone.hitby.force_y / 2; agent_health -= zone.hitby.damage_val; bosshealth.health.health.text = f_HealthText(agent_health); f_GiantAgentHealth(); zone.gotoAndPlay('hit'); } function f_InitGiant() { game.game.moves.gotoAndStop('on'); zone = game.game.clownhead; game.game.moves.clownhead.body.gotoAndPlay('idle'); zone.timer = 100; zone.phase = 1; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitGiantHead; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); f_AddNeutral(game.game.clownhead); f_AddNeutral(game.game.hand1); game.game.clownhead.shot = 0; bosshealth.gotoAndStop('on'); bosshealth.health.health.text = game.game.clownhead.health; } function f_InitGiantBody() { zone = game.game.clownbody; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitGiantBody; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); } function f_RotateGoal(zone, new_rotation, r_speed) { if (zone._rotation < new_rotation) { zone._rotation += r_speed; if (zone._rotation >= new_rotation) { zone._rotation = new_rotation; } } else { if (zone._rotation > new_rotation) { zone._rotation -= r_speed; if (zone._rotation <= new_rotation) { zone._rotation = new_rotation; } } } } function f_GiantHeadFollow(zone) { var v4 = p1.x; var v3 = p1.y - 50; var v1 = 110 * ((p1.x + game_x) / screenWidth); var v2 = (1 - (p1.y + game_y) / screenHeight) * v1 - v1 * 0.3; f_RotateGoal(zone, v2, 2); } function f_GiantGunFollow(zone) { var v4 = p1.x; var v3 = p1.y - 50; var v1 = 110 * ((p1.x + game_x) / screenWidth); var v2 = (1 - (p1.y + game_y) / screenHeight) * v1 - v1 * 0.3; f_RotateGoal(zone, v2, 2); } function f_GiantGunReset(zone) { var v1 = 0; f_RotateGoal(zone, v1, 2); } function f_GiantGunSwing(zone) { ++zone.timer; if (zone.timer > 60) { if (Math.abs(p1.x - zone._x) < 275) { zone.timer = 0; zone.gotoAndStop('swing'); } else { if (zone.timer > 120) { if (!game.game.hand1.grandslam) { zone.timer = 0; zone.gotoAndStop('shoot'); } } } } } function f_GiantWalk(zone) { if (!zone.platform) { if (f_PY(zone, zone.speed_y) == false) { f_MoveV(zone, zone.speed_y); ++zone.speed_y; } } if (zone.x > p1.x + 80) { u_temp = zone.platform; f_MoveH(zone, -zone.speed_x); if (!zone.platform and u_temp) { zone.speed_y = -6; } zone.body.gotoAndStop('walk'); } else { zone.body.gotoAndStop('wait'); } game.game.clownhead.x = zone.x + zone.clownhead_x; game.game.clownhead._x = game.game.clownhead.x; game.game.clownhead.y = zone.y + zone.clownhead_y; game.game.clownhead._y = game.game.clownhead.y; game.game.hand1.x = zone.x + zone.hand1_x; game.game.hand1._x = game.game.hand1.x; game.game.hand1.y = zone.y + zone.hand1_y; game.game.hand1._y = game.game.hand1.y; if (p1.x > zone.x - 60) { p1.x = zone.x - 60; p1._x = p1.x; } } function f_ClownSmallMove(zone) { var v4 = game.game.clownbody.body._xscale; if (v4 > 0) { var v2 = game.game.clownbody._x + game.game.clownbody.body._x; } else { var v2 = game.game.clownbody._x - game.game.clownbody.body._x; } var v7 = game.game.clownbody._y + game.game.clownbody.body._y; if (zone == game.game.clownhead) { var v3 = game.game.clownbody.body.head; var v5 = v7 + v3._y + v3.body._y; if (v4 > 0) { var v6 = v2 + v3._x + v3.body._x; if (zone._xscale < 0) { zone._xscale *= -1; } zone._rotation = v3._rotation; } else { var v6 = v2 - v3._x - v3.body._x; if (zone._xscale > 0) { zone._xscale *= -1; } zone._rotation = -v3._rotation; } } else { if (zone == game.game.hand1) { var v3 = game.game.clownbody.body.hand1; var v5 = v7 + v3._y; if (v4 > 0) { var v6 = v2 + v3._x; if (zone._xscale < 0) { zone._xscale *= -1; } zone._rotation = v3._rotation; } else { var v6 = v2 - v3._x; if (zone._xscale > 0) { zone._xscale *= -1; } zone._rotation = -v3._rotation; } } else { var v3 = game.game.clownbody.body.hand2; var v5 = v7 + v3._y; if (v4 > 0) { var v6 = v2 + v3._x; if (zone._xscale < 0) { zone._xscale *= -1; } zone._rotation = v3._rotation; } else { var v6 = v2 - v3._x; if (zone._xscale > 0) { zone._xscale *= -1; } zone._rotation = -v3._rotation; } } } if (Math.abs(zone.slide_x) > 1 and Math.abs(zone.x - v6) < 200) { zone.x += zone.slide_x; zone.slide_x *= 0.75; } if (Math.abs(zone.x - v6) > 1) { zone.x += (v6 - zone.x) / clown_lag; } else { zone.x = v6; } if (Math.abs(zone.slide_y) > 1 and Math.abs(zone.y - v5) < 200) { zone.y += zone.slide_y; zone.slide_y *= 0.75; } if (Math.abs(zone.y - v5) > 1) { zone.y += (v5 - zone.y) / clown_lag; } else { zone.y = v5; } if (zone.spasm) { zone.x += random(6) - 3; zone.y += random(6) - 3; } zone._x = zone.x; zone._y = zone.y; } function f_SmallClownBody(zone) { ++zone.fx_timer; if (zone.fx_timer % 2 == 0) { f_FX(zone.x + random(160) - 80, zone.y + random(12) - 6, zone.y, 'fireswirl', 100, 100); } f_Depth(game.game.clownhead, zone.y); f_Depth(game.game.hand1, zone.y + 1); var v3 = game.game.clown_right._x - game.game.clown_left._x; var v2 = (zone.x - game.game.clown_left._x) / v3; v2 = int(v2 * 50) + 10; game.game.bg.gotoAndStop(v2); } function f_ClownBodyElevator(zone) { zone._x = zone.default_x + (game.game.clownhead._x - zone.default_x) / 2; if (zone.air) { zone._y = zone.default_y + (game.game.clownhead._y + 200 - zone.default_y) / 2; } else { zone._y = zone.default_y; zone._yscale = (Math.abs(zone._y - (game.game.clownhead._y - 100)) / 375) * 100; } } function f_StairClown(zone) { var v2 = game.game.clownhead._x + 100; for (n in a_Enemies) { var v1 = a_Enemies[n]; if (v1 != game.game.clownhead) { if (v1.x < v2) { f_MoveH(v1, v2 - v1.x); } } } for (n in a_Players) { v1 = a_Players[n]; if (v1.x < v2) { f_MoveH(v1, v2 - v1.x); } } } function f_AgentDoorway(zone) { var v3 = game.game.moves._x + game.game.moves.clownhead._x; var v2 = game.game.moves._y + game.game.moves.clownhead._y; zone._rotation = game.game.moves.clownhead._rotation; zone.x = v3; zone.y = v2; zone._x = zone.x; zone._y = zone.y; game.game.clownhead2._x = v3; game.game.clownhead2._y = v2; game.game.clownhead2._rotation = zone._rotation; } function f_HitAgent2(zone) { if (zone.hitby.gun_type == 30) { agent_health = 0; game.game.clownhead2.nextFrame(); zone.chainsawed = true; } else { agent_health -= zone.hitby.damage_val; if (agent_health < 0) { agent_health = 0; } } bosshealth.health.health.text = agent_health; if (zone.chainsawed) { zone.gotoAndStop('sawed'); if (zone.hitby.gun_type == 30) { zone.body.nextFrame(); } } else { if (agent_health <= 0) { zone.alive = false; } else { zone.gotoAndPlay('hit'); } } } function f_InitAgent2() { game.game.moves.gotoAndPlay('go'); zone = game.game.clownhead; zone.nodepth = true; _root.f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitAgent2; zone.health_max = 400; zone.health = zone.health_max; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); zone.gotoAndStop('idle'); bosshealth.gotoAndStop('on'); bosshealth.health.health.text = agent_health; } function f_ClownBodyCanyon(zone) { zone._x = zone.default_x + (game.game.clownhead._x - zone.default_x) / 2; if (game.game.clownhead._y > zone.default_y) { zone._y = game.game.clownhead._y + 300; } else { zone._y = zone.default_y; zone._yscale = (Math.abs(zone._y - (game.game.clownhead._y - 100)) / 375) * 100; } } function f_HitClownIntro(zone) { zone.gotoAndStop('die'); } function f_KeepLeftClown() { var v2 = game.game.clownhead._x - 50; if (p1.x > v2) { f_MoveH(p1, v2 - p1.x); } for (n in a_Enemies) { var v1 = a_Enemies[n]; if (v1 != game.game.clownhead) { if (v1.x > v2) { f_MoveH(v1, v2 - v1.x); } } } } function f_HitCorpse(zone) { zone.gotoAndPlay('hit'); ++zone.hits; if (zone.hits % 2 == 0) { var v2 = random(30) + 60; var v3 = f_FX(zone.x, zone.zone.y - random(zone.zone._height), zone.y + 1, 'blood2', v2, v2); } } function f_InitCorpse(zone) { zone.nodepth = true; f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitCorpse; zone.defense = 40; zone.slide_x = 0; zone.slide_y = 0; zone.hits = 0; zone.w2 = zone._width / 2; f_AddEnemy(zone); zone.gotoAndStop('idle'); } function f_HitFinalClown(zone) { clown_health -= zone.hitby.damage_val; if (clown_health <= 0) { if (zone.alive) { clown_health = 0; zone.alive = false; game.game.machine.gotoAndPlay('loop'); zone.gotoAndStop('explode'); } } else { zone.gotoAndPlay('hit'); } bosshealth.health.health.text = clown_health; } function f_InitFinalClown(zone) { zone.nodepth = true; f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitFinalClown; zone.defense = 0; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; _root.f_AddEnemy(zone); if (clown_health > clown_cp5) { clown_health = clown_cp5; } bosshealth.gotoAndStop('on'); bosshealth.health.health.text = clown_health; } function f_HitSadClown(zone) { if (zone.hitby.owner.gun_type == 101) { if (!zone.unmasked) { zone.unmasked = true; _root.medal_popup.unlockMedal('True Face of Evil'); s_sadsong.s_sadsong.stop(); zone.gotoAndStop('unmask'); } else { s_sadsong.s_sadsong.stop(); zone.alive = false; f_RemoveEnemy(zone); zone.gotoAndStop('die'); } } else { zone.alive = false; f_RemoveEnemy(zone); zone.gotoAndStop('die'); } } function f_InitSadClown(zone) { zone.nodepth = true; f_EnemyDefaults(zone); zone.fp_Hit1 = f_HitSadClown; zone.defense = 0; zone.slide_x = 0; zone.slide_y = 0; zone.w2 = zone._width / 2; f_AddEnemy(zone); } function f_SadClownFinish(pacifist) { camera.prey = game.game.jebus; game.game.jebus.gotoAndPlay('go'); bosshealth.gotoAndStop(1); game.game.machine.off = true; if (pacifist) { s_sadsong.s_sadsong.stop(); game.game.sadclown.alive = false; game.game.sadclown.gotoAndStop('blank'); if (!got_pacifist) { got_pacifist = true; _root.medal_popup.unlockMedal('Pacifist'); } } } var glowBuffer = new flash.display.BitmapData(Math.ceil(Stage.width * 0.25), Math.ceil(Stage.height * 0.25), true, 0); PI = 0.0174532925199433; b_start1 = 49; b_start2 = 50; players = 0; current_depth_mod = 0; u_point = new Object(); total_fx = 200; current_fx = 1; current_item = 1; current_shadow = 1; depth_mod_max = 298; p1_depth_mod = 296; p2_depth_mod = 297; conveyer_speed = 5; dash_timer = 4; shake_x = 0; shake_y = 0; rockbreaker = 0; chronicdash = 0; doublejump = 0; wallstick = 0; doublejump = 1; got_defense1 = false; got_defense2 = false; screenWidthDefault = 720; screenHeightDefault = 405; aspectRatio = screenWidthDefault / screenHeightDefault; scrollSpeed = 10; scrollBuffer = 150; screenWidth = screenWidthDefault; screenHeight = screenHeightDefault; screenHeightMax = screenHeightDefault + scrollBuffer * 2; screenWidthMax = screenWidthDefault + scrollBuffer * 2; speed_y_max = 30; s_spring = new Sound(); s_spring.attachSound('sound_spring.wav'); s_thwomp = new Sound(); s_thwomp.attachSound('sound_thwomp.wav'); s_swing1 = new Sound(); s_swing1.attachSound('sound_swinger1.wav'); s_swing6 = new Sound(); s_swing6.attachSound('sound_swinger6.wav'); s_zombiedie1 = new Sound(); s_zombiedie1.attachSound('sound_zombie_die1.wav'); s_zombiedie2 = new Sound(); s_zombiedie2.attachSound('sound_zombie_die2.wav'); s_zombiedie3 = new Sound(); s_zombiedie3.attachSound('sound_zombie_die3.wav'); s_zombie1 = new Sound(); s_zombie1.attachSound('sound_zombie1.wav'); s_zombie2 = new Sound(); s_zombie2.attachSound('sound_zombie2.wav'); s_zombie3 = new Sound(); s_zombie3.attachSound('sound_zombie3.wav'); s_clowndie = new Sound(); s_clowndie.attachSound('sound_clown_die.wav'); s_clownfire = new Sound(); s_clownfire.attachSound('sound_clown_fire.wav'); s_clownroar = new Sound(); s_clownroar.attachSound('sound_clown_roar.wav'); s_clownswipe = new Sound(); s_clownswipe.attachSound('sound_clown_swipe.wav'); s_explosion1 = new Sound(); s_explosion1.attachSound('sound_explosion_1.wav'); s_explosion2 = new Sound(); s_explosion2.attachSound('sound_BANG.wav'); s_explosion3 = new Sound(); s_explosion3.attachSound('sound_normalexplosion3.wav'); s_bodyfall1 = new Sound(); s_bodyfall1.attachSound('sound_bodyfall1.wav'); s_bodyfall2 = new Sound(); s_bodyfall2.attachSound('sound_bodyfall2.wav'); s_bodyfall3 = new Sound(); s_bodyfall3.attachSound('sound_bodyfall3.wav'); s_bodyfall4 = new Sound(); s_bodyfall4.attachSound('sound_bodyfall4.wav'); s_bodyfall5 = new Sound(); s_bodyfall5.attachSound('sound_bodyfall5.wav'); s_glass1 = new Sound(); s_glass1.attachSound('sound_glass1.wav'); s_punch1 = new Sound(); s_punch1.attachSound('sound_punch1.wav'); s_punch2 = new Sound(); s_punch2.attachSound('sound_punch2.wav'); s_punch3 = new Sound(); s_punch3.attachSound('sound_GoodPunch3.wav'); s_shot1 = new Sound(); s_shot1.attachSound('MG_SHOT_01.wav'); s_shot2 = new Sound(); s_shot2.attachSound('MG_SHOT_02.wav'); s_shot3 = new Sound(); s_shot3.attachSound('MG_SHOT_03.wav'); s_shot4 = new Sound(); s_shot4.attachSound('MG_SHOT_04.wav'); s_enemy_shoot1 = new Sound(); s_enemy_shoot1.attachSound('sound_enemy_shoot1.wav'); s_enemy_shoot2 = new Sound(); s_enemy_shoot2.attachSound('sound_enemy_shoot2.wav'); s_enemy_shoot3 = new Sound(); s_enemy_shoot3.attachSound('sound_enemy_shoot3.wav'); s_enemy_shoot4 = new Sound(); s_enemy_shoot4.attachSound('sound_enemy_shoot4.wav'); s_bullethitbody1 = new Sound(); s_bullethitbody1.attachSound('sound_bullethitbody1.wav'); s_bullethitbody2 = new Sound(); s_bullethitbody2.attachSound('sound_bullethitbody2.wav'); s_hit_dirt1 = new Sound(); s_hit_dirt1.attachSound('MG_GRAINYSHOT_01.wav'); s_hit_dirt2 = new Sound(); s_hit_dirt2.attachSound('MG_GRAINYSHOT_02.wav'); s_hit_dirt3 = new Sound(); s_hit_dirt3.attachSound('MG_GRAINYSHOT_03.wav'); s_hit_metal1 = new Sound(); s_hit_metal1.attachSound('MG_METALSHOT_01.wav'); s_hit_metal2 = new Sound(); s_hit_metal2.attachSound('MG_METALSHOT_02.wav'); s_hit_metal3 = new Sound(); s_hit_metal3.attachSound('MG_METALSHOT-X_02.wav'); s_hit_default1 = new Sound(); s_hit_default1.attachSound('MG_DIRTYSHOT_01.wav'); s_hit_default2 = new Sound(); s_hit_default2.attachSound('MG_DIRTYSHOT_02.wav'); s_hit_default3 = new Sound(); s_hit_default3.attachSound('MG_DIRTYSHOT_03.wav'); s_elevator = new Sound(); s_elevator.attachSound('sound_elevator.wav'); s_elevatordoor = new Sound(); s_elevatordoor.attachSound('sound_elevator_door.wav'); s_elevatorbreak = new Sound(); s_elevatorbreak.attachSound('sound_elevatorbreak.wav'); s_splash = new Sound(); s_splash.attachSound('sound_splashout.wav'); s_steam = new Sound(); s_steam.attachSound('sound_steam.wav'); s_cursor33 = new Sound(); s_cursor33.attachSound('sound_cursor33.wav'); s_cursor34 = new Sound(); s_cursor34.attachSound('sound_cursor34.wav'); s_power24 = new Sound(); s_power24.attachSound('sound_power24.wav'); s_record = new Sound(); s_record.attachSound('sound_record.wav'); s_doorslam = new Sound(); s_doorslam.attachSound('sound_doorslam.wav'); s_beams = new Sound(); s_beams.attachSound('sound_beams.wav'); zombiesound = false; zombiesound_timer = 0; s_chainsaw2 = new Sound(); s_chainsaw2.attachSound('sound_chainsaw2.wav'); s_chainsaw4 = new Sound(); s_chainsaw4.attachSound('sound_chainsaw4.wav'); s_berreta = new Sound(); s_berreta.attachSound('sound_berreta.wav'); s_flamethrower1 = new Sound(); s_flamethrower1.attachSound('sound_flamethrower1.wav'); s_eat = new Sound(); s_eat.attachSound('sound_eat1'); s_bang = new Sound(); s_bang.attachSound('Impact - large 1.wav'); s_shotgun = new Sound(); s_shotgun.attachSound('sound_shotgun1.wav'); s_chainsaw.s_chainsaw1 = new Sound(s_chainsaw); s_chainsaw.s_chainsaw1.attachSound('sound_chainsaw1.wav'); s_chainsaw.s_chainsaw3 = new Sound(s_chainsaw); s_chainsaw.s_chainsaw3.attachSound('sound_chainsaw3.wav'); s_boombox.s_boombox = new Sound(s_boombox); s_boombox.s_boombox.attachSound('140436_loop'); s_calliope.s_calliope = new Sound(s_calliope); s_calliope.s_calliope.attachSound('92334_clown'); s_sadsong.s_sadsong = new Sound(s_sadsong); s_sadsong.s_sadsong.attachSound('92334_ClownDie'); s_song1.s_song1 = new Sound(s_song1); s_song1.s_song1.attachSound('56173_newgrounds__final'); s_song2.s_song2 = new Sound(s_song2); s_song2.s_song2.attachSound('103721_finalbattle'); s_song3.s_song3 = new Sound(s_song3); s_song3.s_song3.attachSound('234285_Hopeku'); camera_lag_default = 20; camera_lag = camera_lag_default; f_NewGame(); startEngine(); gotoAndPlay('level1_19'); fader.gotoAndPlay('fadein'); oldT = getTimer(); maxF = 30; fp_fpsLimiter = fpsLimiter; } movieClip 985 { } movieClip 987 { } button 989 { on (release) { stopAllSounds(); getURL('http://tomfulp.newgrounds.com', '_blank'); } } button 990 { on (release) { stopAllSounds(); getURL('http://mindchamber.newgrounds.com', '_blank'); } } button 991 { on (release) { stopAllSounds(); getURL('http://krinkels.newgrounds.com', '_blank'); } } button 992 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/audio/listen/92334', '_blank'); } } button 993 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/audio/listen/171975', '_blank'); } } button 994 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/audio/listen/170120', '_blank'); } } button 995 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/audio/listen/140436', '_blank'); } } button 996 { on (release) { stopAllSounds(); getURL('http://mike.newgrounds.com', '_blank'); } } movieClip 1000 { } movieClip 1003 { } movieClip 1006 { } movieClip 1009 { } movieClip 1026 { } button 1027 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/store/product/madness-error-shirt', '_blank'); } } button 1028 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/store/product/madness-hank-shirt', '_blank'); } } button 1029 { on (release) { stopAllSounds(); getURL('http://www.newgrounds.com/collection/madnessday2008', '_blank'); } } movieClip 1031 { } movieClip 1032 { } movieClip 1035 { } button 1037 { on (release) { stopAllSounds(); gotoAndPlay('replay'); } } movieClip 1039 { frame 1 { stop(); } frame 2 { play(); } instance of movieClip 17 empty { onClipEvent (load) { res = 1; _root.f_MosaicScreen(res); } onClipEvent (enterFrame) { res += 2; _root.f_MosaicScreen(res); } } frame 20 { _root.f_Clear(); _root.f_BackupStats(); _root.spawnpoint = spawnpoint; _root.gotoAndPlay(warpto); gotoAndPlay('fadein'); } frame 22 { play(); } instance of movieClip 17 empty { onClipEvent (load) { res = 40; _root.f_MosaicScreen(res); } onClipEvent (enterFrame) { res -= 2; _root.f_MosaicScreen(res); } } frame 42 { stop(); } frame 42 { _root.f_MosaicScreen(0); } frame 55 { play(); } instance of movieClip 17 empty { onClipEvent (load) { if (_parent.warpto == 'level1_4intro') { u_temp = true; } } onClipEvent (enterFrame) { if (u_temp) { u_volume = _root.s_oceanside.s_oceanside.getVolume(); _root.s_oceanside.s_oceanside.setVolume(u_volume - 2); } } } frame 101 { _root.screenOverlay.stop(); if (warpto == 'level1_4intro') { _root.s_oceanside.s_oceanside.stop(); } _root.f_Clear(); _root.f_BackupStats(); if (_root.gameover) { _root.stats.health = _root.stats.health_max; } _root.spawnpoint = spawnpoint; _root.gotoAndPlay(warpto); gotoAndPlay('fadein'); } frame 102 { play(); } frame 133 { stop(); } frame 134 { play(); } frame 141 { stop(); } frame 155 { play(); } frame 155 { _root.f_MosaicScreen(0); } frame 362 { stop(); } frame 420 { _root.gotoAndStop(1); } } movieClip 1041 { } movieClip 1043 { } movieClip 1044 { frame 1 { gotoAndStop(2); } frame 11 { _root.s_power24.start(0, 0); } frame 36 { gotoAndStop(2); } frame 47 { _root.s_power24.start(0, 0); } frame 72 { gotoAndStop(2); } frame 83 { _root.s_power24.start(0, 0); } frame 108 { gotoAndStop(2); } } movieClip 1047 { } movieClip 1048 { frame 1 { stop(); } frame 2 { health.health.text = _root.f_HealthText(_root.p1.health); play(); } frame 81 { stop(); } } movieClip 1055 { } movieClip 1060 { } movieClip 1061 { frame 1 { function unlockMedal(m_name) { clearInterval(pop_delay); var v1 = com.Newgrounds.NewgroundsAPI.getMedals(); var v2 = null; for (i in v1) { if (v1[i].medal_name == m_name) { v2 = v1[i]; medal_name = v2.medal_name; medal_value = v2.medal_value + 'pts'; com.Newgrounds.NewgroundsAPI.unlockMedal(medal_name); pop_delay = setInterval(endDelay, 3000); _visible = true; gotoAndPlay(2); break; } } } function endDelay(params) { gotoAndPlay(10); clearInterval(pop_delay); } var pop_delay; var medal_name = '?????'; var medal_value = '???'; _visible = false; } frame 10 { var myBitmapData = flash.display.BitmapData.loadBitmap(medal_name + '.gif'); medal_icon.attachBitmap(myBitmapData, 111); stop(); } } movieClip 1064 { } movieClip 1069 { instance of movieClip 17 empty { onClipEvent (enterFrame) { _parent.ammo.text = _root.p1.ammo; _parent.kills.text = _root.kills; } } } movieClip 1077 { frame 1 { _quality = 'medium'; i = 1; gotoAndStop(2); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_Quality(_parent); } } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_Quality(_parent); --_parent.timer; if (_parent.timer <= 0) { _parent.gotoAndStop('blank'); } } } } frame 10 { _root.f_LevelDefaults(); _root.f_Level1_19Init(); stop(); } movieClip 1084 { } movieClip 1090 { frame 1 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { var u_temp = _parent._parent._x + _root.game_x; _parent._x = _root.screenWidth * (u_temp / _root.screenWidth) * 0.6 - (_parent._parent._x + _root.game_x); var u_temp = _parent._parent._y + _root.game_y; _parent._y = _root.screenHeight * (u_temp / _root.screenHeight) * 0.6 - (_parent._parent._y + _root.game_y); } } } movieClip 1101 { } movieClip 1102 { } movieClip 1107 { } movieClip 1109 { frame 1 { gotoAndStop(2); } } movieClip 1115 { } movieClip 1116 { } movieClip 1120 { } movieClip 1121 { frame 1 { gotoAndStop(2); } frame 4 { play(); } frame 6 { _root.s_elevatordoor.start(0, 0); } frame 17 { if (spawns) { if (_x < _root.p1.x) { var u_temp = _root.f_NewEnemy(_x - 50, _y); if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } else { var u_temp = _root.f_NewEnemy(_x + 50, _y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } u_temp.autowalk_timer = 20; u_temp.invincible_timer = 10; } else { stop(); } } frame 53 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 57 { _root.s_steam.start(0, 0); } frame 64 { stop(); } frame 65 { play(); } frame 105 { gotoAndPlay('close'); } frame 116 { stop(); } frame 129 { stop(); } } movieClip 1122 { } movieClip 1123 { frame 1 { gotoAndStop(2); } instance of movieClip 1109 { onClipEvent (enterFrame) { x = _parent._x + _x; if (_root.p1.x > x) { _parent.gotoAndPlay('go'); } } } frame 3 { play(); } frame 17 { _root.s_explosion3.start(0, 0); _root.shake_y = 12; _parent.door_overlay.gotoAndStop('on'); } frame 30 { _parent.door1.spawns = 2; _parent.door1.gotoAndPlay('open'); } frame 44 { } frame 124 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 2) { _parent.play(); } } } frame 125 { _parent.door1.spawns = 2; _parent.door1.gotoAndPlay('open'); } frame 149 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent.play(); } } } frame 150 { _parent.door1.gotoAndPlay('open'); play(); } frame 163 { _parent.event2.warpto = 'level1_20'; _parent.event2.warpspawn = 1; _root.arrow.gotoAndPlay('go'); stop(); } } movieClip 1130 { } movieClip 1131 { frame 1 { stop(); } frame 11 { stop(); } frame 67 { gotoAndPlay('loop'); } } movieClip 1134 { } movieClip 1137 { } movieClip 1140 { } movieClip 1142 { } movieClip 1155 { } movieClip 1160 { } movieClip 1161 { } movieClip 1162 { instance of movieClip 17 empty { onClipEvent (load) { music = _root.s_boombox.s_boombox; music.setVolume(0); music.start(0, 9999); vol = 0; } onClipEvent (enterFrame) { vol += 2; var x = _parent._x + _root.game_x; if (x < 0) { pan = -100; } else { if (x > _root.screenWidth) { pan = 100; } else { pan = int(((_parent._x + _root.game_x) / _root.screenWidth) * 200 - 100); } } music.setPan(pan); music.setVolume(vol); } } frame 50 { stop(); } instance of movieClip 17 empty { onClipEvent (load) { music = _root.s_boombox.s_boombox; dist = 1400; music2 = _root.s_calliope.s_calliope; music2.start(0, 9999); music2.setVolume(0); } onClipEvent (enterFrame) { var x = _parent._x + _root.game_x; if (x < 0) { pan = -100; if (x < -dist) { vol = 0; } else { vol = int(100 - (Math.abs(x) / dist) * 100); } } else { if (x > _root.screenWidth) { pan = 100; if (x > _root.screenWidth + dist) { vol = 0; } else { vol = int(100 - ((_root.screenWidth + dist - x) / dist) * 100); } } else { pan = int((x / _root.screenWidth) * 200 - 100); vol = 100; } } music.setPan(pan); music2.setVolume(100 - vol); } } } movieClip 1165 { frame 1 { _root.f_AddNeutral(this); } } movieClip 1168 { frame 1 { _root.f_AddNeutral(this); } } movieClip 1171 { frame 1 { _root.f_AddNeutral(this); } } movieClip 1194 { } movieClip 1196 { } movieClip 1197 { frame 1 { r.gotoAndPlay(12); } } movieClip 1198 { } movieClip 1199 { frame 1 { default_x = _x; default_y = _y; gotoAndStop(2); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownBodyCanyon(_parent); } } } movieClip 1202 { } movieClip 1203 { frame 1 { stop(); } frame 10 { stop(); } frame 20 { stop(); } } movieClip 1204 { frame 1 { gotoAndStop(2); } frame 4 { play(); } frame 6 { _root.s_elevatordoor.start(0, 0); } frame 17 { if (spawns) { if (_x < _root.p1.x) { var u_temp = _root.f_NewEnemy(_x, _y); if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } else { var u_temp = _root.f_NewEnemy(_x, _y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } } else { stop(); } } frame 53 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 57 { _root.s_steam.start(0, 0); } frame 64 { stop(); } frame 65 { play(); } frame 105 { gotoAndPlay('close'); } frame 116 { stop(); } frame 129 { stop(); } } movieClip 1207 { frame 1 { _root.f_AddNeutral(this); gotoAndStop(2); } } movieClip 1240 { } movieClip 1241 { } movieClip 1244 { } movieClip 1245 { } movieClip 1246 { frame 1 { } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownHandMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 1276 { } movieClip 1277 { frame 1 { stop(); } } movieClip 1288 { } movieClip 1291 { } movieClip 1296 { frame 1 { _parent.fire.gotoAndStop(1); stop(); } frame 2 { _parent.fire.gotoAndStop(2); play(); } frame 3 { _parent.fire.gotoAndStop(2); } frame 4 { _parent.fire.gotoAndStop(3); } frame 6 { _parent.fire.gotoAndStop(4); stop(); } frame 7 { _parent.fire.gotoAndStop(3); } frame 10 { _parent.fire.gotoAndStop(2); play(); } frame 13 { gotoAndStop('idle'); } frame 14 { _parent.fire.gotoAndStop(3); } frame 16 { _parent.fire.gotoAndStop(5); stop(); } frame 17 { _parent.fire.gotoAndStop(6); } frame 18 { _parent.fire.gotoAndStop(7); } frame 19 { _parent.fire.gotoAndStop(5); } frame 20 { _parent.fire.gotoAndStop(1); stop(); } frame 21 { _parent.fire.gotoAndStop(5); stop(); } } movieClip 1297 { } movieClip 1298 { frame 1 { gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownHandMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 1299 { frame 45 { gotoAndPlay('idle'); } frame 134 { gotoAndPlay('idle'); } } movieClip 1300 { frame 45 { if (!busy) { gotoAndPlay('idle'); } } frame 51 { _root.game.game.hand2.body.body.gotoAndPlay('fist'); } frame 72 { _root.s_clownswipe.start(0, 0); } frame 89 { _root.game.game.hand2.body.body.gotoAndPlay('unfist'); } frame 126 { busy = false; gotoAndPlay('idle'); } frame 222 { gotoAndPlay('idle'); } frame 249 { play(); } frame 250 { busy = false; } frame 266 { if (!hit) { waiting = true; stop(); } } frame 267 { play(); } frame 281 { stop(); } } movieClip 1301 { } movieClip 1302 { frame 1 { stop(); } frame 3 { _root.s_song1.s_song1.start(0, 999); hitall = true; } frame 44 { _root.s_clownroar.start(0, 0); _parent.jaw.gotoAndPlay('open'); } frame 144 { _parent.hand1.body.body.gotoAndPlay('fistdown'); } frame 153 { _parent.jaw.gotoAndPlay('close'); } frame 161 { _root.clown_lag = 1; _root.s_clownswipe.start(0, 0); } frame 172 { _root.clown_lag = 6; _root.s_explosion3.start(0, 0); _root.shake_y = 12; _parent.hotdogs.gotoAndStop('die'); impact._x = _parent.hand1._x - _x; force_x = 10; force_y = -10; _root.f_ImpactPoint(impact.body); } frame 182 { _parent.hand1.body.body.gotoAndStop('palm'); } frame 227 { _root.f_AddNeutral(_parent.hand1); _root.f_AddNeutral(_parent.hand2); _root.camera.prey = _root.p1; } frame 237 { if (_root.p1.ammo <= 0) { if (_root.a_Enemies.length <= 1) { var u_temp = _root.f_NewEnemy(_root.screenWidth + 100 - _root.game_x, _root.game.game.ground._y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } } } frame 266 { if (_root.clown_health <= _root.clown_cp1) { gotoAndPlay('swipe'); } else { if (_root.p1.x > _x) { gotoAndPlay('punch1'); } else { gotoAndPlay('punch2'); } } } frame 282 { _parent.hand1.body.body.gotoAndPlay('fistdown'); } frame 299 { _root.f_Depth(_parent.hand1, _parent.ground._y - 5); _root.clown_lag = 1; _root.s_clownswipe.start(0, 0); _parent.jaw.gotoAndPlay('open'); } instance of movieClip 17 empty { onClipEvent (load) { speed_x = (_root.p1.x - (_parent.hand1._x + _parent._x)) / 11; speed_y = (_root.game.game.ground._y - 30 - (_parent.hand1._y + _parent._y)) / 11; } onClipEvent (enterFrame) { _parent.hand1._x += speed_x; _parent.hand1._y += speed_y; } } frame 310 { _root.clown_lag = 6; _root.s_explosion3.start(0, 0); _root.shake_y = 12; _root.f_FX(_parent.hand1._x, _parent.ground._y, _parent.ground._y + 20, 'smokeup', 100, 100); impact._x = _parent.hand1._x - _x; force_x = 10; force_y = -10; _root.f_ImpactPoint(impact.body); } frame 320 { _parent.hand1.body.body.gotoAndStop('palm'); } frame 332 { _parent.jaw.gotoAndPlay('close'); gotoAndPlay('decision'); } frame 357 { _parent.hand2.body.body.gotoAndPlay('fistdown'); } frame 374 { _root.f_Depth(_parent.hand2, _parent.ground._y - 5); _root.clown_lag = 1; _root.s_clownswipe.start(0, 0); _parent.jaw.gotoAndPlay('open'); } instance of movieClip 17 empty { onClipEvent (load) { speed_x = (_root.p1.x - (_parent.hand2._x + _parent._x)) / 11; speed_y = (_root.game.game.ground._y - 30 - (_parent.hand2._y + _parent._y)) / 11; } onClipEvent (enterFrame) { _parent.hand2._x += speed_x; _parent.hand2._y += speed_y; } } frame 385 { _root.clown_lag = 6; _root.s_explosion3.start(0, 0); _root.shake_y = 12; _root.f_FX(_parent.hand2._x, _parent.ground._y, _parent.ground._y + 20, 'smokeup', 100, 100); impact._x = _parent.hand2._x - _x; force_x = 10; force_y = -10; _root.f_ImpactPoint(impact.body); } frame 395 { _parent.hand2.body.body.gotoAndStop('palm'); } frame 407 { _parent.jaw.gotoAndPlay('close'); gotoAndPlay('decision'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { x = _parent.hand2._x + _parent._x; x2 = _root.p1.x - 200; if (x > x2) { _parent.hand2._x -= Math.abs(x - x2) / 10; } } } instance of movieClip 17 empty { onClipEvent (enterFrame) { speed = 12; } onClipEvent (enterFrame) { y = _parent.hand2._y + _parent._y; if (y + speed < _root.p1.y - 50) { _parent.hand2._y += speed; } else { if (y - speed > _root.p1.y - 50) { _parent.hand2._y -= speed; } } } } frame 433 { _root.clown_lag = 3; } frame 443 { _root.clown_lag = 1; _root.f_Depth(_parent.hand2, _parent.ground._y - 5); hand2.busy = true; hand2.gotoAndPlay('pivot'); } frame 450 { _root.game.game.hand1.body.body.gotoAndStop('fu'); _root.s_clownswipe.start(0, 0); _root.nostopping = true; } instance of movieClip 17 empty { onClipEvent (load) { speed = 15; } onClipEvent (enterFrame) { _parent.hand2._x += speed; speed += 3; if (speed > 40) { speed = 40; } if (_root.p1.x < _parent._parent.hand2._x) { _root.f_MoveH(_root.p1, _parent._parent.hand2._x - _root.p1.x); if (!hit) { hit = true; _root.f_PlayerDropGun(_root.p1); if (_parent.hand2.waiting) { _parent.hand2.gotoAndPlay('pivot2'); } else { _parent.hand2.hit = true; } _root.limit_right = _root.game.game.limit_right._x; _root.shake_y = 12; _root.s_punch2.start(0, 0); _root.f_FX(_root.p1.x, _root.p1.y - 40, _root.p1.y + 10, 'impact1', 100, 100); if (_root.p1._xscale > 0) { _root.p1._xscale *= -1; } _root.f_TossInit(_root.p1, 30, -30); } } if (hit) { _root.f_MoveV(_root.p1, _parent._parent.hand2._y - _root.p1.y); _root.camera_lag -= 1; if (_root.camera_lag < 1) { _root.camera_lag = 1; } } } } frame 488 { _root.clown_lag = 6; _root.s_explosion3.start(0, 0); _root.shake_y = 12; _root.p1.toss_speed_x = 36; _root.p1.speed_y = -20; } frame 529 { _root.camera_lag = _root.camera_lag_default; _root.limit_left = _root.game.game.limit_right2._x + 100; _root.nostopping = false; _parent.hand2.gotoAndStop('blank'); for (var i in _root.a_Enemies) { var u_temp = _root.a_Enemies[i]; if (u_temp.x < _root.limit_left) { u_temp.health = 0; u_temp.hiddenkill = true; u_temp.fp_HitGround(u_temp); } } stop(); } } movieClip 1307 { } movieClip 1308 { frame 1 { _root.f_AddNeutral(this); stop(); } frame 11 { stop(); } frame 67 { gotoAndPlay('loop'); } } movieClip 1313 { frame 1 { stop(); } instance of movieClip 17 empty { onClipEvent (load) { speed_y = -(20 + random(10)); speed_x = random(12) - 6; } onClipEvent (enterFrame) { if (_parent._y < 0) { _parent._x += speed_x * 2; _parent._rotation += speed_x; _parent._y += speed_y; speed_y += 2; if (_parent._y >= 0) { _parent._y = 0; _parent._rotation = 0; _root.f_Item(_parent._x + _parent._parent._x, _parent._y + _parent._parent._y, _parent._y + _parent._parent._y + 1, 'hotdog', _parent._xscale, 100); _parent.gotoAndStop('off'); } } } } } movieClip 1314 { frame 1 { _root.f_AddNeutral(this); stop(); } instance of movieClip 1313 { onClipEvent (load) { _xscale = _xscale * -1; } } instance of movieClip 1313 { onClipEvent (load) { _xscale = _xscale * -1; } } } movieClip 1315 { } movieClip 1320 { frame 1 { _root.f_SetHand(this); } } movieClip 1325 { frame 1 { _root.f_SetHand(this); } } movieClip 1330 { frame 1 { _root.f_SetHand(this); } } movieClip 1332 { } movieClip 1333 { } movieClip 1335 { frame 1 { gotoAndStop(2); } } movieClip 1336 { } movieClip 1338 { frame 1 { gotoAndStop(2); } } movieClip 1339 { } movieClip 1340 { } movieClip 1341 { frame 17 { gotoAndPlay('loop'); } } movieClip 1343 { } movieClip 1347 { } movieClip 1349 { } movieClip 1350 { frame 6 { stop(); } } movieClip 1353 { } movieClip 1355 { } movieClip 1358 { frame 4 { stop(); } } movieClip 1363 { } movieClip 1364 { frame 8 { _parent.gotoAndStop('stand'); } } movieClip 1370 { frame 1 { _root.f_SetHand(this); } } movieClip 1371 { } movieClip 1373 { frame 1 { _root.f_ImpactPoint(this); } frame 2 { gotoAndPlay(1); } } movieClip 1374 { frame 3 { _parent.force_x = 12; _parent.force_y = 0; _parent.slide_x = 0; } frame 6 { if (!_parent.u_hit) { gotoAndPlay('finish'); } } frame 9 { play(); } frame 10 { _root.f_EndPunch(_parent); } } movieClip 1377 { frame 4 { _root.f_SetForceX(_parent, 12); _parent.force_y = -8; _parent.slide_x = 12; } frame 7 { if (!_parent.u_hit) { gotoAndPlay('finish'); } } frame 11 { play(); } frame 13 { _root.f_EndPunch(_parent); } } movieClip 1379 { } movieClip 1383 { frame 8 { if (_parent.platform == undefined) { _parent.gotoAndStop('toss'); } else { if (_parent.health <= 0) { _parent.gotoAndStop('hitground'); } else { _parent.gotoAndStop('stand'); } } } } movieClip 1384 { frame 2 { stop(); } } movieClip 1385 { } movieClip 1386 { frame 2 { stop(); } } movieClip 1389 { frame 1 { _root.f_SetHand(this); } } movieClip 1390 { frame 10 { gotoAndPlay('loop'); } } movieClip 1391 { frame 1 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent._parent.speed_y >= 0) { _parent.gotoAndStop(3); } } } } movieClip 1392 { frame 2 { _parent.gotoAndStop('toss2'); } } movieClip 1394 { } movieClip 1401 { } movieClip 1402 { } movieClip 1403 { frame 6 { if (_parent.health <= 0) { _parent.alive = false; if (_parent.body_type == 3) { gotoAndPlay('die2'); } else { gotoAndPlay('die'); } } } frame 20 { _root.f_EndPunch(_parent); } frame 21 { if (_parent.smoke_timer > 0) { _parent.smoke_timer = 10; gotoAndPlay('burn'); } } frame 30 { gotoAndPlay('burn'); } frame 31 { _root['s_zombiedie' + (random(3) + 1)].start(0, 0); } frame 55 { _root.f_RemoveEnemy(_parent); stop(); } frame 56 { play(); } frame 80 { _parent.body_type = 3; _parent.head_type = 3; _parent.face_type = 3; _parent.alive = true; _parent.health = _parent.health_max; _parent.wait = true; } frame 102 { _root.f_EndPunch(_parent); } frame 103 { _parent.shadow.gotoAndStop('off'); play(); } frame 137 { if (_parent.hiddenkill) { _parent.hiddenkill = false; } else { ++_root.kills; } _root.f_RemoveEnemy(_parent); stop(); } } movieClip 1418 { } movieClip 1425 { } movieClip 1434 { } movieClip 1436 { } movieClip 1437 { } movieClip 1440 { } movieClip 1442 { } movieClip 1445 { } movieClip 1460 { } movieClip 1461 { } movieClip 1462 { frame 1 { s_welding = new Sound(this); s_welding.attachSound('welding.wav'); s_welding.start(0, 0); } instance of movieClip 225 { onClipEvent (load) { i = 1; x = _parent._x + _parent._parent._x + _parent._parent._parent._x; scale = _parent._parent._xscale / 100; y = _parent._parent._parent._y; } onClipEvent (enterFrame) { ++i; if (i % 1 == 0) { var u_scale = 60 + random(40); var u_temp = _root.f_ShrapnelGeneral(x + _parent.spark._x * scale - 20, y - 5, y + 1, -4 + random(8), -(8 + random(15)), 'spark'); u_temp.bounce_limit = 1; u_temp._xscale = 50 + random(50); u_temp._yscale = 50 + random(50); u_temp.weight = 1 + random(100) / 100; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelVanish; } } } frame 95 { _root.game.game.ceiling.gotoAndPlay('go'); } frame 190 { s_welding.stop(); _parent._parent.phase = 10; _parent._parent.gotoAndStop('stand'); } } movieClip 1463 { } movieClip 1464 { frame 1 { if (!init) { init = true; expand = 0; } var u_size = 80 + random(30); _root.f_FX(_parent.x - _parent.w - expand + random(_parent.w * 2 + expand * 2), _parent.y + expand - random(_parent.h + expand * 2), _parent.y + 10, 'blood1', u_size, u_size); } frame 2 { var u_size = 80 + random(30); _root.f_FX(_parent.x - _parent.w - expand + random(_parent.w * 2 + expand * 2), _parent.y + expand - random(_parent.h + expand * 2), _parent.y + 10, 'blood1', u_size, u_size); } frame 3 { --_parent.explosions; if (_parent.explosions > 0) { expand += 10; gotoAndPlay(1); } else { stop(); } } } movieClip 1468 { } movieClip 1469 { frame 36 { stop(); } } movieClip 1470 { } movieClip 1471 { frame 1 { stop(); } } movieClip 1473 { } movieClip 1475 { } movieClip 1477 { } movieClip 1479 { } movieClip 1480 { frame 46 { hand.gotoAndStop('two'); } frame 80 { hand.gotoAndStop('three'); } frame 116 { hand.gotoAndStop('one'); } frame 132 { stop(); } } movieClip 1481 { frame 1 { if (delay) { gotoAndStop('blank'); } else { _root.f_InitHencher(this); } } frame 2 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_OnScreenActivate(_parent); } } frame 3 { if (delay or !alive) { _root.f_InitHencher(this); } if (!shadow) { _root.f_NewShadow(this); } else { shadow.gotoAndStop('on'); } _root.f_AddEnemy(this); _root.f_AddEnemyPush(this); if (!platform) { _root.f_PY(this, 20); } if (goframe) { gotoAndStop(goframe); } else { gotoAndStop('walk'); } } frame 4 { _root.f_HencherDefaults(this); if (head_type == 3) { _root.zombiesound = true; } stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _parent.gun._x = _parent.body.gun._x * 0.5 + _parent.body._x; _parent.gun._y = _parent.body.gun._y * 0.5 + _parent.body._y; } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Hencher(_parent); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_GeneralTimers(_parent); } } frame 8 { punching = false; } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent.u_hit) { _root.f_ForceSlide(_parent); } } } frame 14 { _root.f_DropGun(this); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (!_root.f_CharJumping(_parent)) { _root.f_ForceSlideBack(_parent); } } } frame 16 { _root.f_TossPose(this); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Toss(_parent); } } frame 19 { _root.f_DropGun(this); gotoAndStop('toss2'); } frame 25 { _root.s_bodyfall3.start(0, 0); _root.f_ShakeY(10); } frame 26 { explosions = 6; if (_xscale > 0) { var u_speed_x = -(force_x + random(3)); } else { var u_speed_x = force_x + random(3); } var u_speed_y = force_y; var u_temp = _root.f_ShrapnelGeneral(x, y - 70, y + 1, u_speed_x, -20, 'hencher_head'); u_temp.bounce_limit = 2; u_temp._xscale = _xscale; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelSplatter; var u_temp = _root.f_ShrapnelGeneral(x, y - 10, y + 1, u_speed_x * 0.75, -10, 'hencher_body'); u_temp.bounce_limit = 1; u_temp._xscale = _xscale; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelSplatter; var u_temp = _root.f_ShrapnelGeneral(x, y, y + 1, u_speed_x * 0.75, -5, 'hencher_foot'); u_temp.bounce_limit = 1; u_temp._xscale = _xscale; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelSplatter; var u_temp = _root.f_ShrapnelGeneral(x, y - 50, y + 1, u_speed_x * 0.75, -12, 'hencher_hand'); u_temp.bounce_limit = 1; u_temp._xscale = _xscale; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelSplatter; _root.f_RemoveEnemy(this); } } movieClip 1483 { frame 1 { stop(); } } movieClip 1485 { frame 1 { stop(); } } movieClip 1487 { } movieClip 1489 { } movieClip 1490 { } movieClip 1492 { } movieClip 1493 { } movieClip 1494 { } movieClip 1495 { } movieClip 1498 { } movieClip 1500 { } movieClip 1503 { } movieClip 1504 { } movieClip 1506 { } movieClip 1507 { } movieClip 1515 { } movieClip 1518 { } movieClip 1554 { } movieClip 1567 { } movieClip 1569 { } movieClip 1574 { } movieClip 1576 { } movieClip 1585 { } movieClip 1588 { } movieClip 1590 { } movieClip 1592 { } movieClip 1593 { } movieClip 1611 { frame 15 { stop(); } } movieClip 1612 { frame 30 { _root.f_Depth(_parent, _root.abs_top._y + 50); } frame 91 { _root.clowntext.gotoAndPlay('part1'); } frame 191 { _parent._parent.cliff.gotoAndPlay('burst'); _parent._parent.ledge.gotoAndPlay('burst'); } frame 211 { _parent._parent.cliff.gotoAndPlay('burst'); _parent._parent.ledge.gotoAndPlay('burst'); } frame 227 { _parent._parent.cliff.gotoAndPlay('burst'); _parent._parent.ledge.gotoAndPlay('burst'); } frame 235 { _parent._parent.cliff.gotoAndPlay('burst'); _parent._parent.ledge.gotoAndPlay('burst'); } frame 292 { _root.f_InitClownDemon0(); _root.limit_left = _root.game.game.limit_left2._x; _root.limit_right = _root.game.game.limit_right2._x; _parent._parent.cliff.gotoAndPlay('on'); _parent._parent.ledge.gotoAndPlay('on'); stop(); } } movieClip 1613 { frame 1 { x = _x; y = _y; _root.f_AddNeutral(this); } frame 10 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { if (_parent.x + _root.game_x < _root.screenWidth + 200) { _root.p1.wait = true; _root.camera.prey = _parent; _parent.play(); } } } frame 11 { play(); } frame 63 { _root.s_zombiedie3.start(0, 0); } frame 101 { stopAllSounds(); _root.s_record.start(0, 0); } frame 192 { _root.f_MoveH(_root.p1, x - _root.screenWidth / 2 - 150 - _root.p1.x); _root.p1.wait = false; _root.p1.autowalk_timer = 30; _root.p1.gotoAndStop('autowalk'); _root.keys.gotoAndPlay('attack'); } frame 197 { _root.s_swing1.start(0, 0); } frame 214 { _root.s_spring.start(0, 0); } frame 225 { nodepth = true; _root.f_EnemyDefaults(this); fp_Hit1 = _root.f_HitClownIntro; health_max = 1; health = zone.health_max; defense = 1; w2 = _width / 2; _root.f_AddEnemy(this); stop(); } frame 227 { _root.s_zombiedie3.start(0, 0); alive = false; active = false; _root.f_RemoveEnemy(this); } } movieClip 1614 { frame 1 { _root.f_ObjectPush(this, _root.a_Events); } instance of movieClip 9 { onClipEvent (load) { _root.f_InsertObject(_parent, _root.a_Walls); _parent._parent.w = _parent._width; _parent._parent.h = _parent._height; } onClipEvent (unload) { _root.f_RemoveObject(_parent, _root.a_Walls); } } } movieClip 1616 { frame 1 { gotoAndStop(2); } } movieClip 1618 { frame 1 { gotoAndStop(2); } } movieClip 1620 { frame 1 { gotoAndStop(2); } } movieClip 1621 { frame 1 { gotoAndStop(2); } } movieClip 1622 { instance of movieClip 9 { onClipEvent (load) { _parent._parent.w = _parent._width / 2; _parent._parent.h = _parent._height; } } } movieClip 1641 { } movieClip 1642 { } movieClip 1644 { } movieClip 1646 { } movieClip 1648 { } movieClip 1650 { } movieClip 1652 { } movieClip 1654 { frame 1 { stop(); } } movieClip 1655 { } movieClip 1657 { } movieClip 1659 { } movieClip 1660 { } movieClip 1663 { } movieClip 1665 { } movieClip 1666 { frame 1 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.gunshooting) { _parent.gotoAndStop(2); } else { _parent.gotoAndStop(1); } } } } movieClip 1667 { } movieClip 1668 { } movieClip 1669 { frame 18 { if (_parent.gun_type == 30) { if (Key.isDown(_parent.b_punch1) and Key.isDown(_parent.b_up)) { _root.s_chainsaw2.start(0, 0); } } } frame 29 { stop(); } } movieClip 1671 { } movieClip 1673 { } movieClip 1675 { } movieClip 1677 { } movieClip 1679 { } movieClip 1681 { frame 1 { stop(); } } movieClip 1683 { } movieClip 1684 { } movieClip 1685 { frame 12 { gotoAndPlay('loop'); } } movieClip 1686 { frame 1 { _parent.gun.gun.gun.gotoAndStop('blank'); } frame 8 { _parent.gun.gun.gun.gotoAndStop(_parent.gun_type); play(); } frame 16 { gotoAndPlay('loop'); } } movieClip 1688 { frame 1 { _root.f_SetForceX(_parent, 12); _parent.force_y = -8; } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent._parent.u_hit) { if (_parent._parent._xscale > 0) { var u_speed = -10; } else { var u_speed = 10; } ++_parent._parent.kicks; if (_parent._parent.kicks <= 1) { var speed_y = _parent._parent.launch / 2; } else { if (_parent._parent.kicks == 2) { var speed_y = _parent._parent.launch * 0.25; u_speed *= 1.5; } else { if (_parent._parent.kicks == 3) { var speed_y = 0; u_speed *= 2; } else { var speed_y = 0; u_speed *= 2; } } } _root.f_ForceJump(_parent._parent, u_speed, speed_y, true); } } } frame 3 { stop(); } } movieClip 1690 { } movieClip 1691 { frame 1 { stop(); } } movieClip 1692 { } movieClip 1694 { frame 21 { if (_parent.health > 0) { if (_parent.invincible_timer < 20) { _parent.invincible_timer = 20; } _parent.gotoAndStop('stand'); } else { _root.f_GameOver(); stop(); } } } movieClip 1697 { } movieClip 1699 { frame 2 { _root.f_SetForceX(_parent, 12); _parent.force_y = -8; _parent.slide_x = 12; } frame 6 { if (!_parent.u_hit) { gotoAndPlay('finish'); } } frame 9 { play(); } frame 12 { _root.f_EndPunch(_parent); } } movieClip 1701 { } movieClip 1703 { } movieClip 1705 { frame 2 { _root.f_SetForceX(_parent, 12); _parent.force_y = -8; _parent.slide_x = 12; } frame 6 { if (!_parent.u_hit) { gotoAndPlay('finish'); } } frame 9 { play(); } frame 12 { _root.f_EndPunch(_parent); } } movieClip 1707 { } movieClip 1708 { } movieClip 1709 { } movieClip 1710 { frame 9 { gotoAndPlay('intro'); } frame 45 { gotoAndPlay('loop'); } } movieClip 1715 { frame 2 { _root.f_SetForceX(_parent, 12); _parent.force_y = -8; _parent.slide_x = 12; _parent.gun.gun.gun.gotoAndStop('blank'); } frame 6 { if (!_parent.u_hit) { gotoAndPlay('finish'); } } frame 9 { play(); } frame 15 { _root.f_EndPunch(_parent); } } movieClip 1716 { frame 1 { stop(); } frame 2 { onground = false; pipe = undefined; if (!shadow.active) { shadow.gotoAndStop('on'); } gun.gun.gun.gotoAndStop(gun_type); if (autowalk_timer > 0) { gun.gun.gun.gun.gotoAndStop('idle'); gun.gotoAndStop(15); gotoAndStop('autowalk'); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _parent.gun._x = _parent.body.gun._x * 0.5 + _parent.body._x; _parent.gun._y = _parent.body.gun._y * 0.5 + _parent.body._y; } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Controls(_parent); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Timers(_parent); } } frame 4 { gun.gun.gun.gotoAndStop(gun_type); } frame 5 { gun.gun.gun.gotoAndStop(gun_type); } frame 7 { gun.gun.gun.gotoAndStop('blank'); } frame 8 { _root.f_TossPose(this); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_Toss(_parent); } } frame 9 { gun.gun.gun.gotoAndStop(gun_type); gun.gun.gun.gun.gotoAndStop('idle'); gun.gotoAndStop(20); gun._x = 0; gun._y = -20; } frame 10 { gun.gun.gun.gotoAndStop(gun_type); gun.gun.gun.gun.gotoAndStop('idle'); gun.gotoAndStop(20); gun._x = 0; gun._y = -20; } frame 11 { gun.gun.gun.gotoAndStop(gun_type); gun.gun.gun.gun.gotoAndStop('idle'); gun.gotoAndStop(20); gun._x = 0; gun._y = -10; } frame 12 { gun.gun.gun.gotoAndStop('blank'); } frame 13 { gun.gun.gun.gotoAndStop('blank'); } frame 14 { gun.gun.gun.gotoAndStop('reset'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _parent.gun._x = _parent.body.gun._x + _parent.body._x; _parent.gun._y = _parent.body.gun._y + _parent.body._y; } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_PipeControls(_parent); } } frame 15 { gun.gun.gun.gotoAndStop('reset'); if (gun_type == 101) { gun.gotoAndStop('up'); } else { gun.gotoAndPlay('goup'); } } frame 16 { gun.gun.gun.gotoAndStop('blank'); } frame 17 { _root.f_PY(this, 5); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent.autowalk_timer > 0) { --_parent.autowalk_timer; _parent.gun._x = _parent.body.gun._x * 0.5 + _parent.body._x; _parent.gun._y = _parent.body.gun._y * 0.5 + _parent.body._y; if (_parent._xscale > 0) { _root.f_MoveH(_parent, _parent.speed_x_max); } else { _root.f_MoveH(_parent, -_parent.speed_x_max); } } else { _parent.gotoAndStop('stand'); } } } frame 18 { gun.gun.gun.gotoAndStop(gun_type); gun.gun.gun.gun.gotoAndStop('idle'); gun.gotoAndStop(15); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _parent.gun._x = _parent.body.gun._x * 0.5 + _parent.body._x; _parent.gun._y = _parent.body.gun._y * 0.5 + _parent.body._y; } } frame 19 { shadow.gotoAndStop('off'); } } movieClip 1718 { frame 1 { gotoAndStop(2); } } movieClip 1720 { frame 1 { gotoAndStop(2); } } movieClip 1721 { instance of movieClip 1155 { onClipEvent (load) { face_type = 1; head_type = 1; body_type = 1; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e3 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e4 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 1722 { instance game of movieClip 1721 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } movieClip 1725 { } movieClip 1727 { } movieClip 1729 { } movieClip 1731 { } movieClip 1733 { } movieClip 1734 { } movieClip 1736 { } movieClip 1739 { } movieClip 1740 { frame 1 { gotoAndPlay(2); } frame 61 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (Key.isDown(_root.p1.b_jump)) { _parent.gotoAndPlay('go'); } } } frame 91 { stop(); } frame 200 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (Key.isDown(_root.p1.b_punch1)) { _parent.play(); } } } frame 232 { stop(); } } movieClip 1742 { } movieClip 1744 { } movieClip 1745 { frame 1 { stop(); } } movieClip 1751 { } movieClip 1760 { frame 1 { stop(); } frame 104 { stop(); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { ScreenOverlay.tick(); } } frame 11 { gotoAndStop(1); } frame 13 { _root.f_LevelDefaults(); _root.f_Level1_20Init(); stop(); } movieClip 1763 { } movieClip 1766 { } movieClip 1769 { } movieClip 1773 { } movieClip 1776 { } movieClip 1778 { frame 1 { stop(); } frame 2 { play(); } frame 4 { _root.s_elevatordoor.start(0, 0); } frame 15 { if (spawns) { if (_x < _root.p1.x) { var u_temp = _root.f_NewEnemy(_x - 50, _y); if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } else { var u_temp = _root.f_NewEnemy(_x + 50, _y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } u_temp.autowalk_timer = 20; u_temp.invincible_timer = 10; } else { stop(); } } frame 51 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 55 { _root.s_steam.start(0, 0); } frame 62 { stop(); } frame 63 { play(); } frame 103 { gotoAndPlay('close'); } frame 114 { stop(); } frame 127 { stop(); } } movieClip 1779 { frame 1 { _root.f_AddNeutral(this); stop(); } } movieClip 1782 { frame 1 { _root.f_AddNeutral(this); stop(); } } movieClip 1784 { frame 1 { gotoAndStop(2); } } movieClip 1785 { frame 30 { _parent.door2.spawns = 2; _parent.door2.gotoAndPlay('open'); } frame 70 { _parent.door1.gotoAndPlay('buckle'); _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 124 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent._parent.door2.spawns = 1; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 155 { _parent.door1.gotoAndPlay('buckle2'); _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 177 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 184 { _root.game.game.event2.warpto = 'level1_21'; _root.game.game.event2.warpspawn = 1; _root.arrow.gotoAndPlay('go'); } frame 242 { _parent.door1.gotoAndPlay('buckle2'); _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 319 { gotoAndPlay('loop'); } } movieClip 1786 { instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e3 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 1787 { instance game of movieClip 1786 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 14 { gotoAndStop(1); } frame 16 { _root.f_LevelDefaults(); _root.f_Level1_21Init(); stop(); } movieClip 1791 { frame 1 { gotoAndStop(2); } } movieClip 1794 { } movieClip 1795 { } movieClip 1799 { frame 1 { stop(); } frame 2 { play(); } frame 4 { _root.s_elevatordoor.start(0, 0); } frame 15 { if (spawns) { var u_temp = _root.f_NewEnemy(_x, _y); if (u_temp.x > _root.p1.x) { if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } else { if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } } else { stop(); } } frame 25 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 27 { _root.s_steam.start(0, 0); } frame 36 { stop(); } frame 37 { play(); } frame 39 { _root.s_elevatordoor.start(0, 0); } frame 47 { _root.game.game.event2.other = _root.game.game.door3; _root.game.game.event2.otherplay = 'hankin'; stop(); } frame 48 { _root.f_AddNeutral(this); _root.f_Depth(this, _parent.ground._y + 10); _root.f_AddNeutral(_parent.sign); _root.f_Depth(_parent.sign, _parent.ground._y + 15); _root.f_AddNeutral(_parent.closet); _root.f_Depth(_parent.closet, _parent.ground._y + 16); _root.p1.y = _y - 5; _root.p1._y = _root.p1.y; _root.p1.x = _x; _root.p1._x = _root.p1.x; _root.p1.wait = true; _root.p1.gotoAndStop('wait'); play(); } frame 67 { _root.s_steam.start(0, 0); } frame 76 { _root.fader.spawnpoint = 1; _root.fader.warpto = 'level1_28'; _root.fader.gotoAndPlay('fadeout'); stop(); } } movieClip 1802 { frame 1 { gotoAndStop(2); } frame 3 { _parent.overlay.gotoAndStop('on'); } } movieClip 1805 { } movieClip 1808 { } movieClip 1811 { } movieClip 1814 { } movieClip 1817 { } movieClip 1820 { } movieClip 1823 { } movieClip 1828 { } movieClip 1829 { } movieClip 1831 { frame 74 { stop(); } } movieClip 1850 { frame 62 { stop(); } } movieClip 1851 { frame 1 { gotoAndStop(2); } frame 3 { _root.camera.prey = this; _root.shake_y = 12; _root.s_explosion3.start(0, 0); play(); } frame 40 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); _parent.door1.gotoAndPlay('buckle'); } frame 84 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); _parent.cracks.gotoAndStop('on'); _parent.overlay.gotoAndStop('cracks'); _parent.door1.gotoAndPlay('buckle2'); } frame 86 { _root.s_song1.s_song1.stop(); _root.s_explosion2.start(0, 0); _parent.door1.gotoAndStop('blank'); _root.stair_boss = true; } frame 227 { _root.s_clownswipe.start(0, 0); } frame 232 { _root.f_AddNeutral(this); _root.f_InitClownDemon5(); _root.camera.prey = _parent.hand1; _parent.clownhole.gotoAndStop('on'); _root.shake_y = 14; _root.s_explosion3.start(0, 0); } frame 233 { _root.s_song3.s_song3.start(0, 999); } frame 251 { _root.s_bodyfall5.start(0, 0); } frame 255 { _root.s_bodyfall4.start(0, 0); } frame 271 { stop(); } } movieClip 1856 { frame 1 { _root.f_AddNeutral(this); gotoAndStop(2); } } movieClip 1861 { } movieClip 1870 { } movieClip 1871 { frame 1 { _root.f_AddNeutral(this); stop(); } } movieClip 1873 { } movieClip 1874 { frame 1 { default_x = _x; gotoAndStop(2); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownBodySide(_parent); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownBodySide(_parent); } } } movieClip 1876 { frame 1 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownFireball(_parent); } } frame 26 { stop(); } } movieClip 1877 { frame 1 { gotoAndStop(2); } } movieClip 1880 { frame 1 { stop(); } } movieClip 1882 { } movieClip 1884 { } movieClip 1885 { } movieClip 1900 { } movieClip 1906 { } movieClip 1911 { } movieClip 1913 { } movieClip 1914 { } movieClip 1915 { } movieClip 1925 { } movieClip 1926 { } movieClip 1927 { frame 34 { _root.f_MakeZombies(); } frame 130 { _root.camera.paused = true; _root.fader.spawnpoint = 1; _root.fader.warpto = 'level1_3'; _root.fader.gotoAndPlay('fadeout'); stop(); } } movieClip 1928 { frame 1 { head_type = 1; gotoAndStop(2); } instance of movieClip 17 empty { onClipEvent (load) { timer = 60; _parent._x = -100 - _root.game_x; } onClipEvent (enterFrame) { if (_parent._x + _root.game_x < 250) { _parent._x += 8; } else { --timer; if (timer <= 0) { _parent.gotoAndStop('zombies'); } } } } } movieClip 1929 { } movieClip 1930 { instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.currentlevel == 'level1_23') { _root.f_ClownHeadFollow(_parent._parent); _root.f_ClownMode1Timer(_parent._parent); } } } frame 45 { gotoAndPlay('idle'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownHeadFireRotate(_parent._parent, -20); } } frame 89 { _root.s_clownfire.start(0, 0); } instance of movieClip 17 empty { onClipEvent (load) { timer = 0; } onClipEvent (enterFrame) { ++timer; if (timer % 2 == 0) { _parent._parent._y -= 4; } else { _parent._parent._y += 4; } _parent._parent._rotation += 2; _root.f_ClownSideFire1(_parent._parent); } } frame 104 { } frame 124 { gotoAndPlay('idle'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownHeadFireRotate(_parent._parent, 20); } } frame 182 { _root.s_clownfire.start(0, 0); } instance of movieClip 17 empty { onClipEvent (load) { timer = 0; } onClipEvent (enterFrame) { ++timer; if (timer % 2 == 0) { _parent._parent._y -= 4; } else { _parent._parent._y += 4; } _parent._parent._rotation -= 2; _root.f_ClownSideFire1(_parent._parent); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownHeadFireRotate(_parent._parent, 0); } } frame 259 { gotoAndPlay('idle'); } } movieClip 1931 { frame 1 { x = _x; y = _y; gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownHandMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 1932 { frame 45 { gotoAndPlay('idle'); } } movieClip 1933 { frame 3 { busy = false; } frame 16 { busy = false; } frame 31 { busy = false; } frame 45 { if (!busy) { gotoAndPlay('idle'); } } frame 51 { _root.game.game.hand2.body.body.gotoAndPlay('fist'); } frame 71 { _parent.force_x = -40; _parent.force_y = -20; _parent.recover = 20; } frame 72 { _root.clown_lag = 1; _root.s_clownswipe.start(0, 0); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ImpactPoint(_parent.box); } } frame 88 { _root.clown_lag = 6; } frame 89 { _root.game.game.hand2.body.body.gotoAndPlay('unfist'); } frame 126 { busy = false; gotoAndPlay('idle'); } frame 136 { _root.clown_lag = 6; _root.game.game.hand2.body.body.gotoAndPlay('fist'); _root.game.game.hand2.spasm = true; } frame 170 { _root.s_clownswipe.start(0, 0); _parent._parent.hand2.knockout = true; _root.nostopping = true; _root.clown_lag = 1; } frame 191 { _root.game.game.hand2.spasm = false; stop(); } frame 199 { busy = false; } frame 207 { busy = false; } frame 213 { _root.shake_y = 10; _root.s_explosion2.start(0, 0); if (!busy) { gotoAndPlay('step'); } } } movieClip 1934 { frame 30 { gotoAndPlay('idle'); } } movieClip 1935 { frame 1 { gotoAndStop(2); } frame 3 { _root.f_Depth(_root.game.game.hand1, _root.abs_bottom - 10); iterations = 0; hitall = true; recover = 30; _root.clown_lag = 2; } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_StairClown(_parent); } } instance of movieClip 225 { onClipEvent (load) { clownhead = _root.game.game.clownhead; limit_left = _root.game.game.limit_left._x; } onClipEvent (enterFrame) { if (clownhead._x - 250 > limit_left) { limit_left = clownhead._x - 250; if (limit_left > _root.game.game.limit_left2._x) { limit_left = _root.game.game.limit_left2._x; } if (_root.limit_left < limit_left) { _root.limit_left += 10; if (_root.limit_left > limit_left) { _root.limit_left = limit_left; } } } _root.game.game.limit_left._x = _root.limit_left; } } frame 58 { hand1.busy = true; hand2.busy = true; hand1.gotoAndPlay('step'); hand2.gotoAndPlay('step2'); _root.camera.prey = _root.p1; } frame 113 { hand1.busy = true; hand2.busy = true; hand1.gotoAndPlay('idle'); hand2.gotoAndPlay('idle2'); _root.clown_lag = 6; } frame 125 { _root.clown_lag = 6; } frame 148 { if (finished) { stop(); } else { ++iterations; if (iterations > 1) { iterations = 0; gotoAndPlay('punch2'); } else { gotoAndPlay('punch1'); } } } frame 162 { _root.clown_lag = 2; _parent.hand2.body.body.gotoAndPlay('fist'); } frame 185 { _root.clown_lag = 1; _root.s_clownswipe.start(0, 0); force_x = 5; force_y = -25; } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ImpactPoint(_parent.box.body); } } frame 198 { _root.clown_lag = 6; _parent.hand2.body.body.gotoAndPlay('unfist'); } frame 202 { _parent.hand2.body.body.gotoAndStop('idle'); } frame 223 { gotoAndPlay('decision'); } frame 229 { _root.clown_lag = 2; _parent.hand1.body.body.gotoAndStop('fist2'); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.limit_left = _root.game.game.clownhead._x - 250; } } frame 252 { } frame 252 { _root.clown_lag = 1; _root.s_clownswipe.start(0, 0); force_x = 5; force_y = -25; } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ImpactPoint(_parent.box.body); } } frame 265 { _root.clown_lag = 6; } frame 269 { _parent.hand1.body.body.gotoAndStop('idle'); } frame 290 { gotoAndPlay('decision'); } } movieClip 1936 { frame 1 { stop(); } } movieClip 1937 { } movieClip 1938 { frame 1 { gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownHandMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 1941 { } movieClip 1944 { } movieClip 1947 { } movieClip 1950 { } movieClip 1951 { } movieClip 1952 { instance of movieClip 17 empty { onClipEvent (load) { var g = _parent._parent.ground; } onClipEvent (enterFrame) { for (var i in _root.a_Enemies) { var u_temp = _root.a_Enemies[i]; if (u_temp.humanoid) { if (u_temp.y > g._y + 10) { _root.f_MoveV(u_temp, g._y - 5 - u_temp.y); _root.f_MoveH(u_temp, g._x - g._width / 2 - u_temp.x); } } } u_temp = _root.p1; if (u_temp.y > g._y + 10) { _root.f_MoveV(u_temp, g._y - 5 - u_temp.y); _root.f_MoveH(u_temp, g._x - g._width / 2 - u_temp.x); } } } frame 60 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent._parent.door2.spawns = 2; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 130 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent.play(); } } } frame 135 { _parent.rubble.gotoAndPlay('go'); } frame 421 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.clown_health < _root.clown_cp2) { _root.game.game.light.gotoAndStop('on'); _root.game.game.door3.spawns = 0; _root.game.game.door3.gotoAndPlay('open'); _root.game.game.moves.finished = true; _parent.gotoAndPlay('finish'); } else { if (_root.p1.ammo <= 0) { if (_root.a_Enemies.length <= 1) { _parent._parent.door2.spawns = 1; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } } } frame 457 { gotoAndStop('loop'); } frame 468 { _root.game.game.event2.warpto = 'level1_22'; _root.game.game.event2.warpspawn = 1; _root.arrow.gotoAndPlay('go'); } frame 507 { _root.game.game.clownhead.head.gotoAndPlay('fire2'); } frame 647 { gotoAndPlay('fire'); } } movieClip 1953 { instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; _xscale = _xscale * -1; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 6; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; _xscale = _xscale * -1; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 6; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; _xscale = _xscale * -1; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 1954 { instance game of movieClip 1953 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 17 { gotoAndStop(1); } frame 19 { _root.f_LevelDefaults(); _root.f_Level1_22Init(); stop(); } movieClip 1957 { } movieClip 1958 { } movieClip 1961 { } movieClip 1962 { frame 1 { _root.f_AddNeutral(this); _root.f_Depth(this, _parent.edging._y - 10); } } movieClip 1964 { } movieClip 1965 { frame 1 { gotoAndStop(2); } frame 15 { stop(); } } movieClip 1966 { frame 1 { default_x = _x; default_y = _y; _y = _y - 300; } frame 3 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownBodyElevator(_parent); } } } movieClip 1970 { } movieClip 1971 { instance of movieClip 1970 { onClipEvent (enterFrame) { _rotation = _rotation - _root.elevator_speed; } } instance of movieClip 1970 { onClipEvent (enterFrame) { _rotation = _rotation + _root.elevator_speed; } } instance of movieClip 1970 { onClipEvent (enterFrame) { _rotation = _rotation + _root.elevator_speed; } } instance of movieClip 1970 { onClipEvent (enterFrame) { _rotation = _rotation - _root.elevator_speed; } } } movieClip 1974 { } movieClip 1975 { frame 3 { if (Math.abs(_root.elevator_speed) > 3) { shake = true; _root.game.game.edging._y += 1; _root.game.game.door1._y += 1; _root.game.game.door1_frame._y += 1; _root.game.game.holes_overlay._y += 1; _root.game.game.elevator_border._y -= 1; _parent._y += 1; } else { shake = false; } } frame 6 { if (shake) { _root.game.game.edging._y -= 1; _root.game.game.door1._y -= 1; _root.game.game.door1_frame._y -= 1; _root.game.game.holes_overlay._y -= 1; _root.game.game.elevator_border._y += 1; _parent._y -= 1; } gotoAndPlay(1); } } movieClip 1979 { } movieClip 1986 { frame 1 { _root.s_explosion2.start(0, 0); } frame 5 { _root.s_explosion1.start(0, 0); } frame 9 { _root.s_explosion2.start(0, 0); } frame 60 { stop(); } } movieClip 1987 { frame 1 { stop(); } } movieClip 1990 { frame 1 { _root.f_AddNeutral(this); } } movieClip 1993 { frame 1 { _root.f_AddNeutral(this); stop(); } } movieClip 1996 { } movieClip 1997 { frame 1 { _root.f_AddNeutral(this); } } movieClip 2000 { } movieClip 2001 { frame 1 { _root.f_AddNeutral(this); } } movieClip 2002 { } movieClip 2003 { frame 1 { _parent.clownbody.air = true; stop(); } frame 4 { _parent.fireglow.gotoAndPlay('go'); } frame 15 { _root.s_explosion3.start(0, 0); _root.shake_y = 12; } frame 22 { _root.clown_lag = 6; _parent.clownbody.air = false; default_x = _x; decisions = 0; hitall = true; } frame 83 { _root.game.game.hand2.body.body.gotoAndPlay('fistdown'); } frame 99 { _root.clown_lag = 1; } frame 104 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 118 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 126 { _root.s_clownswipe.start(0, 0); } frame 130 { _root.f_RemoveWall(_root.game.game.roof2.z_wall); _root.f_RemovePlatform(_root.game.game.roof2.z_platform); _root.s_explosion3.start(0, 0); _root.s_bang.start(0, 0); _root.shake_y = 10; _parent.room.gotoAndStop(2); _root.game.game.holes_overlay.gotoAndStop(2); } frame 132 { force_x = random(3) - 6; force_y = -10; } frame 137 { _root.clown_lag = 6; } frame 163 { _root.game.game.hand2.body.body.gotoAndStop('palm'); } frame 210 { _root.clown_lag = 6; } frame 219 { _root.game.game.hand1.body.body.gotoAndPlay('fistdown'); } frame 235 { _root.clown_lag = 1; } frame 239 { force_x = random(3) - 6; force_y = -10; } frame 240 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 253 { force_x = random(3) - 6; force_y = -10; } frame 254 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 262 { _root.s_clownswipe.start(0, 0); } frame 265 { force_x = random(3) - 6; force_y = -10; } frame 266 { _root.f_RemoveWall(_root.game.game.roof6.z_wall); _root.f_RemovePlatform(_root.game.game.roof6.z_platform); _root.s_explosion3.start(0, 0); _root.s_bang.start(0, 0); _root.shake_y = 10; _parent.room.gotoAndStop(3); _root.game.game.holes_overlay.gotoAndStop(3); } frame 273 { _root.clown_lag = 6; } frame 299 { _root.game.game.hand1.body.body.gotoAndStop('palm'); } frame 336 { _root.clown_lag = 6; } frame 345 { _root.game.game.hand2.body.body.gotoAndPlay('fistdown'); } frame 361 { _root.clown_lag = 1; } frame 365 { force_x = random(3) - 6; force_y = -10; } frame 366 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 379 { force_x = random(3) - 6; force_y = -10; } frame 380 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 388 { _root.s_clownswipe.start(0, 0); } frame 391 { force_x = random(3) - 6; force_y = -10; } frame 392 { _root.f_RemoveWall(_root.game.game.roof4.z_wall); _root.f_RemovePlatform(_root.game.game.roof4.z_platform); _root.s_explosion3.start(0, 0); _root.s_bang.start(0, 0); _root.shake_y = 10; _parent.room.gotoAndStop(4); _root.game.game.holes_overlay.gotoAndStop(4); } frame 399 { _root.clown_lag = 6; } frame 426 { _root.game.game.hand2.body.body.gotoAndStop('palm'); } frame 465 { play(); } frame 488 { if (_root.p1.y < _root.game.game.elevator_top._y) { gotoAndPlay('crush'); } else { if (decisions < 3) { ++decisions; if (_root.p1.x < _parent.roof2._x) { gotoAndPlay('punch1'); } else { if (_root.p1.x < _parent.roof3._x) { gotoAndPlay('punch2'); } else { if (_root.p1.x < _parent.roof4._x) { gotoAndPlay('punch3'); } else { if (_root.p1.x < _parent.roof5._x) { gotoAndPlay('punch4'); } else { if (_root.p1.x < _parent.roof6._x) { gotoAndPlay('punch5'); } else { gotoAndPlay('punch6'); } } } } } } else { decisions = 0; gotoAndPlay('fire1'); } } } frame 496 { play(); } instance of movieClip 225 { onClipEvent (enterFrame) { if (_root.p1.y < _root.game.game.elevator_top._y) { _parent.prey = _root.p1; } else { _parent.prey = _root.game.game.clown_bottom; } var u_temp = _root.game.game.hand1; if (u_temp.y < _parent.prey.y - 6) { u_temp.y += 6; u_temp._y = u_temp.y; } var u_temp = _root.game.game.hand2; if (u_temp.y < _parent.prey.y - 6) { u_temp.y += 6; u_temp._y = u_temp.y; } } } frame 558 { _root.game.game.hand1.body.body.gotoAndStop('clap'); _root.game.game.hand2.body.body.gotoAndStop('clap'); } instance of movieClip 225 { onClipEvent (enterFrame) { if (_root.p1.y < _root.game.game.elevator_top._y) { _parent.prey = _root.p1; } else { _parent.prey = _root.game.game.clown_bottom; } var u_temp = _root.game.game.hand1; u_temp.x = _parent._x + _parent.hand1._x; u_temp.y = _parent.prey._y; u_temp._x = u_temp.x; u_temp._y = u_temp.y; if (_parent.prey == _root.p1) { if (_root.p1._x > u_temp.x) { _root.f_MoveH(_root.p1, u_temp.x - _root.p1.x); } } var u_temp = _root.game.game.hand2; u_temp.x = _parent._x + _parent.hand2._x; u_temp.y = _parent.prey._y; u_temp._x = u_temp.x; u_temp._y = u_temp.y; if (_parent.prey == _root.p1) { if (_root.p1._x < u_temp.x) { _root.f_MoveH(_root.p1, u_temp.x - _root.p1.x); } } } } frame 567 { force_x = 0; force_y = -10; } frame 568 { _root.shake_y = 12; _root.s_explosion1.start(0, 0); } frame 608 { _root.game.game.hand1.body.body.gotoAndStop('fu'); _root.game.game.hand2.body.body.gotoAndStop('palm'); } frame 667 { _root.game.game.hand1.body.body.gotoAndStop('palm'); gotoAndPlay('decision'); } frame 675 { _root.clown_lag = 6; _parent.clownbody.air = false; } frame 684 { _root.game.game.hand2.body.body.gotoAndPlay('fist'); } frame 705 { _root.clown_lag = 1; } frame 727 { _root.s_clownswipe.start(0, 0); } frame 732 { _root.f_RemoveWall(_root.game.game.roof3.z_wall); _root.f_RemovePlatform(_root.game.game.roof3.z_platform); _root.s_explosion3.start(0, 0); _root.s_bang.start(0, 0); _root.shake_y = 10; _parent.room.gotoAndStop(5); _root.game.game.holes_overlay.gotoAndStop(5); } frame 737 { _root.game.game.hand1.body.body.gotoAndPlay('fist'); force_x = random(3) - 6; force_y = -10; } frame 752 { _root.s_clownswipe.start(0, 0); } frame 758 { _root.f_RemoveWall(_root.game.game.roof5.z_wall); _root.f_RemovePlatform(_root.game.game.roof5.z_platform); _root.s_explosion3.start(0, 0); _root.s_bang.start(0, 0); _root.shake_y = 10; _parent.room.gotoAndStop(6); _root.game.game.holes_overlay.gotoAndStop(6); } frame 762 { force_x = random(3) - 6; force_y = -10; } frame 799 { _root.game.game.hand1.body.body.gotoAndPlay('palm'); _root.game.game.hand2.body.body.gotoAndPlay('palm'); } frame 801 { _root.f_RemoveWall(_root.game.game.roof1.z_wall); _root.f_RemovePlatform(_root.game.game.roof1.z_platform); _root.f_RemoveWall(_root.game.game.roof7.z_wall); _root.f_RemovePlatform(_root.game.game.roof7.z_platform); _root.s_explosion3.start(0, 0); _root.s_bang.start(0, 0); _root.shake_y = 15; _parent.room.gotoAndStop(7); _root.game.game.holes_overlay.gotoAndStop(7); } frame 805 { _root.clown_lag = 6; } frame 825 { _root.game.game.jaw.gotoAndPlay('open'); _parent.door1.spawns = 0; _parent.door1.gotoAndStop('open'); _root.game.game.event2.warpto = 'level1_23'; _root.game.game.event2.warpspawn = 1; } instance of movieClip 17 empty { onClipEvent (load) { timer = 0; } onClipEvent (enterFrame) { _root.f_ClownSideFire1(_parent); } } frame 842 { _root.s_clownfire.start(0, 0); } frame 939 { gotoAndPlay('fireloop'); } frame 958 { _root.clown_lag = 6; } frame 972 { _root.game.game.jaw.gotoAndPlay('open'); } frame 985 { _root.s_clownfire.start(0, 0); } instance of movieClip 17 empty { onClipEvent (load) { timer = 0; speed = 1; _parent.clownhead._rotation -= 2; } onClipEvent (enterFrame) { ++timer; if (timer % 2 == 0) { _parent.clownhead._rotation -= 4; } else { _parent.clownhead._rotation += 4; } _root.f_ClownSideFire1(_parent); if (_parent._x - speed > _root.p1.x) { _parent._x -= speed; } else { if (_parent._x + speed < _root.p1.x) { _parent._x += speed; } else { _parent._x = _root.p1.x; } } speed += 1; if (speed > 20) { speed = 20; } } } frame 1022 { _root.game.game.jaw.gotoAndPlay('close'); } instance of movieClip 17 empty { onClipEvent (load) { speed = 1; } onClipEvent (enterFrame) { var goal = _parent.default_x; if (_parent._x - speed > goal) { _parent._x -= speed; } else { if (_parent._x + speed < goal) { _parent._x += speed; } else { _parent._x = goal; } } speed += 1; if (speed > 20) { speed = 20; } } } frame 1093 { gotoAndPlay('decision'); } frame 1111 { _root.game.game.hand2.body.body.gotoAndPlay('fistdown'); } frame 1120 { force_x = random(3) - 6; force_y = -10; } frame 1121 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } frame 1125 { } frame 1128 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 1132 { _root.clown_lag = 6; } frame 1158 { _root.game.game.hand2.body.body.gotoAndStop('palm'); } frame 1179 { gotoAndPlay('decision'); } frame 1199 { _root.game.game.hand1.body.body.gotoAndPlay('fistdown'); } frame 1209 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } frame 1216 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 1220 { _root.clown_lag = 6; } frame 1246 { _root.game.game.hand1.body.body.gotoAndStop('palm'); } frame 1271 { gotoAndPlay('decision'); } frame 1292 { _root.game.game.hand2.body.body.gotoAndPlay('fistdown'); } frame 1301 { force_x = random(3) - 6; force_y = -10; } frame 1302 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } frame 1309 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 1313 { _root.clown_lag = 6; } frame 1341 { _root.game.game.hand2.body.body.gotoAndStop('palm'); } frame 1362 { gotoAndPlay('decision'); } frame 1380 { _root.game.game.hand1.body.body.gotoAndPlay('fistdown'); } frame 1390 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } frame 1397 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 1401 { _root.clown_lag = 6; } frame 1430 { _root.game.game.hand1.body.body.gotoAndStop('palm'); } frame 1455 { gotoAndPlay('decision'); } frame 1470 { _root.game.game.hand1.body.body.gotoAndPlay('fistdown'); } frame 1480 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } frame 1487 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 1491 { _root.clown_lag = 6; } frame 1520 { _root.game.game.hand1.body.body.gotoAndStop('palm'); } frame 1545 { gotoAndPlay('decision'); } frame 1557 { _root.game.game.hand2.body.body.gotoAndPlay('fistdown'); } frame 1568 { force_x = random(3) - 6; force_y = -10; } frame 1569 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } frame 1576 { _root.s_bang.start(0, 0); _root.shake_y = 10; } frame 1580 { _root.clown_lag = 6; } frame 1608 { _root.game.game.hand2.body.body.gotoAndStop('palm'); } frame 1629 { gotoAndPlay('decision'); } } movieClip 2004 { frame 1 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent._x + _root.game_x - 100 < _root.screenWidth) { if (_root.a_Enemies.length <= 0) { _root.arrow.gotoAndPlay('go'); _root.limit_right = _parent.next_limit._x; _parent.next_limit.gotoAndStop('on'); _parent.gotoAndStop('off'); } } } } } movieClip 2005 { frame 2 { timer = 0; shake_timer = 0; s_elevator.start(0, 2000); s_elevator.setVolume(0); s_elevatorbusted = new Sound(this); s_elevatorbusted.attachSound('sound_elevator_busted2.wav'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { var u_volume = _parent.s_elevator.getVolume(); if (u_volume < 100) { _parent.s_elevator.setVolume(u_volume + 1); } max = -50; _root.elevator_speed -= 0.1; if (_root.elevator_speed < max) { _root.elevator_speed = max; } } } frame 104 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent.play(); } } } frame 106 { _root.f_InitClownDemon3(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_CameraFollowCY(_root.p1, _root.game.game.clownhead, _root.game.game.chase_cam); _root.f_ScaleFollow(_root.p1, _root.game.game.clownhead, 80, 60); } } frame 107 { _root.camera.prey = _root.game.game.chase_cam; timer = 90; } frame 126 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { var u_volume = _parent.s_elevator.getVolume(); if (u_volume < 100) { _parent.s_elevator.setVolume(u_volume + 1); } max = -50; _root.elevator_speed -= 0.1; if (_root.elevator_speed < max) { _root.elevator_speed = max; } ++_parent.timer; if (_root.clown_health <= _root.clown_cp3) { _parent.gotoAndPlay('finish'); } else { if (_root.p1.ammo <= 0) { if (_parent.timer >= 90) { if (_root.a_Enemies.length <= 1) { _parent.play(); } } } } } } instance of movieClip 17 empty { onClipEvent (load) { var u_volume = _parent.s_elevator.getVolume(); vol_v = u_volume / 30; el_v = Math.abs(_root.elevator_speed) / 30; } onClipEvent (enterFrame) { var u_volume = _parent.s_elevator.getVolume(); if (u_volume + vol_v > 0) { _parent.s_elevator.setVolume(u_volume - vol_v); } else { _parent.s_elevator.setVolume(0); } _root.elevator_speed += el_v; if (_root.elevator_speed > 0) { _root.elevator_speed = 0; } } } frame 158 { _root.shake_y = 12; _root.s_bang.start(0, 0); } frame 171 { _parent.door1.spawns = 1; _parent.door1.gotoAndPlay('open'); timer = 0; gotoAndPlay('loop'); } frame 250 { _root.game.game.moves.gotoAndPlay('roofoff'); play(); } instance of movieClip 17 empty { onClipEvent (load) { var u_volume = _parent.s_elevator.getVolume(); vol_v = u_volume / 60; el_v = Math.abs(_root.elevator_speed) / 60; } onClipEvent (enterFrame) { var u_volume = _parent.s_elevator.getVolume(); if (u_volume + vol_v > 0) { _parent.s_elevator.setVolume(u_volume - vol_v); } else { _parent.s_elevator.setVolume(0); } _root.elevator_speed += el_v; if (_root.elevator_speed > 0) { _root.elevator_speed = 0; } } } frame 326 { _root.shake_y = 12; } frame 352 { stop(); } } movieClip 2006 { instance shaft of movieClip 1958 { onClipEvent (enterFrame) { _y = _y + _root.elevator_speed; if (_y + _root.game_y > 0) { _y = _y - 674.33; } if (_y + _root.game_y < -800) { _y = _y + 674.33; } } } instance of movieClip 1962 { onClipEvent (enterFrame) { _y = _y + _root.elevator_speed; if (_y + _root.game_y > 0) { _y = _y - 674.33; } if (_y + _root.game_y < -800) { _y = _y + 674.33; } } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 2; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; gotoAndStop('activate'); _xscale = _xscale * -1; } } } movieClip 2007 { instance game of movieClip 2006 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 20 { gotoAndStop(1); } frame 22 { _root.f_LevelDefaults(); _root.f_Level1_23Init(); stop(); } movieClip 2010 { } movieClip 2019 { } movieClip 2020 { frame 1 { gotoAndStop(2); } } movieClip 2021 { frame 1 { _root.f_AddNeutral(this); gotoAndStop(2); } frame 3 { _root.camera.prey = this; _root.shake_y = 12; _root.s_explosion3.start(0, 0); play(); } frame 40 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); _parent.door2.gotoAndPlay('buckle'); } frame 84 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); _parent.cracks.gotoAndStop('on'); _parent.overlay.gotoAndStop('cracks'); _parent.door2.gotoAndPlay('buckle2'); } frame 120 { _root.f_InitClownDemon2(); _parent.clownhole.gotoAndStop('on'); _root.shake_y = 14; _root.s_explosion3.start(0, 0); } frame 139 { _root.s_bodyfall5.start(0, 0); } frame 143 { _root.s_bodyfall4.start(0, 0); } frame 159 { _root.clown_lag = 6; _root.camera.prey = _root.p1; stop(); } } movieClip 2022 { frame 1 { _root.f_AddNeutral(this); gotoAndStop(2); } } movieClip 2024 { frame 1 { _root.f_AddNeutral(this); _root.f_Depth(this); gotoAndStop(2); } } movieClip 2025 { frame 1 { default_x = _x; gotoAndStop(2); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownBodySide(_parent); } } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownBodySide(_parent); } } } movieClip 2028 { } movieClip 2031 { } movieClip 2032 { frame 1 { _root.f_AddPipe(this); gotoAndStop(2); } } movieClip 2033 { frame 1 { gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownHandMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 2034 { frame 1 { gotoAndStop(2); } frame 21 { _root.clown_lag = 6; stop(); } } movieClip 2035 { frame 1 { stop(); } frame 2 { _y = _root.p1._y; _root.camera.prey = camera; play(); } frame 7 { var i = 0; for (n in _root.a_EnemiesLog) { ++i; var u_p = _root.a_EnemiesLog[n]; if (i == 1) { left = u_p; } else { if (u_p.x < left.x) { left = u_p; } } } stop(); } instance of movieClip 17 empty { onClipEvent (load) { speed = 1; } onClipEvent (enterFrame) { _parent.camera._x -= speed; speed += 4; if (speed > 40) { speed = 40; } var i = 0; for (n in _root.a_EnemiesLog) { var u_p = _root.a_EnemiesLog[n]; if (u_p.x + _root.game_x < _root.screenWidth - 100) { if (u_p.x + _root.game_x > 0) { ++i; } } if (i >= 2 or _parent.left.x + _root.game_x > 0) { _parent.gotoAndPlay('finish'); } } } } frame 8 { _parent.jebus.gotoAndStop('walk'); play(); } frame 26 { stop(); } } movieClip 2036 { frame 35 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent.play(); } } } frame 36 { _parent.rubble.gotoAndPlay('go'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_KeepLeftClown(); } } frame 205 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.p1.ammo <= 0) { if (_root.a_Enemies.length <= 1) { _parent._parent.door1.spawns = 1; _parent._parent.door1.gotoAndPlay('open'); _parent.play(); } } } } frame 241 { gotoAndPlay('loop'); } } movieClip 2037 { instance floor1 of movieClip 146 l2 { onClipEvent (load) { z_platform.texture = 2; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } } movieClip 2038 { instance game of movieClip 2037 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 23 { gotoAndStop(1); } frame 25 { _root.f_LevelDefaults(); _root.f_Level1_24Init(); stop(); } movieClip 2041 { } movieClip 2044 { } movieClip 2045 { } movieClip 2048 { frame 15 { _root.f_RemoveWall(_parent.rightwall.z_wall); } frame 16 { _parent.hankhole._y = _root.hole_y; _parent.hankhole.gotoAndStop('on'); _parent.hankhole2._y = _root.hole_y; _parent.hankhole2.gotoAndStop('on'); _root.p1.x = _x; _root.p1._x = _x; _root.p1.y = _root.hole_y; _root.p1._y = _root.hole_y; _root.p1._xscale *= -1; _root.f_TossInit(_root.p1, -30, -10); _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 26 { _root.f_AddWall(_parent.rightwall, _parent.rightwall.z_wall); stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent._parent.door1.spawns = 2; _parent._parent.door1.gotoAndPlay('open'); _parent.play(); } } } frame 41 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent._parent.door2.spawns = 1; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 56 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent._parent.door1.spawns = 1; _parent._parent.door1.gotoAndPlay('open'); _parent.play(); } } } frame 70 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent._parent.door1.gotoAndPlay('open'); _parent.play(); } } } frame 77 { _root.game.game.event2.warpto = 'level1_25'; _root.game.game.event2.warpspawn = 1; _root.arrow.gotoAndPlay('goleft'); stop(); } } movieClip 2049 { instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } instance e3 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e4 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e5 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 2050 { instance game of movieClip 2049 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 26 { gotoAndStop(1); } frame 28 { _root.f_LevelDefaults(); _root.f_Level1_25Init(); stop(); } movieClip 2057 { frame 1 { _root.f_AddNeutral(this); gotoAndStop(2); } } movieClip 2060 { } movieClip 2063 { } movieClip 2064 { frame 1 { _root.f_AddNeutral(this); } } movieClip 2146 { frame 10 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent.play(); } } } frame 20 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 55 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 91 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 128 { _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 156 { _root.f_RemovePlatform(_parent.holecover.z_platform); _parent.hole_overlay.gotoAndStop('on'); } frame 164 { _root.u_point.x = 0; _root.u_point.y = 0; shell.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var i = 1; while (i <= 3) { var u_temp = _root.f_FX(x, y, y, 'bullet2', 100, 100); u_temp.x = u_temp._x; u_temp.y = u_temp._y; u_temp.h = u_temp._height; u_temp.w = 10; u_temp.w2 = 2; u_temp.damage_val = 5; u_temp.owner = _parent; u_temp.speed_y = 0; u_temp.speed_x = 0; u_temp.hitall = true; u_temp.bullet = true; u_temp.gun_type = 6; u_temp.explosion_type = 'explosion_small'; u_temp.explosion2_type = 'explosion2_small'; if (i == 1) { var rotation = -150; } else { if (i == 2) { var rotation = -155; } else { var rotation = -160; } } if (rotation > 180) { rotation -= 360; } else { if (rotation < -180) { rotation += 360; } } u_temp.speed_x = 50 * Math.cos(_root.PI * rotation); u_temp.speed_y = 50 * Math.sin(_root.PI * rotation); u_temp.body._rotation = rotation; u_temp.line._rotation = rotation; u_temp.force_x = u_temp.speed_x / 2; u_temp.force_y = u_temp.speed_y; if (u_temp.force_y > -10) { u_temp.force_y = -10; } ++i; } _root.shake_y = 12; } frame 239 { if (!downarrow and !_root.p1.wait) { downarrow = true; _root.arrow.gotoAndPlay('godown'); } gotoAndPlay('loop'); } } movieClip 2147 { instance cliff of movieClip 144 l3 { onClipEvent (load) { z_platform.texture = 1; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } } movieClip 2148 { instance game of movieClip 2147 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 29 { gotoAndStop(1); } frame 31 { _root.f_LevelDefaults(); _root.f_Level1_26Init(); stop(); } movieClip 2151 { } movieClip 2160 { } movieClip 2163 { } movieClip 2166 { } movieClip 2169 { } movieClip 2170 { frame 1 { smash = 0; stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent.smash == 1) { if (_root.p1.x <= _parent._x + 20) { _parent.smash = 2; _parent.gotoAndPlay('go'); } } } } frame 2 { _root.s_punch3.start(0, 0); play(); } frame 90 { stop(); } } movieClip 2173 { frame 1 { _root.f_AddNeutral(this); } } movieClip 2178 { frame 1 { _root.f_AddNeutral(this); } } movieClip 2181 { frame 1 { play(); } frame 45 { gotoAndPlay(1); } } movieClip 2182 { } movieClip 2183 { frame 1 { clownhead_x = _parent.clownhead._x - _x; clownhead_y = _parent.clownhead._y - _y; hand1_x = _parent.hand1._x - _x; hand1_y = _parent.hand1._y - _y; x = _x; y = _y; w2 = 20; speed_x = 5; speed_y = -6; platform = _parent.box.z_platform; stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_GiantWalk(_parent._parent); } } } movieClip 2184 { frame 1 { clownhead_x = _parent.clownhead._x - _x; clownhead_y = _parent.clownhead._y - _y; hand1_x = _parent.hand1._x - _x; hand1_y = _parent.hand1._y - _y; x = _x; y = _y; w2 = 20; speed_x = 5; speed_y = -6; platform = _parent.box.z_platform; gotoAndStop('idle'); } frame 3 { play(); } frame 5 { gotoAndStop('idle'); } } movieClip 2187 { } movieClip 2188 { frame 45 { gotoAndPlay(1); } } movieClip 2189 { frame 1 { } frame 2 { stop(); } frame 3 { _parent.clownbody.body.body.gotoAndPlay(1); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_GiantHeadFollow(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 2191 { } movieClip 2192 { frame 1 { stop(); } frame 2 { play(); } frame 50 { gotoAndStop(1); } } movieClip 2193 { } movieClip 2194 { frame 1 { u_x = _root.p1.x; u_y = _root.p1.y - 50; var new_rotation = _root.f_rad2deg(Math.atan2(u_y - _parent._y, u_x - _parent._x)); } frame 5 { _root.u_point.x = 0; _root.u_point.y = 0; shell.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var u_temp = _root.f_ShrapnelGeneral(x, y, y + 300, 2 + random(4), -(8 + random(6)), 'shotgunshell'); u_temp.bounce_limit = 3; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelVanish; } frame 30 { _root.u_point.x = 0; _root.u_point.y = 0; shell.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var i = 1; while (i <= 3) { var u_temp = _root.f_FX(x, y, y, 'bullet2', 100, 100); u_temp.x = u_temp._x; u_temp.y = u_temp._y; u_temp.h = u_temp._height; u_temp.w = 10; u_temp.w2 = 2; u_temp.damage_val = 5; u_temp.owner = _parent; u_temp.gun_type = 6; u_temp.speed_y = 0; u_temp.speed_x = 0; u_temp.hitall = true; u_temp.bullet = true; u_temp.explosion_type = 'explosion_small'; u_temp.explosion2_type = 'explosion2_small'; if (i == 1) { var rotation = _parent._rotation - 180 - 8.5; } else { if (i == 2) { var rotation = _parent._rotation - 180 - 6.5; } else { var rotation = _parent._rotation - 180 - 10.5; } } if (rotation > 180) { rotation -= 360; } else { if (rotation < -180) { rotation += 360; } } u_temp.speed_x = 50 * Math.cos(_root.PI * rotation); u_temp.speed_y = 50 * Math.sin(_root.PI * rotation); u_temp.body._rotation = rotation; u_temp.line._rotation = rotation; u_temp.force_x = u_temp.speed_x / 2; u_temp.force_y = u_temp.speed_y; if (u_temp.force_y > -10) { u_temp.force_y = -10; } ++i; } _root.shake_y = 12; } frame 48 { _parent.gotoAndStop('idle'); } } movieClip 2196 { } movieClip 2197 { frame 41 { _root.f_Depth(_parent, _root.game.game.clownhead._y - 100); if (_parent.grandslam) { _root.nostopping = true; _root.f_RemoveWall(_root.game.game.beam.z_wall); _root.limit_left = _root.game.game.limit_left2._x; _root.p1.weight = 0.5; _root.f_TossInit(_root.p1, -60, -30); if (_root.game.game.pole.smash == 0) { _root.game.game.pole.smash = 1; } _root.camera_lag = 1; } else { _parent.force_x = -30; _parent.force_y = -30; _root.f_ImpactPoint(box); } play(); } frame 69 { _root.f_Depth(_parent, _parent._y); } frame 73 { _parent.gotoAndStop('idle'); } } movieClip 2198 { frame 1 { timer = 0; stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_GiantGunFollow(_parent); _root.f_GiantGunSwing(_parent); } } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_GiantGunReset(_parent); } } } movieClip 2199 { frame 60 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.p1.ammo <= 0) { if (_root.a_Enemies.length <= 2) { var u_temp = _root.f_NewEnemy(_parent._x, _parent._y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } _parent.play(); } } } } frame 96 { gotoAndStop('loop'); } } movieClip 2200 { instance cliff of movieClip 144 l3 { onClipEvent (load) { z_platform.texture = 1; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 2201 { instance game of movieClip 2200 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 32 { gotoAndStop(1); } frame 34 { _root.f_LevelDefaults(); _root.f_Level1_261Init(); stop(); } movieClip 2208 { } movieClip 2209 { frame 1 { stop(); } frame 2 { play(); } frame 4 { _root.s_elevatordoor.start(0, 0); } frame 15 { if (spawns) { if (_x < _root.p1.x) { var u_temp = _root.f_NewEnemy(_x - 50, _y); if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } else { var u_temp = _root.f_NewEnemy(_x + 50, _y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } u_temp.autowalk_timer = 20; u_temp.invincible_timer = 10; } else { stop(); } } frame 51 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 55 { _root.s_steam.start(0, 0); } frame 62 { stop(); } frame 63 { play(); } frame 103 { gotoAndPlay('close'); } frame 114 { stop(); } frame 127 { stop(); } } movieClip 2212 { frame 1 { _root.f_AddNeutral(this); } } movieClip 2213 { frame 114 { _root.p1._xscale *= -1; _root.f_TossInit(_root.p1, -30, -15); } frame 125 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 2) { _parent._parent.door1.spawns = 1; _parent._parent.door1.gotoAndPlay('open'); _parent.play(); } } } frame 149 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 2) { var u_temp = _root.f_NewEnemy(_parent._x, _parent._y); u_temp._xscale *= -1; _parent.play(); } } } frame 165 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 0) { _parent._parent.door1.gotoAndPlay('open'); _parent.play(); } } } frame 172 { _root.game.game.event2.warpto = 'level1_27'; _root.game.game.event2.warpspawn = 1; _root.arrow.gotoAndPlay('goleft'); stop(); } } movieClip 2214 { instance cliff of movieClip 144 l3 { onClipEvent (load) { z_platform.texture = 1; } } instance of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; goframe = 'keepcount'; gotoAndStop('activate'); } } instance of movieClip 1481 { onClipEvent (load) { phase = 1; face_type = 1; head_type = 1; body_type = 1; goframe = 'pushups'; gotoAndStop('activate'); _xscale = _xscale * -1; } } instance of movieClip 1481 { onClipEvent (load) { phase = 1; face_type = 1; head_type = 1; body_type = 1; goframe = 'pushups'; gotoAndStop('activate'); _xscale = _xscale * -1; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 2215 { instance game of movieClip 2214 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 35 { gotoAndStop(1); } frame 37 { _root.f_LevelDefaults(); _root.f_Level1_27Init(); stop(); } movieClip 2220 { } movieClip 2223 { frame 1 { _root.f_InitCorpse(this); } frame 4 { stop(); } frame 5 { play(); } frame 8 { gotoAndStop('idle'); } } movieClip 2228 { frame 1 { stop(); } } movieClip 2236 { } movieClip 2237 { frame 1 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (Math.abs(_root.p1.x - _parent._x) < 100) { _parent.gotoAndPlay('open'); } } } frame 17 { var u_temp = _root.f_Item(body._x + _x, body._y + _y, body._y + _y + 1, 'gun30', 100, 100); u_temp.body_type = 100; u_temp.ammo = 999; u_temp.gun_type = 30; u_temp.body.ammo.text = u_temp.ammo; body.gotoAndStop('off'); } frame 44 { stop(); } } movieClip 2240 { } movieClip 2241 { frame 30 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent.play(); } } } frame 31 { _parent.door2.spawns = 2; _parent.door2.gotoAndPlay('open'); } frame 39 { _parent.door3.spawns = 2; _parent.door3.gotoAndPlay('open'); } frame 72 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 73 { _parent.door3.spawns = 1; _parent.door3.gotoAndPlay('open'); } frame 88 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 89 { _parent.door2.spawns = 1; _parent.door2.gotoAndPlay('open'); } frame 104 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 105 { _parent.door3.spawns = 1; _parent.door3.gotoAndPlay('open'); } frame 120 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 121 { _parent.door2.spawns = 1; _parent.door2.gotoAndPlay('open'); } frame 135 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 136 { _parent.door3.spawns = 1; _parent.door3.gotoAndPlay('open'); } frame 151 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 152 { _parent.door2.spawns = 1; _parent.door2.gotoAndPlay('open'); } frame 166 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 167 { _parent.door3.spawns = 1; _parent.door3.gotoAndPlay('open'); } frame 182 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 4) { _parent.play(); } } } frame 183 { _parent.door2.spawns = 1; _parent.door2.gotoAndPlay('open'); } frame 232 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.a_Enemies.length <= 1) { _parent._parent.door3.gotoAndPlay('hankout'); _parent.play(); } } } frame 242 { _root.arrow.gotoAndPlay('goleft'); stop(); } } movieClip 2242 { instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; gotoAndStop('activate'); } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; gotoAndStop('activate'); } } instance e3 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } instance e4 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 2243 { instance game of movieClip 2242 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 38 { gotoAndStop(1); } frame 40 { _root.f_LevelDefaults(); _root.f_Level1_28Init(); stop(); } movieClip 2248 { } movieClip 2250 { } movieClip 2251 { frame 1 { gotoAndStop(2); } } movieClip 2254 { frame 1 { gotoAndStop(2); } frame 3 { _parent.handmoves.gotoAndPlay('go'); play(); } frame 44 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.chainsawed or !_root.game.game.clownhead.alive) { _parent.gotoAndPlay('hit1'); } } } frame 45 { play(); } frame 126 { _root.bosshealth.gotoAndStop(1); stop(); } } movieClip 2256 { } movieClip 2257 { frame 1 { stop(); } } movieClip 2258 { frame 1 { } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_AgentDoorway(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } } movieClip 2260 { } movieClip 2261 { frame 1 { _root.f_AddNeutral(this); gotoAndStop(2); } frame 70 { _root.medal_popup.unlockMedal('Facerape'); } } movieClip 2262 { frame 1 { _root.f_AddNeutral(this); _root.f_Depth(this, _parent.clownhead2._y + 5); gotoAndStop(2); } frame 3 { play(); } frame 44 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.chainsawed or !_root.game.game.clownhead.alive) { _parent.gotoAndPlay('hit1'); } } } frame 45 { play(); } frame 126 { stop(); } } movieClip 2265 { } movieClip 2268 { } movieClip 2269 { frame 102 { _parent.door1.gotoAndPlay('open'); } frame 122 { _root.f_InitAgent2(); } frame 151 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.alive) { i = 2; } else { i = 1; } if (_root.a_Enemies.length <= i) { _parent._parent.door2.spawns = 1; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 170 { _parent.door3.spawns = 1; _parent.door3.gotoAndPlay('open'); } frame 219 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.alive) { i = 2; } else { i = 1; } if (_root.a_Enemies.length <= i) { _parent._parent.door2.spawns = 1; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 252 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.alive) { i = 2; } else { i = 1; } if (_root.a_Enemies.length <= i) { _parent._parent.door3.spawns = 2; _parent._parent.door3.gotoAndPlay('open'); _parent.play(); } } } frame 296 { _parent.door2.spawns = 1; _parent.door2.gotoAndPlay('open'); } frame 336 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.alive) { i = 2; } else { i = 1; } if (_root.a_Enemies.length <= i) { _parent._parent.door2.spawns = 1; _parent._parent.door2.gotoAndPlay('open'); _parent.play(); } } } frame 380 { _parent.door3.spawns = 1; _parent.door3.gotoAndPlay('open'); } frame 414 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.game.game.clownhead.alive) { i = 1; } else { i = 0; } if (_root.a_Enemies.length <= i) { _parent.play(); } } } frame 419 { _parent.door3.spawns = 0; _parent.door3.gotoAndPlay('open'); } frame 433 { _root.game.game.event2.warpto = 'level1_29'; _root.game.game.event2.warpspawn = 1; _root.arrow.gotoAndPlay('go'); stop(); } } movieClip 2270 { instance e3 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; gotoAndStop('activate'); } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; gotoAndStop('activate'); } } } movieClip 2271 { instance game of movieClip 2270 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 41 { gotoAndStop(1); } frame 43 { _root.f_LevelDefaults(); _root.f_Level1_29Init(); stop(); } movieClip 2276 { } movieClip 2277 { } movieClip 2280 { } movieClip 2281 { } movieClip 2284 { } movieClip 2285 { } movieClip 2288 { } movieClip 2289 { } movieClip 2292 { } movieClip 2293 { } movieClip 2296 { } movieClip 2297 { } movieClip 2298 { frame 1 { stop(); } frame 111 { stop(); } } movieClip 2299 { frame 1 { stop(); } frame 2 { play(); } frame 4 { _root.s_elevatordoor.start(0, 0); } frame 15 { _parent.walloverlay.gotoAndStop('on'); if (spawns) { if (_x < _root.p1.x) { var u_temp = _root.f_NewEnemy(_x - 50, _y); if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } else { var u_temp = _root.f_NewEnemy(_x + 50, _y); if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } u_temp.autowalk_timer = 20; u_temp.invincible_timer = 10; } else { stop(); } } frame 51 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 55 { _root.s_steam.start(0, 0); } frame 63 { _parent.walloverlay.gotoAndStop('off'); stop(); } frame 64 { play(); } frame 104 { gotoAndPlay('close'); } frame 115 { stop(); } frame 128 { stop(); } } movieClip 2302 { } movieClip 2303 { frame 1 { gotoAndStop(2); stop(); } frame 3 { play(); } frame 5 { _root.s_elevatordoor.start(0, 0); } frame 16 { if (spawns) { var u_temp = _root.f_NewEnemy(_x, _y); if (u_temp.x > _root.p1.x) { if (u_temp._xscale > 0) { u_temp._xscale *= -1; } } else { if (u_temp._xscale < 0) { u_temp._xscale *= -1; } } } else { stop(); } } frame 26 { --spawns; if (spawns > 0) { gotoAndPlay('loop'); } } frame 28 { _root.s_steam.start(0, 0); } frame 38 { stop(); } frame 39 { play(); } frame 41 { _root.s_elevatordoor.start(0, 0); } frame 49 { _root.game.game.event2.other = _root.game.game.door3; _root.game.game.event2.otherplay = 'hankin'; stop(); } frame 50 { _root.f_AddNeutral(this); _root.f_Depth(this, _parent.ground._y + 10); _root.f_AddNeutral(_parent.sign); _root.f_Depth(_parent.sign, _parent.ground._y + 15); _root.f_AddNeutral(_parent.closet); _root.f_Depth(_parent.closet, _parent.ground._y + 16); _root.p1.y = _y - 5; _root.p1._y = _root.p1.y; _root.p1.x = _x; _root.p1._x = _root.p1.x; _root.p1.wait = true; _root.p1.gotoAndStop('wait'); play(); } frame 69 { _root.s_steam.start(0, 0); } frame 78 { _root.fader.spawnpoint = 1; _root.fader.warpto = 'level1_28'; _root.fader.gotoAndPlay('fadeout'); stop(); } } movieClip 2306 { frame 1 { _root.f_AddNeutral(this); stop(); } } movieClip 2393 { frame 1 { gotoAndPlay(2); } instance of movieClip 17 empty { onClipEvent (load) { var vol = 100; } onClipEvent (enterFrame) { vol -= 2; _root.s_song3.s_song3.setVolume(vol); } } frame 50 { _root.s_song3.s_song3.stop(); _root.s_song2.s_song2.setVolume(100); _root.s_song2.s_song2.start(0, 999); } frame 70 { x = _x; y = _y; _root.camera.prey = this; } frame 97 { _parent.bg.gotoAndPlay('intro'); } frame 139 { _root.f_InitClownDemon4(); } frame 204 { _parent.chase_cam.gotoAndStop('on'); } frame 205 { _root.camera.prey = _parent.chase_cam; } frame 267 { stop(); } } movieClip 2395 { } movieClip 2396 { frame 1 { gotoAndStop(2); } } movieClip 2399 { } movieClip 2402 { frame 1 { gotoAndStop(2); } } movieClip 2403 { frame 9 { if (!busy) { gotoAndPlay('idle'); } } } movieClip 2404 { frame 1 { stop(); } } movieClip 2406 { } movieClip 2409 { } movieClip 2410 { frame 1 { gotoAndStop(2); } frame 3 { _parent.idling = true; stop(); } frame 10 { idling = false; _parent.hitall = true; _root.clown_lag = 1; iterations = 1; _root.game.game.clownhead.spasm = true; _root.game.game.hand1.spasm = true; _root.game.game.hand2.spasm = true; } frame 90 { _root.game.game.hand2.body.body.gotoAndPlay('fist'); } instance of movieClip 17 empty { onClipEvent (enterFrame) { speed = 15; if (_parent._xscale < 0) { speed *= -1; } _root.f_MoveH(_parent._parent, speed); } } frame 105 { if (_xscale > 0) { _parent.force_x = 15; } else { _parent.force_x = -15; } _parent.force_y = -10; } frame 106 { _root.s_bang.start(0, 0); _root.shake_y = 12; var u_temp = _root.f_FX(_root.game.game.hand2.x, _root.game.game.ground._y, _root.game.game.ground._y + 2, 'impact2', 100, 100); u_temp.body._rotation = -90; } instance of movieClip 17 empty { onClipEvent (enterFrame) { speed = 15; if (_parent._xscale < 0) { speed *= -1; } _root.f_MoveH(_parent._parent, speed); } } frame 123 { if (_xscale > 0) { _parent.force_x = 15; } else { _parent.force_x = -15; } _parent.force_y = -10; } frame 124 { _root.s_bang.start(0, 0); _root.shake_y = 12; var u_temp = _root.f_FX(_root.game.game.hand2.x, _root.game.game.ground._y, _root.game.game.ground._y + 2, 'impact2', 100, 100); u_temp.body._rotation = -90; } instance of movieClip 17 empty { onClipEvent (enterFrame) { speed = 15; if (_parent._xscale < 0) { speed *= -1; } _root.f_MoveH(_parent._parent, speed); } } frame 136 { if (_xscale > 0) { _parent.force_x = 15; } else { _parent.force_x = -15; } _parent.force_y = -10; } frame 137 { _root.s_bang.start(0, 0); _root.shake_y = 12; var u_temp = _root.f_FX(_root.game.game.hand2.x, _root.game.game.ground._y, _root.game.game.ground._y + 2, 'impact2', 100, 100); u_temp.body._rotation = -90; } frame 166 { _root.clown_lag = 6; } frame 196 { p1 = _root.p1; if (p1.x > _parent.x and _xscale < 0) { _xscale = _xscale * -1; } else { if (p1.x < _parent.x and _xscale > 0) { _xscale = _xscale * -1; } } if (_root.clown_health <= _root.clown_cp5) { gotoAndPlay('toss'); } else { if (Math.abs(p1.x - _root.game.game.clownhead.x) < 75 and p1.y < _root.game.game.clownhead.y + 50) { gotoAndPlay('fire_up'); } else { if (Math.abs(p1.x - _parent._x) < 150) { gotoAndPlay('slam'); } else { ++iterations; if (iterations > 3) { iterations = 1; gotoAndPlay('fire2'); } else { gotoAndPlay('punch1'); } } } } } frame 218 { _root.game.game.hand2.body.body.gotoAndPlay('fist'); _root.clown_lag = 3; idling = false; } frame 239 { _root.s_clownswipe.start(0, 0); _root.clown_lag = 1; } instance of movieClip 17 empty { onClipEvent (load) { speed = 40; if (_parent._xscale < 0) { mod = -1; } else { mod = 1; } } onClipEvent (enterFrame) { _root.f_MoveH(_parent._parent, speed * mod); --speed; if (speed < 1) { speed = 1; } } } frame 241 { if (_xscale > 0) { _parent.force_x = -6; } else { _parent.force_x = 6; } _parent.force_y = -20; _parent.u_hit = false; } frame 242 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 245 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 248 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 251 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 254 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 257 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 260 { if (!_parent.u_hit) { _root.f_ImpactPoint(box); } } frame 292 { if (!u_hit) { gotoAndPlay('decision'); } } frame 309 { _parent.u_hit = false; gotoAndPlay('decision'); } frame 316 { _root.clown_lag = 3; } frame 327 { _root.game.game.clownhead.head.head.gotoAndStop('side'); } frame 347 { _root.game.game.clownhead.head.head.gotoAndStop('quarter'); } frame 362 { _root.clown_lag = 6; _parent.phase = 3; stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_parent._parent.x > _root.game.game.clown_right._x - 50) { _root.f_MoveH(_parent._parent, -4); } else { if (_parent._parent.x < _root.game.game.clown_left._x + 50) { _root.f_MoveH(_parent._parent, 4); } } } } frame 389 { _root.game.game.clownhead.head.head.gotoAndStop('side'); } frame 390 { _root.game.game.clownhead.head.head.jaw.gotoAndPlay('open'); } frame 399 { _root.clown_lag = 3; } frame 404 { _root.clown_lag = 1; } frame 407 { u_temp = _root.f_FX(_root.game.game.clownhead.x, _root.game.game.clownhead.y, _root.clownhead.y - 1, 'clownbarf', 100, 100); u_temp.x = u_temp._x; u_temp.y = u_temp._y; u_temp.h = 30; u_temp.w = 30; u_temp.w2 = 2; u_temp.damage_val = 10; u_temp.owner = _root.game.game.clownhead; u_temp.gun_type = 5; u_temp.bullet = true; u_temp.hitall = true; u_temp.explosion_type = 'explosion_grenade'; u_temp.explosion2_type = 'explosion_grenade'; u_temp.speed_y = -20; u_temp.speed_x = (_root.p1.x - _parent.x) / 30; if (_xscale < 0) { u_temp._xscale *= -1; } u_temp.force_x = u_temp.speed_x / 2; u_temp.force_y = -20; } instance of movieClip 2404 { onClipEvent (load) { var u_temp = _parent.u_temp; var prev_x = 0; var prev_y = 0; if (u_temp) { if (u_temp.x == prev_x and u_temp.y == prev_y) { u_temp = undefined; gotoAndStop('off'); } else { if (_parent._xscale < 0) { _x = -(u_temp.x - _parent._x - _parent._parent._x); } else { _x = u_temp.x - _parent._x - _parent._parent._x; } _y = u_temp.y - _parent._y - _parent._parent._y; } } } onClipEvent (enterFrame) { if (u_temp) { if (u_temp.x == prev_x and u_temp.y == prev_y) { u_temp = undefined; gotoAndStop('off'); } else { if (_parent._xscale < 0) { _x = -(u_temp.x - _parent._x - _parent._parent._x); } else { _x = u_temp.x - _parent._x - _parent._parent._x; } _y = u_temp.y - _parent._y - _parent._parent._y; var prev_x = u_temp.x; var prev_y = u_temp.y; } } } } frame 417 { _root.game.game.clownhead.head.head.jaw.gotoAndPlay('close'); _root.clown_lag = 6; } frame 428 { _root.game.game.clownhead.head.head.gotoAndStop('quarter'); } frame 489 { gotoAndPlay('decision'); } frame 508 { _root.game.game.clownhead.head.head.gotoAndStop('side'); } frame 510 { _root.game.game.clownhead.head.head.jaw.gotoAndPlay('open'); } frame 518 { _root.s_clownroar.start(0, 0); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ClownSideFire1(_parent); } } frame 566 { _root.game.game.clownhead.head.head.jaw.gotoAndPlay('close'); } frame 577 { _root.game.game.clownhead.head.head.gotoAndStop('quarter'); } frame 585 { gotoAndPlay('decision'); } frame 605 { _root.p1.wait = true; } frame 609 { stop(); } instance of movieClip 17 empty { onClipEvent (load) { speed = 10; p1 = _root.p1; } onClipEvent (enterFrame) { speed += 2; if (speed > 30) { speed = 30; } if (p1.x > _parent._parent._x + 50) { _root.f_MoveH(_parent._parent, speed); if (_parent._xscale < 0) { _parent._xscale *= -1; } } else { if (p1.x < _parent._parent._x - 50) { _root.f_MoveH(_parent._parent, -speed); if (_parent._xscale > 0) { _parent._xscale *= -1; } } else { if (p1.y > _root.game.game.clownhead.y) { _parent.gotoAndPlay('throw'); } } } } } frame 615 { _root.f_KillEnemies(); _root.game.game.hand1.gotoAndStop('blank'); _root.game.game.hand2.gotoAndStop('blank'); _root.game.game.clownhead.spasm = 0; _root.nostopping = true; _root.p1.wait = true; _root.p1.invincible_timer = 200; _root.p1.gotoAndStop('hide'); _root.f_AddNeutral(_parent); _root.f_Depth(_parent, _parent._y + 10); _root.gunshooting = false; _root.s_chainsaw.s_chainsaw1.stop(); _root.s_chainsaw.s_chainsaw3.stop(); if (_xscale < 0) { _xscale = _xscale * -1; } } instance of movieClip 2406 { onClipEvent (load) { x = _x; y = _y; } onClipEvent (enterFrame) { _x = x - 3 + random(6); _y = y - 3 + random(6); } } frame 652 { _root.p1.x = hank._x + _x + _parent._x; _root.p1.y = hank._y + _y + _parent._y; _root.p1._x = _root.p1.x; _root.p1._y = _root.p1.y; _root.f_TossInit(_root.p1, 40, -20); stop(); } instance hank of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.p1.x > _root.game.game.clown_right._x - 60) { _root.hole_y = _root.p1.y; if (_root.game.game.hankhole._y > _root.p1.y - 35) { _root.game.game.hankhole._y = _root.p1.y - 35; } _root.game.game.hankhole.gotoAndStop('on'); _root.p1.gotoAndStop('hide'); _root.s_explosion3.start(0, 0); _root.shake_y = 12; _root.fader.spawnpoint = 1; _root.fader.warpto = 'level1_30'; _root.fader.gotoAndPlay('fadeout'); _parent.play(); } } } frame 720 { gotoAndPlay('decision'); } } movieClip 2411 { frame 1 { gotoAndStop(2); } frame 3 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_SmallClownBody(_parent); } } } movieClip 2412 { frame 1 { gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownSmallMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } frame 50 { gotoAndStop('idle'); } } movieClip 2413 { frame 1 { busy = false; stop(); } frame 8 { if (!busy) { gotoAndPlay('fire'); } else { gotoAndStop(1); } } frame 15 { stop(); } frame 23 { stop(); } } movieClip 2416 { frame 1 { h2.gotoAndPlay(15); stop(); } } movieClip 2417 { frame 1 { stop(); } frame 10 { stop(); } frame 19 { stop(); } } movieClip 2418 { frame 1 { horn.gotoAndStop(1); stop(); } frame 2 { horn.gotoAndStop(2); } frame 3 { horn.gotoAndStop(3); } } movieClip 2419 { } movieClip 2420 { frame 1 { gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownSmallMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } frame 50 { gotoAndStop('idle'); } } movieClip 2421 { frame 1 { gotoAndStop(2); } frame 2 { stop(); } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_ClownSmallMove(_parent); } } frame 4 { play(); } frame 6 { gotoAndStop('idle'); } frame 50 { gotoAndStop('idle'); } } movieClip 2422 { frame 1 { _parent.clownbody.body._xscale *= -1; stop(); } frame 40 { _parent.clownbody.body.gotoAndPlay('punch1'); _root.clown_lag = 1; } frame 41 { } frame 51 { } frame 53 { _root.clown_lag = 6; _parent.clownbody.body.gotoAndPlay('idle'); _parent.hand2.body.body.gotoAndStop('idle'); } frame 79 { _parent.clownbody.body.head.busy = true; _parent.clownbody.body.head.gotoAndStop('charge2'); } frame 80 { _parent.clownbody.body.head.busy = false; } frame 99 { _parent.clownbody.body.head.gotoAndPlay('idle'); } frame 124 { _parent.clownbody.body._xscale *= -1; } frame 140 { _parent.clownbody.body.head.busy = true; _parent.clownbody.body.head.gotoAndStop('charge'); } frame 141 { _parent.clownbody.body.head.busy = false; } frame 159 { _parent.clownbody.body.head.gotoAndPlay('idle'); } frame 190 { _parent.clownbody.body.head.busy = true; _parent.clownbody.body.head.gotoAndStop('charge2'); } frame 191 { _parent.clownbody.body.head.busy = false; } frame 212 { _parent.clownbody.body.head.gotoAndPlay('idle'); } } movieClip 2423 { frame 59 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.p1.ammo <= 0) { if (_root.a_Enemies.length <= 1) { if (_root.game.game.clownbody.x < _root.game.game.door1._x + 400) { door = 2; } else { door = 1; } _parent._parent['door' + door].spawns = 1; _parent._parent['door' + door].gotoAndPlay('open'); _parent.play(); } } } } frame 95 { gotoAndStop('loop'); } } movieClip 2425 { frame 1 { gotoAndStop(2); } instance of movieClip 17 empty { onClipEvent (enterFrame) { _root.f_ScaleFollow(_root.p1, _root.game.game.clownbody, 80, 60); _root.f_CameraFollow(_root.p1, _root.game.game.clownbody, _parent); } } } movieClip 2426 { instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = 1; phase = 3; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; delay = true; } } } movieClip 2427 { instance game of movieClip 2426 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 44 { gotoAndStop(1); } frame 46 { _root.f_LevelDefaults(); _root.f_Level1_30Init(); stop(); } movieClip 2428 { frame 1 { stop(); } frame 2 { play(); } frame 50 { stop(); } } movieClip 2430 { } movieClip 2433 { } movieClip 2437 { } movieClip 2439 { } movieClip 2441 { } button 2444 { on (release) { _root.gotoAndStop('clearout'); } } button 2446 { on (release) { getURL('http://www.newgrounds.com/portal/view/376632', '_blank'); } } movieClip 2447 { frame 1 { x = _x; y = _y; stop(); } instance of movieClip 17 empty { onClipEvent (load) { vol = 100; } onClipEvent (enterFrame) { vol -= 2; if (vol < 0) { vol = 0; } _root.s_sadsong.s_sadsong.setVolume(vol); } } frame 20 { _root.s_song2.s_song2.setVolume(100); _root.s_song2.s_song2.start(0, 999); } frame 45 { _root.clouds.gotoAndPlay(2); } frame 48 { _root.s_swing6.start(0, 0); } frame 55 { _root.medal_popup.unlockMedal('A WINNER IS YOU'); } frame 115 { _root.s_sadsong.s_sadsong.stop(); } frame 936 { stop(); } } movieClip 2472 { frame 1 { stop(); } frame 2 { play(); } frame 60 { if (!off) { gotoAndPlay('loop'); } else { gotoAndStop(1); } } } movieClip 2474 { } movieClip 2476 { } movieClip 2478 { } movieClip 2488 { frame 1 { stop(); } } movieClip 2489 { } movieClip 2490 { } movieClip 2492 { } movieClip 2493 { } movieClip 2495 { } movieClip 2496 { instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_MoveH(_parent._parent, 1); if (_parent._parent.x + _root.game_x > _root.screenWidth + 150) { _root.f_SadClownFinish(true); } } } instance of movieClip 225 { onClipEvent (enterFrame) { _root.f_MoveH(_parent._parent, 1); if (_parent._parent.x + _root.game_x > _root.screenWidth + 150) { _root.f_SadClownFinish(true); } } } } movieClip 2497 { frame 1 { if (_parent._parent.unmasked) { gotoAndStop(2); } else { stop(); } } } movieClip 2503 { } movieClip 2522 { } movieClip 2529 { } movieClip 2530 { frame 127 { _root.f_SadClownFinish(); stop(); } } movieClip 2531 { frame 3 { _root.u_point.x = 0; _root.u_point.y = 0; shell.localToGlobal(_root.u_point); var x = _root.u_point.x * _root.u_scale - _root.game_x; var y = _root.u_point.y * _root.u_scale - _root.game_y; var u_temp = _root.f_ShrapnelGeneral(x, y, _parent.y + 5, -(1 + random(4)), -(20 + random(6)), 'sadmask'); u_temp.bounce_limit = 3; u_temp.fp_ShrapnelEnd = _root.f_ShrapnelVanish; var i = random(5) + 1; if (i == 5) { i = 5 + random(4); } clownface.gotoAndStop(i); stop(); } } movieClip 2532 { frame 1 { gotoAndStop(2); } frame 3 { play(); } frame 32 { _root.f_InitSadClown(this); } frame 122 { if (alive and !unmasked) { if (_x > _root.p1.x) { gotoAndPlay('crawl'); } } } frame 162 { trace('ALIVE? ' + alive); trace('UNMASKED? ' + unmasked); if (alive and !unmasked) { gotoAndPlay('crawl'); } } frame 173 { _root.s_sadsong.s_sadsong.stop(); } } movieClip 2534 { } movieClip 2535 { frame 107 { shots = 3; } frame 119 { u_temp = _root.f_FX(barf._x + _x + _parent._x, barf._y + _y + _parent._y, _parent._parent.ground._y, 'clownbarf', 100, 100); u_temp.x = u_temp._x; u_temp.y = u_temp._y; u_temp.h = 30; u_temp.w = 30; u_temp.w2 = 2; u_temp.damage_val = 10; u_temp.owner = _root.game.game.clownhead; u_temp.gun_type = 5; u_temp.bullet = true; u_temp.hitall = true; u_temp.explosion_type = 'explosion_grenade'; u_temp.explosion2_type = 'explosion_grenade'; u_temp.speed_y = -12; u_temp.speed_x = (_root.p1.x - _parent.x) / 15; u_temp.force_x = 10; u_temp.force_y = -20; } frame 128 { --shots; if (shots > 0) { gotoAndPlay('loop1'); } } frame 212 { shots = 1; } frame 224 { u_temp = _root.f_FX(barf._x + _x + _parent._x, barf._y + _y + _parent._y, _parent._parent.ground._y, 'clownbarf', 100, 100); u_temp.x = u_temp._x; u_temp.y = u_temp._y; u_temp.h = 30; u_temp.w = 30; u_temp.w2 = 2; u_temp.damage_val = 10; u_temp.owner = _root.game.game.clownhead; u_temp.gun_type = 5; u_temp.bullet = true; u_temp.hitall = true; u_temp.explosion_type = 'explosion_grenade'; u_temp.explosion2_type = 'explosion_grenade'; u_temp.speed_y = -20; u_temp.speed_x = (_root.p1.x - _parent.x) / 30; u_temp.force_x = u_temp.speed_x / 2; u_temp.force_y = -20; } frame 233 { --shots; if (shots > 0) { gotoAndPlay('loop2'); } } frame 299 { gotoAndPlay('fire2'); } frame 308 { if (!init) { init = true; x = _x; y = _y; mod = 7; timer = mod; mod2 = 2; x2 = _parent._x; y2 = _parent._y - 150; } shake = int(mod2); _x = x + random(shake) - shake / 2; _y = y + random(shake) - shake / 2; if (timer % int(mod) == 0) { u_size = 80 + random(30); _root.f_FX(x2 + random(150) - 75, y2 + random(200) - 100, _root.game.game.ground._y, 'explosion_cool', u_size, u_size); _root.s_explosion2.start(0, 0); } ++timer; mod -= 0.1; if (mod < 3) { mod = 3; } mod2 += 0.2; if (mod2 > 30) { mod2 = 30; } } frame 309 { _x = x + random(shake) - shake / 2; _y = y + random(shake) - shake / 2; } frame 310 { gotoAndPlay('die'); } } movieClip 2536 { frame 1 { if (!init) { init = true; x = _x; y = _y; mod = 7; timer = mod; mod2 = 2; x2 = _parent._x; y2 = _parent._y - 150; } shake = int(mod2); _x = x + random(shake) - shake / 2; _y = y + random(shake) - shake / 2; if (timer % int(mod) == 0) { u_size = 80 + random(30); _root.f_FX(x2 + random(150) - 75, y2 + random(200) - 100, _root.game.game.ground._y, 'explosion_cool', u_size, u_size); _root.s_explosion2.start(0, 0); } ++timer; mod -= 0.1; if (mod < 3) { mod = 3; } mod2 += 0.2; if (mod2 > 30) { mod2 = 30; } } frame 2 { _x = x + random(shake) - shake / 2; _y = y + random(shake) - shake / 2; } frame 3 { gotoAndPlay('die'); } } movieClip 2545 { } movieClip 2546 { frame 11 { _parent._parent.sadclown.gotoAndPlay('go'); } frame 22 { stop(); } } movieClip 2547 { frame 1 { gotoAndStop(2); x = _x; y = _y; stop(); } frame 19 { _root.f_InitFinalClown(this); } frame 20 { stop(); } frame 21 { play(); } frame 23 { gotoAndStop('idle'); } frame 24 { head.gotoAndPlay('die'); _root.s_clowndie.start(0, 0); _root.f_KillEnemies(); stop(); } instance of movieClip 17 empty { onClipEvent (load) { var vol = 100; } onClipEvent (enterFrame) { --vol; if (vol < 0) { vol = 0; } _root.s_song2.s_song2.setVolume(vol); if (vol <= 0) { _parent.gotoAndPlay('splash'); } } } frame 25 { _root.s_song2.s_song2.stop(); _root.bosshealth.gotoAndStop(1); _root.s_splash.start(0, 0); play(); } frame 51 { _root.s_sadsong.s_sadsong.start(0, 999); } frame 125 { stop(); } } movieClip 2548 { frame 27 { _root.f_RemoveWall(_parent.rightwall.z_wall); } frame 28 { _parent.hankhole.gotoAndStop('on'); _root.p1.x = _parent.hankhole._x; _root.p1._x = _root.p1.x; _root.p1.y = _parent.hankhole._y; _root.p1._y = _root.p1.y; _root.p1._xscale *= -1; _root.f_TossInit(_root.p1, 20, -10); _root.shake_y = 12; _root.s_explosion3.start(0, 0); } frame 29 { } frame 38 { _root.f_AddWall(_parent.rightwall, _parent.rightwall.z_wall); } frame 87 { _parent.clownhead.gotoAndPlay('intro'); } frame 162 { stop(); } instance of movieClip 17 empty { onClipEvent (enterFrame) { if (_root.clown_health > 0) { if (_root.a_Enemies.length <= 2) { var u_temp = random(3) + 1; if (u_temp == 3) { u_temp = 5; } _root.f_NewEnemy(_root.game.game.enemy_spawn._x, _root.game.game.enemy_spawn._y, u_temp); _parent.play(); } } } } frame 210 { gotoAndPlay('attack'); } frame 222 { _root.camera.prey = _parent.jebus; } frame 257 { _parent.jebus.gotoAndPlay('go'); stop(); } } movieClip 2549 { instance jebus of movieClip 2447 { onClipEvent (load) { face_type = 1; head_type = 1; body_type = 2; } } instance e1 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 5; head_type = 1; body_type = 5; shot_timer = 60; goframe = 'excited'; gotoAndStop('activate'); } } instance e3 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 5; head_type = 1; body_type = 5; shot_timer = 60; goframe = 'excited'; gotoAndStop('activate'); _xscale = _xscale * -1; } } instance e2 of movieClip 1481 { onClipEvent (load) { gun_type = undefined; phase = 1; face_type = 2; head_type = 1; body_type = 2; shot_timer = 60; goframe = 'reachdown'; gotoAndStop('activate'); _xscale = _xscale * -1; } } } movieClip 2550 { instance game of movieClip 2549 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 47 { gotoAndStop(1); } frame 58 { stop(); } frame 59 { gotoAndStop(1); } movieClip 2552 { instance cliff of movieClip 144 l3 { onClipEvent (load) { z_platform.texture = 1; } } } movieClip 2553 { instance game of movieClip 2552 { onClipEvent (enterFrame) { if (_root.go == true) { _root.main(); } } } } frame 61 { s_chainsaw.s_chainsaw1.stop(); s_chainsaw.s_chainsaw3.stop(); gameover = false; --lives; play(); } frame 70 { if (lives == 2) { livesleft.hanks.hank1.gotoAndPlay('go'); } else { if (lives == 1) { livesleft.hanks.hank1.gotoAndStop('off'); livesleft.hanks.hank2.gotoAndPlay('go'); } else { if (lives <= 0) { livesleft.hanks.hank1.gotoAndStop('off'); livesleft.hanks.hank2.gotoAndStop('off'); livesleft.hanks.hank3.gotoAndPlay('go'); } } } stop(); } movieClip 2556 { } movieClip 2559 { } movieClip 2562 { } movieClip 2565 { } movieClip 2566 { frame 1 { stop(); } frame 2 { play(); } frame 105 { if (_root.lives <= 0) { _parent._parent.gotoAndPlay('gameover'); } else { _parent._parent.gotoAndPlay('finish'); } stop(); } } movieClip 2567 { } movieClip 2572 { frame 15 { stop(); } frame 16 { play(); } frame 30 { _root.play(); } frame 104 { stopAllSounds(); } frame 265 { _root.gotoAndStop('clearout'); } } frame 80 { stats.gun_type = undefined; stats.ammo = 0; if (currentlevel == 'level1_19') { s_boombox.s_boombox.stop(); s_calliope.s_calliope.stop(); s_song1.s_song1.stop(); } else { if (currentlevel == 'level1_21') { if (stair_boss) { stair_boss = false; s_song3.s_song3.stop(); s_song1.s_song1.start(0, 999); } } else { if (currentlevel == 'level1_29') { s_song2.s_song2.stop(); } } } gotoAndPlay(currentlevel); } movieClip 2574 { } movieClip 2575 { frame 90 { _root.gotoAndStop('title'); } } frame 91 { stopAllSounds(); gotoAndStop('title'); }




http://swfchan.com/18/89365/info.shtml
Created: 10/8 -2019 22:35:20 Last modified: 10/8 -2019 22:35:20 Server time: 28/04 -2024 16:30:47