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

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

Urban Wizard 4.swf

This is the info page for
Flash #214413

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


ActionScript [AS1/AS2]
Combined Code
movieClip 37 { } movieClip 38 { } movieClip 40 { } movieClip 42 { frame 1 { stop(); } } movieClip 45 { } movieClip 46 { } movieClip 49 { } movieClip 52 { frame 1 { stop(); } } movieClip 53 Preloader { frame 1 { function enterFrameHandler() { var v2 = 0; v2 = _root.getBytesLoaded() / _root.getBytesTotal(); if (loadingBar) { loadingBar.gotoAndStop(int(v2 * (loadingBar._totalframes - 1)) + 1); } if (v2 >= 1 && haltComplete != true) { onEnterFrame = null; gotoAndStop('loaded'); } } stop(); var autoPlay; var className; var haltComplete; onEnterFrame = enterFrameHandler; } frame 10 { function _onPlayClick() { _root.nextFrame(); _root.play(); _parent._onLoaded(); } if (playButton) { playButton.onRelease = _onPlayClick; playButton.stop(); } if (autoPlay) { _onPlayClick(null); } } } movieClip 55 Newgrounds API Classes { #initclip Object.registerClass('Newgrounds API Classes', com.newgrounds.shims.APIShim); #endinitclip } movieClip 95 { } movieClip 98 { } movieClip 103 { } movieClip 107 { } movieClip 108 { } movieClip 109 { } movieClip 110 FlashAd { #initclip Object.registerClass('FlashAd', com.newgrounds.components.FlashAdBase); #endinitclip frame 1 { function initPlayButton() { if (this.playButton) { this.playButton.onRelease = onPlayClick; if (!this.showPlayButton) { this.playButton._visible = false; } } } function onPlayClick() { removeAd(); _visible = false; } stop(); } frame 2 { initPlayButton(); } frame 10 { initPlayButton(); } frame 20 { initPlayButton(); } } movieClip 111 APIConnector { frame 1 { function _onLoaded() { gotoAndStop('invisible'); if (_redirect) { com.newgrounds.API.loadOfficialVersion(); return undefined; } } function _apiConnect() { var v2 = com.newgrounds.API; if (v2 && !v2.connected) { if (!apiId) { com.newgrounds.Logger.logError('No API ID entered in the API Connector component.', 'You can create an API ID for this submission at http://newgrounds.com/account/flashapi', 'Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector).'); return undefined; } switch (debugMode) { case 'Off': default: v2.debugMode = v2.RELEASE_MODE; goto 1319; case 'Simulate Logged-in User': //Invalid switch } v2.debugMode = v2.DEBUG_MODE_LOGGED_IN; goto 1319; case 'Off': v2.debugMode = v2.DEBUG_MODE_LOGGED_OUT; goto 1319; case 'Simulate Logged-in User': v2.debugMode = v2.DEBUG_MODE_NEW_VERSION; goto 1319; case 'Simulate Logged-out User': v2.debugMode = v2.DEBUG_MODE_HOST_BLOCKED; label 1319: if (loader) { loader.haltComplete = true; } v2.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, _onConnected); v2.connect(_root, apiId, encryptionKey, movieVersion); } } function _onConnected(event) { if (loader) { loader.haltComplete = false; } if (redirectOnNewVersion && event.__get__success() && (event.__get__data()).newVersion) { _redirect = true; } if (redirectOnHostBlocked && !event.__get__success() && event.__get__error() == com.newgrounds.APIEvent.ERROR_HOST_BLOCKED) { _redirect = true; } if (_redirect) { gotoAndStop('adPreloader'); forceAlwaysOnTop(); } } function forceAlwaysOnTop() { var v2 = getNextHighestDepth(); swapDepths(v2); if (Stage) { _x = (Stage.width - _width) / 2; _y = (Stage.height - _height) / 2; _visible = true; } if (_root && _root instanceof MovieClip) { (MovieClip(_root)).stop(); } } stop(); if (_root && _root instanceof MovieClip) { (MovieClip(_root)).stop(); } var apiId; var encryptionKey; var movieVersion; var debugMode; var connectorType; var redirectOnHostBlocked; var redirectOnNewVersion; var adType; var className; var _redirect; _x = int(_x); _y = int(_y); if (!debugMode) { debugMode = 'Simulate Logged-in User'; } if (!connectorType) { connectorType = 'Flash Ad + Preloader'; } if (!adType) { adType = 'Video'; } if (ad) { ad.adType = adType; } switch (connectorType) { case 'Flash Ad + Preloader': gotoAndStop('adPreloader'); break; case 'Flash Ad Only': gotoAndStop('ad'); break; case 'Invisible': gotoAndStop('invisible'); } _apiConnect(); } instance ad of movieClip 110 FlashAd { onClipEvent (construct) { apiId = ''; showBorder = true; adType = 'Video'; } } instance loader of movieClip 53 Preloader { onClipEvent (construct) { autoPlay = false; mainClass = ''; } } } movieClip 114 { } movieClip 115 blood { frame 1 { stop(); } frame 33 { stop(); } } frame 1 { function quit() { quitlevel(); } function goback() { if (_currentframe == 10) { redirect = 'menu'; tran.gotoAndPlay(2); } } function gotolevel() { redirect = 'gameplay'; tran.gotoAndPlay(2); } function quitlevel() { if (_root.menumusicplay != true) { stopAllSounds(); _root.menumusic(); } redirect = 'stageselect'; tran.gotoAndPlay(2); } function nextlevel() { wave += 1; paused_game = false; redirect = 'stageselect'; tran.gotoAndPlay(2); savea(); } function retry() { redirect = 'resetgameplay'; tran.gotoAndPlay(2); savea(); } function returntomenu() { if (_root.menumusicplay != true) { stopAllSounds(); _root.menumusic(); } redirect = 'menu'; tran.gotoAndPlay(2); } function loada() { savefile = SharedObject.getLocal('urbanwizard4_4'); if (savefile.data.lvl == undefined) { _root.lvl = 1; carryon = new Array(3, 0, 0); _root.rank = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); trace('lvl' + lvl); trace(rank); } else { _root.rank = savefile.data.rank; _root.lvl = savefile.data.lvl; carryon = savefile.data.carryon; if (testmode != true) { } if (testmode == true) { _root.lvl = 36; } trace('lvl' + lvl); trace('rank' + rank); } } function doneload() { redirect = 'menu'; tran.gotoAndPlay(2); if (_root.menumusicplay != true) { stopAllSounds(); _root.menumusic(); } loada(); } function savea() { savefile.data.rank = _root.rank; savefile.data.lvl = _root.lvl; savefile.data.carryon = carryon; trace('lvl' + savefile.data.lvl); trace('rank' + savefile.data.rank); trace('carryon' + savefile.data.carryon); savefile.flush(); } function pausetrig() { paused_game = true; } function unpausetrig() { paused_game = false; } function mutetrig() { overallsound.setVolume(0); trace('a'); } function unmutetrig() { trace('b'); overallsound.setVolume(100); } function menumusic() { menumusicplay = true; song1.start(0, 65355); } function help() { getURL('http://kiz10.com/urban-wizard-4/#down-scroll', '_blank'); trace('goto Sponsor Site'); } function sponsorlink2() { getURL('http://kiz10.com/games/shooting-games/', '_blank'); trace('goto Sponsor Site'); } function sponsorlink3() { getURL('http://kiz10.com/category/action/', '_blank'); trace('goto Sponsor Site'); } function sponsorlink() { getURL('http://kiz10.com', '_blank'); trace('goto Sponsor Site'); } function addlink() { getURL('http://kiz10.com/games-for-your-site', '_blank'); trace('goto Sponsor Site'); } function displayinfohealth() { infod._visible = true; infod._x = _xmouse + 0.5 * infod._width; infod._y = _ymouse; infod.gotoAndStop(2); infod.displayer = ' Revive Automatically'; } function displayinfoammo() { infod._visible = true; infod._x = _xmouse + 0.5 * infod._width; infod._y = _ymouse; infod.gotoAndStop(2); infod.displayer = ' Start off with full ammo'; } function displayinfogrenade() { infod._visible = true; infod._x = _xmouse + 0.5 * infod._width; infod._y = _ymouse; infod.gotoAndStop(2); infod.displayer = ' 3 Pack of Grenades'; } function hideinfo() { infod._visible = false; } stop(); Stage.showMenu = false; _root.lvl = 1; _root.rank = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); lvlid = 0; var carryon = new Array(3, 1, 0); wave = 1; overallsound = new Sound(_root); testmode = false; redirect = ''; var savefile = SharedObject.getLocal('urbanwizard4_4'); var flowspeed = 1; var paused_game = false; var yell1 = new Sound(); yell1.attachSound('kya1'); var yell2 = new Sound(); yell2.attachSound('kya2'); var yell3 = new Sound(); yell3.attachSound('kya3'); var yell0 = new Sound(); yell0.attachSound('kya2'); var yell4 = new Sound(); yell4.attachSound('kya4'); var song1 = new Sound(); song1.attachSound('song1'); onEnterFrame = function () { if (rank[wave - 1] > 0 && lvl == wave) { lvl = wave + 1; } if (_currentframe >= 10 && _currentframe < 30) { wm.gotoAndStop(wave); staricon.gotoAndStop(1 + rank[wave - 1]); cashindicator.cashdisplay.cash = _root.carryon[2]; store.healthdisplay.cash = 50 + Math.round(25 * _root.carryon[1]); store.nadedisplay.cash = 50 + Math.round(8.333333333333334 * _root.carryon[0]); store.ammodisplay.cash = 75; if (lvl <= 1) { cashindicator._visible = false; store._visible = false; } _root.cost1 = 50 + Math.round(25 * _root.carryon[1]); _root.cost2 = 50 + Math.round(8.333333333333334 * _root.carryon[0]); _root.cost3 = 75; } if (_currentframe >= 30) { _root.menumusicplay = false; } if (wave > lvl) { trace('save'); lvl = wave; savea(); } if (paused_game == true) { gpr.pausescreen.gotoAndPlay(2); } if (paused_game != true && gpr.pausescreen._currentframe > 1) { gpr.pausescreen.gotoAndStop(1); } }; } frame 1 { function changetrack() { var v5 = new Sound(); v5.attachSound('rockx'); var v4 = new Sound(); v4.attachSound('rockx'); var v3 = new Sound(); v3.attachSound('rockx'); var v2 = new Sound(); v2.attachSound('rockx'); var v1 = new Sound(); v1.attachSound('rockx'); stopAllSounds(); if (changeto <= 1) { v5.start(0, 9999); } if (changeto == 2) { v4.start(0, 9999); } if (changeto == 3) { v3.start(0, 9999); } if (changeto == 4) { v2.start(0, 9999); } if (changeto >= 5) { v1.start(0, 9999); } } function medalunlock() { trace('medal unlocked' + levelid); } function buyhealthpack() { if (carryon[2] >= cost1) { carryon[1] += 1; carryon[2] -= cost1; ching.start(0, 0); savea(); } } function buygrenade() { if (carryon[2] >= cost2) { carryon[0] += 3; carryon[2] -= cost2; ching.start(0, 0); savea(); } } function buyammo() { if (carryon[2] >= cost3 && carryon[3] != true) { carryon[3] = true; carryon[2] -= cost3; ching.start(0, 0); savea(); } } function carryonoverwrite() { carryon = carryonreplace; } var windata = new Array(0, 0, 0); trace(windata); if (room == undefined) { room = 1; } changeto = 0; if (carryon == undefined) { carryon = new Array(3, 1, 0); } if (wave == undefined) { wave = 1; } var ching = new Sound(); ching.attachSound('ching'); } movieClip 119 { } movieClip 120 { } movieClip 121 { } movieClip 123 { } movieClip 126 { frame 1 { rotgoal = _rotation + (Math.random() * 50 - Math.random() * 50); introt = _rotation; if (rotgoal > 0) { rotspeed = Math.abs(1 + random(4)); } if (rotgoal < 0) { rotspeed = -1 * (1 + random(4)); } onEnterFrame = function () { _rotation = _rotation + rotspeed / 4; if (rotspeed > 0) { if (_rotation > rotgoal && rotgoal > 0) { rotspeed = -1 * (1 + random(4)); rotgoal = introt - Math.abs(Math.random() * 50 - Math.random() * 50); } } if (rotspeed < 0) { if (_rotation < rotgoal && rotgoal < 0) { rotspeed = Math.abs(1 + random(4)); rotgoal = introt + Math.abs(Math.random() * 50 - Math.random() * 50); } } }; } } movieClip 127 { } movieClip 128 { } movieClip 138 { } movieClip 139 { } movieClip 141 { } movieClip 144 { frame 1 { onMouseDown = function () { if (_root.tran._currentframe <= 2) { _root.doneload(); } }; } } movieClip 145 { frame 1 { function timerHandler() { if (!loadingComplete) { var v2 = Math.round(_root.getBytesLoaded() / _root.getBytesTotal()); bar.gotoAndStop(Math.round(1 + v2 * 100)); if (v2 == 1) { loadingComplete = true; gotoAndStop(2); return undefined; } } } function startMovie() { _root.play(); } _root.stop(); stop(); var AUTO_PLAY = false; var loadingComplete = false; timerHandler(); onEnterFrame = function () { if (_currentframe == 1) { timerHandler(); } if (loaded == 1) { loadingComplete = true; trace(':::'); gotoAndStop(2); } }; } frame 2 { stop(); } } movieClip 153 { } movieClip 154 { } movieClip 157 { } // unknown tag 88 length 68 movieClip 161 { } button 163 { on (release) { _root.sponsorlink(); } } movieClip 168 { } movieClip 169 { } movieClip 173 { } movieClip 174 { } movieClip 176 { } movieClip 177 { } movieClip 179 { } movieClip 180 { } movieClip 182 { } movieClip 183 { } movieClip 185 { } movieClip 186 { } movieClip 188 { } movieClip 189 { } movieClip 191 { } movieClip 192 { } movieClip 194 { } movieClip 195 { } movieClip 197 { } movieClip 198 { } movieClip 200 { } movieClip 203 { } movieClip 204 { } movieClip 206 { } movieClip 207 { } movieClip 209 { } movieClip 210 { } movieClip 212 { } movieClip 213 { } movieClip 215 { } movieClip 216 { } movieClip 218 { } movieClip 219 { } movieClip 221 { } movieClip 224 { } movieClip 225 { } movieClip 227 { } movieClip 228 { } movieClip 230 { } movieClip 231 { } movieClip 233 { } movieClip 234 { } movieClip 236 { } movieClip 237 { } movieClip 239 { } movieClip 240 { } movieClip 242 { } movieClip 243 { } movieClip 245 { } movieClip 249 { } movieClip 250 { } movieClip 252 { } movieClip 253 { } movieClip 256 { } movieClip 257 { } movieClip 259 { } movieClip 260 { } movieClip 262 { } movieClip 265 { } movieClip 266 { } movieClip 268 { } movieClip 269 { } movieClip 271 { } movieClip 273 { } movieClip 277 { } movieClip 278 { } movieClip 280 { } movieClip 281 { } movieClip 283 { } movieClip 284 { } movieClip 286 { } movieClip 287 { } movieClip 289 { } movieClip 290 { } movieClip 292 { } movieClip 293 { } movieClip 295 { } movieClip 296 { } movieClip 298 { } movieClip 299 { } movieClip 302 { } movieClip 303 { } movieClip 306 { } movieClip 307 { } movieClip 309 { } movieClip 312 { } movieClip 313 { } movieClip 316 { } movieClip 317 { } movieClip 319 { } movieClip 320 { } movieClip 324 { } movieClip 326 { } movieClip 328 { } movieClip 330 { } movieClip 332 { } movieClip 334 { } movieClip 336 { } movieClip 338 { } movieClip 341 { } movieClip 342 { } movieClip 344 { } movieClip 345 { } movieClip 347 { } movieClip 348 { } movieClip 350 { } movieClip 351 { } movieClip 354 { } movieClip 355 { } movieClip 357 { } movieClip 358 { } movieClip 360 { } movieClip 361 { } movieClip 364 { } movieClip 365 { } movieClip 367 { } movieClip 368 { } movieClip 371 { } movieClip 372 { } movieClip 375 { } movieClip 376 { } movieClip 379 { } movieClip 380 { } movieClip 383 { } movieClip 384 { } movieClip 387 { } movieClip 388 { } movieClip 390 { } movieClip 391 { } movieClip 394 { } movieClip 395 { } movieClip 397 { } movieClip 398 { } movieClip 400 { } movieClip 401 { } movieClip 404 { } movieClip 405 { } movieClip 407 { } movieClip 408 { } movieClip 411 { } movieClip 412 { } movieClip 414 { } movieClip 416 { } movieClip 417 { } movieClip 419 { } movieClip 420 { } movieClip 422 { } movieClip 423 { } movieClip 424 { } movieClip 427 { } movieClip 428 { } movieClip 431 { } movieClip 432 { } movieClip 434 { } movieClip 435 { } movieClip 438 { } movieClip 439 { } movieClip 441 { } movieClip 442 { } movieClip 444 { } movieClip 445 { } movieClip 446 { } movieClip 451 { } movieClip 452 { } movieClip 454 { } movieClip 456 { } movieClip 457 { } movieClip 460 { } movieClip 462 { } movieClip 464 { } movieClip 466 { } movieClip 467 { } movieClip 468 { } movieClip 469 { } button 471 { on (release) { startgame(); } } movieClip 472 { frame 193 { function timerHandler() { if (!loadingComplete) { var v2 = Math.round(_root.getBytesLoaded() / _root.getBytesTotal()); bar.gotoAndStop(Math.round(1 + v2 * 100)); if (v2 == 1) { loadingComplete = true; gotoAndStop(194); return undefined; } } } function startMovie() { _root.play(); } _root.stop(); var AUTO_PLAY = false; var loadingComplete = false; timerHandler(); onEnterFrame = function () { trace('loading'); if (loaded == 1) { loadingComplete = true; gotoAndStop(194); } }; onEnterFrame = function () { if (_currentframe >= 193) { stop(); } }; } frame 193 { stop(); } frame 194 { function startgame() { if (_root.tran._currentframe <= 2) { _root.doneload(); } } stop(); } } // unknown tag 88 length 63 movieClip 478 { } movieClip 479 { } movieClip 484 { } movieClip 485 { } movieClip 486 { } movieClip 488 { } movieClip 489 { frame 1 { stop(); } frame 27 { stop(); loadtime = 5; onEnterFrame = function () { loadtime -= 1; if (_currentframe >= 25) { if (loadtime <= 0) { _root.gotoAndStop(_root.redirect); play(); } } }; } frame 28 { if (_root._currentframe == 5) { if (_root.menumusicplay != true) { stopAllSounds(); _root.menumusic(); } } } frame 59 { gotoAndStop(1); } } movieClip 64 __Packages.com.newgrounds.APIConnection { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.APIConnection) { var v1 = function () { this.reset(); }; com.newgrounds.APIConnection = v1; var v2 = v1.prototype; v2.__get__hostURL = function () { return this._hostURL; }; v2.__set__hostURL = function (value) { this._hostURL = value; this.hostDomain = null; if (this._hostURL) { var v2 = this._hostURL.split('/'); if (v2[0] != 'file:' && this._hostURL != 'localhost') { this.hostDomain = (v2.splice(0, 3)).join('/'); } } if (!this.hostDomain) { this.hostDomain = 'localhost'; } return this.__get__hostURL(); }; v2.__get__sandboxType = function () { return System.security.sandboxType; }; v2.__get__isNetworkHost = function () { switch (this.__get__sandboxType()) { return true; case 'localWithFile': case 'localWithNetwork': case 'localTrusted': case 'application': return false; case 'remote': } return true; }; v2.__get__hasUserSession = function () { return this.sessionId != null && this.sessionId != '' && this.publisherId != 0; }; v2.__get__connected = function () { return this.connectionState == com.newgrounds.APIConnection.CONNECTED; }; v2.reset = function () { this.connectionState = com.newgrounds.APIConnection.NOT_CONNECTED; this.encryptionKey = null; this.sessionId = null; this.userEmail = null; this.username = null; this.userId = 0; this.userpageFormat = 0; }; v2.assertInitialized = function () { if (!this.initialized) { com.newgrounds.Logger.logError('You must initialized the API using API.connect() before using this command.'); return false; } return true; }; v2.assertConnected = function () { if (!this.connectionState == com.newgrounds.APIConnection.CONNECTED) { com.newgrounds.Logger.logError('You must establish a connection using API.connect() before using this command.'); return false; } return true; }; v2.sendSimpleCommand = function (command, completeHandler, parameters, secureParameters) { if (parameters == undefined) { parameters = null; } if (secureParameters == undefined) { secureParameters = null; } var v2 = new com.newgrounds.APICommand(command); v2.__set__parameters(parameters); v2.__set__secureParameters(secureParameters); if (completeHandler != null) { v2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, completeHandler); } v2.send(this); }; v2.sendCommand = function (command) { command.send(this); }; v2.loadInBrowser = function (command, newWindow, parameters) { if (newWindow == undefined) { newWindow = true; } if (parameters == undefined) { parameters = null; } var v2 = new com.newgrounds.APICommand(command); v2.__set__parameters(parameters); v2.loadInBrowser(this, newWindow); }; v1.NOT_CONNECTED = 'notConnected'; v1.CONNECTING = 'connecting'; v1.CONNECTED = 'connected'; v2.connectionState = com.newgrounds.APIConnection.NOT_CONNECTED; v2.apiURL = 'http://www.ngads.com/gateway_v2.php'; v2.addProperty('connected', v2.__get__connected, function () {}); v2.addProperty('hasUserSession', v2.__get__hasUserSession, function () {}); v2.addProperty('hostURL', v2.__get__hostURL, v2.__set__hostURL); v2.addProperty('isNetworkHost', v2.__get__isNetworkHost, function () {}); v2.addProperty('sandboxType', v2.__get__sandboxType, function () {}); ASSetPropFlags(com.newgrounds.APIConnection.prototype, null, 1); } #endinitclip } movieClip 57 __Packages.com.newgrounds.EventDispatcher { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.EventDispatcher) { var v1 = function () { this._listeners = {}; }; com.newgrounds.EventDispatcher = v1; var v2 = v1.prototype; v2.addEventListener = function (type, listener) { if (!this._listeners[type]) { this._listeners[type] = []; } if (typeof listener == 'function') { this._listeners[type].push({'target': null, 'func': listener}); } else { this._listeners[type].push(listener); } }; v2.removeEventListener = function (type, listener) { var v3 = this._listeners[type]; if (v3) { var v5 = v3.length; var v2 = 0; while (v2 < v5) { if (v3[v2].func == listener || v3[v2] == listener) { v3.splice(v2, 1); return undefined; } ++v2; } } }; v2.dispatchEvent = function (event) { var v4 = this._listeners[event.__get__type()]; if (v4) { var v5 = v4.length; var v2 = 0; while (v2 < v5) { var v3 = v4[v2]; v3.func.call(v3.target, event); ++v2; } } return true; }; ASSetPropFlags(com.newgrounds.EventDispatcher.prototype, null, 1); } #endinitclip } movieClip 56 __Packages.com.newgrounds.Event { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.Event) { var v1 = function (type) { this._type = type; }; com.newgrounds.Event = v1; var v2 = v1.prototype; v2.__get__type = function () { return this._type; }; v2.addProperty('type', v2.__get__type, function () {}); ASSetPropFlags(com.newgrounds.Event.prototype, null, 1); } #endinitclip } movieClip 58 __Packages.com.newgrounds.APIEventDispatcher { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.APIEventDispatcher) { var v1 = function () { super(); }; com.newgrounds.APIEventDispatcher = v1; com.newgrounds.APIEventDispatcher extends com.newgrounds.EventDispatcher; var v2 = v1.prototype; v1.__get__globalDispatcher = function () { return com.newgrounds.APIEventDispatcher._globalDispatcher; }; v1.__set__globalDispatcher = function (value) { com.newgrounds.APIEventDispatcher._globalDispatcher = value; return com.newgrounds.APIEventDispatcher.__get__globalDispatcher(); }; v1.initEventQueue = function () { setInterval(com.newgrounds.APIEventDispatcher.runEventQueue, 50); return []; }; v2.dispatchEvent = function (event) { com.newgrounds.APIEventDispatcher._eventQueue.push({'dispatcher': this, 'event': event}); return true; }; v2.actualDispatchEvent = function (event) { var v3 = super.dispatchEvent(event); if (com.newgrounds.APIEventDispatcher._globalDispatcher && this != com.newgrounds.APIEventDispatcher._globalDispatcher) { com.newgrounds.APIEventDispatcher._globalDispatcher.dispatchEvent(event); } }; v1.runEventQueue = function (event) { var v3 = com.newgrounds.APIEventDispatcher._eventQueue.length; if (v3) { var v4 = com.newgrounds.APIEventDispatcher._eventQueue; com.newgrounds.APIEventDispatcher._eventQueue = []; var v1 = 0; while (v1 < v3) { var v2 = v4[v1]; v2.dispatcher.actualDispatchEvent(v2.event); ++v1; } } }; v1._eventQueue = com.newgrounds.APIEventDispatcher.initEventQueue(); v1.addProperty('globalDispatcher', v1.__get__globalDispatcher, v1.__set__globalDispatcher); ASSetPropFlags(com.newgrounds.APIEventDispatcher.prototype, null, 1); } #endinitclip } movieClip 61 __Packages.com.newgrounds.encoders.BaseN { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.encoders) { _global.com.newgrounds.encoders = new Object(); } if (!_global.com.newgrounds.encoders.BaseN) { var v1 = function (hash) { if (hash) { this._hash = hash; } else { this._hash = com.newgrounds.encoders.BaseN.DEFAULT_HASH; } this._base = this._hash.length; this._reverseHash = new Object(); var v2 = 0; while (v2 < this._hash.length) { this._reverseHash[this._hash.charAt(v2)] = v2; ++v2; } }; com.newgrounds.encoders.BaseN = v1; var v2 = v1.prototype; v2.encodeUint = function (number, minimumChars) { if (minimumChars == undefined) { minimumChars = 1; } var v2 = ''; var v3 = number; while (v3 != 0) { v2 = this._hash.charAt(v3 % this._base) + v2; v3 /= this._base; v3 = int(v3); } while (v2.length < minimumChars) { v2 = this._hash.charAt(0) + v2; } return v2; }; v2.decodeUint = function (encodedNumber) { var v3 = 0; var v2 = 0; while (v2 < encodedNumber.length) { v3 *= this._base; v3 += this._reverseHash[encodedNumber.charAt(v2)]; ++v2; } return v3; }; v1.DEFAULT_HASH = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/'; ASSetPropFlags(com.newgrounds.encoders.BaseN.prototype, null, 1); } #endinitclip } movieClip 67 __Packages.com.newgrounds.APICommand { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.APICommand) { var v1 = function (command) { super(); this._command = command; this._parameters = new Object(); this._secureParameters = new Object(); this._hasTimeout = true; }; com.newgrounds.APICommand = v1; com.newgrounds.APICommand extends com.newgrounds.APIEventDispatcher; var v2 = v1.prototype; v1.stopPendingCommands = function () { for (var v2 in com.newgrounds.APICommand._pendingCommands) { var v1 = com.newgrounds.APICommand._pendingCommands[v2]; v1.close(); } com.newgrounds.APICommand._pendingCommands = []; }; v1.onThrottleTimer = function (event) { if (getTimer() - com.newgrounds.APICommand._throttleTimestamp >= com.newgrounds.APICommand.THROTTLE_INTERVAL) { com.newgrounds.APICommand._throttleCount = 0; com.newgrounds.APICommand._throttleCount = 0; for (;;) { if (!(com.newgrounds.APICommand._commandQueue.length && com.newgrounds.APICommand._throttleCount < com.newgrounds.APICommand.THROTTLE_THRESHOLD)) break; var v1 = com.newgrounds.APICommand._commandQueue.shift(); v1.command.send(v1.connection); ++com.newgrounds.APICommand._throttleCount; } } }; v1.encryptHex = function (hexValue) { var v4 = hexValue.length % 6; var v3 = ''; var v1 = 0; while (v1 < hexValue.length) { v3 += com.newgrounds.APICommand._encryptor.encodeUint(int('0x' + hexValue.substr(v1, 6)), 4); v1 += 6; } return v4.toString() + v3; }; v2.__get__command = function () { return this._command; }; v2.__set__command = function (value) { this._command = value; return this.__get__command(); }; v2.__get__hasTimeout = function () { return this._hasTimeout; }; v2.__set__hasTimeout = function (val) { this._hasTimeout = val; return this.__get__hasTimeout(); }; v2.__get__parameters = function () { return this._parameters; }; v2.__set__parameters = function (object) { this._parameters = new Object(); if (object) { for (var v3 in object) { this._parameters[v3] = object[v3]; } } return this.__get__parameters(); }; v2.__get__preventCache = function () { return this._preventCache; }; v2.__set__preventCache = function (value) { this._preventCache = value; return this.__get__preventCache(); }; v2.__get__secureParameters = function () { return this._secureParameters; }; v2.__set__secureParameters = function (object) { this._secureParameters = new Object(); if (object) { for (var v3 in object) { this._secureParameters[v3] = object[v3]; } } return this.__get__secureParameters(); }; v2.__get__hasSecureParameters = function () { for (var v2 in this._secureParameters) { return true; } return false; }; v2.addFile = function (filename, data, dataField, contentType) { if (contentType == undefined) { contentType = 'application/octet-stream'; } if (!this._files) { this._files = new Object(); } var v3 = {'filename': filename, 'data': data, 'dataField': dataField, 'contentType': contentType}; this._files[filename] = v3; }; v2.removeFile = function (filename) { if (this._files) { delete this._files[filename]; } }; v2.clearFiles = function () { this._files = null; }; v2.close = function () { if (this._loader) { clearInterval(this._timeoutTimer); var v2 = 0; while (v2 < com.newgrounds.APICommand._pendingCommands.length) { if (com.newgrounds.APICommand._pendingCommands[v2] == this) { com.newgrounds.APICommand._pendingCommands.splice(v2, 1); break; } ++v2; } this._loader = null; } }; v2.loadInBrowser = function (connection, newWindow) { this._parameters.command_id = this._command; this._parameters.tracker_id = connection.apiId ? connection.apiId : 1; if (connection.debug) { this._parameters.debug = 1; } var v3 = connection.apiURL + '?host=' + escape(connection.hostDomain); for (var v4 in this._parameters) { v3 += '&' + escape(v4) + '=' + escape(this._parameters[v4]); } var v6; if (newWindow) { v6 = '_blank'; } else { v6 = '_top'; } _root.getURL(v3, v6); }; v2.send = function (connection) { if (com.newgrounds.APICommand._throttleCount >= com.newgrounds.APICommand.THROTTLE_THRESHOLD) { com.newgrounds.APICommand._commandQueue.push({'connection': connection, 'command': this}); } else { this.sendInternal(connection); } }; v2.sendInternal = function (connection) { var v4; v4 = new LoadVars(); v4.command_id = this._command; v4.tracker_id = connection.apiId; if (connection.debug) { v4.debug = 1; } if (this._preventCache) { v4.seed = Math.random(); } var v2; var v3; var v7; for (v2 in this._parameters) { v3 = this._parameters[v2]; if (v3 != null) { if (typeof v3 == 'boolean') { v4[v2] = int(v3); } else { v4[v2] = v3; } } } if (this.__get__hasSecureParameters()) { var v6 = new Object(); for (v2 in this._secureParameters) { v3 = this._secureParameters[v2]; if (v3 != null) { if (typeof v3 == 'boolean') { v6[v2] = int(v3); } else { v6[v2] = v3; } } } var v8 = ''; v7 = 0; while (v7 < 16) { v8 += com.newgrounds.APICommand.ENCRYPTOR_RADIX.charAt(int(Math.random() * com.newgrounds.APICommand.ENCRYPTOR_RADIX.length)); ++v7; } v4.command_id = 'securePacket'; v6.command_id = this._command; v6.as_version = 3; v6.session_id = connection.sessionId; v6.user_email = connection.userEmail; v6.publisher_id = connection.publisherId; v6.seed = v8; var v13 = com.newgrounds.crypto.MD5.hash(v8); var v11 = com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(v6), connection.encryptionKey); v4.secure = com.newgrounds.APICommand.encryptHex(v13 + v11); } com.newgrounds.Logger.logInternal('Sending packet:', v4); var v12; v12 = 'application/x-www-form-urlencoded'; for (v2 in v4) { if (typeof v4[v2] == 'object') { v4[v2] = com.newgrounds.encoders.json.JSON.encode(v4[v2]); } } if (this._files) { for (var v10 in this._files) { var v5 = this._files[v10]; if (typeof v5.data == 'string') { v4[v10] = v5.data; } else { v4[v10] = com.newgrounds.encoders.json.JSON.encode(v5.data); } } } com.newgrounds.APICommand._pendingCommands.push(this); ++com.newgrounds.APICommand._throttleCount; com.newgrounds.APICommand._throttleTimestamp = getTimer(); this.startLoader(connection.apiURL, v4, v12); }; v2.startLoader = function (url, data, contentType) { this._loader = LoadVars(data); this._loader.onData = this.as2CompleteHandler; this._loader.contentType = contentType; this._loader.sendAndLoad(url, this._loader, 'POST'); if (this._hasTimeout) { setInterval(this, this.onTimeout, com.newgrounds.APICommand.TIMEOUT_INTERVAL); } }; v2.as2CompleteHandler = function (data) { var v3; var v2 = 0; while (v2 < com.newgrounds.APICommand._pendingCommands.length) { if (com.newgrounds.APICommand._pendingCommands[v2]._loader == this) { v3 = com.newgrounds.APICommand._pendingCommands[v2]; break; } ++v2; } v3.onComplete(data); }; v2.onTimeout = function (event) { this.close(); com.newgrounds.Logger.logError('Command timed out.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_TIMED_OUT)); }; v2.onError = function (error) { com.newgrounds.Logger.logError('Error when sending command:', error); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_UNKNOWN)); this.close(); }; v2.onComplete = function (data) { com.newgrounds.Logger.logInternal('Received packet:', data); try { if (!data || data == '') { throw new Error(); } var v2 = com.newgrounds.encoders.json.JSON.decode(data); if (!v2) { throw new Error(); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, v2, (v2 && v2.success) ? com.newgrounds.APIEvent.ERROR_NONE : com.newgrounds.APIEvent.ERROR_COMMAND_FAILED)); if (com.newgrounds.APICommand.bridge) { com.newgrounds.APICommand.bridge.sendEvent(v2.command_id, v2); } } catch (e) { com.newgrounds.Logger.logError('Invalid response returned from server: ' + data); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_BAD_RESPONSE)); } this.close(); }; v1.TIMEOUT_INTERVAL = 10000; v1.THROTTLE_INTERVAL = 10050; v1.THROTTLE_TICK_INTERVAL = 1000; v1.THROTTLE_THRESHOLD = 24; v1._throttleCount = 0; v1._commandQueue = []; v1._throttleTimer = setInterval(com.newgrounds.APICommand.onThrottleTimer, com.newgrounds.APICommand.THROTTLE_TICK_INTERVAL); v1.ENCRYPTOR_RADIX = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X'; v1._encryptor = new com.newgrounds.encoders.BaseN(com.newgrounds.APICommand.ENCRYPTOR_RADIX); v1._pendingCommands = []; v1.CRLF = '\r\n'; v2.addProperty('command', v2.__get__command, v2.__set__command); v2.addProperty('hasSecureParameters', v2.__get__hasSecureParameters, function () {}); v2.addProperty('hasTimeout', v2.__get__hasTimeout, v2.__set__hasTimeout); v2.addProperty('parameters', v2.__get__parameters, v2.__set__parameters); v2.addProperty('preventCache', v2.__get__preventCache, v2.__set__preventCache); v2.addProperty('secureParameters', v2.__get__secureParameters, v2.__set__secureParameters); ASSetPropFlags(com.newgrounds.APICommand.prototype, null, 1); } #endinitclip } movieClip 63 __Packages.com.newgrounds.Bridge { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.Bridge) { var v1 = function (id) { super(); this._widgetId = id; this._inConnection = new LocalConnection(); this._outConnection = new LocalConnection(); var me = this; this._inConnection.receiveEvent = function () { me.receiveEvent.apply(me, arguments); }; this._inConnection.allowInsecureDomain = function (d) { return d == 'www.newgrounds.com' || d == 'newgrounds.com' || d == 'uploads.ungrounded.net'; }; this._inConnection.allowDomain = this._inConnection.allowInsecureDomain; this._inConnection.connect('_rec_' + this._widgetId); com.newgrounds.Logger.addEventListener(com.newgrounds.APIEvent.LOG, {'target': this, 'func': this.onLogMessage}); }; com.newgrounds.Bridge = v1; com.newgrounds.Bridge extends com.newgrounds.EventDispatcher; var v2 = v1.prototype; v2.__get__widgetId = function () { return this._widgetId; }; v2.onLogMessage = function (event) { try { this._outConnection.send(this._widgetId, 'sendEvent', 'trace', String(event.__get__data())); } }; v2.sendEvent = function (command, parameters) { if (this._outConnection) { parameters = {'data': parameters}; try { this._outConnection.send(this._widgetId, 'sendEvent', command, parameters); } } }; v2.receiveEvent = function (responseData) { var v2; try { v2 = com.newgrounds.encoders.json.JSON.decode(responseData); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.BRIDGE_EVENT_RECEIVED, v2, (v2 == null) ? com.newgrounds.APIEvent.ERROR_UNKNOWN : null)); }; v2.onStatus = function (event) {}; v2.addProperty('widgetId', v2.__get__widgetId, function () {}); ASSetPropFlags(com.newgrounds.Bridge.prototype, null, 1); } #endinitclip } movieClip 59 __Packages.com.newgrounds.APIEvent { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.APIEvent) { var v1 = function (type, data, error) { super(type); if (data == undefined) { data = null; } if (error == undefined) { error = null; } if (!error || error == '' || error == com.newgrounds.APIEvent.ERROR_NONE) { this._error = com.newgrounds.APIEvent.ERROR_NONE; this._success = true; } else { this._error = error; this._success = false; } if (data) { this._data = data; } else { this._data = {}; } }; com.newgrounds.APIEvent = v1; com.newgrounds.APIEvent extends com.newgrounds.Event; var v2 = v1.prototype; v2.clone = function () { return new com.newgrounds.APIEvent(this.__get__type(), this._data, this._error); }; v2.__get__success = function () { return this._success; }; v2.__get__data = function () { return this._data; }; v2.__get__error = function () { return this._error; }; v1.COMMAND_COMPLETE = 'commandComplete'; v1.MEDAL_UNLOCK_CONFIRMED = 'medalUnlockConfirmed'; v1.ICON_LOADED = 'iconLoaded'; v1.BRIDGE_EVENT_RECEIVED = 'brdigeEventReceived'; v1.API_CONNECTED = 'movieConnected'; v1.LOG = 'log'; v1.MEDAL_UNLOCKED = 'medalUnlocked'; v1.SCORES_LOADED = 'scoresLoaded'; v1.SCORE_POSTED = 'scorePosted'; v1.QUERY_COMPLETE = 'queryComplete'; v1.FILE_LOADED = 'fileLoaded'; v1.FILE_SAVED = 'fileSaved'; v1.FILE_DELETED = 'fileDeleted'; v1.FILE_REQUESTED = 'fileRequested'; v1.VOTE_COMPLETE = 'voteComplete'; v1.USER_SIGNED_IN = 'userSignedIn'; v1.ERROR_NONE = 'noError'; v1.ERROR_UNKNOWN = 'unknownError'; v1.ERROR_COMMAND_FAILED = 'commandFailed'; v1.ERROR_NOT_CONNECTED = 'notConnected'; v1.ERROR_INVALID_ARGUMENT = 'invalidArgument'; v1.ERROR_TIMED_OUT = 'timedOut'; v1.ERROR_BAD_FILE = 'badFile'; v1.ERROR_BAD_RESPONSE = 'badResponse'; v1.ERROR_SENDING_COMMAND = 'errorSendingCommand'; v1.ERROR_HOST_BLOCKED = 'hostBlocked'; v1.ERROR_ALREADY_VOTED = 'alreadyVoted'; v1.ERROR_NOT_LOGGED_IN = 'notLoggedIn'; v1.ERROR_WRONG_ENCRYPTION_KEY = 'wrongEncryptionKey'; v1.ERROR_SIGN_IN_FAILED = 'signInFailed'; v2.addProperty('data', v2.__get__data, function () {}); v2.addProperty('error', v2.__get__error, function () {}); v2.addProperty('success', v2.__get__success, function () {}); ASSetPropFlags(com.newgrounds.APIEvent.prototype, null, 1); } #endinitclip } movieClip 78 __Packages.com.newgrounds.API { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.API) { var v1 = function () {}; com.newgrounds.API = v1; var v2 = v1.prototype; v1.__get__connected = function () { return com.newgrounds.API._connection.__get__connected(); }; v1.__get__isNetworkHost = function () { return com.newgrounds.API._connection.__get__isNetworkHost(); }; v1.__get__apiId = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.apiId; }; v1.__get__debugMode = function () { return com.newgrounds.API._debugMode; }; v1.__set__debugMode = function (val) { com.newgrounds.API._debugMode = val; return com.newgrounds.API.__get__debugMode(); }; v1.__get__publisherId = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.publisherId; }; v1.__get__sessionId = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.sessionId; }; v1.__get__hostDomain = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.hostDomain; }; v1.__get__hostURL = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.__get__hostURL(); }; v1.__get__isNewgrounds = function () { return com.newgrounds.API._connection.publisherId == 1; }; v1.__get__hasUserSession = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.__get__hasUserSession(); }; v1.__get__username = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.username; }; v1.__get__userId = function () { com.newgrounds.API._connection.assertInitialized(); return com.newgrounds.API._connection.userId; }; v1.assertConnected = function (eventType) { if (eventType == undefined) { eventType = null; } if (com.newgrounds.API._connection.assertConnected()) { return true; } else { if (eventType) { com.newgrounds.API.dispatchEvent(eventType, null, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED); } return false; } }; v1.__get__serverTime = function () { return com.newgrounds.API._serverTime; }; v1.__get__adsApproved = function () { return com.newgrounds.API._adsApproved; }; v1.__get__adFeedURL = function () { return com.newgrounds.API._adFeedURL; }; v1.__get__medals = function () { return com.newgrounds.API._medalsArray; }; v1.__get__scoreBoards = function () { return com.newgrounds.API._scoreBoardsArray; }; v1.__get__saveGroups = function () { return com.newgrounds.API._saveGroupsArray; }; v1.connect = function (_root, apiId, encryptionKey, movieVersion) { if (encryptionKey == undefined) { encryptionKey = null; } if (movieVersion == undefined) { movieVersion = ''; } com.newgrounds.APIEventDispatcher.__set__globalDispatcher(com.newgrounds.API._dispatcher); System.security.loadPolicyFile('http://apifiles.ngfiles.com/crossdomain.xml'); if (com.newgrounds.API._connection.initialized) { com.newgrounds.Logger.logError('Connection already in progress. Please call API.disconnect() before attempting another connection.'); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED); return undefined; } apiId = com.newgrounds.API.trimWhitespace(apiId); if (encryptionKey) { encryptionKey = com.newgrounds.API.trimWhitespace(encryptionKey); } if (!apiId || apiId == '') { com.newgrounds.Logger.logError('No apiId given. Please use the API ID from your API settings page.'); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return undefined; } com.newgrounds.Logger.logMessage('====== Newgrounds API v' + com.newgrounds.API.VERSION + ' ======'); com.newgrounds.API._connection.connectionState = com.newgrounds.APIConnection.CONNECTING; _root = _root; com.newgrounds.API._movieVersion = movieVersion; com.newgrounds.API._connection.apiId = apiId; var v4; v4 = apiId.indexOf(':'); if (v4 != -1) { com.newgrounds.API._connection.trackerId = int(apiId.substring(0, v4)); } else { com.newgrounds.API._connection.trackerId = int(apiId); } if (!com.newgrounds.API._connection.trackerId) { com.newgrounds.Logger.logError('Invalid API ID: ' + apiId); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return undefined; } com.newgrounds.API._connection.encryptionKey = encryptionKey; com.newgrounds.API._connection.initialized = true; com.newgrounds.API._connection.__set__hostURL(_root._url); com.newgrounds.API.doConnect(_root); }; v1.doConnect = function (flashVars) { if (com.newgrounds.API.__get__isNetworkHost() && com.newgrounds.API._debugMode != com.newgrounds.API.RELEASE_MODE) { com.newgrounds.Logger.logMessage('Live file detected, turning off debug mode.'); com.newgrounds.API._debugMode = com.newgrounds.API.RELEASE_MODE; } if (flashVars && flashVars.NewgroundsAPI_SandboxID) { com.newgrounds.API._bridge = new com.newgrounds.Bridge(flashVars.NewgroundsAPI_SandboxID); com.newgrounds.APICommand.bridge = com.newgrounds.API._bridge; } else { com.newgrounds.API._bridge = new com.newgrounds.Bridge(com.newgrounds.crypto.MD5.hash(String(Math.random()))); com.newgrounds.APICommand.bridge = com.newgrounds.API._bridge; } if (com.newgrounds.API._debugMode == com.newgrounds.API.RELEASE_MODE) { if (flashVars) { if (flashVars.NewgroundsAPI_UserName) { com.newgrounds.API._connection.username = flashVars.NewgroundsAPI_UserName; } if (flashVars.NewgroundsAPI_UserID) { com.newgrounds.API._connection.userId = flashVars.NewgroundsAPI_UserID; } if (flashVars.NewgroundsAPI_PublisherID) { com.newgrounds.API._connection.publisherId = flashVars.NewgroundsAPI_PublisherID; } if (flashVars.NewgroundsAPI_UserpageFormat) { com.newgrounds.API._connection.userpageFormat = flashVars.NewgroundsAPI_UserpageFormat; } if (flashVars.NewgroundsAPI_SessionID) { com.newgrounds.API._connection.sessionId = flashVars.NewgroundsAPI_SessionID; } if (flashVars.NewgroundsAPI_SaveGroupID) { com.newgrounds.API._requestedSaveGroupId = flashVars.NewgroundsAPI_SaveGroupID; } if (flashVars.NewgroundsAPI_SaveFileID) { com.newgrounds.API._requestedSaveFileId = flashVars.NewgroundsAPI_SaveFileID; } } } else { com.newgrounds.API._connection.debug = true; if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_IN || com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_OUT) { com.newgrounds.API._connection.publisherId = 1; } if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_IN) { com.newgrounds.API._connection.sessionId = 'D3bu64p1U53R'; com.newgrounds.API._connection.userId = 10; com.newgrounds.API._connection.username = 'API-Debugger'; } } com.newgrounds.API._connection.sendSimpleCommand('connectMovie', com.newgrounds.API.onConnect, {'host': com.newgrounds.API._connection.hostDomain, 'movie_version': com.newgrounds.API._movieVersion, 'publisher_id': com.newgrounds.API._connection.publisherId}); }; v1.onConnect = function (event) { var v1 = event.__get__data(); if (!event.__get__success()) { com.newgrounds.Logger.logError('Unable to connect to the API.'); com.newgrounds.API._connection.reset(); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, event.__get__data(), event.__get__error()); return undefined; } if (com.newgrounds.API.__get__debugMode() != com.newgrounds.API.RELEASE_MODE) { com.newgrounds.API._adFeedURL = com.newgrounds.API.TEST_AD_FEED_URL; } else { if (v1.ad_url) { com.newgrounds.API._adFeedURL = unescape(v1.ad_url); } } switch (v1.ad_status) { case -1: com.newgrounds.Logger.logWarning('Your movie is not approved to run Flash Ads.'); break; case 0: com.newgrounds.Logger.logWarning('Your movie is still awaiting approval to run Flash Ads.'); break; case 1: com.newgrounds.Logger.logMessage('Your movie is approved to run Flash Ads!'); } com.newgrounds.API._adsApproved = v1.ad_status == 1; if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_HOST_BLOCKED || v1.deny_host) { com.newgrounds.Logger.logWarning(com.newgrounds.API._connection.hostDomain + ' does not have permission to host this movie!', 'Update your API configuration to allow this host.'); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {'officialURL': unescape(v1.movie_url)}, com.newgrounds.APIEvent.ERROR_HOST_BLOCKED); com.newgrounds.API._connection.reset(); return undefined; } com.newgrounds.API._movieName = v1.movieName ? v1.movieName : ''; com.newgrounds.Logger.logMessage('Connecting to the Newgrounds API Gateway...', '----- ' + v1.movie_name + ' -----'); if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_NEW_VERSION) { v1.movie_version = 'Debug Mode'; } if (v1.movie_version) { com.newgrounds.Logger.logMessage('A new version of this movie is available.', 'Current version:\t' + com.newgrounds.API._movieVersion, 'Newest version:\t' + v1.movie_version, 'Use API.loadOfficialVersion() to link to the latest version.'); com.newgrounds.API._newVersion = true; } else { com.newgrounds.API._newVersion = false; } com.newgrounds.API._serverTime = new Date(int(v1.time) * 1000); if (v1.request_portal_url) { com.newgrounds.API._connection.sendSimpleCommand('setPortalID', null, {'portal_url': com.newgrounds.API._connection.__get__hostURL()}); } com.newgrounds.API._connection.sendSimpleCommand('preloadSettings', com.newgrounds.API.onMetadataLoaded, {'publisher_id': com.newgrounds.API._connection.publisherId, 'user_id': com.newgrounds.API._connection.userId}); }; v1.onMetadataLoaded = function (event) { var v11 = event.__get__data(); var v4; var v1; if (!event.__get__success()) { com.newgrounds.Logger.logWarning('Unable to load movie metadata.'); com.newgrounds.API.disconnect(); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, null, event.__get__error()); return undefined; } var v10 = 0; if (v11.medals) { v10 = v11.medals.length; var v18; if (com.newgrounds.API.__get__hasUserSession()) { v18 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username()); } else { v18 = com.newgrounds.API.loadLocal('medals_unlocked'); } v4 = 0; while (v4 < v10) { var v5 = v11.medals[v4]; var v15 = v5.medal_unlocked; var v17 = v18 && v18[v5.medal_id]; var v14 = com.newgrounds.API.__get__hasUserSession() ? v15 : v17; if (com.newgrounds.API.__get__debugMode() != com.newgrounds.API.RELEASE_MODE) { v14 = false; } var v6 = new com.newgrounds.Medal(com.newgrounds.API._connection, v5.medal_id, v5.medal_name, v5.medal_description, Boolean(int(v5.secret)), v14, v5.medal_value, v5.medal_difficulty, v5.medal_icon); v6.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, com.newgrounds.API.onMedalUnlocked, false, 0, true); v6.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, com.newgrounds.API.onMedalUnlockConfirmed, false, 0, true); com.newgrounds.API._medals[v6.__get__name()] = v6; com.newgrounds.API._medalsArray.push(v6); com.newgrounds.Logger.logMessage(v6); if (com.newgrounds.API.__get__hasUserSession() && v17 && !v15) { com.newgrounds.Logger.logMessage('Server missed the "' + v6.__get__name() + '" unlock. Resending...'); v6.unlock(); } ++v4; } } com.newgrounds.Logger.logMessage(v10 + ' medal' + ((v10 != 1) ? 's' : '') + ' initialized.'); v10 = 0; if (v11.score_boards) { v10 = v11.score_boards.length; v4 = 0; while (v4 < v10) { var v16 = v11.score_boards[v4]; var v9 = new com.newgrounds.ScoreBoard(com.newgrounds.API._connection, v16.name, v16.id); com.newgrounds.API._scoreBoards[v9.__get__name()] = v9; com.newgrounds.API._scoreBoardsArray.push(v9); com.newgrounds.Logger.logMessage(v9); ++v4; } } com.newgrounds.Logger.logMessage(v10 + ' scoreboard' + ((v10 != 1) ? 's' : '') + ' initialized.'); v10 = 0; if (v11.save_groups) { v10 = v11.save_groups.length; v4 = 0; while (v4 < v10) { var v2 = v11.save_groups[v4]; var v13 = []; if (v2.keys) { v1 = 0; while (v1 < v2.keys.length) { var v7 = v2.keys[v1]; v13.push(new com.newgrounds.SaveKey(v7.name, v7.id, v7.type)); ++v1; } } var v12 = []; if (v2.ratings) { v1 = 0; while (v1 < v2.ratings.length) { var v3 = v2.ratings[v1]; v12.push(new com.newgrounds.SaveRating(v3.name, v3.id, v3.float, v3.min, v3.max)); ++v1; } } var v8 = new com.newgrounds.SaveGroup(com.newgrounds.API._connection, v2.group_name, v2.group_id, v2.group_type, v13, v12); com.newgrounds.API._saveGroups[v8.__get__name()] = v8; com.newgrounds.API._saveGroupsArray.push(v8); com.newgrounds.Logger.logMessage(v8); ++v4; } } com.newgrounds.Logger.logMessage(v10 + ' save group' + ((v10 != 1) ? 's' : '') + ' initialized.'); if (v11.save_file_path) { com.newgrounds.API._saveFilePath = v11.save_file_path + '/'; com.newgrounds.SaveFile._saveFilePath = com.newgrounds.API._saveFilePath; com.newgrounds.Logger.logInternal('Save file path: ' + com.newgrounds.API._saveFilePath); } if (v11.image_file_path) { com.newgrounds.API._imageFilePath = v11.image_file_path + '/'; com.newgrounds.SaveFile._imageFilePath = com.newgrounds.API._imageFilePath; com.newgrounds.Logger.logInternal('Image file path: ' + com.newgrounds.API._imageFilePath); } com.newgrounds.Logger.logMessage('Connection complete!'); com.newgrounds.API._connection.connectionState = com.newgrounds.APIConnection.CONNECTED; com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {'movieName': com.newgrounds.API._movieName, 'newVersion': com.newgrounds.API._newVersion}); if (com.newgrounds.API._requestedSaveFileId && com.newgrounds.API._requestedSaveGroupId) { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, com.newgrounds.API.onRequestedFileLoaded); com.newgrounds.API.loadSaveFile(com.newgrounds.API._requestedSaveFileId, false); } }; v1.disconnect = function () { if (!com.newgrounds.API._connection.__get__connected()) { com.newgrounds.Logger.logWarning('The Newgrounds API is already disconnected.'); return undefined; } com.newgrounds.API._connection.reset(); for (var v2 in com.newgrounds.API._medals) { var v1 = com.newgrounds.API._medals[v2]; v1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, com.newgrounds.API.onMedalUnlocked); v1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, com.newgrounds.API.onMedalUnlockConfirmed); } com.newgrounds.API._newVersion = false; com.newgrounds.API._medals = new Object(); com.newgrounds.API._medalsArray = []; com.newgrounds.API._scoreBoards = new Object(); com.newgrounds.API._scoreBoardsArray = []; com.newgrounds.API._saveGroups = new Object(); com.newgrounds.API._saveGroupsArray = []; com.newgrounds.API._sharedObjects = new Object(); com.newgrounds.API._imageFilePath = null; com.newgrounds.API._saveFilePath = null; com.newgrounds.Logger.logMessage('Disconnected from the Newgrounds API.'); }; v1.loadNewgrounds = function () { com.newgrounds.API._connection.loadInBrowser('loadNewgrounds'); }; v1.loadOfficialVersion = function () { if (com.newgrounds.API._connection.assertInitialized()) { com.newgrounds.API._connection.loadInBrowser('loadOfficialVersion', false); } }; v1.promptSignIn = function () { if (com.newgrounds.API._connection.assertInitialized()) { getURL(com.newgrounds.API.PASSPORT_URL + com.newgrounds.API._bridge.__get__widgetId(), '_blank'); com.newgrounds.API._bridge.addEventListener(com.newgrounds.APIEvent.BRIDGE_EVENT_RECEIVED, com.newgrounds.API.onUserSignedIn, false, 0, true); } }; v1.onUserSignedIn = function (e) { com.newgrounds.API._bridge.removeEventListener(com.newgrounds.APIEvent.BRIDGE_EVENT_RECEIVED, com.newgrounds.API.onUserSignedIn); var v1 = e.__get__data(); if (e.__get__success()) { try { if (v1.NewgroundsAPI_UserName) { com.newgrounds.API._connection.username = v1.NewgroundsAPI_UserName; } if (v1.NewgroundsAPI_UserID) { com.newgrounds.API._connection.userId = v1.NewgroundsAPI_UserID; } if (v1.NewgroundsAPI_PublisherID) { com.newgrounds.API._connection.publisherId = v1.NewgroundsAPI_PublisherID; } if (v1.NewgroundsAPI_SessionID) { com.newgrounds.API._connection.sessionId = v1.NewgroundsAPI_SessionID; } com.newgrounds.API._connection.sendSimpleCommand('preloadSettings', com.newgrounds.API.onMetadataLoaded, {'publisher_id': com.newgrounds.API._connection.publisherId, 'user_id': com.newgrounds.API._connection.userId}); } com.newgrounds.Logger.logMessage('User ' + com.newgrounds.API._connection.username + ' signed in.'); } com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.USER_SIGNED_IN, null, e.__get__success() ? null : com.newgrounds.APIEvent.ERROR_SIGN_IN_FAILED); }; v1.loadMySite = function () { if (com.newgrounds.API._connection.assertInitialized()) { com.newgrounds.API._connection.loadInBrowser('loadMySite'); } }; v1.loadCustomLink = function (linkName) { if (com.newgrounds.API._connection.assertInitialized()) { com.newgrounds.API._connection.loadInBrowser('loadCustomLink', true, {'link': linkName}); } }; v1.getMedal = function (medalName) { return com.newgrounds.API._medals[medalName]; }; v1.unlockMedal = function (medalName) { if (!com.newgrounds.API.assertConnected()) { return undefined; } var v1 = com.newgrounds.API._medals[medalName]; if (!v1) { com.newgrounds.Logger.logError('No medal named "' + medalName + '" w.'); return undefined; } v1.unlock(); }; v1.onMedalUnlocked = function (event) { if (event.__get__success()) { var v2 = com.newgrounds.Medal(event.__get__data()); var v1; if (com.newgrounds.API.__get__hasUserSession()) { v1 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username()); if (!v1) { v1 = new Object(); } v1[v2.__get__id()] = true; com.newgrounds.API.saveLocal('medals_unlocked_' + com.newgrounds.API.__get__username(), v1); } else { v1 = com.newgrounds.API.loadLocal('medals_unlocked'); if (!v1) { v1 = new Object(); } v1[(com.newgrounds.Medal(event.__get__data())).__get__id()] = true; com.newgrounds.API.saveLocal('medals_unlocked', v1); com.newgrounds.Logger.logMessage('User instanceof not logged in. Medal "' + v2.__get__name() + '" unlocked locally.'); } } }; v1.onMedalUnlockConfirmed = function (event) { if (com.newgrounds.API.__get__hasUserSession()) { var v1 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username()); if (!v1) { v1 = new Object(); } else { delete v1[(com.newgrounds.Medal(event.__get__data())).__get__id()]; } com.newgrounds.API.saveLocal('medals_unlocked_' + com.newgrounds.API.__get__username(), v1); } }; v1.clearLocalMedals = function () { for (var v2 in com.newgrounds.API._medals) { var v1 = com.newgrounds.API._medals[v2]; v1.setUnlocked(false); } if (!com.newgrounds.API.__get__hasUserSession()) { com.newgrounds.API.saveLocal('medals_unlocked', new Object()); } }; v1.getScoreBoard = function (scoreBoardName) { if (!com.newgrounds.API.assertConnected()) { return null; } return com.newgrounds.API._scoreBoards[scoreBoardName]; }; v1.loadScores = function (scoreBoardName, period, firstResult, numResults, tag) { if (period == undefined) { period = 'All-Time'; } if (firstResult == undefined) { firstResult = 1; } if (numResults == undefined) { numResults = 10; } if (tag == undefined) { tag = null; } if (!com.newgrounds.API.assertConnected()) { return null; } var v1 = com.newgrounds.API._scoreBoards[scoreBoardName]; if (!v1) { com.newgrounds.Logger.logError('No scoreboard named "' + scoreBoardName + '" w.'); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return null; } v1.__set__period(period); v1.__set__firstResult(firstResult); v1.__set__numResults(numResults); v1.__set__tag(tag); v1.loadScores(); return v1; }; v1.postScore = function (scoreBoardName, numericScore, tag) { if (tag == undefined) { tag = null; } if (!com.newgrounds.API.assertConnected()) { return undefined; } if (!com.newgrounds.API.__get__hasUserSession()) { com.newgrounds.Logger.logError('The user must be logged-in to post a score.'); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN); return undefined; } var v1 = com.newgrounds.API._scoreBoards[scoreBoardName]; if (!v1) { com.newgrounds.Logger.logError('No scoreboard named "' + scoreBoardName + '" w.'); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return undefined; } v1.postScore(numericScore, tag); }; v1.getSaveGroup = function (groupName) { if (!com.newgrounds.API.assertConnected()) { return null; } return com.newgrounds.API._saveGroups[groupName]; }; v1.getSaveGroupById = function (id) { for (var v3 in com.newgrounds.API._saveGroups) { var v1 = com.newgrounds.API._saveGroups[v3]; if (v1.__get__id() == id) { return v1; } } return null; }; v1.createSaveFile = function (groupName) { if (!com.newgrounds.API.assertConnected()) { return null; } var v1 = com.newgrounds.API.getSaveGroup(groupName); if (!v1) { com.newgrounds.Logger.logError('The save group "' + groupName + '" w found.'); return null; } return new com.newgrounds.SaveFile(v1); }; v1.loadSaveFile = function (saveId, loadContents) { if (loadContents == undefined) { loadContents = true; } com.newgrounds.API._connection.sendSimpleCommand('loadSaveFile', com.newgrounds.API.onFileLoaded, {'save_id': saveId, 'get_contents': loadContents}); }; v1.onFileLoaded = function (event) { var v2; if (event.__get__success()) { v2 = com.newgrounds.SaveFile.fromObject(com.newgrounds.API.getSaveGroupById((event.__get__data()).group_id), (event.__get__data()).file); if ((event.__get__data()).get_contents) { v2.load(); } else { com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_LOADED, v2); } } else { com.newgrounds.Logger.logError('Unable to load file:', event.__get__error()); com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_LOADED, null, event.__get__error()); } }; v1.createSaveQuery = function (groupName) { if (!com.newgrounds.API.assertConnected()) { return null; } var v1 = com.newgrounds.API.getSaveGroup(groupName); if (!v1) { com.newgrounds.Logger.logError('The save group "' + groupName + '" w found.'); return null; } var v2 = new com.newgrounds.SaveQuery(v1); return v2; }; v1.createSaveQueryByDate = function (groupName, sortDescending) { if (sortDescending == undefined) { sortDescending = true; } var v1 = com.newgrounds.API.createSaveQuery(groupName); if (!v1) { return null; } v1.sortOn(com.newgrounds.SaveQuery.CREATED_ON, sortDescending); return v1; }; v1.createSaveQueryByName = function (groupName, filename, exactMatch, sortDescending) { if (exactMatch == undefined) { exactMatch = false; } if (sortDescending == undefined) { sortDescending = false; } var v1 = com.newgrounds.API.createSaveQuery(groupName); if (!exactMatch) { v1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.OPERATOR_CONTAINS, filename); return v1; } v1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.OPERATOR_EQUAL, filename); return v1; }; v1.createSaveQueryByRating = function (groupName, ratingName, sortDescending) { if (sortDescending == undefined) { sortDescending = true; } var v1 = com.newgrounds.API.createSaveQuery(groupName); v1.sortOn(ratingName, sortDescending); return v1; }; v1.onRequestedFileLoaded = function (event) { com.newgrounds.API.removeEventListener(com.newgrounds.APIEvent.FILE_LOADED, com.newgrounds.API.onRequestedFileLoaded); if (event.__get__success()) { var v1 = event.__get__data(); if (v1) { com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_REQUESTED, v1); } } }; v1.addEventListener = function (eventType, listener, priority, useWeakReference) { if (priority == undefined) { priority = 0; } if (useWeakReference == undefined) { useWeakReference = true; } com.newgrounds.API._dispatcher.addEventListener(eventType, listener, false, priority, useWeakReference); }; v1.removeEventListener = function (eventType, listener) { com.newgrounds.API._dispatcher.removeEventListener(eventType, listener); }; v1.dispatchEvent = function (event, data, error) { if (data == undefined) { data = null; } if (error == undefined) { error = null; } com.newgrounds.API._dispatcher.dispatchEvent(new com.newgrounds.APIEvent(event, data, error)); }; v1.saveLocal = function (saveId, saveData) { try { var v3; var v2 = 'ng_ap_secure_' + com.newgrounds.API._connection.trackerId + '_' + com.newgrounds.crypto.RC4.encrypt(saveId, com.newgrounds.API._connection.encryptionKey); if (!com.newgrounds.API._sharedObjects[saveId]) { com.newgrounds.API._sharedObjects[saveId] = SharedObject.getLocal(v2); } v3 = com.newgrounds.API._sharedObjects[saveId]; v3.data.data = com.newgrounds.API.encodeData(saveData); } catch (v0) { if (Error(v0) != null) { var error = Error(v0); com.newgrounds.Logger.logError('Unable to save local data.', error); return false; return true; } throw v0; } return true; }; v1.loadLocal = function (saveId) { try { var v1; var v3 = 'ng_ap_secure_' + com.newgrounds.API._connection.trackerId + '_' + com.newgrounds.crypto.RC4.encrypt(saveId, com.newgrounds.API._connection.encryptionKey); if (!com.newgrounds.API._sharedObjects[saveId]) { com.newgrounds.API._sharedObjects[saveId] = SharedObject.getLocal(v3); } v1 = com.newgrounds.API._sharedObjects[saveId]; if (v1 && v1.data && v1.data.data) { return com.newgrounds.API.decodeData(v1.data.data); } return null; } catch (v0) { if (Error(v0) != null) { var error = Error(v0); com.newgrounds.Logger.logError('Unable to load local data.', error); return null; } throw v0; } return null; }; v1.logCustomEvent = function (eventName) { if (com.newgrounds.API.assertConnected()) { com.newgrounds.Logger.logMessage('Logged event: ' + eventName); com.newgrounds.API._connection.sendSimpleCommand('logCustomEvent', null, {'event': eventName}); } }; v1.encodeData = function (data) { if (!com.newgrounds.API._connection.assertInitialized()) { return null; } return com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(data), com.newgrounds.API._connection.encryptionKey); }; v1.decodeData = function (data) { if (!com.newgrounds.API._connection.assertInitialized()) { return null; } try { return com.newgrounds.encoders.json.JSON.decode(com.newgrounds.crypto.RC4.decrypt(data, com.newgrounds.API._connection.encryptionKey)); } catch (v0) { if (Error(v0) != null) { var error = Error(v0); return null; } throw v0; } return null; }; v1.stopPendingCommands = function () { com.newgrounds.APICommand.stopPendingCommands(); com.newgrounds.Logger.logMessage('Pending commands stopped.'); }; v1.trimWhitespace = function (string) { if (!string) { return null; } var v3 = 0; while (string.charAt(v3) == ' ') { ++v3; } var v1 = string.length - 1; for (;;) { if (!(string.charAt(v1) == ' ' && v1 >= 0)) break; --v1; } return string.slice(v3, v1 + 1); }; v1.VERSION = '3.2 AS2'; v1.RELEASE_MODE = 'releaseMode'; v1.DEBUG_MODE_LOGGED_IN = 'debugModeLoggedIn'; v1.DEBUG_MODE_LOGGED_OUT = 'debugModeLoggedOut'; v1.DEBUG_MODE_NEW_VERSION = 'debugModeNewVersion'; v1.DEBUG_MODE_HOST_BLOCKED = 'debugModeHostBlocked'; v1.TEST_AD_FEED_URL = 'http://www.ngads.com/adtest.php'; v1.PASSPORT_URL = 'https://www.newgrounds.com/login/remote/'; v1._dispatcher = new com.newgrounds.APIEventDispatcher(); v1._connection = new com.newgrounds.APIConnection(); v1._debugMode = com.newgrounds.API.DEBUG_MODE_LOGGED_IN; v1._adsApproved = false; v1._medals = new Object(); v1._medalsArray = []; v1._scoreBoards = new Object(); v1._scoreBoardsArray = []; v1._saveGroups = new Object(); v1._saveGroupsArray = []; v1._sharedObjects = new Object(); v1.addProperty('adFeedURL', v1.__get__adFeedURL, function () {}); v1.addProperty('adsApproved', v1.__get__adsApproved, function () {}); v1.addProperty('apiId', v1.__get__apiId, function () {}); v1.addProperty('connected', v1.__get__connected, function () {}); v1.addProperty('debugMode', v1.__get__debugMode, v1.__set__debugMode); v1.addProperty('hasUserSession', v1.__get__hasUserSession, function () {}); v1.addProperty('hostDomain', v1.__get__hostDomain, function () {}); v1.addProperty('hostURL', v1.__get__hostURL, function () {}); v1.addProperty('isNetworkHost', v1.__get__isNetworkHost, function () {}); v1.addProperty('isNewgrounds', v1.__get__isNewgrounds, function () {}); v1.addProperty('medals', v1.__get__medals, function () {}); v1.addProperty('publisherId', v1.__get__publisherId, function () {}); v1.addProperty('saveGroups', v1.__get__saveGroups, function () {}); v1.addProperty('scoreBoards', v1.__get__scoreBoards, function () {}); v1.addProperty('serverTime', v1.__get__serverTime, function () {}); v1.addProperty('sessionId', v1.__get__sessionId, function () {}); v1.addProperty('userId', v1.__get__userId, function () {}); v1.addProperty('username', v1.__get__username, function () {}); ASSetPropFlags(com.newgrounds.API.prototype, null, 1); } #endinitclip } movieClip 75 __Packages.com.newgrounds.encoders.ImageScanner { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.encoders) { _global.com.newgrounds.encoders = new Object(); } if (!_global.com.newgrounds.encoders.ImageScanner) { var v1 = function (hashLength, charsPerPixel) { if (hashLength) { this._hash = com.newgrounds.encoders.ImageScanner.DEFAULT_HASH.substr(0, hashLength); } this._baseN = new com.newgrounds.encoders.BaseN(this._hash); if (charsPerPixel) { this._charsPerPixel = charsPerPixel; } this.__set__encodeAlpha(false); }; com.newgrounds.encoders.ImageScanner = v1; var v2 = v1.prototype; v2.__get__encodeAlpha = function () { return this._encodeAlpha; }; v2.__set__encodeAlpha = function (v) { this._encodeAlpha = v; this._maxPerChannel = int(Math.pow(this._hash.length, this._charsPerPixel / (this._encodeAlpha ? 4 : 3))); if (this._maxPerChannel > 256) { this._maxPerChannel = 256; } return this.__get__encodeAlpha(); }; v2.encode = function (source, callbackFunction, callbackObject) { var v4 = {'callbackFunction': callbackFunction, 'callbackObject': callbackObject, 'source': source, 'x': 0, 'y': 0, 'output': null}; var v2 = source.width.toString(); var v3 = source.height.toString(); while (v2.length < 3) { v2 = '0' + v2; } while (v3.length < 3) { v3 = '0' + v3; } v4.output = v2 + v3; var v6 = setInterval(this, 'doEncode', com.newgrounds.encoders.ImageScanner.WORK_INTERVAL, v4); v4.interval = v6; }; v2.decode = function (source, callbackFunction, callbackObject) { var v4 = {'callbackFunction': callbackFunction, 'callbackObject': callbackObject, 'source': source, 'i': 6, 'x': 0, 'y': 0, 'output': null}; var v3 = source.substr(0, 3); var v2 = source.substr(3, 3); while (v3.charAt(0) == '0') { v3 = v3.substr(1); } while (v2.charAt(0) == '0') { v2 = v2.substr(1); } var v7 = int(v3); var v8 = int(v2); v4.output = new flash.display.BitmapData(v7, v8, this._encodeAlpha); var v6 = setInterval(this, 'doDecode', com.newgrounds.encoders.ImageScanner.WORK_INTERVAL, v4); v4.interval = v6; }; v2.doEncode = function (state) { var v3 = getTimer(); for (;;) { if (!(state.y < state.source.height && getTimer() - v3 < com.newgrounds.encoders.ImageScanner.WORK_INTERVAL)) break; state.output += this.encodePixel(state.source.getPixel32(state.x, state.y)); ++state.x; if (state.x == state.source.width) { state.x = 0; ++state.y; } } if (state.y == state.source.height) { clearInterval(state.interval); state.callbackFunction.call(state.callbackObject, state.output); } }; v2.doDecode = function (state) { var v4 = getTimer(); for (;;) { if (!(state.y < state.output.height && getTimer() - v4 < com.newgrounds.encoders.ImageScanner.WORK_INTERVAL)) break; var v3 = this.decodePixel(state.source.substr(state.i, this._charsPerPixel)); state.output.setPixel32(state.x, state.y, v3); state.i += this._charsPerPixel; ++state.x; if (state.x == state.output.width) { state.x = 0; ++state.y; } } if (state.y == state.output.height) { clearInterval(state.interval); state.callbackFunction.call(state.callbackObject, state.output); } }; v2.encodePixel = function (pixel) { var v3 = pixel >> 24 & 255; var v4 = pixel >> 16 & 255; var v5 = pixel >> 8 & 255; var v2 = pixel & 255; v3 = int((v3 / 256) * this._maxPerChannel); v4 = int((v4 / 256) * this._maxPerChannel); v5 = int((v5 / 256) * this._maxPerChannel); v2 = int((v2 / 256) * this._maxPerChannel); var v7 = v4 * this._maxPerChannel * this._maxPerChannel + v5 * this._maxPerChannel + v2; if (this._encodeAlpha) { v7 += v3 * this._maxPerChannel * this._maxPerChannel * this._maxPerChannel; } return this._baseN.encodeUint(v7, this._charsPerPixel); }; v2.decodePixel = function (encodedPixel) { var v3 = 255; var v5; var v6; var v4; var v7 = 0; var v2 = this._baseN.decodeUint(encodedPixel); v4 = v2 % this._maxPerChannel; v2 /= int(this._maxPerChannel); v6 = v2 % this._maxPerChannel; v2 /= int(this._maxPerChannel); v5 = v2 % this._maxPerChannel; v2 /= int(this._maxPerChannel); if (this._encodeAlpha) { v3 = v2 % this._maxPerChannel; v2 /= int(this._maxPerChannel); } return v3 << 24 | v5 << 16 | v6 << 8 | v4; }; v1.DEFAULT_HASH = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&'; v2._hash = com.newgrounds.encoders.ImageScanner.DEFAULT_HASH; v2._charsPerPixel = 2; v1.WORK_INTERVAL = 33.33333333333334; v2.addProperty('encodeAlpha', v2.__get__encodeAlpha, v2.__set__encodeAlpha); ASSetPropFlags(com.newgrounds.encoders.ImageScanner.prototype, null, 1); } #endinitclip } movieClip 76 __Packages.com.newgrounds.SaveFile { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.SaveFile) { var v1 = function (group) { super(); this._iconLoader = new com.newgrounds.BitmapLoader(com.newgrounds.SaveFile.DEFAULT_ICON, null); this._group = group; this._keys = {}; this._ratings = {}; this._numVotes = {}; }; com.newgrounds.SaveFile = v1; com.newgrounds.SaveFile extends com.newgrounds.APIEventDispatcher; var v2 = v1.prototype; v1.__get__currentFile = function () { return com.newgrounds.SaveFile._currentFile; }; v1.fromObject = function (group, fileData) { var v3 = new com.newgrounds.SaveFile(group); v3._name = fileData.filename; v3._description = fileData.description; v3._id = fileData.save_id; v3._authorId = fileData.user_id; v3._authorName = fileData.user_name; v3._createdDate = fileData.created; v3._modifiedDate = fileData.last_update; v3._views = fileData.views; if (fileData.thumb && fileData.thumb != '') { v3._iconLoader.__set__url(com.newgrounds.SaveFile._imageFilePath + fileData.thumb); } v3._dataURL = com.newgrounds.SaveFile._saveFilePath + fileData.file; v3._fileSize = fileData.file_size; v3._approved = fileData.status != com.newgrounds.SaveFile.STATUS_UNAPPROVED; v3._readOnly = false; v3._public = fileData.status != com.newgrounds.SaveFile.STATUS_PRIVATE && fileData.status != com.newgrounds.SaveFile.STATUS_UNAPPROVED; for (var v8 in fileData.keys) { var v6 = fileData.keys[v8]; var v4 = group.getKeyById(v6.id); if (v4) { v3._keys[v4.__get__name()] = v4.validateValue(v6.value); } } for (var v9 in fileData.ratings) { var v5 = fileData.ratings[v9]; var v2 = group.getRatingById(v5.id); if (v2) { v3._ratings[v2.__get__name()] = v2.validateValue(v5.score); v3._numVotes[v2.__get__name()] = int(v5.votes); } } return v3; }; v2.__get__group = function () { return this._group; }; v2.__get__name = function () { return this._name; }; v2.__set__name = function (val) { this._name = val; return this.__get__name(); }; v2.__get__description = function () { return this._description; }; v2.__set__description = function (val) { this._description = val; return this.__get__description(); }; v2.__get__id = function () { return this._id; }; v2.__get__data = function () { return this._data; }; v2.__set__data = function (val) { this._data = val; return this.__get__data(); }; v2.__get__bytesLoaded = function () { if (this._data) { return this.__get__bytesTotal(); } else { if (!this._dataLoader) { return 0; } else { return this._dataLoader.getBytesLoaded(); } } }; v2.__get__bytesTotal = function () { return this._fileSize; }; v2.__get__readOnly = function () { return this._readOnly; }; v2.__get__draft = function () { return this._draft; }; v2.__set__draft = function (v) { this._draft = v; return this.__get__draft(); }; v2.__get__authorId = function () { return this._authorId; }; v2.__get__authorName = function () { return this._authorName; }; v2.__get__keys = function () { return this._keys; }; v2.__get__ratings = function () { return this._ratings; }; v2.__get__numVotes = function () { return this._numVotes; }; v2.__get__views = function () { return this._views; }; v2.__get__createdDate = function () { return this._createdDate; }; v2.__get__updatedDate = function () { return this._modifiedDate; }; v2.toString = function () { return 'Save File: ' + this._name; }; v2.__get__icon = function () { return this._iconLoader.__get__bitmapData(); }; v2.__set__icon = function (v) { this.createIcon(v); return this.__get__icon(); }; v2.__get__iconLoaded = function () { return this._iconLoader.__get__loaded(); }; v2.createIcon = function (source) { var v9 = new flash.display.BitmapData(com.newgrounds.SaveFile.ICON_WIDTH, com.newgrounds.SaveFile.ICON_HEIGHT, false, 0); var v7; var v6; var v10 = 0; var v8 = 0; if (source instanceof flash.display.BitmapData) { v7 = source.width; v6 = source.height; } else { if (source instanceof MovieClip) { var v2 = (MovieClip(source)).getBounds(source); v7 = v2.xMax - v2.xMin; v6 = v2.yMax - v2.yMin; v10 = v2.xMin; v8 = v2.yMin; } } var v4 = new flash.geom.Matrix(); var v5; v5 = Math.min(com.newgrounds.SaveFile.ICON_WIDTH / v7, com.newgrounds.SaveFile.ICON_HEIGHT / v6); v4.translate(-v10, -v8); v4.scale(v5, v5); v4.translate((com.newgrounds.SaveFile.ICON_WIDTH - v7 * v5) / 2, (com.newgrounds.SaveFile.ICON_HEIGHT - v6 * v5) / 2); v9.draw(source, v4); this._iconLoader.__set__bitmapData(v9); }; v2.attachIcon = function (parent) { if (this._iconLoader) { return this._iconLoader.attachBitmap(parent); } com.newgrounds.Logger.logError('No icon available for this sumbission.'); return null; }; v2.deleteFile = function () { if (!(this._group.__get__connection()).__get__hasUserSession()) { com.newgrounds.Logger.logError('The user must be logged-in to delete a file.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN)); return undefined; } if (!this._id) { com.newgrounds.Logger.logError('The file does not exist.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN)); return undefined; } var v2 = new com.newgrounds.APICommand('deleteSaveFile'); (v2.__get__secureParameters()).save_id = this._id; v2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {'target': this, 'func': this.onFileDeleted}); (this._group.__get__connection()).sendCommand(v2); }; v2.save = function () { if (!(this._group.__get__connection()).__get__hasUserSession()) { com.newgrounds.Logger.logError('The user must be logged-in to save a file.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN)); return undefined; } ++com.newgrounds.BitmapLoader._cacheSeed; com.newgrounds.SaveFile._currentFile = this; if (this.__get__iconLoaded()) { com.newgrounds.SaveFile.ICON_IMAGE_SCANNER.encode(this.__get__icon(), this.onIconEncoded, this); } else { this.encodeData(true); } }; v2.onIconEncoded = function (encodedIcon) { this._encodedIcon = encodedIcon; this.encodeData(true); }; v2.doSave = function () { var v4 = new com.newgrounds.APICommand('saveFile'); (v4.__get__secureParameters()).group = this._group.id; (v4.__get__secureParameters()).user_name = (this._group.__get__connection()).username; (v4.__get__secureParameters()).filename = this._name; (v4.__get__secureParameters()).description = this._description; if (this._draft) { (v4.__get__secureParameters()).draft = true; } if (this._id && !this._readOnly) { (v4.__get__secureParameters()).overwrite = 1; (v4.__get__secureParameters()).save_id = this._id; } var v8 = []; for (var v9 in this._keys) { var v2 = this._group.getKey(v9); if (v2) { v8.push({'id': v2.__get__id(), 'value': v2.validateValue(this._keys[v9])}); } else { com.newgrounds.Logger.logError('No key named "' + v9 + '" in save group "' + this._group.__get__name() + '".'); } } (v4.__get__secureParameters()).keys = v8; var v7 = []; for (var v10 in this._ratings) { var v3 = this._group.getRating(v10); if (v3) { v7.push({'id': v3.__get__id(), 'value': v3.validateValue(this._ratings[v10])}); } else { com.newgrounds.Logger.logError('No rating named "' + v10 + '" in save group "' + this._group.__get__name() + '".'); } } (v4.__get__secureParameters()).ratings = v7; if (typeof this._encodedData == 'string') { v4.addFile('file', this._encodedData, 'file'); } else { v4.addFile('file', com.newgrounds.encoders.json.JSON.encode(this._encodedData), 'file'); } if (this.__get__iconLoaded()) { v4.addFile('thumbnail', this._encodedIcon, 'thumbnail'); } v4.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {'target': this, 'func': this.onSaveComplete}); (this._group.__get__connection()).sendCommand(v4); }; v2.encodeData = function (encode) { this._encoderQueue = []; this._encoding = encode; if (encode) { this._encodedData = this._data; this.preEncodeObject(this, '_encodedData'); } else { this.preEncodeObject(this, '_data'); } this.encodeObject(); }; v2.preEncodeObject = function (parent, property) { var v3 = parent[property]; var v5; try { if (this._encoding) { v5 = v3 instanceof flash.display.BitmapData; } else { v5 = v3.type == '__bitmap'; } } var v2 = v3; var v8; if (v5) { this._encoderQueue.push({'parent': parent, 'property': property}); } else { if (typeof v3 == 'object' && !v8) { if (this._encoding) { if (v3 instanceof Array) { v2 = []; } else { v2 = {}; } for (var v4 in v3) { v2[v4] = v3[v4]; } parent[property] = v2; } for (v4 in v2) { this.preEncodeObject(v2, v4); } } } }; v2.encodeObject = function () { if (!this._encoderQueue.length) { if (this._encoding) { this.doSave(); } else { this._dataLoaded = true; this.checkLoadComplete(); } return undefined; } var v6 = this._encoderQueue.pop(); var v4 = v6.parent; var v3 = v6.property; var v2 = v4[v3]; var v5; if (this._encoding) { v5 = {'type': '__bitmap', 'width': v2.width, 'height': v2.height, 'transparent': v2.transparent}; v4[v3] = v5; this._encodingParent = v5; this._encodingProperty = 'data'; com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.__set__encodeAlpha(v2.transparent); com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.encode(flash.display.BitmapData(v2), this.encodeBitmapComplete, this); } else { this._encodingParent = v4; this._encodingProperty = v3; com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.__set__encodeAlpha(v2.transparent); com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.decode(String(v2.data), this.encodeBitmapComplete, this); } }; v2.encodeBitmapComplete = function (data) { this._encodingParent[this._encodingProperty] = data; this.encodeObject(); }; v2.load = function () { com.newgrounds.SaveFile._currentFile = this; this._dataLoaded = false; this._data = null; if (!this.__get__iconLoaded()) { this._iconLoader.addEventListener(com.newgrounds.APIEvent.ICON_LOADED, {'target': this, 'func': this.onIconLoaded}); this._iconLoader.load(); } this._dataLoader = new LoadVars(); var file = this; this._dataLoader.onData = function (data) { file.onDataLoaded(data); }; this._dataLoader.load(this._dataURL + '&random=' + Math.random()); }; v2.onIconLoaded = function (event) { if (!event.__get__success() && this._iconLoader.__get__url()) { com.newgrounds.Logger.logWarning('Unable to load the icon for this save file.'); } this._iconLoader.removeEventListener(com.newgrounds.APIEvent.ICON_LOADED, this.onIconLoaded); this.checkLoadComplete(); }; v2.checkLoadComplete = function () { if (this._dataLoaded && this.__get__iconLoaded()) { com.newgrounds.Logger.logMessage('Data loaded.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this)); } }; v2.onDataLoaded = function (data) { try { if (data) { if (data.charAt(0) == '{') { this._data = com.newgrounds.encoders.json.JSON.decode(String(data)); } else { this._data = String(data); } this.encodeData(false); } } catch (v0) { if (Error(v0) != null) { var error = Error(v0); com.newgrounds.Logger.logError('Error while loading data:', error); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE)); } else { throw v0; } } }; v2.onDataError = function (error) { com.newgrounds.Logger.logError('Unable to load data:', error); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE)); }; v2.onSaveComplete = function (event) { if (event.__get__success()) { com.newgrounds.Logger.logMessage('File "' + this._name + '" saved!'); if (event.__get__data()) { this._id = (event.__get__data()).save_id; this._dataURL = unescape((event.__get__data()).file_url); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this)); } else { com.newgrounds.Logger.logError('Error saving file "' + this._name + '":', event.__get__error()); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this, event.__get__error())); } }; v2.sendVote = function (ratingName, vote) { var v2 = this._group.getRating(ratingName); if (!v2) { com.newgrounds.Logger.logError('No save rating named "' + ratingName + '" exists for this save group.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT)); return undefined; } vote = v2.validateValue(vote); if (isNaN(vote)) { com.newgrounds.Logger.logError('Invalid vote (' + vote + '). ' + ratingName + ' allows a range of ' + v2.__get__minimum() + '-' + v2.__get__maximum() + '.'); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT)); return undefined; } com.newgrounds.Logger.logMessage('Voting ' + vote + ' for ' + ratingName + ' on ' + this._name + '...'); (this._group.__get__connection()).sendSimpleCommand('rateSaveFile', {'target': this, 'func': this.onVoteComplete}, null, {'group': this._group.__get__id(), 'save_id': this._id, 'rating_id': v2.__get__id(), 'vote': vote}); }; v2.onVoteComplete = function (event) { var v2 = event.__get__error(); if ((event.__get__data()).already_voted) { com.newgrounds.Logger.logError('Vote failed. You\'ve already voted on this rating today.'); v2 = com.newgrounds.APIEvent.ERROR_ALREADY_VOTED; } if (v2 == com.newgrounds.APIEvent.ERROR_NONE) { var v3 = this._group.getRatingById((event.__get__data()).rating_id); if (v3) { this._ratings[v3.__get__name()] = v3.validateValue((event.__get__data()).score); } com.newgrounds.Logger.logMessage('Vote complete!'); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, this, v2)); }; v2.onFileDeleted = function (event) { if (event.__get__success()) { this._id = 0; } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, this, event.__get__error())); }; v2.clone = function () { var v3 = new com.newgrounds.SaveFile(this._group); v3._data = this._data; v3._description = this._description; v3._draft = this._draft; v3._fileSize = this._fileSize; v3._iconLoader.__set__bitmapData(this._iconLoader.bitmapData); var v2; for (v2 in this._keys) { v3._keys[v2] = this._keys[v2]; } for (v2 in this._ratings) { v3._ratings[v2] = this._ratings[v2]; } for (v2 in this._numVotes) { v3._numVotes[v2] = this._numVotes[v2]; } v3._name = this._name; return v3; }; v1.ICON_WIDTH = 90; v1.ICON_HEIGHT = 90; v1.DEFAULT_ICON = new flash.display.BitmapData(com.newgrounds.SaveFile.ICON_WIDTH, com.newgrounds.SaveFile.ICON_HEIGHT, false, 0); v1.STATUS_PRIVATE = 0; v1.STATUS_SHARED = 1; v1.STATUS_UNAPPROVED = 2; v1.STATUS_APPROVED = 3; v1._imageFilePath = ''; v1._saveFilePath = ''; v1.ICON_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(); v1.DATA_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(64, 6); v2.addProperty('authorId', v2.__get__authorId, function () {}); v2.addProperty('authorName', v2.__get__authorName, function () {}); v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {}); v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {}); v2.addProperty('createdDate', v2.__get__createdDate, function () {}); v1.addProperty('currentFile', v1.__get__currentFile, function () {}); v2.addProperty('data', v2.__get__data, v2.__set__data); v2.addProperty('description', v2.__get__description, v2.__set__description); v2.addProperty('draft', v2.__get__draft, v2.__set__draft); v2.addProperty('group', v2.__get__group, function () {}); v2.addProperty('icon', v2.__get__icon, v2.__set__icon); v2.addProperty('iconLoaded', v2.__get__iconLoaded, function () {}); v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('keys', v2.__get__keys, function () {}); v2.addProperty('name', v2.__get__name, v2.__set__name); v2.addProperty('numVotes', v2.__get__numVotes, function () {}); v2.addProperty('ratings', v2.__get__ratings, function () {}); v2.addProperty('readOnly', v2.__get__readOnly, function () {}); v2.addProperty('updatedDate', v2.__get__updatedDate, function () {}); v2.addProperty('views', v2.__get__views, function () {}); ASSetPropFlags(com.newgrounds.SaveFile.prototype, null, 1); } #endinitclip } movieClip 74 __Packages.com.newgrounds.SaveGroup { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.SaveGroup) { var v1 = function (connection, name, id, type, keys, ratings) { this._connection = connection; this._id = id; this._name = name; this._type = type; this._keysArray = keys; this._ratingsArray = ratings; this._keys = new Object(); this._ratings = new Object(); var v11; for (var v7 in keys) { var v2 = keys[v7]; this._keys[v2.__get__name()] = v2; } for (var v6 in ratings) { var v3 = ratings[v6]; this._ratings[v3.__get__name()] = v3; } }; com.newgrounds.SaveGroup = v1; var v2 = v1.prototype; v2.__get__connection = function () { return this._connection; }; v2.__get__name = function () { return this._name; }; v2.__get__type = function () { return this._type; }; v2.__get__id = function () { return this._id; }; v2.__get__keys = function () { return this._keysArray; }; v2.__get__ratings = function () { return this._ratingsArray; }; v2.getKey = function (name) { return this._keys[name]; }; v2.getRating = function (name) { return this._ratings[name]; }; v2.getKeyById = function (id) { for (var v4 in this._keys) { var v2 = this._keys[v4]; if (v2.__get__id() == id) { return v2; } } return null; }; v2.getRatingById = function (id) { for (var v4 in this._ratings) { var v2 = this._ratings[v4]; if (v2.__get__id() == id) { return v2; } } return null; }; v2.toString = function () { return 'SaveGroup: ' + this.__get__name() + ' Keys: ' + this._keysArray + ' Ratings: ' + this._ratingsArray; }; v1.TYPE_SYSTEM = 0; v1.TYPE_PRIVATE = 1; v1.TYPE_PUBLIC = 2; v1.TYPE_MODERATED = 3; v2.addProperty('connection', v2.__get__connection, function () {}); v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('keys', v2.__get__keys, function () {}); v2.addProperty('name', v2.__get__name, function () {}); v2.addProperty('ratings', v2.__get__ratings, function () {}); v2.addProperty('type', v2.__get__type, function () {}); ASSetPropFlags(com.newgrounds.SaveGroup.prototype, null, 1); } #endinitclip } movieClip 72 __Packages.com.newgrounds.SaveKey { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.SaveKey) { var v1 = function (name, id, type) { this._name = name; this._id = id; this._type = type; }; com.newgrounds.SaveKey = v1; var v2 = v1.prototype; v2.__get__name = function () { return this._name; }; v2.__get__id = function () { return this._id; }; v2.__get__type = function () { return this._type; }; v2.validateValue = function (value) { switch (this._type) { return null; case com.newgrounds.SaveKey.TYPE_INTEGER: value = Number(value); if (!isNaN(value)) { var v3 = int(value); if (v3 != value) { com.newgrounds.Logger.logWarning('Float value ' + value + ' given for integer key "' + this._name + '". Clamping to ' + v3 + '.'); } return v3; } return null; case com.newgrounds.SaveKey.TYPE_FLOAT: value = Number(value); if (!isNaN(value)) { return isNaN(Number(value)); } return null; case com.newgrounds.SaveKey.TYPE_BOOLEAN: return Boolean(value) && int(value) != 0; return null; case com.newgrounds.SaveKey.TYPE_STRING: return value ? value.toString() : ''; return null; } return null; }; v2.toString = function () { return this._name; }; v1.TYPE_FLOAT = 1; v1.TYPE_INTEGER = 2; v1.TYPE_STRING = 3; v1.TYPE_BOOLEAN = 4; v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('name', v2.__get__name, function () {}); v2.addProperty('type', v2.__get__type, function () {}); ASSetPropFlags(com.newgrounds.SaveKey.prototype, null, 1); } #endinitclip } movieClip 73 __Packages.com.newgrounds.SaveRating { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.SaveRating) { var v1 = function (name, id, isFloat, minimum, maximum) { this._name = name; this._id = id; this._isFloat = isFloat; this._minimum = minimum; this._maximum = maximum; }; com.newgrounds.SaveRating = v1; var v2 = v1.prototype; v2.__get__name = function () { return this._name; }; v2.__get__id = function () { return this._id; }; v2.__get__isFloat = function () { return this._isFloat; }; v2.__get__minimum = function () { return this._minimum; }; v2.__get__maximum = function () { return this._maximum; }; v2.validateValue = function (value) { var v2 = Number(value); if (isNaN(v2)) { com.newgrounds.Logger.logError('Invalid value for rating "' + this._name + '".'); return NaN; } if (v2 < this._minimum) { com.newgrounds.Logger.logWarning(v2 + ' is out of acceptable range for rating "' + this._name + '". Clamping to ' + this._minimum + '.'); return this._minimum; } if (v2 > this._maximum) { com.newgrounds.Logger.logWarning(v2 + ' is out of acceptable range for rating "' + this._name + '". Clamping to ' + this._maximum + '.'); return this._maximum; } if (!this.__get__isFloat()) { var v3 = int(v2); if (v3 != v2) { com.newgrounds.Logger.logWarning('Float value ' + v2 + ' given for integer rating "' + this._name + '". Clamping to ' + v3 + '.'); } return v3; } return v2; }; v2.toString = function () { return this._name; }; v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('isFloat', v2.__get__isFloat, function () {}); v2.addProperty('maximum', v2.__get__maximum, function () {}); v2.addProperty('minimum', v2.__get__minimum, function () {}); v2.addProperty('name', v2.__get__name, function () {}); ASSetPropFlags(com.newgrounds.SaveRating.prototype, null, 1); } #endinitclip } movieClip 68 __Packages.com.newgrounds.BitmapLoader { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.BitmapLoader) { var v1 = function (defaultBitmap, url) { super(); this._bitmapData = defaultBitmap; this._url = url; }; com.newgrounds.BitmapLoader = v1; com.newgrounds.BitmapLoader extends com.newgrounds.APIEventDispatcher; var v2 = v1.prototype; v2.__get__url = function () { return this._url; }; v2.__set__url = function (v) { this._loaded = false; this._url = v; return this.__get__url(); }; v2.__get__bitmapData = function () { return this._bitmapData; }; v2.__set__bitmapData = function (v) { this._bitmapData = v; this._loaded = true; return this.__get__bitmapData(); }; v2.__get__loaded = function () { return this._loaded; }; v2.disposeLoader = function () { if (this._loader) { if (this._loaderClip._parent == _root) { this._loader.unloadClip(this._loaderClip.bitmap); this._loaderClip.removeMovieClip(); } this._loader = null; this._loaderClip = null; } }; v2.load = function () { if (!this._url || this._url == '') { this.onLoadComplete(); return undefined; } this._loaded = false; if (this._bitmapData) { this._bitmapData.dispose(); this._bitmapData = null; } this.disposeLoader(); this.attachBitmap(null); }; v2.attachBitmap = function (parent) { if (!parent) { parent = _root; } var v5 = parent.getNextHighestDepth(); var v3 = parent.createEmptyMovieClip('__bitmap' + v5, v5); if (!this._loaded && this._url && this._url != '') { v3.createEmptyMovieClip('bitmap', 0); this._loader = new MovieClipLoader(); this._loaderClip = v3; if (parent == _root) { this._loaderClip._visible = false; } var thisObj = this; this._loaderClip.onEnterFrame = function () { thisObj.pollLoad(); }; this._loader.addListener({'onLoadError': function () { thisObj.onLoadComplete(); }}); this._loader.loadClip(this._url, v3.bitmap); return v3; } v3.attachBitmap(this._bitmapData, 0); return v3; }; v2.pollLoad = function () { if (this._loaderClip._width) { this.onLoadComplete(); } }; v2.onLoadComplete = function () { var v2; if (this._loader && this._loaderClip && this._loaderClip._width) { try { this._loaderClip.onEnterFrame = null; v2 = new flash.display.BitmapData(this._loaderClip._width, this._loaderClip._height, true, 0); v2.draw(this._loaderClip); this._bitmapData = v2; this._loaded = true; } catch (error) { if (v2) { v2.dispose(); } } } this.disposeLoader(); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.ICON_LOADED, this, this._loaded ? null : com.newgrounds.APIEvent.ERROR_BAD_FILE)); }; v1._cacheSeed = 0; v2._loaded = true; v2.addProperty('bitmapData', v2.__get__bitmapData, v2.__set__bitmapData); v2.addProperty('loaded', v2.__get__loaded, function () {}); v2.addProperty('url', v2.__get__url, v2.__set__url); ASSetPropFlags(com.newgrounds.BitmapLoader.prototype, null, 1); } #endinitclip } movieClip 77 __Packages.com.newgrounds.SaveQuery { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.SaveQuery) { var v1 = function (group) { super(); this._group = group; this._connection = group.connection; this.reset(); }; com.newgrounds.SaveQuery = v1; com.newgrounds.SaveQuery extends com.newgrounds.APIEventDispatcher; var v2 = v1.prototype; v2.__get__group = function () { return this._group; }; v2.__get__resultsPerPage = function () { return this._resultsPerPage; }; v2.__set__resultsPerPage = function (val) { this._resultsPerPage = Math.min(Math.max(val, 1), 100); return this.__get__resultsPerPage(); }; v2.__get__page = function () { return this._page; }; v2.__set__page = function (val) { this._page = Math.max(val, 1); return this.__get__page(); }; v2.prevPage = function () { this.__set__page(this.__get__page() - 1); }; v2.nextPage = function () { this.__set__page(this.__get__page() + 1); }; v2.__get__isRandomized = function () { return this._isRandomized; }; v2.__set__isRandomized = function (val) { this._isRandomized = val; return this.__get__isRandomized(); }; v2.__get__files = function () { return this._files; }; v2.reset = function () { this._page = 1; this._resultsPerPage = 10; this._isRandomized = false; this._lookupKeys = []; this._lookupRatings = []; this._fileConditions = []; this._keyConditions = []; this._ratingConditions = []; this._sortFields = []; this._files = []; this.includeAllFields(); }; v2.clone = function () { var v2 = new com.newgrounds.SaveQuery(this._group); v2._page = this._page; v2._resultsPerPage = this._resultsPerPage; v2._isRandomized = this._isRandomized; v2._lookupKeys = this._lookupKeys.concat(); v2._lookupRatings = this._lookupRatings.concat(); v2._fileConditions = this._fileConditions.concat(); v2._keyConditions = this._keyConditions.concat(); v2._ratingConditions = this._ratingConditions.concat(); return v2; }; v2.includeAllFields = function () { for (var v5 in this._group.__get__keys()) { var v2 = (this._group.__get__keys())[v5]; this._lookupKeys.push(v2.__get__id()); } for (var v4 in this._group.__get__ratings()) { var v3 = (this._group.__get__ratings())[v4]; this._lookupRatings.push(v3.__get__id()); } }; v2.addCondition = function (field, operator, value) { var v2; v2 = 0; while (v2 < com.newgrounds.SaveQuery.FILE_FIELDS.length) { if (com.newgrounds.SaveQuery.FILE_FIELDS[v2] == field) { break; } ++v2; } if (v2 == com.newgrounds.SaveQuery.FILE_FIELDS.length) { v2 = -1; } if (v2 >= 0) { this._fileConditions.push({'field': v2, 'operator': operator, 'value': value}); } else { var v4 = this._group.getKey(field); if (v4) { value = v4.validateValue(value); this._keyConditions.push({'key_id': v4.__get__id(), 'operator': operator, 'value': value}); return undefined; } var v3 = field.split('.'); var v6 = this._group.getRating(v3[0]); if (v6) { if (v3[1] != 'votes') { value = v6.validateValue(value); } this._ratingConditions.push({'rating_id': v6.__get__id(), 'operator': operator, 'value': value, 'column': v3[1] ? v3[1] : 'score'}); return undefined; } com.newgrounds.Logger.logError('The save group "' + this._group.__get__name() + '" does not have a field named "' + field + '".'); } }; v2.sortOn = function (field, sortDescending) { if (sortDescending == undefined) { sortDescending = false; } var v2; v2 = 0; while (v2 < com.newgrounds.SaveQuery.FILE_FIELDS.length) { if (com.newgrounds.SaveQuery.FILE_FIELDS[v2] == field) { break; } ++v2; } if (v2 == com.newgrounds.SaveQuery.FILE_FIELDS.length) { v2 = -1; } if (v2 >= 0) { this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_FILES, 'field': v2, 'desc': sortDescending}); } else { var v5 = this._group.getKey(field); if (v5) { this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_KEYS, 'field': v5.__get__id(), 'desc': sortDescending}); return undefined; } var v3 = field.split('.'); var v6 = this._group.getRating(v3[0]); if (v6) { this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_RATINGS, 'field': v6.__get__id(), 'desc': sortDescending, 'extra': v3[1] ? v3[1] : 'score'}); return undefined; } com.newgrounds.Logger.logError('The save group "' + this._group.__get__name() + '" does not have a field named "' + field + '".'); } }; v2.execute = function () { var v5 = {}; v5.page = this._page; v5.num_results = this._resultsPerPage; if (this._isRandomized) { v5.randomize = 1; } if (this._lookupKeys && this._lookupKeys.length) { v5.lookup_keys = this._lookupKeys; } if (this._lookupRatings && this._lookupRatings.length) { v5.lookup_ratings = this._lookupRatings; } if (this._fileConditions && this._fileConditions.length) { v5.file_conditions = this._fileConditions; } if (this._keyConditions && this._keyConditions.length) { v5.key_conditions = this._keyConditions; } if (this._ratingConditions && this._ratingConditions.length) { v5.rating_conditions = this._ratingConditions; } if (this._sortFields && this._sortFields.length) { v5.sort_conditions = this._sortFields; } this._connection.sendSimpleCommand('lookupSaveFiles', {'target': this, 'func': this.onQueryComplete}, {'publisher_id': this._connection.publisherId, 'group_id': this._group.__get__id(), 'query': v5}); }; v2.onQueryComplete = function (event) { if (event.__get__success()) { var v4 = event.__get__data(); this._files = []; if (v4.files) { var v2 = 0; while (v2 < v4.files.length) { var v3 = com.newgrounds.SaveFile.fromObject(this._group, v4.files[v2]); if (v3) { this._files.push(v3); } ++v2; } } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this)); } else { com.newgrounds.Logger.logError('Query failed: ' + event.__get__error()); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this, event.__get__error())); } }; v1.FILE_ID = 'fileId'; v1.AUTHOR_ID = 'authorId'; v1.AUTHOR_NAME = 'authorName'; v1.FILE_NAME = 'fileName'; v1.CREATED_ON = 'createdOn'; v1.UPDATED_ON = 'updatedOn'; v1.FILE_VIEWS = 'fileViews'; v1.FILE_STATUS = 'fileStatus'; v1.FILE_FIELDS = [com.newgrounds.SaveQuery.FILE_ID, com.newgrounds.SaveQuery.AUTHOR_ID, com.newgrounds.SaveQuery.AUTHOR_NAME, com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.CREATED_ON, com.newgrounds.SaveQuery.UPDATED_ON, com.newgrounds.SaveQuery.FILE_VIEWS, com.newgrounds.SaveQuery.FILE_STATUS]; v1.OPERATOR_EQUAL = '='; v1.OPERATOR_LESS_THAN = '<'; v1.OPERATOR_GREATER_THAN = '>'; v1.OPERATOR_NOT_EQUAL = '!='; v1.OPERATOR_LESS_OR_EQUAL = '<='; v1.OPERATOR_GREATER_OR_EQUAL = '>='; v1.OPERATOR_CONTAINS = '*'; v1.OPERATOR_NOT_CONTAINS = '!*'; v1.OPERATOR_NOT_BEGINS_WITH = '!*='; v1.OPERATOR_NOT_ENDS_WITH = '!=*'; v1.OPERATOR_BEGINS_WITH = '*='; v1.OPERATOR_ENDS_WITH = '=*'; v1.TABLE_FILES = 1; v1.TABLE_KEYS = 2; v1.TABLE_RATINGS = 3; v2._page = 1; v2._resultsPerPage = 10; v2._isRandomized = false; v2.addProperty('files', v2.__get__files, function () {}); v2.addProperty('group', v2.__get__group, function () {}); v2.addProperty('isRandomized', v2.__get__isRandomized, v2.__set__isRandomized); v2.addProperty('page', v2.__get__page, v2.__set__page); v2.addProperty('resultsPerPage', v2.__get__resultsPerPage, v2.__set__resultsPerPage); ASSetPropFlags(com.newgrounds.SaveQuery.prototype, null, 1); } #endinitclip } movieClip 69 __Packages.com.newgrounds.Medal { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.Medal) { var v1 = function (connection, id, name, description, secret, unlocked, value, difficultyId, iconURL) { super(); this._connection = connection; this._id = id; this._name = name; this._description = description; this._secret = secret; this._unlocked = unlocked; this._value = value; this._difficulty = com.newgrounds.Medal.DIFFICULTIES[difficultyId]; this._iconLoader = new com.newgrounds.BitmapLoader(com.newgrounds.Medal.DEFAULT_ICON, iconURL); this._iconLoader.load(); }; com.newgrounds.Medal = v1; com.newgrounds.Medal extends com.newgrounds.APIEventDispatcher; var v2 = v1.prototype; v2.__get__difficulty = function () { return this._difficulty; }; v2.__get__icon = function () { return this._iconLoader.__get__bitmapData(); }; v2.__get__id = function () { return this._id; }; v2.__get__name = function () { return this._name; }; v2.__get__description = function () { return this._description; }; v2.__get__secret = function () { return this._secret; }; v2.__get__unlocked = function () { return this._unlocked; }; v2.__get__value = function () { return this._value; }; v2.toString = function () { if (!this._unlocked) { return 'Medal: ' + this._name + '\t\t(' + 'locked, ' + this._value + 'pts, ' + this._difficulty + ')'; } return 'Medal: ' + this._name + '\t\t(' + 'unlocked, ' + this._value + 'pts, ' + this._difficulty + ')'; }; v2.attachIcon = function (parent) { return this._iconLoader.attachBitmap(parent); }; v2.unlock = function () { if (this._unlocked) { com.newgrounds.Logger.logWarning('Medal "' + this._name + '" is already unlocked.'); return undefined; } com.newgrounds.Logger.logMessage('Unlocking medal "' + this.__get__name() + '"...'); this._unlocked = true; if (this._connection.__get__hasUserSession()) { this._connection.sendSimpleCommand('unlockMedal', {'target': this, 'func': this.onUnlockConfirmed}, null, {'medal_id': this.__get__id()}); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCKED, this)); }; v2.setUnlocked = function (unlocked) { this._unlocked = unlocked; }; v2.onUnlockConfirmed = function (event) { if (event.__get__success()) { com.newgrounds.Logger.logMessage('Medal "' + this.__get__name() + '" unlocked.'); } else { com.newgrounds.Logger.logError('Failed to unlock "' + this.__get__name() + '"!'); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, this, event.__get__error())); }; v1.ICON_WIDTH = 50; v1.ICON_HEIGHT = 50; v1.DEFAULT_ICON = flash.display.BitmapData.loadBitmap('DefaultMedalIcon'); v1.DIFFICULTY_EASY = 'Easy'; v1.DIFFICULTY_MODERATE = 'Moderate'; v1.DIFFICULTY_CHALLENGING = 'Challenging'; v1.DIFFICULTY_DIFFICULT = 'Difficult'; v1.DIFFICULTY_BRUTAL = 'Brutal'; v1.DIFFICULTIES = ['Unknown', com.newgrounds.Medal.DIFFICULTY_EASY, com.newgrounds.Medal.DIFFICULTY_MODERATE, com.newgrounds.Medal.DIFFICULTY_CHALLENGING, com.newgrounds.Medal.DIFFICULTY_DIFFICULT, com.newgrounds.Medal.DIFFICULTY_BRUTAL]; v2.addProperty('description', v2.__get__description, function () {}); v2.addProperty('difficulty', v2.__get__difficulty, function () {}); v2.addProperty('icon', v2.__get__icon, function () {}); v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('name', v2.__get__name, function () {}); v2.addProperty('secret', v2.__get__secret, function () {}); v2.addProperty('unlocked', v2.__get__unlocked, function () {}); v2.addProperty('value', v2.__get__value, function () {}); ASSetPropFlags(com.newgrounds.Medal.prototype, null, 1); } #endinitclip } movieClip 71 __Packages.com.newgrounds.ScoreBoard { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.ScoreBoard) { var v1 = function (connection, name, id) { super(); this._connection = connection; this._name = name; this._id = id; }; com.newgrounds.ScoreBoard = v1; com.newgrounds.ScoreBoard extends com.newgrounds.APIEventDispatcher; var v2 = v1.prototype; v2.__get__name = function () { return this._name; }; v2.__get__scores = function () { return this._scores; }; v2.__get__period = function () { return this._period; }; v2.__set__period = function (val) { this._period = val; return this.__get__period(); }; v2.__get__firstResult = function () { return this._firstResult; }; v2.__set__firstResult = function (val) { this._firstResult = Math.max(1, val); return this.__get__firstResult(); }; v2.__get__numResults = function () { return this._numResults; }; v2.__set__numResults = function (val) { this._numResults = val; return this.__get__numResults(); }; v2.__get__tag = function () { return this._tag; }; v2.__set__tag = function (val) { this._tag = val; return this.__get__tag(); }; v2.__get__page = function () { return Math.ceil((this._firstResult - 1) / this._numResults) + 1; }; v2.prevPage = function () { if (this.__get__firstResult() > this._numResults) { this.firstResult -= this._numResults; } }; v2.nextPage = function () { this.firstResult += this._numResults; }; v2.loadScores = function () { this._connection.sendSimpleCommand('loadScores', {'target': this, 'func': this.onScoresLoaded}, {'publisher_id': this._connection.publisherId, 'board': this._id, 'page': (this._firstResult - 1) / this._numResults + 1, 'num_results': this._numResults, 'period': this._period, 'tag': this._tag}); }; v2.postScore = function (numericScore, tag) { if (tag == undefined) { tag = null; } if (isNaN(numericScore)) { com.newgrounds.Logger.logError('Cannot post invalid score: ' + numericScore); this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT)); return undefined; } com.newgrounds.Logger.logMessage('Posting a score of ' + numericScore + ' by ' + this._connection.username + ' to scoreboard "' + this._name + '"...'); this._connection.sendSimpleCommand('postScore', {'target': this, 'func': this.onScorePosted}, null, {'user_name': this._connection.username, 'board': this._id, 'value': numericScore, 'tag': tag}); }; v2.onScoresLoaded = function (event) { var v4 = event.__get__data(); this._scores = []; var v5; if (v4.first_result) { v5 = v4.first_result; } else { v5 = this._firstResult; } if (v4.scores) { var v3 = 0; while (v3 < v4.scores.length) { var v2 = v4.scores[v3]; if (v2) { this._scores[v3] = new com.newgrounds.Score(v5, v2.username, v2.value, v2.numeric_value, v2.tag); } v3++; v5++; } } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORES_LOADED, this)); }; v2.onScorePosted = function (event) { if (event.__get__success()) { com.newgrounds.Logger.logMessage('Score posted!'); var v4 = event.__get__data(); var v2 = {}; v2.score = v4.value; v2.scoreBoard = this; } else { com.newgrounds.Logger.logError('Error posting score: ' + event.__get__error()); } this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, storedv2, event.__get__error())); }; v2.toString = function () { return 'Scoreboard: ' + this._name; }; v1.TODAY = 'Today'; v1.THIS_WEEK = 'This Week'; v1.THIS_MONTH = 'This Month'; v1.THIS_YEAR = 'This Year'; v1.ALL_TIME = 'All-Time'; v2._period = com.newgrounds.ScoreBoard.ALL_TIME; v2._firstResult = 1; v2._numResults = 10; v2.addProperty('firstResult', v2.__get__firstResult, v2.__set__firstResult); v2.addProperty('name', v2.__get__name, function () {}); v2.addProperty('numResults', v2.__get__numResults, v2.__set__numResults); v2.addProperty('page', v2.__get__page, function () {}); v2.addProperty('period', v2.__get__period, v2.__set__period); v2.addProperty('scores', v2.__get__scores, function () {}); v2.addProperty('tag', v2.__get__tag, v2.__set__tag); ASSetPropFlags(com.newgrounds.ScoreBoard.prototype, null, 1); } #endinitclip } movieClip 60 __Packages.com.newgrounds.Logger { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.Logger) { var v1 = function () {}; com.newgrounds.Logger = v1; var v2 = v1.prototype; v1.logInternal = function () { var v2 = arguments; com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_INTERNAL, v2); }; v1.logMessage = function () { var v2 = arguments; com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_MESSAGE, v2); }; v1.logWarning = function () { var v2 = arguments; com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_WARNING, v2); }; v1.logError = function () { var v2 = arguments; com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_ERROR, v2); }; v1.log = function (priority, messages) { if (priority == undefined) { priority = com.newgrounds.Logger.PRIORITY_MESSAGE; } if (messages == undefined) { messages = null; } if (priority >= com.newgrounds.Logger._messageLevel) { var v1 = 0; while (v1 < messages.length) { trace(com.newgrounds.Logger.HEADER + messages[v1]); com.newgrounds.Logger._eventDispatcher.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.LOG, messages[v1])); ++v1; } } if (priority >= com.newgrounds.Logger._throwLevel) { throw new Error(messages.join('\n')); } }; v1.addEventListener = function (event, listener) { com.newgrounds.Logger._eventDispatcher.addEventListener(event, listener, false, 0, false); }; v1.PRIORITY_INTERNAL = 0; v1.PRIORITY_MESSAGE = 1; v1.PRIORITY_WARNING = 2; v1.PRIORITY_ERROR = 3; v1.PRIORITY_MAX = 4; v1.HEADER = '[Newgrounds API] :: '; v1._eventDispatcher = new com.newgrounds.EventDispatcher(); v1._messageLevel = com.newgrounds.Logger.PRIORITY_MESSAGE; v1._throwLevel = com.newgrounds.Logger.PRIORITY_MAX; ASSetPropFlags(com.newgrounds.Logger.prototype, null, 1); } #endinitclip } movieClip 79 __Packages.com.newgrounds.components.FlashAdBase { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.components) { _global.com.newgrounds.components = new Object(); } if (!_global.com.newgrounds.components.FlashAdBase) { var v1 = function () { super(); try { System.security.allowDomain('server.cpmstar.com'); System.security.allowInsecureDomain('server.cpmstar.com'); } this.gotoAndStop('idle'); this._x = int(this._x); this._y = int(this._y); this.stop(); if (this.__get___newgroundsButton()) { (this.__get___newgroundsButton()).onRelease = this.onNGClick; } this.onUnload = this.removeAd; var v4 = this; this._adListener = {'onLoadError': function (target, error, httpStatus) { target._parent.onAdError(target, error, httpStatus); }}; if (this.__get__fullScreen()) { this.drawFullScreenRect(); } if (com.newgrounds.API.__get__adFeedURL()) { this.loadAdFeed(); } else { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, {'target': this, 'func': this.loadAdFeed}); } }; com.newgrounds.components.FlashAdBase = v1; com.newgrounds.components.FlashAdBase extends MovieClip; var v2 = v1.prototype; v2.__get___adContainer = function () { return this.adContainer; }; v2.__get___newgroundsButton = function () { return this.newgroundsButton; }; v2.__get__fullScreen = function () { return this._fullScreen; }; v2.__set__fullScreen = function (v) { this._fullScreen = v; if (v) { this.drawFullScreenRect(); } else { this.clear(); } return this.__get__fullScreen(); }; v2.__get__showBorder = function () { return this._showBorder; }; v2.__set__showBorder = function (value) { this._showBorder = value; if (this._showBorder) { if (this._ad) { var v2 = this._ad.getProgress(this.__get___adContainer()); if (v2.bytesLoaded >= v2.bytesTotal) { this.gotoAndStop('loaded'); } else { this.gotoAndStop('loading'); } } else { this.gotoAndStop('idle'); } } else { this.gotoAndStop('noBorder'); } return this.__get__showBorder(); }; v2.loadAdFeed = function (event) { if (event == undefined) { event = null; } this._adFeedLoader = new LoadVars(); var target = this; this._adFeedLoader.onData = function (data) { target.onAdFeedLoaded(data); }; this._adFeedLoader.load(com.newgrounds.API.__get__adFeedURL(), this._adFeedLoader); }; v2.onAdFeedLoaded = function (data) { if (data && data != '') { this.loadAd(data); } else { this.onAdError(); } }; v2.loadAd = function (adURL) { if (this.adType != this.VIDEO_ADS) { if (adURL.indexOf('?') >= 0) { adURL += '&'; } else { adURL += '?'; } adURL += 'blockoverlays=1'; } this._ad = new MovieClipLoader(); this._ad.addListener(this._adListener); (this.__get___adContainer())._lockroot = true; this._ad.loadClip(adURL, this.__get___adContainer()); }; v2.removeAd = function () { this._adFeedLoader.onData = null; this._adFeedLoader = null; this._ad.removeListener(this._adListener); if (this.__get___adContainer()) { this._ad.unloadClip(this.__get___adContainer()); } this._ad = null; }; v2.onAdError = function (target, error, httpStatus) { com.newgrounds.Logger.logError('Unable to load ad.'); this.removeAd(); }; v2.onNGClick = function () { com.newgrounds.API.loadNewgrounds(); }; v2.drawFullScreenRect = function () { this._x = (Stage.width - this._width) / 2; this._y = (Stage.height - this._height) / 2; this.beginFill(0); this.moveTo(-Stage.width, -Stage.height); this.lineTo(Stage.width, -Stage.height); this.lineTo(Stage.width, Stage.height); this.lineTo(-Stage.width, Stage.height); this.lineTo(-Stage.width, -Stage.height); this.endFill(); }; v2._showBorder = true; v2.adType = com.newgrounds.components.FlashAdBase.prototype.VIDEO_ADS; v2.VIDEO_ADS = 'Video'; v2.SIMPLE_ADS = 'Simple'; v2.addProperty('_adContainer', v2.__get___adContainer, function () {}); v2.addProperty('_newgroundsButton', v2.__get___newgroundsButton, function () {}); v2.addProperty('fullScreen', v2.__get__fullScreen, v2.__set__fullScreen); v2.addProperty('showBorder', v2.__get__showBorder, v2.__set__showBorder); ASSetPropFlags(com.newgrounds.components.FlashAdBase.prototype, null, 1); } #endinitclip } movieClip 54 __Packages.com.newgrounds.shims.APIShim { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.shims) { _global.com.newgrounds.shims = new Object(); } if (!_global.com.newgrounds.shims.APIShim) { var v1 = function () { super(); }; com.newgrounds.shims.APIShim = v1; com.newgrounds.shims.APIShim extends MovieClip; var v2 = v1.prototype; ASSetPropFlags(com.newgrounds.shims.APIShim.prototype, null, 1); } #endinitclip } movieClip 62 __Packages.com.newgrounds.encoders.json.JSON { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.encoders) { _global.com.newgrounds.encoders = new Object(); } if (!_global.com.newgrounds.encoders.json) { _global.com.newgrounds.encoders.json = new Object(); } if (!_global.com.newgrounds.encoders.json.JSON) { var v1 = function () {}; com.newgrounds.encoders.json.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.encoders.json.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.encoders.json.JSON.encode(v4); if (v1) { v1 += ','; } v1 += com.newgrounds.encoders.json.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.background_encode = function (arg, callback) { if (com.newgrounds.encoders.json.JSON.busy) { trace('[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed'); return false; } else { if (!callback) { trace('[Newgrounds Encoder] :: Missing a callback function, skipping encode'); return false; } } com.newgrounds.encoders.json.JSON.busy = true; var v2 = new Date(); com.newgrounds.encoders.json.JSON.start = v2.getTime(); com.newgrounds.encoders.json.JSON.cache = {'busy': false, 'complete': false, 'arg': arg, 'target': arg, 'parents': [], 'encoded': '', 'callback': callback, 'encode_chunk': function () { com.newgrounds.encoders.json.JSON.encode_chunk(); }}; if (com.newgrounds.encoders.json.JSON.getType(arg) == 'object') { com.newgrounds.encoders.json.JSON.cache.encoded = '{'; com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'encode_chunk', 25); return true; } if (com.newgrounds.encoders.json.JSON.getType(arg) == 'array') { com.newgrounds.encoders.json.JSON.cache.encoded = '['; } com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'encode_chunk', 25); return true; }; v1.background_decode = function (arg, callback) { if (com.newgrounds.encoders.json.JSON.busy) { trace('[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed'); return false; } else { if (!callback) { trace('[Newgrounds Encoder] :: Missing a callback function, skipping decode'); return false; } } com.newgrounds.encoders.json.JSON.busy = true; var v1 = new Date(); com.newgrounds.encoders.json.JSON.start = v1.getTime(); com.newgrounds.encoders.json.JSON.cache = {'busy': false, 'callback': callback, 'complete': false, 'arg': arg, 'pos': 0, 'parents': ['root'], 'target': null, 'scratch': '', 'decode_chunk': function () { com.newgrounds.encoders.json.JSON.decode_chunk(); }}; com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'decode_chunk', 25); return true; }; 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(); }; v1.getType = function (v) { if (v instanceof Array) { return 'array'; } else { return typeof v; } }; v1.decode_chunk = function () { if (!com.newgrounds.encoders.json.JSON.cache.busy && !com.newgrounds.encoders.json.JSON.cache.complete) { com.newgrounds.encoders.json.JSON.cache.busy = true; var v1 = 0; while (v1 < com.newgrounds.encoders.json.JSON.decode_chunks) { com.newgrounds.encoders.json.JSON.chunk_decoder(); if (com.newgrounds.encoders.json.JSON.cache.complete) { break; } ++v1; } trace(Math.round((com.newgrounds.encoders.json.JSON.cache.pos / com.newgrounds.encoders.json.JSON.cache.arg.length) * 100) + '% decoded'); com.newgrounds.encoders.json.JSON.cache.busy = false; } if (com.newgrounds.encoders.json.JSON.cache.complete) { var v2 = new Date(); com.newgrounds.encoders.json.JSON.busy = false; clearInterval(com.newgrounds.encoders.json.JSON.interval); com.newgrounds.encoders.json.JSON.cache.callback(com.newgrounds.encoders.json.JSON.cache.root, v2.getTime() - com.newgrounds.encoders.json.JSON.start); com.newgrounds.encoders.json.JSON.cache.arg = ''; } }; v1.encode_chunk = function () { if (!com.newgrounds.encoders.json.JSON.cache.busy && !com.newgrounds.encoders.json.JSON.cache.complete) { com.newgrounds.encoders.json.JSON.cache.busy = true; var v1 = 0; while (v1 < com.newgrounds.encoders.json.JSON.encode_chunks) { com.newgrounds.encoders.json.JSON.chunk_encoder(); if (com.newgrounds.encoders.json.JSON.cache.complete) { break; } ++v1; } com.newgrounds.encoders.json.JSON.cache.busy = false; } if (com.newgrounds.encoders.json.JSON.cache.complete) { var v3 = new Date(); var v2 = v3.getTime(); com.newgrounds.encoders.json.JSON.busy = false; clearInterval(com.newgrounds.encoders.json.JSON.interval); com.newgrounds.encoders.json.JSON.cache.callback(com.newgrounds.encoders.json.JSON.cache.encoded, v2 - com.newgrounds.encoders.json.JSON.start); com.newgrounds.encoders.json.JSON.cache.encoded = ''; } }; v1.chunk_decoder = function () { function _object() { var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (!com.newgrounds.encoders.json.JSON.cache.mode) { com.newgrounds.encoders.json.JSON.cache.mode = 'object'; ++com.newgrounds.encoders.json.JSON.cache.pos; v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (v1 != '"') { throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")'; } com.newgrounds.encoders.json.JSON.cache.scratch = ''; _setTargetValue({}); } else { if (v1 == ',') { ++com.newgrounds.encoders.json.JSON.cache.pos; v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (v1 != '"') { throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")'; } com.newgrounds.encoders.json.JSON.cache.scratch = ''; } else { if (v1 == '}') { _useParent(); } else { if (v1 == '"') { ++com.newgrounds.encoders.json.JSON.cache.pos; v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (v1 != ':') { throw 'Malformed object notation. Object keys and values must be separated by colons(:)'; } _addParent(com.newgrounds.encoders.json.JSON.cache.scratch); com.newgrounds.encoders.json.JSON.cache.mode = null; } else { if (v1 == '\\') { ++com.newgrounds.encoders.json.JSON.cache.pos; v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); } com.newgrounds.encoders.json.JSON.cache.scratch += v1; } } } } ++com.newgrounds.encoders.json.JSON.cache.pos; } function _array() { var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (!com.newgrounds.encoders.json.JSON.cache.mode) { com.newgrounds.encoders.json.JSON.cache.mode = 'array'; ++com.newgrounds.encoders.json.JSON.cache.pos; v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); _setTargetValue([]); if (v1 != ']') { _addArrayKey(); } else { _useParent(); } return undefined; } else { if (v1 == ',') { _addArrayKey(); } else { if (v1 == ']') { _useParent(); } } } ++com.newgrounds.encoders.json.JSON.cache.pos; } function _boolean() { var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (v1 == 't') { _setTargetValue(true); com.newgrounds.encoders.json.JSON.cache.pos += 3; } else { if (v1 == 'f') { _setTargetValue(false); com.newgrounds.encoders.json.JSON.cache.pos += 4; } else { throw 'Bool values must be true or false'; } } _useParent(); } function _null() { var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (v1 == 'n') { _setTargetValue(null); com.newgrounds.encoders.json.JSON.cache.pos += 2; } else { throw 'Null values must be null'; } _useParent(); } function _string() { var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (!com.newgrounds.encoders.json.JSON.cache.mode) { if (v1 != '"') { throw 'Strings must be wrapped in quotes ("")'; } com.newgrounds.encoders.json.JSON.cache.scratch = ''; com.newgrounds.encoders.json.JSON.cache.mode = 'string'; } else { if (v1 == '"') { _setTargetValue(com.newgrounds.encoders.json.JSON.cache.scratch); _useParent(); } else { if (v1 == '\\') { ++com.newgrounds.encoders.json.JSON.cache.pos; v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); switch (v1) { case 'n': v1 = '\n'; break; case 'r': v1 = '\n'; break; case 't': v1 = '\t'; break; case 'u': v1 = '\\' + v1; } } com.newgrounds.encoders.json.JSON.cache.scratch += v1; } } ++com.newgrounds.encoders.json.JSON.cache.pos; } function _number() { var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); var v2 = '01234567890.-'; if (!com.newgrounds.encoders.json.JSON.cache.mode) { com.newgrounds.encoders.json.JSON.cache.mode = 'number'; com.newgrounds.encoders.json.JSON.cache.scratch = ''; } if (v2.indexOf(v1) < 0) { _setTargetValue(Number(com.newgrounds.encoders.json.JSON.cache.scratch)); _useParent(); } else { com.newgrounds.encoders.json.JSON.cache.scratch += v1; ++com.newgrounds.encoders.json.JSON.cache.pos; } } function _setTargetValue(newval) { var v2 = (_getParent()).obj; var v1 = com.newgrounds.encoders.json.JSON.cache.parents[com.newgrounds.encoders.json.JSON.cache.parents.length - 1]; v2[v1] = newval; } function _useParent() { com.newgrounds.encoders.json.JSON.cache.mode = com.newgrounds.encoders.json.JSON.getType((_getParent()).obj); com.newgrounds.encoders.json.JSON.cache.parents.pop(); } function _getParent() { var v2 = com.newgrounds.encoders.json.JSON.cache; var v1 = 0; while (v1 < com.newgrounds.encoders.json.JSON.cache.parents.length - 1) { v2 = v2[com.newgrounds.encoders.json.JSON.cache.parents[v1]]; ++v1; } return {'obj': v2, 'name': com.newgrounds.encoders.json.JSON.cache.parents[v1]}; } function _getCurrent() { var v2 = com.newgrounds.encoders.json.JSON.cache; var v1 = 0; while (v1 < com.newgrounds.encoders.json.JSON.cache.parents.length) { v2 = v2[com.newgrounds.encoders.json.JSON.cache.parents[v1]]; ++v1; } return {'obj': v2, 'name': com.newgrounds.encoders.json.JSON.cache.parents[v1]}; } function _addParent(child) { com.newgrounds.encoders.json.JSON.cache.parents.push(child); } function _addArrayKey() { var v1 = (_getCurrent()).obj.length; com.newgrounds.encoders.json.JSON.cache.parents.push(v1); com.newgrounds.encoders.json.JSON.cache.mode = null; } if (com.newgrounds.encoders.json.JSON.cache.pos >= com.newgrounds.encoders.json.JSON.cache.arg.length) { com.newgrounds.encoders.json.JSON.cache.complete = true; return undefined; } else { if (com.newgrounds.encoders.json.JSON.cache.mode) { ('_' + com.newgrounds.encoders.json.JSON.cache.mode)(); } else { var char = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); switch (char) { case '{': _object(); break; case '[': _array(); break; case '"': _string(); break; case 'n': _null(); break; case 't': _boolean(); break; case 'f': _boolean(); break; default: _number(); } } } }; v1.chunk_encoder = function () { if (com.newgrounds.encoders.json.JSON.cache.complete) { return undefined; } var v2 = com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target); switch (v2) { case 'number': com.newgrounds.encoders.json.JSON.cache.encoded += com.newgrounds.encoders.json.JSON.cache.target; com.newgrounds.encoders.json.JSON.getParent(); break; case 'string': com.newgrounds.encoders.json.JSON.cache.encoded += '"' + (com.newgrounds.encoders.json.JSON.cache.target.split('"')).join('\\"') + '"'; com.newgrounds.encoders.json.JSON.getParent(); break; case 'boolean': com.newgrounds.encoders.json.JSON.cache.encoded += (com.newgrounds.encoders.json.JSON.cache.target == true) ? 'true' : 'false'; com.newgrounds.encoders.json.JSON.getParent(); break; case 'null': com.newgrounds.encoders.json.JSON.cache.encoded += 'null'; com.newgrounds.encoders.json.JSON.getParent(); break; case 'array': if (com.newgrounds.encoders.json.JSON.cache.target.length < 1) { com.newgrounds.encoders.json.JSON.cache.encoded += ']'; com.newgrounds.encoders.json.JSON.getParent(); } else { com.newgrounds.encoders.json.JSON.cache.parents.push(com.newgrounds.encoders.json.JSON.cache.target); com.newgrounds.encoders.json.JSON.cache.target = com.newgrounds.encoders.json.JSON.cache.target[0]; if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'array') { com.newgrounds.encoders.json.JSON.cache.encoded += '['; } else { if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'object') { com.newgrounds.encoders.json.JSON.cache.encoded += '{'; } } } break; case 'object': for (var v1 in com.newgrounds.encoders.json.JSON.cache.target) { break; } if (v1 === undefined) { com.newgrounds.encoders.json.JSON.cache.encoded += '}'; com.newgrounds.encoders.json.JSON.getParent(); } else { com.newgrounds.encoders.json.JSON.cache.parents.push(com.newgrounds.encoders.json.JSON.cache.target); com.newgrounds.encoders.json.JSON.cache.target = com.newgrounds.encoders.json.JSON.cache.target[v1]; com.newgrounds.encoders.json.JSON.cache.encoded += '"' + (v1.split('"')).join('\\"') + '":'; if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'array') { com.newgrounds.encoders.json.JSON.cache.encoded += '['; } else { if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'object') { com.newgrounds.encoders.json.JSON.cache.encoded += '{'; } } } break; default: com.newgrounds.encoders.json.JSON.cache.encoded += 'null'; com.newgrounds.encoders.json.JSON.getParent(); } }; v1.getParent = function () { if (com.newgrounds.encoders.json.JSON.cache.parents.length > 0) { var v1 = com.newgrounds.encoders.json.JSON.cache.parents.pop(); if (com.newgrounds.encoders.json.JSON.getType(v1) == 'array') { v1.shift(); } else { for (var v3 in v1) { delete v1[v3]; break; } } if (com.newgrounds.encoders.json.JSON.getType(v1) == 'object' or com.newgrounds.encoders.json.JSON.getType(v1) == 'array') { for (var v2 in v1) { break; } if (v2 !== undefined) { com.newgrounds.encoders.json.JSON.cache.encoded += ','; } } com.newgrounds.encoders.json.JSON.cache.target = v1; } else { com.newgrounds.encoders.json.JSON.cache.complete = true; } }; v1.encode_chunks = 20000; v1.decode_chunks = 20000; v1.busy = false; ASSetPropFlags(com.newgrounds.encoders.json.JSON.prototype, null, 1); } #endinitclip } movieClip 65 __Packages.com.newgrounds.crypto.MD5 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.crypto) { _global.com.newgrounds.crypto = new Object(); } if (!_global.com.newgrounds.crypto.MD5) { var v1 = function () {}; com.newgrounds.crypto.MD5 = v1; var v2 = v1.prototype; v1.hash = function (src) { return com.newgrounds.crypto.MD5.hex_md5(src); }; v1.hex_md5 = function (src) { return com.newgrounds.crypto.MD5.binl2hex(com.newgrounds.crypto.MD5.core_md5(com.newgrounds.crypto.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.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936); v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586); v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819); v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330); v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897); v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426); v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341); v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983); v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416); v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417); v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063); v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162); v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682); v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101); v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290); v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329); v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510); v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632); v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713); v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302); v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691); v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083); v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335); v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848); v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438); v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690); v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961); v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501); v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467); v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784); v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473); v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734); v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558); v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463); v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562); v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556); v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060); v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353); v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632); v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640); v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174); v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222); v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979); v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189); v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487); v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835); v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520); v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651); v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844); v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415); v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905); v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055); v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571); v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606); v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523); v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799); v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359); v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744); v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380); v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649); v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070); v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379); v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259); v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551); v4 = com.newgrounds.crypto.MD5.safe_add(v4, v10); v3 = com.newgrounds.crypto.MD5.safe_add(v3, v9); v2 = com.newgrounds.crypto.MD5.safe_add(v2, v8); v1 = com.newgrounds.crypto.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.crypto.MD5.safe_add(com.newgrounds.crypto.MD5.bit_rol(com.newgrounds.crypto.MD5.safe_add(com.newgrounds.crypto.MD5.safe_add(a, q), com.newgrounds.crypto.MD5.safe_add(x, t)), s), b); }; v1.md5_ff = function (a, b, c, d, x, s, t) { return com.newgrounds.crypto.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.crypto.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.crypto.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.crypto.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.crypto.MD5.prototype, null, 1); } #endinitclip } movieClip 66 __Packages.com.newgrounds.crypto.RC4 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.crypto) { _global.com.newgrounds.crypto = new Object(); } if (!_global.com.newgrounds.crypto.RC4) { var v1 = function () {}; com.newgrounds.crypto.RC4 = v1; var v2 = v1.prototype; v1.encrypt = function (src, key) { var v3 = com.newgrounds.crypto.RC4.strToChars(src); var v1 = com.newgrounds.crypto.RC4.strToChars(key); var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1); return com.newgrounds.crypto.RC4.charsToHex(v2); }; v1.encryptbin = function (src, key) { var v3 = com.newgrounds.crypto.RC4.strToChars(src); var v1 = com.newgrounds.crypto.RC4.strToChars(key); var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1); return v2; }; v1.decrypt = function (src, key) { var v3 = com.newgrounds.crypto.RC4.hexToChars(src); var v1 = com.newgrounds.crypto.RC4.strToChars(key); var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1); return com.newgrounds.crypto.RC4.charsToStr(v2); }; v1.initialize = function (pwd) { var v2 = 0; var v3; var v4 = pwd.length; var v1 = 0; while (v1 <= 255) { com.newgrounds.crypto.RC4.mykey[v1] = pwd[v1 % v4]; com.newgrounds.crypto.RC4.sbox[v1] = v1; ++v1; } v1 = 0; while (v1 <= 255) { v2 = (v2 + com.newgrounds.crypto.RC4.sbox[v1] + com.newgrounds.crypto.RC4.mykey[v1]) % 256; v3 = com.newgrounds.crypto.RC4.sbox[v1]; com.newgrounds.crypto.RC4.sbox[v1] = com.newgrounds.crypto.RC4.sbox[v2]; com.newgrounds.crypto.RC4.sbox[v2] = v3; ++v1; } }; v1.calculate = function (plaintxt, psw) { com.newgrounds.crypto.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.crypto.RC4.sbox[v1]) % 256; v5 = com.newgrounds.crypto.RC4.sbox[v1]; com.newgrounds.crypto.RC4.sbox[v1] = com.newgrounds.crypto.RC4.sbox[v2]; com.newgrounds.crypto.RC4.sbox[v2] = v5; var v4 = (com.newgrounds.crypto.RC4.sbox[v1] + com.newgrounds.crypto.RC4.sbox[v2]) % 256; v7 = com.newgrounds.crypto.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.crypto.RC4.prototype, null, 1); } #endinitclip } movieClip 70 __Packages.com.newgrounds.Score { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.Score) { var v1 = function (rank, username, score, numericValue, tag) { this._rank = rank; this._username = username; this._score = score; this._numericValue = numericValue; this._tag = tag; }; com.newgrounds.Score = v1; var v2 = v1.prototype; v2.__get__numericValue = function () { return this._numericValue; }; v2.__get__rank = function () { return this._rank; }; v2.__get__score = function () { return this._score; }; v2.__get__tag = function () { return this._tag; }; v2.__get__username = function () { return this._username; }; v2.toString = function () { return this._rank + '.\t' + this._username + '\t' + this._score; }; v2.addProperty('numericValue', v2.__get__numericValue, function () {}); v2.addProperty('rank', v2.__get__rank, function () {}); v2.addProperty('score', v2.__get__score, function () {}); v2.addProperty('tag', v2.__get__tag, function () {}); v2.addProperty('username', v2.__get__username, function () {}); ASSetPropFlags(com.newgrounds.Score.prototype, null, 1); } #endinitclip } frame 5 { } movieClip 493 { } button 498 { on (release) { gotoAndStop(2); } } button 503 { on (release) { _root.quit(); } } button 507 { on (release) { _root.sponsorlink(); } } button 512 { on (release) { pos = 1; } } button 516 { on (release) { _root.addlink(); } } movieClip 517 { frame 1 { function showinstructions() {} stop(); xpo1 = _x; pos = 1; xpo2 = -72.8; onEnterFrame = function () { _x = _x - (_x - this['xpo' + pos]) / 20; }; } } button 519 { on (release) { _root.sponsorlink(); } } button 522 { on (release) { _root.quitlevel(); } } button 523 { on (release) { _root.mutetrig(); gotoAndStop(2); } } button 524 { on (release) { _root.unmutetrig(); gotoAndStop(1); } } movieClip 525 { frame 1 { stop(); if (_root.mute == true) { gotoAndStop(2); } } } movieClip 529 { } frame 10 { function nextwave() { if (wave < lvl && rank[wave - 1] > 0) { wave += 1; } } function prevwave() { if (wave > 1) { wave -= 1; } } function selectstage() {} if (wave == undefined) { wave = lvl; } } movieClip 534 { } movieClip 537 { } movieClip 538 { } movieClip 540 { } movieClip 542 { } button 543 { on (release) { _parent.trig(); } } movieClip 544 { } button 546 { on (release) { prevwave(); } } button 547 { on (release) { nextwave(); } } movieClip 553 { } movieClip 554 { frame 1 { stop(); } } movieClip 555 { } button 558 { on (release) { gotolevel(); } } movieClip 586 { frame 1 { stop(); } } button 591 { on (release) { returntomenu(); } } movieClip 593 { } // unknown tag 88 length 62 button 601 { on (release) { _root.buygrenade(); } on (rollOver) { _root.displayinfogrenade(); } on (rollOut) { _root.hideinfo(); } } movieClip 602 { } button 607 { on (release) { _root.buyammo(); } on (rollOver) { _root.displayinfoammo(); } on (rollOut) { _root.hideinfo(); } } movieClip 608 { } button 611 { on (release) { _root.buyhealthpack(); } on (rollOver) { _root.displayinfohealth(); } on (rollOut) { _root.hideinfo(); } } movieClip 612 { } movieClip 613 { frame 1 { stop(); } } movieClip 617 { } movieClip 618 { frame 1 { stop(); } } button 622 { on (release) { _root.sponsorlink3(); } } movieClip 624 { } button 625 { on (release) { _root.goback(); } } movieClip 626 { } frame 30 { windata[0] = 0; windata[1] = 0; windata[2] = 0; windata[3] = 0; trace('windata' + windata); } frame 30 { stop(); } movieClip 628 { } movieClip 630 { } movieClip 633 { } // unknown tag 88 length 84 movieClip 636 { frame 1 { wid = _parent._width / 2; hei = _parent._height / 2; phei = 30; pwid = 20; _parent._parent._parent.nop += 1; idp = _parent._parent._parent.nop; ang = Math.sin(_parent._rotation * 0.0174532925199433); trace(ang); _parent._visible = false; _visible = false; onEnterFrame = function () { if (Math.abs(_parent._parent._parent.player._x - (_parent._parent._x + _parent._x)) <= wid) { xdis = _parent._parent._parent.player._x - (_parent._parent._x + _parent._x); hpi = -1 * (ang * xdis); if (_parent._parent._parent.player._y > _parent._parent._y + _parent._y - (hpi + phei + hei + 1) && _parent._parent._parent.player._y < _parent._parent._y + _parent._y - (hpi + phei)) { if (_parent._parent._parent.player.yv <= 0) { _parent.spectrig(); if (_parent._parent._parent.player.yv <= -3) { _parent._parent._parent.player.landsound(); } _parent._parent._parent.player.yv = 0; _parent._parent._parent.player._y = _parent._parent._y + _parent._y - (hpi + phei + hei); _parent._parent._parent.player.jump = 5; _parent.lpy = _parent._parent._y + _parent._y; _parent._parent.platfocus = idp; } } } if (_parent._parent.platfocus == idp) { _parent._parent['pox' + idp] = _parent._parent._x + _parent._x; _parent._parent['powid' + idp] = wid; _parent._parent['poy' + idp] = _parent._parent._y + _parent._y; _parent._parent['pohei' + idp] = hei; } }; } } movieClip 637 { } movieClip 638 { frame 1 { wid = _parent._width / 2; hei = _parent._height / 2; phei = 30; pwid = 20; _parent._parent._parent.nop += 1; idp = _parent._parent._parent.nop; ang = Math.sin(_parent._rotation * 0.0174532925199433); trace(ang); _parent._visible = false; _visible = false; onEnterFrame = function () { if (Math.abs(_parent._parent._parent.player._x - (_parent._parent._x + _parent._x)) <= wid) { xdis = _parent._parent._parent.player._x - (_parent._parent._x + _parent._x); hpi = -1 * (ang * xdis); if (_parent._parent._parent.player._y > _parent._parent._y + _parent._y - (hpi + hei + 1) && _parent._parent._parent.player._y < _parent._parent._y + _parent._y - hpi) { if (_parent._parent._parent.player.yv <= 0) { _parent.spectrig(); if (_parent._parent._parent.player.yv <= -3) { _parent._parent._parent.player.landsound(); } _parent._parent._parent.player.yv = 0; _parent._parent._parent.player._y = _parent._parent._y + _parent._y - (hpi + hei); _parent._parent._parent.player.jump = 5; _parent.lpy = _parent._parent._y + _parent._y; _parent._parent.platfocus = idp; } } } if (_parent._parent.platfocus == idp) { _parent._parent['pox' + idp] = _parent._parent._x + _parent._x; _parent._parent['powid' + idp] = wid; _parent._parent['poy' + idp] = _parent._parent._y + _parent._y; _parent._parent['pohei' + idp] = hei; } }; } } movieClip 639 { } movieClip 642 { } movieClip 645 { } movieClip 647 { } movieClip 648 { } movieClip 673 { frame 1 { stop(); } frame 2 { topy = _y - 300; targety = _parent.player._y; time = 2; wid = 30; hei = wid; xv = Math.abs(_x - _parent.player._x) / time * 30; disx = _x - _parent.player._x; dxv = disx / xv; blastradius = 75; var splode = new Sound(); splode.attachSound('splode'); disy = _parent.player._y - _y; yv = Math.abs((disy - 0.35 * (dxv * dxv)) / dxv); trace(yv); onEnterFrame = function () { if (_currentframe == 2 && _root.paused_game != true) { _rotation = _rotation + 5; _y = _y - yv; yv -= 0.7; _x = _x + xv * dir; i = 1; while (i <= _parent.tb + 3) { if (Math.abs(_x - _parent['bullet' + i]._x - _parent['bullet' + i].hbx) <= wid && Math.abs(_y - _parent['bullet' + i]._y - _parent['bullet' + i].hby) <= hei || Math.abs(_x - _parent['bullet' + i]._x) <= wid && Math.abs(_y - _parent['bullet' + i]._y) <= hei) { if (_parent['bullet' + i]._currentframe <= 1) { splode.start(0, 0); play(); _parent._parent._parent['bullet' + i].hit(); } } ++i; } if (_y > _parent.player._y + 30 && _parent.player.jump > 0 && yv < 0 || _y > 410 || yv < 0 && Math.abs(_x - _parent.player._x) < 50 && Math.abs(_y - _parent.player._y) < 60) { splode.start(0, 0); _rotation = 0; play(); } } if (_currentframe >= 3 && _root.paused_game != true) { yv = 0; _rotation = 0; xv = 0; if (_currentframe >= 3 && _currentframe < 6) { if (Math.abs(_x - _parent.player._x) <= blastradius && Math.abs(_y - _parent.player._y) <= blastradius && _parent.player.immune <= 0) { if (_parent.player._x > _x) { _parent.player.xv = 10; } if (_parent.player._x < _x) { _parent.player.xv = -10; } _parent.player.expload(); } } } }; } frame 3 { _parent._y = -23; } frame 4 { _parent._y = -27; } frame 5 { _parent._y = -23; } frame 6 { _parent._y = -27; } frame 7 { _parent._y = -23; } frame 52 { stop(); } } movieClip 682 { frame 1 { _rotation = random(360); } frame 16 { stop(); } } movieClip 685 { } movieClip 696 { frame 1 { function spawngun() { gun = 2 + random(4); gotoAndStop(gun); _y = 100; } function spawngunnewwave() { gun = 2 + random(4); gotoAndStop(gun); } stop(); var ammo = new Array(0, 10, 60, 40, 20, 30); int_x = _x; int_y = 420; yv = 0; var pup = new Sound(); pup.attachSound('pup'); onEnterFrame = function () { if (_currentframe > 1) { if (Math.abs(_x - _parent.player._x) <= 50 && Math.abs(_y - (_parent.player._y + 30)) <= 50) { trace(_parent['g' + gun][0]); _parent['g' + gun][0] += ammo[gun - 1]; trace(_parent['g' + gun][0]); pup.start(0, 0); gotoAndStop(1); } if (_root.paused_game != true) { if (_y < int_y) { _y = _y - yv; yv -= 0.7; } if (_y >= int_y) { yv = 0; _y = int_y; } } } }; } instance of movieClip 685 { onClipEvent (enterFrame) { _rotation = _rotation + 5; } } } movieClip 700 { frame 1 { xv = Math.random() * 8 - Math.random() * 8; rot = Math.random() * 4 - Math.random() * 4; yv = Math.random() * 10; _visible = false; blooddepth = 1; dupli = 0; onEnterFrame = function () { if (_root.paused_game != true) { _parent._x += xv; _parent._y -= yv; yv -= 0.7; _parent._rotation += rot; dupli += 1; if (_parent._y > 510) { _parent._parent.gotoAndStop(1); } } }; } } movieClip 705 { frame 1 { gotoAndStop(random(3) + 1); } } movieClip 706 { frame 1 { stop(); } frame 1 { bd = 1; } } movieClip 707 { frame 48 { stop(); } } movieClip 708 { frame 1 { stop(); } frame 42 { stop(); } } movieClip 725 { frame 11 { stop(); } } movieClip 726 { } movieClip 727 { frame 1 { stop(); } frame 2 { function boom() { splode.start(0, 0); _rotation = 0; play(); } topy = _y - 300; targety = _parent._ymouse; time = 1; wid = 30; hei = wid; trace(_parent._xmouse); xv = Math.abs(_x - _parent._xmouse) / time * 30; disx = _x - _parent._xmouse; dxv = disx / xv; blastradius = 75; _parent.pgrx = _x; _parent.pgry = _y; var splode = new Sound(); splode.attachSound('splode'); disy = _parent._ymouse - _y; yv = Math.abs((disy - 0.35 * (dxv * dxv)) / dxv); trace(yv); dir = _parent.player._xscale / 100; onEnterFrame = function () { if (_currentframe <= 1 || _currentframe > 8) { _parent.grenadeactive = false; } if (_currentframe == 2 && _root.paused_game != true) { _rotation = _rotation + 5; _y = _y - yv; yv -= 0.7; _x = _x + xv * dir; if (_y > 410) { splode.start(0, 0); _rotation = 0; play(); } } if (_currentframe >= 3 && _root.paused_game != true) { yv = 0; _rotation = 0; xv = 0; } }; } frame 3 { _parent._y = -23; } frame 4 { _parent._y = -27; } frame 5 { _parent._y = -23; } frame 6 { _parent._y = -27; } frame 7 { _parent._y = -23; } frame 52 { stop(); } } movieClip 730 { } movieClip 734 { } movieClip 736 { } movieClip 737 { } movieClip 739 { } movieClip 741 { } movieClip 743 { } movieClip 756 { } movieClip 757 { frame 1 { stop(); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 759 { } movieClip 762 { } movieClip 764 { } movieClip 765 { frame 1 { stop(); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 767 { } movieClip 770 { } movieClip 771 { frame 1 { stop(); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 774 { } movieClip 775 { frame 1 { stop(); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 778 { } movieClip 779 { frame 1 { stop(); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 782 { } movieClip 783 { frame 1 { stop(); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 785 { } movieClip 787 { } movieClip 789 { } movieClip 791 { } movieClip 794 { } movieClip 797 { } movieClip 800 { } movieClip 802 { } movieClip 805 { } movieClip 807 { } movieClip 814 { } movieClip 817 { } movieClip 818 { frame 1 { stop(); } frame 10 { gotoAndPlay(2); } frame 19 { gotoAndPlay(2); } frame 50 { stop(); } frame 80 { stop(); } frame 100 { gotoAndStop(50); } frame 130 { stop(); } } movieClip 829 { frame 1 { function throwgrenade() { if (carryon[0] > 0) { if (_parent.grenadeactive != true) { _parent.nade.gotoAndStop(2); _parent.nade._x = _x; _parent.nade._y = _y; _parent.grenadeactive = true; carryon[0] -= 1; } } } function cyclegun() { if (gunsw != true) { if (gun < 7) { gun += 1; } if (gun >= 7) { gun = 1; } } gunsw = true; } function fireg() { var v8 = new Sound(); v8.attachSound('cok'); var v6 = new Sound(); v6.attachSound('sg'); var v7 = new Sound(); v7.attachSound('sg1'); var v5 = new Sound(); v5.attachSound('sg2'); var v2 = new Sound(); v2.attachSound('sg5'); var v4 = new Sound(); v4.attachSound('sg4'); var v9 = new Sound(); v9.attachSound('sg6'); if (_parent['g' + gun][0] > 0) { _parent['bullet' + round].fireoff(); round += 1; gunshot = firerate; bod.arm.gun.gotoAndPlay(2); _parent['g' + gun][0] -= 1; if (gun == 1) { v7.start(0, 0); } if (gun == 2) { v6.start(0, 0); } if (gun == 3) { v5.start(0, 0); } if (gun == 5) { v2.start(0, 0); } if (gun == 4) { v4.start(0, 0); } if (gun == 6) { v9.start(0, 0); } tremur(); duplicateMovieClip(_parent.shell, 'sh' + dp, dp); _parent['sh' + dp].gotoAndStop(2); dp += 1; if (firetype == 'shot') { _parent['bullet' + round].fireoff(); round += 1; _parent['bullet' + round].fireoff(); round += 1; _parent['bullet' + round].fireoff(); round += 1; _parent['bullet' + round].fireoff(); round += 1; _parent['bullet' + round].fireoff(); round += 1; _parent['bullet' + round].fireoff(); round += 1; duplicateMovieClip(_parent.shell, 'sh' + dp, dp); _parent['sh' + dp].gotoAndStop(2); dp += 1; v8.start(0, 0); } } if (_parent['g' + gun][0] <= 0) { var v3 = new Sound(); v3.attachSound('noammo'); v3.start(0, 0); if (gun < 6) { gun += 1; } if (gun >= 6) { gun = 1; } gunshot = firerate; } if (jump <= 0) { bod.gotoAndPlay(81); } } function takehit() { health -= 30; combobreak(); xv = -5 * (_xscale / 100); } function takehit2() { health -= 20; combobreak(); xv = -5 * (_xscale / 100); pain.start(0, 0); } function meleehit() { var v1 = new Sound(); v1.attachSound('punch'); v1.start(0.35, 0); } function runoverhit() { var v1 = new Sound(); v1.attachSound('punch'); v1.start(0.35, 0); var v2 = new Sound(); v2.attachSound('skid'); v2.start(0, 0); yv = 10; immune = 35; } function expload() { combobreak(); health -= 40; immune = 30; } function tremur() {} function dustkick() { _parent.dustkick(); } function combobreak() { _parent.combo = 0; } function landsound() { var v1 = new Sound(); v1.attachSound('landinrr'); v1.start(0, 0); } stop(); yv = 0; jump = 5; xv = 0; health = 95; gun = 3; doublejump = false; firegun = false; round = 1; gunshot = 0; onplat = 0; dp = 0; immune = 0; gunsw = false; runcycle = 1; cra = 0; activeg = 0; carryon = _root.carryon; grenades = carryon[0]; healthpack = carryon[1]; var healsound = new Sound(); healsound.attachSound('healing'); var pain = new Sound(); pain.attachSound('pain'); onEnterFrame = function () { activeg -= 1; _parent._parent.hp.gs.gotoAndStop(gun); if (_root.paused_game != true && _parent.win != true) { _y = _y - yv; _parent._parent.crs._rotation += 3; yv -= 0.8; if (_y >= 410) { jump = 5; _y = 410; _parent.lpy = _y; _parent.platfocus = 0; if (yv < 0) { if (yv < -2) { landsound(); dustkick(); } yv = 0; } } } if (round >= _parent.tb) { round = 1; } if (_root.paused_game != true && health > 0 && _parent.win != true) { cra = bod.arm.gun._currentframe; if (Key.isDown(32)) { cyclegun(); } if (!Key.isDown(32)) { gunsw = false; } _parent.edgex = 80 * Math.cos(rot * 0.0174532925199433); _parent.edgey = 80 * Math.sin(rot * 0.0174532925199433); _parent.edger = rot; camx = _parent._x + _x + 20 * xv - 350; jump -= 1; ya = _parent._ymouse + 15; xa = _parent._xmouse; rot = Math.atan2(ya - _y, xa - _x) / 0.0174532925199433; o = 1; while (o <= 15) { if (Math.abs(_parent['ebullet' + o]._x - _x) < _width / 2 && Math.abs(_parent['ebullet' + o]._y - _y) < _width / 2 && _parent['ebullet' + o]._currentframe <= 1 && immune <= 0) { duplicateMovieClip(_parent.bld, 'blo' + _parent.bln, _parent.bln + 1000); _parent['blo' + _parent.bln]._x = _x - 30 * (_xscale / 100); _parent['blo' + _parent.bln]._y = _parent['ebullet' + i]._y; _parent['blo' + _parent.bln].gotoAndPlay(1); _parent.bln += 1; immune = 20; _parent['ebullet' + o].hit(); takehit2(); } ++o; } if (camx < 0 && _parent._x + _parent.bl._x < -50 || camx > 0 && _parent._x + _parent.br._x > 750) { _parent._x -= camx / 30; } if (xa > _x) { _xscale = 100; if (ya < _y + 20 && Math.abs(xa - _x) <= 60 || Math.abs(xa - _x) > 30) { bod.arm._rotation = Math.atan2(ya - _y, xa - _x) / 0.0174532925199433; } } if (xa < _x) { _xscale = -100; if (ya < _y + 20 && Math.abs(xa - _x) <= 60 || Math.abs(xa - _x) > 30) { bod.arm._rotation = 180 - Math.atan2(ya - _y, xa - _x) / 0.0174532925199433; } } if (Key.isDown(65) || Key.isDown(37)) { if (xv > -10) { xv -= 2; } } if (Key.isDown(68) || Key.isDown(39)) { if (xv < 10) { xv += 2; } } if (Math.abs(xv) > 0.5) { _x = _x + xv; runcycle += Math.abs(xv / 30); if (_xscale > 0 && xv > 0 || _xscale < 0 && xv < 0) { der = 1; if (runcycle > 8) { runcycle = 1; } } if (_xscale < 0 && xv > 0 || _xscale > 0 && xv < 0) { der = 10; if (runcycle > 8) { runcycle = 1; } } if (jump > 0) { bod.gotoAndStop(Math.round(runcycle + der)); } } if (Math.abs(xv) <= 0.5) { if (jump > 0 && bod._currentframe > 1) { bod.gotoAndStop(1); } } if (jump > 0) { doublejump = false; if (!Key.isDown(68) && !Key.isDown(39) && !Key.isDown(65) && !Key.isDown(37)) { if (Math.abs(xv) > 0.5) { if (xv > 0) { xv -= 1; } if (xv < 0) { xv += 1; } } } } if (health < 100 && health > 0) { health += 0.1; } if (Key.isDown(87) || Key.isDown(38)) { if (jump > 0 && yv <= 0 && pressdown != true) { yv = 10; jump = 0; dustkick(); if (der < 10) { bod.gotoAndPlay(20); } if (der >= 10) { bod.gotoAndPlay(51); } pressdown = true; } if (jump < 0 && yv <= 2 && pressdown != true && doublejump != true) { yv = 10; jump = 0; if (der < 10) { bod.gotoAndPlay(20); } if (der >= 10) { bod.gotoAndPlay(35); } doublejump = true; pressdown = true; } } if (!Key.isDown(87) && !Key.isDown(38)) { pressdown = false; } bod.arm.gotoAndStop(gun); gsn = _parent.gun[gun]; firerate = gsn[3]; capacity = gsn[2]; gunname = gsn[4]; ammo = gsn[0]; firetype = gsn[1]; accuracy = gsn[5]; if (firegun == true && gunshot <= 0) { if (!Key.isDown(83) && !Key.isDown(40)) { fireg(); } if (Key.isDown(83) || Key.isDown(40)) { throwgrenade(); } } if (gunshot > 0) { gunshot -= 1; } if (_parent['g' + gun][0] <= 0) { } if (Math.abs(_parent._y + 25) > 1) { _parent._y += (-25 - _parent._y) / 10; } if (Math.abs(_parent._y + 25) <= 1) { _parent._y = -25; } if (_x < _parent.bl._x + 50) { _x = _parent.bl._x + 50; if (xv < 0) { xv = 0; } } if (_x > _parent.br._x - 50) { _x = _parent.br._x - 50; if (xv > 0) { xv = 0; } } if (health > 0) { _parent._parent.hp.gotoAndStop(Math.round(1 + health / 2)); } } if (gun != 1) { _parent._parent.hp.ammo = _parent['g' + gun][0]; } if (gun == 1) { _parent._parent.hp.ammo = ' '; } onplat -= 1; immune -= 1; _parent._parent.hp.gun.gotoAndStop(gun); if (_parent['g' + gun][0] > _parent['g' + gun][4]) { _parent['g' + gun][0] = _parent['g' + gun][4]; } if (_parent.koff >= _parent.eoff && _parent.eoff > 0) { if (_parent.bossmode != true) { _parent.nextwave(); } if (_parent.bossmode == true) { _parent.eoff += 5; } } _parent._parent.hp.gunname = _parent['g' + gun][4]; if (health <= 0) { if (bod.currentFrame <= 100) { bod.gotoAndPlay(101); } _parent._parent.hp.gotoAndStop(1); } if (_parent.combo > 0) { _parent.combo -= 0.01666666666666667; } _parent._parent.hp.combo.gotoAndStop(Math.round(1 + _parent.combo)); if (health < 100 && carryon[1] > 0) { _parent._parent.hp.hpac._visible = true; if (carryon[1] > 1) { } if (carryon[1] <= 1) { } } if (carryon[1] <= 0) { _parent._parent.hp.hpac = ''; } if (_parent._parent.healthboost == true || health <= 10 && _parent.win != true && carryon[1] > 0) { healsound.start(0, 0); healsound.start(0, 0); _root.healthdeduct = 1; _parent._parent.healthboost = false; health = 100; carryon[1] -= 1; } if (immune > 0) { imm += 1; if (imm > 3) { _visible = false; } if (imm > 5) { _visible = true; imm = 0; } } if (immune < 0) { _visible = true; } if (_parent['g' + gun][0] > _parent['g' + gun][6]) { _parent['g' + gun][0] = _parent['g' + gun][6]; } _parent._parent.hp.nades = carryon[0]; if (health < 0) { if (_currentframe <= 1) { play(); } } if (_currentframe > 2 && _currentframe < 10) { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); } _parent._parent.hp.hpac = carryon[1]; _root.carryonreplace = carryon; _parent._parent.hp.cash = carryon[2]; }; imm = 0; onMouseDown = function () { firegun = true; }; onMouseUp = function () { firegun = false; }; } frame 31 { stop(); } } movieClip 832 { frame 1 { stop(); } } movieClip 833 { frame 1 { function fireoff() { _x = _parent.player._x + _parent.edgex; _y = _parent.player._y - 25 + _parent.edgey; _parent.shotsfired += 1; 5; 5; 5; 5; 5; 5; var v2 = new Array[5](); _rotation = Math.random() * _parent.player.accuracy - Math.random() * _parent.player.accuracy + 180 + _parent.edger; dmg = v2[_parent.player.gun - 1]; gotoAndStop(1); } function ricochet() { gotoAndStop(2); var v2 = new Sound(); v2.attachSound('rico'); v2.start(0, 0); _parent.spx = _x; _parent.spy = _y; _parent.sparkup(); } function hit() { gotoAndStop(2); } function hitflesh() { _parent.bullethit += 1; gotoAndStop(2); } hbx = 0; hby = 0; damage = 0; dmg = 0; onEnterFrame = function () { if (_currentframe <= 1 && _root.paused_game != true) { _x = _x - 40 * Math.cos(_rotation * 0.0174532925199433); _y = _y - 40 * Math.sin(_rotation * 0.0174532925199433); hbx = -40 * Math.cos(_rotation * 0.0174532925199433); hby = -40 * Math.sin(_rotation * 0.0174532925199433); } }; } frame 2 { stop(); } } movieClip 836 { frame 1 { function bounce() { if (yv < 0) { var v1 = new Sound(); v1.attachSound('shl'); v1.start(0, 0); yv *= -0.7; bouncecounter -= 1; } } yv = 2 + Math.random() * 4; xv = Math.random() * 10 - Math.random() * 10; bouncecounter = 2; rot = Math.random() * 10 - Math.random() * 10; _parent._y = _parent._parent.player._y; _parent._x = _parent._parent.player._x; onEnterFrame = function () { if (_root.paused_game != true) { _parent._y -= yv; yv -= 0.5; _parent._x -= xv; xv *= 0.98; _rotation = _rotation + 5; } if (bouncecounter <= 0) { _parent.gotoAndStop(1); } if (_parent._y >= 430) { bounce(); } }; } frame 2 { stop(); } } movieClip 837 { frame 1 { function ost() { gotoAndStop(2); } stop(); } } movieClip 840 { } movieClip 841 { } movieClip 842 { frame 1 { function fireoff() { 5; 5; 5; 5; 5; 5; var v2 = new Array[5](); dmg = v2[_parent.player.gun - 1]; gotoAndStop(1); } function hit() { gotoAndStop(2); } hbx = 0; hby = 0; damage = 0; dmg = 0; onEnterFrame = function () { if (_currentframe <= 1 && _root.paused_game != true) { _x = _x - 6 * Math.cos(_rotation * 0.0174532925199433); _y = _y - 6 * Math.sin(_rotation * 0.0174532925199433); hbx = -10 * Math.cos(_rotation * 0.0174532925199433); hby = -10 * Math.sin(_rotation * 0.0174532925199433); } }; } frame 2 { stop(); } } movieClip 845 { } movieClip 846 { frame 1 { stop(); } frame 2 { play(); } frame 19 { stop(); } } movieClip 848 { frame 1 { wid = _width / 2; hei = _height / 2; _visible = false; onEnterFrame = function () { xpo = _parent._parent._x + _x; ypo = _parent._parent._y + _y; i = 1; while (i <= _parent._parent._parent.tb + 3) { if (Math.abs(xpo - _parent._parent._parent['bullet' + i]._x - _parent._parent._parent['bullet' + i].hbx) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y - _parent._parent._parent['bullet' + i].hby) <= hei || Math.abs(xpo - _parent._parent._parent['bullet' + i]._x + _parent._parent._parent['bullet' + i].hbx) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y + _parent._parent._parent['bullet' + i].hby) <= hei) { if (_parent._parent._parent['bullet' + i]._currentframe <= 1) { _parent._parent._parent['bullet' + i].hit(); _parent._parent._parent['bullet' + i].hitflesh(); _parent._parent.headdamage(); } } ++i; } }; } } movieClip 850 { } movieClip 851 { } movieClip 852 { frame 1 { function headdamage() { var v2 = new Sound(); v2.attachSound('targethit'); v2.start(0, 0); _parent._parent.tutorial.targethit(); play(); } stop(); health = 100; onEnterFrame = function () { if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); _parent._parent.tutorial.targethit2(); health = 0; } } }; } frame 20 { stop(); } } movieClip 853 { frame 1 { function headdamage() { var v1 = new Sound(); v1.attachSound('targethit'); v1.start(0, 0); } stop(); health = 100; onEnterFrame = function () { if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); play(); _parent._parent.tutorial.targethit2(); health = 0; } } }; } frame 20 { stop(); } } movieClip 854 { frame 1 { wid = _width / 2; hei = _height / 2; _visible = false; onEnterFrame = function () { xpo = _parent._parent._x + _x; ypo = _parent._parent._y + _y; i = 1; while (i <= _parent._parent._parent.tb + 3) { if (Math.abs(xpo - _parent._parent._parent['bullet' + i]._x - _parent._parent._parent['bullet' + i].hbx) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y - _parent._parent._parent['bullet' + i].hby) <= hei || Math.abs(xpo - _parent._parent._parent['bullet' + i]._x + _parent._parent._parent['bullet' + i].hbx) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y + _parent._parent._parent['bullet' + i].hby) <= hei) { if (_parent._parent._parent['bullet' + i]._currentframe <= 1) { _parent._parent._parent['bullet' + i].hit(); _parent._parent._parent['bullet' + i].hitflesh(); duplicateMovieClip(_parent._parent._parent.bld, 'blo' + _parent._parent._parent.bln, _parent._parent._parent.bln + 1000); _parent._parent._parent['blo' + _parent._parent._parent.bln]._x = _parent._parent._x - 30 * (_parent._parent._xscale / 100); _parent._parent._parent['blo' + _parent._parent._parent.bln]._y = _parent._parent._parent['bullet' + i]._y; _parent._parent._parent['blo' + _parent._parent._parent.bln].gotoAndPlay(1); _parent._parent._parent.bln += 1; _parent._parent.headdamage(); } } ++i; } }; } } movieClip 856 { frame 1 { wid = _width / 2; hei = _height / 2; _visible = false; onEnterFrame = function () { xpo = _parent._parent._x + _x; ypo = _parent._parent._y + _y; i = 1; while (i <= _parent._parent._parent.tb + 3) { if (Math.abs(xpo - _parent._parent._parent['bullet' + i]._x - _parent._parent._parent['bullet' + i].hbx) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y - _parent._parent._parent['bullet' + i].hby) <= hei || Math.abs(xpo - _parent._parent._parent['bullet' + i]._x) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y) <= hei) { if (_parent._parent._parent['bullet' + i]._currentframe <= 1) { _parent._parent._parent['bullet' + i].hitflesh(); duplicateMovieClip(_parent._parent._parent.bld, 'blo' + _parent._parent._parent.bln, _parent._parent._parent.bln + 1000); _parent._parent._parent['blo' + _parent._parent._parent.bln]._x = _parent._parent._x - 30 * (_parent._parent._xscale / 100); _parent._parent._parent['blo' + _parent._parent._parent.bln]._y = _parent._parent._parent['bullet' + i]._y; _parent._parent._parent['blo' + _parent._parent._parent.bln].gotoAndPlay(1); _parent._parent._parent.bln += 1; _parent._parent.bodydamage(); _parent._parent._parent['bullet' + i].hit(); } } if (Math.abs(_parent._parent._x - _parent._parent._parent.player._x) <= 70 && Math.abs(_parent._parent._y - _parent._parent._parent.player._y) <= 70 && _parent._parent._parent.player.cra == 2) { _parent._parent.bodydamage(); } ++i; } }; } } movieClip 859 { } movieClip 862 { } movieClip 864 { } movieClip 867 { } movieClip 870 { } movieClip 873 { } movieClip 876 { } movieClip 877 { } movieClip 881 { frame 1 { _visible = false; onEnterFrame = function () { if (_root.paused_game == true) { _parent.stop(); } if (_root.paused_game != true) { _parent.play(); } }; } } movieClip 886 { } movieClip 888 { } movieClip 889 { } movieClip 891 { } movieClip 893 { } movieClip 894 { } movieClip 895 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 40 { gotoAndStop(1); } instance of movieClip 756 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 898 { } movieClip 901 { } movieClip 903 { } movieClip 906 { } movieClip 909 { } movieClip 912 { } movieClip 915 { } movieClip 916 { } movieClip 917 { } movieClip 919 { } movieClip 920 { } movieClip 921 { } movieClip 923 { } movieClip 924 { } movieClip 926 { } movieClip 927 { } movieClip 928 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } instance of movieClip 924 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 40 { gotoAndStop(1); } instance of movieClip 924 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 931 { } movieClip 934 { } movieClip 936 { } movieClip 939 { } movieClip 942 { } movieClip 945 { } movieClip 948 { } movieClip 949 { } movieClip 950 { } movieClip 952 { } movieClip 953 { } movieClip 954 { } movieClip 956 { } movieClip 957 { } movieClip 959 { } movieClip 960 { } movieClip 961 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } instance of movieClip 957 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 40 { gotoAndStop(1); } instance of movieClip 957 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 963 { } movieClip 966 { } movieClip 968 { } movieClip 971 { } movieClip 974 { } movieClip 977 { } movieClip 980 { } movieClip 981 { } movieClip 982 { } movieClip 984 { } movieClip 985 { } movieClip 986 { } movieClip 988 { } movieClip 989 { } movieClip 991 { } movieClip 992 { } movieClip 993 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } instance of movieClip 989 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 40 { gotoAndStop(1); } instance of movieClip 989 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 994 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { setbomb(); dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function fireg() { _parent['ebullet' + _parent.ebulletno].fireoff(); if (_xscale > 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 0; } if (_xscale < 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 180; } _parent['ebullet' + _parent.ebulletno]._x = _x - 60 * (_xscale / 100); _parent['ebullet' + _parent.ebulletno]._y = _y - 10; var v2 = new Sound(); v2.attachSound('sg1'); v2.start(0, 0); aim = aimset; _parent.ebulletno += 1; body.gotoAndPlay('gun'); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 500; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = false; bombtype = true; meleetype = true; jumptype = false; rangebomber = false; gunspawner = false; gun = 1; yv = 0; he = _height / 2; setbomb(); bomb = 90; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 0; trset = turnaround; speed = 3; onEnterFrame = function () { if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (body._currentframe < 65) { if (Math.abs(dmg) > 0.5) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } } if (rangebomber != true) { if (body._currentframe <= 50) { if (_parent.player._x > _x + 20) { if (_xscale < 0) { if (_parent.player._y >= _y - 30 && jumptype != true || _parent.player.jump <= 0 || Math.abs(_parent.player._x - _x) > 300 && shoottype == true || Math.abs(_parent.player._x - _x) > 70 && meleetype == true) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1 && _parent.player.health > 0) { body.gotoAndPlay(2); } } } turnaround = trset; } if (_xscale > 0) { turnaround -= 1; if (turnaround <= 0) { _xscale = -100; turnaround = trset; } } } if (_parent.player._x < _x - 20) { if (_xscale > 0) { if (_parent.player._y >= _y - 30 && jumptype != true || _parent.player.jump <= 0 || Math.abs(_parent.player._x - _x) > 300 && shoottype == true || Math.abs(_parent.player._x - _x) > 70 && meleetype == true) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1 && _parent.player.health > 0) { body.gotoAndPlay(2); } } } turnaround = trset; } if (_xscale < 0) { turnaround -= 1; if (turnaround <= 0) { _xscale = 100; turnaround = trset; } } } } } if (rangebomber == true) { brange = 200; if (_parent.player._x > _x + 20) { _xscale = -100; } if (_parent.player._x < _x - 20) { _xscale = 100; } if (body._currentframe <= 50) { if (Math.abs(_x - _parent.player._x) > brange) { if (_parent.player._x > _x + brange) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } turnaround = trset; } if (_parent.player._x < _x - brange) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } turnaround = trset; } } } if (Math.abs(_x - _parent.player._x) <= brange) { if (body._currentframe > 1) { body.gotoAndStop(1); } } if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } if (bomb <= 0) { throwbomb(); } } if (Math.abs(x - _parent.player._x) > 200) { aim = aimset; } if (Math.abs(_x - _parent.player._x) <= 200) { if (_parent.player.jump > 0) { if (shoottype == true) { aim -= 1; if (body._currentframe < 20 || body.currentFrame > 40) { if (jumpr > 0) { body.gotoAndPlay('gun'); } } if (aim <= 0) { if (body._currentframe < 65) { if (body._currentframe >= 54 && body._currentframe <= 56) { fireg(); } } } } if (Math.abs(_x - _parent.player._x) <= 100) { if (meleetype == true && body._currentframe < 65 && health > 0 && rangebomber != true) { dmg = -5 * (_xscale / 100); body.gotoAndPlay(65); } if (body._currentframe > 75 && body._currentframe < 80 && _parent.player.immune <= 0 && Math.abs(_y - _parent.player._y) <= _height / 2) { _parent.player.health -= 20; _parent.player.immune = 10; _parent.player.meleehit(); _parent.player.combobreak(); if (_parent.player._x < _x) { _parent.player.xv = -10; } if (_parent.player._x > _x) { _parent.player.xv = 10; } } } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); health = 0; } } }; } } movieClip 995 { frame 1 { kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 2 { _root.changeto = 1; _root.changetrack(); } frame 5 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 9 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 11 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 13 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 18 { kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 19 { stop(); kills = 0; killset = 50; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 998 { } movieClip 999 { } movieClip 1001 { } movieClip 1002 { } movieClip 1011 { frame 1 { stop(); } } movieClip 1016 { frame 1 { stop(); } } movieClip 1031 { } movieClip 1035 { frame 1 { stop(); } } movieClip 1037 { } movieClip 1039 { } movieClip 1050 { } movieClip 1055 { } movieClip 1058 { frame 1 { stop(); } } movieClip 1076 { frame 1 { stop(); } frame 1 { function targethit() { targetshit += 1; trace(targetshit); } function targethit2() { targetshit2 += 1; trace(targetshit2); } maxf = _totalframes; tutframe = 1; tutorial_faze = 1; targetshit = 0; targetshit2 = 0; wp = 0; onEnterFrame = function () { if (_currentframe >= maxf - 1) { if (_parent.gp._currentframe <= 5) { _parent.gp.play(); trace('tutorial complete'); } } if (_currentframe <= 1) { tutframe += 1; if (tutframe > 450) { tutframe = 0; _parent.gp.play(); play(); } } if (_currentframe == 3) { if (targetshit >= 7) { play(); _parent.gp.play(); targetshit = 0; } } if (_currentframe == 5) { if (_parent.gp.player.carryon[0] <= 3) { _parent.gp.player.carryon[0] = 3; } if (targetshit2 >= 2) { play(); _parent.gp.play(); weaponselected = _parent.gp.player.gun; targetshit = 0; } } if (_currentframe == 7) { if (weaponselected != _parent.gp.player.gun) { wp += 1; weaponselected = _parent.gp.player.gun; } if (wp >= 3) { play(); _parent.gp.play(); } } if (_currentframe == 9) { tutframe += 1; if (tutframe > 240) { tutframe = 0; _parent.gp.play(); play(); } } }; } frame 3 { stop(); } frame 5 { stop(); } frame 7 { stop(); } frame 9 { stop(); } frame 25 { stop(); } } // unknown tag 88 length 64 movieClip 1082 { frame 1 { function trig() { _root.retry(); trace('works'); } } } movieClip 1085 { frame 1 { function trig() { _root.nextlevel(); trace('works'); } if (_parent._parent._currentframe > 120) { _visible = false; } } } movieClip 1086 { frame 1 { stop(); } frame 55 { stop(); } } movieClip 1087 { } movieClip 1089 { } movieClip 1091 { } movieClip 1094 { } movieClip 1096 { } movieClip 1099 { frame 1 { dta = Math.round(_root.windata[2]); } frame 1 { stop(); _visible = false; } frame 36 { stop(); } } movieClip 1102 { } movieClip 1104 { frame 1 { dta = Math.round(_root.windata[1]); } frame 1 { stop(); _visible = false; } frame 36 { stop(); } } movieClip 1108 { frame 1 { dta = Math.round(_root.windata[0]) + '%'; } frame 1 { stop(); _visible = false; } frame 36 { stop(); } } movieClip 1112 { } movieClip 1116 { frame 1 { dta = Math.round(_root.windata[3]); } frame 1 { stop(); _visible = false; } frame 36 { stop(); } } movieClip 1119 { frame 1 { stop(); } } movieClip 1120 { frame 1 { stop(); } frame 30 { stop(); } } movieClip 1122 { frame 1 { stop(); } frame 16 { stop(); } } movieClip 1123 { frame 1 { stop(); } frame 15 { stop(); } } movieClip 1124 { frame 1 { function medalunlock() { if (medal._currentframe < 25) { medal.play(); } var v1 = new Sound(); v1.attachSound('sp'); v1.start(0, 0); } _root.carryonoverwrite(); rateframe = 0; playmusic = false; su = 0; hpd = 0; var filsound = new Sound(); filsound.attachSound('fil'); var wrong = new Sound(); wrong.attachSound('wrong'); onEnterFrame = function () { if (_x < -14) { _x = _x + Math.abs(200 - _x) / 10; } if (_x >= -14) { _x = 6; if (playmusic != true) { sb = new Sound(); sb.attachSound('scoreboard'); sb.start(0, 0); playmusic = true; } if (killstreak._currentframe < 35) { killstreak._visible = true; killstreak.play(); } if (killstreak._currentframe >= 35) { if (murders._currentframe < 35) { murders._visible = true; murders.play(); } } if (murders._currentframe >= 35) { if (shotsfired._currentframe < 35) { shotsfired._visible = true; shotsfired.play(); } } if (shotsfired._currentframe >= 35) { if (time._currentframe < 35) { time._visible = true; time.play(); } } if (time._currentframe >= 35) { starrate1 = (_root.windata[0] / 100) * 3; if ((_root.timegoal / _root.windata[3]) * 2.5 < 3) { starrate2 = (_root.timegoal / _root.windata[3]) * 2.5; } if ((_root.timegoal / _root.windata[3]) * 2.5 >= 3) { starrate2 = 3; } trace(starrate2); rating = Math.round((starrate1 + starrate2) * 16) - hpd; rank = Math.abs((rater._currentframe - (rating + 10)) / 30); if (rater._currentframe < rating) { rater.play(); su += 1; if (cashindicator._currentframe < 2) { cashindicator.play(); } if (rater._currentframe < rating && rater._currentframe < 75) { _root.carryon[2] += 1; } if (rater._currentframe >= rating || rater._currentframe >= 75) { if (hpd != _root.healthdeduct) { hpd = _root.healthdeduct; } } if (rater._currentframe < 75) { if (rater._currentframe == 25) { if (st1._currentframe <= 1) { st1.play(); if (_root.rank[_root.wave - 1] <= 1) { _root.rank[_root.wave - 1] = 1; } } } if (rater._currentframe == 50) { if (st2._currentframe <= 1) { st2.play(); if (_root.rank[_root.wave - 1] <= 2) { _root.rank[_root.wave - 1] = 2; } } } if (rater._currentframe >= 74) { if (st3._currentframe <= 1) { if (_root.rank[_root.wave - 1] <= 3) { _root.rank[_root.wave - 1] = 3; } st3.play(); } } if (st3._currentframe > 1 && rating <= 2.5) { if (_root.rank[_root.wave - 1] > 2) { _root.rank[_root.wave - 1] = 2; wrong.start(0); } st3.gotoAndStop(1); } if (st2._currentframe > 1 && rating <= 1.5) { if (_root.rank[_root.wave - 1] > 1) { _root.rank[_root.wave - 1] = 1; } wrong.start(0); st2.gotoAndStop(1); } if (su > 2) { filsound.start(0, 0); su = 0; } } } if (rater._currentframe >= 75 || rater._currentframe > rating) { _parent.displaymenu(); rater.stop(); if (store._currentframe < 2) { store.play(); } if (medal._currentframe < 2) { _root.medalunlock(); } if (medal._currentframe < 100) { medalunlock(); } } } } cashindicator.cashdisplay.cash = _root.carryon[2]; store.healthdisplay.cash = 50 + Math.round(25 * _root.carryon[1]); store.nadedisplay.cash = 50 + Math.round(8.333333333333334 * _root.carryon[0]); store.ammodisplay.cash = 75; _root.cost1 = 50 + Math.round(25 * _root.carryon[1]); _root.cost2 = 50 + Math.round(8.333333333333334 * _root.carryon[0]); _root.cost3 = 75; }; } } movieClip 1138 { frame 1 { gotoAndStop(random(_totalframes) + 2); } } movieClip 1146 { } button 1150 { on (release) { _root.sponsorlink2(); } } movieClip 1151 { frame 1 { function medalunlock() { if (medal._currentframe < 25) { medal.play(); } } rateframe = 0; playmusic = false; su = 0; var filsound = new Sound(); filsound.attachSound('fil'); onEnterFrame = function () { if (_x < -14) { _x = _x + Math.abs(200 - _x) / 10; } if (_x >= -14) { _x = 6; _parent.displaymenu(); if (playmusic != true) { } } if (cashindicator._currentframe < 2) { cashindicator.play(); } if (cashindicator._currentframe >= 14) { if (store._currentframe < 2) { store.play(); } } cashindicator.cashdisplay.cash = _root.carryon[2]; store.healthdisplay.cash = 50 + Math.round(25 * _root.carryon[1]); store.nadedisplay.cash = 50 + Math.round(8.333333333333334 * _root.carryon[0]); _root.cost1 = 50 + Math.round(25 * _root.carryon[1]); _root.cost2 = 50 + Math.round(8.333333333333334 * _root.carryon[0]); }; } } movieClip 1152 { frame 1 { function displaymenu() { if (menuitem._currentframe < menuitem._totalframes) { menuitem.play(); } } } frame 1 { stop(); } frame 101 { stop(); } frame 300 { stop(); } } movieClip 1155 { frame 1 { stop(); } frame 145 { stop(); } } movieClip 1156 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 50; ebulletno = 1; bombno = 1; spawngunx5(); eonscreen = -1; eoff = 0; koff = 0; } frame 4 { stop(); kills = 0; killset = 50; ebulletno = 1; spawngunx5(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1158 { frame 1 { wid = _width / 2; hei = _height / 2; _visible = false; onEnterFrame = function () { if (_parent._parent._xscale > 0) { xpo = _parent._parent._x + _x; } if (_parent._parent._xscale < 0) { xpo = _parent._parent._x - _x; } ypo = _parent._parent._y + _y; i = 1; while (i <= _parent._parent._parent.tb + 3) { if (Math.abs(xpo - _parent._parent._parent['bullet' + i]._x - _parent._parent._parent['bullet' + i].hbx) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y - _parent._parent._parent['bullet' + i].hby) <= hei || Math.abs(xpo - _parent._parent._parent['bullet' + i]._x) <= wid && Math.abs(ypo - _parent._parent._parent['bullet' + i]._y) <= hei) { if (_parent._parent._parent['bullet' + i]._currentframe <= 1) { _parent._parent._parent['bullet' + i].hit(); _parent._parent._parent['bullet' + i].ricochet(); } } ++i; } }; } } movieClip 1160 { } movieClip 1162 { } movieClip 1164 { } movieClip 1166 { } movieClip 1168 { } movieClip 1171 { } movieClip 1172 { } movieClip 1176 { } movieClip 1179 { } movieClip 1182 { } movieClip 1184 { } movieClip 1186 { } movieClip 1188 { } movieClip 1190 { } movieClip 1191 { } movieClip 1192 { } movieClip 1194 { } movieClip 1196 { } movieClip 1198 { } movieClip 1199 { frame 1 { yv = Math.random() * 6; rot = Math.random() * 10 - Math.random() * 10; onEnterFrame = function () { if (_root.paused_game != true) { _y = _y - yv; yv -= 0.6; _rotation = _rotation + rot; } }; } } movieClip 1200 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } frame 40 { gotoAndStop(1); } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } frame 162 { gotoAndStop(160); } } movieClip 1201 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function fireg() { _parent['ebullet' + _parent.ebulletno].fireoff(); if (_xscale > 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 0; } if (_xscale < 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 180; } _parent['ebullet' + _parent.ebulletno]._x = _x - 60 * (_xscale / 100); _parent['ebullet' + _parent.ebulletno]._y = _y - 10; var v2 = new Sound(); v2.attachSound('sg1'); v2.start(0, 0); aim = aimset; _parent.ebulletno += 1; body.gotoAndPlay('gun'); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 500; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = false; bombtype = true; meleetype = true; jumptype = false; rangebomber = false; gunspawner = false; gun = 1; yv = 0; he = _height / 2; bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 50; trset = turnaround; speed = 3; onEnterFrame = function () { if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (Math.abs(dmg) > 0.5) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (Math.abs(_parent.player._y - _y) <= 40) { if (_xscale > 0 && _parent.player._x > _x - 60 && _parent.player._x < _x) { _parent.player._x = _x - 60; if (_parent.player.xv > 0) { _parent.player.xv = 0; } } if (_xscale < 0 && _parent.player._x < _x + 60 && _parent.player._x > _x) { _parent.player._x = _x + 60; if (_parent.player.xv > 0) { _parent.player.xv = 0; } } } if (body._currentframe <= 50) { if (_parent.player._x > _x + 30) { if (speed < 5) { speed += 0.5; } } if (_parent.player._x < _x - 30) { if (speed > -5) { speed -= 0.5; } } if (Math.abs(speed) > 1) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } } if (speed < -1) { _xscale = 100; } if (speed > 1) { _xscale = -100; } } if (Math.abs(x - _parent.player._x) > 200) { aim = aimset; } if (Math.abs(_x - _parent.player._x) <= 200) { if (_parent.player.jump > 0) { if (shoottype == true) { aim -= 1; if (body._currentframe < 20 || body.currentFrame > 40) { if (jumpr > 0) { body.gotoAndPlay('gun'); } } if (aim <= 0) { if (body._currentframe < 65) { if (body._currentframe >= 54 && body._currentframe <= 56) { fireg(); } } } } if (Math.abs(_x - _parent.player._x) <= 100) { if (meleetype == true && body._currentframe < 65 && health > 0 && rangebomber != true) { dmg = -5 * (_xscale / 100); body.gotoAndPlay(65); } if (body._currentframe > 75 && body._currentframe < 80 && _parent.player.immune <= 0 && Math.abs(_y - _parent.player._y) <= _height / 2) { _parent.player.health -= 20; _parent.player.immune = 10; _parent.player.meleehit(); _parent.player.combobreak(); if (_parent.player._x < _x) { _parent.player.xv = -10; } if (_parent.player._x > _x) { _parent.player.xv = 10; } } } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); } } }; } } movieClip 1202 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 6 { stop(); kills = 0; killset = 2; ebulletno = 1; spawngunx3(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 10 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 12 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngunx3(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 14 { stop(); kills = 0; killset = 2; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1204 { } movieClip 1206 { } movieClip 1207 { } movieClip 1210 { } movieClip 1212 { } movieClip 1215 { } movieClip 1217 { } movieClip 1223 { } movieClip 1227 { } movieClip 1229 { } movieClip 1231 { } movieClip 1233 { } movieClip 1235 { } movieClip 1236 { } movieClip 1239 { } movieClip 1240 { } movieClip 1241 { } movieClip 1244 { } movieClip 1247 { } movieClip 1249 { } movieClip 1250 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } frame 40 { gotoAndStop(1); } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 1251 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; gun = 1 + random(5); firegun = fireout[gun - 1]; firegunset = firegun; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function firegat() { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; var v5 = new Sound(); v5.attachSound('sg'); var v6 = new Sound(); v6.attachSound('sg1'); var v4 = new Sound(); v4.attachSound('sg2'); var v2 = new Sound(); v2.attachSound('sg5'); var v3 = new Sound(); v3.attachSound('sg4'); var v7 = new Sound(); v7.attachSound('sg6'); if (gun == 1) { v6.start(0, 0); } if (gun == 2) { v5.start(0, 0); } if (gun == 3) { v4.start(0, 0); } if (gun == 4) { v3.start(0, 0); } if (gun == 5) { v2.start(0, 0); } if (gun == 6) { v7.start(0, 0); } aim = aimset; if (gun == 2) { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + Math.random() * 10 - Math.random() * 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + Math.random() * 10 - Math.random() * 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; } body.arrn.gun.play(); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 500; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = true; bombtype = true; meleetype = false; jumptype = false; rangebomber = false; gunspawner = true; gun = 1 + random(5); var fireout = new Array(40, 120, 30, 50, 40, 30, 30, 30, 30); firegun = fireout[gun - 1]; firegunset = firegun; yv = 0; he = _height / 2; bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 0; trset = turnaround; speed = 5; onEnterFrame = function () { if (gun > 6) { gun = 6; } if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { rot = Math.atan2(_parent.player._y - _y, _parent.player._x - _x) / 0.0174532925199433; if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (onscreen == true) { firegun -= 1; } if (firegun <= 0) { firegat(); firegun = firegunset; } if (Math.abs(dmg) > 1) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (_parent.player._x > _x) { pointx = _parent.player._x - 200; _xscale = -100; body.arm._rotation = 180 - rot; } if (_parent.player._x < _x) { pointx = _parent.player._x + 200; body.arm._rotation = rot; _xscale = 100; } body.arm.gotoAndStop(gun); if (Math.abs(_x - pointx) <= 40) { body.gotoAndStop(1); } if (rangebomber != true) { if (body._currentframe <= 50) { if (pointx > _x + 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } if (pointx < _x - 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); } } }; } } movieClip 1252 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 100; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 4 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 6 { stop(); kills = 0; killset = 10; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1254 { } movieClip 1256 { } movieClip 1258 { } movieClip 1260 { } movieClip 1262 { } movieClip 1264 { } movieClip 1266 { } movieClip 1267 { } movieClip 1268 { frame 1 { stop(); } instance of movieClip 1267 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1270 { } movieClip 1272 { } movieClip 1273 { } movieClip 1277 { } movieClip 1279 { } movieClip 1281 { } movieClip 1283 { } movieClip 1286 { } movieClip 1287 { } movieClip 1288 { } movieClip 1289 { } movieClip 1290 { } movieClip 1291 { } movieClip 1293 { } movieClip 1294 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } frame 40 { gotoAndStop(1); } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } frame 162 { stop(); } } movieClip 1295 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); _parent.displayhp = Math.round(health * hpratio); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); _parent.displayhp = Math.round(health * hpratio); health -= 200; } } function armordamage() { if (health > 0) { _parent.displayhp = Math.round(health * hpratio); } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; gun = 1 + random(5); firegun = fireout[gun - 1]; firegunset = firegun; } function die() { if (_parent.bossos <= 1) { _parent.bossmode = false; _parent.koff = _parent.eoff - _parent.eonscreen; trace('enemies remaining=' + _parent.eonscreen); _parent.kills = _parent.killset - _parent.eonscreen; } _parent.bossos -= 1; _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.spawngunx3(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function firegat() { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot; _parent['ebullet' + _parent.ebulletno]._x = _x + 130 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 80 + 130 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; var v5 = new Sound(); v5.attachSound('sg'); var v6 = new Sound(); v6.attachSound('sg1'); var v4 = new Sound(); v4.attachSound('sg2'); var v2 = new Sound(); v2.attachSound('sg5'); var v3 = new Sound(); v3.attachSound('sg4'); var v7 = new Sound(); v7.attachSound('sg6'); if (gun == 1) { v6.start(0, 0); } if (gun == 2) { v5.start(0, 0); } if (gun == 3) { v4.start(0, 0); } if (gun == 4) { v3.start(0, 0); } if (gun == 5) { v2.start(0, 0); } if (gun == 6) { v7.start(0, 0); } aim = aimset; if (gun == 2) { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + 40; _parent['ebullet' + _parent.ebulletno]._x = _x + 130 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 80 + 130 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot - 40; _parent['ebullet' + _parent.ebulletno]._x = _x + 130 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 80 + 130 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 130 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 80 + 130 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot - 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 130 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 80 + 130 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; } body.arrn.gun.play(); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 20000; hpratio = 100 / health; hpset = health; id = _parent.bossos; _parent.bossos += 1; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = true; bombtype = true; meleetype = false; jumptype = false; rangebomber = false; gunspawner = true; gun = 2; var fireout = new Array(40, 120, 30, 50, 40, 30, 30, 30, 30); firegun = 70; firegunset = firegun; yv = 0; _parent.displayhp = Math.round(health * hpratio); he = _height / 2; bomb = 30; bombset = bomb; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 0; trset = turnaround; speed = 4; inuse = 0; onEnterFrame = function () { if (gun > 6) { gun = 6; } inuse -= 1; _parent['bspace' + id] = _x; if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { absrot = Math.abs(Math.atan2(_parent.player._y - _y, _parent.player._x - _x) / 0.0174532925199433); if (body._currentframe <= 100) { if (_xscale > 0) { rot = 180; body.arm2.gotoAndStop(27); } if (_xscale < 0) { rot = 0; body.arm2.gotoAndStop(27); } if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); if (Math.abs(_x - _parent.player._x) <= 35) { if (_parent.player._y > _y - 116 && _parent.player._y < _y) { _parent.player._y = _y - 116; _parent.player.jump = 5; inuse = 2; if (_parent.player.yv < 0) { _parent.player.yv = 0; } } } if (Math.abs(_y - _parent.player._y) <= 100) { if (_parent.player._x > _x - 80 && _parent.player._x < _x) { _parent.player._x = _x - 80; if (_parent.player.xv > 0) { _parent.player.xv = 0; } } if (_parent.player._x < _x + 80 && _parent.player._x > _x) { _parent.player._x = _x + 80; if (_parent.player.xv < 0) { _parent.player.xv = 0; } } } } if (onscreen == true) { firegun -= 1; } if (firegun <= 0) { firegat(); firegun = firegunset; } if (Math.abs(dmg) > 1) { } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (Math.abs(_x - _parent.player._x) > 50) { if (_parent.player._x > _x) { pointx = _parent.player._x - 200 - 100 * (id - 1); _xscale = -100; } if (_parent.player._x < _x) { pointx = _parent.player._x + 200 + 100 * (id - 1); _xscale = 100; } body.arm.gotoAndStop(gun); } if (Math.abs(_x - _parent.player._x) < 50) { } if (Math.abs(_x - pointx) <= 40) { body.gotoAndStop(1); } if (rangebomber != true) { if (body._currentframe <= 50) { if (pointx > _x + 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x + speed; if (inuse > 0) { _parent.player._x += speed; } if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } if (pointx < _x - 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x - speed; if (inuse > 0) { _parent.player._x -= speed; } if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 100 && body._currentframe < 125) { _parent.gx = _x + (Math.random() * 80 - Math.random() * 80); _parent.gy = _y - 45 + (Math.random() * 90 - Math.random() * 90); _parent.bloodsplatter(); } if (body._currentframe > 160 && resp == true) { body.gotoAndStop(160); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health -= 2000; } if (Math.abs(_x - _parent.nade._x) < 150 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health -= 200; } } }; } } movieClip 1296 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 130; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 4 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 6 { stop(); kills = 0; killset = 10; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 8 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); } } movieClip 1298 { } movieClip 1300 { } movieClip 1302 { } movieClip 1304 { } movieClip 1306 { } movieClip 1307 { } movieClip 1308 { } movieClip 1310 { } movieClip 1312 { } movieClip 1316 { } movieClip 1317 { } movieClip 1318 { } movieClip 1322 { } movieClip 1323 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 1324 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; } function die() { if (_parent.player.health > 0) { _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); _parent.bloodsplatter(); _parent.player.activeg = 5; _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } function expload() { health = 0; } stop(); health = 300; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = false; bombtype = true; meleetype = true; jumptype = false; rangebomber = false; gunspawner = false; gun = 1; runcycle = 1; yv = 0; he = _height / 2; bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 40; trset = turnaround; speed = 5; onEnterFrame = function () { if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (Math.abs(_x - _parent.player._x) <= 50 && Math.abs(_y - _parent.player._y) <= 50 && _parent.player.health > 0) { expload(); } if (Math.abs(dmg) > 0.5) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (body._currentframe < 100) { if (_parent.player._x > _x) { if (speed < 10) { speed += 1; } } if (_parent.player._x < _x) { if (speed > -10) { speed -= 1; } } if (body._currentframe > 20) { body.gotoAndPlay(2); } if (Math.abs(speed) > 1) { if (body._currentframe < 20) { _x = _x + speed; runcycle += Math.round(Math.abs(speed / 10)); if (body._currentframe <= 1) { body.gotoAndPlay(2); } body.gotoAndPlay(2 + runcycle); } } if (runcycle >= 18) { runcycle = 1; } if (speed < -1) { _xscale = 100; } if (speed > 1) { _xscale = -100; } } } } } if (health <= 0) { if (Math.abs(_x - _parent.player._x) <= 70 && Math.abs(_y - _parent.player._y) <= 50 && body._currentframe <= 105 && _parent.player.immune <= 0) { _parent.player.expload(); } if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0 && health > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; } if (Math.abs(_x - _parent.gx) < 50 && Math.abs(_y - _parent.gy) < 50 && _parent.player.activeg > 3) { health = 0; } } }; } } movieClip 1325 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 55; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 5 { stop(); kills = 0; killset = 10; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx3(); } frame 7 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1326 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 55; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 5 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 7 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } } movieClip 1328 { } movieClip 1329 { } movieClip 1332 { } movieClip 1334 { } movieClip 1336 { } movieClip 1338 { } movieClip 1340 { } movieClip 1341 { } movieClip 1343 { frame 1 { _visible = false; onEnterFrame = function () { if (_root.paused_game == true) { _parent.stop(); } if (_root.paused_game != true) { _parent.play(); } }; } } movieClip 1346 { } movieClip 1348 { } movieClip 1349 { } movieClip 1350 { } movieClip 1351 { } movieClip 1352 { } movieClip 1354 { } movieClip 1367 { } movieClip 1369 { } movieClip 1370 { } movieClip 1371 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } instance of movieClip 1367 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 40 { gotoAndStop(1); } instance of movieClip 1367 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 1372 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function fireg() { _parent['ebullet' + _parent.ebulletno].fireoff(); if (_xscale > 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 0; } if (_xscale < 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 180; } _parent['ebullet' + _parent.ebulletno]._x = _x - 60 * (_xscale / 100); _parent['ebullet' + _parent.ebulletno]._y = _y - 10; var v2 = new Sound(); v2.attachSound('sg1'); v2.start(0, 0); aim = aimset; _parent.ebulletno += 1; body.gotoAndPlay('gun'); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 500; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = false; bombtype = true; meleetype = true; jumptype = false; rangebomber = false; gunspawner = false; gun = 1; yv = 0; he = _height / 2; bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 0; trset = turnaround; speed = 5; onEnterFrame = function () { if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (Math.abs(dmg) > 0.5) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (rangebomber != true) { if (body._currentframe <= 50) { if (_parent.player._x > _x + 20) { if (_xscale < 0) { if (_parent.player._y >= _y - 30 && jumptype != true || _parent.player.jump <= 0 || Math.abs(_parent.player._x - _x) > 300 && shoottype == true || Math.abs(_parent.player._x - _x) > 70 && meleetype == true) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } } turnaround = trset; } if (_xscale > 0) { turnaround -= 1; if (turnaround <= 0) { _xscale = -100; turnaround = trset; } } } if (_parent.player._x < _x - 20) { if (_xscale > 0) { if (_parent.player._y >= _y - 30 && jumptype != true || _parent.player.jump <= 0 || Math.abs(_parent.player._x - _x) > 300 && shoottype == true || Math.abs(_parent.player._x - _x) > 70 && meleetype == true) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } } turnaround = trset; } if (_xscale < 0) { turnaround -= 1; if (turnaround <= 0) { _xscale = 100; turnaround = trset; } } } } } if (rangebomber == true) { brange = 200; if (_parent.player._x > _x + 20) { _xscale = -100; } if (_parent.player._x < _x - 20) { _xscale = 100; } if (body._currentframe <= 50) { if (Math.abs(_x - _parent.player._x) > brange) { if (_parent.player._x > _x + brange) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } turnaround = trset; } if (_parent.player._x < _x - brange) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1) { body.gotoAndPlay(2); } } turnaround = trset; } } } if (Math.abs(_x - _parent.player._x) <= brange) { if (body._currentframe > 1) { body.gotoAndStop(1); } } if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } if (bomb <= 0) { throwbomb(); } } if (Math.abs(x - _parent.player._x) > 200) { aim = aimset; } if (Math.abs(_x - _parent.player._x) <= 200) { if (_parent.player.jump > 0) { if (shoottype == true) { aim -= 1; if (body._currentframe < 20 || body.currentFrame > 40) { if (jumpr > 0) { body.gotoAndPlay('gun'); } } if (aim <= 0) { if (body._currentframe < 65) { if (body._currentframe >= 54 && body._currentframe <= 56) { fireg(); } } } } if (Math.abs(_x - _parent.player._x) <= 100) { if (meleetype == true && body._currentframe < 65 && health > 0 && rangebomber != true) { dmg = -5 * (_xscale / 100); body.gotoAndPlay(65); } if (body._currentframe > 75 && body._currentframe < 80 && _parent.player.immune <= 0 && Math.abs(_y - _parent.player._y) <= _height / 2) { _parent.player.health -= 20; _parent.player.immune = 10; _parent.player.meleehit(); _parent.player.combobreak(); if (_parent.player._x < _x) { _parent.player.xv = -10; } if (_parent.player._x > _x) { _parent.player.xv = 10; } } } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 150 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); } } }; } } movieClip 1373 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 5 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 9 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 11 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1374 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 100; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 8; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 5 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 50; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } } movieClip 1375 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 145; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 4 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 6 { stop(); kills = 0; killset = 10; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 8 { stop(); kills = 0; killset = 15; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 10 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); } frame 12 { stop(); kills = 0; killset = 15; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1378 { } movieClip 1380 { } movieClip 1382 { } movieClip 1384 { } movieClip 1387 { } movieClip 1390 { } movieClip 1391 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } frame 40 { gotoAndStop(1); } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 1392 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { rev.start(0, 0); setbomb(); dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.exploader(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function fireg() { _parent['ebullet' + _parent.ebulletno].fireoff(); if (_xscale > 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 0; } if (_xscale < 0) { _parent['ebullet' + _parent.ebulletno]._rotation = 180; } _parent['ebullet' + _parent.ebulletno]._x = _x - 60 * (_xscale / 100); _parent['ebullet' + _parent.ebulletno]._y = _y - 10; var v2 = new Sound(); v2.attachSound('sg1'); v2.start(0, 0); aim = aimset; _parent.ebulletno += 1; body.gotoAndPlay('gun'); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 600; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = false; bombtype = true; meleetype = true; jumptype = false; rangebomber = false; gunspawner = false; gun = 1; yv = 0; he = _height / 2; setbomb(); bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); var rev = new Sound(); rev.attachSound('rev'); turnaround = 0; trset = turnaround; speed = 14; onEnterFrame = function () { if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } _x = _x - speed * (_xscale / 100); body.w1._rotation -= speed; body.w2._rotation -= speed; if (_x < _parent.bl._x - 200 && _xscale > 0) { rev.start(0, 0); _xscale = -100; } if (_x > _parent.br._x + 200 && _xscale < 0) { rev.start(0, 0); _xscale = 100; } if (_parent.player._y < _y - 40 && _parent.player.jump > 0) { bomb -= 1; } if (bomb <= 0) { throwbomb(); } if (Math.abs(_x - _parent.player._x) <= 80) { if (body._currentframe < 65 || body._currentframe > 85) { body.gotoAndPlay(65); } if (body._currentframe > 65 && body._currentframe < 80 && _parent.player.immune <= 0 && Math.abs(_y - _parent.player._y) <= _height / 2) { _parent.player.health -= 30; _parent.player.immune = 10; _parent.player.runoverhit(); _parent.player.combobreak(); if (_parent.player._x < _x) { _parent.player.xv = -10; } if (_parent.player._x > _x) { _parent.player.xv = 10; } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 150 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; } } }; } } movieClip 1393 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 65; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 5 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 7 { stop(); kills = 0; killset = 20; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } frame 11 { stop(); kills = 0; killset = 10; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; spawngunx3(); koff = 0; } } movieClip 1395 { } movieClip 1396 { } movieClip 1397 { } movieClip 1398 { frame 1 { stop(); } instance of movieClip 1397 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1400 { } movieClip 1403 { } movieClip 1405 { } movieClip 1406 { frame 1 { stop(); } instance of movieClip 1397 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1408 { } movieClip 1411 { } movieClip 1412 { frame 1 { stop(); } instance of movieClip 1397 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1415 { } movieClip 1416 { frame 1 { stop(); } instance of movieClip 1397 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1419 { } movieClip 1420 { frame 1 { stop(); } instance of movieClip 1397 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1423 { } movieClip 1424 { frame 1 { stop(); } instance of movieClip 1397 { onClipEvent (load) { gotoAndStop(random(8)); } } } movieClip 1425 { } movieClip 1428 { } movieClip 1430 { } movieClip 1432 { } movieClip 1434 { } movieClip 1435 { } movieClip 1436 { } movieClip 1437 { } movieClip 1438 { } movieClip 1441 { } movieClip 1443 { } movieClip 1444 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } frame 40 { gotoAndStop(1); } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 1445 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; gun = 1 + random(5); firegun = fireout[gun - 1]; firegunset = firegun; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function firegat() { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; var v5 = new Sound(); v5.attachSound('sg'); var v6 = new Sound(); v6.attachSound('sg1'); var v4 = new Sound(); v4.attachSound('sg2'); var v2 = new Sound(); v2.attachSound('sg5'); var v3 = new Sound(); v3.attachSound('sg4'); var v7 = new Sound(); v7.attachSound('sg6'); if (gun == 1) { v6.start(0, 0); } if (gun == 2) { v5.start(0, 0); } if (gun == 3) { v4.start(0, 0); } if (gun == 4) { v3.start(0, 0); } if (gun == 5) { v2.start(0, 0); } if (gun == 6) { v7.start(0, 0); } aim = aimset; if (gun == 2) { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + Math.random() * 10 - Math.random() * 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + Math.random() * 10 - Math.random() * 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; } body.arrn.gun.play(); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 500; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = true; bombtype = true; meleetype = false; jumptype = false; rangebomber = false; gunspawner = true; gun = 1 + random(5); var fireout = new Array(40, 120, 30, 50, 40, 30, 30, 30, 30); firegun = fireout[gun - 1]; firegunset = firegun; yv = 0; he = _height / 2; bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 0; trset = turnaround; speed = 5; onEnterFrame = function () { if (gun > 6) { gun = 6; } if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { rot = Math.atan2(_parent.player._y - _y, _parent.player._x - _x) / 0.0174532925199433; if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (onscreen == true) { firegun -= 1; } if (firegun <= 0) { firegat(); firegun = firegunset; } if (Math.abs(dmg) > 1) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (_parent.player._x > _x) { pointx = _parent.player._x - 200; _xscale = -100; body.arm._rotation = 180 - rot; } if (_parent.player._x < _x) { pointx = _parent.player._x + 200; body.arm._rotation = rot; _xscale = 100; } body.arm.gotoAndStop(gun); if (Math.abs(_x - pointx) <= 40) { body.gotoAndStop(1); } if (rangebomber != true) { if (body._currentframe <= 50) { if (pointx > _x + 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } if (pointx < _x - 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); } } }; } } movieClip 1446 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 155; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 10; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 5 { stop(); kills = 0; killset = 30; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 20; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 9 { stop(); kills = 0; killset = 20; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 11 { stop(); kills = 0; killset = 30; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 13 { stop(); kills = 0; killset = 10000; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 10000; koff = 0; spawngunx5(); bosstrigger(); } } movieClip 1449 { } movieClip 1450 { } movieClip 1451 { frame 1 { stop(); } frame 19 { gotoAndPlay(2); } instance of movieClip 924 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 40 { gotoAndStop(1); } instance of movieClip 924 { onClipEvent (load) { gotoAndStop(random(8)); } } frame 99 { gotoAndStop(1); } frame 99 { stop(); } frame 161 { stop(); } } movieClip 1452 { frame 1 { function bodydamage() { if (health > 0) { dmg += 1 * (_xscale / 100); health -= 100; } } function headdamage() { if (health > 0) { dmg = 2 * (_xscale / 100); health -= 200; } } function armordamage() { if (health > 0) { } } function setbomb() { settype = random(11); if (settype <= 3) { rangebomber = true; } if (settype > 3) { rangebomber = false; } } function revive() { dmg = 0; _parent.kills += 1; _x = spx; body.gotoAndStop(1); health = hpset; gun = 1 + random(5); firegun = fireout[gun - 1]; firegunset = firegun; } function die() { _parent.gx = _x; _parent.gy = _y - 20; _parent.bloodsplatter(); _parent.gx = _x; _parent.gy = _y - 20; _parent.exploader(); _parent.murders += 1; _parent.combo += 1; if (_parent.kills < _parent.killset - _parent.eonscreen) { resp = true; } if (_parent.kills >= _parent.killset - _parent.eonscreen) { resp = false; _parent.koff += 1; } _parent.bloodfloor.spx = _x; _parent.bloodfloor.splat(); bodtype = random(_totalframes + 1); body.gotoAndPlay(100); if (gunspawner == true) { _parent.ggun = gun; _parent.spawngun(); } } function jump() { if (yv < 0 && jumpr > 0) { yv = Math.abs(_y - _parent.player._y) / 10; } } function firegat() { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; var v5 = new Sound(); v5.attachSound('sg'); var v6 = new Sound(); v6.attachSound('sg1'); var v4 = new Sound(); v4.attachSound('sg2'); var v2 = new Sound(); v2.attachSound('sg5'); var v3 = new Sound(); v3.attachSound('sg4'); var v7 = new Sound(); v7.attachSound('sg6'); if (gun == 1) { v6.start(0, 0); } if (gun == 2) { v5.start(0, 0); } if (gun == 3) { v4.start(0, 0); } if (gun == 4) { v3.start(0, 0); } if (gun == 5) { v2.start(0, 0); } if (gun == 6) { v7.start(0, 0); } aim = aimset; if (gun == 2) { _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + Math.random() * 10 - Math.random() * 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; _parent['ebullet' + _parent.ebulletno].fireoff(); _parent['ebullet' + _parent.ebulletno]._rotation = 180 + rot + Math.random() * 10 - Math.random() * 10; _parent['ebullet' + _parent.ebulletno]._x = _x + 60 * Math.cos(rot * 0.0174532925199433); _parent['ebullet' + _parent.ebulletno]._y = _y - 20 + 60 * Math.sin(rot * 0.0174532925199433); _parent.ebulletno += 1; } body.arrn.gun.play(); } function throwbomb() { duplicateMovieClip(_parent.molt, 'molt' + _parent.bombno, _parent.bombno + 500); _parent['molt' + _parent.bombno].dir = -1 * (_xscale / 100); _parent['molt' + _parent.bombno]._x = _x; _parent['molt' + _parent.bombno]._y = _y; _parent['molt' + _parent.bombno].gotoAndStop(2); _parent.bombno += 1; bomb = bombset; } stop(); health = 800; hpset = health; tframe = _parent._currentframe; aim = 60; aimset = aim; shoottype = true; bombtype = true; meleetype = false; jumptype = false; rangebomber = false; gunspawner = false; gun = 1 + random(5); var fireout = new Array(40, 120, 30, 50, 40, 30, 30, 30, 30); firegun = 90; firegunset = firegun; yv = 0; he = _height / 2; bomb = 30; bombset = bomb; _parent.eonscreen += 1; _parent.eoff += 1; jumpr = 5; bodtype = random(_totalframes + 1); gotoAndStop(bodtype); turnaround = 0; trset = turnaround; speed = 3; onEnterFrame = function () { if (gun > 6) { gun = 6; } if (speedoverride != undefined && speedoverride > speed) { speed = speedoverride; } if (healthoverride != undefined && healthoverride > health) { health = healthoverride; hpset = healthoverride; } if (health > 0 && _parent.player.health > 0) { if (body._currentframe <= 100) { rot = Math.atan2(_parent.player._y - _y, _parent.player._x - _x) / 0.0174532925199433; if (_root.paused_game != true && health > 0) { if (body._currentframe > 1) { body.play(); } if (onscreen == true) { firegun -= 1; } if (firegun <= 0) { throwbomb(); firegun = firegunset; } if (Math.abs(dmg) > 1) { _x = _x + dmg; } if (dmg > 0.5) { dmg -= 1; } if (dmg < 0.5) { dmg += 1; } if (_parent.player._x > _x) { pointx = _parent.player._x - 200; _xscale = -100; body.arm._rotation = 180 - rot; } if (_parent.player._x < _x) { pointx = _parent.player._x + 200; body.arm._rotation = rot; _xscale = 100; } body.arm.gotoAndStop(gun); if (Math.abs(_x - pointx) <= 40) { body.gotoAndStop(1); } if (rangebomber != true) { if (body._currentframe <= 50) { if (pointx > _x + 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x + speed; if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } if (pointx < _x - 20 && Math.abs(_x - pointx) > 30 && shoottype == true) { if (body._currentframe < 20) { _x = _x - speed; if (body._currentframe <= 1 && Math.abs(_x - pointx) > 30) { body.gotoAndPlay(2); } } turnaround = trset; } } } if (_parent.player.jump > 0 && _parent.player._y < _y - 30) { if (bombtype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 300) { bomb -= 1; } aim = aimset; if (bomb <= 0) { throwbomb(); } if (jumptype == true && onscreen == true && Math.abs(_x - _parent.player._x) < 100) { if (yv <= 0) { jump(); } } } } } } if (health <= 0) { if (body._currentframe <= 100) { die(); } if (body._currentframe > 160 && resp == true) { revive(); } if (body._currentframe > 160 && resp != true) { body.gotoAndStop(160); } } if (_parent.ebulletno > 10) { _parent.ebulletno = 1; } spawnfrom = random(10); if (spawnfrom <= 5) { spx = _parent.bl._x - 20; } if (spawnfrom > 5) { spx = _parent.br._x + 20; } if (_x > _parent.bl._x + 20 && _x < _parent.br._x - 20) { onscreen = true; } if (_x < _parent.bl._x + 20 || _x > _parent.br._x - 20) { onscreen = false; } if (tframe < _parent._currentframe) { trace(' ENEMY RESET'); _parent.eoff += 1; trace(_parent.eoff); resp = true; revive(); tframe = _parent._currentframe; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (jumptype == true) { _y = _y - yv; yv -= 0.5; } if (_y > 410) { _y = 410; yv = 0; jumpr = 5; } if (_parent.platfocus > 0) { if (Math.abs(_parent['pox' + _parent.platfocus] - _x) < _parent['powid' + _parent.platfocus]) { if (_y + he > _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] && yv < 0 && _y < _parent['poy' + _parent.platfocus]) { jumpr = 5; _y = _parent['poy' + _parent.platfocus] - _parent['pohei' + _parent.platfocus] - he; yv = 0; } } } jumpr -= 1; if (body._currentframe > 95 && health > 0 || _parent.player.health <= 0 && jumpr > 0) { body.gotoAndStop(1); } if (_root.paused_game == true) { body.stop(); } if (health > 0) { if (Math.abs(_x - _parent.nade._x) < 30 && Math.abs(_y - _parent.nade._y) < 30 && _parent.nade._currentframe == 2) { _parent.nade.boom(); health = 0; } if (Math.abs(_x - _parent.nade._x) < 250 && Math.abs(_y - _parent.nade._y) < 100 && _parent.nade._currentframe > 2 && _parent.nade._currentframe < 6) { health = 0; } } }; } } movieClip 1453 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 70; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 10; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 6 { stop(); kills = 0; killset = 40; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 8 { stop(); kills = 0; killset = 30; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 10 { stop(); kills = 0; killset = 30; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1454 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 40; spawngunx5(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 5 { stop(); kills = 0; killset = 30; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 30; spawngunx5(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1455 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 105; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 40; spawngunx5(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 5 { stop(); kills = 0; killset = 30; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 30; spawngunx5(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1456 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 177; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 40; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 5 { stop(); kills = 0; killset = 10; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 10; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 9 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); } frame 11 { stop(); kills = 0; killset = 40; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 13 { stop(); kills = 0; killset = 10; gunspawn.spawngun(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1457 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 108; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 5 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); } frame 7 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); } frame 9 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1458 { frame 1 { kills = 0; killset = 5; stop(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 130; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 2 { stop(); kills = 0; killset = 40; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 4 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 6 { stop(); kills = 0; killset = 10; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 8 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 10 { stop(); kills = 0; killset = 20; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1459 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 108; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 9 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); } frame 11 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } } movieClip 1460 { frame 1 { stop(); kills = 0; killset = 5; ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; murders = 0; shotsfired = 0; killstreak = 0; time = 0; bullethit = 0; _root.timegoal = 108; } frame 1 { function nextwave() { trace('wave terminated'); eoff = 0; koff = 0; kills = 0; gspawn = 1; play(); } function bosstrigger() { bossmode = true; } function fanfare() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); _root.windata[0] = Math.round((bullethit / shotsfired) * 100); _root.windata[1] = murders; _root.windata[2] = Math.round(killstreak); _root.windata[3] = Math.round(time); trace(_root.windata[0]); v2.attachSound('winner'); v2.start(0, 0); } function defeat() { stopAllSounds(); _root.paused_game = true; var v2 = new Sound(); v2.attachSound('gameover'); v2.start(0, 0); } function victory() { win = true; _parent.splash.play(); } function failure() { win = false; _parent.splash.play(); } function spawngun() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = gx; this['gs' + gspawn]._y = gy; this['gs' + gspawn].gun = ggun; this['gs' + gspawn].gotoAndStop(ggun); gspawn += 1; } function spawngunx3() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function spawngunx5() { trace('gun spawned'); duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 345; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 545; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 145; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 645; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; duplicateMovieClip(gunspawn, 'gs' + gspawn, gspawn + 2000); this['gs' + gspawn]._x = 45; this['gs' + gspawn]._y = 100; this['gs' + gspawn].gun = random(5) + 2; this['gs' + gspawn].gotoAndStop(this['gs' + gspawn].gun); gspawn += 1; } function dustkick() { if (player.health > 0) { duplicateMovieClip(dust, 'dd1', 5001); this.dd1._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd1._y = player._y + 25; this.dd1.gotoAndPlay(2); this.dd1._rotation = random(180); duplicateMovieClip(dust, 'dd2', 5002); this.dd2._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd2._y = player._y + 25; this.dd2.gotoAndPlay(2); this.dd2._rotation = random(180); duplicateMovieClip(dust, 'dd3', 5003); this.dd3._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd3._y = player._y + 25; this.dd3.gotoAndPlay(2); this.dd3._rotation = random(180); duplicateMovieClip(dust, 'dd4', 5004); this.dd4._x = player._x + (Math.random() * 20 - Math.random() * 20); this.dd4._y = player._y + 25; this.dd4.gotoAndPlay(2); this.dd4._rotation = random(180); } } function exploader() { var v2 = new Sound(); v2.attachSound('splode'); v2.start(0, 0); duplicateMovieClip(expload, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndPlay(2); gut += 1; } function bloodsplatter() { splat.start(0, 0); var v3 = new Sound(); v3.attachSound('zombie1'); var v2 = new Sound(); v2.attachSound('zombie2'); zz = random(5); if (zz == 1) { v3.start(0, 0); } if (zz == 2) { v2.start(0, 0); } duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; duplicateMovieClip(guts, 'gut' + gut, 6000 + gut); this['gut' + gut]._x = gx + Math.random() * 15 - Math.random() * 15; this['gut' + gut]._y = gy + 10 + Math.random() * 15 - Math.random() * 15; this['gut' + gut].gotoAndStop(random(3) + 1); gut += 1; } function sparkup() { trace(spy); duplicateMovieClip(spk, 'spk' + gut, 6000 + gut); this['spk' + gut]._x = spx; this['spk' + gut]._y = spy; this['spk' + gut].gotoAndPlay(1); this['spk' + gut]._rotation = random(180); gut += 1; } var splat = new Sound(); splat.attachSound('splat'); shotsfired; murders; var windata = new Array[killstreak](); displayhp = 100; g0 = 0; var g1 = new Array(1000000000, 'semi', 12, 10, 'HANDGUN.', 5, 10000000000.0); var g2 = new Array(20, 'shot', 12, 20, 'SHOT GUN.', 20, 60); var g3 = new Array(60, 'auto', 12, 3, 'MAK 10.', 10, 200); var g4 = new Array(45, 'auto', 12, 4, 'AK47.', 5, 200); var g5 = new Array(60, 'auto', 12, 3, 'SKRPN.', 10, 150); var g6 = new Array(80, 'semi', 12, 2, 'LMG', 5, 100); tb = 8; bln = 1; var gun = new Array(g0, g1, g2, g3, g4, g5, g6); ico = 25; combo = 0; nop = 0; platfocus = 0; startevent = 0; _parent.bosshp._visible = false; goal = _totalframes; trace(goal); win = false; dead = false; grenadeactive = false; pgry = 0; pgrx = 0; bossmode = false; onEnterFrame = function () { if (ebulletno > 20) { ebulletno = 1; } if (_root.paused_game == true && _currentframe < goal) { } if (player.health <= 0 && dead != true) { failure(); dead = true; } if (bossmode == true) { _parent.bosshp._visible = true; _parent.bosshp.gotoAndStop(1 + displayhp); } if (bossmode != true) { _parent.bosshp._visible = false; } if (_currentframe == 1) { if (_root.paused_game != true) { startevent += 1; } if (startevent == ico * 1 || startevent == ico * 2 || startevent == ico * 3 || startevent == ico * 4 || startevent == ico * 5) { _parent.startevent.nextFrame(); } if (startevent > ico * 6) { _parent.startevent.gotoAndStop(1); nextwave(); _root.changeto = random(5); _root.changetrack(); } } if (_currentframe >= goal - 1 || _currentframe > 70) { gotoAndStop(goal); if (win != true) { trace('complete'); victory(); } } if (_parent.splash._currentframe == 65) { if (win == true) { fanfare(); } if (win != true) { defeat(); } if (_parent.splash.mission._currentframe < 100 && win == true) { _parent.splash.mission.play(); } if (_parent.splash.mission._currentframe < 200 && win != true) { _parent.splash.mission.gotoAndPlay(200); } } if (combo > killstreak) { killstreak = combo; } if (_root.paused_game != true) { time += 0.03333333333333333; } }; gut = 1; blooddepth = 1; spx = 0; spy = 0; } instance bullet1 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet2 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet3 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet4 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet5 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet6 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet7 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet8 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet9 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet10 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet11 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet12 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance bullet13 of movieClip 833 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet1 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet6 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet2 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet7 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet3 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet8 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet4 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet9 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet5 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet10 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet11 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet16 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet12 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet17 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet13 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet18 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet14 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet19 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet15 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } instance ebullet20 of movieClip 842 { onClipEvent (load) { gotoAndStop(2); } } frame 3 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 5 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 7 { stop(); kills = 0; killset = 20; spawngunx3(); ebulletno = 1; bombno = 1; eonscreen = -1; eoff = 0; koff = 0; } frame 9 { stop(); kills = 0; killset = 300; ebulletno = 1; spawngun(); bombno = 1; eonscreen = -1; eoff = 0; koff = 0; spawngunx5(); bosstrigger(); bossos = 0; } } movieClip 1461 { frame 1 { gotoAndStop(_root.wave + 1); healthboost = false; _root.healthdeduct = 0; onEnterFrame = function () { if (gp.bossos == undefined) { gp.bossos = 0; } if (gp._currentframe <= 1 && gp.win != true) { _root.paused_game = false; } if (_root.carryon[3] == true) { if (_currentframe == _root.wave + 1) { trace('what what'); gp.g2[0] = gp.g2[6]; gp.g3[0] = gp.g3[6]; gp.g4[0] = gp.g4[6]; gp.g5[0] = gp.g5[6]; gp.g6[0] = gp.g6[6]; if (gp._currentframe > 1) { _root.carryon[3] = false; } } } }; } instance crs of movieClip 1002 { onClipEvent (load) { startDrag('', true); } } } button 1462 { on (release) { _root.retry(); } } button 1463 { on (release) { _root.pausetrig(); gotoAndStop(2); } } button 1464 { on (release) { _root.unpausetrig(); gotoAndStop(1); } } movieClip 1465 { frame 1 { stop(); if (_root.paused_game == true) { gotoAndStop(2); } } } button 1466 { on (release) { _root.help(); } } // unknown tag 88 length 49 movieClip 1472 { } frame 41 { paused_game = false; gotoAndStop('gameplay'); } frame 41 { trace('wave' + wave); }




http://swfchan.com/43/214413/info.shtml
Created: 27/10 -2018 18:01:52 Last modified: 27/10 -2018 18:01:52 Server time: 14/11 -2024 06:28:02