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

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

SonicBoomCannon3D.swf

This is the info page for
Flash #221650

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


ActionScript [AS1/AS2]
Combined Code
button 77 { on (release) { com.newgrounds.API.loadNewgrounds(); } } movieClip 90 { } button 96 { on (release) { nextFrame(); } } button 97 { on (release) { prevFrame(); } } button 101 { on (release) { selectPeriod('Today'); } } button 104 { on (release) { selectPeriod('This Week'); } } button 107 { on (release) { selectPeriod('This Month'); } } button 110 { on (release) { selectPeriod('This Year'); } } button 113 { on (release) { selectPeriod('All-Time'); } } movieClip 114 { frame 1 { function selectPeriod(p) { _parent.loadScores(10, p); period = p; gotoAndStop(1); } stop(); } } movieClip 115 Score Board (NewgroundsAPI) { #initclip Object.registerClass('Score Board (NewgroundsAPI)', com.newgrounds.components.ScoreTable); #endinitclip frame 1 { loadScores(10); } } button 142 { on (release) { com.newgrounds.API.loadNewgrounds(); } } movieClip 147 { frame 1 { onEnterFrame = function () { if (_visible) { _rotation = _rotation + 30; } else { delete onEnterFrame; } }; } } movieClip 148 { frame 11 { gotoAndPlay(1); } } movieClip 149 Flash Ad (NewgroundsAPI) { #initclip Object.registerClass('Flash Ad (NewgroundsAPI)', com.newgrounds.components.FlashAd); #endinitclip } movieClip 157 { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (2892 % 511) * true; if (!'') { } else {} return ; } var  = -160 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  += 121;  += 93;  += 246;  -= 382;  -= 147;  += 208;  += 89;  -= 786;  += 713;  += 421;  += 632;  += 170;  -= 505;  -= 131;  += 308; var  = 1;  -= 763;  -= 219;  -= 263;  += 510;  += 775;  -= 327;  += 46;  -= 421;  += 250; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }  != 177; true; ''; eval(!true); true; } } movieClip 159 { frame 10 { stop(); } } movieClip 161 { frame 37 { _parent.setGotoFrame('done'); stop(); } } movieClip 163 { } movieClip 165 NewgroundsAPIAsset_Medal_Icon_Placeholder { } movieClip 172 NewgroundsAPIAsset_Medal_Popup { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (737 % 511) * true; if (!'') { } else {} return ; } var  = 9 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  += 132;  -= 891; var eval( != 235) = true;  += 345;  += 166; // An attempt to read a value from empty stack  += 77;  += 206;  -= 422;  -= 355;  -= 135;  -= 235;  -= 105;  -= 669;  += 29;  -= 171;  -= 128;  += 953;  -= 490;  += 556;  -= 54;  -= 408;  += 401;  += 185;  += 252;  += 541;  += 568;  -= 293;  -= 318;  -= 688;  -= 425; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } !undefined; true; true; ''; true; ''; eval(1); } frame 2 { medal.attachIcon(icon); } frame 10 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (2142 % 511) * true; if (!'') { } else {} return ; } var  = 78 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  += 609;  += 436;  += 231;  += 5;  += 93;  += 176;  += 286;  -= 784;  += 356;  += 909;  -= 455;  += 716;  -= 447;  += 515;  += 342;  += 890;  -= 600;  -= 210; var eval(1) = true;  -= 347;  -= 25;  -= 224;  -= 252;  -= 791;  -= 170;  -= 121;  -= 150;  -= 549;  -= 124;  -= 859; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }  != 176; true; !true; true; ''; ; } frame 21 { this.removeMovieClip(); _visible = false; stop(); } } movieClip 178 NewgroundsAPIAsset_Login_Warning { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (2309 % 511) * true; if (!'') { } else {} return ; } var  = 253 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  -= 105;  += 855;  += 520;  += 184;  -= 889;  -= 443; var eval(true) = '';  -= 669;  -= 472;  += 117;  += 423;  += 503;  -= 308;  += 574;  -= 739;  += 231;  -= 419;  += 63;  -= 24;  += 346;  -= 46;  += 151;  += 275;  -= 2;  -= 338; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } eval( != 518); ''; !1; true; true; } frame 10 { stop(); } frame 21 { this.removeMovieClip(); _visible = false; stop(); } } movieClip 181 NewgroundsAPIAsset_Connection_Error { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (1793 % 511) * true; if (!'') { } else {} return ; } var  = 705 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  -= 568;  += 3;  -= 156;  += 917;  -= 334;  += 421;  -= 509;  += 266;  += 482;  += 39;  += 216;  -= 595; var  = eval(!1);  -= 616;  -= 339;  += 62;  -= 73;  -= 724;  += 346;  -= 468; } } } } } } } } } } } } } } } } } } } } } } } } } }  != 965; true; true; ''; } frame 10 { stop(); } frame 21 { this.removeMovieClip(); _visible = false; stop(); } } movieClip 183 { } movieClip 185 { } movieClip 187 { } movieClip 189 { } movieClip 191 { } movieClip 193 { } movieClip 195 { } movieClip 197 { } movieClip 199 { } movieClip 201 { } movieClip 202 NewgroundsAPIAsset_big_popup_background { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (827 % 511) * true; if (!'') { } else {} return ; } var  = 669 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  -= 86;  += 812;  += 156;  -= 229;  -= 400;  -= 450;  += 77;  -= 377;  += 565;  -= 221;  -= 116;  -= 534;  += 234;  -= 553;  += 145;  -= 96;  += 96;  += 666;  += 162;  += 199;  += 165;  -= 47;  -= 105;  += 166; var  = 1;  -= 111;  -= 30;  += 364;  -= 18;  -= 779; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }  != 985; !true; true; true; true; ; } } button 206 { on (release) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (2726 % 511) * true; if (!'') { } else {} return ; } var  = 118 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  += 703;  -= 63;  += 37;  -= 852;  -= 553;  -= 15;  += 840;  += 107;  -= 319;  -= 280;  -= 74;  += 115;  += 315;  += 448;  += 215;  -= 481;  -= 40;  -= 136;  += 357;  += 53;  -= 355; var eval(true) = true;  -= 221;  -= 732;  += 183;  -= 21;  -= 243;  += 530;  += 682;  -= 833; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }  != 289; eval(!true); true; ''; ''; 1; } } button 212 { on (release) { getURL(official_version_url, '_blank'); } } movieClip 214 NewgroundsAsset_New_Version_Available { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (980 % 511) * true; if (!'') { } else {} return ; } var  = -291 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  += 237;  += 80;  -= 86;  -= 744;  -= 541;  += 96;  += 723;  -= 947; var eval( != 178) = eval(!true);  += 553;  += 317;  += 419;  += 713;  += 16;  -= 541;  += 471;  -= 807;  += 75;  -= 332;  -= 116; } } } } } } } } } } } } } } } } } } } } } } } } } } ''; 1; true; ''; } } button 215 { on (release) { getURL(official_version_url, '_blank'); } } movieClip 219 NewgroundsAsset_Illegal_Host { frame 1 { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (2307 % 511) * true; if (!'') { } else {} return ; } var  = -142 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  += 383;  += 45;  += 276;  -= 104; var eval( != 121) = !true;  += 305;  += 176;  += 243;  += 6;  -= 560;  += 388;  += 359;  += 409;  -= 527;  += 561;  -= 903;  -= 615;  -= 315;  += 89;  -= 203; } } } } } } } } } } } } } } } } } } } } } } } } } } ''; eval(true); ''; 1; } } movieClip 220 API Connector (NewgroundsAPI) { #initclip Object.registerClass('API Connector (NewgroundsAPI)', com.newgrounds.components.APIConnector); #endinitclip frame 20 { _visible = false; } } frame 1 { _global.nuke = true; stop(); } instance of movieClip 220 API Connector (NewgroundsAPI) { onClipEvent (construct) { api_id = '15214:ZQO2kZ5w'; encryption_key = '5CVz5k0t3Vl7lvaTVN5yMaoZC1XdXMbN'; version = ''; fake_session = true; debug = true; error_screens = true; medal_popups = true; } } movieClip 231 { } movieClip 234 { } movieClip 237 { } instance of movieClip 237 { onClipEvent (load) { _root.playbutton._visible = false; this._xscale = 100 * (_root.getBytesLoaded() / _root.getBytesTotal()); } onClipEvent (enterFrame) { this._xscale = 100 * (_root.getBytesLoaded() / _root.getBytesTotal()); if (this._xscale >= 100) { _root.playbutton._visible = true; } } } button 239 { on (press) { gotoAndPlay(6); } } movieClip 241 { } movieClip 245 { } movieClip 248 { frame 1 { stop(); } frame 2 { stop(); } } instance of movieClip 248 { onClipEvent (load) { var startx = this._x; _root.playbuttonclip._visible = false; this._x = startx + 300 * (_root.getBytesLoaded() / _root.getBytesTotal()); if (100 * (_root.getBytesLoaded() / _root.getBytesTotal()) == 100) { _root.loaderbox._visible = false; this.gotoAndStop(2); _root.playbuttonclip._visible = true; } } onClipEvent (enterFrame) { this._x = startx + 300 * (_root.getBytesLoaded() / _root.getBytesTotal()); _root.loaderbox._x = this._x; _root.loaderbox.highbox = Math.floor(100 * (_root.getBytesLoaded() / _root.getBytesTotal())); if (100 * (_root.getBytesLoaded() / _root.getBytesTotal()) == 100) { _root.loaderbox._visible = false; this.gotoAndStop(2); _root.playbuttonclip._visible = true; } } } movieClip 253 { } movieClip 254 { } movieClip 257 { } button 262 { on (press) { _root.gotoAndPlay(6); } } movieClip 265 { } button 269 { on (release, keyPress '<Right>') { if (_root.tiptext.tipnum < 6) { _root.tiptext.tipnum += 1; _root.tiptext.gotoAndStop(_root.tiptext.tipnum); } } } button 270 { on (release, keyPress '<Left>') { if (_root.tiptext.tipnum > 1) { _root.tiptext.tipnum -= 1; _root.tiptext.gotoAndStop(_root.tiptext.tipnum); } } } movieClip 280 { frame 1 { stop(); } } instance tiptext of movieClip 280 { onClipEvent (load) { var tipnum = 1; } } movieClip 72 __Packages.com.newgrounds.components.ScoreTable { #initclip for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { Unknown action: 0xfc function () {  = (1203 % 511) * true; if (!'') { } else {} return ; } var  = 616 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  -= 581;  += 683;  -= 423;  += 245;  -= 419; var eval(eval(true)) = '';  -= 347;  -= 147;  += 267;  -= 53;  += 439;  += 178;  -= 183;  += 355;  -= 566; } } } } } } } } } } } } } } } } } } }  != 797; ''; !1; #endinitclip } movieClip 116 __Packages.com.newgrounds.APIError { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.APIError) { var v1 = function (error, msg) { if ((Number(error)).toString() == String(error)) { error = Number(error); } else { if (com.newgrounds.APIError.error_codes[String(error)]) { error = com.newgrounds.APIError.error_codes[String(error)]; } else { error = 0; } } this.code = error; this.message = msg; this.name = com.newgrounds.APIError.error_names[error]; this.alias = com.newgrounds.APIError.aliases[error]; }; com.newgrounds.APIError = v1; var v2 = v1.prototype; v1.init_codes = function () { var v2 = new Object(); var v1 = 0; while (v1 < com.newgrounds.APIError.aliases.length) { v2[com.newgrounds.APIError.aliases[v1]] = v1; ++v1; } return v2; }; v1.init_names = function () { var v5 = new Array(); var v3 = 0; while (v3 < com.newgrounds.APIError.aliases.length) { var v2 = (com.newgrounds.APIError.aliases[v3].toLowerCase()).split('_'); var v1 = 0; while (v1 < v2.length) { v2[v1] = (v2[v1].substr(0, 1)).toUpperCase() + v2[v1].substr(1, v2[v1].length); for (var v4 in com.newgrounds.APIError.always_caps) { if (v2[v1].toUpperCase() == com.newgrounds.APIError.always_caps[v4]) { v2[v1] = v2[v1].toUpperCase(); } } ++v1; } v5[v3] = v2.join(' '); ++v3; } return v5; }; v2.isError = function () { return true; }; v1.aliases = new Array('UNKNOWN_ERROR', 'INVALID_API_ID', 'MISSING_PARAM', 'INVALID_STAT_ID', 'INVALID_COMMAND_ID', 'FLASH_ADS_NOT_APPROVED', 'PERMISSION_DENIED', 'IDENTIFICATION_REQUIRED', 'INVALID_EMAIL_ADDRESS', 'BANNED_USER', 'SESSION_EXPIRED', 'INVALID_SCORE', 'INVALID_MEDAL', 'INVALID_SAVE_GROUP', 'FILE_NOT_FOUND', 'SITE_ID_REQUIRED', 'UPLOAD_IN_PROGRESS', 'USER_CANCELLED', 'CONFIRM_REQUEST', 'ILLEGAL_REQUEST', 'CONNECTION_FAILED', 'QUERY_INCOMPLETE', 'SAVE_FILE_ERROR', 'INVALID_VALUE', 'SERVER_ERROR', 'INVALID_SCOREBOARD'); v1.always_caps = new Array('API', 'URL', 'ID'); v1.error_codes = com.newgrounds.APIError.init_codes(); v1.error_names = com.newgrounds.APIError.init_names(); v2.code = 0; ASSetPropFlags(com.newgrounds.APIError.prototype, null, 1); } #endinitclip } movieClip 117 __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, success, data) { this._type = type; this._success = success; if (data.isError()) { this._error = data; this.data = null; } else { if (data.error && data.error.isError()) { this._error = data.error; this.data = data; } else { this.data = data; this._error = null; } } }; com.newgrounds.APIEvent = v1; var v2 = v1.prototype; v2.__get__error = function () { return this._error; }; v2.__get__type = function () { return this._type; }; v2.__get__success = function () { return this._success; }; v1.API_CONNECTED = 'apiConnected'; v1.ADS_APPROVED = 'adsApproved'; v1.AD_ATTACHED = 'adAttached'; v1.HOST_BLOCKED = 'hostBlocked'; v1.NEW_VERSION_AVAILABLE = 'newVersionAvailable'; v1.EVENT_LOGGED = 'eventLogged'; v1.SCORE_POSTED = 'scorePosted'; v1.SCORES_LOADED = 'scoresLoaded'; v1.UNLOCK_MEDAL = 'unlockMedal'; v1.MEDAL_UNLOCKED = 'medalUnlocked'; v1.MEDALS_LOADED = 'medalsLoaded'; v1.METADATA_LOADED = 'metadataLoaded'; v1.FILE_PRIVS_LOADED = 'filePrivsLoaded'; v1.FILE_SAVED = 'fileSaved'; v1.FILE_LOADED = 'fileLoaded'; v1.FILE_INITIALIZED = 'fileInitialized'; v1.FILE_REQUESTED = 'fileRequested'; v1.QUERY_COMPLETE = 'queryComplete'; v1.VOTE_COMPLETE = 'voteComplete'; v1.API_ERROR = 'apiError'; v1.UNCAUGHT_EVENT = 'uncaughtEvent'; v2.addProperty('error', v2.__get__error, function () {}); v2.addProperty('success', v2.__get__success, function () {}); v2.addProperty('type', v2.__get__type, function () {}); ASSetPropFlags(com.newgrounds.APIEvent.prototype, null, 1); } #endinitclip } movieClip 118 __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.setVersion = function (v) { com.newgrounds.API.version = v; }; v1.setUserEmail = function (e) { com.newgrounds.API.user_email = e; }; v1.setFakeSession = function (fake) { com.newgrounds.API.fake_session = fake; }; v1.setPreload = function (p) { com.newgrounds.API.preload = p; }; v1.getPercentLoaded = function () { var v2; if (com.newgrounds.API.preload && com.newgrounds.API.preload_items > 0) { v2 = 80; var v4 = Math.round((com.newgrounds.API.preload_items_loaded / com.newgrounds.API.preload_items) * 20); var v3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * v2) + v4; return v3; } v2 = 100; v3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * v2); return v3; }; v1.reportNewAsset = function () { if (com.newgrounds.API.preload) { ++com.newgrounds.API.preload_items; } }; v1.reportAssetLoaded = function () { if (com.newgrounds.API.preload) { ++com.newgrounds.API.preload_items_loaded; } }; v1.populateMedals = function (medal_list) { if (com.newgrounds.API.medals === null) { com.newgrounds.API.medals = new Array(); var v2 = 0; while (v2 < medal_list.length) { var v1 = medal_list[v2]; com.newgrounds.API.medals.push(new com.newgrounds.Medal(v1.medal_id, v1.medal_name, v1.medal_value, v1.medal_difficulty, v1.medal_unlocked, v1.medal_icon)); ++v2; } } }; v1.populateSaveGroups = function (save_group_list, file_path, image_path) { com.newgrounds.SaveFile.setFilePath(file_path); com.newgrounds.SaveFile.setImagePath(image_path); com.newgrounds.API.save_groups = new Array(); var v6 = 0; while (v6 < save_group_list.length) { var v2 = save_group_list[v6]; var v5 = new com.newgrounds.SaveGroup(v2.group_id, v2.group_name, v2.group_type); var v4 = 0; while (v4 < v2.keys.length) { var v3 = v2.keys[v4]; v5.addKey(v3.id, v3.name, v3.type); ++v4; } v4 = 0; while (v4 < v2.ratings.length) { var v1 = v2.ratings[v4]; v5.addRating(v1.id, v1.name, v1.min, v1.max, v1.float); ++v4; } com.newgrounds.API.save_groups.push(v5); ++v6; } }; v1.populateScoreBoards = function (score_boards) { com.newgrounds.API.scoreboards = new Array(); var v1 = 0; while (v1 < score_boards.length) { com.newgrounds.API.scoreboards.push(new com.newgrounds.ScoreBoard(score_boards[v1].id, score_boards[v1].name)); ++v1; } }; v1.getOfficialURL = function () { var v1 = com.newgrounds.API.GATEWAY_URL + '?tracker_id=' + com.newgrounds.API.movie_id + '&command_id=loadOfficalVersion&seed=' + Math.random(); if (com.newgrounds.API.debug) { v1 += '&debug=1'; } return v1; }; v1.loadOfficialURL = function () { getURL(com.newgrounds.API.getOfficialURL(), '_blank'); }; v1.hasUserSession = function () { if (com.newgrounds.API.session_id && com.newgrounds.API.publisher_id) { return true; return false; } if (_root.NewgroundsAPI_PublisherID && _root.NewgroundsAPI_SessionID) { return true; } return false; }; v1.hostIsCompatible = function () { return _root.NewgroundsAPI_PublisherID !== undefined; }; v1.isNewgrounds = function () { return com.newgrounds.API.publisher_id == 1 || _root.NewgroundsAPI_PublisherID == 1 || ((com.newgrounds.API.getHost()).toLowerCase()).indexOf('ungrounded.net') > -1 || ((com.newgrounds.API.getHost()).toLowerCase()).indexOf('newgrounds.com') > -1; }; v1.hasPublisher = function () { return com.newgrounds.API.publisher_id || _root.NewgroundsAPI_PublisherID; }; v1.hasUserEmail = function () { if (com.newgrounds.API.user_email) { return true; } return false; }; v1.isConnected = function () { return com.newgrounds.API.connected; }; v1.getID = function () { return com.newgrounds.API.getTrackerID(); }; v1.getTrackerID = function () { return com.newgrounds.API.tracker_id; }; v1.getUserID = function () { return com.newgrounds.API.user_id; }; v1.getUserName = function () { return com.newgrounds.API.user_name; }; v1.connectionTimeOut = function () { com.newgrounds.API.reportAssetLoaded(); clearInterval(com.newgrounds.API.timeout); com.newgrounds.API.callListener(com.newgrounds.APIEvent.API_CONNECTED, false, new com.newgrounds.APIError('CONNECTION_FAILED', 'Connection to API gateway timed out.')); }; v1.connect = function (m_id, encrypt_key, debug_mode) { if (com.newgrounds.API.connected) { return undefined; } com.newgrounds.API.sendMessage('Connecting to the Newgrounds API Gateway...'); var v2 = function () { com.newgrounds.API.connectionTimeOut(); }; com.newgrounds.API.timeout = setInterval(v2, 10000, null); if (!m_id) { com.newgrounds.API.fatalError('API.connect() - missing required movie_id parameter', 'connect'); } com.newgrounds.API.movie_id = String(m_id); com.newgrounds.API.tracker_id = Number(com.newgrounds.API.movie_id.substring(0, com.newgrounds.API.movie_id.indexOf(':'))); com.newgrounds.API.encryption_key = encrypt_key; com.newgrounds.API.debug = debug_mode; com.newgrounds.API.user_id = 0; com.newgrounds.API.user_name = 'Guest'; if (_root.NewgroundsAPI_PublisherID) { com.newgrounds.API.publisher_id = _root.NewgroundsAPI_PublisherID; if (_root.NewgroundsAPI_SessionID) { com.newgrounds.API.session_id = _root.NewgroundsAPI_SessionID; } } else { if (com.newgrounds.API.fake_session) { com.newgrounds.API.publisher_id = 1; com.newgrounds.API.session_id = 'D3bu64p1U53R'; com.newgrounds.API.user_id = 10; com.newgrounds.API.user_name = 'API-Debugger'; } else { if (com.newgrounds.API.debug) { com.newgrounds.API.publisher_id = 1; } com.newgrounds.API.session_id = null; } } if (_root.NewgroundsAPI_UserName) { com.newgrounds.API.user_name = _root.NewgroundsAPI_UserName; } if (_root.NewgroundsAPI_UserID) { com.newgrounds.API.user_id = _root.NewgroundsAPI_UserID; } if (_root.NewgroundsAPI_UserpageFormat) { com.newgrounds.API.userpage_format = _root.NewgroundsAPI_UserpageFormat; } com.newgrounds.API.reportNewAsset(); com.newgrounds.API.connected = true; com.newgrounds.API.sendCommand('connectMovie', {'host': com.newgrounds.API.getHost(), 'movie_version': com.newgrounds.API.version}); }; v1.getHost = function () { if (!com.newgrounds.API.host) { var v1 = _url; if ((v1.toLowerCase()).indexOf('http://') > -1 or (v1.toLowerCase()).indexOf('https://') > -1) { if ((v1.toLowerCase()).indexOf(com.newgrounds.API.NEWGROUNDS_PREVIEW) > -1) { com.newgrounds.API.host = com.newgrounds.API.NEWGROUNDS_PREVIEW; } else { com.newgrounds.API.host = (v1.split('/'))[2].toLowerCase(); } return com.newgrounds.API.host; } com.newgrounds.API.host = com.newgrounds.API.LOCAL_HOST; } return com.newgrounds.API.host; }; v1.isPublishedHost = function () { for (var v1 in com.newgrounds.API.PREVIEW_HOSTS) { if (com.newgrounds.API.getHost() == com.newgrounds.API.PREVIEW_HOSTS[v1]) { return false; } } return true; }; v1.loadUserPage = function (u_id, u_name) { if (u_id == undefined && u_name == undefined) { if (com.newgrounds.API.hasUserSession()) { u_id = com.newgrounds.API.user_id; u_name = com.newgrounds.API.user_name; } else { return false; } } if (com.newgrounds.API.publisher_id == 1) { var v1 = 'http://' + com.newgrounds.API.user_name.toLowerCase() + '.newgrounds.com'; getURL(v1, '_blank'); return true; return false; } if (com.newgrounds.API.userpage_format) { v1 = com.newgrounds.API.userpage_format; v1 = (v1.split(':user_id:')).join(u_id.toString()); v1 = (v1.split(':user_name:')).join(escape(u_name)); getURL(v1, '_blank'); return true; } return false; }; v1.loadNewgrounds = function () { com.newgrounds.API.sendCommand('loadNewgrounds', {'host': com.newgrounds.API.getHost()}, true); }; v1.loadMySite = function () { com.newgrounds.API.sendCommand('loadMySite', {'host': com.newgrounds.API.getHost()}, true); }; v1.loadCustomLink = function (link) { com.newgrounds.API.sendCommand('loadCustomLink', {'host': com.newgrounds.API.getHost(), 'link': link}, true); }; v1.logCustomEvent = function (event) { com.newgrounds.API.sendCommand('logCustomEvent', {'host': com.newgrounds.API.getHost(), 'event': event}); }; v1.getScoreBoard = function (board) { if (!com.newgrounds.API.scoreboards || com.newgrounds.API.scoreboards.length < 1) { com.newgrounds.API.sendWarning('You do not have any scoreboards configured in your API setup.'); return null; } for (var v2 in com.newgrounds.API.scoreboards) { if (typeof board == 'string' && com.newgrounds.API.scoreboards[v2].name == board) { return com.newgrounds.API.scoreboards[v2]; } else { if (typeof board == 'number' && com.newgrounds.API.scoreboards[v2].id == board) { return com.newgrounds.API.scoreboards[v2]; } } } com.newgrounds.API.sendWarning('Could not find any scoreboards named \'' + board + '\'.'); return null; }; v1.postScore = function (board_name, value, tag) { var v3 = com.newgrounds.API.getScoreBoard(board_name); if (tag === undefined) { tag = ''; } if (!v3) { com.newgrounds.API.sendError({'command_id': 'postScore'}, new com.newgrounds.APIError('INVALID_SCOREBOARD', 'Failed to post score. Check the spelling of your board name.')); return undefined; } if (value == undefined) { com.newgrounds.API.sendError({'command_id': 'postScore'}, new com.newgrounds.APIError('MISSING_PARAM', 'Missing score value')); return undefined; } com.newgrounds.API.sendSecureCommand('postScore', {'user_name': com.newgrounds.API.user_name, 'board': v3.id, 'value': value, 'tag': tag, 'publisher_id': com.newgrounds.API.publisher_id}); }; v1.loadScores = function (board_name, period, tag) { var v3 = 'loadScores'; var v2 = com.newgrounds.API.getScoreBoard(board_name); if (!v2) { com.newgrounds.API.sendError({'command_id': v3}, new com.newgrounds.APIError('INVALID_SCOREBOARD', 'Failed to load scores. Check the spelling of your board name.')); return undefined; } var v1 = {}; v1.publisher_id = com.newgrounds.API.publisher_id; v1.board = v2.id; v1.num_results = v2.num_results; v1.page = v2.page; if (period === undefined) { v1.period = v2.period; } else { v1.period = period; } if (tag === undefined) { v1.tag = v2.tag; } else { v1.tag = tag; } com.newgrounds.API.sendCommand(v3, v1); }; v1.unlockMedal = function (medal, x, y) { if (!medal) { com.newgrounds.API.sendError({'command_id': 'unlockMedal'}, new com.newgrounds.APIError('MISSING_PARAM', 'missing required medal name')); return undefined; } if (typeof medal != 'object') { medal = com.newgrounds.API.getMedal(medal); } if (!medal) { com.newgrounds.API.sendError({'command_id': 'unlockMedal'}, new com.newgrounds.APIError('INVALID_MEDAL', 'medal unlock failed, check your medal name for correct spelling.')); return undefined; } com.newgrounds.API.callListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, true, {'medal': medal, 'x': x, 'y': y}); if (com.newgrounds.API.hasUserSession() or com.newgrounds.API.debug) { com.newgrounds.API.sendMessage('Attempting to unlock \'' + medal.getName() + '\''); var v3 = new Object(); v3.medal_id = medal.getID(); com.newgrounds.API.sendSecureCommand('unlockMedal', v3); } else { com.newgrounds.API.sendMessage('Unlocking \'' + medal.getName() + '\''); medal.setUnlocked(true); var v2 = com.newgrounds.API.loadLocal('medals_unlocked'); if (!v2) { v2 = new Object(); } v2[medal.getID()] = true; com.newgrounds.API.saveLocal('medals_unlocked', v2); } }; v1.loadMedals = function () { if (com.newgrounds.API.medals) { com.newgrounds.API.callListener(com.newgrounds.APIEvent.MEDALS_LOADED, true, {'medals': com.newgrounds.API.medals}); return undefined; } var v1 = new Object(); if (com.newgrounds.API.hasUserSession()) { v1.publisher_id = com.newgrounds.API.publisher_id; v1.user_id = com.newgrounds.API.user_id; } com.newgrounds.API.sendCommand('getMedals', v1); }; v1.getMedals = function () { return com.newgrounds.API.medals; }; v1.getMedal = function (identifier) { if (!com.newgrounds.API.medals || com.newgrounds.API.medals.length < 1) { com.newgrounds.API.sendWarning('You do not have any medals configured on your API setup!'); return false; } for (var v3 in com.newgrounds.API.medals) { var v1 = com.newgrounds.API.medals[v3]; if (typeof identifier == 'string' && v1.getName() == identifier) { return v1; } else { if (v1.getID() == identifier) { return v1; } } } com.newgrounds.API.sendWarning('Could not find any medals named \'' + identifier + '\'.'); return false; }; v1.saveLocal = function (save_id, save_data, size_allocation) { if (!com.newgrounds.API.sharedObjects[save_id]) { com.newgrounds.API.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.newgrounds.API.movie_id + '_' + save_id); } com.newgrounds.API.sharedObjects[save_id].data[save_id] = com.newgrounds.API.encodeData(save_data); com.newgrounds.API.sharedObjects[save_id].flush(); }; v1.loadLocal = function (save_id) { if (!com.newgrounds.API.sharedObjects[save_id]) { com.newgrounds.API.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.newgrounds.API.movie_id + '_' + save_id); } com.newgrounds.API.sharedObjects[save_id].flush(); com.newgrounds.API.echo('sharedobject ' + save_id + ' is: ' + com.newgrounds.API.sharedObjects[save_id].data[save_id]); if (com.newgrounds.API.sharedObjects[save_id].data[save_id]) { com.newgrounds.API.echo('decoded: ' + com.newgrounds.API.decodeData(com.newgrounds.API.sharedObjects[save_id].data[save_id])); return com.newgrounds.API.decodeData(com.newgrounds.API.sharedObjects[save_id].data[save_id]); } else { return null; } }; v1.encodeData = function (data) { return com.newgrounds.API.compressHex(com.newgrounds.encoders.RC4.encrypt(com.newgrounds.encoders.JSON.encode(data), com.newgrounds.API.encryption_key)); }; v1.decodeData = function (base) { return com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(com.newgrounds.API.uncompressHex(base), com.newgrounds.API.encryption_key)); }; v1.compressHex = function (hex_value) { var v6 = hex_value.length % 6; var v4 = ''; var v5 = new com.newgrounds.encoders.BaseN(com.newgrounds.API.compression_radix); var v1 = 0; while (v1 < hex_value.length) { var v2 = Number('0x' + hex_value.substr(v1, 6)); v4 += v5.encode(v2, 4); v1 += 6; } return v6 + v4; }; v1.uncompressHex = function (base_value) { var v9 = Number(base_value.charAt(0)); var v7 = ''; var v3; var v8 = new com.newgrounds.encoders.BaseN(com.newgrounds.API.compression_radix); var v2 = 1; while (v2 < base_value.length) { var v6 = base_value.substr(v2, 4); var v5 = v8.decode(v6); var v1 = com.newgrounds.API.dec2hex(v5); if (v2 + 4 < base_value.length) { v3 = 6; } else { v3 = v9; } while (v1.length < v3) { v1 = '0' + v1; } v7 += v1; v2 += 4; } return v7; }; v1.dec2hex = function (dec) { var v4 = '0123456789ABCDEF'; var v3 = ''; while (dec > 0) { var v2 = dec % 16; v3 = v4.charAt(v2) + v3; dec = (dec - v2) / 16; } return v3; }; v1.getSaveGroup = function (group) { if (com.newgrounds.API.save_groups == null || com.newgrounds.API.save_groups.length < 1) { com.newgrounds.API.sendWarning('You do not have any save groups configured in your API setup!'); return null; } var v1 = 0; while (v1 <= com.newgrounds.API.save_groups.length) { if (typeof group == 'number' or (Number(group)).toString() == String(group)) { if (com.newgrounds.API.save_groups[v1].getID() == Number(group)) { return com.newgrounds.API.save_groups[v1]; } } else { if (typeof group == 'string') { if ((com.newgrounds.API.save_groups[v1].getName()).toLowerCase() == group.toLowerCase()) { return com.newgrounds.API.save_groups[v1]; } } } ++v1; } com.newgrounds.API.sendWarning('Could not find any save groups named \'' + group + '\'.'); return null; }; v1.getCurrentSaveFile = function () { return com.newgrounds.API.save_file; }; v1.setCurrentSaveFile = function (current) { com.newgrounds.API.save_file = current; }; v1.loadSaveFile = function (save_id, get_contents) { if (get_contents === undefined) { get_contents = true; } var v1 = 'loadSaveFile'; var v2 = {'publisher_id': com.newgrounds.API.publisher_id, 'save_id': save_id, 'get_contents': get_contents}; com.newgrounds.API.save_file = null; com.newgrounds.API.sendCommand(v1, v2); }; v1.loadFilesByDate = function (group_name, sort_descending, key_name, key_value) { if (sort_descending === undefined) { sort_descending = true; } var v2 = com.newgrounds.API.getSaveGroup(group_name); if (!v2) { var v3 = new com.newgrounds.APIError('QUERY_INCOMPLETE', 'The query could not be preformed, check the spelling of your save group name.'); com.newgrounds.API.sendError({'command_id': 'loadFilesByDate'}, v3); return undefined; } var v1 = new com.newgrounds.SaveGroupQuery(v2); if (key_name) { v1.addKeyCondition(key_name, '=', key_value); } v1.sortOn('CREATED_ON', sort_descending ? 'DESC' : 'ASC'); v1.execute(); }; v1.loadFilesByViews = function (group_name, sort_descending, key_name, key_value) { if (sort_descending === undefined) { sort_descending = true; } var v2 = com.newgrounds.API.getSaveGroup(group_name); if (!v2) { var v3 = new com.newgrounds.APIError('QUERY_INCOMPLETE', 'The query could not be preformed, check the spelling of your save group name.'); com.newgrounds.API.sendError({'command_id': 'loadFilesByViews'}, v3); return undefined; } var v1 = new com.newgrounds.SaveGroupQuery(v2); if (key_name) { v1.addKeyCondition(key_name, '=', key_value); } v1.sortOn('TOTAL_VIEWS', sort_descending ? 'DESC' : 'ASC'); v1.execute(); }; v1.loadFilesByRating = function (group_name, rating_name, sort_descending, key_name, key_value) { if (sort_descending === undefined) { sort_descending = true; } var v2 = com.newgrounds.API.getSaveGroup(group_name); if (!v2) { var v3 = new com.newgrounds.APIError('QUERY_INCOMPLETE', 'The query could not be preformed, check the spelling of your save group name.'); com.newgrounds.API.sendError({'command_id': 'loadFilesByRating'}, v3); return undefined; } var v1 = new com.newgrounds.SaveGroupQuery(v2); if (key_name) { v1.addKeyCondition(key_name, '=', key_value); } v1.sortOnRating(rating_name, sort_descending ? 'DESC' : 'ASC', 'score'); v1.execute(); }; v1.lookupSaveFiles = function (save_group) { var v1 = 'lookupSaveFiles'; var v2 = {'publisher_id': com.newgrounds.API.publisher_id, 'group_id': save_group.getID(), 'query': com.newgrounds.encoders.JSON.encode(save_group.getQuery(true))}; com.newgrounds.API.sendCommand(v1, v2); }; v1.newSaveFile = function (group) { var v1 = com.newgrounds.API.getSaveGroup(group); if (v1) { return v1.newFile(); } else { var v2 = new com.newgrounds.APIError('INVALID_SAVE_GROUP', 'You can not create new files in invalid groups.'); com.newgrounds.API.sendError({'command_id': 'newSaveFile'}, v2); } }; v1.newSaveQuery = function (group) { var v1 = com.newgrounds.API.getSaveGroup(group); if (v1) { return v1.newQuery(); } else { var v2 = new com.newgrounds.APIError('INVALID_SAVE_GROUP', '\'' + group + '\' is not a valid save group.'); com.newgrounds.API.sendError({'command_id': 'newSaveQuery'}, v2); } }; v1.checkFilePrivs = function (file) { if (com.newgrounds.API.user_id) { var v1 = com.newgrounds.API.user_id; } else { var v1 = 0; } var v2 = {'group': (file.getGroup()).getID(), 'filename': file.getName(), 'user_id': v1, 'publisher_id': com.newgrounds.API.publisher_id}; com.newgrounds.API.sendCommand('checkFilePrivs', v2); }; v1.saveFile = function (file, overwrite) { var v1; v1 = {'group': (file.getGroup()).getID(), 'filename': file.getName(), 'description': file.getDescription(), 'draft': file.__get__draft(), 'user_name': com.newgrounds.API.user_name}; if (overwrite) { v1.overwrite = overwrite; } if (file.getDuplicateID()) { v1.save_id = file.getDuplicateID(); } if ((file.getKeys()).length > 0) { v1.keys = file.getKeys(); } var v3; v3 = {'file': file.getRawContents()}; if (file.getThumbnailImageScan()) { v3.thumbnail = file.getThumbnailImageScan(); } com.newgrounds.API.save_file = file; com.newgrounds.API.sendSecureCommand('saveFile', v1, null, v3); }; v1.rateSaveFile = function (file, rating, vote) { var v1 = {'group': (file.getGroup()).getID(), 'save_id': file.getID(), 'rating_id': rating.rating_id, 'vote': vote, 'user_id': com.newgrounds.API.user_id}; com.newgrounds.API.sendSecureCommand('rateSaveFile', v1); }; v1.getConfirmation = function (command_name, event, msg, target, confirm, cancel) { var v1 = new com.newgrounds.APIError('CONFIRM_REQUEST', msg); v1.confirm = function () { target[confirm](); }; v1.cancel = function () { target[cancel](); }; v1.command = command_name; com.newgrounds.API.callListener(event, false, v1); }; v1.onRemoteAuthentication = function (auth_result) { var v1 = com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(auth_result, com.newgrounds.API.encryption_key)); delete com.newgrounds.API.remote_auth; com.newgrounds.API.user_id = v1.NewgroundsAPI_UserID; com.newgrounds.API.user_name = v1.NewgroundsAPI_UserName; com.newgrounds.API.session_id = v1.NewgroundsAPI_SessionID; com.newgrounds.API.publisher_id = v1.NewgroundsAPI_PublisherID; }; v1.doEvent = function (e) { switch (e.command_id) { case 'connectMovie': clearInterval(com.newgrounds.API.timeout); com.newgrounds.API.sendMessage('You have successfully connected to the Newgrounds API Gateway'); com.newgrounds.API.sendMessage('Movie identified as "' + e.movie_name + '"'); com.newgrounds.API.callListener(com.newgrounds.APIEvent.API_CONNECTED, e.success, {'title': e.movie_name}); var v7 = false; if (e.ad_status === -1) { var v11 = 'This movie was not approved to run Flash Ads.'; com.newgrounds.API.sendWarning(v11); com.newgrounds.API.sendWarning('visit ' + com.newgrounds.API.AD_TERMS_URL + ' to view our approval guidelines'); if (!e.ad_url) { com.newgrounds.API.callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError('FLASH_ADS_NOT_APPROVED', v11)); } else { v7 = true; } } else { if (e.ad_status === 0) { var v11 = 'Flash Ads are currently awaiting approval.'; com.newgrounds.API.sendNotice(v11); if (!e.ad_url) { com.newgrounds.API.callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError('FLASH_ADS_NOT_APPROVED', v11)); } else { v7 = true; } } } if (e.ad_url) { com.newgrounds.API.ad_url = unescape(e.ad_url); if (!v7) { com.newgrounds.API.sendMessage('This movie has been approved to run Flash Ads!'); } com.newgrounds.API.callListener(com.newgrounds.APIEvent.ADS_APPROVED, true); } if (e.deny_host) { v11 = com.newgrounds.API.getHost() + ' does not have permission to run this movie!'; com.newgrounds.API.sendWarning(v11); com.newgrounds.API.sendWarning('\tUpdate your API configuration to unblock ' + com.newgrounds.API.getHost()); com.newgrounds.API.callListener(com.newgrounds.APIEvent.HOST_BLOCKED, true, {'real_url': unescape(e.movie_url), 'url': com.newgrounds.API.getOfficialURL()}); } else { if (e.movie_version) { com.newgrounds.API.sendWarning('According to your API Configuration, this version is out of date.'); if (com.newgrounds.API.version) { com.newgrounds.API.sendWarning('\tThe this movie is version ' + com.newgrounds.API.version); } com.newgrounds.API.sendWarning('\tThe most current version is ' + e.movie_version); com.newgrounds.API.callListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, true, {'version': e.movie_version, 'real_url': unescape(e.movie_url), 'url': com.newgrounds.API.getOfficialURL()}); } } if (e.request_portal_url) { com.newgrounds.API.sendCommand('setPortalID', {'portal_url': _url}); } if (com.newgrounds.API.preload) { com.newgrounds.API.reportNewAsset(); var v8 = {}; if (com.newgrounds.API.hasUserSession()) { v8.publisher_id = com.newgrounds.API.publisher_id; v8.user_id = com.newgrounds.API.user_id; } com.newgrounds.API.sendCommand('preloadSettings', v8); } com.newgrounds.API.reportAssetLoaded(); break; case 'preloadSettings': if (e.medals) { com.newgrounds.API.populateMedals(e.medals); if (!com.newgrounds.API.hasUserSession() and !com.newgrounds.API.debug) { com.newgrounds.API.echo('checking for sharedobject medals...'); var v4 = com.newgrounds.API.loadLocal('medals_unlocked'); if (v4) { for (var v32 in v4) { v32 = Number(v32); if (v4[v32]) { var v3 = com.newgrounds.API.getMedal(v32); com.newgrounds.API.echo('now unlocking ' + v3.getName()); v3.setUnlocked(true); } } } } } if (e.save_groups) { com.newgrounds.API.populateSaveGroups(e.save_groups, e.save_file_path); } if (e.score_boards) { com.newgrounds.API.populateScoreBoards(e.score_boards); } if (_root.NewgroundsAPI_SaveFileID && _root.NewgroundsAPI_SaveGroupID) { com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_REQUESTED, true, {'save_id': _root.NewgroundsAPI_SaveFileID, 'group': com.newgrounds.API.getSaveGroup(_root.NewgroundsAPI_SaveGroupID)}); } com.newgrounds.API.callListener(com.newgrounds.APIEvent.METADATA_LOADED, true); com.newgrounds.API.reportAssetLoaded(); break; case 'logCustomEvent': if (e.success) { com.newgrounds.API.sendMessage('Event \'' + e.event + '\' was logged.'); } com.newgrounds.API.callListener(com.newgrounds.APIEvent.EVENT_LOGGED, e.success, {'event': e.event}); break; case 'postScore': var v9; if (e.success) { var v5 = 'User'; if (com.newgrounds.API.user_email) { v5 = com.newgrounds.API.user_email; } else { if (com.newgrounds.API.user_name) { v5 = com.newgrounds.API.user_name; } } var v19 = com.newgrounds.API.getScoreBoard(e.board); com.newgrounds.API.sendMessage(v5 + ' posted ' + e.value + ' to \'' + v19.name + '\''); v9 = {'board': v19, 'value': e.value, 'username': v5}; } com.newgrounds.API.callListener(com.newgrounds.APIEvent.SCORE_POSTED, e.success, v9); break; case 'loadScores': var v9 = new Object(); var v19 = com.newgrounds.API.getScoreBoard(e.board); if (v19.exists()) { v19.setScores(e.scores, e.period, e.page, e.num_results); } com.newgrounds.API.callListener(com.newgrounds.APIEvent.SCORES_LOADED, e.success, {'board': v19}); break; case 'unlockMedal': var v24 = com.newgrounds.API.getMedal(e.medal_name); v24.setUnlocked(true); com.newgrounds.API.sendMessage('Successfuly unlocked \'' + v24.getName() + '\''); com.newgrounds.API.callListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, e.success, {'medal_id': v24.id, 'medal': v24}); break; case 'getMedals': com.newgrounds.API.populateMedals(e.medals); com.newgrounds.API.callListener(com.newgrounds.APIEvent.MEDALS_LOADED, e.success, {'medals': com.newgrounds.API.medals}); break; case 'loadSaveFile': var v16 = com.newgrounds.API.getSaveGroup(e.group_id); var v14 = new com.newgrounds.SaveFile(v16); v14.id = e.file.save_id; v14.name = e.file.filename; v14.fileUrl = e.file.file; v14.thumbnailUrl = e.file.thumb; v14.authorName = e.file.user_name; v14.authorId = e.file.user_id; v14.description = e.file.description; v14.setPermissions(e.file.status, e.file.locked); for (var v6 in e.file.keys) { v14.setKey(e.file.keys[v6].id, e.file.keys[v6].value); } for (v6 in e.file.ratings) { v14.setRating(e.file.ratings[v6].id, e.file.ratings[v6].votes, e.file.ratings[v6].score); } if (e.get_contents) { v14.loadContents(); } com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_INITIALIZED, e.success, {'save_id': v14.id, 'file': v14}); com.newgrounds.API.save_file = v14; break; case 'lookupSaveFiles': var v12 = (com.newgrounds.API.getSaveGroup(e.group_id)).getQuery(); v12.onExecuted(e.files); break; case 'rateSaveFile': var v16 = com.newgrounds.API.getSaveGroup(e.group_id); var v14 = v16.getFile(e.save_id); if (e.already_voted) { var v27 = new com.newgrounds.APIError('PERMISSION_DENIED', 'You have already voted on this item today'); com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {'error': v27, 'file': v14, 'save_id': v14.id}); return undefined; } else { if (e.success) { var v10 = v14.onVoted(e); com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {'rating': v10, 'file': v14, 'save_id': v14.id}); } else { com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {'file': v14, 'save_id': v14.id}); com.newgrounds.API.sendError('Your vote was not accepted.'); } } break; case 'saveFile': if (com.newgrounds.API.save_file) { if (!com.newgrounds.API.save_file.exists()) { com.newgrounds.API.save_file.setID(e.save_id, true); } com.newgrounds.API.save_file.onSaved(e); com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_SAVED, e.success, {'save_id': com.newgrounds.API.save_file.__get__id(), 'file': com.newgrounds.API.save_file}); if (e.success) { com.newgrounds.API.sendMessage('You just saved a new file (id #' + e.save_id + ') to the \'' + (com.newgrounds.API.save_file.__get__group()).__get__name() + '\' save group.'); } } com.newgrounds.API.save_file = null; break; case 'checkFilePrivs': var v9 = {'file': com.newgrounds.API.save_file, 'filename': e.filename, 'group': e.group, 'exists': e.exists, 'can_write': e.can_write}; if (e.duplicate_id) { v9.duplicate_id = e.duplicate_id; } if (!e.success) { com.newgrounds.API.sendWarning('You do not have permission to save this file!'); } com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, e.success, v9); } }; v1.getDispatcher = function () { if (!com.newgrounds.API.eventDispatcher) { com.newgrounds.API.eventDispatcher = new com.newgrounds.APIEventDispatcher(); } return com.newgrounds.API.eventDispatcher; }; v1.hasEventListener = function (event) { return (com.newgrounds.API.getDispatcher()).hasEventListener(event); }; v1.addEventListener = function (event, listener, target) { com.newgrounds.API.echo('Adding a listener for \'' + event + '\''); (com.newgrounds.API.getDispatcher()).addEventListener(event, listener, target); }; v1.removeEventListener = function (event, target) { (com.newgrounds.API.getDispatcher()).removeEventListener(event, target); }; v1.callListener = function (event, success, data, target) { com.newgrounds.API.echo('Fired Event: ' + event); var v2 = new com.newgrounds.APIEvent(event, success, data); (com.newgrounds.API.getDispatcher()).dispatchEvent(v2); if (event == com.newgrounds.APIEvent.API_CONNECTED && !success) { com.newgrounds.API.connected = false; } com.newgrounds.API.bridge.sendEvent(event, {'success': success, 'data': data}); }; v1.sendError = function (c, e) { switch (c.command_id) { case 'connectMovie': clearInterval(com.newgrounds.API.timeout); com.newgrounds.API.callListener(com.newgrounds.APIEvent.API_CONNECTED, false, {'error': e, 'response': c}); break; case 'saveFile': com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_SAVED, false, {'error': e, 'file': com.newgrounds.API.save_file, 'response': c}); com.newgrounds.API.save_file = null; } var v3 = '[Newgrounds API ERROR] :: ' + c.command_id + '() - ' + e.name + ':' + '\n' + '\t\t\t\t' + e.message; trace(v3); com.newgrounds.API.bridge.sendEvent('trace', {'data': v3}); }; v1.sendWarning = function (m, c) { if (c) { m += '\r[Newgrounds API WARNING] :: \tSee ' + com.newgrounds.API.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } var v1 = '[Newgrounds API WARNING] :: ' + m; trace(v1); com.newgrounds.API.bridge.sendEvent('trace', {'data': v1}); }; v1.sendNotice = function (m, c) { if (c) { m += '\r[Newgrounds API NOTICE] :: \tSee ' + com.newgrounds.API.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[Newgrounds API NOTICE] :: ' + m); }; v1.fatalError = function (m, c) { if (c) { m += '\r\tSee ' + com.newgrounds.API.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } throw '***ERROR*** frame=' + _root._currentframe + ', class=API' + '\n' + '\n' + m; }; v1.openLoginPage = function () { if (com.newgrounds.API.hasUserSession()) { return undefined; } if (!com.newgrounds.API.remote_auth) { var v1 = com.newgrounds.encoders.MD5.calculate(Math.random() + 'a' + com.newgrounds.API.movie_id); v1 = 'POOPYPANTS'; com.newgrounds.API.remote_auth = new com.newgrounds.RemoteAuth(v1); } var v2 = com.newgrounds.encoders.RC4.encrypt(com.newgrounds.API.remote_auth.__get__token(), com.newgrounds.API.encryption_key); trace(v2); getURL(com.newgrounds.API.LOGIN_URL + '?api_auth_id=' + com.newgrounds.API.movie_id + '&api_auth_key=' + v2, '_blank'); }; v1.sendSecureCommand = function (command, secure_params, unsecure_params, files) { if (!com.newgrounds.API.debug && !com.newgrounds.API.hasUserSession() && !com.newgrounds.API.hasUserEmail()) { com.newgrounds.API.sendError({'command_id': command}, new com.newgrounds.APIError('IDENTIFICATION_REQUIRED', 'You must be logged in, or provide an e-mail address using \'API.setUserEmail("name@domain.com");\' to use ' + command + '().')); return undefined; } if (!command) { com.newgrounds.API.fatalError('Missing command', 'sendSecureCommand'); } if (!secure_params) { com.newgrounds.API.fatalError('Missing secure_params', 'sendSecureCommand'); } if (!unsecure_params) { unsecure_params = new Object(); } var v2 = ''; var v1 = 0; while (v1 < 16) { v2 += com.newgrounds.API.compression_radix.charAt(Math.floor(Math.random() * com.newgrounds.API.compression_radix.length)); ++v1; } if (com.newgrounds.API.debug && !com.newgrounds.API.fake_session && !com.newgrounds.API.session_id) { secure_params.session_id = ''; } else { secure_params.session_id = com.newgrounds.API.session_id; } secure_params.as_version = 2; secure_params.user_email = com.newgrounds.API.user_email; secure_params.publisher_id = com.newgrounds.API.publisher_id; secure_params.seed = v2; secure_params.command_id = command; var v6 = com.newgrounds.encoders.JSON.encode(secure_params); trace('JSON: ' + v6 + '\n'); var v9 = com.newgrounds.encoders.MD5.calculate(v2); var v7 = com.newgrounds.encoders.RC4.encrypt(v6, com.newgrounds.API.encryption_key); var v8 = v9 + v7; unsecure_params.secure = com.newgrounds.API.compressHex(v8); com.newgrounds.API.sendCommand('securePacket', unsecure_params, false, files); }; v1.sendCommand = function (command, params, open_browser, files) { if (!com.newgrounds.API.connected and command != 'connectMovie') { var v12 = 'API.' + command + '() - API.connect() must be called before this command can be called' + '\n'; com.newgrounds.API.fatalError(v12, 'connect'); } if (open_browser) { var v2 = new Object(); } else { var v2 = new LoadVars(); } v2.command_id = command; v2.tracker_id = com.newgrounds.API.movie_id; if (com.newgrounds.API.debug) { v2.debug = com.newgrounds.API.debug; } if (params) { for (var v9 in params) { v2[v9] = params[v9]; } } if (files) { for (v9 in files) { v2[v9] = files[v9]; } } if (open_browser) { var v6 = com.newgrounds.API.GATEWAY_URL + '?seed=' + Math.random(); for (v9 in v2) { v6 += '&' + escape(v9) + '=' + escape(v2[v9]); } trace('OPENING ' + v6); getURL(v6, '_blank'); v2.removeMovieClip(); } else { var v10 = new LoadVars(); v10.remember_command_id = v2.command_id; v10.onData = function (data) { com.newgrounds.API.echo('INPUT: \r' + data + '\n'); if (data) { var v2 = com.newgrounds.encoders.JSON.decode(data); } else { var v2 = {'success': false}; } if (!v2.success) { if (!v2.error_code && !v2.error_msg) { v2.error_code = 'CONNECTION_FAILED'; v2.error_msg = 'Could not contact the API Gateway'; v2.command_id = this.remember_command_id; } var v4 = new com.newgrounds.APIError(v2.error_code, v2.error_msg); com.newgrounds.API.sendError(v2, v4); } else { com.newgrounds.API.doEvent(v2); } }; var v7 = new Array(); for (var v8 in v2) { v7.push(v8 + '=' + escape(v2[v8])); } com.newgrounds.API.echo('POST ' + com.newgrounds.API.GATEWAY_URL + '?' + v7.join('&')); v2.sendAndLoad(com.newgrounds.API.GATEWAY_URL + '?seed=' + Math.random(), v10, 'POST'); com.newgrounds.API.last_command = v2.command_id; } }; v1.renderAd = function (target) { if (com.newgrounds.API.ad_swf_url) { target.background = target.createEmptyMovieClip('background', 100); target.background.beginFill(0); target.background.moveTo(0, 0); target.background.lineTo(300, 0); target.background.lineTo(300, 250); target.background.lineTo(0, 250); target.background.lineTo(0, 0); target.background.endFill(); target.mask = target.createEmptyMovieClip('mask', 101); target.mask.beginFill(0); target.mask.moveTo(0, 0); target.mask.lineTo(300, 0); target.mask.lineTo(300, 250); target.mask.lineTo(0, 250); target.mask.lineTo(0, 0); target.mask.endFill(); target.clip = target.createEmptyMovieClip('clip', 102); target.clip.ad = target.clip.createEmptyMovieClip('ad', 100); target.clip.setMask(target.mask); target.clip.ad._lockroot = true; loadMovie(com.newgrounds.API.ad_swf_url, target.clip.ad); com.newgrounds.API.callListener(com.newgrounds.APIEvent.AD_ATTACHED, true, {'target': target}); } else { com.newgrounds.API.callListener(com.newgrounds.APIEvent.AD_ATTACHED, false, new com.newgrounds.APIError('FLASH_ADS_NOT_APPROVED', 'Unable to render ad')); } }; v1.attachFlashAd = function (target) { if (com.newgrounds.API.checkAdFlood()) { com.newgrounds.API.ad_swf_url = null; } else { if (com.newgrounds.API.checkAdCache()) { com.newgrounds.API.reportNewAsset(); var v1 = new LoadVars(); v1.onData = function (data) { if (data) { com.newgrounds.API.ad_swf_url = data; } else { com.newgrounds.API.ad_swf_url = null; } com.newgrounds.API.reportAssetLoaded(); com.newgrounds.API.renderAd(target); }; if (com.newgrounds.API.ad_url.indexOf('?') > -1) { v1.load(com.newgrounds.API.ad_url + '&random=' + Math.random()); } else { v1.load(com.newgrounds.API.ad_url + '?random=' + Math.random()); } if (!com.newgrounds.API.ad_warning) { com.newgrounds.API.ad_warning = true; com.newgrounds.API.sendMessage('You may get a security sandbox violation from this ad. This is nothing to worry about!'); } } else { if (com.newgrounds.API.ad_swf_url) { com.newgrounds.API.renderAd(target); } } } }; v1.checkAdFlood = function () { if (!com.newgrounds.API.ad_url) { return false; } var v2 = new Date(); var v1 = v2.getTime(); if (v1 >= com.newgrounds.API.ad_flood) { if (v1 - com.newgrounds.API.ad_flood > 1000) { com.newgrounds.API.ad_flood = v1 + 1000; return false; } com.newgrounds.API.ad_flood = v1; com.newgrounds.API.sendWarning('This movie is attempting to load multiple ads at too high of a frequency; you may have a bad preloader loop.'); return true; } return false; }; v1.checkAdCache = function () { if (!com.newgrounds.API.ad_url) { return false; } var v2 = new Date(); var v1 = v2.getTime(); if (v1 >= com.newgrounds.API.ad_url_cache) { com.newgrounds.API.ad_url_cache = v1 + 300000; return true; } return false; }; v1.sendMessage = function (m, r) { var v1 = '[Newgrounds API] :: ' + m; if (r) { return v1; } else { trace(v1); com.newgrounds.API.bridge.sendEvent('trace', {'data': v1}); } }; v1.echo = function (m) { if (com.newgrounds.API.do_echo) { trace(m); } }; v1.LOGIN_URL = 'http://ng-local.newgrounds.com/apilogin/'; v1.do_echo = true; v1.GATEWAY_URL = 'http://www.ngads.com/gateway_v2.php'; v1.NEWGROUNDS_PREVIEW = 'uploads.ungrounded.net/previews'; v1.AD_TERMS_URL = 'http://www.newgrounds.com/wiki/using-the-site/terms-of-use/flash-ads/'; v1.COMMANDS_WIKI_URL = 'http://www.newgrounds.com/wiki/developer-resources/flash-api/commands/'; v1.LOCAL_HOST = 'localhost'; v1.NEWGROUNDS_WWW = 'www.newgrounds.com'; v1.PREVIEW_HOSTS = new Array(com.newgrounds.API.LOCAL_HOST, com.newgrounds.API.NEWGROUNDS_PREVIEW); v1.ad_url_cache = 0; v1.ad_flood = 0; v1.ad_warning = false; v1.save_file = null; v1.publisher_id = 1; v1.fake_session = false; v1.medals = null; v1.userpage_format = null; v1.scoreboards = new Array(); v1.save_groups = null; v1.compression_radix = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X'; v1.errors = com.newgrounds.APIError.init_codes(); v1.sharedObjects = new Object(); v1.bridge = new com.newgrounds.Bridge(_root.NewgroundsAPI_SandboxID); v1.preload = true; v1.preload_items = 0; v1.preload_items_loaded = 0; ASSetPropFlags(com.newgrounds.API.prototype, null, 1); } #endinitclip } movieClip 119 __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) { this.widget_id = id; this.receiver = new LocalConnection(); this.transmitter = new LocalConnection(); this.receiver.receiveEvent = function (event, params) { com.newgrounds.API.callListener(event, params.success, params.data); }; try { this.receiver.connect('rec_' + this.widget_id); } catch (v0) { if (Error(v0) != null) { var error = Error(v0); } else { throw v0; } } }; com.newgrounds.Bridge = v1; var v2 = v1.prototype; v2.sendEvent = function (event, params) { if (this.widget_id) { this.transmitter.send(this.widget_id, 'sendEvent', event, this.validateParams(params)); } }; v2.sendCommand = function (command, params) { if (this.widget_id) { this.transmitter.send(this.widget_id, 'sendCommand', command, this.validateParams(params)); } }; v2.validateParams = function (params) { var v2 = {}; for (var v3 in params) { if (typeof params[v3] == 'string' || typeof params[v3] == 'number') { v2[v3] = params[v3]; } } return v2; }; ASSetPropFlags(com.newgrounds.Bridge.prototype, null, 1); } #endinitclip } movieClip 120 __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) { this._group = _group; this._filename = null; this._file_id = null; this._contents = null; this._thumbnail = null; this._thumbnail_url = null; this.raw = null; this.img = null; this._draft = false; this._keys = new Array(); this._ratings = new Array(); this._file_url = null; com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, this.checkPrivs, this); }; com.newgrounds.SaveFile = v1; var v2 = v1.prototype; v1.setFilePath = function (path) { com.newgrounds.SaveFile.file_path = path + '/'; }; v1.setImagePath = function (path) { com.newgrounds.SaveFile.image_path = path + '/'; }; v2.__get__name = function () { return this._filename; }; v2.__set__name = function (s) { this._filename = s; return this.__get__name(); }; v2.__get__id = function () { return this._file_id; }; v2.__get__description = function () { return this._description; }; v2.__set__description = function (s) { this._description = s; return this.__get__description(); }; v2.__get__contents = function () { return this._contents; }; v2.__set__contents = function (o) { this._contents = o; return this.__get__contents(); }; v2.__get__thumbnailUrl = function () { return com.newgrounds.SaveFile.image_path + this._thumbnail_url; }; v2.__set__thumbnailUrl = function (s) { this._thumbnail_url = s; return this.__get__thumbnailUrl(); }; v2.__get__fileUrl = function () { return com.newgrounds.SaveFile.file_path + this._file_url; }; v2.__set__fileUrl = function (s) { this._file_url = s; return this.__get__fileUrl(); }; v2.__get__authorID = function () { return this._author_id; }; v2.__set__authorID = function (i) { this._author_id = i; return this.__get__authorID(); }; v2.__get__authorName = function () { return this._author_name; }; v2.__set__authorName = function (n) { this._author_name = n; return this.__get__authorName(); }; v2.__get__views = function () { return this._views; }; v2.__get__draft = function () { return this._draft; }; v2.__set__draft = function (d) { this._draft = d; return this.__get__draft(); }; v2.__get__group = function () { return this._group; }; v2.__get__groupId = function () { return this._group.getID(); }; v2.__get__groupName = function () { return this._group.getName(); }; v2.__get__groupType = function () { return this._group.getType(); }; v2.__get__locked = function () { return this._locked; }; v2.__get__shared = function () { return this._isShared(); }; v2.__get__isPrivate = function () { return this._isPrivate(); }; v2.__get__isPublic = function () { return this._isPublic(); }; v2.__get__approved = function () { return this._isApproved(); }; v2.__get__keys = function () { return this._keys; }; v2.__get__ratings = function () { return this._ratings; }; v2.loadAuthorPage = function () { com.newgrounds.API.loadUserPage(this._author_id, this._author_name); }; v2.getID = function () { return this._file_id; }; v2.exists = function () { return this._file_id !== null; }; v2.getGroup = function () { return this._group; }; v2.getName = function () { return this._filename; }; v2._isPrivate = function () { return this.status == com.newgrounds.SaveFile.STATUS.PRIVATE; }; v2._isShared = function () { return this.status > com.newgrounds.SaveFile.STATUS.PRIVATE; }; v2._isApproved = function () { return this.status > com.newgrounds.SaveFile.STATUS.UNAPPROVED; }; v2._isPublic = function () { if (this._isPrivate()) { return false; return false; } if (this._group.isType('SYSTEM') or this._group.isType('PRIVATE')) { return false; return false; } if (this._group.isType('PUBLIC')) { return true; return false; } if (this._isApproved()) { return true; } return false; }; v2.isLocked = function () { return this._locked; }; v2.getDescription = function () { return this._description; }; v2.getShared = function () { return this._draft; }; v2.getThumbnailImageScan = function () { return this.img; }; v2.getRawContents = function () { return this.raw; }; v2.getDuplicateID = function () { return this.duplicate_id; }; v2.getKeys = function () { return this._keys; }; v2.getKey = function (key) { var v3 = (this.getGroup()).getKey(key); var v2 = 0; while (v2 < this._keys.length) { if (this._keys[v2].id == v3.key_id) { return this._keys[v2].value; } ++v2; } }; v2.getRating = function (rating) { var v2 = (this.getGroup()).getRating(rating); if (this._ratings[v2.rating_id]) { return this._ratings[v2.rating_id]; } else { return null; } }; v2.overwriteAllowed = function () { return this.overwrite; }; v2.getFileURL = function () { return com.newgrounds.SaveFile.file_path + this._file_url; }; v2.getThumbnailURL = function () { return com.newgrounds.SaveFile.image_path + this._thumbnail_url; }; v2.overwriteExisting = function () { this.overwrite = true; }; v2.setID = function (id, add_to_group) { this._file_id = id; if (add_to_group) { (this.getGroup()).addFile(this); } }; v2.setName = function (filename, locked) { this._filename = filename; this._locked = locked; }; v2.setDescription = function (description) { this._description = description; }; v2.setDraft = function (draft) { this._draft = draft; }; v2.setContents = function (_contents) { this._contents = _contents; }; v2.setThumbnail = function (thumb) { if (thumb) { this._thumbnail = thumb; } else { this._thumbnail = null; } }; v2.setThumbnailURL = function (url) { this._thumbnail_url = url; }; v2.setFileURL = function (url) { this._file_url = url; }; v2.setPermissions = function (status, _locked) { this._locked = _locked; this.status = status; }; v2.setKey = function (key, val) { var v4 = (this.getGroup()).getKeyID(key); var v2; if (!v4) { this.onError('\'' + key + '\' is not a valid key for the \'' + this._group.__get__name() + '\' save group', 'setKey', 'INVALID_VALUE', true); return undefined; } if (!this._group.keyValueIsValid(key, val) && val !== null) { this.onError('\'' + val + '\' is not a valid ' + this._group.getKeyType(key, true), 'setKey', 'INVALID_VALUE', true); return undefined; } switch (this._group.getKeyType(key, true)) { case 'string': if (val) { val = String(val); } else { val = undefined; } break; default: val = Number(val); } var v5 = {'id': v4, 'value': val}; for (var v6 in this._keys) { v2 = this._keys[v6]; if (v2.id == v4) { this._keys[v6] = v5; return undefined; } } this._keys.push(v5); }; v2.setRating = function (rating, votes, score) { var v2 = (this.getGroup()).getRating(rating); if (!votes) { votes = 0; } if (!score) { score = 0; } if (!v2.is_float) { score = Math.round(Number(score)); } this._ratings[v2.rating_id] = {'id': Number(v2.rating_id), 'name': v2.rating_name, 'votes': Number(votes), 'score': Number(score)}; return this._ratings[v2.rating_id]; }; v2.clearBuffer = function () { this._contents = null; this.raw = null; this.img = null; this.scanner = null; this.overwrite = false; this.duplicate_id = null; }; v2.onError = function (msg, funct, code) { com.newgrounds.SaveFile.busy = false; if (!code) { code = 'SAVE_FILE_ERROR'; } if (!funct) { funct = 'unknown_function'; } var v3 = 'getSaveGroup(\'' + this._group.getName() + '\')'; if (this.exists()) { funct = v3 + '.getFile(\'' + this.getName() + '\').' + funct; } else { funct = v3 + '.getNewFile().' + funct; } var v5 = new com.newgrounds.APIError(code, msg); com.newgrounds.API.sendError({'command_id': funct}, v5); }; v2.onSaved = function (p) { com.newgrounds.SaveFile.busy = false; if (!this.exists()) { this.setID(p.save_id, true); } this.setName(p.filename); this.setFileURL(p.file_url); if (p.thumbnail) { this._thumbnail_url = p.thumbnail; } }; v2.onVoted = function (p) { trace('ONVOTED WAS CALLED'); return this.setRating(p.rating_id, p.votes, p.score); }; v2.sendRating = function (rating, vote) { var v6 = null; if (!com.newgrounds.API.hasUserSession()) { v6 = new com.newgrounds.APIError('PERMISSION_DENIED', 'You must be logged in to vote on save files'); } var v2 = this._group.getRating(rating); if (!v2) { v6 = new com.newgrounds.APIError('PERMISSION_DENIED', '\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' save group'); } if (this.voted === true) { v6 = new com.newgrounds.APIError('PERMISSION_DENIED', 'You have already voted on this item today'); } if (vote < v2.min_value or vote > v2.max_value) { v6 = new com.newgrounds.APIError('PERMISSION_DENIED', '\'' + rating + '\' votes must be between ' + v2.min_value + ' and ' + v2.max_value); } if (v6) { com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {'error': v6, 'file': this}); return undefined; } this.voted = true; com.newgrounds.API.rateSaveFile(this, v2, vote); }; v2.replace = function () { if (com.newgrounds.SaveFile.busy) { this.onError('Another file is currently being saved, please try again later', 'replace'); return undefined; } this.overwriteExisting(); this.save(); }; v2.save = function () { if (com.newgrounds.API.hasUserSession() && !this._author_id && !this._author_name) { this._author_id = com.newgrounds.API.getUserID(); this._author_name = com.newgrounds.API.getUserName(); } if (com.newgrounds.SaveFile.busy) { this.onError('Another file is currently being saved, please try again later', 'save', 'UPLOAD_IN_PROGRESS'); return undefined; } com.newgrounds.SaveFile.busy = true; if (this.isLocked()) { this.onError('This file is _locked and cannot be overwritten.', 'save', 'PERMISSION_DENIED'); return undefined; } if (!this._filename) { this.onError('Please provide a name for your file.', 'save', 'MISSING_PARAM'); return undefined; } else { if (!this._contents) { this.onError('The file is empty.', 'save', 'MISSING_PARAM'); return undefined; } } this.img = null; com.newgrounds.API.checkFilePrivs(this); }; v2.checkPrivs = function (e) { if (e.data.file.id != this.__get__id()) { return undefined; } if (e.success) { if (e.data.can_write) { this.can_write = e.data.can_write; if (e.data.duplicate_id) { this.duplicate_id = e.data.duplicate_id; } if (e.data.exists && !this.overwriteAllowed()) { this.onError('You already have a file named \'' + this.getName() + '\'', 'save', 'CONFIRM_REQUEST'); } else { this.startFile(); } } else { this.onError('This file is _locked and cannot be overwritten', 'save', 'PERMISSION_DENIED'); } } else { this.onError('There was a problem looking up your file\'s details. The server may be down.', 'save', 'UNKNOWN_ERROR'); } }; v2.startFile = function () { if (this.can_write) { if (this._thumbnail) { this.scanner = new com.newgrounds.encoders.ImageScanner(this._thumbnail); this.scanner.setCallback(this, 'encodeFile'); this.scanner.startScan(100, 100, true); } else { this.encodeFile(); } } else { this.onError('You do not have permission to save this file.', 'save', 'PERMISSION_DENIED'); } }; v2.encodeFile = function (img) { this.img = img; this.raw = (com.newgrounds.encoders.SerialXML.encode(this._contents)).toString(); this.compressFile(); }; v2.compressFile = function () { com.newgrounds.encoders.LZW2.compress(this.raw, function (s, p) { p.file.onCompressed(s); }, {'file': this}); }; v2.onCompressed = function (compressed) { this.raw = escape(compressed); this.writeFile(); }; v2.getProgress = function () {}; v2.writeFile = function () { ((this.getGroup()).getQuery()).clearCache(); com.newgrounds.API.saveFile(this); this.clearBuffer(); }; v2.loadContents = function () { if (this._contents) { com.newgrounds.API.setCurrentSaveFile(this); com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, true, {'file': this}); return undefined; } if (!this.getFileURL()) { var v4 = new com.newgrounds.APIError('FILE_NOT_FOUND', 'Attempted to load contents of an unsaved file.'); com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, false, {'file': this, 'error': v4}); return undefined; } var v2 = new LoadVars(); v2.target = this; var target = this; v2.onData = function (encoded) { target.onLoaded(encoded); }; v2.load(this.getFileURL()); }; v2.onLoaded = function (encoded) { if (encoded == undefined) { var v3 = new com.newgrounds.APIError('FILE_NOT_FOUND', 'We could not find the contents for this file. It may have been deleted.'); com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, false, {'file': this, 'error': v3}); return undefined; } com.newgrounds.encoders.LZW.setXMLSafe(true); this._contents = com.newgrounds.encoders.SerialXML.decode(com.newgrounds.encoders.LZW.decompress(encoded)); com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, true, {'file': this}); }; v2.setViews = function (n) { this._views = n; }; v1.busy = false; v2.can_write = false; v2._draft = false; v2.status = 0; v2.voted = false; v2._views = 0; v2._locked = false; v2.overwrite = false; v2.duplicate_id = null; v2._keys = null; v2._ratings = null; v2._author_id = null; v2._author_name = null; v1.STATUS = {'PRIVATE': 1, 'PUBLIC': 2, 'UNAPPROVED': 3, 'APPROVED': 4}; v2.addProperty('approved', v2.__get__approved, function () {}); v2.addProperty('authorID', v2.__get__authorID, v2.__set__authorID); v2.addProperty('authorName', v2.__get__authorName, v2.__set__authorName); v2.addProperty('contents', v2.__get__contents, v2.__set__contents); v2.addProperty('description', v2.__get__description, v2.__set__description); v2.addProperty('draft', v2.__get__draft, v2.__set__draft); v2.addProperty('fileUrl', v2.__get__fileUrl, v2.__set__fileUrl); v2.addProperty('group', v2.__get__group, function () {}); v2.addProperty('groupId', v2.__get__groupId, function () {}); v2.addProperty('groupName', v2.__get__groupName, function () {}); v2.addProperty('groupType', v2.__get__groupType, function () {}); v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('isPrivate', v2.__get__isPrivate, function () {}); v2.addProperty('isPublic', v2.__get__isPublic, function () {}); v2.addProperty('keys', v2.__get__keys, function () {}); v2.addProperty('locked', v2.__get__locked, function () {}); v2.addProperty('name', v2.__get__name, v2.__set__name); v2.addProperty('ratings', v2.__get__ratings, function () {}); v2.addProperty('shared', v2.__get__shared, function () {}); v2.addProperty('thumbnailUrl', v2.__get__thumbnailUrl, v2.__set__thumbnailUrl); v2.addProperty('views', v2.__get__views, function () {}); ASSetPropFlags(com.newgrounds.SaveFile.prototype, null, 1); } #endinitclip } movieClip 121 __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 (group_id, group_name, group_type) { this.group_name = group_name; this.group_id = group_id; this.group_type = group_type; this.query = new com.newgrounds.SaveGroupQuery(this); this.ratings = new Array(); this.keys = new Array(); this.files = new Array(); }; com.newgrounds.SaveGroup = v1; var v2 = v1.prototype; v2.__get__id = function () { return this.group_id; }; v2.__get__name = function () { return this.group_name; }; v2.__get__type = function () { return this.group_type; }; v2.addFile = function (file) { var v2 = 0; while (v2 < this.files.length) { if (this.files[v2].getID() == file.getID()) { this.files[v2] = file; return undefined; } ++v2; } this.files.push(file); }; v2.getFile = function (file_id) { trace('getting the file ' + file_id); var v2 = 0; while (v2 < this.files.length) { trace('Looking up ' + file_id + ' :: ' + this.files[v2].getID() + ' || ' + this.files[v2].getName()); if (com.newgrounds.SaveGroup.isNumeric(file_id) and this.files[v2].getID() == Number(file_id)) { return this.files[v2]; } else { if (this.files[v2].getName() == file_id) { return this.files[v2]; } } ++v2; } return null; }; v2.addRating = function (rating_id, rating_name, min_value, max_value, is_float) { var v3 = {'rating_id': rating_id, 'rating_name': rating_name, 'min_value': min_value, 'max_value': max_value, 'is_float': is_float}; if (!this.getRatingID(rating_name)) { this.ratings.push(v3); } }; v2.getRating = function (rating_id) { var v2 = 0; while (v2 < this.ratings.length) { if (com.newgrounds.SaveGroup.isNumeric(rating_id) and this.ratings[v2].rating_id == rating_id) { return this.ratings[v2]; } else { if (this.ratings[v2].rating_name == rating_id) { return this.ratings[v2]; } } ++v2; } return null; }; v2.getRatingID = function (rating_id) { var v2 = this.getRating(rating_id); if (v2) { return v2.rating_id; } return null; }; v2.getRatingName = function (rating_id) { var v2 = this.getRating(rating_id); if (v2) { return v2.rating_name; } return null; }; v2.addKey = function (key_id, key_name, key_type) { trace('>>>>>>>>>>> ADDING KEY ' + key_id + ' ' + key_name + ' ' + key_type); var v2 = {'key_id': key_id, 'key_name': key_name, 'key_type': key_type}; if (!this.getKey(key_name)) { this.keys.push(v2); } }; v2.getKey = function (key_id) { var v2 = 0; while (v2 < this.keys.length) { if (com.newgrounds.SaveGroup.isNumeric(key_id) and this.keys[v2].key_id == key_id) { return this.keys[v2]; } else { if (this.keys[v2].key_name == key_id) { return this.keys[v2]; } } ++v2; } return null; }; v2.getKeyType = function (key_name, as_string) { var v2 = this.getKey(key_name); if (v2) { return as_string ? com.newgrounds.SaveGroup.KEY_TYPES[v2.key_type] : v2.key_type; } return null; }; v2.getKeyID = function (key_id) { var v2 = this.getKey(key_id); if (v2) { return v2.key_id; } return null; }; v2.getKeyName = function (key_id) { var v2 = this.getKey(key_id); if (v2) { return v2.key_name; } return null; }; v2.keyValueIsValid = function (key, value) { var v4; var v7; if (typeof value == 'number' or (Number(value)).toString() == String(value)) { value = Number(value); v4 = (Math.round(value) === value) ? 'integer' : 'float'; } else { v4 = typeof value; if (v4 == 'string') { var v6 = '01234567890.-'; var v5 = true; var v2 = 0; while (v2 < value.length) { if (v6.indexOf(value.charAt(v2)) < 0) { v5 = false; break; } ++v2; } if (v5) { value = Number(value); v4 = 'float'; } } } switch (this.getKeyType(key, true)) { case 'integer': v7 = v4 == 'integer' or v4 == 'boolean'; return v7; case 'float': v7 = v4 == 'float' or v4 == 'integer' or v4 == 'boolean'; return v7; case 'string': v7 = v4 == 'string' or v4 == 'float' or v4 == 'integer' or v4 == 'boolean'; return v7; case 'boolean': v7 = v4 == 'boolean' or value == 1 or value == 0 or value == ''; return v7; } v7 = false; return v7; }; v2.isType = function (type) { return this.group_type == com.newgrounds.SaveGroup.TYPES[type.toUpperCase()]; }; v2.getID = function () { return this.group_id; }; v2.getName = function () { return this.group_name; }; v2.getType = function () { return this.group_type; }; v2.isSystem = function () { return undefined; }; v2.getQuery = function (as_object) { if (as_object) { return this.query.toObject(); } return this.query; }; v2.newQuery = function () { this.query.reset(); return this.query; }; v2.clearQuery = function () { this.query.reset(); }; v2.newFile = function () { var v2 = new com.newgrounds.SaveFile(this); return v2; }; v1.isNumeric = function (value) { return typeof value == 'number' or (Number(value)).toString() == String(value); }; v1.KEY_TYPES = [null, 'float', 'integer', 'string', 'boolean']; v1.TYPES = {'SYSTEM': 0, 'PRIVATE': 1, 'PUBLIC': 2, 'MODERATED': 3}; v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('name', v2.__get__name, function () {}); v2.addProperty('type', v2.__get__type, function () {}); ASSetPropFlags(com.newgrounds.SaveGroup.prototype, null, 1); } #endinitclip } movieClip 122 __Packages.com.newgrounds.ValidationTools { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.ValidationTools) { var v1 = function () {}; com.newgrounds.ValidationTools = v1; var v2 = v1.prototype; v1.isNumber = function (v) { if (typeof v == 'number') { return true; return false; } if (typeof v == 'string' and (Number(v)).toString() == v) { return true; } return false; }; v1.isInteger = function (v) { if (com.newgrounds.ValidationTools.isNumber(v)) { v = Number(v); return Math.floor(v) == v; } return false; }; v1.isFloat = function (v) { return com.newgrounds.ValidationTools.isNumber(v); }; v1.isString = function (v) { if (typeof v == 'string' or typeof v == 'number') { return true; } return false; }; v1.isEmpty = function (o) { for (var v2 in o) { return false; } return true; }; ASSetPropFlags(com.newgrounds.ValidationTools.prototype, null, 1); } #endinitclip } movieClip 123 __Packages.com.newgrounds.SaveGroupQuery { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.SaveGroupQuery) { var v1 = function (_group) { this._group = _group; this.reset(); }; com.newgrounds.SaveGroupQuery = v1; var v2 = v1.prototype; v2.__get__group = function () { return this._group; }; v2.__get__groupId = function () { return this._group.getID(); }; v2.__get__resultsPerPage = function () { return this._num_results; }; v2.__set__resultsPerPage = function (n) { this._num_results = n; return this.__get__resultsPerPage(); }; v2.__get__pages = function () { return this._pages; }; v2.__get__page = function () { return this._page; }; v2.__set__page = function (n) { this._page = n; return this.__get__page(); }; v2.__get__randomize = function () { return this._randomize_results; }; v2.__set__randomize = function (b) { this._randomize_results = b; return this.__get__randomize(); }; v2.__get__results = function () { return this._results; }; v2.clearCache = function () { this._results = []; }; v2.reset = function () { this.file_conditions = new Array(); this.key_conditions = new Array(); this.rating_conditions = new Array(); this.sort_conditions = new Array(); this.lookup_keys = new Object(); this.lookup_ratings = new Object(); this._num_results = 20; this._page = 1; this._randomize_results = false; this._group_by = new Array(); this.clearCache(); }; v2.getGroup = function () { return this._group; }; v2.getGroupID = function () { return this._group.getID(); }; v2.isRandomized = function () { return this._randomize_results; }; v2.toObject = function () { var v2; var v11 = {'page': this._page, 'num_results': this._num_results}; if (this._randomize_results) { v11.randomize = 1; } if (!com.newgrounds.ValidationTools.isEmpty(this.file_conditions)) { var v12 = []; v2 = 0; while (v2 < this.file_conditions.length) { var v6 = this.file_conditions[v2]; v12.push({'field': com.newgrounds.SaveGroupQuery.file_fields[v6.field.toUpperCase()].id, 'operator': v6.operator, 'value': v6.value}); ++v2; } v11.file_conditions = v12; } if (!com.newgrounds.ValidationTools.isEmpty(this.key_conditions)) { v11.key_conditions = this.key_conditions; } if (!com.newgrounds.ValidationTools.isEmpty(this.rating_conditions)) { v11.rating_conditions = this.rating_conditions; } if (!com.newgrounds.ValidationTools.isEmpty(this.sort_conditions)) { var v14 = []; v2 = 0; while (v2 < this.sort_conditions.length) { var v3 = this.sort_conditions[v2]; if (v3.table == com.newgrounds.SaveGroupQuery.TABLE_FILES) { var v8 = com.newgrounds.SaveGroupQuery.file_fields[v3.field.toUpperCase()].id; } else { var v8 = v3.field; } var v5 = {'field': v8, 'table': v3.table}; if (v3.desc) { v5.desc = 1; } if (v3.extra) { v5.extra = v3.extra; } v14.push(v5); ++v2; } v11.sort_conditions = v14; } if (!com.newgrounds.ValidationTools.isEmpty(this.lookup_keys)) { var v15 = []; for (v2 in this.lookup_keys) { v15.push(v2); } v11.lookup_keys = v15; } if (!com.newgrounds.ValidationTools.isEmpty(this.lookup_ratings)) { var v13 = []; for (v2 in this.lookup_ratings) { v13.push(v2); } v11.lookup_ratings = v13; } if (!com.newgrounds.ValidationTools.isEmpty(this._group_by)) { var v16 = []; v2 = 0; while (v2 < this._group_by.length) { var v4 = this._group_by[v2]; if (v4.table == com.newgrounds.SaveGroupQuery.TABLE_FILES) { v8 = com.newgrounds.SaveGroupQuery.file_fields[v4.field.toUpperCase()].id; } else { v8 = v4.field; } v16.push({'field': v8, 'table': v4.table}); ++v2; } v11.group_by = v16; } return v11; }; v2.toString = function () { var v9; var v2; var v11 = []; v9 = 'Lookup:\r'; var v14 = []; for (var v6 in com.newgrounds.SaveGroupQuery.file_fields) { v14.push(' ' + v6); v2 = true; } v9 += v14.join('\n'); v11.push(v9); v9 = ''; v2 = false; var v16 = []; for (v6 in this.lookup_keys) { v16.push(' KEY \'' + this._group.getKeyName(v6) + '\''); v2 = true; } if (v2) { v9 += v16.join('\n'); v11.push(v9); } v9 = ''; v2 = false; var v15 = []; for (v6 in this.lookup_ratings) { v15.push(' RATING \'' + this._group.getRatingName(v6) + '\''); v2 = true; } if (v2) { v9 += v15.join('\n'); v11.push(v9); } v9 = 'Where:\r'; v2 = false; var v8 = []; v6 = 0; while (v6 < this.file_conditions.length) { var v7 = this.file_conditions[v6]; var v10 = ' ' + v7.field + ' ' + v7.operator + ' ' + v7.value; v8.push(v10); v2 = true; ++v6; } v6 = 0; while (v6 < this.key_conditions.length) { v7 = this.key_conditions[v6]; v10 = ' KEY \'' + this._group.getKeyName(v7.key_id) + '\' ' + v7.operator + ' ' + v7.value; v8.push(v10); v2 = true; ++v6; } v6 = 0; while (v6 < this.rating_conditions.length) { v7 = this.rating_conditions[v6]; v10 = ' RATING \'' + this._group.getRatingName(v7.rating_id) + '\' ' + v7.operator + ' ' + v7.value; v8.push(v10); v2 = true; ++v6; } if (v2) { v9 += v8.join('\n'); v11.push(v9); } v9 = 'Group By:\r'; v2 = false; var v13 = []; v6 = 0; while (v6 < this._group_by.length) { var v4 = this._group_by[v6]; var v5; if (v4.table == com.newgrounds.SaveGroupQuery.TABLE_KEYS) { v5 = ' KEY \'' + this._group.getKeyName(v4.field) + '\''; } else { if (v4.table == com.newgrounds.SaveGroupQuery.TABLE_RATINGS) { v5 = ' RATING \'' + this._group.getRatingName(v4.field) + '\''; } else { v5 = ' ' + v4.field; } } v13.push(v5); v2 = true; ++v6; } if (v2) { v9 += v13.join('\n'); v11.push(v9); } v9 = 'Order By:\r'; v2 = false; var v12 = []; if (this.isRandomized()) { v12.push(' RANDOM'); v2 = true; } v6 = 0; while (v6 < this.sort_conditions.length) { var v3 = this.sort_conditions[v6]; if (v3.table == com.newgrounds.SaveGroupQuery.TABLE_KEYS) { v5 = ' KEY \'' + this._group.getKeyName(v3.field) + '\''; } else { if (v3.table == com.newgrounds.SaveGroupQuery.TABLE_RATINGS) { v5 = ' RATING \'' + this._group.getRatingName(v3.field) + '\' ' + ((v3.extra == 'votes') ? 'VOTES' : 'SCORE'); } else { v5 = ' ' + v3.field; } } v5 += v3.desc ? ' (DESCENDING)' : ''; v12.push(v5); v2 = true; ++v6; } if (v2) { v9 += v12.join('\n'); v11.push(v9); } v11.push('Page:\r ' + this._page); v11.push('Results Per Page:\r ' + this._num_results); return v11.join('\n'); }; v2.setResultsPerPage = function (r) { this._num_results = r; this.clearCache(); }; v2.setPage = function (p) { this._page = p; this.clearCache(); }; v2.setRandomize = function (bool) { this._randomize_results = (bool === false) ? false : true; }; v2.includeKey = function (key) { if (!this._group.getKeyID(key)) { trace('[SaveGroupQuery Error] :: \'' + key + '\' is not a valid key for the \'' + this._group.__get__name() + '\' group.'); return undefined; } this.lookup_keys[this._group.getKeyID(key)] = 1; this.clearCache(); }; v2.includeRating = function (rating) { if (!this._group.getRatingID(rating)) { trace('[SaveGroupQuery Error] :: \'' + rating + '\' is not a valid rating for the \'' + this._group.__get__name() + '\' group.'); return undefined; } this.lookup_ratings[this._group.getRatingID(rating)] = 1; this.clearCache(); }; v2.groupBy = function (field) { this.addGroupItem(com.newgrounds.SaveGroupQuery.TABLE_FILES, field); }; v2.groupByKey = function (key) { if (!this._group.getKeyID(key)) { this.error('\'' + key + '\' is not a valid key for the \'' + this._group.getName() + '\' _group'); return undefined; } this.addGroupItem(com.newgrounds.SaveGroupQuery.TABLE_KEYS, this._group.getKeyID(key)); }; v2.groupByRating = function (rating) { if (!this._group.getRatingID(rating)) { this.error('\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' _group'); return undefined; } this.addGroupItem(com.newgrounds.SaveGroupQuery.TABLE_RATINGS, this._group.getRatingID(rating)); }; v2.addGroupItem = function (table, field) { this._group_by.push({'table': table, 'field': field}); this.clearCache(); }; v2.excludeKey = function (key) { delete this.lookup_keys[this._group.getKeyID(key)]; this.clearCache(); }; v2.excludeRating = function (rating) { delete this.lookup_ratings[this._group.getRatingID(rating)]; this.clearCache(); }; v2.addCondition = function (field, operator, value) { if (field == 'FILE_STATUS' && typeof value == 'string' && com.newgrounds.SaveFile.STATUS[value.toUpperCase()] !== undefined) { value = com.newgrounds.SaveFile.STATUS[value.toUpperCase()]; } if (operator == '==') { operator = '='; } if (!this.validateOperator(operator) or !this.validateValue(field, value)) { return undefined; } this.file_conditions.push({'field': field, 'operator': operator, 'value': value}); this.clearCache(); }; v2.addKeyCondition = function (key, operator, value) { if (!this._group.getKeyID(key)) { this.error('\'' + key + '\' is not a valid key for the \'' + this._group.getName() + '\' save _group'); } else { if (!this.validateOperator(operator) or !this.validateKeyValue(key, value)) { return undefined; } } this.key_conditions.push({'key_id': this._group.getKeyID(key), 'operator': operator, 'value': value}); this.clearCache(); }; v2.addRatingCondition = function (rating, operator, value, column) { if (!column) { column = 'SCORE'; } if (!this._group.getRatingID(rating)) { this.error('\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' save _group'); } else { if (!this.validateOperator(operator)) { return undefined; } else { if (!com.newgrounds.ValidationTools.isNumber(value)) { this.error('Expected numeric value for rating \'' + rating + '\''); return undefined; } } } if (!com.newgrounds.SaveGroupQuery.rating_columns[column]) { var v2 = []; for (var v3 in com.newgrounds.SaveGroupQuery.rating_columns) { v2.push(v3); } this.error('Invalid rating column \'' + column + '\'. Valid columns are ' + v2.join(', ')); return undefined; } this.rating_conditions.push({'rating_id': this._group.getRatingID(rating), 'operator': operator, 'value': value, 'column': com.newgrounds.SaveGroupQuery.rating_columns[column]}); this.clearCache(); }; v2.sortOn = function (field, order) { if (!com.newgrounds.SaveGroupQuery.file_fields[field]) { var v2 = []; for (var v3 in com.newgrounds.SaveGroupQuery.file_fields) { v2.push(v3); } this.error('\'' + field + '\' is not a valid sort field. Valid fields are: ' + v2.join(', ')); return undefined; } this.addSortCondition(com.newgrounds.SaveGroupQuery.TABLE_FILES, field, order); }; v2.sortOnKey = function (key, order) { if (!this._group.getKeyID(key)) { this.error('\'' + key + '\' is not a valid key for the \'' + this._group.getName() + '\' _group'); return undefined; } this.addSortCondition(com.newgrounds.SaveGroupQuery.TABLE_KEYS, this._group.getKeyID(key), order); }; v2.sortOnRating = function (rating, order, column) { if (!this._group.getRatingID(rating)) { this.error('\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' _group'); return undefined; } if (!column) { column = 'score'; } this.addSortCondition(com.newgrounds.SaveGroupQuery.TABLE_RATINGS, this._group.getRatingID(rating), order, column); }; v2.sortOnRatingScore = function (rating, order) { this.sortOnRating(rating, order, 'score'); }; v2.sortOnRatingVotes = function (rating, order) { this.sortOnRating(rating, order, 'votes'); }; v2.addSortCondition = function (table, field, order, extra) { var v7; if (!order or order == '' or order.toUpperCase() == 'ASC') { v7 = false; } else { if (order.toUpperCase() == 'DESC') { v7 = true; } else { this.error('\'' + order + '\' is not a valid sort order!'); return undefined; } } var v3 = {'table': table, 'field': field, 'desc': v7}; if (extra) { v3.extra = extra; } this.sort_conditions.push(v3); this.clearCache(); }; v2.onExecuted = function (results) { this._results = []; var v6 = 0; while (v6 < results.length) { var v2 = results[v6]; var v3 = new com.newgrounds.SaveFile(this._group); v3.setName(v2.filename); v3.setID(v2.save_id); v3.setDescription(v2.description); v3.setThumbnailURL(v2.thumb); v3.setFileURL(v2.file); if (v2.views) { v3.setViews(v2.views); } v3.setPermissions(v2.status, v2.locked); v3.authorName = v2.user_name; v3.authorID = v2.user_id; var v5 = 0; while (v5 < v2.keys.length) { v3.setKey(v2.keys[v5].id, v2.keys[v5].value); ++v5; } var v4 = 0; while (v4 < v2.ratings.length) { v3.setRating(v2.ratings[v4].id, v2.ratings[v4].votes, v2.ratings[v4].score); ++v4; } (this.getGroup()).addFile(v3); this._results.push(v3); ++v6; } this.callEventDispatcher(); }; v2.hasResults = function () { return this._results && this._results.length > 0; }; v2.callEventDispatcher = function () { com.newgrounds.API.callListener(com.newgrounds.APIEvent.QUERY_COMPLETE, true, {'query': this}); }; v2.execute = function () { if (this.hasResults() && !this.isRandomized()) { this.callEventDispatcher(); return undefined; } this._group.query = this; com.newgrounds.API.lookupSaveFiles(this._group); }; v2.processResults = function (files) { return null; }; v2.validateKeyValue = function (key, value) { var v3 = this._group.getKeyType(key); if (v3) { var v2 = com.newgrounds.SaveGroup.KEY_TYPES[v3]; if (v2 == 'float' and com.newgrounds.ValidationTools.isFloat(value)) { return true; } else { if (v2 == 'integer' and com.newgrounds.ValidationTools.isInteger(value)) { return true; } else { if (v2 == 'string' and com.newgrounds.ValidationTools.isString(value)) { return true; } } } this.error('Expected type ' + v2 + ' for key \'' + key + '\''); } return false; }; v2.validateValue = function (field, value) { if (com.newgrounds.SaveGroupQuery.file_fields[field]) { if (com.newgrounds.SaveGroupQuery.file_fields[field].type == 'integer' and com.newgrounds.ValidationTools.isInteger(value)) { return true; } else { if (com.newgrounds.SaveGroupQuery.file_fields[field].type == 'float' and com.newgrounds.ValidationTools.isFloat(value)) { return true; } else { if (com.newgrounds.SaveGroupQuery.file_fields[field].type == 'string' and com.newgrounds.ValidationTools.isString(value)) { return true; } else { this.error('Expecting ' + com.newgrounds.SaveGroupQuery.file_fields[field].type + ' value on \'' + field + '\' condition'); } } } return false; } var v2 = []; for (var v4 in com.newgrounds.SaveGroupQuery.file_fields) { v2.push(v4); } this.error('\'' + field + '\' is not a searchable field. Valid fields are: ' + v2.join(', ')); return false; }; v2.validateOperator = function (operator) { var v2 = 0; while (v2 < com.newgrounds.SaveGroupQuery.valid_operators.length) { if (operator == com.newgrounds.SaveGroupQuery.valid_operators[v2]) { return true; } ++v2; } this.error('\'' + operator + '\' is not a valid lookup operation. Valid operations are: ' + com.newgrounds.SaveGroupQuery.valid_operators.join(', ')); return false; }; v2.error = function (msg) { trace('[QUERY ERROR] :: ' + msg); }; v1.TABLE_FILES = 1; v1.TABLE_KEYS = 2; v1.TABLE_RATINGS = 3; v2._results = []; v1.file_fields = {'FILE_ID': {'id': 0, 'field': 'file_id', 'type': 'integer'}, 'AUTHOR_ID': {'id': 1, 'field': 'user_id', 'type': 'integer'}, 'AUTHOR_NAME': {'id': 2, 'field': 'user_name', 'type': 'string'}, 'FILE_NAME': {'id': 3, 'field': 'file_name', 'type': 'string'}, 'CREATED_ON': {'id': 4, 'field': 'created', 'type': 'string'}, 'UPDATED_ON': {'id': 5, 'field': 'last_update', 'type': 'string'}, 'TOTAL_VIEWS': {'id': 6, 'field': 'views', 'type': 'integer'}, 'FILE_STATUS': {'id': 7, 'field': 'status', 'type': 'integer'}}; v1.rating_columns = {'TOTAL_VOTES': 'votes', 'SCORE': 'score'}; v1.valid_operators = ['=', '<', '>', '!=', '<>', '<=', '>=', '*', '!*', '!*=', '!=*', '*=', '=*']; v2.addProperty('group', v2.__get__group, function () {}); v2.addProperty('groupId', v2.__get__groupId, function () {}); v2.addProperty('page', v2.__get__page, v2.__set__page); v2.addProperty('pages', v2.__get__pages, function () {}); v2.addProperty('randomize', v2.__get__randomize, v2.__set__randomize); v2.addProperty('results', v2.__get__results, function () {}); v2.addProperty('resultsPerPage', v2.__get__resultsPerPage, v2.__set__resultsPerPage); ASSetPropFlags(com.newgrounds.SaveGroupQuery.prototype, null, 1); } #endinitclip } movieClip 124 __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) { this.ceiling = 100000000000000.0; if (hash) { this.hashIndex = hash; } else { this.hashIndex = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/'; } this.bitSize = this.hashIndex.length; this.hashVal = new Object(); this.i = 0; while (this.i < this.bitSize) { this.hashVal[this.hashIndex.charAt(this.i)] = this.i; ++this.i; } }; com.newgrounds.encoders.BaseN = v1; var v2 = v1.prototype; v2.verify = function (s) { if (this.hashVal[s] != undefined) { return true; } else { return false; } }; v2.encode = function (n, minchars) { this.debug.lastencode = ''; if (typeof this.i != 'string') { n = n.toString(); } if (n.charAt(0) == '-') { var v3 = '-'; n = n.substring(1); } else { var v3 = ''; } if ((String(n)).indexOf('.') > -1) { var v4 = (String(n)).split('.', 2); return v3 + this.baseNEncoder(v4[0], minchars) + '.' + this.baseNEncoder(v4[1]); } else { this.debug.lastencode += '\tNo decimal\r'; return v3 + this.baseNEncoder(n, minchars); } }; v2.decode = function (s) { var v4 = 1; if (s.charAt(0) == '-') { v4 = -1; s = s.substring(1, s.length); } var v3 = s.indexOf('.'); if (v3 > -1) { var v5 = Math.pow(10, this.baseNDecoder(s.substring(v3 + 1, s.length))); return (this.baseNDecoder(s.substring(0, v3)) / v5) * v4; } else { return this.baseNDecoder(s) * v4; } }; v2.baseNEncoder = function (n, minchars) { if (!minchars) { minchars = 1; } var v4 = ''; while (n != 0) { n = Math.round(n); var v3 = n % this.bitSize; if (Math.round(v3) != v3) { trace('BaseN failed on ' + n + '%' + this.bitSize + ' = ' + v3 + ' ' + int(n) + ' ' + int(this.bitSize)); } v4 = this.hashIndex.charAt(v3) + v4; this.debug.lastencode += '\t-> n:' + n + ' % bitSize:' + this.bitSize + ' = ' + v3 + ', final char=' + v4 + '\n'; n -= v3; n /= this.bitSize; } if (minchars) { while (v4.length < minchars) { v4 = this.hashIndex.charAt(0) + v4; } } return v4; }; v2.baseNDecoder = function (s) { var v2 = 0; var v6 = 0; this.i = 0; while (this.i < s.length) { var v3 = s.charAt(s.length - this.i - 1); if (v3 == this.hashIndex.charAt(0)) { var v5 = 0; } else { var v5 = this.hashVal[v3] * Math.pow(this.bitSize, this.i); } v2 += v5; if (v2 >= this.ceiling) { v6 += (v2 - v2 % this.ceiling) / this.ceiling; v2 %= this.ceiling; } ++this.i; } if (v6 > 0) { v2 = '' + v2; while (v2.length < (this.ceiling.toString()).length - 1) { v2 = '0' + v2; } v2 = '' + v6 + v2; } return v2; }; v2.debug = new Object(); ASSetPropFlags(com.newgrounds.encoders.BaseN.prototype, null, 1); } #endinitclip } movieClip 125 __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 (the_source) { if (the_source) { this.image_source = the_source; } else { this.image_source = _root; } this.reset(); if (typeof this.image_source == 'movieclip') { if (this.image_source == _root) { this.source_width = Stage.width; this.source_height = Stage.height; } else { this.source_width = Math.floor(this.image_source._width); this.source_height = Math.floor(this.image_source._height); } this.sourceBitmap = new flash.display.BitmapData(this.source_width, this.source_height, false, 4294967295.0); this.sourceBitmap.draw(_root); } else { if (this.image_source.width) { this.source_width = this.image_source.width; this.source_height = this.image_source.height; this.sourceBitmap = this.image_source; } else { this.error('You can only use BitMaptData and MovieClip objects to create images'); } } }; com.newgrounds.encoders.ImageScanner = v1; var v2 = v1.prototype; v2.setCallback = function (target, funct) { if (target && funct) { this.callback_target = target; this.callback_function = funct; } }; v2.reset = function () { this.callback_target = null; this.callback_function = null; this.debug.bad_pixels = 0; this.hash = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&'; var v3 = Math.pow(this.hash.length, 2); trace('MAX COLORS: ' + v3); var v2 = Math.floor(Math.pow(v3, 0.3333333333333333)) - 1; var v4 = Math.pow(v2, 3); this.cube = v2; this.basen = new com.newgrounds.encoders.BaseN(this.hash); this.xpos = 0; this.ypos = 0; this.pixels = 0; this.busy = false; }; v2.startScan = function (w, h, s) { if (w) { this.image_width = w; } if (h) { this.image_height = h; } if (s != undefined) { this.crop = s; } var v7 = _root.getNextHighestDepth(); var v6 = _root.createEmptyMovieClip('API_image_container_' + v7, v7); var v5 = v6.createEmptyMovieClip('canvas', 100); v5.attachBitmap(this.sourceBitmap, 100); if (this.crop) { if (this.image_width / this.source_width > this.image_height / this.source_height) { this.canvas_width = this.image_width; this.canvas_height = Math.ceil(this.source_height * (this.image_width / this.source_width)); } else { this.canvas_height = this.image_height; this.canvas_width = Math.ceil(this.source_width * (this.image_height / this.source_height)); } } else { this.canvas_width = this.image_width; this.canvas_height = this.image_height; } v5._x = Math.round((this.image_width - this.canvas_width) / 2); v5._width = this.canvas_width; v5._height = this.canvas_height; this.resizedBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); this.resizedBitmap.draw(v6); v6.removeMovieClip(); this.copyBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); var v3 = '' + this.image_width; while (v3.length < 3) { v3 = '0' + v3; } var v4 = '' + this.image_height; while (v4.length < 3) { v4 = '0' + v4; } this.output = v3 + v4; this.draw_interval = setInterval(this, 'drawChunk', 10); this.busy = false; return this.resizedBitmap; }; v2.getBitmapData = function () { return this.copyBitmap; }; v2.getBytesTotal = function () { return this.image_width * this.image_height * 2; }; v2.getBytesScanned = function () { return this.pixels * 2; }; v2.getProgress = function () { return Math.round((this.getBytesScanned() / this.getBytesTotal()) * 100); }; v2.drawChunk = function () { if (!this.busy) { this.busy = true; var v2 = 0; while (v2 < this.pixels_per_chunk) { if (!this.nextPixel()) { clearInterval(this.draw_interval); this.callback_interval = setInterval(this, 'doCallback', 25); this.busy = true; break; } ++v2; } this.busy = false; } }; v2.doCallback = function () { this.busy = false; clearInterval(this.callback_interval); if (this.callback_target and this.callback_function) { this.callback_target[this.callback_function](this.output); } else { this.onScanComplete(this.output); } }; v2.onScanComplete = function (packet) { this.sendMessage('packet size: ' + this.output.length + ' bytes', 'onScanComplete'); }; v2.nextPixel = function () { var v15 = this.xpos; var v14 = this.ypos; var v7 = this.resizedBitmap.getPixel(v15, v14); var v17 = v7 >> 16 & 255; var v20 = v7 >> 8 & 255; var v16 = v7 >> 0 & 255; var v11 = Math.round(((v17 + 1) / 256) * this.cube); var v10 = Math.round(((v20 + 1) / 256) * this.cube); var v13 = Math.round(((v16 + 1) / 256) * this.cube); var v12 = v11 * (this.cube + 1) * (this.cube + 1) + v10 * (this.cube + 1) + v13; var v6 = this.basen.encode(v12, 2); this.output += v6; if (v6.length != 2) { trace('bad pixel ' + v6); } var v5 = this.basen.decode(v6); var v18 = v5; var v8 = v5 % (this.cube + 1); v5 = (v5 - v8) / (this.cube + 1); var v9 = v5 % (this.cube + 1); var v19 = (v5 - v9) / (this.cube + 1); if (v13 != v8 and v10 != v9 and v11 != v10) { ++this.debug.bad_pixels; trace('BAD PIXEL ' + this.debug.bad_pixels + ') ' + v12 + ' != ' + v18 + ' ' + v6); trace(this.basen.debug.lastencode); } var v2 = (Math.round((v19 / this.cube) * 255)).toString(16); var v4 = (Math.round((v9 / this.cube) * 255)).toString(16); var v3 = (Math.round((v8 / this.cube) * 255)).toString(16); while (v2.length < 2) { v2 = '0' + v2; } while (v4.length < 2) { v4 = '0' + v4; } while (v3.length < 2) { v3 = '0' + v3; } this.copyBitmap.setPixel(v15, v14, Number('0x' + v2 + v4 + v3)); ++this.pixels; if (this.pixels >= this.image_width * this.image_height) { return false; } ++this.xpos; if (this.xpos >= this.image_width) { this.xpos = 0; ++this.ypos; } return true; }; v2.error = function (e, f) { this.sendMessage(e, f, 'ERROR'); }; v2.sendMessage = function (msg, func, type) { var v1 = 'ImageScanner'; if (func) { v1 += '.' + func + '()'; } if (type) { v1 = type + ' in ' + v1; } v1 += ' :: ' + msg; trace(v1); }; v2.image_width = 100; v2.image_height = 100; v2.crop = true; v2.pixels_per_chunk = 500; v2.debug = new Object(); ASSetPropFlags(com.newgrounds.encoders.ImageScanner.prototype, null, 1); } #endinitclip } movieClip 126 __Packages.com.newgrounds.encoders.SerialXML { #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.SerialXML) { var v1 = function () {}; com.newgrounds.encoders.SerialXML = v1; var v2 = v1.prototype; v1.decode = function (xml) { if (!(xml instanceof XML)) { xml = new XML(xml); } var v2 = com.newgrounds.encoders.SerialXML.populateObject(xml.firstChild, {}); return v2.DATA; }; v1.encode = function (obj) { var v1 = new XML(); com.newgrounds.encoders.SerialXML.populateXML(v1, obj, 'DATA'); return v1; }; v1.populateObject = function (child, object) { var v6 = child.nodeName; var v5 = com.newgrounds.encoders.SerialXML.getValue(v6, child.attributes.v); var v4 = child.attributes.n; if (object instanceof Array) { v4 = object.length; object.push(v5); } else { object[v4] = v5; } if (child.hasChildNodes()) { var v1 = 0; while (v1 < child.childNodes.length) { com.newgrounds.encoders.SerialXML.populateObject(child.childNodes[v1], object[v4]); ++v1; } } return object; }; v1.populateXML = function (child, obj, name) { if (obj === undefined) { return undefined; } var v5 = new XML(); var v2; if (obj instanceof Array) { v2 = v5.createElement(com.newgrounds.encoders.SerialXML.getType(obj)); if (name) { v2.attributes.n = name; } child.appendChild(v2); var v4 = 0; while (v4 < obj.length) { com.newgrounds.encoders.SerialXML.populateXML(v2, obj[v4]); ++v4; } } else { if (typeof obj == 'object') { v2 = v5.createElement(com.newgrounds.encoders.SerialXML.getType(obj)); if (name) { v2.attributes.n = name; } child.appendChild(v2); for (var v4 in obj) { com.newgrounds.encoders.SerialXML.populateXML(v2, obj[v4], v4); } } else { v2 = v5.createElement(com.newgrounds.encoders.SerialXML.getType(obj)); if (name) { v2.attributes.n = name; } if ((com.newgrounds.encoders.SerialXML.getType(obj)).length == 1) { v2.attributes.v = obj; } child.appendChild(v2); } } }; v1.getValue = function (type, stringval) { switch (type.toUpperCase()) { case 'O': return new Object(); break; case 'A': return new Array(); break; case 'N': return Number(stringval); break; case 'S': return String(stringval); break; case 'TRUE': return true; break; case 'FALSE': return false; break; default: return null; } }; v1.getType = function (obj) { switch (obj instanceof Array ? 'array' : typeof obj) { case 'array': return 'A'; break; case 'object': return 'O'; break; case 'string': return 'S'; break; case 'number': return 'N'; case 'boolean': return (obj === true) ? 'TRUE' : 'FALSE'; break; default: return 'NULL'; } }; ASSetPropFlags(com.newgrounds.encoders.SerialXML.prototype, null, 1); } #endinitclip } movieClip 127 __Packages.com.newgrounds.encoders.LZW2 { #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.LZW2) { var v1 = function () {}; com.newgrounds.encoders.LZW2 = v1; var v2 = v1.prototype; v1.doCompressorConfig = function () { com.newgrounds.encoders.LZW2.comp_dict = []; var v1 = 0; while (v1 < 256) { com.newgrounds.encoders.LZW2.comp_dict[String.fromCharCode(v1)] = v1; ++v1; } com.newgrounds.encoders.LZW2.comp_dict.< = 256; com.newgrounds.encoders.LZW2.comp_dict.> = 257; com.newgrounds.encoders.LZW2.comp_dict.& = 258; com.newgrounds.encoders.LZW2.comp_dict." = 259; com.newgrounds.encoders.LZW2.comp_dict.\' = 260; com.newgrounds.encoders.LZW2.pos = 0; com.newgrounds.encoders.LZW2.result = ''; com.newgrounds.encoders.LZW2.buffer = ''; com.newgrounds.encoders.LZW2.nbChar = 256 + com.newgrounds.encoders.LZW2.skipnum; }; v1.compress = function (string, callback, callback_params) { com.newgrounds.encoders.LZW2.doCompressorConfig(); if (com.newgrounds.encoders.LZW2.busy) { trace('[LZW COMPRESSOR] :: Compression can not begin until previous compression or decompression is complete!'); return undefined; } com.newgrounds.encoders.LZW2.splitStr = string.split(''); string = ''; com.newgrounds.encoders.LZW2.len = com.newgrounds.encoders.LZW2.splitStr.length; com.newgrounds.encoders.LZW2.local = {'delay': 30, 'callback': callback, 'callback_params': callback_params, 'compress_chunk': function () { com.newgrounds.encoders.LZW2.compress_chunk(); }, 'busy': false, 'complete': false}; com.newgrounds.encoders.LZW2.interval = setInterval(com.newgrounds.encoders.LZW2.local, 'compress_chunk', 5); }; v1.getProgress = function () { return Math.round((com.newgrounds.encoders.LZW2.pos / com.newgrounds.encoders.LZW2.len) * 100); }; v1.compress_chunk = function () { if (com.newgrounds.encoders.LZW2.local.delay > 0) { --com.newgrounds.encoders.LZW2.local.delay; } else { if (!com.newgrounds.encoders.LZW2.local.busy) { com.newgrounds.encoders.LZW2.local.busy = true; var v1 = 0; while (v1 < com.newgrounds.encoders.LZW2.max_chunk_length) { com.newgrounds.encoders.LZW2.encode_next(); if (com.newgrounds.encoders.LZW2.local.complete) { break; } ++v1; } com.newgrounds.encoders.LZW2.local.busy = false; } } if (com.newgrounds.encoders.LZW2.local.complete) { trace('LZW2 complete ' + com.newgrounds.encoders.LZW2.nbChar + ' ' + com.newgrounds.encoders.LZW2.comp_dict.length + ' ' + com.newgrounds.encoders.LZW2.len + ' ' + com.newgrounds.encoders.LZW2.pos + ' ' + com.newgrounds.encoders.LZW2.skipnum); clearInterval(com.newgrounds.encoders.LZW2.interval); com.newgrounds.encoders.LZW2.local.callback(com.newgrounds.encoders.LZW2.result, com.newgrounds.encoders.LZW2.local.callback_params); com.newgrounds.encoders.LZW2.result = ''; com.newgrounds.encoders.LZW2.buffer = ''; } }; v1.encode_next = function () { if (com.newgrounds.encoders.LZW2.pos <= com.newgrounds.encoders.LZW2.len) { var v1 = com.newgrounds.encoders.LZW2.splitStr[com.newgrounds.encoders.LZW2.pos]; if (com.newgrounds.encoders.LZW2.comp_dict[com.newgrounds.encoders.LZW2.buffer + v1] !== undefined) { com.newgrounds.encoders.LZW2.buffer += v1; } else { com.newgrounds.encoders.LZW2.result += String.fromCharCode(com.newgrounds.encoders.LZW2.comp_dict[com.newgrounds.encoders.LZW2.buffer]); com.newgrounds.encoders.LZW2.comp_dict[com.newgrounds.encoders.LZW2.buffer + v1] = com.newgrounds.encoders.LZW2.nbChar; ++com.newgrounds.encoders.LZW2.nbChar; com.newgrounds.encoders.LZW2.buffer = v1; } ++com.newgrounds.encoders.LZW2.pos; } else { com.newgrounds.encoders.LZW2.local.complete = true; return undefined; } }; v1.comp_config = false; v1.skipnum = 5; v1.busy = false; v1.max_chunk_length = 12000; ASSetPropFlags(com.newgrounds.encoders.LZW2.prototype, null, 1); } #endinitclip } movieClip 128 __Packages.com.newgrounds.encoders.LZW { #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.LZW) { var v1 = function () {}; com.newgrounds.encoders.LZW = v1; var v2 = v1.prototype; v1.setXMLSafe = function (x) { com.newgrounds.encoders.LZW.xmlsafe = x; }; v1.compress = function (str, escape_chars) { var v2 = new Array(); var v11 = com.newgrounds.encoders.LZW.xmlsafe ? 5 : 0; var v5 = 0; while (v5 < 256) { v2[String.fromCharCode(v5)] = v5; ++v5; } if (com.newgrounds.encoders.LZW.xmlsafe) { v2.< = 256; v2.> = 257; v2.& = 258; v2." = 259; v2.\' = 260; } var v7 = ''; var v8 = str.split(''); var v9 = v8.length; var v6 = 256 + v11; var v1 = ''; var v4; v5 = 0; while (v5 <= v9) { var v3 = v8[v5]; if (v2[v1 + v3] !== undefined) { v1 += v3; } else { v4 = String.fromCharCode(v2[v1]); if (escape_chars and (v2[v1] < 33 or v2[v1] > 126 or v4 == '%')) { v4 = escape(v4); } v7 += v4; v2[v1 + v3] = v6; ++v6; v1 = v3; } ++v5; } return v7; }; v1.decompress = function (str) { var v4 = new Array(); var v10 = com.newgrounds.encoders.LZW.xmlsafe ? 5 : 0; var v6 = 0; while (v6 < 256) { var v9 = String.fromCharCode(v6); v4[v6] = v9; ++v6; } if (com.newgrounds.encoders.LZW.xmlsafe) { v4[256] = '<'; v4[257] = '>'; v4[258] = '&'; v4[259] = '"'; v4[260] = '\''; } var v11 = str; var v13 = v11.split(''); var v12 = v13.length; var v7 = 256 + v10; var v1 = ''; var v2 = ''; var v8 = ''; v6 = 0; while (v6 < v12) { var v5 = v11.charCodeAt(v6); var v3 = v4[v5]; if (v1 == '') { v1 = v3; v8 += v3; } else { if (v5 <= 255 + v10) { v8 += v3; v2 = v1 + v3; v4[v7] = v2; ++v7; v1 = v3; } else { v2 = v4[v5]; if (v2 == undefined) { v2 = v1 + v1.slice(0, 1); } v8 += v2; v4[v7] = v1 + v2.slice(0, 1); ++v7; v1 = v2; } } ++v6; } return v8; }; v1.compress_fp6 = function (str) { var v3 = new Array(); var v10 = com.newgrounds.encoders.LZW.xmlsafe ? 5 : 0; var v4 = 0; while (v4 < 256) { v3[String(v4)] = v4; ++v4; } if (com.newgrounds.encoders.LZW.xmlsafe) { var v14 = String((new String('<')).charCodeAt(0)); var v11 = String((new String('>')).charCodeAt(0)); var v13 = String((new String('&')).charCodeAt(0)); var v15 = String((new String('"')).charCodeAt(0)); var v12 = String((new String('\'')).charCodeAt(0)); v3[v14] = 256; v3[v11] = 257; v3[v13] = 258; v3[v15] = 259; v3[v12] = 260; } var v7 = ''; var v16 = str; var v8 = v16.split(''); var v9 = v8.length; var v6 = 256 + v10; var v1 = new Array(); v4 = 0; while (v4 <= v9) { var v2 = v8[v4]; if (v1.length == 0) { var v5 = String(v2.charCodeAt(0)); } else { var v5 = v1.join('-') + '-' + String(v2.charCodeAt(0)); } if (v3[v5] !== undefined) { v1.push(v2.charCodeAt(0)); } else { v7 += String.fromCharCode(v3[v1.join('-')]); v3[v5] = v6; ++v6; false; v1 = new Array(); v1.push(v2.charCodeAt(0)); } ++v4; } return v7; }; v1.xmlsafe = false; ASSetPropFlags(com.newgrounds.encoders.LZW.prototype, null, 1); } #endinitclip } movieClip 129 __Packages.com.newgrounds.RemoteAuth { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.newgrounds) { _global.com.newgrounds = new Object(); } if (!_global.com.newgrounds.RemoteAuth) { var v1 = function (id) { this.auth_token = id; System.security.allowDomain('*'); this.receiver = new LocalConnection(); this.receiver.allowDomain = function () { return true; }; this.receiver.onAuth = function (auth_result) { trace('remote login is a success! ' + auth_result); com.newgrounds.API.onRemoteAuthentication(auth_result); }; this.receiver.connect('_' + this.auth_token); }; com.newgrounds.RemoteAuth = v1; var v2 = v1.prototype; v2.__get__token = function () { return this.auth_token; }; v2.addProperty('token', v2.__get__token, function () {}); ASSetPropFlags(com.newgrounds.RemoteAuth.prototype, null, 1); } #endinitclip } movieClip 130 __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 (id, name, value, difficulty, unlocked, _icon_url) { if (id == undefined || name == undefined || value == undefined || difficulty == undefined) { com.newgrounds.API.fatalError('Medal instances require an id, name, value and difficulty'); } this._medal_id = id; this._medal_name = name; this._medal_value = value; this._medal_difficulty = difficulty; if (unlocked) { this._medal_unlocked = true; } if (_icon_url) { this._icon_url = _icon_url; } }; com.newgrounds.Medal = v1; var v2 = v1.prototype; v2.__get__difficulty = function () { return com.newgrounds.Medal.difficulty_names[this._medal_difficulty]; }; v2.__get__difficultyId = function () { return this._medal_difficulty; }; v2.__get__icon_url = function () { return this._icon_url; }; v2.__get__id = function () { return this._medal_id; }; v2.__get__name = function () { return this._medal_name; }; v2.__get__unlocked = function () { return this._medal_unlocked; }; v2.__get__value = function () { return this._medal_value; }; v2.isUnlocked = function () { return this._medal_unlocked; }; v2.unlock = function () { if (!this.isUnlocked()) { com.newgrounds.API.unlockMedal(this); } }; v2.setUnlocked = function (u) { this._medal_unlocked = u; }; v2.attachIcon = function (target, depth) { if (!depth) { depth = target.getNextHighestDepth(); } var v3 = target.createEmptyMovieClip('Asset_Medal_Icon_' + this.getID(), depth); if (this._icon_url) { v3.loadMovie(this._icon_url); } else { var v4 = flash.display.BitmapData.loadBitmap('Asset_default_medal_icon_' + this.getDifficulty(), depth); v3.attachBitmap(v4, depth, true); } }; v2.getID = function () { return this._medal_id; }; v2.getName = function () { return this._medal_name; }; v2.getValue = function () { return this._medal_value; }; v2.getDifficulty = function (as_string) { if (as_string) { return com.newgrounds.Medal.difficulty_names[this._medal_difficulty]; } else { return this._medal_difficulty; } }; v2._medal_unlocked = false; v2._icon_loaded = false; v2._icon_width = 50; v2._icon_height = 50; v2._icon_url = null; v1.difficulty_names = new Array(null, 'Easy', 'Moderate', 'Challenging', 'Difficult', 'Brutal'); v2.addProperty('difficulty', v2.__get__difficulty, function () {}); v2.addProperty('difficultyId', v2.__get__difficultyId, function () {}); v2.addProperty('icon_url', v2.__get__icon_url, function () {}); v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('name', v2.__get__name, function () {}); v2.addProperty('unlocked', v2.__get__unlocked, function () {}); v2.addProperty('value', v2.__get__value, function () {}); ASSetPropFlags(com.newgrounds.Medal.prototype, null, 1); } #endinitclip } movieClip 131 __Packages.com.newgrounds.ScoreBoard { #initclip label -18524: label -3364: Unknown action: 0xfc function () {  = (1967 % 511) * true; if (!'') { } else {} return ; } var  = -285 + (); // An attempt to read a value from empty stack while (!undefined) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) {  -= 13; continue; if ( == 389) {  -= 92; continue; } if ( == 871) { for (;;) {  -= 190; if ( == 868) {  -= 291; } } else {}  -= 482; if ( == 97) {  += 73; if ( == 202) { } if ( == 707) {  -= 318; } } else {}  += 610; if ( == 470) { if ( == 280) {  += 45; } if ( != 325) break;  -= 228; goto 741; label 741: if ( == 140) {  -= 133; } if ( != 749) break;  -= 487; if ( == 895) {  -= 318; } if ( == 829) {  -= 80; } if ( == 300) {  -= 134; } if ( != 262) break;  += 367; goto 1459; label 1459: if ( == 67) {  += 135; if (!(true ::: !true)) { break; }  += 73; } if ( != 297) break;  += 554; var eval(true) = true ::: !true; if ( == 275) {  += 474; }  += 137; for (;;) {  -= 75; goto -18524;  -= 538; for (;;) {  -= 510;  -= 26;  += 834; } }  += 189; goto -3364;  -= 688; for (;;) {  += 615; continue; }  -= 622; } } } } } } } } } } } } } } } } } } } } } } } } } } } }  != 149; true; #endinitclip } movieClip 132 __Packages.com.newgrounds.encoders.RC4 { #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.RC4) { var v1 = function () {}; com.newgrounds.encoders.RC4 = v1; var v2 = v1.prototype; v1.encrypt = function (src, key) { var v3 = com.newgrounds.encoders.RC4.strToChars(src); var v1 = com.newgrounds.encoders.RC4.strToChars(key); var v2 = com.newgrounds.encoders.RC4.calculate(v3, v1); return com.newgrounds.encoders.RC4.charsToHex(v2); }; v1.encryptbin = function (src, key) { var v3 = com.newgrounds.encoders.RC4.strToChars(src); var v1 = com.newgrounds.encoders.RC4.strToChars(key); var v2 = com.newgrounds.encoders.RC4.calculate(v3, v1); return v2; }; v1.decrypt = function (src, key) { var v3 = com.newgrounds.encoders.RC4.hexToChars(src); var v1 = com.newgrounds.encoders.RC4.strToChars(key); var v2 = com.newgrounds.encoders.RC4.calculate(v3, v1); return com.newgrounds.encoders.RC4.charsToStr(v2); }; v1.initialize = function (pwd) { var v2 = 0; var v3; var v4 = pwd.length; var v1 = 0; while (v1 <= 255) { com.newgrounds.encoders.RC4.mykey[v1] = pwd[v1 % v4]; com.newgrounds.encoders.RC4.sbox[v1] = v1; ++v1; } v1 = 0; while (v1 <= 255) { v2 = (v2 + com.newgrounds.encoders.RC4.sbox[v1] + com.newgrounds.encoders.RC4.mykey[v1]) % 256; v3 = com.newgrounds.encoders.RC4.sbox[v1]; com.newgrounds.encoders.RC4.sbox[v1] = com.newgrounds.encoders.RC4.sbox[v2]; com.newgrounds.encoders.RC4.sbox[v2] = v3; ++v1; } }; v1.calculate = function (plaintxt, psw) { com.newgrounds.encoders.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.encoders.RC4.sbox[v1]) % 256; v5 = com.newgrounds.encoders.RC4.sbox[v1]; com.newgrounds.encoders.RC4.sbox[v1] = com.newgrounds.encoders.RC4.sbox[v2]; com.newgrounds.encoders.RC4.sbox[v2] = v5; var v4 = (com.newgrounds.encoders.RC4.sbox[v1] + com.newgrounds.encoders.RC4.sbox[v2]) % 256; v7 = com.newgrounds.encoders.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.encoders.RC4.prototype, null, 1); } #endinitclip } movieClip 133 __Packages.com.newgrounds.encoders.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) { var v1 = function () {}; com.newgrounds.encoders.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.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.encode(v4); if (v1) { v1 += ','; } v1 += com.newgrounds.encoders.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.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.busy = true; var v2 = new Date(); com.newgrounds.encoders.JSON.start = v2.getTime(); com.newgrounds.encoders.JSON.cache = {'busy': false, 'complete': false, 'arg': arg, 'target': arg, 'parents': [], 'encoded': '', 'callback': callback, 'encode_chunk': function () { com.newgrounds.encoders.JSON.encode_chunk(); }}; if (com.newgrounds.encoders.JSON.getType(arg) == 'object') { com.newgrounds.encoders.JSON.cache.encoded = '{'; com.newgrounds.encoders.JSON.interval = setInterval(com.newgrounds.encoders.JSON.cache, 'encode_chunk', 25); return true; } if (com.newgrounds.encoders.JSON.getType(arg) == 'array') { com.newgrounds.encoders.JSON.cache.encoded = '['; } com.newgrounds.encoders.JSON.interval = setInterval(com.newgrounds.encoders.JSON.cache, 'encode_chunk', 25); return true; }; v1.background_decode = function (arg, callback) { if (com.newgrounds.encoders.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.busy = true; var v1 = new Date(); com.newgrounds.encoders.JSON.start = v1.getTime(); com.newgrounds.encoders.JSON.cache = {'busy': false, 'callback': callback, 'complete': false, 'arg': arg, 'pos': 0, 'parents': ['root'], 'target': null, 'scratch': '', 'decode_chunk': function () { com.newgrounds.encoders.JSON.decode_chunk(); }}; com.newgrounds.encoders.JSON.interval = setInterval(com.newgrounds.encoders.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.cache.busy && !com.newgrounds.encoders.JSON.cache.complete) { com.newgrounds.encoders.JSON.cache.busy = true; var v1 = 0; while (v1 < com.newgrounds.encoders.JSON.decode_chunks) { com.newgrounds.encoders.JSON.chunk_decoder(); if (com.newgrounds.encoders.JSON.cache.complete) { break; } ++v1; } trace(Math.round((com.newgrounds.encoders.JSON.cache.pos / com.newgrounds.encoders.JSON.cache.arg.length) * 100) + '% decoded'); com.newgrounds.encoders.JSON.cache.busy = false; } if (com.newgrounds.encoders.JSON.cache.complete) { var v2 = new Date(); com.newgrounds.encoders.JSON.busy = false; clearInterval(com.newgrounds.encoders.JSON.interval); com.newgrounds.encoders.JSON.cache.callback(com.newgrounds.encoders.JSON.cache.root, v2.getTime() - com.newgrounds.encoders.JSON.start); com.newgrounds.encoders.JSON.cache.arg = ''; } }; v1.encode_chunk = function () { if (!com.newgrounds.encoders.JSON.cache.busy && !com.newgrounds.encoders.JSON.cache.complete) { com.newgrounds.encoders.JSON.cache.busy = true; var v1 = 0; while (v1 < com.newgrounds.encoders.JSON.encode_chunks) { com.newgrounds.encoders.JSON.chunk_encoder(); if (com.newgrounds.encoders.JSON.cache.complete) { break; } ++v1; } com.newgrounds.encoders.JSON.cache.busy = false; } if (com.newgrounds.encoders.JSON.cache.complete) { var v3 = new Date(); var v2 = v3.getTime(); com.newgrounds.encoders.JSON.busy = false; clearInterval(com.newgrounds.encoders.JSON.interval); com.newgrounds.encoders.JSON.cache.callback(com.newgrounds.encoders.JSON.cache.encoded, v2 - com.newgrounds.encoders.JSON.start); com.newgrounds.encoders.JSON.cache.encoded = ''; } }; v1.chunk_decoder = function () { function _object() { var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (!com.newgrounds.encoders.JSON.cache.mode) { com.newgrounds.encoders.JSON.cache.mode = 'object'; ++com.newgrounds.encoders.JSON.cache.pos; v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (v1 != '"') { throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")'; } com.newgrounds.encoders.JSON.cache.scratch = ''; _setTargetValue({}); } else { if (v1 == ',') { ++com.newgrounds.encoders.JSON.cache.pos; v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (v1 != '"') { throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")'; } com.newgrounds.encoders.JSON.cache.scratch = ''; } else { if (v1 == '}') { _useParent(); } else { if (v1 == '"') { ++com.newgrounds.encoders.JSON.cache.pos; v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (v1 != ':') { throw 'Malformed object notation. Object keys and values must be separated by colons(:)'; } _addParent(com.newgrounds.encoders.JSON.cache.scratch); com.newgrounds.encoders.JSON.cache.mode = null; } else { if (v1 == '\\') { ++com.newgrounds.encoders.JSON.cache.pos; v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); } com.newgrounds.encoders.JSON.cache.scratch += v1; } } } } ++com.newgrounds.encoders.JSON.cache.pos; } function _array() { var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (!com.newgrounds.encoders.JSON.cache.mode) { com.newgrounds.encoders.JSON.cache.mode = 'array'; ++com.newgrounds.encoders.JSON.cache.pos; v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); _setTargetValue([]); if (v1 != ']') { _addArrayKey(); } else { _useParent(); } return undefined; } else { if (v1 == ',') { _addArrayKey(); } else { if (v1 == ']') { _useParent(); } } } ++com.newgrounds.encoders.JSON.cache.pos; } function _boolean() { var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (v1 == 't') { _setTargetValue(true); com.newgrounds.encoders.JSON.cache.pos += 3; } else { if (v1 == 'f') { _setTargetValue(false); com.newgrounds.encoders.JSON.cache.pos += 4; } else { throw 'Bool values must be true or false'; } } _useParent(); } function _null() { var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (v1 == 'n') { _setTargetValue(null); com.newgrounds.encoders.JSON.cache.pos += 2; } else { throw 'Null values must be null'; } _useParent(); } function _string() { var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (!com.newgrounds.encoders.JSON.cache.mode) { if (v1 != '"') { throw 'Strings must be wrapped in quotes ("")'; } com.newgrounds.encoders.JSON.cache.scratch = ''; com.newgrounds.encoders.JSON.cache.mode = 'string'; } else { if (v1 == '"') { _setTargetValue(com.newgrounds.encoders.JSON.cache.scratch); _useParent(); } else { if (v1 == '\\') { ++com.newgrounds.encoders.JSON.cache.pos; v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.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.cache.scratch += v1; } } ++com.newgrounds.encoders.JSON.cache.pos; } function _number() { var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); var v2 = '01234567890.-'; if (!com.newgrounds.encoders.JSON.cache.mode) { com.newgrounds.encoders.JSON.cache.mode = 'number'; com.newgrounds.encoders.JSON.cache.scratch = ''; } if (v2.indexOf(v1) < 0) { _setTargetValue(Number(com.newgrounds.encoders.JSON.cache.scratch)); _useParent(); } else { com.newgrounds.encoders.JSON.cache.scratch += v1; ++com.newgrounds.encoders.JSON.cache.pos; } } function _setTargetValue(newval) { var v2 = (_getParent()).obj; var v1 = com.newgrounds.encoders.JSON.cache.parents[com.newgrounds.encoders.JSON.cache.parents.length - 1]; v2[v1] = newval; } function _useParent() { com.newgrounds.encoders.JSON.cache.mode = com.newgrounds.encoders.JSON.getType((_getParent()).obj); com.newgrounds.encoders.JSON.cache.parents.pop(); } function _getParent() { var v2 = com.newgrounds.encoders.JSON.cache; var v1 = 0; while (v1 < com.newgrounds.encoders.JSON.cache.parents.length - 1) { v2 = v2[com.newgrounds.encoders.JSON.cache.parents[v1]]; ++v1; } return {'obj': v2, 'name': com.newgrounds.encoders.JSON.cache.parents[v1]}; } function _getCurrent() { var v2 = com.newgrounds.encoders.JSON.cache; var v1 = 0; while (v1 < com.newgrounds.encoders.JSON.cache.parents.length) { v2 = v2[com.newgrounds.encoders.JSON.cache.parents[v1]]; ++v1; } return {'obj': v2, 'name': com.newgrounds.encoders.JSON.cache.parents[v1]}; } function _addParent(child) { com.newgrounds.encoders.JSON.cache.parents.push(child); } function _addArrayKey() { var v1 = (_getCurrent()).obj.length; com.newgrounds.encoders.JSON.cache.parents.push(v1); com.newgrounds.encoders.JSON.cache.mode = null; } if (com.newgrounds.encoders.JSON.cache.pos >= com.newgrounds.encoders.JSON.cache.arg.length) { com.newgrounds.encoders.JSON.cache.complete = true; return undefined; } else { if (com.newgrounds.encoders.JSON.cache.mode) { ('_' + com.newgrounds.encoders.JSON.cache.mode)(); } else { var char = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.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.cache.complete) { return undefined; } var v2 = com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target); switch (v2) { case 'number': com.newgrounds.encoders.JSON.cache.encoded += com.newgrounds.encoders.JSON.cache.target; com.newgrounds.encoders.JSON.getParent(); break; case 'string': com.newgrounds.encoders.JSON.cache.encoded += '"' + (com.newgrounds.encoders.JSON.cache.target.split('"')).join('\\"') + '"'; com.newgrounds.encoders.JSON.getParent(); break; case 'boolean': com.newgrounds.encoders.JSON.cache.encoded += (com.newgrounds.encoders.JSON.cache.target == true) ? 'true' : 'false'; com.newgrounds.encoders.JSON.getParent(); break; case 'null': com.newgrounds.encoders.JSON.cache.encoded += 'null'; com.newgrounds.encoders.JSON.getParent(); break; case 'array': if (com.newgrounds.encoders.JSON.cache.target.length < 1) { com.newgrounds.encoders.JSON.cache.encoded += ']'; com.newgrounds.encoders.JSON.getParent(); } else { com.newgrounds.encoders.JSON.cache.parents.push(com.newgrounds.encoders.JSON.cache.target); com.newgrounds.encoders.JSON.cache.target = com.newgrounds.encoders.JSON.cache.target[0]; if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'array') { com.newgrounds.encoders.JSON.cache.encoded += '['; } else { if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'object') { com.newgrounds.encoders.JSON.cache.encoded += '{'; } } } break; case 'object': for (var v1 in com.newgrounds.encoders.JSON.cache.target) { break; } if (v1 === undefined) { com.newgrounds.encoders.JSON.cache.encoded += '}'; com.newgrounds.encoders.JSON.getParent(); } else { com.newgrounds.encoders.JSON.cache.parents.push(com.newgrounds.encoders.JSON.cache.target); com.newgrounds.encoders.JSON.cache.target = com.newgrounds.encoders.JSON.cache.target[v1]; com.newgrounds.encoders.JSON.cache.encoded += '"' + (v1.split('"')).join('\\"') + '":'; if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'array') { com.newgrounds.encoders.JSON.cache.encoded += '['; } else { if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'object') { com.newgrounds.encoders.JSON.cache.encoded += '{'; } } } break; default: com.newgrounds.encoders.JSON.cache.encoded += 'null'; com.newgrounds.encoders.JSON.getParent(); } }; v1.getParent = function () { if (com.newgrounds.encoders.JSON.cache.parents.length > 0) { var v1 = com.newgrounds.encoders.JSON.cache.parents.pop(); if (com.newgrounds.encoders.JSON.getType(v1) == 'array') { v1.shift(); } else { for (var v3 in v1) { delete v1[v3]; break; } } if (com.newgrounds.encoders.JSON.getType(v1) == 'object' or com.newgrounds.encoders.JSON.getType(v1) == 'array') { for (var v2 in v1) { break; } if (v2 !== undefined) { com.newgrounds.encoders.JSON.cache.encoded += ','; } } com.newgrounds.encoders.JSON.cache.target = v1; } else { com.newgrounds.encoders.JSON.cache.complete = true; } }; v1.encode_chunks = 20000; v1.decode_chunks = 20000; v1.busy = false; ASSetPropFlags(com.newgrounds.encoders.JSON.prototype, null, 1); } #endinitclip } movieClip 134 __Packages.com.newgrounds.APIEventDispatcher { #initclip label -23544: label -4846: Unknown action: 0xfc function () {  = (595 % 511) * true; if (!'') { } else {} return ; } var  = 240 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { // An attempt to read a value from empty stack } } } } } } } } } } } } } } } } } } ( != 324) ? undefined; #endinitclip } movieClip 135 __Packages.com.newgrounds.encoders.MD5 { #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.MD5) { var v1 = function () {}; com.newgrounds.encoders.MD5 = v1; var v2 = v1.prototype; v1.calculate = function (src) { return com.newgrounds.encoders.MD5.hex_md5(src); }; v1.hex_md5 = function (src) { return com.newgrounds.encoders.MD5.binl2hex(com.newgrounds.encoders.MD5.core_md5(com.newgrounds.encoders.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.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936); v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586); v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819); v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330); v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897); v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426); v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341); v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983); v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416); v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417); v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063); v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162); v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682); v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101); v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290); v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329); v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510); v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632); v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713); v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302); v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691); v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083); v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335); v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848); v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438); v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690); v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961); v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501); v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467); v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784); v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473); v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734); v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558); v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463); v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562); v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556); v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060); v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353); v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632); v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640); v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174); v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222); v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979); v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189); v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487); v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835); v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520); v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651); v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844); v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415); v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905); v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055); v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571); v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606); v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523); v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799); v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359); v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744); v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380); v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649); v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070); v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379); v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259); v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551); v4 = com.newgrounds.encoders.MD5.safe_add(v4, v10); v3 = com.newgrounds.encoders.MD5.safe_add(v3, v9); v2 = com.newgrounds.encoders.MD5.safe_add(v2, v8); v1 = com.newgrounds.encoders.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.encoders.MD5.safe_add(com.newgrounds.encoders.MD5.bit_rol(com.newgrounds.encoders.MD5.safe_add(com.newgrounds.encoders.MD5.safe_add(a, q), com.newgrounds.encoders.MD5.safe_add(x, t)), s), b); }; v1.md5_ff = function (a, b, c, d, x, s, t) { return com.newgrounds.encoders.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.encoders.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.encoders.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.encoders.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.encoders.MD5.prototype, null, 1); } #endinitclip } movieClip 136 __Packages.com.newgrounds.Score { #initclip label -4136: Unknown action: 0xfc function () {  = (145 % 511) * true; if (!'') { } else {} return ; } var  = 543 + (); for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { for (;;) { if ( == 688) {  -= 276; true; } if ( != 967) break; for (;;) {  -= 668; if ( == 704) {  += 197; // An attempt to read a value from empty stack !undefined; } if ( == 236) {  += 63; } #endinitclip } movieClip 137 __Packages.com.newgrounds.components.FlashAd { #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.FlashAd) { var v1 = function () { super(); this.background._visible = this.show_background; if (this.show_background) { this._x = Math.round(this._x); this._y = Math.round(this._y); this._xscale = 100; this._yscale = 100; } com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.ADS_APPROVED, this.loadAd, this); }; com.newgrounds.components.FlashAd = v1; com.newgrounds.components.FlashAd extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { com.newgrounds.API.attachFlashAd(this); }; v2.loadAd = function (event, params) { com.newgrounds.API.attachFlashAd(this); }; v2.onUnload = function () { this.clip.ad.unloadMovie(); this.clip.ad.removeMovieClip(); this.clip.removeMovieClip(); this.mask.removeMovieClip(); this.background.removeMovieClip(); com.newgrounds.API.removeEventListener(com.newgrounds.APIEvent.ADS_APPROVED, this); }; ASSetPropFlags(com.newgrounds.components.FlashAd.prototype, null, 1); } #endinitclip } movieClip 150 __Packages.com.newgrounds.components.APIConnector { #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.APIConnector) { var v1 = function () { super(); this._x = Math.round(this._x); this._y = Math.round(this._y); if (this.fake_session and com.newgrounds.API.getHost() == 'localhost') { com.newgrounds.API.setFakeSession(true); } if (this.api_id && !com.newgrounds.API.isConnected()) { this.nextFrame(); this._visible = false; this.setGotoFrame('connecting'); if (this.error_screens) { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, this.onNewVersion, this); com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.HOST_BLOCKED, this.onBadHost, this); } if (this.medal_popups) { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, this.doUnlock, this); } com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, this.onConnected, this); if (com.newgrounds.API.isPublishedHost()) { this.debug = false; } if (this.version) { com.newgrounds.API.setVersion(this.version); } if (!com.newgrounds.API.hasUserSession()) { var v3 = com.newgrounds.API.loadLocal('api_connector_data'); if (v3) { this.local_data = v3; } else { this.local_data = {'medals_unlocked': new Array()}; } } com.newgrounds.API.setPreload(true); com.newgrounds.API.connect(this.api_id, this.encryption_key, this.debug); } else { if (this.api_id && com.newgrounds.API.isConnected()) { this._visible = false; this.setGotoFrame('done'); } } this.stop(); }; com.newgrounds.components.APIConnector = v1; com.newgrounds.components.APIConnector extends MovieClip; var v2 = v1.prototype; v2.doUnlock = function (e) { var v5 = _root.attachMovie('NewgroundsAPIAsset_Medal_Popup', 'medal_pop_' + e.data.medal.getID(), _root.getNextHighestDepth()); if (e.data.x != undefined) { v5._x = e.data.x + 254; } else { v5._x = Stage.width; } if (e.data.x != undefined) { v5._y = e.data.y + 73; } else { v5._y = Stage.height; } v5.medal = e.data.medal; var v3 = com.newgrounds.API.getMedals(); var v2 = 0; while (v2 < v3.length) { if (v3[v2].getID() != e.data.medal.getID() && _root['medal_pop_' + v3[v2].getID()]) { _root['medal_pop_' + v3[v2].getID()]._y -= 70; } ++v2; } }; v2.onLoginError = function () { var v2 = _root.attachMovie('Asset_Login_Warning', 'Asset_Login_Warning', _root.getNextHighestDepth()); }; v2.onConnectionError = function () { var v3 = _root.attachMovie('Asset_Connection_Error', 'Asset_Connection_Error', _root.getNextHighestDepth()); this.setGotoFrame('done'); }; v2.onConnected = function (event, params) { if (event.success) { this.setGotoFrame('connected'); if (this.error_screens && com.newgrounds.API.isPublishedHost() && com.newgrounds.API.hasPublisher() && !com.newgrounds.API.hasUserSession()) { this.onLoginError(); } } else { if (this.error_screens) { this.onConnectionError(); } } }; v2.onNewVersion = function () { var v2 = _root.attachMovie('NewgroundsAsset_New_Version_Available', 'NewgroundsAsset_New_Version_Available', _root.getNextHighestDepth()); v2.official_version_url = com.newgrounds.API.getOfficialURL(); }; v2.onBadHost = function () { var v2 = _root.attachMovie('NewgroundsAsset_Illegal_Host', 'NewgroundsAsset_Illegal_Host', _root.getNextHighestDepth()); v2.official_version_url = com.newgrounds.API.getOfficialURL(); }; v2.setGotoFrame = function (frame) { if (this.goto_frame == null) { this.goto_frame = frame; this.gotoframe_interval = setInterval(this, 'gotoFrameIfLoaded', 50); } }; v2.gotoFrameIfLoaded = function () { if (this.goto_frame != null && this._framesloaded == this._totalframes) { this._visible = true; this.gotoAndStop(this.goto_frame); this.goto_frame = null; clearInterval(this.gotoframe_interval); } }; v2.goto_frame = null; ASSetPropFlags(com.newgrounds.components.APIConnector.prototype, null, 1); } #endinitclip } frame 2 { _global.nuke = false; } frame 3 { gotoAndStop(1); } frame 5 { gotoAndStop(4); } button 283 { on (release) { getURL('http://www.jtcoflash.tk', _blank); } } movieClip 285 { } movieClip 287 { } movieClip 289 { } movieClip 294 { } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } instance of movieClip 294 { onClipEvent (load) { _global.safepass = 'yessir'; } } frame 129 { _global.charselect = random(12) + 1; _global.menufocus = 1; _global.storemenufocus = 1; _global.shieldfocus = 7; _global.tempshieldfocus = -1; _global.itemsonstage = 0; _global.notches = 0; _global.rings = 50; _global.submitdist = 0; _global.namesave = ''; _global.itemlayers = 102; _global.ringlayers = 500; _global.soundlayers = 1; _global.soundfactor = 100; _global.loadeddata = false; _global.namesave = ''; _global.typelock = false; _global.soundfx = true; _global.music = true; _global.musiccount = 1; _global.nuke = false; _global.tempsavelocation = ''; _global.autosavepath = ''; _global.secretcannon = 1; _global.ringsgoingin = 0; _global.minigameringsusedhighscore = 999999; _global.chars = new Array(); i = 1; while (i <= 15) { _global.chars[i] = new Object(); ++i; } _global.chars[1].charname = 'sonic'; _global.chars[1].wieght = 35; _global.chars[1].bounce = 1.5; _global.chars[1].fly = false; _global.chars[1].lock = true; _global.chars[1].highscore = 0; _global.chars[1].total = 0; _global.chars[2].charname = 'tails'; _global.chars[2].wieght = 34; _global.chars[2].bounce = 1.9; _global.chars[2].fly = true; _global.chars[2].lock = true; _global.chars[2].highscore = 0; _global.chars[2].total = 0; _global.chars[3].charname = 'knux'; _global.chars[3].wieght = 40; _global.chars[3].bounce = 1.7; _global.chars[3].fly = true; _global.chars[3].lock = true; _global.chars[3].highscore = 0; _global.chars[3].total = 0; _global.chars[4].charname = 'amy'; _global.chars[4].wieght = 30; _global.chars[4].bounce = 1.6; _global.chars[4].fly = false; _global.chars[4].lock = true; _global.chars[4].highscore = 0; _global.chars[4].total = 0; _global.chars[5].charname = 'cream'; _global.chars[5].wieght = 32; _global.chars[5].bounce = 1.7; _global.chars[5].fly = true; _global.chars[5].lock = true; _global.chars[5].highscore = 0; _global.chars[5].total = 0; _global.chars[6].charname = 'shadow'; _global.chars[6].wieght = 36; _global.chars[6].bounce = 1.6; _global.chars[6].fly = false; _global.chars[6].lock = true; _global.chars[6].highscore = 0; _global.chars[6].total = 0; _global.chars[7].charname = 'rouge'; _global.chars[7].wieght = 33; _global.chars[7].bounce = 1.5; _global.chars[7].fly = true; _global.chars[7].lock = true; _global.chars[7].highscore = 0; _global.chars[7].total = 0; _global.chars[8].charname = 'mighty'; _global.chars[8].wieght = 38; _global.chars[8].bounce = 1.44; _global.chars[8].fly = false; _global.chars[8].lock = true; _global.chars[8].highscore = 0; _global.chars[8].total = 0; _global.chars[9].charname = 'vector'; _global.chars[9].wieght = 42; _global.chars[9].bounce = 1.7; _global.chars[9].fly = false; _global.chars[9].lock = true; _global.chars[9].highscore = 0; _global.chars[9].total = 0; _global.chars[10].charname = 'espio'; _global.chars[10].wieght = 33; _global.chars[10].bounce = 1.47; _global.chars[10].fly = false; _global.chars[10].lock = true; _global.chars[10].highscore = 0; _global.chars[10].total = 0; _global.chars[11].charname = 'charmy'; _global.chars[11].wieght = 32; _global.chars[11].bounce = 1.4; _global.chars[11].fly = true; _global.chars[11].lock = true; _global.chars[11].highscore = 0; _global.chars[11].total = 0; _global.chars[12].charname = 'chao'; _global.chars[12].wieght = 32; _global.chars[12].bounce = 1.4; _global.chars[12].fly = false; _global.chars[12].lock = true; _global.chars[12].highscore = 0; _global.chars[12].total = 0; _global.chars[13].charname = 'marine'; _global.chars[13].wieght = 32; _global.chars[13].bounce = 1.7; _global.chars[13].fly = false; _global.chars[13].lock = true; _global.chars[13].highscore = 0; _global.chars[13].total = 0; _global.chars[14].charname = 'ashura'; _global.chars[14].wieght = 37; _global.chars[14].bounce = 1.58; _global.chars[14].fly = false; _global.chars[14].lock = true; _global.chars[14].highscore = 0; _global.chars[14].total = 0; _global.chars[15].charname = 'wechina'; _global.chars[15].wieght = 37; _global.chars[15].bounce = 1.67; _global.chars[15].fly = true; _global.chars[15].lock = true; _global.chars[15].highscore = 0; _global.chars[15].total = 0; _global.menupoints = new Array(); _global.menupoints[1] = new Array(275, 250, 250, 115); _global.menupoints[2] = new Array(360, 228, 220, 114); _global.menupoints[3] = new Array(390, 206, 200, 112); _global.menupoints[4] = new Array(420, 184, 180, 110); _global.menupoints[5] = new Array(450, 162, 140, 108); _global.menupoints[6] = new Array(400, 140, 100, 106); _global.menupoints[7] = new Array(360, 118, 70, 104); _global.menupoints[8] = new Array(300, 100, 50, 102); _global.menupoints[9] = new Array(250, 100, 50, 101); _global.menupoints[10] = new Array(195, 118, 70, 103); _global.menupoints[11] = new Array(150, 140, 100, 105); _global.menupoints[12] = new Array(100, 162, 140, 107); _global.menupoints[13] = new Array(130, 184, 210, 109); _global.menupoints[14] = new Array(165, 206, 200, 111); _global.menupoints[15] = new Array(195, 228, 220, 113); _global.shieldmenupoints = new Array(); _global.shieldmenupoints[1] = new Array(275, 250); _global.shieldmenupoints[4] = new Array(350, 50); _global.shieldmenupoints[5] = new Array(200, 50); _global.shieldmenupoints[3] = new Array(400, 125); _global.shieldmenupoints[6] = new Array(150, 125); _global.shieldmenupoints[2] = new Array(475, 190); _global.shieldmenupoints[7] = new Array(75, 190); _global.store = new Array(); i = 1; while (i <= 15) { _global.store[i] = new Object(); _global.store[i].bought = false; ++i; } _global.store[1].iteamname = 'basic shield'; _global.store[1].price = 1000; _global.store[2].iteamname = 'bubble shield'; _global.store[2].price = 1100; _global.store[3].iteamname = 'electric shield'; _global.store[3].price = 1400; _global.store[4].iteamname = 'fire shield'; _global.store[4].price = 2000; _global.store[5].iteamname = 'balloon'; _global.store[5].price = 1100; _global.store[6].iteamname = 'omochao'; _global.store[6].price = 1000; _global.store[7].iteamname = 'stats card'; _global.store[7].price = 4000; _global.store[8].iteamname = 'power bounce'; _global.store[8].price = 5000; _global.store[9].iteamname = 'updraft'; _global.store[9].price = 5000; _global.store[10].iteamname = 'free turn'; _global.store[10].price = 2500; _global.store[11].iteamname = 'booster'; _global.store[11].price = 5500; _global.store[12].iteamname = 'auto fly'; _global.store[12].price = 3500; _global.store[13].iteamname = 'cannon upgrade'; _global.store[13].price = 1200; _global.store[14].iteamname = 'music1'; _global.store[14].price = 1000; _global.store[15].iteamname = 'music2'; _global.store[15].price = 1000; _global.musiclist = new Array(); i = 1; while (i <= 7) { _global.musiclist[i] = true; ++i; } } movieClip 298 { frame 2238 { stop(); _root.globaler.changesong(); } } movieClip 300 { frame 3223 { stop(); _root.globaler.changesong(); } } movieClip 302 { frame 2823 { stop(); _root.globaler.changesong(); } } movieClip 304 { frame 2650 { stop(); _root.globaler.changesong(); } } movieClip 306 { frame 3449 { stop(); _root.globaler.changesong(); } } movieClip 308 { frame 3739 { stop(); _root.globaler.changesong(); } } movieClip 310 { frame 5851 { stop(); _root.globaler.changesong(); } } movieClip 311 { frame 1 { stop(); } } instance musicboxmaster of movieClip 311 { onClipEvent (load) { function soundplay(path) { if (_global.soundfx) { trace('sound : ' + path); _global.soundlayers += 1; if (_global.soundlayers > 10) { _global.soundlayers = 1; } var v3 = _global.soundlayers; _root.createEmptyMovieClip('soundclip' + v3, 6789 + v3); _root['soundclip' + v3] = new Sound(); _root['soundclip' + v3].attachSound(path); _root['soundclip' + v3].setVolume(_global.soundfactor); _root['soundclip' + v3].start(); _root['soundclip' + v3] = null; } } function changesong() { var v3 = _global.musiccount; if (_global.music) { do { _global.musiccount += 1; if (_global.musiccount == 6 && _global.store[14].bought == false) { _global.musiccount += 1; } if (_global.musiccount == 7 && _global.store[15].bought == false || _global.musiccount >= 8) { _global.musiccount = 1; } if (v3 == _global.musiccount) { _global.music = false; break; } } while (!_global.musiclist[_global.musiccount]); if (_global.music) { this.gotoAndStop(_global.musiccount); } else { this.gotoAndStop(8); } } } if (this._name == 'musicboxmaster') { this.duplicateMovieClip('globaler', 6800); trace('creating life'); } else { trace('IM ALIVsE!'); var aborter = 0; } } onClipEvent (keyDown) { if (!_global.typelock) { if (Key.getCode() == 77) { changesong(); } if (Key.getCode() == 83) { _global.soundfx = !_global.soundfx; } if (Key.getCode() == 68) { _global.music = !_global.music; if (!_global.music) { this.gotoAndStop(8); } else { this.gotoAndStop(_global.musiccount); } } } } onClipEvent (enterFrame) { if (!_global.music) { this.gotoAndStop(8); } else { this.gotoAndStop(_global.musiccount); } if (Key.isDown(65)) { aborter += 1; if (aborter >= 75) { aborter = 0; if (_root.char.tag != undefined) { _global.shieldfocus = _global.tempshieldfocus; _root.globaler.soundplay('wrongring'); _global.nuke = true; _root.gotoAndPlay('resetmainmenu'); } } } else { aborter = 0; } } } movieClip 320 { frame 1 { stop(); } } movieClip 321 { } movieClip 327 { } movieClip 329 { frame 1 { function camControl() { parentColor.setTransform(camColor.getTransform()); var v4 = sX / this._width; var v3 = sY / this._height; _parent._x = cX - this._x * v4; _parent._y = cY - this._y * v3; _parent._xscale = 100 * v4; _parent._yscale = 100 * v3; } function resetStage() { var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0}; parentColor.setTransform(v2); _parent._xscale = 100; _parent._yscale = 100; _parent._x = 0; _parent._y = 0; } this._visible = false; var oldMode = Stage.scaleMode; Stage.scaleMode = 'exactFit'; var cX = Stage.width / 2; var cY = Stage.height / 2; var sX = Stage.width; var sY = Stage.height; Stage.scaleMode = oldMode; var camColor = new Color(this); var parentColor = new Color(_parent); this.onEnterFrame = camControl; camControl(); this.onUnload = resetStage; } } frame 131 { } movieClip 331 { } instance of movieClip 331 { onClipEvent (keyDown) { if (Key.getCode() == 32) { _root.gotoAndStop('startmenu'); } } } movieClip 338 { frame 11 { stop(); } } movieClip 339 { frame 11 { stop(); } } movieClip 344 { } movieClip 366 { } movieClip 373 { } movieClip 379 { } movieClip 386 { } movieClip 391 { } movieClip 396 { } movieClip 399 { frame 5 { stop(); } } movieClip 401 { } movieClip 404 { frame 4 { stop(); } } movieClip 407 { frame 4 { stop(); } } movieClip 415 { } movieClip 421 { frame 11 { stop(); } } movieClip 423 { } movieClip 426 { } movieClip 432 { frame 13 { stop(); } } movieClip 434 { } movieClip 440 { frame 6 { stop(); } } movieClip 443 { } movieClip 452 { } movieClip 453 { } movieClip 460 { } movieClip 462 { } movieClip 463 { } movieClip 467 { frame 5 { stop(); } } movieClip 468 { frame 7 { stop(); } } movieClip 470 { } movieClip 472 { } movieClip 474 { } movieClip 476 { } movieClip 478 { } movieClip 480 { } movieClip 482 { } movieClip 483 { frame 12 { stop(); } } movieClip 484 { } movieClip 487 { } movieClip 488 { } instance paradax of movieClip 443 { onClipEvent (enterFrame) { this.bg1.gotoAndStop(2); this.bg2.gotoAndStop(2); } } instance paradax of movieClip 443 { onClipEvent (enterFrame) { this.bg1.gotoAndStop(1); this.bg2.gotoAndStop(1); this._alpha -= 6.666666666666667; } } movieClip 491 { } movieClip 492 { } movieClip 507 { } instance paradax of movieClip 443 { onClipEvent (load) { this.bg1.gotoAndStop(4); this.bg2.gotoAndStop(4); } onClipEvent (enterFrame) { this.bg1.gotoAndStop(4); this.bg2.gotoAndStop(4); } } instance paradax of movieClip 443 { onClipEvent (load) { this.bg1.gotoAndStop(2); this.bg2.gotoAndStop(2); } onClipEvent (enterFrame) { this.bg1.gotoAndStop(2); this.bg2.gotoAndStop(2); this._alpha -= 6.666666666666667; } } movieClip 510 { } movieClip 511 { } movieClip 513 { } instance bg1 of movieClip 320 { onClipEvent (load) { this.gotoAndStop(4); } onClipEvent (enterFrame) { this.gotoAndStop(4); } } movieClip 521 { } frame 1060 { stop(); } button 588 { on (release) { _global.nuke = true; _root.gotoAndStop('loadmenu'); } } button 589 { on (release) { _global.loadeddata = true; _global.autosavepath = ''; i = 1; while (i <= 15) { _global.chars[i].lock = true; _global.chars[i].highscore = 0; _global.chars[i].total = 0; _global.store[i].bought = false; ++i; } _global.shieldfocus = 7; _global.menufocus = 1; _global.storemenufocus = 1; _global.tempshieldfocus = -1; _global.menufocus = 1; _global.namesave = ''; _global.soundfx = true; _global.music = true; _global.rings = 50; _global.nuke = true; _root.gotoAndPlay('mainmenu'); } } button 590 { on (release) { _root.gotoAndStop('creditsstart'); } } button 591 { on (release) { if (_global.loadeddata) { _global.nuke = true; _root.gotoAndPlay('resetmainmenu'); _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } frame 1061 { gotoAndPlay('resetmainmenu'); } frame 1063 { function savefile(path) { var v4 = 0; var v5 = 0; var v3 = new Date(); localData = SharedObject.getLocal('sonicboom3cookie' + path); if (localData.data.statcode == undefined) { localData.data.startdate = v3.getFullYear() + '-' + v3.getMonth() + '-' + v3.getDate() + ' ~ ' + v3.getHours() + ':' + v3.getMinutes(); localData.data.statcode = 'started'; } i = 1; while (i <= 15) { if (!_global.chars[i].lock) { v4 += 1; } localData.data['char' + i + 'lock'] = _global.chars[i].lock; localData.data['char' + i + 'highscore'] = _global.chars[i].highscore; localData.data['char' + i + 'total'] = _global.chars[i].total; if (_global.store[i].bought) { v5 += 1; } localData.data['item' + i] = _global.store[i].bought; ++i; } i = 1; while (i <= 7) { localData.data['music' + i] = _global.musiclist[i]; ++i; } localData.data.music = _global.music; localData.data.soundfx = _global.soundfx; localData.data.soundfactor = _global.soundfactor; localData.data.quality = _root._quality; localData.data.minigameringsusedhighscore = _global.minigameringsusedhighscore; localData.data.secretcannon = _global.secretcannon; localData.data.rings = _global.rings; localData.data.chartotal = v4; localData.data.itemtotal = v5; localData.data.lastsave = v3.getFullYear() + '-' + v3.getMonth() + '-' + v3.getDate() + ' ~ ' + v3.getHours() + ':' + v3.getMinutes(); var v6 = localData.flush(); if (v6 == false || v6 == 'pending') { _root.autosaver.gotoAndStop(32); } else { _root.autosaver.gotoAndPlay(2); } } _global.tempshieldfocus = -1; stop(); } button 594 { on (release) { _root.gotoAndPlay('resetmainmenu'); } } movieClip 596 { } movieClip 598 { } movieClip 600 { } movieClip 602 { } movieClip 604 { } movieClip 606 { } movieClip 608 { } movieClip 610 { } movieClip 612 { } movieClip 614 { } movieClip 616 { } movieClip 618 { } movieClip 620 { } movieClip 622 { } movieClip 624 { } movieClip 625 { } instance of movieClip 625 { onClipEvent (load) { this.gotoAndStop(_global.charselect); } } button 626 { on (release) { gotoAndStop('shieldselect'); } } movieClip 633 { } instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; } } button 634 { on (release) { _global.nuke = true; _root.gotoAndStop('store'); } } button 635 { on (release) { _global.nuke = true; _root.gotoAndStop('options'); } } button 638 { on (release) { _global.nuke = true; _root.gotoAndStop('savemenu'); } } button 639 { on (release) { _global.nuke = true; _root.gotoAndStop('startmenu'); } } movieClip 656 { frame 1 { stop(); } } movieClip 657 { frame 1 { stop(); } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(random(7) + 1); } } } movieClip 662 { } movieClip 666 { } movieClip 667 { frame 1 { stop(); } } movieClip 668 { instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(16); _parent.distrank = 0; } onClipEvent (enterFrame) { if (!_global.chars[_global.menufocus].lock) { _parent.wn.gotoAndStop(Math.round(_global.chars[_global.menufocus].wieght / 10)); _parent.bn.gotoAndStop(Math.round(10 - (_global.chars[_global.menufocus].bounce - 1) * 10)); if (_global.chars[_global.menufocus].total > 1500000) { this.gotoAndStop(15); _parent.distrank = 15; } else { if (_global.chars[_global.menufocus].total > 1320000) { this.gotoAndStop(14); _parent.distrank = 14; } else { if (_global.chars[_global.menufocus].total > 950000) { this.gotoAndStop(13); _parent.distrank = 13; } else { if (_global.chars[_global.menufocus].total > 700000) { this.gotoAndStop(12); _parent.distrank = 12; } else { if (_global.chars[_global.menufocus].total > 500000) { this.gotoAndStop(11); _parent.distrank = 11; } else { if (_global.chars[_global.menufocus].total > 350000) { this.gotoAndStop(10); _parent.distrank = 10; } else { if (_global.chars[_global.menufocus].total > 225000) { this.gotoAndStop(9); _parent.distrank = 9; } else { if (_global.chars[_global.menufocus].total > 100000) { this.gotoAndStop(8); _parent.distrank = 8; } else { if (_global.chars[_global.menufocus].total > 64000) { this.gotoAndStop(7); _parent.distrank = 7; } else { if (_global.chars[_global.menufocus].total > 32000) { this.gotoAndStop(6); _parent.distrank = 6; } else { if (_global.chars[_global.menufocus].total > 16000) { this.gotoAndStop(5); _parent.distrank = 5; } else { if (_global.chars[_global.menufocus].total > 8000) { this.gotoAndStop(4); _parent.distrank = 4; } else { if (_global.chars[_global.menufocus].total > 4000) { this.gotoAndStop(3); _parent.distrank = 3; } else { if (_global.chars[_global.menufocus].total > 2000) { this.gotoAndStop(2); _parent.distrank = 2; } else { if (_global.chars[_global.menufocus].total > 1000) { this.gotoAndStop(1); _parent.distrank = 1; } else { this.gotoAndStop(16); _parent.distrank = 0; } } } } } } } } } } } } } } } } else { this.gotoAndStop(16); _parent.distrank = 0; _parent.wn.gotoAndStop(1); _parent.bn.gotoAndStop(1); } _global.ringmultiplier = Number(_parent.distrank) / 10 + 1; } } } instance of movieClip 668 { onClipEvent (load) { if (!_global.store[7].bought) { this._visible = false; } } } button 669 { on (release) { _global.nuke = true; _root.gotoAndPlay('restart'); } } movieClip 678 { } movieClip 680 { } movieClip 691 { } movieClip 693 { } movieClip 695 { } movieClip 698 { } movieClip 700 { } movieClip 701 { } instance of movieClip 701 { onClipEvent (load) { this.gotoAndStop(_global.shieldfocus); } onClipEvent (enterFrame) { this.gotoAndStop(_global.shieldfocus); } } movieClip 704 { } movieClip 707 { frame 1 { stop(); } frame 2 { play(); } frame 31 { gotoAndStop(1); } } instance autosaver of movieClip 707 { onClipEvent (load) { if (_global.autosavepath != '') { trace('love the fuuuurrrrrrrrrrrrrrr'); _root.savefile(_global.autosavepath); } } } button 708 { on (release) { _root.gotoAndStop('minigamemenu'); } } movieClip 711 { } instance of movieClip 711 { onClipEvent (load) { if (_global.rings <= 0) { this._visible = false; } else { i = 1; while (i < 15) { if (_global.chars[i].lock != true && _global.store[i].bought != false) { } else { this._visible = false; break; } ++i; } } } } frame 1066 { _global.nuke = false; stop(); } button 714 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 50) { _global.chars[_parent.tag].lock = false; _global.rings -= 50; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } movieClip 715 { } button 718 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 719 { frame 1 { stop(); } } button 720 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 50) { _global.chars[_parent.tag].lock = false; _global.rings -= 50; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 721 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 722 { frame 1 { stop(); } } button 723 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 50) { _global.chars[_parent.tag].lock = false; _global.rings -= 50; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 724 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 725 { frame 1 { stop(); } } button 726 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 60) { _global.chars[_parent.tag].lock = false; _global.rings -= 60; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 728 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 729 { frame 1 { stop(); } } button 730 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 60) { _global.chars[_parent.tag].lock = false; _global.rings -= 60; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 731 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 732 { frame 1 { stop(); } } button 733 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 70) { _global.chars[_parent.tag].lock = false; _global.rings -= 70; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 735 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 736 { frame 1 { stop(); } } button 737 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 80) { _global.chars[_parent.tag].lock = false; _global.rings -= 80; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 739 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 740 { } button 741 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 100) { _global.chars[_parent.tag].lock = false; _global.rings -= 100; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 743 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 744 { frame 1 { stop(); } } button 745 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 100) { _global.chars[_parent.tag].lock = false; _global.rings -= 100; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 746 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 747 { frame 1 { stop(); } } button 748 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 200) { _global.chars[_parent.tag].lock = false; _global.rings -= 200; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 750 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 751 { frame 1 { stop(); } } button 752 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 300) { _global.chars[_parent.tag].lock = false; _global.rings -= 300; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 754 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 755 { frame 1 { stop(); } } button 756 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 400) { _global.chars[_parent.tag].lock = false; _global.rings -= 400; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 758 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 759 { } button 760 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 500) { _global.chars[_parent.tag].lock = false; _global.rings -= 500; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 762 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 763 { frame 1 { stop(); } } button 764 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 1000) { _global.chars[_parent.tag].lock = false; _global.rings -= 1000; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 766 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 767 { frame 1 { stop(); } } button 768 { on (release) { if (_parent.lastpos == 1 && _global.chars[_parent.tag].lock && _global.rings >= 1000) { _global.chars[_parent.tag].lock = false; _global.rings -= 1000; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } button 770 { on (release) { if (_parent.lastpos == 1) { _global.charselect = _parent.tag; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } } movieClip 771 { } movieClip 772 { frame 1 { stop(); } } instance mastermenuchar of movieClip 772 { onClipEvent (load) { var localfocus = 0; if (this._name == 'mastermenuchar') { i = 1; while (i <= 15) { localfocus = i - _global.menufocus + 1; if (localfocus <= 0) { localfocus = 15 + localfocus; } trace(_global.menupoints[i][3] + ' ' + localfocus); this.duplicateMovieClip('char' + i, _global.menupoints[localfocus][3]); _root['char' + i]._x = _global.menupoints[localfocus][0]; _root['char' + i]._y = _global.menupoints[localfocus][1]; _root['char' + i]._xscale = _global.menupoints[localfocus][2]; _root['char' + i]._yscale = _global.menupoints[localfocus][2]; _root['char' + i].tag = i; _root['char' + i].lastpos = localfocus; ++i; } this._visible = false; } else { var lastpos; this.gotoAndStop(tag); if (_global.chars[tag].lock) { this.char.gotoAndStop(1); } else { this.char.gotoAndStop(2); } } } onClipEvent (enterFrame) { if (this._name != 'mastermenuchar') { if (_global.nuke) { this.removeMovieClip(); } if (lastpos == 1) { _global.menufocus = tag; } this.gotoAndStop(tag); if (_global.chars[tag].lock) { this.char.gotoAndStop(1); } else { this.char.gotoAndStop(2); } if (_global.menupoints[lastpos][0] != this._x) { this._x -= (this._x - _global.menupoints[lastpos][0]) / 10; } if (_global.menupoints[lastpos][1] != this._y) { this._y -= (this._y - _global.menupoints[lastpos][1]) / 10; } if (_global.menupoints[lastpos][2] != this._xscale) { this._xscale -= (this._xscale - _global.menupoints[lastpos][2]) / 10; this._yscale = this._xscale; } if (this.getDepth != _global.menupoints[lastpos][3]) { this.swapDepths(_global.menupoints[lastpos][3]); } } } } movieClip 774 { } movieClip 778 { } movieClip 780 { } movieClip 782 { } movieClip 784 { } movieClip 786 { } movieClip 788 { } movieClip 790 { } movieClip 792 { } movieClip 794 { } movieClip 796 { } movieClip 798 { } movieClip 800 { } movieClip 802 { } movieClip 804 { } movieClip 806 { } movieClip 807 { frame 1 { stop(); } } instance large of movieClip 807 { onClipEvent (load) { function resetprofile() { this._x = -100; lastchar = _global.menufocus; faketimer = 0; swatch = false; swatch2 = 0; this.highscore = ''; this.highscorebox._visible = false; this.highscoretext._visible = false; } var startx = this._x; sheame = {'ra': '100', 'rb': '0', 'ga': '100', 'gb': '0', 'ba': '100', 'bb': '0', 'aa': '100', 'ab': '0'}; sheamw = {'ra': '100', 'rb': '255', 'ga': '100', 'gb': '255', 'ba': '100', 'bb': '255', 'aa': '100', 'ab': '0'}; sheamb = {'ra': '100', 'rb': '-255', 'ga': '100', 'gb': '-255', 'ba': '100', 'bb': '-255', 'aa': '100', 'ab': '0'}; sheama = new Color(this); sheama.setTransform(sheamb); this._x = -100; var lastchar = _global.menufocus; var faketimer = 0; var swatch = false; var swatch2 = 0; this.highscore = ''; this.highscorebox._visible = false; this.highscoretext._visible = false; } onClipEvent (enterFrame) { this.gotoAndStop(_global.menufocus); if (!swatch && !_global.chars[_global.menufocus].lock) { if (swatch2 == 0) { faketimer += 1; if (faketimer >= 8) { if (this._x < startx) { this._x += Math.abs(this._x - startx) / 7 + 7; } else { this.highscorebox._visible = true; this.highscoretext._visible = true; swatch2 = 1; faketimer = 0; } } sheama.setTransform(sheamb); } else { if (swatch2 == 1) { faketimer += 1; sheama.setTransform(sheamw); if (faketimer >= 4) { swatch2 = 2; } } else { if (swatch2 == 2) { this.highscore = _global.chars[_global.menufocus].highscore; sheama.setTransform(sheame); swatch = false; } } } } else { if (swatch && _global.menufocus != lastchar) { resetprofile(); } } } } button 809 { on (release) { i = 1; while (i <= 15) { _root.large.resetprofile(); _root['char' + i].lastpos += 1; if (_root['char' + i].lastpos > 15) { _root['char' + i].lastpos = 1; } ++i; } } } button 810 { on (release) { i = 1; while (i <= 15) { _root.large.resetprofile(); _root['char' + i].lastpos -= 1; if (_root['char' + i].lastpos <= 0) { _root['char' + i].lastpos = 15; } ++i; } } } instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; } } button 814 { on (release, keyPress '<Right>') { i = 1; while (i <= 15) { _root.large.resetprofile(); _root['char' + i].lastpos -= 1; if (_root['char' + i].lastpos <= 0) { _root['char' + i].lastpos = 15; } ++i; } } } button 815 { on (release, keyPress '<Left>') { i = 1; while (i <= 15) { _root.large.resetprofile(); _root['char' + i].lastpos += 1; if (_root['char' + i].lastpos > 15) { _root['char' + i].lastpos = 1; } ++i; } } } instance of movieClip 668 { onClipEvent (load) { if (!_global.store[7].bought) { this._visible = false; } } } frame 1068 { _global.itemsonstage = 0; _global.itemlayers = 102; _global.ringlayers = 500; _global.soundlayers = 1; if (_global.tempshieldfocus == -1) { _global.tempshieldfocus = _global.shieldfocus; } else { _global.shieldfocus = _global.tempshieldfocus; } if (_global.shieldfocus != 7 && _global.rings < 10) { _global.shieldfocus = 7; } else { if (_global.shieldfocus != 7) { _global.rings -= 10; } } trace(_global.charselect + ' charrrr'); } frame 1069 { function itemrelayer() { i = 0; while (i <= _global.itemsonstage) { j = 0; while (j <= _global.itemsonstage) { if (_root['item' + i]._y > _root['item' + j]._y && _root['item' + i].getDepth() < _root['item' + j].getDepth()) { _root['item' + i].swapDepths(_root['item' + j]); } else { if (_root['item' + i]._y < _root['item' + j]._y && _root['item' + i].getDepth() > _root['item' + j].getDepth()) { _root['item' + i].swapDepths(_root['item' + j]); } } ++j; } ++i; } } function namerecycle() { var v4 = 0; var v3 = 0; i = 1; while (i <= _global.itemsonstage) { if (_root['item' + i].isalive == 'imhere') { v3 += 1; if (i != v3) { _root['item' + i]._name = 'item' + v3; } } ++i; } _global.itemsonstage = v3 + 1; } _global.nuke = false; stop(); } movieClip 816 { } movieClip 849 { } movieClip 861 { frame 7 { stop(); } } movieClip 873 { frame 7 { stop(); } } movieClip 874 { frame 7 { stop(); } } movieClip 875 { frame 7 { stop(); } } movieClip 876 { frame 1 { stop(); } instance of movieClip 816 { onClipEvent (load) { var focus = 1; var times = new Date(); var hours = times.getHours(); var safegaurd = 0; trace('hours ' + hours); if (hours > 22 || hours <= 6) { this.paradax1.gotoAndStop(4); this.paradax2.gotoAndStop(4); } else { if (hours > 6 && hours <= 12) { this.paradax1.gotoAndStop(1); this.paradax2.gotoAndStop(1); } else { if (hours > 12 && hours <= 18) { this.paradax1.gotoAndStop(2); this.paradax2.gotoAndStop(2); } else { if (hours > 18 && hours <= 22) { this.paradax1.gotoAndStop(3); this.paradax2.gotoAndStop(3); } } } } } onClipEvent (enterFrame) { safegaurd = Math.ceil(_root.char.speed / 3); if (safegaurd >= 400) { safegaurd = 399; } this.paradax1._y -= safegaurd; this.paradax2._y -= safegaurd; if (this['paradax' + focus]._y <= -800) { this['paradax' + focus]._y = -(Math.abs(this['paradax' + focus]._y) - 800); focus = 3 - focus; } } } } instance bgmaster of movieClip 876 { onClipEvent (load) { function evenoddrange() { if (this.mastermove._currentframe < 40) { oddeven = false; } else { oddeven = true; } } function framecalie() { while (!false) { if (framecal > 80) { framecal -= 80; } else { break; } } } var turn = false; var dir = 'right'; var oddeven = true; var saveitem = 0; var faketimer = 0; var framecal = 1; var lastnotch = 0; var totalnotches = 0; } onClipEvent (enterFrame) { if (turn && oddeven) { if (dir == 'right') { this.gotoAndStop('eventurnright'); framecal = 66; i = 0; while (i <= _global.itemsonstage) { _root['item' + i]._alpha -= 16.66666666666667; ++i; } } else { if (dir == 'left') { framecal = 26; this.gotoAndStop('eventurnleft'); i = 0; while (i <= _global.itemsonstage) { _root['item' + i]._alpha -= 16.66666666666667; ++i; } } } faketimer += 1; if (faketimer >= 7) { if (dir == 'right') { _root.char.dir += 1; if (_root.char.dir >= 5) { _root.char.dir = 1; } } else { if (dir == 'left') { _root.char.dir -= 1; if (_root.char.dir <= 0) { _root.char.dir = 4; } } } turn = false; this.gotoAndStop('move'); faketimer = 0; i = 0; while (i <= _global.itemsonstage) { _root['item' + i].removeMovieClip(); ++i; } _global.itemsonstage = 0; } } else { if (turn && !oddeven) { if (dir == 'right') { framecal = 26; this.gotoAndStop('oddturnright'); i = 0; while (i <= _global.itemsonstage) { _root['item' + i]._alpha -= 16.66666666666667; ++i; } } else { if (dir == 'left') { framecal = 66; this.gotoAndStop('oddturnleft'); i = 0; while (i <= _global.itemsonstage) { _root['item' + i]._alpha -= 16.66666666666667; ++i; } } } faketimer += 1; if (faketimer >= 7) { if (dir == 'right') { _root.char.dir += 1; if (_root.char.dir >= 5) { _root.char.dir = 1; } } else { if (dir == 'left') { _root.char.dir -= 1; if (_root.char.dir <= 0) { _root.char.dir = 4; } } } turn = false; this.gotoAndStop('move'); faketimer = 0; i = 0; while (i <= _global.itemsonstage) { _root['item' + i].removeMovieClip(); ++i; } _global.itemsonstage = 0; } } else { this.gotoAndStop('move'); _global.notches = 0; if (_root.char.speed > 0) { totalnotches += Math.ceil(_root.char.speed / 15); framecal = this.mastermove._currentframe + Math.ceil(_root.char.speed / 15); framecalie(); this.mastermove.gotoAndStop(framecal); evenoddrange(); if (lastnotch + 5 <= totalnotches) { do { _global.notches += 1; lastnotch += 5; if (lastnotch + 5 > totalnotches) { break; } } while (true); } } else { this.mastermove.stop(); } } } } } movieClip 878 { } instance groundxx of movieClip 878 { onClipEvent (load) { var starty = this._y; this._y = 500; var switch1 = false; } onClipEvent (enterFrame) { if (_root.char.shot && !switch1) { if (_root.char._y < starty + this.height) { this._y = starty; switch1 = true; } else { this._y = starty + 50; } } } } movieClip 882 { } movieClip 885 { } movieClip 886 { } movieClip 890 { frame 10 { stop(); } } movieClip 905 { frame 16 { stop(); } } movieClip 906 { } movieClip 909 { } movieClip 910 { frame 7 { stop(); } } movieClip 913 { } movieClip 916 { frame 5 { stop(); } } movieClip 921 { } movieClip 922 { frame 11 { stop(); } } movieClip 925 { } movieClip 926 { frame 11 { stop(); } } movieClip 927 { } movieClip 930 { } movieClip 934 { } movieClip 937 { } movieClip 940 { } movieClip 942 { } movieClip 951 { } movieClip 954 { frame 10 { stop(); } } movieClip 957 { } movieClip 961 { } movieClip 974 { } movieClip 979 { } movieClip 981 { } movieClip 985 { } movieClip 987 { } movieClip 990 { frame 10 { stop(); } } movieClip 993 { } movieClip 998 { } movieClip 1000 { } movieClip 1006 { frame 9 { stop(); } } movieClip 1013 { } movieClip 1015 { } movieClip 1019 { } movieClip 1021 { } movieClip 1024 { frame 8 { stop(); } } movieClip 1031 { } movieClip 1033 { } movieClip 1041 { frame 13 { stop(); } } movieClip 1047 { } movieClip 1049 { } movieClip 1055 { frame 20 { gotoAndPlay('poke'); } } movieClip 1061 { } movieClip 1063 { } movieClip 1068 { frame 13 { stop(); } } movieClip 1073 { } movieClip 1080 { } movieClip 1082 { } movieClip 1089 { } movieClip 1095 { } movieClip 1097 { } movieClip 1101 { } movieClip 1105 { } movieClip 1107 { } movieClip 1111 { frame 9 { gotoAndPlay(6); } } movieClip 1113 { } movieClip 1120 { } movieClip 1122 { } movieClip 1128 { } movieClip 1130 { } movieClip 1134 { } movieClip 1136 { } movieClip 1138 { } movieClip 1139 { frame 1 { stop(); } instance of movieClip 886 { onClipEvent (load) { this.gotoAndStop(_global.shieldfocus); } onClipEvent (enterFrame) { this.gotoAndStop(_global.shieldfocus); } } instance effect of movieClip 927 { onClipEvent (load) { this.gotoAndStop(7); } } instance right of movieClip 930 { onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.char.action != 'fly') { this._visible = false; } } } instance left of movieClip 930 { onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.char.action != 'fly') { this._visible = false; } } } instance up of movieClip 930 { onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.char.action != 'fly') { this._visible = false; } } } instance down of movieClip 930 { onClipEvent (load) { this._visible = false; } onClipEvent (enterFrame) { if (_root.char.action != 'fly') { this._visible = false; } } } } instance charmaster of movieClip 1139 { onClipEvent (load) { if (this._name != 'charmaster') { var tag = _global.chars[_global.charselect].charname; var bounce = _global.chars[_global.charselect].bounce; var mass = _global.chars[_global.charselect].wieght; var action = 'spin'; var dir = 1; var speed = 0; var grav = 0; var decay = 0.01568; var tag; var gravtogo = 0; var bouncefix = 0; var hurt = false; var hurtsound = false; var ending = false; var endingsound = false; var shot = false; var shotsound = false; var northdist = 0; var eastdist = 0; var southdist = 0; var westdist = 0; var distance = 0; var ringscollected = 0; var flytimer = 15; var flycount = 1; var flysave = 1; var randfly = -1; var temp = 0; } else { this.duplicateMovieClip('char', 1000); this.mastershadow.duplicateMovieClip('charshadow', 999); this._visible = false; } } onClipEvent (enterFrame) { if (this._name != 'charmaster' && this._visible) { if (_global.shieldfocus == 2) { bounce = _global.chars[_global.charselect].bounce - 0.3 * _global.chars[_global.charselect].bounce; if (bounce < 1.3) { bounce = 1.3; } } else { bounce = _global.chars[_global.charselect].bounce; } if (_global.shieldfocus == 5) { mass = _global.chars[_global.charselect].wieght - 0.3 * _global.chars[_global.charselect].wieght; } else { mass = _global.chars[_global.charselect].wieght; } if (action == 'hurt' && !hurtsound) { action = 'hurt'; _root.globaler.soundplay(tag + 'hurt' + (random(2) + 1)); hurtsound = true; } if (action == 'hurt') { this.hurtclip._rotation += speed; } if (grav < 0) { gravtogo = Math.abs(grav); i = 0; while (i < gravtogo) { this._y -= Math.abs(grav) / grav; if (this.xx.hitTest(_root.groundxx) && shot) { if (action == 'fly') { action = 'spin'; } if (grav < -5) { _root.globaler.soundplay('thud'); } this._y -= -1 * Math.abs(grav) / grav; temp = bounce - bouncefix; if (temp < 1.3) { temp = 1.3; } grav = Math.abs(grav / temp); speed /= bounce; if (grav < 0.5 && grav > -0.5) { ending = true; grav = 0; speed = 0; } break; } else { if (!shot && this.xx.hitTest(_root.cannon.core.xx)) { this._visible = false; grav = 0; speed = 0; action = 'spin'; } } ++i; } } else { this._y -= grav; } if (!ending) { distance += speed / 25; if (dir == 1) { northdist += speed / 25; } else { if (dir == 2) { eastdist += speed / 25; } else { if (dir == 3) { southdist += speed / 25; } else { if (dir == 4) { westdist += speed / 25; } } } } if (action == 'fly') { grav = -2; flytimer -= 1; trace(flytimer + ' ' + flysave + ' ' + flycount + ' ' + randfly); if (flytimer <= 0) { if (randfly == -1) { randfly = random(4); } else { if (randfly == 1) { this.right._visible = true; if (Key.isDown(39)) { this.right._visible = false; flycount -= 1; if (flycount <= 0) { flysave += 1; flycount = flysave; randfly = -1; flytimer = 25; } else { flytimer = 14; randfly = -1; } } } else { if (randfly == 2) { this.down._visible = true; if (Key.isDown(40)) { this.down._visible = false; flycount -= 1; if (flycount <= 0) { flysave += 1; flycount = flysave; randfly = -1; flytimer = 25; } else { flytimer = 14; randfly = -1; } } } else { if (randfly == 3) { this.left._visible = true; if (Key.isDown(37)) { this.left._visible = false; flycount -= 1; if (flycount <= 0) { flysave += 1; flycount = flysave; randfly = -1; flytimer = 25; } else { flytimer = 14; randfly = -1; } } } else { if (randfly == 0) { this.up._visible = true; if (Key.isDown(38)) { this.up._visible = false; flycount -= 1; if (flycount <= 0) { flysave += 1; flycount = flysave; randfly = -1; flytimer = 25; } else { flytimer = 14; randfly = -1; } } } } } } } } else { if (flytimer >= 15) { this._y -= flytimer; } } } else { grav -= mass * decay; } } else { if (action != 'hurt') { action = 'pose'; if (!endingsound) { _root.globaler.soundplay(tag + 'pose' + (random(2) + 1)); endingsound = true; } } else { this.hurtclip.stop(); } } this.gotoAndStop(tag + action); if (_global.nuke == true) { this.removeMovieClip(); } } } onClipEvent (mouseDown) { trace('MOUSE Y : ' + _root._ymouse); } } button 1140 { on (keyPress '<Home>') { _root.char.speed = 500; _root.char._y = -20; } } button 1141 { on (keyPress '<PageUp>') { _root.char.speed = 100; _root.char._y = -20; } } movieClip 1144 { } instance mastershadow of movieClip 1144 { onClipEvent (load) { if (this._name != 'shadowmaster') { this._x = _root.char._x; starty = this._y; } } onClipEvent (enterFrame) { if (this._name != 'shadowmaster') { if (_root.char._y > 0) { this._alpha = 90 - (starty - _root.char._y) / 3; if (this._alpha < 30) { this._alpha = 30; } else { if (this._alpha > 90) { this._alpha = 90; } } } else { this._alpha = 30; } this._xscale = this._alpha * 2.5; this._yscale = this._alpha * 2; } } } movieClip 1145 { } movieClip 1146 { } movieClip 1147 { instance core of movieClip 657 { onClipEvent (load) { this.gotoAndStop(_global.secretcannon); } } } movieClip 1150 { } movieClip 1153 { } movieClip 1158 { } movieClip 1163 { } movieClip 1167 { } movieClip 1170 { } movieClip 1171 { frame 1 { stop(); } } movieClip 1174 { } movieClip 1182 { frame 8 { stop(); } } movieClip 1183 { frame 1 { stop(); } instance bb of movieClip 1171 { onClipEvent (load) { this.gotoAndStop(random(5) + 1); } } frame 26 { stop(); } frame 27 { stop(); } } movieClip 1184 { instance corebase2 of movieClip 1145 { onClipEvent (load) { var starty = _root.cannon.core._y - this._y; trace(starty); } } instance of movieClip 257 { onClipEvent (load) { this.highbox = 0; this.highbox = ''; var starty = this._y; } onClipEvent (enterFrame) { if (!_root.char.shot) { this.highbox = Math.round(Math.abs(_parent.tilt)) + '°'; this._y = starty + (90 - Math.round(Math.abs(_parent.tilt))); } else { this._alpha = 0; } } } } instance mastercannon of movieClip 1184 { onClipEvent (load) { if (this._name != 'mastercannon') { var tilt = 90 - (100 - this.core._yscale) * 2; var power = 100; var sheama; var sheame = new Object(); sheame = {'ra': '100', 'rb': '0', 'ga': '100', 'gb': '0', 'ba': '100', 'bb': '0', 'aa': '100', 'ab': '0'}; sheama = new Color(this.core); this.corebase._yscale = (100 - this.core._yscale) * 2; this.corebase._y = this.core._y; } else { this.duplicateMovieClip('cannon', 1001); this._visible = false; } } onClipEvent (enterFrame) { if (this._name != 'mastercannon') { tilt = 90 - (100 - this.core._yscale) * 2; if (Key.isDown(38) && !_root.char._visible && !_root.char.shot) { trace(sheame.rb + ' ' + sheame.gb); if (this.core._yscale > 55) { this.core._y -= 0.2; sheame.rb = String(Number(sheame.rb) + 1); sheame.gb = String(Number(sheame.gb) + 1); sheame.bb = String(Number(sheame.bb) + 1); this.core._yscale -= 1; this.corebase._yscale = (100 - this.core._yscale) * 1.5; this.corebase._y = this.core._y; this.corebase2._y += 0.9; } sheama.setTransform(sheame); } else { if (Key.isDown(40) && !_root.char._visible && !_root.char.shot) { if (this.core._yscale < 100) { this.core._y += 0.2; sheame.rb = String(Number(sheame.rb) - 1); sheame.gb = String(Number(sheame.gb) - 1); sheame.bb = String(Number(sheame.bb) - 1); this.core._yscale += 1; this.corebase._yscale = (100 - this.core._yscale) * 1.5; this.corebase._y = this.core._y; this.corebase2._y -= 0.9; } sheama.setTransform(sheame); } } if (Key.isDown(32) && !_root.char._visible && !_root.char.shot) { if (power == 150) { this.kegboost.play(); } _root.char.grav = tilt * power / 250; _root.char.speed = (90 - tilt) * power / 50; _root.char.shot = true; _root.char._visible = true; trace(_root.char.speed + ' speed : grav ' + _root.char.grav + ' |tilt ' + tilt); } if (_root.char.shot) { this._y += _root.char.speed; } if (_global.nuke == true) { this.removeMovieClip(); } } } } movieClip 1186 { } movieClip 1193 { frame 5 { stop(); } } movieClip 1194 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx)) { _root.char.grav = Math.abs(_root.char.grav) * (1.3 + _root.char.mass / 100); _root.char.speed *= 1.3 + _root.char.mass / 100; _global.rings += 50; _root.globaler.soundplay('tvbreak'); _root.globaler.soundplay('ring'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _root.char.ringscollected += 50; _parent.nextFrame(); } } } frame 2 { stop(); } } movieClip 1196 { } movieClip 1203 { } movieClip 1204 { frame 14 { stop(); } } movieClip 1205 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { _root.char.grav = _root.char.grav * -1 * (1.3 + _root.char.mass / 100); _root.char.speed *= 1.3 + _root.char.mass / 100; if (_global.shieldfocus == 5) { _root.char.speed += 5; } swatch = true; _root.globaler.soundplay('pop'); _parent.gotoAndStop(6); } } } } movieClip 1209 { frame 1 { stop(); } frame 5 { stop(); } } movieClip 1210 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx) && !swatch && _global.shieldfocus != 1) { _root.char.grav /= 1.4 - _root.char.mass / 100; _root.char.speed /= 1.4 - _root.char.mass / 100; _root.char.action = 'hurt'; _root.globaler.soundplay('upper'); _parent.play(); swatch = true; _parent._parent.xshadow.play(); } } } frame 5 { stop(); } } movieClip 1211 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { _root.char.grav = _root.char.grav * -1 * (1.3 + _root.char.mass / 100); _root.char.speed *= 1.3 + _root.char.mass / 100; _root.globaler.soundplay('bumper'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } swatch = true; } } } } movieClip 1214 { } movieClip 1215 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; var soundswitch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx) && !swatch && _global.shieldfocus != 1) { _root.char.grav /= 1.5 - _root.char.mass / 100; _root.char.speed /= 1.5 - _root.char.mass / 100; if (!soundswitch) { _root.globaler.soundplay('elecshiledfx'); soundswitch = true; } _root.char.action = 'hurt'; swatch = true; _parent.nextFrame(); } } } } movieClip 1219 { } movieClip 1220 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; var soundswitch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx)) { _root.char.grav += 4; if (!soundswitch) { soundswitch = true; _root.globaler.soundplay('intosky'); } } } } } movieClip 1224 { frame 1 { stop(); } } movieClip 1225 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx) && _root.char.grav < 0) { _root.char.grav = _root.char.grav * -1 * (1.4 + _root.char.mass / 100) + 10; _root.char.speed = _root.char.speed * (1.3 + _root.char.mass / 100) + 5; _root.globaler.soundplay('spring'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent._parent.xshadow.play(); _parent.play(); } } } } movieClip 1229 { frame 1 { stop(); } } movieClip 1230 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx)) { _root.globaler.soundplay('spring'); _root.char.grav = Math.abs(_root.char.grav) * (1.4 + _root.char.mass / 100) + 10; _root.char.speed = _root.char.speed * (1.3 + _root.char.mass / 100) + 5; if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent._parent.xshadow.play(); _parent.play(); } } } } movieClip 1232 { } movieClip 1235 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && _root.char.grav < 0) { _root.char.grav = _root.char.grav * -1 * (1.2 + _root.char.mass / 100) + 5; _root.char.speed = _root.char.speed * (1.3 + _root.char.mass / 100) + 10; _root.globaler.soundplay('explode'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent._parent.xshadow._visible = false; _parent.gotoAndStop(5); } } } frame 4 { gotoAndPlay(1); } } movieClip 1240 { frame 12 { gotoAndPlay(1); } } movieClip 1241 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xb) && _root.char.grav > 0) { _root.char.grav = _root.char.grav * -1 * (1.3 + _root.char.mass / 100); _root.char.speed *= 1.1 + _root.char.mass / 100; _root.globaler.soundplay('bumper'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent.gotoAndPlay(13); } } } frame 12 { gotoAndPlay(1); } } movieClip 1243 { } movieClip 1245 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; var soundswitch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch && _global.shieldfocus != 1) { _root.char.grav /= 1.5 - _root.char.mass / 100; _root.char.speed /= 1.5 - _root.char.mass / 100; if (!soundswitch) { _root.globaler.soundplay('elecshiledfx'); soundswitch = true; } _root.char.action = 'hurt'; swatch = true; _parent.nextFrame(); } } } } movieClip 1247 { } movieClip 1249 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { _root.char.grav = _root.char.grav * -1 * (1.3 + _root.char.mass / 100); _root.char.speed *= 1.3 + _root.char.mass / 100; _root.globaler.soundplay('bumper'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } swatch = true; } } } } movieClip 1254 { } movieClip 1256 { } movieClip 1258 { } movieClip 1260 { } movieClip 1261 { frame 1 { stop(); } frame 11 { stop(); } } movieClip 1262 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx)) { _root.char.grav = Math.abs(_root.char.grav) * (1.3 + _root.char.mass / 100); _root.char.speed *= 1.3 + _root.char.mass / 100; _root.globaler.soundplay('explode'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent._parent.xshadow.play(); _parent.play(); } } } frame 11 { stop(); } } movieClip 1264 { } movieClip 1270 { frame 1 { stop(); } } movieClip 1272 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; var randshield = random(5) + 1; _parent.shields.gotoAndStop(randshield); } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx) && !swatch) { _root.char.grav = Math.abs(_root.char.grav) * (1.3 + _root.char.mass / 100) + 5; _root.char.speed = _root.char.speed * (1.3 + _root.char.mass / 100) + 5; _root.globaler.soundplay('tvbreak'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } if (randshield == 1) { _global.shieldfocus = 1; } else { if (randshield == 2) { _global.shieldfocus = 4; } else { if (randshield == 3) { _global.shieldfocus = 3; } else { if (randshield == 4) { _global.shieldfocus = 2; } else { if (randshield == 5) { _root.char.speed += 20; } } } } } swatch = true; _parent.gotoAndStop(2); } } } frame 2 { stop(); } } movieClip 1277 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx) && _root.char.grav < -5 && !swatch) { _root.char.grav = _root.char.grav * -1 / (1.3 + _root.char.mass / 100); _root.char.speed /= 1.3 + _root.char.mass / 100; _root.char.action = 'hurt'; swatch = true; } else { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx) && _root.char.grav < 0) { while (this.hitTest(_root.char.xx)) { _root.char._y -= 1; _root.char.grav = 0; } } } } } } movieClip 1278 { } movieClip 1280 { } movieClip 1282 { } movieClip 1283 { } movieClip 1284 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { if (_global.chars[_global.charselect].fly) { _root.char.action = 'fly'; _root.globaler.soundplay('intosky'); } swatch = true; } } } } movieClip 1289 { frame 1 { stop(); } } movieClip 1290 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx)) { _root.char.grav = Math.abs(_root.char.grav) * (1.5 + _root.char.mass / 100) + 20; _root.char.speed = _root.char.speed * (1.5 + _root.char.mass / 100) + 10; _root.globaler.soundplay('spring'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent._parent.xshadow.play(); _parent.play(); } } } } movieClip 1295 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && this.hitTest(_root.char.xx)) { _root.char.grav = Math.abs(_root.char.grav) * (1.3 + _root.char.mass / 100) + 10; _root.char.speed = _root.char.speed * (1.3 + _root.char.mass / 100) + 5; _root.globaler.soundplay('spring'); if (_global.shieldfocus == 5) { _root.char.speed += 5; } _parent._parent.xshadow.play(); _parent.play(); } } } } movieClip 1297 { } movieClip 1299 { instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch && _global.shieldfocus != 1) { _root.char.grav /= 1.5 - _root.char.mass / 100; _root.char.speed /= 1.5 - _root.char.mass / 100; _root.globaler.soundplay('thud'); _root.char.action = 'hurt'; swatch = true; } } } } movieClip 1302 { } movieClip 1303 { } movieClip 1306 { } movieClip 1307 { } movieClip 1308 { } movieClip 1309 { } movieClip 1310 { frame 1 { stop(); } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent._parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { swatch = true; _global.rings += 1; _root.globaler.soundplay('ring'); _root.char.ringscollected += 1; _parent._parent.xshadow._visible = false; _parent.gotoAndStop(2); } } } frame 2 { stop(); } } movieClip 1322 { } movieClip 1325 { } movieClip 1347 { frame 1 { stop(); } } movieClip 1348 { frame 1 { stop(); } instance obj of movieClip 1205 { onClipEvent (load) { this.gotoAndStop(random(5) + 1); } } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { _root.globaler.soundplay('upper'); _root.bgmaster.turn = true; _root.bgmaster.dir = 'left'; _root.bgmaster.saveitem = _parent.itemtag; swatch = true; } } } instance xx of movieClip 878 { onClipEvent (load) { var swatch = false; } onClipEvent (enterFrame) { if (_parent.triggerswitch && (this.hitTest(_root.char.xx) || this.hitTest(_root.char.xb)) && !swatch) { trace('HIT MAN DINGO!!'); _root.globaler.soundplay('downer'); _root.bgmaster.turn = true; _root.bgmaster.dir = 'right'; _root.bgmaster.saveitem = _parent.itemtag; swatch = true; } } } instance of movieClip 1310 { onClipEvent (load) { this._y -= 40 + random(80); this._x += random(20) - random(20); _parent.xshadow._x = this._x; var toglobal = newObject(); } onClipEvent (enterFrame) { if (_global.shieldfocus == 3) { toglobal = {'x': this._width / 2, 'y': this._height / 2}; this.localToGlobal(toglobal); if (_root.char._y - 10 > toglobal.y) { this._y += (_root.char._y - toglobal.y) / 5 + 5; } else { if (_root.char._y - 10 < toglobal.y) { this._y -= (toglobal.y - _root.char._y) / 5 - 5; } } } } } instance obj of movieClip 1347 { onClipEvent (load) { var rand = random(31) + 1; this.gotoAndStop(rand); _parent.xshadow.gotoAndStop(rand); } } } instance masteritem of movieClip 1348 { onClipEvent (load) { if (this._name != 'masteritem') { var ypos = this._y; var depthswap = false; var triggerswitch = false; var ringswitch; var decalswich; var itemtag; var isalive = 'imhere'; if (ringswitch == 'isdecal') { this.gotoAndStop('decal'); } else { if (ringswitch == 'isring') { this.gotoAndStop('ring'); } else { if (ringswitch != 'isring') { this.gotoAndStop(random(21) + 1); } } } this.xshadow._alpha = 40; } else { var faketimer = 0; var distcollect = 0; var madeother = false; var madeothercounter = 0; var disswitch = 1; } } onClipEvent (enterFrame) { if (this._name != 'masteritem') { if (this._y >= 250 && this._y <= 300) { triggerswitch = true; } else { triggerswitch = false; } i = 0; while (i < _global.notches) { if (ringswitch == 'isdecal') { if (this._X < 275) { this._x -= 2.5; } else { this._x += 2.5; } } if (ypos < -400) { ypos += 12; } else { if (ypos > -400 && ypos <= -385) { ypos += 12; } else { if (ypos > -385 && ypos <= -260) { ypos += 10; } else { if (ypos > -260 && ypos <= -200) { ypos += 8; } else { if (ypos > -200 && ypos <= -170) { ypos += 4; } else { if (ypos > -170 && ypos <= -150) { ypos += 2; } else { if (ypos > -150 && ypos <= 150) { ypos += 2; } else { if (ypos > 150 && ypos <= 170) { ypos += 4; } else { if (ypos > 170 && ypos <= 200) { ypos += 6; } else { if (ypos > 200 && ypos <= 260) { ypos += 8; } else { if (ypos > 260 && ypos <= 385) { ypos += 10; } else { if (ypos > 385 && ypos <= 400) { ypos += 12; } else { if (ypos > 400) { ypos += 12; } } } } } } } } } } } } } if (ypos >= 150 && ypos <= 450) { this._visible = true; this._y = ypos; this._yscale = 100 + (this._y - 149) / 1.5; this._xscale = this._yscale; this.xshadow._yscale = 30 + (this._y - 149) / 3; if (this._y >= 310 && !depthswap) { depthswap = true; this.swapDepths(this.getDepth() + 1000); } if (ypos >= 400 && ypos <= 450) { this._alpha -= 20; this.xshadow._alpha -= 5; } } else { if (itemtag == _global.itemsonstage) { _global.itemsonstage -= 1; } this.removeMovieClip(); this._visible = false; } ++i; } if (_global.nuke == true) { this.removeMovieClip(); } } else { if (_root.char.shot && !_root.char.ending && !_root.bgmaster.turn) { madeother = false; madeothercounter += 1; distcollect += _root.char.speed / 25; if (distcollect != 0 && Math.floor(distcollect % 15) == 0 && random(2) == 0) { _global.itemsonstage += 1; _global.itemlayers += 1; madeother = true; madeothercounter = 0; this.duplicateMovieClip('item' + _global.itemsonstage, _global.itemlayers); _root['item' + _global.itemsonstage]._y = 150; _root['item' + _global.itemsonstage].ringswitch = 'isring'; _root['item' + _global.itemsonstage].itemtag = _global.itemsonstage; _root['item' + _global.itemsonstage].isalive = 'imhere'; _root['item' + _global.itemsonstage]._visible = true; _root.itemrelayer(); } if (distcollect != 0 && Math.floor(distcollect % 19) == 0 && random(2) == 0) { _global.itemsonstage += 1; _global.itemlayers += 1; madeother = true; this.duplicateMovieClip('item' + _global.itemsonstage, _global.itemlayers); _root['item' + _global.itemsonstage]._y = 170; _root['item' + _global.itemsonstage].ringswitch = 'isdecal'; _root['item' + _global.itemsonstage].itemtag = _global.itemsonstage; _root['item' + _global.itemsonstage].isalive = 'imhere'; _root['item' + _global.itemsonstage]._visible = true; if (disswitch == 1) { _root['item' + _global.itemsonstage]._x = 80 + random(20) - random(20); disswitch = 2; } else { _root['item' + _global.itemsonstage]._x = 430 + random(20) - random(20); disswitch = 1; } } if (distcollect >= 50 && random(20) == 0) { distcollect = 0; madeother = true; madeothercounter = 0; _global.itemsonstage += 1; _global.itemlayers += 1; this.duplicateMovieClip('item' + _global.itemsonstage, _global.itemlayers); _root['item' + _global.itemsonstage]._y = 150; _root['item' + _global.itemsonstage].itemtag = _global.itemsonstage; _root['item' + _global.itemsonstage].isalive = 'imhere'; _root['item' + _global.itemsonstage]._visible = true; } if (!madeother) { _root.namerecycle(); } else { _root.itemrelayer(); } if (_global.itemlayers >= 900) { _global.itemlayers = 102; trace('rolling back the items layers'); } } } } } movieClip 1352 { } movieClip 1355 { } movieClip 1358 { } movieClip 1361 { } movieClip 1363 { instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; } } } movieClip 1366 { } movieClip 1369 { } movieClip 1372 { } movieClip 1375 { } movieClip 1378 { } movieClip 1381 { } movieClip 1382 { instance of movieClip 1352 { onClipEvent (load) { function useit() { if (this._visible) { if (_root.char.shot && !_root.char.ending && !used && _global.rings >= 10 && _parent._name != 'forcemenumaster') { used = true; _global.rings -= 10; _root.char.effect.gotoAndStop(3); _root.char.grav = -1 * (Math.abs(_root.char.grav) + 40); } } } _parent.offer4._visible = false; if (!_global.store[8].bought) { this._visible = false; } var used = false; var bounced = false; } onClipEvent (enterFrame) { if (this._visible) { if (used) { this._alpha = 30; _parent.offer4._visible = false; if (!bounced && _root.char.grav >= 0) { bounced = true; _root.char.effect.gotoAndStop(4); } } else { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { _parent.offer4._visible = true; } else { _parent.offer4._visible = false; } if (_global.rings < 10) { this._alpha = 30; } else { this._alpha = 100; } } } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { useit(); } } onClipEvent (keyDown) { if (Key.getCode() == 52) { useit(); } } } instance of movieClip 925 { onClipEvent (load) { function useit() { if (this._visible) { if (_root.char.shot && !_root.char.ending && !used && _global.rings >= 10 && _parent._name != 'forcemenumaster') { trace('using circle!' + _parent._name); used = true; _global.rings -= 10; _root.char.effect.gotoAndStop(6); _root.bgmaster.turn = true; if (random(2) == 0) { _root.bgmaster.dir = 'right'; } else { _root.bgmaster.dir = 'left'; } } } } _parent.offer1._visible = false; if (!_global.store[10].bought) { this._visible = false; } var used = false; } onClipEvent (enterFrame) { if (this._visible) { if (used) { this._alpha = 30; _parent.offer1._visible = false; } else { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { _parent.offer1._visible = true; } else { _parent.offer1._visible = false; } if (_global.rings < 10) { this._alpha = 30; } else { this._alpha = 100; } } } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { useit(); } } onClipEvent (keyDown) { if (Key.getCode() == 49) { useit(); } } } instance of movieClip 1355 { onClipEvent (load) { function useit() { if (this._visible) { if (_root.char.shot && !_root.char.ending && !used && _global.rings >= 10 && _parent._name != 'forcemenumaster') { used = true; _global.rings -= 10; _root.char.effect.gotoAndStop(1); trace(_root.char.speed); _root.char.speed += 100; trace(_root.char.speed); } } } _parent.offer2._visible = false; if (!_global.store[11].bought) { this._visible = false; } var used = false; } onClipEvent (enterFrame) { if (this._visible) { if (used) { this._alpha = 30; _parent.offer2._visible = false; } else { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { _parent.offer2._visible = true; } else { _parent.offer2._visible = false; } if (_global.rings < 10) { this._alpha = 30; } else { this._alpha = 100; } } } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { useit(); } } onClipEvent (keyDown) { if (Key.getCode() == 50) { useit(); } } } instance of movieClip 1358 { onClipEvent (load) { function useit() { if (this._visible) { if (_root.char.shot && !_root.char.ending && !used && _global.rings >= 10 && (_global.chars[_global.charselect].fly || _global.shieldfocus == 6) && _parent._name != 'forcemenumaster') { used = true; _global.rings -= 10; _root.char.effect.gotoAndStop(5); if (_root.char.action != 'fly') { _root.char.action = 'fly'; } else { _root.char.action = 'spin'; } } } } _parent.offer6._visible = false; if (!_global.store[12].bought) { this._visible = false; } var used = false; } onClipEvent (enterFrame) { if (this._visible) { if (used || !(_global.chars[_global.charselect].fly || _global.shieldfocus == 6)) { this._alpha = 30; _parent.offer6._visible = false; } else { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { _parent.offer6._visible = true; } else { _parent.offer6._visible = false; } if (_global.rings < 10) { this._alpha = 30; } else { this._alpha = 100; } } } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { useit(); } } onClipEvent (keyDown) { if (Key.getCode() == 54) { useit(); } } } instance of movieClip 1361 { onClipEvent (load) { function useit() { if (this._visible) { if (_root.char.shot && !_root.char.ending && !used && _global.rings >= 10 && _parent._name != 'forcemenumaster') { used = true; _global.rings -= 10; _root.char.effect.gotoAndStop(2); _root.char.grav = Math.abs(_root.char.grav) + 25; } } } _parent.offer3._visible = false; if (!_global.store[9].bought) { this._visible = false; } var used = false; } onClipEvent (enterFrame) { if (this._visible) { if (used) { this._alpha = 30; _parent.offer3._visible = false; } else { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { _parent.offer3._visible = true; } else { _parent.offer3._visible = false; } if (_global.rings < 10) { this._alpha = 30; } else { this._alpha = 100; } } } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { useit(); } } onClipEvent (keyDown) { if (Key.getCode() == 51) { useit(); } } } instance of movieClip 1174 { onClipEvent (load) { function useit() { if (this._visible) { if (!_root.char.shot && !_root.char.ending && !used && _global.rings >= 10 && _parent._name != 'forcemenumaster') { used = true; _global.rings -= 10; _root.cannon.kegboost.gotoAndPlay(1); _root.cannon.power = 150; } } } _parent.offer5._visible = false; if (!_global.store[13].bought) { this._visible = false; } var used = false; } onClipEvent (enterFrame) { if (this._visible) { if (used) { this._alpha = 30; _parent.offer5._visible = false; } else { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { _parent.offer5._visible = true; } else { _parent.offer5._visible = false; } if (_global.rings < 10) { this._alpha = 30; } else { this._alpha = 100; } } } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { useit(); } } onClipEvent (keyDown) { if (Key.getCode() == 53) { useit(); } } } } instance forcemenumaster of movieClip 1382 { onClipEvent (load) { function backup() { this._x -= 5; if (this._x < -60) { this._x = -60; } } if (this._name != 'forcemenumaster') { startx = this._x; } else { this.duplicateMovieClip('forcemenu', 1999); this._visible = false; this._x = -300; } } onClipEvent (enterFrame) { if (this._name != 'forcemenumaster') { if (_global.nuke == true) { this.removeMovieClip(); } if (!_root.char.shot) { this._x = startx; } else { if (_root.char.ending) { backup(); } else { if (_root._xmouse > 75) { backup(); } else { this._x += 5; if (this._x > startx) { this._x = startx; } } } } } } } movieClip 1386 { } instance highboxmaster of movieClip 1386 { onClipEvent (load) { this.highbox = 0; this.highbox = ''; this._alpha = 0; } onClipEvent (enterFrame) { if (_root.char.shot) { if (_root.char._y < -20) { this.highbox = Math.floor(Math.abs(_root.char._y)); if (this._alpha < 75) { this._alpha = this._alpha * 1.25 + 1; } } else { if (_root.char._y >= 0) { this.highbox = ''; if (this._alpha > -20) { this._alpha = this._alpha / 1.25 - 1; } } } } } } movieClip 1388 { instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; } } } instance masterringsbox of movieClip 1388 { onClipEvent (load) { if (this._name == 'masterringsbox') { this.duplicateMovieClip('ringsbox', 2000); this._visible = false; } else { this.pricebox = _global.rings; } } onClipEvent (enterFrame) { if (this._name == 'masterringsbox') { } else { if (_global.nuke == true) { this.removeMovieClip(); } this.pricebox = _global.rings; } } } button 1389 { on (release) { _global.shieldfocus = _global.tempshieldfocus; _global.rings += Number(_root.endingmenu.ringsearned); _global.chars[_global.charselect].total += Math.floor(_root.char.distance); _global.nuke = true; _root.gotoAndPlay('resetmainmenu'); } } button 1390 { on (release) { _global.rings += Number(_root.endingmenu.ringsearned); _global.chars[_global.charselect].total += Math.floor(_root.char.distance); _global.nuke = true; _root.gotoAndPlay('restart'); } } button 1391 { on (release) { _global.shieldfocus = _global.tempshieldfocus; _global.submitdist = Math.floor(_root.char.distance); _global.rings += Number(_root.endingmenu.ringsearned); _global.chars[_global.charselect].total += Math.floor(_root.char.distance); _global.nuke = true; _root.gotoAndStop('submit'); } } movieClip 1410 { } movieClip 1415 { } instance masterend of movieClip 1415 { onClipEvent (load) { if (this._name == 'masterend') { this._visible = false; var faketimer = 0; var xdist = 0; var ydist = 0; } } onClipEvent (enterFrame) { if (this._name == 'masterend') { if (_root.char.ending) { faketimer += 1; if (faketimer == 20) { this.duplicateMovieClip('endingmenu', _root.getNextHighestDepth()); _root.endingmenu.eastdist = Math.floor(_root.char.eastdist) + ' '; _root.endingmenu.northdist = Math.floor(_root.char.northdist) + ' '; _root.endingmenu.westdist = Math.floor(_root.char.westdist) + ' '; _root.endingmenu.southdist = Math.floor(_root.char.southdist) + ' '; _root.endingmenu.distdist = Math.floor(_root.char.distance) + 'm '; xdist += _root.char.eastdist; xdist -= _root.char.westdist; ydist += _root.char.northdist; ydist -= _root.char.southdist; _root.endingmenu.truedist = Math.floor(Math.sqrt(Math.pow(xdist, 2) + Math.pow(ydist, 2))) + 'm '; _root.endingmenu.ringscollected = _root.char.ringscollected + ' '; _root.endingmenu.ringsearned = Math.round(_global.ringmultiplier * Math.floor(_root.char.distance) / 100) + ''; _root.endingmenu._visible = true; if (Math.floor(_root.char.distance) > _global.chars[_global.charselect].highscore) { _global.chars[_global.charselect].highscore = Math.floor(_root.char.distance); } else { _root.endingmenu.highscorebox._visible = false; } } } } else { if (_global.nuke == true) { this.removeMovieClip(); } } } } frame 1071 { function savefile(path) { var v4 = 0; var v5 = 0; var v3 = new Date(); localData = SharedObject.getLocal('sonicboom3cookie' + path); if (localData.data.statcode == undefined) { localData.data.startdate = v3.getFullYear() + '-' + v3.getMonth() + '-' + v3.getDate() + ' ~ ' + v3.getHours() + ':' + v3.getMinutes(); localData.data.statcode = 'started'; } i = 1; while (i <= 15) { if (!_global.chars[i].lock) { v4 += 1; } localData.data['char' + i + 'lock'] = _global.chars[i].lock; localData.data['char' + i + 'highscore'] = _global.chars[i].highscore; localData.data['char' + i + 'total'] = _global.chars[i].total; if (_global.store[i].bought) { v5 += 1; } localData.data['item' + i] = _global.store[i].bought; ++i; } i = 1; while (i <= 7) { localData.data['music' + i] = _global.musiclist[i]; ++i; } localData.data.music = _global.music; localData.data.soundfx = _global.soundfx; localData.data.soundfactor = _global.soundfactor; localData.data.quality = _root._quality; localData.data.minigameringsusedhighscore = _global.minigameringsusedhighscore; localData.data.secretcannon = _global.secretcannon; localData.data.rings = _global.rings; localData.data.chartotal = v4; localData.data.itemtotal = v5; localData.data.lastsave = v3.getFullYear() + '-' + v3.getMonth() + '-' + v3.getDate() + ' ~ ' + v3.getHours() + ':' + v3.getMinutes(); var v6 = localData.flush(); if (v6 == false || v6 == 'pending') { trace('cookie fail'); _root.loadpeak = 'Save fail in ' + path + '\n' + 'Please allow or increase local storage space for flash files (right click + settings)'; _root.globaler.soundplay('wrongring'); } else { _global.autosavepath = path; _root.loadpeak = 'Date Started : ' + localData.data.startdate + '\n' + 'Total Characters : ' + localData.data.chartotal + '\n' + 'Total Items : ' + localData.data.itemtotal + '\n' + 'Last Save : ' + localData.data.lastsave + '\n' + '\n' + 'Save complete'; _root.globaler.soundplay('rightring'); } } function loadbrief(path) { var v2 = false; localData = SharedObject.getLocal('sonicboom3cookie' + path); trace('getting data'); if (localData.data.statcode == undefined) { trace('data missing ' + path); _root.loadpeak = 'No data found in ' + path; return v2; } trace('data found: ' + localData.data.statcode); v2 = true; _root.loadpeak = 'Date Started : ' + localData.data.startdate + '\n' + 'Total Characters : ' + localData.data.chartotal + '\n' + 'Total Items : ' + localData.data.itemtotal + '\n' + 'Last Save : ' + localData.data.lastsave; return v2; } _global.typelock = true; } button 1416 { on (release) { _global.nuke = true; _global.typelock = false; _root.gotoAndPlay('mastermenurestart'); } } button 1417 { on (release) { if (_root.customslotbox != 'Password' && _root.customslotbox != '') { _global.tempsavelocation = 'customslot_' + _root.customslotbox; loadbrief(_global.tempsavelocation); _root.clickhint._alpha = 100; } else { _root.loadpeak = 'Fill in a custom password box before pressing the custom load button.'; } } } button 1418 { on (release) { _global.tempsavelocation = 'slot3'; _root.clickhint._alpha = 100; loadbrief(_global.tempsavelocation); } } button 1419 { on (release) { _global.tempsavelocation = 'slot2'; _root.clickhint._alpha = 100; loadbrief(_global.tempsavelocation); } } button 1420 { on (release) { _global.tempsavelocation = 'slot1'; _root.clickhint._alpha = 100; loadbrief(_global.tempsavelocation); } } instance of movieClip 234 { onClipEvent (mouseDown) { if (_root.customslotbox == 'Password' && this.hitTest(_root._xmouse, _root._ymouse, true)) { _root.customslotbox = ''; } } } button 1421 { on (release) { _root.savefile(_global.tempsavelocation); } } movieClip 1434 { } movieClip 1435 { } instance clickhint of movieClip 1435 { onClipEvent (load) { this._alpha = 0; } onClipEvent (enterFrame) { if (this._alpha > 0) { this._alpha -= 5; } } } frame 1072 { function loadbrief(path) { var v3 = false; localData = SharedObject.getLocal('sonicboom3cookie' + path); trace('getting data'); if (localData.data.statcode == undefined) { trace('data missing ' + path); _root.loadpeakload = 'No data found in ' + path; return v3; } trace('data found: ' + localData.data.statcode); _global.loadeddata = true; v3 = true; _root.loadpeakload = 'Date Started : ' + localData.data.startdate + '\n' + 'Total Characters : ' + localData.data.chartotal + '\n' + 'Total Items : ' + localData.data.itemtotal + '\n' + 'Last Save : ' + localData.data.lastsave; return v3; } function loadfile(path) { localData = SharedObject.getLocal('sonicboom3cookie' + path); if (localData.data.statcode == undefined) { _root.globaler.soundplay('wrongring'); trace('data missing ' + path); loadeddata = false; _root.loadpeakload = 'Unable to load from ' + path + '\n' + 'Missing data'; } else { _root.globaler.soundplay('rightring'); i = 1; while (i <= 15) { _global.chars[i].lock = localData.data['char' + i + 'lock']; _global.chars[i].highscore = localData.data['char' + i + 'highscore']; _global.chars[i].total = localData.data['char' + i + 'total']; _global.store[i].bought = localData.data['item' + i]; ++i; } _global.rings = localData.data.rings; i = 1; while (i <= 7) { _global.musiclist[i] = localData.data['music' + i]; ++i; } _global.music = localData.data.music; _global.soundfx = localData.data.soundfx; _global.soundfactor = localData.data.soundfactor; _root._quality = localData.data.quality; _global.minigameringsusedhighscore = localData.data.minigameringsusedhighscore; _global.secretcannon = localData.data.secretcannon; _root.loadpeakload += '\n\nLoad successful'; _global.autosavepath = path; loadeddata = true; } } _global.typelock = true; } button 1438 { on (release) { trace(_root.loadeddata); _global.nuke = true; _global.typelock = false; if (!_global.loadeddata) { _root.gotoAndStop('startmenu'); } else { if (_global.loadeddata) { _root.gotoAndPlay('resetmainmenu'); } } } } button 1439 { on (release) { if (_root.customslotbox != 'Password' && _root.customslotbox != '') { _global.tempsavelocation = 'customslot_' + _root.customslotbox; if (loadbrief(_global.tempsavelocation)) { _root.clickhint._alpha = 100; } } else { _root.loadpeakload = 'Fill in a custom password box before pressing the custom load button.'; } } } button 1440 { on (release) { _global.tempsavelocation = 'slot3'; if (loadbrief(_global.tempsavelocation)) { _root.clickhint._alpha = 100; } } } button 1441 { on (release) { _global.tempsavelocation = 'slot2'; if (loadbrief(_global.tempsavelocation)) { _root.clickhint._alpha = 100; } } } button 1442 { on (release) { _global.tempsavelocation = 'slot1'; if (loadbrief(_global.tempsavelocation)) { _root.clickhint._alpha = 100; } } } instance of movieClip 234 { onClipEvent (mouseDown) { if (_root.customslotbox == 'Password' && this.hitTest(_root._xmouse, _root._ymouse, true)) { _root.customslotbox = ''; } } } button 1443 { on (release) { if (_global.tempsavelocation != undefined) { _root.loadfile(_global.tempsavelocation); } } } instance clickhint of movieClip 1435 { onClipEvent (load) { this._alpha = 0; } onClipEvent (enterFrame) { if (this._alpha > 0) { this._alpha -= 3; } } } frame 1076 { _global.nuke = false; } button 1451 { on (release) { if (_global.rings >= _global.store[_global.storemenufocus].price && !_global.store[_global.storemenufocus].bought) { _global.store[_global.storemenufocus].bought = true; _global.rings -= _global.store[_global.storemenufocus].price; _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } } } movieClip 1458 { frame 1 { stop(); } } instance of movieClip 1458 { onClipEvent (load) { this.gotoAndStop(4); } onClipEvent (enterFrame) { if (_global.store[_global.storemenufocus].bought) { this.gotoAndStop(2); } else { if (_global.rings >= _global.store[_global.storemenufocus].price && !_global.store[_global.storemenufocus].bought) { this.gotoAndStop(1); } else { if (_global.rings < _global.store[_global.storemenufocus].price && !_global.store[_global.storemenufocus].bought) { this.gotoAndStop(3); } } } } } button 1459 { on (release) { _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } button 1461 { on (release, keyPress '<Right>') { i = 1; while (i <= 15) { _root['char' + i].lastpos -= 1; if (_root['char' + i].lastpos <= 0) { _root['char' + i].lastpos = 15; } ++i; } } } button 1462 { on (release, keyPress '<Left>') { i = 1; while (i <= 15) { _root['char' + i].lastpos += 1; if (_root['char' + i].lastpos > 15) { _root['char' + i].lastpos = 1; } ++i; } } } movieClip 1463 { } movieClip 1470 { } instance mastermenuchar of movieClip 1470 { onClipEvent (load) { var localfocus = 0; var sheame = new Object(); sheame = {'ra': '0', 'rb': '0', 'ga': '0', 'gb': '0', 'ba': '0', 'bb': '0', 'aa': '100', 'ab': '0'}; var sheama = new Color(this); if (this._name == 'mastermenuchar') { i = 1; while (i <= 15) { localfocus = i - _global.menufocus + 1; if (localfocus <= 0) { localfocus = 15 + localfocus; } this.duplicateMovieClip('char' + i, _global.menupoints[localfocus][3]); _root['char' + i]._x = _global.menupoints[localfocus][0]; _root['char' + i]._y = _global.menupoints[localfocus][1]; _root['char' + i]._xscale = _global.menupoints[localfocus][2]; _root['char' + i]._yscale = _global.menupoints[localfocus][2]; _root['char' + i].tag = i; _root['char' + i].lastpos = localfocus; ++i; } this._visible = false; } else { var lastpos; this.gotoAndStop(tag); if (!_global.store[tag].bought) { sheama.setTransform(sheame); } } } onClipEvent (enterFrame) { if (this._name != 'mastermenuchar') { if (_global.nuke) { this.removeMovieClip(); } if (lastpos == 1) { _global.storemenufocus = tag; } this.gotoAndStop(tag); if (!_global.store[tag].bought) { sheama.setTransform(sheame); } else { sheame = {'ra': '100', 'rb': '0', 'ga': '100', 'gb': '0', 'ba': '100', 'bb': '0', 'aa': '100', 'ab': '0'}; sheama.setTransform(sheame); } if (_global.menupoints[lastpos][0] != this._x) { this._x -= (this._x - _global.menupoints[lastpos][0]) / 10; } if (_global.menupoints[lastpos][1] != this._y) { this._y -= (this._y - _global.menupoints[lastpos][1]) / 10; } if (_global.menupoints[lastpos][2] != this._xscale) { this._xscale -= (this._xscale - _global.menupoints[lastpos][2]) / 10; this._yscale = this._xscale; } if (this.getDepth != _global.menupoints[lastpos][3]) { this.swapDepths(_global.menupoints[lastpos][3]); } } } } instance of movieClip 1388 { onClipEvent (load) { this._alpha = 0; this.pricebox = ''; this.pricebox._alpha = 0; } onClipEvent (enterFrame) { if (!_global.store[_global.storemenufocus].bought) { if (this._alpha < 100) { this._alpha += this._alpha + 1; this.pricebox._alpha = this._alpha; } this.pricebox = _global.store[_global.storemenufocus].price + ' '; } else { this._alpha = 0; this.pricebox = ''; this.pricebox._alpha = 0; } } } instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; } } movieClip 1504 { } instance of movieClip 1504 { onClipEvent (enterFrame) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { gotoAndStop(1075); } else { this.gotoAndStop(_global.storemenufocus); } } } frame 1077 { _global.nuke = false; } button 1507 { on (release) { _global.shieldfocus = 7; _global.nuke = true; _root.gotoAndPlay('mastermenurestart'); } } button 1508 { on (release, keyPress '<Right>') { i = 1; while (i <= 15) { _root['char' + i].lastpos -= 1; if (_root['char' + i].lastpos <= 0) { _root['char' + i].lastpos = 7; } ++i; } } } button 1509 { on (release, keyPress '<Left>') { i = 1; while (i <= 15) { _root['char' + i].lastpos += 1; if (_root['char' + i].lastpos > 7) { _root['char' + i].lastpos = 1; } ++i; } } } button 1510 { on (release) { if (!_global.store[_global.shieldfocus].bought || tag == 7) { _global.shieldfocus = 7; } _global.nuke = true; gotoAndPlay('mastermenurestart'); } } movieClip 1514 { } instance of movieClip 1514 { onClipEvent (enterFrame) { this.gotoAndStop(_global.shieldfocus); } } instance mastermenuchar of movieClip 701 { onClipEvent (load) { var localfocus = 0; if (this._name == 'mastermenuchar') { i = 1; while (i <= 7) { localfocus = i - _global.shieldfocus + 1; if (localfocus <= 0) { localfocus = 7 + localfocus; } this.duplicateMovieClip('char' + i, i); _root['char' + i]._x = _global.shieldmenupoints[localfocus][0]; _root['char' + i]._y = _global.shieldmenupoints[localfocus][1]; _root['char' + i].tag = i; _root['char' + i].lastpos = localfocus; ++i; } this._visible = false; } else { var lastpos; this.gotoAndStop(tag); if (!_global.store[tag].bought && tag != 7) { this._alpha = 30; } } } onClipEvent (enterFrame) { if (this._name != 'mastermenuchar') { if (_global.nuke) { this.removeMovieClip(); } if (lastpos == 1) { _global.shieldfocus = tag; } this.gotoAndStop(tag); if (_global.shieldmenupoints[lastpos][0] != this._x) { this._x -= (this._x - _global.shieldmenupoints[lastpos][0]) / 10; } if (_global.shieldmenupoints[lastpos][1] != this._y) { this._y -= (this._y - _global.shieldmenupoints[lastpos][1]) / 10; } } } } movieClip 1519 { } instance of movieClip 1519 { onClipEvent (enterFrame) { if (!_global.store[_global.shieldfocus].bought && _global.shieldfocus != 7) { this.gotoAndStop(2); } else { this.gotoAndStop(1); } } } instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; } } button 1523 { on (release) { _global.nuke = true; _root.gotoAndStop('musicoptions'); } } movieClip 1525 { frame 1 { stop(); } frame 15 { stop(); } } instance of movieClip 1525 { onClipEvent (load) { if (!_global.music) { this.gotoAndStop(15); } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true) && (this._currentframe == 1 || this._currentframe == 15)) { this.play(); _global.music = !_global.music; } } } instance of movieClip 1525 { onClipEvent (load) { if (!_global.soundfx) { this.gotoAndStop(15); } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true) && (this._currentframe == 1 || this._currentframe == 15)) { this.play(); _global.soundfx = !_global.soundfx; } } } button 1528 { on (press) { startDrag(this, true, startx, this._y, startx + 200, this._y); } on (release, rollOut) { stopDrag(); } } movieClip 1530 { } instance of movieClip 1530 { onClipEvent (load) { this._x = 198; var startx = this._x; this.tage = _global.soundfactor + '%'; this._x = startx + 2 * _global.soundfactor; } onClipEvent (enterFrame) { this.tage = Math.floor((this._x - startx) / 2) + '%'; _global.soundfactor = Math.floor((this._x - startx) / 2); } } button 1542 { on (press) { if (_root._quality != 'HIGH') { play(); } _root._quality = 'HIGH'; } } button 1543 { on (press) { if (_root._quality != 'MEDIUM') { play(); } _root._quality = 'MEDIUM'; } } button 1544 { on (press) { if (_root._quality != 'LOW') { play(); } _root._quality = 'LOW'; } } movieClip 1545 { frame 1 { if (_root._quality == 'HIGH') { stop(); } } frame 16 { if (_root._quality == 'MEDIUM') { stop(); } } frame 31 { if (_root._quality == 'LOW') { stop(); } } frame 46 { if (_root._quality == 'MEDIUM') { stop(); } } } instance of movieClip 1545 { onClipEvent (load) { if (_root._quality == 'HIGH') { this.gotoAndStop(1); } else { if (_root._quality == 'MEDIUM') { this.gotoAndStop(16); } else { if (_root._quality == 'LOW') { this.gotoAndStop(31); } } } } } button 1549 { on (release) { trace(num); _global.musiclist[num] = false; this.nextFrame(); } } button 1551 { on (release) { trace(num); _global.musiclist[num] = true; this.prevFrame(); } } movieClip 1552 { frame 1 { stop(); } } instance of movieClip 1552 { onClipEvent (load) { var num = 1; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } instance of movieClip 1552 { onClipEvent (load) { var num = 2; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } instance of movieClip 1552 { onClipEvent (load) { var num = 3; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } instance of movieClip 1552 { onClipEvent (load) { var num = 4; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } instance of movieClip 1552 { onClipEvent (load) { var num = 5; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } movieClip 1555 { } instance of movieClip 1555 { onClipEvent (load) { if (!_global.store[14].bought) { this._visible = false; _root.ss1._visible = false; } } } instance ss1 of movieClip 1552 { onClipEvent (load) { var num = 6; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } movieClip 1558 { } instance of movieClip 1558 { onClipEvent (load) { if (!_global.store[15].bought) { this._visible = false; _root.ss2._visible = false; } } } instance ss2 of movieClip 1552 { onClipEvent (load) { var num = 7; if (_global.musiclist[num] == true) { this.gotoAndStop(1); } else { this.gotoAndStop(2); } } } frame 1082 { _global.typelock = true; } instance of movieClip 234 { onClipEvent (load) { _root.username = _global.namesave; _root.distvar = _global.submitdist; _root.charvar = _global.chars[_global.charselect].charname; _root.commentvar = ''; } } button 1565 { on (release) { _global.nuke = true; _global.typelock = false; _root.gotoAndPlay('resetmainmenu'); } } button 1566 { on (release) { _global.namesave = _root.username; var sendtext = ''; sendtext = _root.username; i = _root.username.length; while (i <= 16) { sendtext += ' '; ++i; } sendtext += _root.charvar; i = _root.charvar.length; while (i <= 16) { sendtext += ' '; ++i; } var curdate = new Date(); sendtext += _root.distvar + ''; var fixme = _root.distvar + ''; trace(fixme.length); i = fixme.length; while (i <= 9) { sendtext += ' '; ++i; } sendtext += curdate.toString() + '\t' + _root.commentvar; var stringtowrite = sendtext; if (_root.username != '' && _root.username != 'Name') { getURL('http://jtcoflash.com/sonicboom.php', '_blank', 'POST'); _root.gotoAndStop('feedbacksubmit'); _global.nuke = true; _global.typelock = false; _root.gotoAndPlay('restart'); _root.globaler.soundplay('rightring'); } else { _root.globaler.soundplay('wrongring'); } trace(sendtext); } } frame 1083 { _global.minigameitemsonstage = 0; _global.nuke = false; _global.ringsgoingin = _global.rings; stop(); } button 1572 { on (release) { _root.gotoAndPlay('resetmainmenu'); } } button 1573 { on (release) { _root.nextFrame(); } } movieClip 1582 { } movieClip 1584 { } movieClip 1586 { } movieClip 1589 { } movieClip 1590 { instance metal of movieClip 1582 { onClipEvent (enterFrame) { if (_root.pinky.armchar == this._name || _root.pinky.ending == 3) { this._visible = false; } else { this._visible = true; } } } instance knux of movieClip 1584 { onClipEvent (enterFrame) { if (_root.pinky.armchar == this._name || _root.pinky.ending == 3) { this._visible = false; } else { this._visible = true; } } } instance tailsdoll of movieClip 1586 { onClipEvent (enterFrame) { if (_root.pinky.armchar == this._name || _root.pinky.ending == 3) { this._visible = false; } else { this._visible = true; } } } } movieClip 1592 { } button 1593 { on (release) { _root.prevFrame(); } } movieClip 1609 { frame 11 { stop(); } } movieClip 1611 { } movieClip 1615 { frame 1 { stop(); } } movieClip 1621 { frame 6 { stop(); } } movieClip 1623 { } movieClip 1625 { } movieClip 1627 { } movieClip 1628 { } movieClip 1630 { } movieClip 1633 { frame 1 { stop(); } } movieClip 1634 { } movieClip 1636 { } movieClip 1638 { } movieClip 1642 { instance glowball of movieClip 1636 { onClipEvent (load) { this._visible = false; var goer = new Object(); goer.x = this._x; goer.y = this._y; this.localToGlobal(goer); trace(this._x + ' ' + this._y + ' ' + goer.x + ' ' + goer.y); _root.fireshot('bullet', 'shell', goer.x, goer.y); } } } movieClip 1647 { instance glowball of movieClip 1636 { onClipEvent (load) { this._visible = false; var goer = new Object(); goer.x = this._x; goer.y = this._y; this.localToGlobal(goer); trace(this._x + ' ' + this._y + ' ' + goer.x + ' ' + goer.y); _root.fireshot('bullet', 'laser', goer.x, goer.y); } } } movieClip 1652 { } movieClip 1653 { instance glowball of movieClip 1636 { onClipEvent (load) { this._visible = false; var goer = new Object(); goer.x = this._x; goer.y = this._y; this.localToGlobal(goer); trace(this._x + ' ' + this._y + ' ' + goer.x + ' ' + goer.y); _root.fireshot('bullet', 'cresentmoon', goer.x, goer.y); } } } movieClip 1654 { frame 1 { stop(); } instance glowball of movieClip 1636 { onClipEvent (load) { this._visible = false; } } } movieClip 1656 { } movieClip 1658 { } movieClip 1659 { frame 1 { stop(); } instance of movieClip 1638 { onClipEvent (enterFrame) { if (_root.char.ylocal > _root.pinky.ylocal + 70 - 20 && _root.char.ylocal < _root.pinky.ylocal + 70 + 35) { if (!_root.char.hurtswitch && this.hitTest(_root.char.a1)) { _root.char.hurtswitch = true; _root.globaler.soundplay('sonichurt' + (random(5) + 1)); _root.fireshot('effect', 'hit' + (random(4) + 1), _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); _root.fireshot('effect', 'ring', _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); _parent.nextFrame(); } } } } instance of movieClip 1654 { onClipEvent (enterFrame) { this.gotoAndStop(_root.pinky.armchar + _root.pinky.armcharstate); if (_root.pinky._x - 120 < _root.char._x) { this._xscale = -100; } else { this._xscale = 100; } } } instance of movieClip 1656 { onClipEvent (load) { var faketimer = 0; } onClipEvent (enterFrame) { faketimer += 1; if (faketimer >= 25) { faketimer = 0; _parent.prevFrame(); } } } instance of movieClip 1658 { onClipEvent (enterFrame) { if (_root.char.ylocal > _root.pinky.ylocal + 70 - 20 && _root.char.ylocal < _root.pinky.ylocal + 70 + 35) { if (!_root.char.hurtswitch && this.hitTest(_root.char.a1)) { _root.char.hurtswitch = true; _root.globaler.soundplay('sonichurt' + (random(5) + 1)); _root.fireshot('effect', 'hit' + (random(4) + 1), _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); _root.fireshot('effect', 'ring', _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); } } } } } movieClip 1660 { frame 1 { stop(); } instance glowball of movieClip 1636 { onClipEvent (load) { this._visible = false; } } frame 13 { _root.pinky.haslaunch = 2; stop(); } frame 24 { _root.pinky.haslaunch += 3; stop(); } frame 36 { _root.pinky.haslaunch = 2; stop(); } frame 48 { _root.pinky.haslaunch += 3; stop(); } frame 63 { _root.pinky.haslaunch = 2; stop(); } frame 75 { _root.pinky.haslaunch = 0; _root.pinky.armchar = 'blank'; _root.pinky.armcharstate = ''; } frame 76 { stop(); } frame 82 { } frame 139 { gotoAndPlay('swing'); } } movieClip 1661 { frame 1 { _root.pinky.leg1.foot.gotoAndStop(1); _root.pinky.leg2.foot.gotoAndStop(1); stop(); } frame 27 { _root.pinky.leg1.foot.gotoAndStop(2); _root.pinky.leg2.foot.gotoAndStop(2); _root.pinky.jumpswitch = 3; stop(); } frame 28 { _root.globaler.soundplay('explode'); } frame 30 { _root.globaler.soundplay('explode'); } frame 32 { _root.globaler.soundplay('explode'); } frame 34 { _root.globaler.soundplay('explode'); } frame 36 { _root.globaler.soundplay('explode'); } frame 38 { _root.globaler.soundplay('explode'); } frame 41 { _root.globaler.soundplay('explode'); } frame 82 { stop(); _root.pinky.ending = 3; } instance hut of movieClip 1590 { onClipEvent (load) { this.tailsdoll._visible = false; this.metalsonic._visible = false; this.metalknux._visible = false; } onClipEvent (enterFrame) { if (_root.char.ylocal > _root.pinky.ylocal + 70 - 20 && _root.char.ylocal < _root.pinky.ylocal + 70 + 30) { if (this.hitTest(_root.char.a2) || this.hitTest(_root.char.a3)) { _root.pinky.nextFrame(); } } } } instance glowball of movieClip 1636 { onClipEvent (load) { this._visible = false; var goer = new Object(); goer.x = this._x; goer.y = this._y; this.localToGlobal(goer); trace('monster spawner ' + this._x + ' ' + this._y + ' ' + goer.x + ' ' + goer.y); _root.spawnchar('metal', goer.x, goer.y + 100, 1); _root.spawnchar('knux', goer.x - 20, goer.y + 100 + 10, 2); _root.spawnchar('doll', goer.x + 20, goer.y + 100 + 10, 3); } } frame 83 { _root.globaler.soundplay('explode'); } } movieClip 1665 { } movieClip 1668 { } movieClip 1669 { frame 20 { _root.globaler.soundplay('birdcall'); } frame 75 { stop(); } frame 95 { _root.globaler.soundplay('birdcall'); } frame 150 { stop(); } frame 170 { _root.globaler.soundplay('bigbell'); } frame 225 { stop(); } frame 245 { _root.globaler.soundplay('bigbell'); } frame 300 { stop(); } } movieClip 1671 { } movieClip 1672 { instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(1); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(2); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(3); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(4); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(5); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(6); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(7); } } frame 21 { _root.globaler.soundplay('turningsuper'); stop(); } instance of movieClip 1671 { onClipEvent (load) { var timedate = new Date(); var minute = timedate.getHours(); if (minute < 6) { _parent._parent.gotoAndStop('moon'); } else { if (minute < 12) { _parent._parent.gotoAndStop('sunrise'); } else { if (minute < 18) { _parent._parent.gotoAndStop('sun'); } else { if (minute <= 23) { _parent._parent.gotoAndStop('sunset'); } } } } } } } movieClip 1684 { frame 29 { stop(); gotoAndPlay(25); } } movieClip 1700 { frame 29 { stop(); } } movieClip 1713 { frame 29 { stop(); gotoAndPlay(25); } } movieClip 1729 { frame 29 { stop(); } } movieClip 1730 { frame 1 { stop(); } } movieClip 1731 { instance core of movieClip 657 { onClipEvent (load) { this.gotoAndStop(_global.secretcannon); } onClipEvent (enterFrame) { this.gotoAndStop(_global.secretcannon); } } frame 172 { _root.globaler.soundplay('explode'); } frame 243 { _root.globaler.soundplay('sonichurt4'); } frame 246 { _root.globaler.soundplay('explode'); } instance masterpinky of movieClip 1661 { onClipEvent (load) { this.arm.gotoAndStop(24); } } instance of movieClip 1669 { onClipEvent (load) { var timedate = new Date(); var minute = timedate.getHours(); if (minute < 6) { this.gotoAndPlay('moon'); } else { if (minute < 12) { this.gotoAndPlay('sunrise'); } else { if (minute < 18) { this.gotoAndPlay('sun'); } else { if (minute <= 23) { this.gotoAndPlay('sunset'); } } } } } } frame 596 { _root.nextFrame(); } } instance of movieClip 1731 { onClipEvent (enterFrame) { if (Key.isDown(32)) { _root.nextFrame(); } } } frame 1086 { function fireshot(shottype, specific, xin, yin) { _global.minigameitemsonstage += 1; if (shottype == 'bullet') { _root.bulletmaster.duplicateMovieClip('shot' + _global.minigameitemsonstage, _root.getNextHighestDepth()); } else { if (shottype == 'effect') { _root.effectsmaster.duplicateMovieClip('shot' + _global.minigameitemsonstage, _root.getNextHighestDepth()); } } _root['shot' + _global.minigameitemsonstage].gotoAndStop(specific); _root['shot' + _global.minigameitemsonstage].bullettype = specific; _root['shot' + _global.minigameitemsonstage].shottype = shottype; _root['shot' + _global.minigameitemsonstage]._x = xin; _root['shot' + _global.minigameitemsonstage]._y = yin; if (specific == 'ring') { if (_global.rings > 0) { _global.rings -= 1; } } if (_global.minigameitemsonstage >= 100) { _global.minigameitemsonstage = 0; } } function spawnchar(inname, xin, yin, id) { _root.masterenemy.duplicateMovieClip('enemy' + id, _root.getNextHighestDepth()); _root['enemy' + id]._x = xin; _root['enemy' + id]._y = yin; _root['enemy' + id].char = inname; } stop(); } movieClip 1741 { } movieClip 1743 { } movieClip 1744 { } movieClip 1752 { frame 13 { stop(); } } movieClip 1755 { } movieClip 1758 { } movieClip 1759 { frame 10 { stop(); } } movieClip 1761 { } movieClip 1770 { } movieClip 1775 { } movieClip 1784 { } movieClip 1794 { } movieClip 1800 { } movieClip 1804 { } movieClip 1813 { } movieClip 1824 { frame 15 { stop(); } } movieClip 1832 { } movieClip 1834 { } movieClip 1835 { } movieClip 1837 { } movieClip 1842 { } movieClip 1847 { instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(1); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(2); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(3); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(4); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(5); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(6); } } instance em of movieClip 656 { onClipEvent (load) { this.gotoAndStop(7); } } frame 10 { stop(); } } movieClip 1855 { frame 56 { stop(); } } movieClip 1867 { frame 56 { stop(); } } movieClip 1868 { } instance masterchar of movieClip 1868 { onClipEvent (load) { if (this._name != 'masterchar') { var starty = 200; var lowery = 320; var yspeed = 0; var xspeed = 0; var ylocal = this._y; var xlocal = this._x; var scale = 1; var jumphieght = 0; var jumpy = 0; var timedate = new Date(); var minute = timedate.getHours(); var action = 'stand'; var char = 'super'; var jumpswitch = false; var hurtswitch = false; var attackswitch = false; var attack = 'standattack'; var hurttimer = 0; var faketimer = 0; var attacktimer = 0; var ending = 'set'; var exists = 'pie'; if (minute < 6) { char = 'darkspine'; } else { if (minute < 12) { char = 'excaliber'; } else { if (minute < 18) { char = 'super'; } else { if (minute <= 23) { char = 'werehog'; } } } } } else { this.duplicateMovieClip('char', 100); _root.char._x = 100; _root.char._y = 300; } } onClipEvent (enterFrame) { if (_global.nuke) { this.removeMovieClip(); } if (this._name != 'masterchar' && ending == 'set') { if ((!attackswitch || attackswitch && attack == 'dashattack') && !hurtswitch) { if (!jumpswitch) { if (Key.isDown(38)) { if (yspeed >= -10) { yspeed -= 2; } action = 'run'; } else { if (Key.isDown(40)) { if (yspeed <= 10) { yspeed += 2; } action = 'run'; } else { if (yspeed != 0) { yspeed += -1 * Math.abs(yspeed) / yspeed; action = 'run'; } } } } else { yspeed = 0; } if (Key.isDown(39)) { if (xspeed <= 20) { xspeed += 2; } action = 'run'; } else { if (Key.isDown(37)) { if (xspeed >= -20) { xspeed -= 2; } action = 'run'; } else { if (xspeed != 0) { xspeed += -1 * Math.abs(xspeed) / xspeed; action = 'run'; } } } if (xspeed > 0) { scale = 1; } else { if (xspeed < 0) { scale = -1; } else { if (xspeed == 0 && yspeed == 0) { action = 'stand'; } } } } if (Key.isDown(90)) { if (!attackswitch && !hurtswitch) { attackswitch = true; attacktimer = 0; if (Key.isDown(37) || Key.isDown(39)) { attack = 'dashattack'; } else { xspeed = 0; yspeed = 0; attack = 'standattack'; } } } if (Key.isDown(32)) { if (!jumpswitch && !hurtswitch) { jumpswitch = true; jumphieght = 15; jumpy = 0; } } if (jumpswitch) { if (!attackswitch && !hurtswitch) { action = 'jump'; } if (jumphieght <= -14) { jumphieght = 0; jumpswitch = false; if (hurtswitch) { action = 'hurt'; } else { if (attackswitch) { action = attack; } else { action = 'stand'; } } } else { jumphieght -= 1; jumpy += jumphieght; } } if (attackswitch) { attacktimer += 1; action = attack; if (attacktimer >= 20) { attackswitch = false; resettimers(); if (!jumpswitch) { action = 'stand'; } else { if (jumpswitch) { action = 'jump'; } } } } if (hurtswitch) { action = 'hurt'; hurttimer += 1; if (hurttimer >= 10) { resettimers(); hurttimer = 0; attacktimer = 0; hurtswitch = false; action = 'stand'; } } if (xlocal + xspeed > 525) { xspeed = 0; xlocal = 525; } if (xlocal + xspeed < 30) { xspeed = 0; xlocal = 30; } if (ylocal + yspeed < starty) { yspeed = 0; ylocal = starty; } if (ylocal + yspeed > lowery) { yspeed = 0; ylocal = lowery; } xlocal += xspeed; ylocal += yspeed; this._yscale = 200 + (ylocal - starty) / 2; this._xscale = scale * this._yscale; this._x = xlocal; this._y = ylocal - jumpy; this.gotoAndStop(char + action); } } } instance masterpinky of movieClip 1661 { onClipEvent (load) { if (this._name != 'masterpinky') { this.arm.gotoAndStop('blank'); this.hatch._visible = false; var armchar = 'blank'; var armcharstate = ''; var starty = 50; var lowery = 210; var ylocal = this._y; var xlocal = this._x; var jumptargetx = 0; var jumptargety = 0; var jumpy = 0; var scale = 1; var haslaunch = 0; var faketimer = 0; var armpos = 0; var jumpswitch = 0; var hp = 100; var hurtmul = 0; var hurttimer = 0; var parthit = ''; var sheama; var sheame = new Object(); sheame = {'ra': '100', 'rb': '140', 'ga': '100', 'gb': '140', 'ba': '100', 'bb': '140', 'aa': '100', 'ab': '0'}; var sheamme = new Object(); sheamme = {'ra': '100', 'rb': '0', 'ga': '100', 'gb': '0', 'ba': '100', 'bb': '0', 'aa': '100', 'ab': '0'}; var ending = false; var exists = 'pie'; } else { this.duplicateMovieClip('pinky', 101); _root.pinky._x = 400; _root.pinky._y = 200; } } onClipEvent (enterFrame) { if (_global.nuke) { this.removeMovieClip(); } if (this._name != 'masterpinky' && ending < 2) { if (_root.char.attackswitch && hurttimer == 0 && _root.char.ylocal > ylocal + 70 - 20 && _root.char.ylocal < ylocal + 70 + 35) { i = 1; while (i <= 4) { if (this['a' + i].hitTest(_root.char.a2)) { hurtmul = 2; } if (this['a' + i].hitTest(_root.char.a3)) { hurtmul = 1; } if (hurtmul != 0) { if (i == 1) { hp -= hurtmul * 1; parthit = 'leg2'; } else { if (i == 2) { hp -= hurtmul * 1; parthit = 'leg1'; } else { if (i == 3) { hp -= hurtmul * 3; parthit = 'hut'; } else { if (i == 4) { hp -= hurtmul * 2; parthit = 'hip'; } } } } trace('hp ' + hp); _root.globaler.soundplay('break'); hurttimer = 1; break; } ++i; } } else { if (hurttimer != 0) { hurttimer += 1; if (hurttimer % 3 == 0) { sheama = new Color(this); sheama.setTransform(sheame); } else { sheama = new Color(this); sheama.setTransform(sheamme); } if (hurttimer >= 22) { hurttimer = 0; hurtmul = 0; } } } if (haslaunch == 0 && random(50) == 1) { haslaunch = 1; armchar = random(4) + 1; if (armchar == 1) { armchar = 'blank'; armcharstate = ''; } else { if (armchar == 2) { armchar = 'metal'; armcharstate = 'stand'; } else { if (armchar == 3) { armchar = 'tailsdoll'; armcharstate = 'stand'; } else { if (armchar == 4) { armchar = 'knux'; armcharstate = 'stand'; } } } } this.arm.gotoAndPlay('launch'); } if (haslaunch == 2) { armpos = random(3) + 1; if (hp < 20) { haslaunch = 5; this.arm.gotoAndPlay('swing'); this.arm.claw.gotoAndStop(3); armchar = 'blank'; armcharstate = ''; } else { if (armpos == 1) { haslaunch = 3; this.arm.gotoAndPlay('upper'); if (armchar != 'blank') { armcharstate = 'attack'; } } else { if (armpos == 2) { haslaunch = 4; this.arm.gotoAndPlay('lower'); if (armchar != 'blank') { armcharstate = 'attack'; } } else { haslaunch = 10; this.arm.gotoAndPlay('launchreset'); } } } } if (random(100) == 1) { if (haslaunch == 6) { this.arm.gotoAndPlay('upperreset'); haslaunch = 9; if (armchar != 'blank') { armcharstate = 'stand'; } } else { if (haslaunch == 7) { this.arm.gotoAndPlay('lowerreset'); haslaunch = 9; if (armchar != 'blank') { armcharstate = 'stand'; } } } } if (jumpswitch == 0) { if (random(50) == 1) { jumpswitch = 1; jumpy = 0; } } if (jumpswitch == 1) { this.gotoAndPlay('jump'); jumphieght = 15; jumpswitch = 2; } if (jumpswitch == 3) { jumptargety = (_root.char.ylocal - this._y - 70) / 28; jumptargetx = (_root.char._x - this._x) / 28; jumpswitch = 4; } if (jumpswitch == 4) { if (jumphieght <= -14) { jumphieght = 0; jumpswitch = 0; jumptargetx = 0; jumptargety = 0; this.gotoAndStop('stand'); } else { jumphieght -= 1; jumpy += jumphieght; } } xlocal = this._x + jumptargetx; ylocal += jumptargety; if (ylocal > lowery) { ylocal = lowery; } else { if (ylocal < starty) { ylocal = starty; } } this._yscale = 100 + (ylocal - starty) / 2; this._xscale = scale * this._yscale; this._y = ylocal - jumpy; this._x = xlocal; if (hp <= 0 && ending == 0 && jumpswitch == 0) { ending = 1; } else { if (ending == 1) { ending = 2; sheama = new Color(this); sheama.setTransform(sheamme); this.gotoAndPlay('explode'); this.arm.gotoAndPlay('launchreset'); this.arm.claw.gotoAndStop(3); } } } } } movieClip 1871 { } movieClip 1877 { frame 7 { gotoAndPlay(3); } } movieClip 1888 { frame 8 { gotoAndPlay(4); } } movieClip 1891 { } movieClip 1896 { } movieClip 1901 { } movieClip 1904 { } movieClip 1909 { } movieClip 1918 { frame 11 { stop(); } } movieClip 1919 { frame 1 { stop(); } } movieClip 1926 { } movieClip 1932 { frame 11 { stop(); } } movieClip 1942 { frame 24 { stop(); } } movieClip 1947 { frame 13 { stop(); } } movieClip 1950 { } movieClip 1952 { } movieClip 1953 { } instance masterenemy of movieClip 1953 { onClipEvent (load) { if (this._name != 'masterenemy') { var starty = 200; var lowery = 320; var yspeed = 0; var xspeed = 0; var ylocal = this._y; var xlocal = this._x; var scale = 1; var jumphieght = 0; var jumpy = 0; var action = 'stand'; var char; var jumpswitch = false; var hurtswitch = false; var attackswitch = false; var attack = 'standattack'; var hurttimer = 0; var faketimer = 0; var attacktimer = 0; var exists = 'pie'; var targetx = 'set'; var targety = 'set'; var pauserimer = 0; var priority = 2; var hp = 40; var ending = false; } } onClipEvent (enterFrame) { if (_global.nuke) { this.removeMovieClip(); } if (this._name != 'masterenemy' && !ending) { if ((!attackswitch || attackswitch && attack == 'dashattack') && !hurtswitch) { if (targetx == 'set' && targety == 'set' && !attackswitch) { if (pausetimer == 0) { if (random(4) == 0) { targetx = random(450) + 50; targety = random(lowery - starty) + starty; } else { if (random(2) == 0 && !jumpswitch) { xspeed = 0; yspeed = 0; pausetimer = 1; } else { targetx = _root.char._x; targety = _root.char.ylocal; } } } else { pausetimer += 1; if (_root.char._x > this._x) { scale = 1; } else { scale = -1; } if (pausetimer >= 10 + random(6)) { pausetimer = 0; } } } if (!jumpswitch) { if (targety < ylocal && targety != 'set') { if (yspeed >= -10) { yspeed -= 2; } action = 'run'; } else { if (targety > ylocal && targety != 'set') { if (yspeed <= 10) { yspeed += 2; } action = 'run'; } else { if (yspeed != 0) { yspeed += -1 * Math.abs(yspeed) / yspeed; action = 'run'; } } } if (targety != 'set' && ylocal > targety - 10 && ylocal < targety + 10) { targety = 'set'; } } else { yspeed = 0; } if (targetx > this._x && targetx != 'set') { if (xspeed <= 20) { xspeed += 2; } action = 'run'; } else { if (targetx < this._x && targetx != 'set') { if (xspeed >= -20) { xspeed -= 2; } action = 'run'; } else { if (xspeed != 0) { xspeed += -1 * Math.abs(xspeed) / xspeed; action = 'run'; } } } if (targetx != 'set' && this._x > targetx - 21 && this._x < targetx + 21) { targetx = 'set'; } if (xspeed > 0) { scale = 1; } else { if (xspeed < 0) { scale = -1; } else { if (xspeed == 0 && yspeed == 0) { action = 'stand'; } } } } if (!hurtswitch && priority == 2 && ylocal > _root.char.ylocal - 10 && ylocal < _root.char.ylocal + 20) { if (_root.char.attackswitch) { if (this.a1.hitTest(_root.char.a2)) { hp -= 2; hurtswitch = true; _root.globaler.soundplay('break'); _root.fireshot('effect', 'hit' + (random(4) + 1), this._x + random(10) - random(10), this._y + random(10) - random(10)); } else { if (this.a1.hitTest(_root.char.a3)) { hurtswitch = true; hp -= 1; _root.globaler.soundplay('break'); _root.fireshot('effect', 'hit' + (random(4) + 1), this._x + random(10) - random(10), this._y + random(10) - random(10)); } } } } if (random(5) == 0 && this.hitTest(_root.char.a1) && ylocal > _root.char.ylocal - 15 && ylocal < _root.char.ylocal + 15) { if (!attackswitch && !hurtswitch) { attackswitch = true; attacktimer = 0; if (targety != 'set' || targetx != 'set') { attack = 'dashattack'; } else { targety = 'set'; targetx = 'set'; xspeed = 0; yspeed = 0; attack = 'standattack'; } } } if (!_root.char.hurtswitch && priority == 1 && ylocal > _root.char.ylocal - 10 && ylocal < _root.char.ylocal + 20 && attackswitch) { if (this.a2.hitTest(_root.char.a1)) { _root.char.hurtswitch = true; _root.globaler.soundplay('sonichurt' + (random(5) + 1)); _root.fireshot('effect', 'hit' + (random(4) + 1), _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); _root.fireshot('effect', 'ring', _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); } else { if (this.a3.hitTest(_root.char.a1)) { _root.char.hurtswitch = true; _root.globaler.soundplay('sonichurt' + (random(5) + 1)); _root.fireshot('effect', 'hit' + (random(4) + 1), _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); _root.fireshot('effect', 'ring', _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); } } } if (pausetimer == 0 && random(50) == 0) { if (!jumpswitch && !hurtswitch) { jumpswitch = true; jumphieght = 15; jumpy = 0; } } if (jumpswitch) { if (!attackswitch && !hurtswitch) { action = 'jump'; } if (jumphieght <= -14) { jumphieght = 0; jumpswitch = false; if (hurtswitch) { action = 'hurt'; } else { if (attackswitch) { action = attack; } else { action = 'stand'; } } } else { jumphieght -= 1; jumpy += jumphieght; } } if (attackswitch) { attacktimer += 1; action = attack; if (attacktimer >= 20) { attackswitch = false; resettimers(); if (!jumpswitch) { action = 'stand'; } else { if (jumpswitch) { action = 'jump'; } } } } if (hurtswitch) { action = 'hurt'; hurttimer += 1; if (hurttimer >= 10) { resettimers(); hurttimer = 0; attacktimer = 0; hurtswitch = false; action = 'stand'; } } if (xlocal + xspeed > 525) { xspeed = 0; xlocal = 525; } if (xlocal + xspeed < 30) { xspeed = 0; xlocal = 30; } if (ylocal + yspeed < starty) { yspeed = 0; ylocal = starty; } if (ylocal + yspeed > lowery) { yspeed = 0; ylocal = lowery; } if (hp <= 0) { ending = true; action = 'dead'; } priority = 3 - priority; xlocal += xspeed; ylocal += yspeed; this._yscale = 200 + (ylocal - starty) / 2; this._xscale = scale * this._yscale; this._x = xlocal; this._y = ylocal - jumpy; this.gotoAndStop(char + action); } } } movieClip 1958 { } movieClip 1961 { } movieClip 1966 { } movieClip 1967 { frame 25 { stop(); _parent.removeMovieClip(); } } movieClip 1972 { frame 9 { stop(); _parent.removeMovieClip(); } } movieClip 1974 { } movieClip 1976 { frame 10 { stop(); _parent.removeMovieClip(); } } movieClip 1977 { frame 1 { stop(); } frame 5 { _root.globaler.soundplay('downer'); } frame 8 { _root.globaler.soundplay('explode'); } frame 11 { _root.globaler.soundplay('pop'); } } instance bulletmaster of movieClip 1977 { onClipEvent (load) { if (this._name != 'bulletmaster') { this._rotation = -Math.atan2(_x - _root.char._x, _y - _root.char._y) / 0.0174532925199433; var starty = 200; var lowery = 320; var targety = _root.char._y; var targetx = _root.char._x; var jumptargety = (_root.char._y - this._y) / 28; var jumptargetx = (_root.char._x - this._x) / 28; var exists = 'pie'; var armed = true; var ylocal = this._y; } } onClipEvent (enterFrame) { if (_global.nuke) { this.removeMovieClip(); } if (this._name != 'bulletmaster') { if (!(this._y >= targety && jumptargety > 0 || this._y <= targety && jumptargety <= 0)) { this._x += jumptargetx; this._y += jumptargety; this._yscale = 150 + (this._y - starty) / 2; this._xscale = this._yscale; ylocal = this._y; } else { this.gotoAndStop(bullettype + 'explode'); } if (!_root.char.hurtswitch && this.hitTest(_root.char.a1) && ylocal > _root.char.ylocal - 10 && ylocal < _root.char.ylocal + 20) { _root.char.hurtswitch = true; _root.globaler.soundplay('sonichurt' + (random(5) + 1)); _root.fireshot('effect', 'hit' + (random(4) + 1), _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); _root.fireshot('effect', 'ring', _root.char._x + random(10) - random(10), _root.char._y + random(10) - random(10)); } } } } movieClip 1980 { frame 1 { if (this._name == 'fadeoutmaster') { stop(); } } frame 79 { stop(); _global.nuke = true; _root.gotoAndPlay(_root.goring.ending); } } instance fadeoutmaster of movieClip 1980 { onClipEvent (load) { trace(this._name + ' ' + this._x + ' ' + this._y); } onClipEvent (enterFrame) { if (_global.nuke) { this.removeMovieClip(); } } } movieClip 1982 { } movieClip 1986 { frame 7 { stop(); } } movieClip 1992 { } movieClip 1996 { frame 5 { stop(); } } movieClip 1997 { } instance effectsmaster of movieClip 1997 { onClipEvent (load) { if (this._name != 'effectsmaster') { var xmove = random(10) - random(10); var ymove = random(10) - random(10); var faketimer = 0; this._rotation = random(360); this.gotoAndStop(specific); } } onClipEvent (enterFrame) { if (this._name != 'effectsmaster') { this.gotoAndStop(specific); this._y += ymove; this._x += xmove; faketimer += 1; if (faketimer >= 15) { this.removeMovieClip(); } } if (_global.nuke) { this.removeMovieClip(); } } } instance goring of movieClip 633 { onClipEvent (load) { _root.ringamount = _global.rings; var faketimer = 0; var onstage = new Array('char', 'enemy1', 'enemy2', 'enemy3'); var ending = 'set'; } onClipEvent (enterFrame) { _root.ringamount = _global.rings; faketimer += 1; if (faketimer >= 25) { faketimer = 0; if (_global.rings > 0 && ending == 'set') { _global.rings -= 1; } else { if (ending == 'set') { ending = 'minigamebadending'; _root.char.ending = 'bad'; _root.char.gotoAndStop('badending'); _root.fadeoutmaster.duplicateMovieClip('fadeout', _root.getNextHighestDepth()); _root.fadeout._x = 0; _root.fadeout._y = 0; } } if (_global.rings < 0) { _global.rings = 0; } } i = 0; while (i < 4) { if (_root[onstage[i]].exists == 'pie' && (_root[onstage[i]].ylocal > _root.pinky.ylocal + 90 && _root[onstage[i]].getDepth() < _root.pinky.getDepth()) || _root[onstage[i]].ylocal < _root.pinky.ylocal + 90 && _root[onstage[i]].getDepth() > _root.pinky.getDepth()) { _root[onstage[i]].swapDepths(_root.pinky); } ++i; } i = 0; while (i < 4) { j = 0; while (j < 4) { if (i != j) { if (_root[onstage[i]].exists == 'pie' && _root[onstage[j]].exists == 'pie' && (_root[onstage[i]].ylocal > _root[onstage[j]].ylocal && _root[onstage[i]].getDepth() < _root[onstage[j]].getDepth()) || _root[onstage[i]].ylocal < _root[onstage[j]].ylocal && _root[onstage[i]].getDepth() > _root[onstage[j]].getDepth()) { _root[onstage[i]].swapDepths(_root[onstage[j]]); } } ++j; } ++i; } i = 0; while (i < 4) { j = 1; while (j <= _global.minigameitemsonstage) { if (_root[onstage[i]].exists == 'pie' && _root['shot' + j].exists == 'pie' && (_root[onstage[i]].ylocal > _root['shot' + j].ylocal && _root[onstage[i]].getDepth() < _root['shot' + j].getDepth()) || _root[onstage[i]].ylocal < _root['shot' + j].ylocal && _root[onstage[i]].getDepth() > _root['shot' + j].getDepth()) { _root[onstage[i]].swapDepths(_root['shot' + j]); } ++j; } ++i; } if (ending == 'set' && _root.enemy1.exists == 'pie' && _root.enemy1.hp <= 0) { if (_root.enemy2.exists == 'pie' && _root.enemy2.hp <= 0) { if (_root.enemy3.exists == 'pie' && _root.enemy3.hp <= 0) { ending = 'minigamegoodending'; _root.char.ending = 'good'; _root.char.gotoAndStop('goodending'); _root.fadeoutmaster.duplicateMovieClip('fadeout', _root.getNextHighestDepth()); _root.fadeout._x = 0; _root.fadeout._y = 0; } } } } } frame 1087 { _global.nuke = true; } frame 1088 { _root.gotoAndStop('minigamemenu'); } frame 1090 { _global.nuke = false; stop(); } movieClip 2001 { } movieClip 2006 { } movieClip 2009 { } movieClip 2012 { } movieClip 2015 { } movieClip 2016 { frame 95 { _root.globaler.soundplay('lightning'); } frame 103 { _root.globaler.soundplay('smashcake'); } frame 252 { stop(); } } frame 1091 { _root.gotoAndStop('minigamemenu'); } frame 1093 { _global.nuke = false; stop(); } movieClip 2018 { } button 2019 { on (release) { _global.secretcannon = 3 - _global.secretcannon; } } movieClip 2027 { frame 31 { _global.secretcannon = 3 - _global.secretcannon; _root.globaler.soundplay('chaosemeralds'); } frame 99 { _root.globaler.soundplay('break'); } frame 124 { _root.globaler.soundplay('explode'); } instance of movieClip 234 { onClipEvent (load) { _global.ringsgoingin -= _global.rings; _root.goodmovie.ringsusedvar = _global.ringsgoingin; if (_global.ringsgoingin < _global.minigameringsusedhighscore) { _global.minigameringsusedhighscore = _global.ringsgoingin; } else { _root.goodmovie.highscoresbox._visible = false; } } } instance core of movieClip 657 { onClipEvent (load) { this.gotoAndStop(_global.secretcannon); } onClipEvent (enterFrame) { this.gotoAndStop(_global.secretcannon); } } frame 166 { stop(); } } frame 1094 { _root.gotoAndStop('minigamemenu'); } frame 1095 { stop(); } button 2028 { on (release) { _root.gotoAndStop('startmenu'); } } button 2036 { on (release) { getURL('http://www.jtcoflash.tk', _blank); } } button 2039 { on (release) { getURL('http://www.youtube.com/user/Samzilla33', _blank); } } button 2044 { on (release) { var link = 'https://www.paypal.com/cgi-bin/webscr'; var cmd = '_s-xclick'; var encrypted = '-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYC0XdoxsbDYR4sIFkoD38Srdq+6TjTfhWPTWaBrLRO8EEBmSCEqmRRxDc/zWy2tdqxhpnIBYOskxeiFzHHRmZ7Y9a4CTkNtFjUI2pYUAjYXsBjU/Jfq538pyCCY+rbBM6DxAIvMx3PkIcrSYzwnIY9K+gAo3beB1z81ycWz4iUYnDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIyrQwylqEvG2AgZh9uJjwKATwsV50tYh5AYIOesZ3+j366GxdpMt79trzVBmQT2Rj7JZgQrX4EFqNamvXI2lsGB4iAIeVoHzpJPPk2y+2bj3263LwMbpBkxJQp35xVFYkVAugrqtR+iXvOyRX7sL0Z7qYINMjenQayMqr1LiNevbswI9moOAu/m74Z7DmdNpzhoTHe/nYlFQpdbyeRlTU6Ud0NaCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDMxODA0Mjc0NFowIwYJKoZIhvcNAQkEMRYEFJfByA0tbOOiUINZpF6Ip4Fo7p4tMA0GCSqGSIb3DQEBAQUABIGAgvn3KUC/YfpIwwyf76o5FJvtCNKBR/sEvhTyxXsA0s8TGL5AcPDK6u0V/7xA9bdvEmmayOJrV4NX4csIY/YN1MitCcifbSVA/PWXkIJi0nzJq8cVOyeyN5gKKFb3IPcwJaUbxhfOF234QhR/XQg01KwbITAaJGP7IsQeWyTPWOw=-----END PKCS7-----'; var paypal = new LoadVars(); paypal.cmd = cmd; paypal.encrypted = encrypted; paypal.send(link, '_blank', 'POST'); } } instance of movieClip 149 Flash Ad (NewgroundsAPI) { onClipEvent (construct) { show_background = true; } } frame 1100 { gotoAndStop('creditsstart'); }




http://swfchan.com/45/221650/info.shtml
Created: 8/8 -2019 20:00:33 Last modified: 8/8 -2019 20:00:33 Server time: 13/05 -2024 19:25:31