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

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

Wasted Youth Part 1 - point and click rpg adventure game.swf

This is the info page for
Flash #134733

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


Text
S I T E L O C K E D

To download the game, click here

To play the game, click here

Newgrounds API Connector

Connecting to the Newgrounds Gateway...

Connection Established!

medal unlocked!

MEDAL GET!

100pts

YOU ARE NOT LOGGED IN!

You will not be able to use any
members-only features!

Some features may be
temporarily unavailable.

API CONNECTION FAILED

NOTICE!

A new version is now available!
Click the button below to check it out.

View latest version

UNAUTHORIZED USE!!

This website is hosting this file without proper consent!
Click the button below to view a legal version.

View authorized version

0%

PLAY

ActionScript [AS1/AS2]

Frame 1
stop(); _global.CONT = container; LOADED_MOVIE = false; ready = false; INFO = {}; INFO.VERSION = "newgrounds"; function load_game_settings() { if (_root.game_settings.data.language_no != undefined) { _root.language_no = _root.game_settings.data.language_no; } if (_root.game_settings.data.new_language_no != undefined) { _root.new_language_no = _root.game_settings.data.new_language_no; } if (_root.game_settings.data.musicvolume != undefined) { _root.musicvolume = _root.game_settings.data.musicvolume; } if (_root.game_settings.data.sfxvolume != undefined) { _root.sfxvolume = _root.game_settings.data.sfxvolume; } } function check_language_change() { if (_root.new_language_no != undefined) { _root.language_no = _root.new_language_no; _root.new_language_no = undefined; _root.save_game_settings(); LANG_INIT(); } } function save_game_settings() { _root.game_settings.data.language_no = _root.language_no; _root.game_settings.data.new_language_no = _root.new_language_no; _root.game_settings.data.musicvolume = _root.musicvolume; _root.game_settings.data.sfxvolume = _root.sfxvolume; _root.game_settings.flush(); } function array_has_prefix(arr, prefix) { len = prefix.length; if (arr.length < len) { return(false); } var _local1 = 0; while (_local1 < len) { if (arr[_local1] != prefix[_local1]) { return(false); } _local1++; } return(true); } function reversed_domain_parts(domain) { parts = domain.split("."); parts.reverse(); return(parts); } function is_domain_allowed(domain, allowed_domains) { var _local1 = 0; while (_local1 < allowed_domains.length) { if (array_has_prefix(reversed_domain_parts(domain), reversed_domain_parts(allowed_domains[_local1]))) { return(true); } _local1++; } return(false); } function deadClick() { } function setQualityLow() { _root.default_quality = "low"; _root.best_quality = "medium"; } function setQualityMedium() { _root.default_quality = "medium"; _root.best_quality = "high"; } function setQualityHigh() { _root.default_quality = "high"; _root.best_quality = "high"; } function gpstudios() { getURL ("http://www.gpstudios.com", "_blank"); _root.gpstudios_visits++; } function sponsor() { if (INFO.ON_TTG) { getURL ("http://twotowersgames.com/", "_blank"); } else { getURL ("http://twotowersgames.com/eredir/1DWp7GqniXP2", "_blank"); } _root.sponsor_visits++; } function bugReport() { getURL ("http://twotowersgames.com/bugreporter/wasted-youth/fromgame", "_blank"); } function walkthrough() { if (INFO.ON_TTG) { getURL ("http://twotowersgames.com/games/wasted-youth/solution", "_blank"); } else { getURL ("http://twotowersgames.com/eredir/QOjaqnq2N6lM", "_blank"); } } function download(getTxt) { if (INFO.ON_TTG) { txt = "http://twotowersgames.com/freegames"; } else { txt = "http://twotowersgames.com/eredir/oE5wIuz7SfVx"; } if (getTxt) { return(txt); } getURL (txt, "_blank"); } function jayisgames() { getURL ("http://jayisgames.com/archives/2011/05/wasted_youth.php", "_blank"); } function playgame(getTxt) { txt = "http://twotowersgames.com/games/wasted-youth"; if (getTxt) { return(txt); } getURL (txt, "_blank"); } function fsend(fnum) { switch (fnum) { case 1 : api.addEventListener(com.api.as2.evnt.APIEvents.STARTGAME, Start); api.startGame(); break; case 2 : api.addEventListener(com.api.as2.evnt.APIEvents.AUTHURL, Url); api.getAuthUrl(); break; case 3 : api.addEventListener(com.api.as2.evnt.APIEvents.USERNAME, UName); api.getUserName(); break; case 4 : api.addEventListener(com.api.as2.evnt.APIEvents.GETSCORE, GetScore); api.getScore(ilevel.text); break; case 5 : api.addEventListener(com.api.as2.evnt.APIEvents.GIVESCORE, GiveScore); api.giveScore(ilevel.text, iscore.text); } } function Start(e) { ttg.username = e.username; ttg.authed = e.authed; } function Url(e) { ttg.authurl = e.authurl; } function UName(e) { ttg.username = e.username; } function GetScore(e) { ttg.gameid = e.gameid; ttg.level = e.level; ttg.score = e.score; } function GiveScore(e) { ttg.gameid = e.gameid; ttg.level = e.level; ttg.authed = e.authed; ttg.username = e.username; } function Errors(e) { trace(("Error data transfer in method \"" + e.metod) + "\"\n"); } if (LOADED_MOVIE) { INFO = _level0.INFO; onEnterFrame = function () { if (_level0.ready) { beginGame(); delete onEnterFrame; } }; } else { Stage.scaleMode = "exactFit"; System.security.loadPolicyFile("http://www.twotowersgames.com/crossdomain.xml"); System.security.allowDomain("server.cpmstar.com"); System.security.allowDomain("*"); System.security.allowInsecureDomain("*"); if (INFO.VERSION == "twotowersgames") { INFO.SITE_LOCKED = !is_domain_allowed(_url.split("/")[2], ["twotowersgames.com"]); INFO.SPONSOR = "twotowersgames"; INFO.JAY_IS_GAMES_ACTIVE = true; INFO.GPSTUDIOS_ACTIVE = false; INFO.ADS = "none"; } else if (INFO.VERSION == "newgrounds") { INFO.SITE_LOCKED = !is_domain_allowed(_url.split("/")[2], ["newgrounds.com", "uploads.ungrounded.net"]); INFO.SPONSOR = "twotowersgames"; INFO.JAY_IS_GAMES_ACTIVE = true; INFO.GPSTUDIOS_ACTIVE = true; INFO.ADS = "newgrounds"; } else if (INFO.VERSION == "kongregate") { INFO.KONGREGATE = _global.kongregate; INFO.KONGREGATE.services.connect(); INFO.SITE_LOCKED = !is_domain_allowed(_url.split("/")[2], ["kongregate.com"]); INFO.SPONSOR = "twotowersgames"; INFO.SITE_LOCKED = false; INFO.JAY_IS_GAMES_ACTIVE = true; INFO.GPSTUDIOS_ACTIVE = true; INFO.ADS = "none"; } else if (INFO.VERSION == "mochi") { INFO.SITE_LOCKED = false; INFO.SPONSOR = "twotowersgames"; INFO.SITE_LOCKED = false; INFO.JAY_IS_GAMES_ACTIVE = true; INFO.GPSTUDIOS_ACTIVE = true; INFO.ADS = "mochi"; } else if (INFO.VERSION == "viral") { INFO.SITE_LOCKED = false; INFO.SPONSOR = "twotowersgames"; INFO.SITE_LOCKED = false; INFO.JAY_IS_GAMES_ACTIVE = true; INFO.GPSTUDIOS_ACTIVE = true; INFO.ADS = "cpmstar"; } INFO.ON_TTG = is_domain_allowed(_url.split("/")[2], ["twotowersgames.com"]); Playtomic.Log.View(3362, "4e5cf97cb00f4122", _root._url); } INFO.SITE_LOCKED = false; if (INFO.SITE_LOCKED) { loader.gotoAndStop(2); } else { loader.preloader.gotoAndStop(INFO.ADS); } _root.game_settings = SharedObject.getLocal("gpstudios/wasted_youth_1/settings", "/"); _root.language_no = 0; _root.new_language_no = undefined; _root.musicvolume = 75; _root.sfxvolume = 100; lang_codes = []; lang_codes[0] = ["af", "Afrikaans", 0]; lang_codes[1] = ["sq", "Albanian", 0]; lang_codes[2] = ["ar", "Arabic", 0]; lang_codes[3] = ["eu", "Basque", 0]; lang_codes[4] = ["bg", "Bulgarian", 0]; lang_codes[5] = ["be", "Belarusian", 0]; lang_codes[6] = ["ca", "Catalan", 0]; lang_codes[7] = ["zh", "Chinese", 0]; lang_codes[8] = ["hr", "Croatian", 0]; lang_codes[9] = ["cs", "Czech", 0]; lang_codes[10] = ["da", "Danish", 0]; lang_codes[11] = ["nl", "Dutch", 2]; lang_codes[12] = ["en", "English", 0]; lang_codes[13] = ["et", "Estonian", 0]; lang_codes[14] = ["fo", "Faeroese", 0]; lang_codes[15] = ["fa", "Farsi", 0]; lang_codes[16] = ["fi", "Finnish", 0]; lang_codes[17] = ["fr", "French", 3]; lang_codes[18] = ["gd", "Gaelic (Scotland)", 0]; lang_codes[19] = ["ga", "Irish", 0]; lang_codes[20] = ["de", "German", 2]; lang_codes[21] = ["el", "Greek", 0]; lang_codes[22] = ["he", "Hebrew", 0]; lang_codes[23] = ["hi", "Hindi", 0]; lang_codes[24] = ["hu", "Hungarian", 0]; lang_codes[25] = ["is", "Icelandic", 0]; lang_codes[26] = ["id", "Indonesian", 0]; lang_codes[27] = ["it", "Italian", 0]; lang_codes[28] = ["ja", "Japanese", 0]; lang_codes[29] = ["ko", "Korean", 0]; lang_codes[30] = ["ko", "Korean (Johab)", 0]; lang_codes[31] = ["lv", "Latvian", 0]; lang_codes[32] = ["lt", "Lithuanian", 0]; lang_codes[33] = ["mk", "Macedonian (FYROM)", 0]; lang_codes[34] = ["ms", "Malaysian", 0]; lang_codes[35] = ["mt", "Maltese", 0]; lang_codes[36] = ["no", "Norwegian", 0]; lang_codes[37] = ["pl", "Polish", 0]; lang_codes[38] = ["pt", "Portuguese", 0]; lang_codes[39] = ["rm", "Rhaeto-Romanic", 0]; lang_codes[40] = ["ro", "Romanian", 0]; lang_codes[41] = ["ru", "Russian", 1]; lang_codes[42] = ["sz", "Sami (Lappish)", 0]; lang_codes[43] = ["sr", "Serbian", 0]; lang_codes[44] = ["sk", "Slovak", 0]; lang_codes[45] = ["sl", "Slovenian", 0]; lang_codes[46] = ["sb", "Sorbian", 0]; lang_codes[47] = ["es", "Spanish", 4]; lang_codes[48] = ["sx", "Sutu", 0]; lang_codes[49] = ["sv", "Swedish", 0]; lang_codes[50] = ["th", "Thai", 0]; lang_codes[51] = ["ts", "Tsonga", 0]; lang_codes[52] = ["tn", "Tswana", 0]; lang_codes[53] = ["tr", "Turkish", 0]; lang_codes[54] = ["uk", "Ukrainian", 0]; lang_codes[55] = ["ur", "Urdu", 0]; lang_codes[56] = ["ve", "Venda", 0]; lang_codes[57] = ["vi", "Vietnamese", 0]; lang_codes[58] = ["xh", "Xhosa", 0]; lang_codes[59] = ["ji", "Yiddish", 0]; lang_codes[60] = ["zu", "Zulu", 0]; _root.language_no = 0; language_string = System.capabilities.language.substring(0, 2); var i = 0; while (i < lang_codes.length) { code = lang_codes[i][0]; if (code == language_string) { _root.language_no = lang_codes[i][2]; break; } i++; } load_game_settings(); _global.LANG = function (array, obj) { var _local2 = array[_root.language_no]; if (obj == undefined) { obj = {}; } for (var _local4 in obj) { _local2 = _local2.split(("[" + _local4) + "]").join(obj[_local4]); } _local2 = _local2.split("[PlayerName]").join(_root.playername); return(_local2); }; var myMenu = new ContextMenu(); myMenu.hideBuiltInItems(); var cm1 = new ContextMenuItem("\u00A9 GP Studios 2011", deadClick); var cm2 = new ContextMenuItem("Quality: Low", setQualityLow); cm2.separatorBefore = true; var cm3 = new ContextMenuItem("Quality: Medium", setQualityMedium); var cm4 = new ContextMenuItem("Quality: High", setQualityHigh); var cm5 = new ContextMenuItem("Visit TwoTowersGames.com", sponsor); cm5.separatorBefore = true; var cm6 = new ContextMenuItem("Visit GPStudios.com", gpstudios); var cm7 = new ContextMenuItem("Walkthrough / Tips", walkthrough); var cm8 = new ContextMenuItem("Bug Report", bugReport); var cm9 = new ContextMenuItem("Host This Game", function () { download(); }); myMenu.customItems.push(cm1, cm2, cm3, cm4, cm5, cm6, cm7, cm8, cm9); _root.menu = myMenu; var GPSAPI = com.as2.GPSAPI; GPSAPI.newGPSAPI(this); var ttg = {}; var api = (new com.api.as2.API("000192", "L3a89A61", "http://twotowersgames.com/api/")); fsend(1); api.addEventListener(com.api.as2.evnt.APIEvents.BADDATA, Errors); function beginGame() { ready = true; } function remove() { Playtomic.Log.Play(); nextFrame(); } contBytesLoaded = 0; contBytesTotal = 100; if (!INFO.SITE_LOCKED) { var mcLoader = new MovieClipLoader(); var listener = new Object(); listener.onLoadProgress = function (target, bytesLoaded, bytesTotal) { contBytesLoaded = bytesLoaded; contBytesTotal = bytesTotal; }; mcLoader.addListener(listener); mcLoader.loadClip("http://twotowersgames.com/game/wasted-youth/swfsitelocked/wasted-youth.swf", container); }
Symbol 8 MovieClip Frame 1
stop();
Symbol 20 MovieClip Frame 1
stop();
Symbol 21 MovieClip [Preloader] Frame 1
function enterFrameHandler() { var _local2 = 0; _local2 = _root.getBytesLoaded() / _root.getBytesTotal(); if (loadingBar) { loadingBar.gotoAndStop(Number(_local2 * (loadingBar.totalFrames - 1)) + 1); } if (_local2 >= 1) { onEnterFrame = null; gotoAndStop ("loaded"); } } stop(); var autoPlay; var className; onEnterFrame = enterFrameHandler;
Symbol 21 MovieClip [Preloader] Frame 10
function _onPlayClick() { _root.nextFrame(); _root.play(); _parent._onLoaded(); } if (playButton) { playButton.onRelease = _onPlayClick; } if (autoPlay) { _onPlayClick(null); }
Symbol 36 MovieClip Frame 1
stop();
Instance of Symbol 35 MovieClip in Symbol 36 MovieClip Frame 1
onClipEvent (load) { if (!_root.INFO.GPSTUDIOS_ACTIVE) { _visible = false; } } on (press) { _root.gpstudios(); _root.playsound("click1.wav"); } on (rollOver) { _parent.gotoAndStop(2); _root.playsound("click2.wav"); } on (releaseOutside, rollOut) { _parent.gotoAndStop(1); }
Symbol 40 MovieClip [loading_screen] Frame 1
stop();
Instance of Symbol 21 MovieClip [Preloader] "preloader" in Symbol 40 MovieClip [loading_screen] Frame 1
//component parameters onClipEvent (construct) { autoPlay = false; mainClass = ""; }
Symbol 40 MovieClip [loading_screen] Frame 2
playgame.text = _root.playgame(true); download.text = _root.download(true);
Instance of Symbol 26 MovieClip in Symbol 40 MovieClip [loading_screen] Frame 2
on (press) { _root.playgame(); }
Instance of Symbol 26 MovieClip in Symbol 40 MovieClip [loading_screen] Frame 2
on (press) { _root.download(); }
Symbol 45 MovieClip [Newgrounds API Classes] Frame 1
#initclip 41 Object.registerClass("Newgrounds API Classes", com.newgrounds.shims.APIShim); #endinitclip
Symbol 103 MovieClip [FlashAd] Frame 1
#initclip 44 Object.registerClass("FlashAd", com.newgrounds.components.FlashAd); #endinitclip
Symbol 104 MovieClip [APIConnector] Frame 1
function _onLoaded() { gotoAndStop ("invisible"); if (_redirect) { com.newgrounds.API.loadOfficialVersion(); } } function _apiConnect() { var _local2 = com.newgrounds.API; if (_local2 && (!_local2.connected)) { if (!apiId) { com.newgrounds.Logger.logError("No API ID entered in the API Connector component.", "You can create an API ID for this submission at http://newgrounds.com/account/flashapi", "Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector)."); return(undefined); } switch (debugMode) { case "Off" : default : _local2.debugMode = _local2.RELEASE_MODE; break; case "Simulate Logged-in User" : _local2.debugMode = _local2.DEBUG_MODE_LOGGED_IN; break; case "Simulate Logged-out User" : _local2.debugMode = _local2.DEBUG_MODE_LOGGED_OUT; break; case "Simulate New Version" : _local2.debugMode = _local2.DEBUG_MODE_NEW_VERSION; break; case "Simulate Host Blocked" : _local2.debugMode = _local2.DEBUG_MODE_HOST_BLOCKED; } _local2.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, _onConnected); _local2.connect(_root, apiId, encryptionKey, movieVersion); } } function _onConnected(event) { if ((redirectOnNewVersion && (event.__get__success())) && (event.__get__data().newVersion)) { _redirect = true; } if ((redirectOnHostBlocked && (!event.__get__success())) && (event.__get__error() == com.newgrounds.APIEvent.ERROR_HOST_BLOCKED)) { _redirect = true; } if (_redirect) { gotoAndStop ("adPreloader"); forceAlwaysOnTop(); } } function forceAlwaysOnTop() { var _local2 = getNextHighestDepth(); swapDepths(_local2); if (Stage) { _x = ((Stage.width - _width) / 2); _y = ((Stage.height - _height) / 2); _visible = true; } if (_root && (_root instanceof MovieClip)) { MovieClip(_root).stop(); } } stop(); if (_root && (_root instanceof MovieClip)) { MovieClip(_root).stop(); } var apiId; var encryptionKey; var movieVersion; var debugMode; var connectorType; var redirectOnHostBlocked; var redirectOnNewVersion; var _redirect; _x = Number(_x); _y = Number(_y); if (!debugMode) { debugMode = "Simulate Logged-in User"; } if (!connectorType) { connectorType = "Flash Ad + Preloader"; } switch (connectorType) { case "Flash Ad + Preloader" : gotoAndStop ("adPreloader"); break; case "Flash Ad Only" : gotoAndStop ("ad"); break; case "Invisible" : gotoAndStop ("invisible"); } _apiConnect();
Instance of Symbol 103 MovieClip [FlashAd] "ad" in Symbol 104 MovieClip [APIConnector] Frame 1
//component parameters onClipEvent (construct) { apiId = "19161:jFCc5N22"; showBorder = false; }
Instance of Symbol 21 MovieClip [Preloader] "loader" in Symbol 104 MovieClip [APIConnector] Frame 1
//component parameters onClipEvent (construct) { autoPlay = false; mainClass = ""; }
Symbol 109 Button
on (release) { com.newgrounds.API.loadNewgrounds(); }
Symbol 115 MovieClip Frame 1
onEnterFrame = function () { if (_visible) { _rotation = (_rotation + 30); } else { delete onEnterFrame; } };
Symbol 116 MovieClip Frame 11
gotoAndPlay (1);
Symbol 117 MovieClip [Flash Ad (NewgroundsAPI)] Frame 1
#initclip 42 Object.registerClass("Flash Ad (NewgroundsAPI)", com.newgrounds.components.FlashAd); #endinitclip
Symbol 126 MovieClip Frame 10
stop();
Symbol 128 MovieClip Frame 37
_parent.setGotoFrame("done"); stop();
Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 1
function endDelay() { clearInterval(pop_delay); gotoAndPlay ("closeme"); } _visible = true; icon._visible = false; pop_delay = setInterval(endDelay, 3000);
Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 2
medal.attachIcon(icon);
Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 10
icon._visible = true; medal_name = medal.getName(); medal_value = medal.getValue() + "pts"; stop();
Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 21
this.removeMovieClip(); _visible = false; stop();
Symbol 146 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 1
function endDelay() { clearInterval(pop_delay); gotoAndPlay ("closeme"); } _x = 0; _y = 0; _visible = true; pop_delay = setInterval(endDelay, 6000);
Symbol 146 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 10
stop();
Symbol 146 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 21
this.removeMovieClip(); _visible = false; stop();
Symbol 149 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 1
function endDelay() { clearInterval(pop_delay); gotoAndPlay ("closeme"); } _x = 0; _y = 0; _visible = true; pop_delay = setInterval(endDelay, 6000);
Symbol 149 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 10
stop();
Symbol 149 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 21
this.removeMovieClip(); _visible = false; stop();
Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1
var w = Math.round(this._width); var h = Math.round(this._height); if (w < 80) { w = 80; } if (h < 80) { h = 80; } this._width = 350; this._height = 120; t._width = w - 2; t._x = 1; b._width = w - 2; b._x = 1; c._width = w - 2; c._x = 1; c._height = h - 2; c._y = 1; l._height = h - 2; l._y = 1; r._height = h - 2; r._y = 1; tr._x = w - 7; r._x = w - 7; br._x = w - 7; b._y = h - 7; bl._y = h - 7; br._y = h - 7; shadow._width = w + 10; shadow._height = h + 10;
Symbol 174 Button
on (release) { this._visible = false; this.removeMovieClip(); }
Symbol 180 Button
on (release) { getURL (official_version_url, "_blank"); }
Symbol 182 MovieClip [NewgroundsAsset_New_Version_Available] Frame 1
_x = (Stage.width / 2); _y = (Stage.height / 2); background._width = Stage.width + 200; background._height = Stage.height + 200; background._x = -(_x + 100); background._y = -(_y + 100);
Symbol 183 Button
on (release) { getURL (official_version_url, "_blank"); }
Symbol 187 MovieClip [NewgroundsAsset_Illegal_Host] Frame 1
_x = (Stage.width / 2); _y = (Stage.height / 2); background._width = Stage.width + 200; background._height = Stage.height + 200; background._x = -(_x + 100); background._y = -(_y + 100);
Symbol 188 MovieClip [API Connector (NewgroundsAPI)] Frame 1
#initclip 43 Object.registerClass("API Connector (NewgroundsAPI)", com.newgrounds.components.APIConnector); #endinitclip
Symbol 188 MovieClip [API Connector (NewgroundsAPI)] Frame 20
_visible = false;
Symbol 193 MovieClip Frame 1
onEnterFrame = function () { _y = random(600); _height = random(200); _alpha = random(20); };
Symbol 195 MovieClip Frame 1
function reset() { _alpha = 0; _x = random(600); visi = false; } reset(); onEnterFrame = function () { _x = (_x + (random(50) - 25)); if (_x > 600) { _x = (_x - 600); } _alpha = random(10); };
Instance of Symbol 208 MovieClip in Symbol 210 MovieClip Frame 1
onClipEvent (load) { _alpha = random(10); } onClipEvent (enterFrame) { _alpha = random(10); oldframe = _currentframe; while (oldframe == _currentframe) { gotoAndStop(random(8) + 1); } }
Instance of Symbol 220 MovieClip "b" in Symbol 221 MovieClip Frame 1
onClipEvent (load) { i = 1; clicksound = "click1.wav"; oversound = "click2.wav"; } on (rollOver) { if (!_parent._parent.request) { _parent._parent.over(); over = true; _root.playsound(oversound); } } on (releaseOutside, rollOut) { _parent._parent.out(); over = false; } on (press) { if (!_parent._parent.request) { _parent._parent.click(); _root.playsound(clicksound); } } onClipEvent (enterFrame) { if ((over and (!_parent._parent.request)) and (!_root.vcam.blackfade3.visi)) { if (i < 5) { i = i + 1; } } else if (i > 1) { i = i - 1; } _parent._parent.gotoAndStop(i); }
Symbol 222 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 1
stop();
Instance of Symbol 222 MovieClip in Symbol 223 MovieClip Frame 2
onClipEvent (load) { function click() { _root.beginGame(); } function over() { _parent.gotoAndStop(3); } function out() { _parent.gotoAndStop(2); } }
Symbol 230 MovieClip Frame 1
gotoAndStop(_name.split("flag")[1]);
Instance of Symbol 232 MovieClip "b" in Symbol 233 MovieClip Frame 1
onClipEvent (load) { i = 1; clicksound = "click1.wav"; oversound = "click2.wav"; } on (rollOver) { if (!_parent._parent.request) { _parent._parent.over(); over = true; _root.playsound(oversound); } } on (releaseOutside, rollOut) { _parent._parent.out(); over = false; } on (press) { if (!_parent._parent.request) { _parent._parent.click(); _root.playsound(clicksound); } } onClipEvent (enterFrame) { if ((over and (!_parent._parent.request)) and (!_root.vcam.blackfade3.visi)) { if (i < 5) { i = i + 1; } } else if (i > 1) { i = i - 1; } _parent._parent.gotoAndStop(i); }
Symbol 234 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 1
stop(); num = Number(_name.split("flag")[1]);
Instance of Symbol 230 MovieClip "flag" in Symbol 237 MovieClip Frame 1
onClipEvent (load) { gotoAndStop(_parent.num); }
Instance of Symbol 234 MovieClip in Symbol 237 MovieClip Frame 1
onClipEvent (load) { function click() { _parent._parent.updateLang(_parent.num); } }
Symbol 240 MovieClip Frame 1
function updateLang(num) { currentTarg.gotoAndStop(1); targ = this["flag" + num]; targ.gotoAndStop(2); highlight.xdest = targ._x; _root.language_no = num - 1; _root.LANG_INIT(); _root.save_game_settings(); currentLang = languages[num - 1]; screen.update(); currentTarg = targ; } languages = ["English", "\u0420\u0443\u0441\u0441\u043A\u0438\u0439", "Deutsch", "Fran\u00E7ais", "Espagnol"]; updateLang(_root.language_no + 1); highlight._x = highlight.xdest;
Instance of Symbol 239 MovieClip "highlight" in Symbol 240 MovieClip Frame 1
onClipEvent (load) { xdest = _x; } onClipEvent (enterFrame) { _x = (_x + ((xdest - _x) / 2.5)); }
Symbol 244 MovieClip Frame 1
if (_root.INFO.SPONSOR == "twotowersgames") { gotoAndStop ("twotowersgames"); } stop();
Instance of Symbol 35 MovieClip in Symbol 244 MovieClip Frame 1
on (press) { _root.sponsor(); _root.playsound("click1.wav"); } on (rollOver) { _parent.gotoAndStop(2); _root.playsound("click2.wav"); } on (releaseOutside, rollOut) { _parent.gotoAndStop(1); }
Symbol 248 MovieClip Frame 1
stop();
Instance of Symbol 35 MovieClip in Symbol 248 MovieClip Frame 1
onClipEvent (load) { if (!_root.INFO.JAY_IS_GAMES_ACTIVE) { _visible = false; } } on (press) { _root.jayisgames(); _root.playsound("click1.wav"); } on (rollOver) { _parent.gotoAndStop(2); _root.playsound("click2.wav"); } on (releaseOutside, rollOut) { _parent.gotoAndStop(1); }
Symbol 259 MovieClip Frame 1
stop();
Instance of Symbol 223 MovieClip in Symbol 259 MovieClip Frame 1
onClipEvent (load) { function ef() { if (_root.contBytesLoaded > 50) { percent = Math.round((_root.contBytesLoaded / _root.contBytesTotal) * 100); if ((percent >= 100) && (!finished)) { finished = true; visi = false; } } else { percent = 0; } percentage = percent + "%"; if (visi) { yrec = (yon - _y) / 3; } else { yrec = (yoff - _y) / 3; if (Math.abs(_y - yoff) < 5) { visi = true; gotoAndStop (2); } } _y = (_y + yrec); } yon = _y; yoff = _y + 40; finished = false; visi = true; percent = 0; ef(); } onClipEvent (enterFrame) { ef(); }
Instance of Symbol 258 MovieClip "adBox" in Symbol 259 MovieClip Frame 2
onClipEvent (load) { _visible = false; size = adBox.getBytesLoaded(); var CPMStarContentSpotID = "4215QF6DF3400"; adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID); } onClipEvent (enterFrame) { if (_root.INFO.CPMSTAR_ACTIVE) { if (adBox.getBytesLoaded() > size) { if ((adBox._width > 0) && (adBox._height > 0)) { _visible = true; } } } }
Instance of Symbol 104 MovieClip [APIConnector] in Symbol 259 MovieClip Frame 3
//component parameters onClipEvent (construct) { apiId = "19161:jFCc5N22"; encryptionKey = "1jhNC4xRPP8GSWz163VTyIhYxsqmpeWa"; debugMode = "Simulate Logged-in User"; movieVersion = ""; connectorType = "Flash Ad Only"; redirectOnNewVersion = true; redirectOnHostBlocked = true; }
Symbol 262 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 2
playgame.text = _root.playgame(true); download.text = _root.download(true);
Instance of Symbol 26 MovieClip in Symbol 262 MovieClip Frame 2
on (press) { _root.playgame(); }
Instance of Symbol 26 MovieClip in Symbol 262 MovieClip Frame 2
on (press) { _root.download(); }
Symbol 65 MovieClip [__Packages.com.newgrounds.API] Frame 0
class com.newgrounds.API { static var version, user_email, movie_id, debug, session_id, connected, tracker_id, user_id, user_name, timeout, encryption_key, host, remote_auth, ad_url, eventDispatcher, last_command, ad_swf_url; function API () { } static function setVersion(v) { version = v; } static function setUserEmail(e) { user_email = e; } static function setFakeSession(fake) { fake_session = fake; } static function setPreload(p) { preload = p; } static function getPercentLoaded() { var _local2; if (preload && (preload_items > 0)) { _local2 = 80; var _local4 = Math.round((preload_items_loaded / preload_items) * 20); var _local3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * _local2) + _local4; } else { _local2 = 100; var _local3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * _local2); } return(_local3); } static function reportNewAsset() { if (preload) { preload_items++; } } static function reportAssetLoaded() { if (preload) { preload_items_loaded++; } } static function populateMedals(medal_list) { if (medals === null) { medals = new Array(); var _local2 = 0; while (_local2 < medal_list.length) { var _local1 = medal_list[_local2]; medals.push(new com.newgrounds.Medal(_local1.medal_id, _local1.medal_name, _local1.medal_value, _local1.medal_difficulty, _local1.medal_unlocked, _local1.medal_icon)); _local2++; } } } static function populateSaveGroups(save_group_list, file_path, image_path) { com.newgrounds.SaveFile.setFilePath(file_path); com.newgrounds.SaveFile.setImagePath(image_path); save_groups = new Array(); var _local6 = 0; while (_local6 < save_group_list.length) { var _local2 = save_group_list[_local6]; var _local5 = new com.newgrounds.SaveGroup(_local2.group_id, _local2.group_name, _local2.group_type); var _local4 = 0; while (_local4 < _local2.keys.length) { var _local3 = _local2.keys[_local4]; _local5.addKey(_local3.id, _local3.name, _local3.type); _local4++; } _local4 = 0; while (_local4 < _local2.ratings.length) { var _local1 = _local2.ratings[_local4]; _local5.addRating(_local1.id, _local1.name, _local1.min, _local1.max, _local1.float); _local4++; } save_groups.push(_local5); _local6++; } } static function populateScoreBoards(score_boards) { scoreboards = new Array(); var _local1 = 0; while (_local1 < score_boards.length) { scoreboards.push(new com.newgrounds.ScoreBoard(score_boards[_local1].id, score_boards[_local1].name)); _local1++; } } static function getOfficialURL() { var _local1 = (((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=loadOfficalVersion&seed=") + Math.random(); if (debug) { _local1 = _local1 + "&debug=1"; } return(_local1); } static function loadOfficialURL() { getURL (getOfficialURL(), "_blank"); } static function hasUserSession() { if (session_id && (publisher_id)) { return(true); } if (_root.NewgroundsAPI_PublisherID && (_root.NewgroundsAPI_SessionID)) { return(true); } return(false); } static function hostIsCompatible() { return(!(_root.NewgroundsAPI_PublisherID === undefined)); } static function isNewgrounds() { return((((publisher_id == 1) || (_root.NewgroundsAPI_PublisherID == 1)) || (getHost().toLowerCase().indexOf("ungrounded.net") > -1)) || (getHost().toLowerCase().indexOf("newgrounds.com") > -1)); } static function hasPublisher() { return(publisher_id || (_root.NewgroundsAPI_PublisherID)); } static function hasUserEmail() { if (user_email) { return(true); } return(false); } static function isConnected() { return(connected); } static function getID() { return(getTrackerID()); } static function getTrackerID() { return(tracker_id); } static function getUserID() { return(user_id); } static function getUserName() { return(user_name); } static function connectionTimeOut() { reportAssetLoaded(); clearInterval(timeout); callListener(com.newgrounds.APIEvent.API_CONNECTED, false, new com.newgrounds.APIError("CONNECTION_FAILED", "Connection to API gateway timed out.")); } static function connect(m_id, encrypt_key, debug_mode) { if (connected) { return(undefined); } sendMessage("Connecting to the Newgrounds API Gateway..."); var _local2 = function () { com.newgrounds.API.connectionTimeOut(); }; timeout = setInterval(_local2, 10000, null); if (!m_id) { fatalError("API.connect() - missing required movie_id parameter", "connect"); } movie_id = String(m_id); tracker_id = Number(movie_id.substring(0, movie_id.indexOf(":"))); encryption_key = encrypt_key; debug = debug_mode; user_id = 0; user_name = "Guest"; if (_root.NewgroundsAPI_PublisherID) { publisher_id = _root.NewgroundsAPI_PublisherID; if (_root.NewgroundsAPI_SessionID) { session_id = _root.NewgroundsAPI_SessionID; } } else if (fake_session) { publisher_id = 1; session_id = "D3bu64p1U53R"; user_id = 10; user_name = "API-Debugger"; } else { if (debug) { publisher_id = 1; } session_id = null; } if (_root.NewgroundsAPI_UserName) { user_name = _root.NewgroundsAPI_UserName; } if (_root.NewgroundsAPI_UserID) { user_id = _root.NewgroundsAPI_UserID; } if (_root.NewgroundsAPI_UserpageFormat) { userpage_format = _root.NewgroundsAPI_UserpageFormat; } reportNewAsset(); connected = true; sendCommand("connectMovie", {host:getHost(), movie_version:version}); } static function getHost() { if (!host) { var _local1 = _url; if ((_local1.toLowerCase().indexOf("http://") > -1) or (_local1.toLowerCase().indexOf("https://") > -1)) { if (_local1.toLowerCase().indexOf(NEWGROUNDS_PREVIEW) > -1) { host = NEWGROUNDS_PREVIEW; } else { host = _local1.split("/")[2].toLowerCase(); } } else { host = LOCAL_HOST; } } return(host); } static function isPublishedHost() { for (var _local1 in PREVIEW_HOSTS) { if (getHost() == PREVIEW_HOSTS[_local1]) { return(false); } } return(true); } static function loadUserPage(u_id, u_name) { if ((u_id == undefined) && (u_name == undefined)) { if (hasUserSession()) { u_id = user_id; u_name = user_name; } else { return(false); } } if (publisher_id == 1) { var _local1 = ("http://" + user_name.toLowerCase()) + ".newgrounds.com"; getURL (_local1, "_blank"); return(true); } if (userpage_format) { var _local1 = userpage_format; _local1 = _local1.split(":user_id:").join(u_id.toString()); _local1 = _local1.split(":user_name:").join(escape(u_name)); getURL (_local1, "_blank"); return(true); } return(false); } static function loadNewgrounds() { sendCommand("loadNewgrounds", {host:getHost()}, true); } static function loadMySite() { sendCommand("loadMySite", {host:getHost()}, true); } static function loadCustomLink(link) { sendCommand("loadCustomLink", {host:getHost(), link:link}, true); } static function logCustomEvent(event) { sendCommand("logCustomEvent", {host:getHost(), event:event}); } static function getScoreBoard(board) { if ((!scoreboards) || (scoreboards.length < 1)) { sendWarning("You do not have any scoreboards configured in your API setup."); return(null); } for (var _local2 in scoreboards) { if ((typeof(board) == "string") && (scoreboards[_local2].name == board)) { return(scoreboards[_local2]); } if ((typeof(board) == "number") && (scoreboards[_local2].id == board)) { return(scoreboards[_local2]); } } sendWarning(("Could not find any scoreboards named '" + board) + "'."); return(null); } static function postScore(board_name, value, tag) { var _local3 = getScoreBoard(board_name); if (tag === undefined) { tag = ""; } if (!_local3) { 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) { sendError({command_id:"postScore"}, new com.newgrounds.APIError("MISSING_PARAM", "Missing score value")); return(undefined); } sendSecureCommand("postScore", {user_name:user_name, board:_local3.id, value:value, tag:tag, publisher_id:publisher_id}); } static function loadScores(board_name, period, tag) { var _local3 = "loadScores"; var _local2 = getScoreBoard(board_name); if (!_local2) { sendError({command_id:_local3}, new com.newgrounds.APIError("INVALID_SCOREBOARD", "Failed to load scores. Check the spelling of your board name.")); return(undefined); } var _local1 = {}; _local1.publisher_id = publisher_id; _local1.board = _local2.id; _local1.num_results = _local2.num_results; _local1.page = _local2.page; if (period === undefined) { _local1.period = _local2.period; } else { _local1.period = period; } if (tag === undefined) { _local1.tag = _local2.tag; } else { _local1.tag = tag; } sendCommand(_local3, _local1); } static function unlockMedal(medal, x, y) { if (!medal) { sendError({command_id:"unlockMedal"}, new com.newgrounds.APIError("MISSING_PARAM", "missing required medal name")); return(undefined); } if (typeof(medal) != "object") { medal = getMedal(medal); } if (!medal) { sendError({command_id:"unlockMedal"}, new com.newgrounds.APIError("INVALID_MEDAL", "medal unlock failed, check your medal name for correct spelling.")); return(undefined); } callListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, true, {medal:medal, x:x, y:y}); if (hasUserSession() or debug) { sendMessage(("Attempting to unlock '" + medal.getName()) + "'"); var _local3 = new Object(); _local3.medal_id = medal.getID(); sendSecureCommand("unlockMedal", _local3); } else { sendMessage(("Unlocking '" + medal.getName()) + "'"); medal.setUnlocked(true); var _local2 = loadLocal("medals_unlocked"); if (!_local2) { _local2 = new Object(); } _local2[medal.getID()] = true; saveLocal("medals_unlocked", _local2); } } static function loadMedals() { if (medals) { callListener(com.newgrounds.APIEvent.MEDALS_LOADED, true, {medals:medals}); return(undefined); } var _local1 = new Object(); if (hasUserSession()) { _local1.publisher_id = publisher_id; _local1.user_id = user_id; } sendCommand("getMedals", _local1); } static function getMedals() { return(medals); } static function getMedal(identifier) { if ((!medals) || (medals.length < 1)) { sendWarning("You do not have any medals configured on your API setup!"); return(false); } for (var _local3 in medals) { var _local1 = medals[_local3]; if ((typeof(identifier) == "string") && (_local1.getName() == identifier)) { return(_local1); } if (_local1.getID() == identifier) { return(_local1); } } sendWarning(("Could not find any medals named '" + identifier) + "'."); return(false); } static function saveLocal(save_id, save_data, size_allocation) { if (!sharedObjects[save_id]) { sharedObjects[save_id] = SharedObject.getLocal((("ng_ap_secure_" + movie_id) + "_") + save_id); } sharedObjects[save_id].data[save_id] = encodeData(save_data); sharedObjects[save_id].flush(); } static function loadLocal(save_id) { if (!sharedObjects[save_id]) { sharedObjects[save_id] = SharedObject.getLocal((("ng_ap_secure_" + movie_id) + "_") + save_id); } sharedObjects[save_id].flush(); echo((("sharedobject " + save_id) + " is: ") + sharedObjects[save_id].data[save_id]); if (sharedObjects[save_id].data[save_id]) { echo("decoded: " + decodeData(sharedObjects[save_id].data[save_id])); return(decodeData(sharedObjects[save_id].data[save_id])); } return(null); } static function encodeData(data) { return(compressHex(com.newgrounds.encoders.RC4.encrypt(com.newgrounds.encoders.JSON.encode(data), encryption_key))); } static function decodeData(base) { return(com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(uncompressHex(base), encryption_key))); } static function compressHex(hex_value) { var _local6 = hex_value.length % 6; var _local4 = ""; var _local5 = new com.newgrounds.encoders.BaseN(compression_radix); var _local1 = 0; while (_local1 < hex_value.length) { var _local2 = Number("0x" + hex_value.substr(_local1, 6)); _local4 = _local4 + _local5.encode(_local2, 4); _local1 = _local1 + 6; } return(_local6 + _local4); } static function uncompressHex(base_value) { var _local9 = Number(base_value.charAt(0)); var _local7 = ""; var _local3; var _local8 = new com.newgrounds.encoders.BaseN(compression_radix); var _local2 = 1; while (_local2 < base_value.length) { var _local6 = base_value.substr(_local2, 4); var _local5 = _local8.decode(_local6); var _local1 = dec2hex(_local5); if ((_local2 + 4) < base_value.length) { _local3 = 6; } else { _local3 = _local9; } while (_local1.length < _local3) { _local1 = "0" + _local1; } _local7 = _local7 + _local1; _local2 = _local2 + 4; } return(_local7); } static function dec2hex(dec) { var _local4 = "0123456789ABCDEF"; var _local3 = ""; while (dec > 0) { var _local2 = dec % 16; _local3 = _local4.charAt(_local2) + _local3; dec = (dec - _local2) / 16; } return(_local3); } static function getSaveGroup(group) { if ((save_groups == null) || (save_groups.length < 1)) { sendWarning("You do not have any save groups configured in your API setup!"); return(null); } var _local1 = 0; while (_local1 <= save_groups.length) { if ((typeof(group) == "number") or (Number(group).toString() == String(group))) { if (save_groups[_local1].getID() == Number(group)) { return(save_groups[_local1]); } } else if (typeof(group) == "string") { if (save_groups[_local1].getName().toLowerCase() == group.toLowerCase()) { return(save_groups[_local1]); } } _local1++; } sendWarning(("Could not find any save groups named '" + group) + "'."); return(null); } static function getCurrentSaveFile() { return(save_file); } static function setCurrentSaveFile(current) { save_file = current; } static function loadSaveFile(save_id, get_contents) { if (get_contents === undefined) { get_contents = true; } var _local1 = "loadSaveFile"; var _local2 = {publisher_id:publisher_id, save_id:save_id, get_contents:get_contents}; save_file = null; sendCommand(_local1, _local2); } static function loadFilesByDate(group_name, sort_descending, key_name, key_value) { if (sort_descending === undefined) { sort_descending = true; } var _local2 = getSaveGroup(group_name); if (!_local2) { var _local3 = new com.newgrounds.APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name."); sendError({command_id:"loadFilesByDate"}, _local3); return(undefined); } var _local1 = new com.newgrounds.SaveGroupQuery(_local2); if (key_name) { _local1.addKeyCondition(key_name, "=", key_value); } _local1.sortOn("CREATED_ON", (sort_descending ? "DESC" : "ASC")); _local1.execute(); } static function loadFilesByViews(group_name, sort_descending, key_name, key_value) { if (sort_descending === undefined) { sort_descending = true; } var _local2 = getSaveGroup(group_name); if (!_local2) { var _local3 = new com.newgrounds.APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name."); sendError({command_id:"loadFilesByViews"}, _local3); return(undefined); } var _local1 = new com.newgrounds.SaveGroupQuery(_local2); if (key_name) { _local1.addKeyCondition(key_name, "=", key_value); } _local1.sortOn("TOTAL_VIEWS", (sort_descending ? "DESC" : "ASC")); _local1.execute(); } static function loadFilesByRating(group_name, rating_name, sort_descending, key_name, key_value) { if (sort_descending === undefined) { sort_descending = true; } var _local2 = getSaveGroup(group_name); if (!_local2) { var _local3 = new com.newgrounds.APIError("QUERY_INCOMPLETE", "The query could not be preformed, check the spelling of your save group name."); sendError({command_id:"loadFilesByRating"}, _local3); return(undefined); } var _local1 = new com.newgrounds.SaveGroupQuery(_local2); if (key_name) { _local1.addKeyCondition(key_name, "=", key_value); } _local1.sortOnRating(rating_name, (sort_descending ? "DESC" : "ASC"), "score"); _local1.execute(); } static function lookupSaveFiles(save_group) { var _local1 = "lookupSaveFiles"; var _local2 = {publisher_id:publisher_id, group_id:save_group.getID(), query:com.newgrounds.encoders.JSON.encode(save_group.getQuery(true))}; sendCommand(_local1, _local2); } static function newSaveFile(group) { var _local1 = getSaveGroup(group); if (_local1) { return(_local1.newFile()); } var _local2 = new com.newgrounds.APIError("INVALID_SAVE_GROUP", "You can not create new files in invalid groups."); sendError({command_id:"newSaveFile"}, _local2); } static function newSaveQuery(group) { var _local1 = getSaveGroup(group); if (_local1) { return(_local1.newQuery()); } var _local2 = new com.newgrounds.APIError("INVALID_SAVE_GROUP", ("'" + group) + "' is not a valid save group."); sendError({command_id:"newSaveQuery"}, _local2); } static function checkFilePrivs(file) { if (user_id) { var _local1 = user_id; } else { var _local1 = 0; } var _local2 = {group:file.getGroup().getID(), filename:file.getName(), user_id:_local1, publisher_id:publisher_id}; sendCommand("checkFilePrivs", _local2); } static function saveFile(file, overwrite) { var _local1; _local1 = {group:file.getGroup().getID(), filename:file.getName(), description:file.getDescription(), draft:file.__get__draft(), user_name:user_name}; if (overwrite) { _local1.overwrite = overwrite; } if (file.getDuplicateID()) { _local1.save_id = file.getDuplicateID(); } if (file.getKeys().length > 0) { _local1.keys = file.getKeys(); } var _local3; _local3 = {file:file.getRawContents()}; if (file.getThumbnailImageScan()) { _local3.thumbnail = file.getThumbnailImageScan(); } save_file = file; sendSecureCommand("saveFile", _local1, null, _local3); } static function rateSaveFile(file, rating, vote) { var _local1 = {group:file.getGroup().getID(), save_id:file.getID(), rating_id:rating.rating_id, vote:vote, user_id:user_id}; sendSecureCommand("rateSaveFile", _local1); } static function getConfirmation(command_name, event, msg, target, confirm, cancel) { var _local1 = new com.newgrounds.APIError("CONFIRM_REQUEST", msg); _local1.confirm = function () { target[confirm](); }; _local1.cancel = function () { target[cancel](); }; _local1.command = command_name; callListener(event, false, _local1); } static function onRemoteAuthentication(auth_result) { var _local1 = com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(auth_result, encryption_key)); delete remote_auth; user_id = _local1.NewgroundsAPI_UserID; user_name = _local1.NewgroundsAPI_UserName; session_id = _local1.NewgroundsAPI_SessionID; publisher_id = _local1.NewgroundsAPI_PublisherID; } static function doEvent(e) { switch (e.command_id) { case "connectMovie" : clearInterval(timeout); sendMessage("You have successfully connected to the Newgrounds API Gateway"); sendMessage(("Movie identified as \"" + e.movie_name) + "\""); callListener(com.newgrounds.APIEvent.API_CONNECTED, e.success, {title:e.movie_name}); var _local7 = false; if (e.ad_status === -1) { var _local11 = "This movie was not approved to run Flash Ads."; sendWarning(_local11); sendWarning(("visit " + AD_TERMS_URL) + " to view our approval guidelines"); if (!e.ad_url) { callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError("FLASH_ADS_NOT_APPROVED", _local11)); } else { _local7 = true; } } else if (e.ad_status === 0) { var _local11 = "Flash Ads are currently awaiting approval."; sendNotice(_local11); if (!e.ad_url) { callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError("FLASH_ADS_NOT_APPROVED", _local11)); } else { _local7 = true; } } if (e.ad_url) { ad_url = unescape(e.ad_url); if (!_local7) { sendMessage("This movie has been approved to run Flash Ads!"); } callListener(com.newgrounds.APIEvent.ADS_APPROVED, true); } if (e.deny_host) { var _local11 = getHost() + " does not have permission to run this movie!"; sendWarning(_local11); sendWarning("\tUpdate your API configuration to unblock " + getHost()); callListener(com.newgrounds.APIEvent.HOST_BLOCKED, true, {real_url:unescape(e.movie_url), url:getOfficialURL()}); } else if (e.movie_version) { sendWarning("According to your API Configuration, this version is out of date."); if (version) { sendWarning("\tThe this movie is version " + version); } sendWarning("\tThe most current version is " + e.movie_version); callListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, true, {version:e.movie_version, real_url:unescape(e.movie_url), url:getOfficialURL()}); } if (e.request_portal_url) { sendCommand("setPortalID", {portal_url:_url}); } if (preload) { reportNewAsset(); var _local8 = {}; if (hasUserSession()) { _local8.publisher_id = publisher_id; _local8.user_id = user_id; } sendCommand("preloadSettings", _local8); } reportAssetLoaded(); break; case "preloadSettings" : if (e.medals) { populateMedals(e.medals); if ((!hasUserSession()) and (!debug)) { echo("checking for sharedobject medals..."); var _local4 = loadLocal("medals_unlocked"); if (_local4) { for (var _local32 in _local4) { var _local32 = Number(_local32); if (_local4[_local32]) { var _local3 = getMedal(_local32); echo("now unlocking " + _local3.getName()); _local3.setUnlocked(true); } } } } } if (e.save_groups) { populateSaveGroups(e.save_groups, e.save_file_path); } if (e.score_boards) { populateScoreBoards(e.score_boards); } if (_root.NewgroundsAPI_SaveFileID && (_root.NewgroundsAPI_SaveGroupID)) { callListener(com.newgrounds.APIEvent.FILE_REQUESTED, true, {save_id:_root.NewgroundsAPI_SaveFileID, group:getSaveGroup(_root.NewgroundsAPI_SaveGroupID)}); } callListener(com.newgrounds.APIEvent.METADATA_LOADED, true); reportAssetLoaded(); break; case "logCustomEvent" : if (e.success) { sendMessage(("Event '" + e.event) + "' was logged."); } callListener(com.newgrounds.APIEvent.EVENT_LOGGED, e.success, {event:e.event}); break; case "postScore" : var _local9; if (e.success) { var _local5 = "User"; if (user_email) { _local5 = user_email; } else if (user_name) { _local5 = user_name; } var _local19 = getScoreBoard(e.board); sendMessage(((((_local5 + " posted ") + e.value) + " to '") + _local19.name) + "'"); _local9 = {board:_local19, value:e.value, username:_local5}; } callListener(com.newgrounds.APIEvent.SCORE_POSTED, e.success, _local9); break; case "loadScores" : _local9 = new Object(); var _local19 = getScoreBoard(e.board); if (_local19.exists()) { _local19.setScores(e.scores, e.period, e.page, e.num_results); } callListener(com.newgrounds.APIEvent.SCORES_LOADED, e.success, {board:_local19}); break; case "unlockMedal" : var _local24 = getMedal(e.medal_name); _local24.setUnlocked(true); sendMessage(("Successfuly unlocked '" + _local24.getName()) + "'"); callListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, e.success, {medal_id:_local24.id, medal:_local24}); break; case "getMedals" : populateMedals(e.medals); callListener(com.newgrounds.APIEvent.MEDALS_LOADED, e.success, {medals:medals}); break; case "loadSaveFile" : var _local16 = getSaveGroup(e.group_id); var _local14 = new com.newgrounds.SaveFile(_local16); _local14.id = e.file.save_id; _local14.name = e.file.filename; _local14.fileUrl = e.file.file; _local14.thumbnailUrl = e.file.thumb; _local14.authorName = e.file.user_name; _local14.authorId = e.file.user_id; _local14.description = e.file.description; _local14.setPermissions(e.file.status, e.file.locked); for (var _local6 in e.file.keys) { _local14.setKey(e.file.keys[_local6].id, e.file.keys[_local6].value); } for (var _local6 in e.file.ratings) { _local14.setRating(e.file.ratings[_local6].id, e.file.ratings[_local6].votes, e.file.ratings[_local6].score); } if (e.get_contents) { _local14.loadContents(); } callListener(com.newgrounds.APIEvent.FILE_INITIALIZED, e.success, {save_id:_local14.id, file:_local14}); save_file = _local14; break; case "lookupSaveFiles" : var _local12 = getSaveGroup(e.group_id).getQuery(); _local12.onExecuted(e.files); break; case "rateSaveFile" : _local16 = getSaveGroup(e.group_id); _local14 = _local16.getFile(e.save_id); if (e.already_voted) { var _local27 = new com.newgrounds.APIError("PERMISSION_DENIED", "You have already voted on this item today"); callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {error:_local27, file:_local14, save_id:_local14.id}); return(undefined); } if (e.success) { var _local10 = _local14.onVoted(e); callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {rating:_local10, file:_local14, save_id:_local14.id}); } else { callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {file:_local14, save_id:_local14.id}); sendError("Your vote was not accepted."); } break; case "saveFile" : if (save_file) { if (!save_file.exists()) { save_file.setID(e.save_id, true); } save_file.onSaved(e); callListener(com.newgrounds.APIEvent.FILE_SAVED, e.success, {save_id:save_file.__get__id(), file:save_file}); if (e.success) { sendMessage(((("You just saved a new file (id #" + e.save_id) + ") to the '") + save_file.__get__group().__get__name()) + "' save group."); } } save_file = null; break; case "checkFilePrivs" : _local9 = {file:save_file, filename:e.filename, group:e.group, exists:e.exists, can_write:e.can_write}; if (e.duplicate_id) { _local9.duplicate_id = e.duplicate_id; } if (!e.success) { sendWarning("You do not have permission to save this file!"); } callListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, e.success, _local9); } } static function getDispatcher() { if (!eventDispatcher) { eventDispatcher = new com.newgrounds.APIEventDispatcher(); } return(eventDispatcher); } static function hasEventListener(event) { return(getDispatcher().hasEventListener(event)); } static function addEventListener(event, listener, target) { echo(("Adding a listener for '" + event) + "'"); getDispatcher().addEventListener(event, listener, target); } static function removeEventListener(event, target) { getDispatcher().removeEventListener(event, target); } static function callListener(event, success, data, target) { echo("Fired Event: " + event); var _local2 = new com.newgrounds.APIEvent(event, success, data); getDispatcher().dispatchEvent(_local2); if ((event == com.newgrounds.APIEvent.API_CONNECTED) && (!success)) { connected = false; } bridge.sendEvent(event, {success:success, data:data}); } static function sendError(c, e) { switch (c.command_id) { case "connectMovie" : clearInterval(timeout); callListener(com.newgrounds.APIEvent.API_CONNECTED, false, {error:e, response:c}); break; case "saveFile" : callListener(com.newgrounds.APIEvent.FILE_SAVED, false, {error:e, file:save_file, response:c}); save_file = null; } var _local3 = (((((("[Newgrounds API ERROR] :: " + c.command_id) + "() - ") + e.name) + ":") + newline) + "\t\t\t\t") + e.message; trace(_local3); bridge.sendEvent("trace", {data:_local3}); } static function sendWarning(m, c) { if (c) { m = m + ((("\r[Newgrounds API WARNING] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information."); } var _local1 = "[Newgrounds API WARNING] :: " + m; trace(_local1); bridge.sendEvent("trace", {data:_local1}); } static function sendNotice(m, c) { if (c) { m = m + ((("\r[Newgrounds API NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information."); } trace("[Newgrounds API NOTICE] :: " + m); } static function fatalError(m, c) { if (c) { m = m + ((("\r\tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information."); } throw (((("***ERROR*** frame=" + _root._currentframe) + ", class=API") + newline) + newline) + m; } static function openLoginPage() { if (hasUserSession()) { return(undefined); } if (!remote_auth) { var _local1 = com.newgrounds.encoders.MD5.calculate((Math.random() + "a") + movie_id); _local1 = "POOPYPANTS"; remote_auth = new com.newgrounds.RemoteAuth(_local1); } var _local2 = com.newgrounds.encoders.RC4.encrypt(remote_auth.__get__token(), encryption_key); getURL ((((LOGIN_URL + "?api_auth_id=") + movie_id) + "&api_auth_key=") + _local2, "_blank"); } static function sendSecureCommand(command, secure_params, unsecure_params, files) { if (((!debug) && (!hasUserSession())) && (!hasUserEmail())) { 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) { fatalError("Missing command", "sendSecureCommand"); } if (!secure_params) { fatalError("Missing secure_params", "sendSecureCommand"); } if (!unsecure_params) { unsecure_params = new Object(); } var _local2 = ""; var _local1 = 0; while (_local1 < 16) { _local2 = _local2 + compression_radix.charAt(Math.floor(Math.random() * compression_radix.length)); _local1++; } if ((debug && (!fake_session)) && (!session_id)) { secure_params.session_id = ""; } else { secure_params.session_id = session_id; } secure_params.as_version = 2; secure_params.user_email = user_email; secure_params.publisher_id = publisher_id; secure_params.seed = _local2; secure_params.command_id = command; var _local8 = com.newgrounds.encoders.JSON.encode(secure_params); var _local9 = com.newgrounds.encoders.MD5.calculate(_local2); var _local6 = com.newgrounds.encoders.RC4.encrypt(_local8, encryption_key); var _local7 = _local9 + _local6; unsecure_params.secure = compressHex(_local7); sendCommand("securePacket", unsecure_params, false, files); } static function sendCommand(command, params, open_browser, files) { if ((!connected) and (command != "connectMovie")) { var _local12 = (("API." + command) + "() - API.connect() must be called before this command can be called") + newline; fatalError(_local12, "connect"); } if (open_browser) { var _local2 = new Object(); } else { var _local2 = new LoadVars(); } _local2.command_id = command; _local2.tracker_id = movie_id; if (debug) { _local2.debug = debug; } if (params) { for (var _local9 in params) { _local2[_local9] = params[_local9]; } } if (files) { for (var _local9 in files) { _local2[_local9] = files[_local9]; } } if (open_browser) { var _local6 = (GATEWAY_URL + "?seed=") + Math.random(); for (var _local9 in _local2) { _local6 = _local6 + ((("&" + escape(_local9)) + "=") + escape(_local2[_local9])); } trace("OPENING " + _local6); getURL (_local6, "_blank"); _local2.removeMovieClip(); } else { var _local10 = new LoadVars(); _local10.remember_command_id = _local2.command_id; _local10.onData = function (data) { com.newgrounds.API.echo(("INPUT: \r" + data) + newline); if (data) { var _local2 = com.newgrounds.encoders.JSON.decode(data); } else { var _local2 = {success:false}; } if (!_local2.success) { if ((!_local2.error_code) && (!_local2.error_msg)) { _local2.error_code = "CONNECTION_FAILED"; _local2.error_msg = "Could not contact the API Gateway"; _local2.command_id = this.remember_command_id; } var _local4 = new com.newgrounds.APIError(_local2.error_code, _local2.error_msg); com.newgrounds.API.sendError(_local2, _local4); } else { com.newgrounds.API.doEvent(_local2); } }; var _local7 = new Array(); for (var _local8 in _local2) { _local7.push((_local8 + "=") + escape(_local2[_local8])); } echo((("POST " + GATEWAY_URL) + "?") + _local7.join("&")); _local2.sendAndLoad((GATEWAY_URL + "?seed=") + Math.random(), _local10, "POST"); last_command = _local2.command_id; } } static function renderAd(target) { if (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 (ad_swf_url, target.clip.ad); callListener(com.newgrounds.APIEvent.AD_ATTACHED, true, {target:target}); } else { callListener(com.newgrounds.APIEvent.AD_ATTACHED, false, new com.newgrounds.APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")); } } static function attachFlashAd(target) { System.security.allowDomain("http://server.cpmstar.com"); System.security.allowDomain("http://www.cpmstar.com"); System.security.allowDomain("https://server.cpmstar.com"); System.security.allowDomain("https://www.cpmstar.com"); System.security.allowInsecureDomain("http://server.cpmstar.com"); System.security.allowInsecureDomain("http://www.cpmstar.com"); System.security.allowInsecureDomain("https://server.cpmstar.com"); System.security.allowInsecureDomain("https://www.cpmstar.com"); if (checkAdFlood()) { ad_swf_url = null; } else if (checkAdCache()) { reportNewAsset(); var _local1 = new LoadVars(); _local1.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 (ad_url.indexOf("?") > -1) { _local1.load((ad_url + "&random=") + Math.random()); } else { _local1.load((ad_url + "?random=") + Math.random()); } if (!ad_warning) { ad_warning = true; sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!"); } } else if (ad_swf_url) { renderAd(target); } } static function checkAdFlood() { if (!ad_url) { return(false); } var _local2 = new Date(); var _local1 = _local2.getTime(); if (_local1 >= ad_flood) { if ((_local1 - ad_flood) > 1000) { ad_flood = _local1 + 1000; } else { ad_flood = _local1; 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); } static function checkAdCache() { if (!ad_url) { return(false); } var _local2 = new Date(); var _local1 = _local2.getTime(); if (_local1 >= ad_url_cache) { ad_url_cache = _local1 + 300000; return(true); } return(false); } static function sendMessage(m, r) { var _local1 = "[Newgrounds API] :: " + m; if (r) { return(_local1); } trace(_local1); bridge.sendEvent("trace", {data:_local1}); } static function echo(m) { if (do_echo) { trace(m); } } static var LOGIN_URL = "http://ng-local.newgrounds.com/apilogin/"; static var do_echo = true; static var GATEWAY_URL = "http://www.ngads.com/gateway_v2.php"; static var NEWGROUNDS_PREVIEW = "uploads.ungrounded.net/previews"; static var AD_TERMS_URL = "http://www.newgrounds.com/wiki/using-the-site/terms-of-use/flash-ads/"; static var COMMANDS_WIKI_URL = "http://www.newgrounds.com/wiki/developer-resources/flash-api/commands/"; static var LOCAL_HOST = "localhost"; static var NEWGROUNDS_WWW = "www.newgrounds.com"; static var PREVIEW_HOSTS = new Array(LOCAL_HOST, NEWGROUNDS_PREVIEW); static var ad_url_cache = 0; static var ad_flood = 0; static var ad_warning = false; static var save_file = null; static var publisher_id = 1; static var fake_session = false; static var medals = null; static var userpage_format = null; static var scoreboards = new Array(); static var save_groups = null; static var compression_radix = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X"; static var errors = com.newgrounds.APIError.init_codes(); static var sharedObjects = new Object(); static var bridge = new com.newgrounds.Bridge(_root.NewgroundsAPI_SandboxID); static var preload = true; static var preload_items = 0; static var preload_items_loaded = 0; }
Symbol 51 MovieClip [__Packages.com.newgrounds.Bridge] Frame 0
class com.newgrounds.Bridge { var _widgetId, _inConnection, _outConnection; function Bridge (id) { _widgetId = id; _inConnection = new LocalConnection(); _outConnection = new LocalConnection(); _inConnection.receiveEvent = receiveEvent; try { _inConnection.connect("rec_" + _widgetId); } catch(error) { } com.newgrounds.Logger.addEventListener(com.newgrounds.APIEvent.LOG, {target:this, func:onLogMessage}); } function onLogMessage(event) { try { _outConnection.send(_widgetId, "sendEvent", event.__get__data()); } catch(error) { } } function sendCommand(command, parameters) { } function receiveEvent(event, parameters) { } function onStatus(event) { } }
Symbol 47 MovieClip [__Packages.com.newgrounds.Event] Frame 0
class com.newgrounds.Event { var _type; function Event (type) { _type = type; } function get type() { return(_type); } }
Symbol 49 MovieClip [__Packages.com.newgrounds.APIEvent] Frame 0
class com.newgrounds.APIEvent extends com.newgrounds.Event { var _error, _success, _data, __get__type; function APIEvent (type, data, error) { super(type); if (data == undefined) { data = null; } if (error == undefined) { error = null; } if (((!error) || (error == "")) || (error == ERROR_NONE)) { _error = ERROR_NONE; _success = true; } else { _error = error; _success = false; } if (data) { _data = data; } else { _data = {}; } } function clone() { return(new com.newgrounds.APIEvent(__get__type(), _data, _error)); } function get success() { return(_success); } function get data() { return(_data); } function get error() { return(_error); } static var COMMAND_COMPLETE = "commandComplete"; static var MEDAL_UNLOCK_CONFIRMED = "medalUnlockConfirmed"; static var ICON_LOADED = "iconLoaded"; static var API_CONNECTED = "movieConnected"; static var LOG = "log"; static var MEDAL_UNLOCKED = "medalUnlocked"; static var SCORES_LOADED = "scoresLoaded"; static var SCORE_POSTED = "scorePosted"; static var QUERY_COMPLETE = "queryComplete"; static var FILE_LOADED = "fileLoaded"; static var FILE_SAVED = "fileSaved"; static var VOTE_COMPLETE = "voteComplete"; static var ERROR_NONE = "noError"; static var ERROR_UNKNOWN = "unknownError"; static var ERROR_COMMAND_FAILED = "commandFailed"; static var ERROR_NOT_CONNECTED = "notConnected"; static var ERROR_INVALID_ARGUMENT = "invalidArgument"; static var ERROR_TIMED_OUT = "timedOut"; static var ERROR_BAD_FILE = "badFile"; static var ERROR_BAD_RESPONSE = "badResponse"; static var ERROR_SENDING_COMMAND = "errorSendingCommand"; static var ERROR_HOST_BLOCKED = "hostBlocked"; static var ERROR_ALREADY_VOTED = "alreadyVoted"; static var ERROR_NOT_LOGGED_IN = "notLoggedIn"; }
Symbol 56 MovieClip [__Packages.com.newgrounds.APIConnection] Frame 0
class com.newgrounds.APIConnection { var _hostURL, hostDomain, sessionId, publisherId, encryptionKey, userEmail, username, userId, userpageFormat, initialized; function APIConnection () { reset(); } function get hostURL() { return(_hostURL); } function set hostURL(value) { _hostURL = value; hostDomain = null; if ((_hostURL && (_hostURL.indexOf("file://") != -1)) || (_hostURL == "localhost")) { hostDomain = _hostURL.split("/")[2]; } if (!hostDomain) { hostDomain = "localhost"; } //return(hostURL); } function get sandboxType() { return(System.security.sandboxType); } function get isNetworkHost() { switch (sandboxType) { case "localWithFile" : case "localWithNetwork" : case "localTrusted" : case "application" : return(false); case "remote" : } return(true); } function get hasUserSession() { return(((sessionId != null) && (sessionId != "")) && (publisherId != 0)); } function get connected() { return(connectionState == CONNECTED); } function reset() { connectionState = NOT_CONNECTED; encryptionKey = null; sessionId = null; userEmail = null; username = null; userId = 0; userpageFormat = 0; } function assertInitialized() { if (!initialized) { com.newgrounds.Logger.logError("You must initialized the API using API.connect() before using this command."); return(false); } return(true); } function assertConnected() { if ((!connectionState) == CONNECTED) { com.newgrounds.Logger.logError("You must establish a connection using API.connect() before using this command."); return(false); } return(true); } function sendSimpleCommand(command, completeHandler, parameters, secureParameters) { if (parameters == undefined) { parameters = null; } if (secureParameters == undefined) { secureParameters = null; } var _local2 = new com.newgrounds.APICommand(command); _local2.__set__parameters(parameters); _local2.__set__secureParameters(secureParameters); if (completeHandler != null) { _local2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, completeHandler); } _local2.send(this); } function sendCommand(command) { command.send(this); } function loadInBrowser(command, newWindow, parameters) { if (newWindow == undefined) { newWindow = true; } if (parameters == undefined) { parameters = null; } var _local2 = new com.newgrounds.APICommand(command); _local2.__set__parameters(parameters); _local2.loadInBrowser(this, newWindow); } static var NOT_CONNECTED = "notConnected"; static var CONNECTING = "connecting"; static var CONNECTED = "connected"; var connectionState = NOT_CONNECTED; var apiURL = "http://www.ngads.com/gateway_v2.php"; }
Symbol 48 MovieClip [__Packages.com.newgrounds.EventDispatcher] Frame 0
class com.newgrounds.EventDispatcher { var _listeners; function EventDispatcher () { _listeners = {}; } function addEventListener(type, listener) { if (!_listeners[type]) { _listeners[type] = []; } if (typeof(listener) == "function") { _listeners[type].push({target:null, func:listener}); } else { _listeners[type].push(listener); } } function removeEventListener(type, listener) { var _local3 = _listeners[type]; if (_local3) { var _local5 = _local3.length; var _local2 = 0; while (_local2 < _local5) { if ((_local3[_local2].func == listener) || (_local3[_local2] == listener)) { _local3.splice(_local2, 1); return(undefined); } _local2++; } } } function dispatchEvent(event) { var _local4 = _listeners[event.__get__type()]; if (_local4) { var _local5 = _local4.length; var _local2 = 0; while (_local2 < _local5) { var _local3 = _local4[_local2]; _local3.func.call(_local3.target, event); _local2++; } } return(true); } }
Symbol 52 MovieClip [__Packages.com.newgrounds.APIEventDispatcher] Frame 0
class com.newgrounds.APIEventDispatcher extends com.newgrounds.EventDispatcher { static var _globalDispatcher; function APIEventDispatcher () { super(); } static function get globalDispatcher() { return(_globalDispatcher); } static function set globalDispatcher(value) { _globalDispatcher = value; //return(globalDispatcher); } static function initEventQueue() { setInterval(runEventQueue, 50); return([]); } function dispatchEvent(event) { _eventQueue.push({dispatcher:this, event:event}); return(true); } function actualDispatchEvent(event) { var _local3 = super.dispatchEvent(event); if (_globalDispatcher && (this != _globalDispatcher)) { _globalDispatcher.dispatchEvent(event); } } static function runEventQueue(event) { var _local3 = _eventQueue.length; if (_local3) { var _local4 = _eventQueue; _eventQueue = []; var _local1 = 0; while (_local1 < _local3) { var _local2 = _local4[_local1]; _local2.dispatcher.actualDispatchEvent(_local2.event); _local1++; } } } static var _eventQueue = initEventQueue(); }
Symbol 55 MovieClip [__Packages.com.newgrounds.APICommand] Frame 0
class com.newgrounds.APICommand extends com.newgrounds.APIEventDispatcher { var _command, _parameters, _secureParameters, _hasTimeout, _preventCache, _files, _loader, _timeoutTimer, dispatchEvent; function APICommand (command) { super(); _command = command; _parameters = new Object(); _secureParameters = new Object(); _hasTimeout = true; } static function stopPendingCommands() { for (var _local2 in _pendingCommands) { var _local1 = _pendingCommands[_local2]; _local1.close(); } _pendingCommands = []; } static function onThrottleTimer(event) { if (_throttleCount > 0) { _throttleCount--; } if (_commandQueue.length) { var _local1 = _commandQueue.shift(); _local1.command.send(_local1.connection); } } static function encryptHex(hexValue) { var _local4 = hexValue.length % 6; var _local3 = ""; var _local1 = 0; while (_local1 < hexValue.length) { _local3 = _local3 + _encryptor.encodeUint(int("0x" + hexValue.substr(_local1, 6)), 4); _local1 = _local1 + 6; } return(_local4.toString() + _local3); } function get command() { return(_command); } function set command(value) { _command = value; //return(command); } function get hasTimeout() { return(_hasTimeout); } function set hasTimeout(val) { _hasTimeout = val; //return(hasTimeout); } function get parameters() { return(_parameters); } function set parameters(object) { _parameters = new Object(); if (object) { for (var _local3 in object) { _parameters[_local3] = object[_local3]; } } //return(parameters); } function get preventCache() { return(_preventCache); } function set preventCache(value) { _preventCache = value; //return(preventCache); } function get secureParameters() { return(_secureParameters); } function set secureParameters(object) { _secureParameters = new Object(); if (object) { for (var _local3 in object) { _secureParameters[_local3] = object[_local3]; } } //return(secureParameters); } function get hasSecureParameters() { for (var _local2 in _secureParameters) { return(true); } return(false); } function addFile(filename, data, dataField, contentType) { if (contentType == undefined) { contentType = "application/octet-stream"; } if (!_files) { _files = new Object(); } var _local3 = {filename:filename, data:data, dataField:dataField, contentType:contentType}; _files[filename] = _local3; } function removeFile(filename) { if (_files) { delete _files[filename]; } } function clearFiles() { _files = null; } function close() { if (_loader) { clearInterval(_timeoutTimer); var _local2 = 0; while (_local2 < _pendingCommands.length) { if (_pendingCommands[_local2] == this) { _pendingCommands.splice(_local2, 1); break; } _local2++; } _loader = null; } } function loadInBrowser(connection, newWindow) { _parameters.command_id = _command; _parameters.tracker_id = (connection.apiId ? (connection.apiId) : 1); if (connection.debug) { _parameters.debug = 1; } var _local3 = (connection.apiURL + "?host=") + escape(connection.hostDomain); for (var _local4 in _parameters) { _local3 = _local3 + ((("&" + escape(_local4)) + "=") + escape(_parameters[_local4])); } var _local6; if (newWindow) { _local6 = "_blank"; } else { _local6 = "_top"; } _root.getURL(_local3, _local6); } function send(connection) { if (_throttleCount >= THROTTLE_THRESHOLD) { _commandQueue.push({connection:connection, command:this}); } else { sendInternal(connection); } } function sendInternal(connection) { var _local4; _local4 = new LoadVars(); _local4.command_id = _command; _local4.tracker_id = connection.apiId; if (connection.debug) { _local4.debug = 1; } if (_preventCache) { _local4.seed = Math.random(); } var _local2; var _local3; var _local7; for (_local2 in _parameters) { _local3 = _parameters[_local2]; if (_local3 != null) { if (typeof(_local3) == "boolean") { _local4[_local2] = int(_local3); } else { _local4[_local2] = _local3; } } } if (hasSecureParameters) { var _local6 = new Object(); for (_local2 in _secureParameters) { _local3 = _secureParameters[_local2]; if (_local3 != null) { if (typeof(_local3) == "boolean") { _local6[_local2] = int(_local3); } else { _local6[_local2] = _local3; } } } var _local8 = ""; _local7 = 0; while (_local7 < 16) { _local8 = _local8 + ENCRYPTOR_RADIX.charAt(int(Math.random() * ENCRYPTOR_RADIX.length)); _local7++; } _local4.command_id = "securePacket"; _local6.command_id = _command; _local6.as_version = 3; _local6.session_id = connection.sessionId; _local6.user_email = connection.userEmail; _local6.publisher_id = connection.publisherId; _local6.seed = _local8; var _local13 = com.newgrounds.crypto.MD5.hash(_local8); var _local11 = com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(_local6), connection.encryptionKey); _local4.secure = encryptHex(_local13 + _local11); } com.newgrounds.Logger.logInternal("Sending packet:", _local4); var _local12; _local12 = "application/x-www-form-urlencoded"; for (_local2 in _local4) { if (typeof(_local4[_local2]) == "object") { _local4[_local2] = com.newgrounds.encoders.json.JSON.encode(_local4[_local2]); } } if (_files) { for (var _local10 in _files) { var _local5 = _files[_local10]; if (typeof(_local5.data) == "string") { _local4[_local10] = _local5.data; } else { _local4[_local10] = com.newgrounds.encoders.json.JSON.encode(_local5.data); } } } _pendingCommands.push(this); _throttleCount++; startLoader(connection.apiURL, _local4, _local12); } function startLoader(url, data, contentType) { _loader = LoadVars(data); _loader.onData = as2CompleteHandler; _loader.contentType = contentType; _loader.sendAndLoad(url, _loader, "POST"); if (_hasTimeout) { setInterval(this, onTimeout, TIMEOUT_INTERVAL); } } function as2CompleteHandler(data) { var _local3; var _local2 = 0; while (_local2 < _pendingCommands.length) { if (_pendingCommands[_local2]._loader == this) { _local3 = _pendingCommands[_local2]; break; } _local2++; } _local3.onComplete(data); } function onTimeout(event) { close(); com.newgrounds.Logger.logError("Command timed out."); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_TIMED_OUT)); } function onError(error) { com.newgrounds.Logger.logError("Error when sending command:", error); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_UNKNOWN)); close(); } function onComplete(data) { try { if ((!data) || (data == "")) { throw new Error(); } com.newgrounds.Logger.logInternal("Received packet:", data); var _local2 = com.newgrounds.encoders.json.JSON.decode(data); if (!_local2) { throw new Error(); } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, _local2, ((_local2 && (_local2.success)) ? (com.newgrounds.APIEvent.ERROR_NONE) : (com.newgrounds.APIEvent.ERROR_COMMAND_FAILED)))); } catch(e:Error) { com.newgrounds.Logger.logError("Invalid response returned from server: " + data); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_BAD_RESPONSE)); } close(); } static var TIMEOUT_INTERVAL = 10000; static var THROTTLE_INTERVAL = 5000; static var THROTTLE_THRESHOLD = 7; static var _throttleCount = 0; static var _commandQueue = []; static var _throttleTimer = setInterval(onThrottleTimer, THROTTLE_INTERVAL); static var ENCRYPTOR_RADIX = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X"; static var _encryptor = new com.newgrounds.encoders.BaseN(ENCRYPTOR_RADIX); static var _pendingCommands = []; static var CRLF = "\r\n"; }
Symbol 53 MovieClip [__Packages.com.newgrounds.encoders.BaseN] Frame 0
class com.newgrounds.encoders.BaseN { var _hash, _base, _reverseHash; function BaseN (hash) { if (hash) { _hash = hash; } else { _hash = DEFAULT_HASH; } _base = _hash.length; _reverseHash = new Object(); var _local2 = 0; while (_local2 < _hash.length) { _reverseHash[_hash.charAt(_local2)] = _local2; _local2++; } } function encodeUint(number, minimumChars) { if (minimumChars == undefined) { minimumChars = 1; } var _local2 = ""; var _local3 = number; while (_local3 != 0) { _local2 = _hash.charAt(_local3 % _base) + _local2; _local3 = _local3 / _base; _local3 = int(_local3); } while (_local2.length < minimumChars) { _local2 = _hash.charAt(0) + _local2; } return(_local2); } function decodeUint(encodedNumber) { var _local3 = 0; var _local2 = 0; while (_local2 < encodedNumber.length) { _local3 = _local3 * _base; _local3 = _local3 + _reverseHash[encodedNumber.charAt(_local2)]; _local2++; } return(_local3); } static var DEFAULT_HASH = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/"; }
Symbol 64 MovieClip [__Packages.com.newgrounds.SaveFile] Frame 0
class com.newgrounds.SaveFile extends com.newgrounds.APIEventDispatcher { static var _currentFile; var _iconLoader, _group, _name, _description, _id, _data, _dataLoader, _fileSize, _readOnly, _draft, _authorId, _authorName, _views, _createdDate, _modifiedDate, dispatchEvent, _encodedIcon, _encodedData, _encoderQueue, _encoding, _dataLoaded, _encodingParent, _encodingProperty, _dataURL; function SaveFile (group) { super(); _iconLoader = new com.newgrounds.BitmapLoader(DEFAULT_ICON, null); _group = group; } static function get currentFile() { return(_currentFile); } static function fromObject(group, fileData) { var _local4 = new com.newgrounds.SaveFile(group); _local4._name = fileData.filename; _local4._description = fileData.description; _local4._id = fileData.save_id; _local4._authorId = fileData.user_id; _local4._authorName = fileData.user_name; _local4._createdDate = fileData.created; _local4._modifiedDate = fileData.last_update; _local4._views = fileData.views; if (fileData.thumb && (fileData.thumb != "")) { _local4._iconLoader.__set__url(_imageFilePath + fileData.thumb); } _local4._dataURL = _saveFilePath + fileData.file; _local4._fileSize = fileData.file_size; _local4._approved = fileData.status != STATUS_UNAPPROVED; _local4._readOnly = false; _local4._public = (fileData.status != STATUS_PRIVATE) && (fileData.status != STATUS_UNAPPROVED); for (var _local8 in fileData.keys) { var _local6 = fileData.keys[_local8]; var _local2 = group.getKeyById(_local6.id); if (_local2) { _local4._keys[_local2.__get__name()] = _local2.validateValue(_local6.value); } } for (var _local9 in fileData.ratings) { var _local5 = fileData.ratings[_local9]; var _local3 = group.getRatingById(_local5.id); if (_local3) { _local4._ratings[_local3.__get__name()] = _local3.validateValue(_local5.score); } } return(_local4); } function get group() { return(_group); } function get name() { return(_name); } function set name(val) { _name = val; //return(name); } function get description() { return(_description); } function set description(val) { _description = val; //return(description); } function get id() { return(_id); } function get data() { return(_data); } function set data(val) { _data = val; //return(data); } function get bytesLoaded() { if (_data) { return(bytesTotal); } if (!_dataLoader) { return(0); } return(_dataLoader.getBytesLoaded()); } function get bytesTotal() { return(_fileSize); } function get readOnly() { return(_readOnly); } function get draft() { return(_draft); } function set draft(v) { _draft = v; //return(draft); } function get authorId() { return(_authorId); } function get authorName() { return(_authorName); } function get keys() { return(_keys); } function get ratings() { return(_ratings); } function get views() { return(_views); } function get createdDate() { return(_createdDate); } function get updatedDate() { return(_modifiedDate); } function toString() { return("Save File: " + _name); } function get icon() { return(_iconLoader.__get__bitmapData()); } function set icon(v) { createIcon(v); //return(icon); } function get iconLoaded() { return(_iconLoader.__get__loaded()); } function createIcon(source) { var _local9 = new flash.display.BitmapData(ICON_WIDTH, ICON_HEIGHT, false, 0); var _local6; var _local5; var _local10 = 0; var _local8 = 0; if (source instanceof flash.display.BitmapData) { _local6 = source.width; _local5 = source.height; } else if (source instanceof MovieClip) { _local6 = source._width; _local5 = source._height; var _local7 = MovieClip(source).getBounds(source); _local10 = _local7.xMin; _local8 = _local7.yMin; } var _local3 = new flash.geom.Matrix(); var _local4; _local4 = Math.min(ICON_WIDTH / _local6, ICON_HEIGHT / _local5); _local3.translate(-_local10, -_local8); _local3.scale(_local4, _local4); _local3.translate((ICON_WIDTH - (_local6 * _local4)) / 2, (ICON_HEIGHT - (_local5 * _local4)) / 2); _local9.draw(source, _local3); _iconLoader.__set__bitmapData(_local9); } function attachIcon(parent) { if (_iconLoader) { return(_iconLoader.attachBitmap(parent)); } com.newgrounds.Logger.logError("No icon available for this sumbission."); return(null); } function save() { if (!_group.__get__connection().__get__hasUserSession()) { com.newgrounds.Logger.logError("The user must be logged-in to save a file."); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN)); return(undefined); } _currentFile = this; if (iconLoaded) { ICON_IMAGE_SCANNER.encode(icon, onIconEncoded, this); } else { encodeData(true); } } function onIconEncoded(encodedIcon) { _encodedIcon = encodedIcon; encodeData(true); } function doSave() { var _local4 = new com.newgrounds.APICommand("saveFile"); _local4.__get__secureParameters().group = _group.id; _local4.__get__secureParameters().user_name = _group.__get__connection().username; _local4.__get__secureParameters().filename = _name; _local4.__get__secureParameters().description = _description; if (_draft) { _local4.__get__secureParameters().draft = true; } if (_id && (!_readOnly)) { _local4.__get__secureParameters().overwrite = 1; _local4.__get__secureParameters().save_id = _id; } var _local8 = []; for (var _local9 in _keys) { var _local2 = _group.getKey(_local9); if (_local2) { _local8.push({id:_local2.__get__id(), value:_local2.validateValue(_keys[_local9])}); } else { com.newgrounds.Logger.logError(((("No key named \"" + _local9) + "\" in save group \"") + _group.__get__name()) + "\"."); } } _local4.__get__secureParameters().keys = _local8; var _local7 = []; for (var _local10 in _ratings) { var _local3 = _group.getRating(_local10); if (_local3) { _local7.push({id:_local3.__get__id(), value:_local3.validateValue(_ratings[_local10])}); } else { com.newgrounds.Logger.logError(((("No rating named \"" + _local10) + "\" in save group \"") + _group.__get__name()) + "\"."); } } _local4.__get__secureParameters().ratings = _local7; if (typeof(_encodedData) == "string") { _local4.addFile("file", _encodedData, "file"); } else { _local4.addFile("file", com.newgrounds.encoders.json.JSON.encode(_encodedData), "file"); } if (iconLoaded) { _local4.addFile("thumbnail", _encodedIcon, "thumbnail"); } _local4.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {target:this, func:onSaveComplete}); _group.__get__connection().sendCommand(_local4); } function encodeData(encode) { _encoderQueue = []; _encoding = encode; if (encode) { _encodedData = _data; preEncodeObject(this, "_encodedData"); } else { preEncodeObject(this, "_data"); } encodeObject(); } function preEncodeObject(parent, property) { var _local3 = parent[property]; var _local5; try { if (_encoding) { _local5 = _local3 instanceof flash.display.BitmapData; } else { _local5 = _local3.type == "__bitmap"; } } catch(error) { } var _local2 = _local3; var _local8; if (_local5) { _encoderQueue.push({parent:parent, property:property}); } else if ((typeof(_local3) == "object") && (!_local8)) { if (_encoding) { if (_local3 instanceof Array) { _local2 = []; } else { _local2 = {}; } for (var _local4 in _local3) { _local2[_local4] = _local3[_local4]; } parent[property] = _local2; } for (var _local4 in _local2) { preEncodeObject(_local2, _local4); } } } function encodeObject() { if (!_encoderQueue.length) { if (_encoding) { doSave(); } else { _dataLoaded = true; checkLoadComplete(); } return(undefined); } var _local6 = _encoderQueue.pop(); var _local4 = _local6.parent; var _local3 = _local6.property; var _local2 = _local4[_local3]; var _local5; if (_encoding) { _local5 = {type:"__bitmap", width:_local2.width, height:_local2.height, transparent:_local2.transparent}; _local4[_local3] = _local5; _encodingParent = _local5; _encodingProperty = "data"; DATA_IMAGE_SCANNER.__set__encodeAlpha(_local2.transparent); DATA_IMAGE_SCANNER.encode(flash.display.BitmapData(_local2), encodeBitmapComplete, this); } else { _encodingParent = _local4; _encodingProperty = _local3; DATA_IMAGE_SCANNER.__set__encodeAlpha(_local2.transparent); DATA_IMAGE_SCANNER.decode(String(_local2.data), encodeBitmapComplete, this); } } function encodeBitmapComplete(data) { _encodingParent[_encodingProperty] = data; encodeObject(); } function load() { _currentFile = this; _dataLoaded = false; _data = null; if (!iconLoaded) { _iconLoader.addEventListener(com.newgrounds.APIEvent.ICON_LOADED, {target:this, func:onIconLoaded}); _iconLoader.load(); } _dataLoader = new LoadVars(); var file = this; _dataLoader.onData = function (data) { file.onDataLoaded(data); }; _dataLoader.load(_dataURL); } function onIconLoaded(event) { if ((!event.__get__success()) && (_iconLoader.__get__url())) { com.newgrounds.Logger.logWarning("Unable to load the icon for this save file."); } _iconLoader.removeEventListener(com.newgrounds.APIEvent.ICON_LOADED, onIconLoaded); checkLoadComplete(); } function checkLoadComplete() { if (_dataLoaded && (iconLoaded)) { com.newgrounds.Logger.logMessage("Data loaded."); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this)); } } function onDataLoaded(data) { try { if (data) { if (data.charAt(0) == "{") { _data = com.newgrounds.encoders.json.JSON.decode(String(data)); } else { _data = String(data); } encodeData(false); } } catch(error:Error) { com.newgrounds.Logger.logError("Error while loading data:", error); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE)); } } function onDataError(error) { com.newgrounds.Logger.logError("Unable to load data:", error); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE)); } function onSaveComplete(event) { if (event.__get__success()) { com.newgrounds.Logger.logMessage(("File \"" + _name) + "\" saved!"); if (event.__get__data()) { _id = event.__get__data().save_id; _dataURL = unescape(event.__get__data().file_url); } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this)); } else { com.newgrounds.Logger.logError(("Error saving file \"" + _name) + "\":", event.__get__error()); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this, event.__get__error())); } } function sendVote(ratingName, vote) { var _local2 = _group.getRating(ratingName); if (!_local2) { com.newgrounds.Logger.logError(("No save rating named \"" + ratingName) + "\" exists for this save group."); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT)); return(undefined); } vote = _local2.validateValue(vote); if (isNaN(vote)) { com.newgrounds.Logger.logError(((((((("Invalid vote (" + vote) + "). ") + ratingName) + " allows a range of ") + _local2.__get__minimum()) + "-") + _local2.__get__maximum()) + "."); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT)); return(undefined); } com.newgrounds.Logger.logMessage(((((("Voting " + vote) + " for ") + ratingName) + " on ") + _name) + "..."); _group.__get__connection().sendSimpleCommand("rateSaveFile", {target:this, func:onVoteComplete}, null, {group:_group.__get__id(), save_id:_id, rating_id:_local2.__get__id(), vote:vote}); } function onVoteComplete(event) { var _local2 = event.__get__error(); if (event.__get__data().already_voted) { com.newgrounds.Logger.logError("Vote failed. You've already voted on this rating today."); _local2 = com.newgrounds.APIEvent.ERROR_ALREADY_VOTED; } if (_local2 == com.newgrounds.APIEvent.ERROR_NONE) { var _local3 = _group.getRatingById(event.__get__data().rating_id); if (_local3) { _ratings[_local3.__get__name()] = _local3.validateValue(event.__get__data().score); } } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, this, _local2)); } function clone() { var _local3 = new com.newgrounds.SaveFile(_group); _local3._data = _data; _local3._description = _description; _local3._draft = _draft; _local3._fileSize = _fileSize; _local3._iconLoader.__set__bitmapData(_iconLoader.bitmapData); var _local2; for (_local2 in _keys) { _local3._keys[_local2] = _keys[_local2]; } for (_local2 in _ratings) { _local3._ratings[_local2] = _ratings[_local2]; } _local3._name = _name; return(_local3); } static var ICON_WIDTH = 90; static var ICON_HEIGHT = 90; static var DEFAULT_ICON = flash.display.BitmapData.loadBitmap("DefaultSaveIcon"); static var STATUS_PRIVATE = 0; static var STATUS_SHARED = 1; static var STATUS_UNAPPROVED = 2; static var STATUS_APPROVED = 3; static var _imageFilePath = ""; static var _saveFilePath = ""; static var ICON_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(); static var DATA_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(64, 6); var _keys = new Object(); var _ratings = new Object(); }
Symbol 54 MovieClip [__Packages.com.newgrounds.encoders.ImageScanner] Frame 0
class com.newgrounds.encoders.ImageScanner { var _baseN, _encodeAlpha, _maxPerChannel; function ImageScanner (hashLength, charsPerPixel) { if (hashLength) { _hash = DEFAULT_HASH.substr(0, hashLength); } _baseN = new com.newgrounds.encoders.BaseN(_hash); if (charsPerPixel) { _charsPerPixel = charsPerPixel; } encodeAlpha = (false); } function get encodeAlpha() { return(_encodeAlpha); } function set encodeAlpha(v) { _encodeAlpha = v; _maxPerChannel = int(Math.pow(_hash.length, _charsPerPixel / (_encodeAlpha ? 4 : 3))); if (_maxPerChannel > 256) { _maxPerChannel = 256; } //return(encodeAlpha); } function encode(source, callbackFunction, callbackObject) { var _local4 = {callbackFunction:callbackFunction, callbackObject:callbackObject, source:source, x:0, y:0, output:null}; var _local2 = source.width.toString(); var _local3 = source.height.toString(); while (_local2.length < 3) { _local2 = "0" + _local2; } while (_local3.length < 3) { _local3 = "0" + _local3; } _local4.output = _local2 + _local3; var _local6 = setInterval(this, "doEncode", WORK_INTERVAL, _local4); _local4.interval = _local6; } function decode(source, callbackFunction, callbackObject) { var _local2 = {callbackFunction:callbackFunction, callbackObject:callbackObject, source:source, i:6, x:0, y:0, output:null}; var _local5 = int(source.substr(0, 3)); var _local6 = int(source.substr(3, 3)); _local2.output = new flash.display.BitmapData(_local5, _local6, _encodeAlpha); var _local4 = setInterval(this, "doDecode", WORK_INTERVAL, _local2); _local2.interval = _local4; } function doEncode(state) { var _local3 = getTimer(); while ((state.y < state.source.height) && ((getTimer() - _local3) < WORK_INTERVAL)) { state.output = state.output + encodePixel(state.source.getPixel32(state.x, state.y)); state.x++; if (state.x == state.source.width) { state.x = 0; state.y++; } } if (state.y == state.source.height) { clearInterval(state.interval); state.callbackFunction.call(state.callbackObject, state.output); } } function doDecode(state) { var _local4 = getTimer(); while ((state.y < state.output.height) && ((getTimer() - _local4) < WORK_INTERVAL)) { var _local3 = decodePixel(state.source.substr(state.i, _charsPerPixel)); state.output.setPixel32(state.x, state.y, _local3); state.i = state.i + _charsPerPixel; state.x++; if (state.x == state.output.width) { state.x = 0; state.y++; } } if (state.y == state.output.height) { clearInterval(state.interval); state.callbackFunction.call(state.callbackObject, state.output); } } function encodePixel(pixel) { var _local3 = (pixel >> 24) & 255; var _local4 = (pixel >> 16) & 255; var _local5 = (pixel >> 8) & 255; var _local2 = pixel & 255; _local3 = int((_local3 / 256) * _maxPerChannel); _local4 = int((_local4 / 256) * _maxPerChannel); _local5 = int((_local5 / 256) * _maxPerChannel); _local2 = int((_local2 / 256) * _maxPerChannel); var _local7 = (((_local4 * _maxPerChannel) * _maxPerChannel) + (_local5 * _maxPerChannel)) + _local2; if (_encodeAlpha) { _local7 = _local7 + (((_local3 * _maxPerChannel) * _maxPerChannel) * _maxPerChannel); } return(_baseN.encodeUint(_local7, _charsPerPixel)); } function decodePixel(encodedPixel) { var _local3 = 255; var _local5; var _local6; var _local4; var _local7 = 0; var _local2 = _baseN.decodeUint(encodedPixel); _local4 = _local2 % _maxPerChannel; _local2 = _local2 / int(_maxPerChannel); _local6 = _local2 % _maxPerChannel; _local2 = _local2 / int(_maxPerChannel); _local5 = _local2 % _maxPerChannel; _local2 = _local2 / int(_maxPerChannel); if (_encodeAlpha) { _local3 = _local2 % _maxPerChannel; _local2 = _local2 / int(_maxPerChannel); } return((((_local3 << 24) | (_local5 << 16)) | (_local6 << 8)) | _local4); } static var DEFAULT_HASH = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&"; var _hash = DEFAULT_HASH; var _charsPerPixel = 2; static var WORK_INTERVAL = 33.3333333333333; }
Symbol 63 MovieClip [__Packages.com.newgrounds.SaveGroup] Frame 0
class com.newgrounds.SaveGroup { var _connection, _id, _name, _type, _keysArray, _ratingsArray, _keys, _ratings; function SaveGroup (connection, name, id, type, keys, ratings) { _connection = connection; _id = id; _name = name; _type = type; _keysArray = keys; _ratingsArray = ratings; _keys = new Object(); _ratings = new Object(); var _local11; for (var _local7 in keys) { var _local2 = keys[_local7]; _keys[_local2.__get__name()] = _local2; } for (var _local6 in ratings) { var _local3 = ratings[_local6]; _ratings[_local3.__get__name()] = _local3; } } function get connection() { return(_connection); } function get name() { return(_name); } function get type() { return(_type); } function get id() { return(_id); } function get keys() { return(_keysArray); } function get ratings() { return(_ratingsArray); } function getKey(name) { return(_keys[name]); } function getRating(name) { return(_ratings[name]); } function getKeyById(id) { for (var _local4 in _keys) { var _local2 = _keys[_local4]; if (_local2.__get__id() == id) { return(_local2); } } return(null); } function getRatingById(id) { for (var _local4 in _ratings) { var _local2 = _ratings[_local4]; if (_local2.__get__id() == id) { return(_local2); } } return(null); } function toString() { return((((("SaveGroup: " + name) + " Keys: ") + _keysArray) + " Ratings: ") + _ratingsArray); } static var TYPE_SYSTEM = 0; static var TYPE_PRIVATE = 1; static var TYPE_PUBLIC = 2; static var TYPE_MODERATED = 3; }
Symbol 61 MovieClip [__Packages.com.newgrounds.SaveKey] Frame 0
class com.newgrounds.SaveKey { var _name, _id, _type; function SaveKey (name, id, type) { _name = name; _id = id; _type = type; } function get name() { return(_name); } function get id() { return(_id); } function get type() { return(_type); } function validateValue(value) { switch (_type) { case TYPE_INTEGER : value = Number(value); if (!isNaN(value)) { var _local3 = int(value); if (_local3 != value) { com.newgrounds.Logger.logWarning(((((("Float value " + value) + " given for integer key \"") + _name) + "\". Clamping to ") + _local3) + "."); } return(_local3); } break; case TYPE_FLOAT : value = Number(value); if (!isNaN(value)) { return(isNaN(Number(value))); } break; case TYPE_BOOLEAN : return(Boolean(value)); case TYPE_STRING : return((value ? (value.toString()) : "")); } return(null); } function toString() { return(_name); } static var TYPE_FLOAT = 1; static var TYPE_INTEGER = 2; static var TYPE_STRING = 3; static var TYPE_BOOLEAN = 4; }
Symbol 62 MovieClip [__Packages.com.newgrounds.SaveRating] Frame 0
class com.newgrounds.SaveRating { var _name, _id, _isFloat, _minimum, _maximum; function SaveRating (name, id, isFloat, minimum, maximum) { _name = name; _id = id; _isFloat = isFloat; _minimum = minimum; _maximum = maximum; } function get name() { return(_name); } function get id() { return(_id); } function get isFloat() { return(_isFloat); } function get minimum() { return(_minimum); } function get maximum() { return(_maximum); } function validateValue(value) { var _local2 = Number(value); if (isNaN(_local2)) { com.newgrounds.Logger.logError(("Invalid value for rating \"" + _name) + "\"."); return(NaN); } if (_local2 < _minimum) { com.newgrounds.Logger.logWarning(((((_local2 + " is out of acceptable range for rating \"") + _name) + "\". Clamping to ") + _minimum) + "."); return(_minimum); } if (_local2 > _maximum) { com.newgrounds.Logger.logWarning(((((_local2 + " is out of acceptable range for rating \"") + _name) + "\". Clamping to ") + _maximum) + "."); return(_maximum); } if (!isFloat) { var _local3 = int(_local2); if (_local3 != _local2) { com.newgrounds.Logger.logWarning(((((("Float value " + _local2) + " given for integer rating \"") + _name) + "\". Clamping to ") + _local3) + "."); } return(_local3); } return(_local2); } function toString() { return(_name); } }
Symbol 60 MovieClip [__Packages.com.newgrounds.BitmapLoader] Frame 0
class com.newgrounds.BitmapLoader extends com.newgrounds.APIEventDispatcher { var _bitmapData, _url, _loader, _loaderClip, dispatchEvent; function BitmapLoader (defaultBitmap, url) { super(); _bitmapData = defaultBitmap; _url = url; } function get url() { return(_url); } function set url(v) { _loaded = false; _url = v; //return(url); } function get bitmapData() { return(_bitmapData); } function set bitmapData(v) { _bitmapData = v; _loaded = true; //return(bitmapData); } function get loaded() { return(_loaded); } function disposeLoader() { if (_loader) { if (_loaderClip._parent == _root) { _loader.unloadClip(_loaderClip.bitmap); _loaderClip.removeMovieClip(); } _loader = null; _loaderClip = null; } } function load() { if ((!_url) || (_url == "")) { onLoadComplete(); return(undefined); } _loaded = false; if (_bitmapData) { _bitmapData.dispose(); _bitmapData = null; } disposeLoader(); attachBitmap(null); } function attachBitmap(parent) { if (!parent) { parent = _root; } var _local5 = parent.getNextHighestDepth(); var _local3 = parent.createEmptyMovieClip("__bitmap" + _local5, _local5); if (((!_loaded) && (_url)) && (_url != "")) { _local3.createEmptyMovieClip("bitmap", 0); _loader = new MovieClipLoader(); _loaderClip = _local3; if (parent == _root) { _loaderClip._visible = false; } var thisObj = this; _loaderClip.onEnterFrame = function () { thisObj.pollLoad(); }; _loader.addListener({onLoadError:function () { thisObj.onLoadComplete(); }}); _loader.loadClip(_url, _local3.bitmap); } else { _local3.attachBitmap(_bitmapData, 0); } return(_local3); } function pollLoad() { if (_loaderClip._width) { onLoadComplete(); } } function onLoadComplete() { var _local2; if ((_loader && (_loaderClip)) && (_loaderClip._width)) { try { _loaderClip.onEnterFrame = null; _local2 = new flash.display.BitmapData(_loaderClip._width, _loaderClip._height, true, 0); _local2.draw(_loaderClip); _bitmapData = _local2; _loaded = true; } catch(error) { if (_local2) { _local2.dispose(); } } } disposeLoader(); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.ICON_LOADED, this, (_loaded ? null : (com.newgrounds.APIEvent.ERROR_BAD_FILE)))); } var _loaded = true; }
Symbol 69 MovieClip [__Packages.com.newgrounds.Medal] Frame 0
class com.newgrounds.Medal extends com.newgrounds.APIEventDispatcher { var _connection, _id, _name, _unlocked, _value, _difficulty, _iconLoader, dispatchEvent; function Medal (connection, id, name, unlocked, value, difficultyId, iconURL) { super(); _connection = connection; _id = id; _name = name; _unlocked = unlocked; _value = value; _difficulty = DIFFICULTIES[difficultyId]; _iconLoader = new com.newgrounds.BitmapLoader(DEFAULT_ICON, iconURL); _iconLoader.load(); } function get difficulty() { return(_difficulty); } function get icon() { return(_iconLoader.__get__bitmapData()); } function get id() { return(_id); } function get name() { return(_name); } function get unlocked() { return(_unlocked); } function get value() { return(_value); } function toString() { return((((((("Medal: " + _name) + "\t\t(") + (_unlocked ? "unlocked, " : "locked, ")) + _value) + "pts, ") + _difficulty) + ")"); } function attachIcon(parent) { return(_iconLoader.attachBitmap(parent)); } function unlock() { if ((!_connection.debug) && (_unlocked)) { com.newgrounds.Logger.logWarning(("Medal \"" + _name) + "\" is already unlocked."); return(undefined); } com.newgrounds.Logger.logMessage(("Unlocking medal \"" + name) + "\"..."); _unlocked = true; _connection.sendSimpleCommand("unlockMedal", {target:this, func:onUnlockConfirmed}, null, {medal_id:id}); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCKED, this)); } function onUnlockConfirmed(event) { if (event.__get__success()) { com.newgrounds.Logger.logMessage(("Medal \"" + name) + "\" unlocked."); } else { com.newgrounds.Logger.logError(("Failed to unlock \"" + name) + "\"!"); } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, this, event.__get__error())); } static var ICON_WIDTH = 50; static var ICON_HEIGHT = 50; static var DEFAULT_ICON = flash.display.BitmapData.loadBitmap("DefaultMedalIcon"); static var DIFFICULTY_EASY = "Easy"; static var DIFFICULTY_MODERATE = "Moderate"; static var DIFFICULTY_CHALLENGING = "Challenging"; static var DIFFICULTY_DIFFICULT = "Difficult"; static var DIFFICULTY_BRUTAL = "Brutal"; static var DIFFICULTIES = ["Unknown", DIFFICULTY_EASY, DIFFICULTY_MODERATE, DIFFICULTY_CHALLENGING, DIFFICULTY_DIFFICULT, DIFFICULTY_BRUTAL]; }
Symbol 71 MovieClip [__Packages.com.newgrounds.ScoreBoard] Frame 0
class com.newgrounds.ScoreBoard extends com.newgrounds.APIEventDispatcher { var _connection, _name, _id, _scores, _tag, dispatchEvent; function ScoreBoard (connection, name, id) { super(); _connection = connection; _name = name; _id = id; } function get name() { return(_name); } function get scores() { return(_scores); } function get period() { return(_period); } function set period(val) { _period = val; //return(period); } function get firstResult() { return(_firstResult); } function set firstResult(val) { _firstResult = Math.max(1, val); //return(firstResult); } function get numResults() { return(_numResults); } function set numResults(val) { _numResults = val; //return(numResults); } function get tag() { return(_tag); } function set tag(val) { _tag = val; //return(tag); } function get page() { return(Math.ceil((_firstResult - 1) / _numResults) + 1); } function prevPage() { if (firstResult > _numResults) { firstResult = firstResult - _numResults; } } function nextPage() { firstResult = firstResult + _numResults; } function loadScores() { _connection.sendSimpleCommand("loadScores", {target:this, func:onScoresLoaded}, {publisher_id:_connection.publisherId, board:_id, page:((_firstResult - 1) / _numResults) + 1, num_results:_numResults, period:_period, tag:_tag}); } function postScore(numericScore, tag) { if (tag == undefined) { tag = null; } if (isNaN(numericScore)) { com.newgrounds.Logger.logError("Cannot post invalid score: " + numericScore); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT)); return(undefined); } com.newgrounds.Logger.logMessage(((((("Posting a score of " + numericScore) + " by ") + _connection.username) + " to scoreboard \"") + _name) + "\"..."); _connection.sendSimpleCommand("postScore", {target:this, func:onScorePosted}, null, {user_name:_connection.username, board:_id, value:numericScore, tag:tag}); } function onScoresLoaded(event) { var _local4 = event.__get__data(); _scores = []; var _local5; if (_local4.first_result) { _local5 = _local4.first_result; } else { _local5 = _firstResult; } if (_local4.scores) { var _local3 = 0; while (_local3 < _local4.scores.length) { var _local2 = _local4.scores[_local3]; if (_local2) { _scores[_local3] = new com.newgrounds.Score(_local5, _local2.username, _local2.value, _local2.numeric_value, _local2.tag); } _local3++; _local5++; } } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORES_LOADED, this)); } function onScorePosted(event) { if (event.__get__success()) { com.newgrounds.Logger.logMessage("Score posted!"); var _local4 = event.__get__data(); var _local2 = {}; _local2.score = _local4.value; _local2.scoreBoard = this; } else { com.newgrounds.Logger.logError("Error posting score: " + event.__get__error()); } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, _local2, event.__get__error())); } function toString() { return("Scoreboard: " + _name); } static var TODAY = "Today"; static var THIS_WEEK = "This Week"; static var THIS_MONTH = "This Month"; static var THIS_YEAR = "This Year"; static var ALL_TIME = "All-Time"; var _period = ALL_TIME; var _firstResult = 1; var _numResults = 10; }
Symbol 75 MovieClip [__Packages.com.newgrounds.components.FlashAd] Frame 0
class com.newgrounds.components.FlashAd extends MovieClip { var _x, _y, stop, newgroundsButton, onUnload, _adListener, _showBorder, _ad, adContainer, gotoAndStop, _adFeedLoader; function FlashAd () { super(); try { System.security.allowDomain("server.cpmstar.com"); System.security.allowInsecureDomain("server.cpmstar.com"); } catch(error) { } _x = int(_x); _y = int(_y); stop(); if (newgroundsButton) { newgroundsButton.onRelease = onNGClick; } onUnload = removeAd; var _local4 = this; _adListener = {onLoadError:function (target, error, httpStatus) { target._parent.onAdError(target, error, httpStatus); }}; if (com.newgrounds.API.__get__adFeedURL()) { loadAdFeed(); } else { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, {target:this, func:loadAdFeed}); } } function get showBorder() { return(_showBorder); } function set showBorder(value) { _showBorder = value; if (_showBorder) { if (_ad) { var _local2 = _ad.getProgress(adContainer); if (_local2.bytesLoaded >= _local2.bytesTotal) { gotoAndStop("loaded"); } else { gotoAndStop("loading"); } } else { gotoAndStop("idle"); } } else { gotoAndStop("noBorder"); } //return(showBorder); } function loadAdFeed(event) { if (event == undefined) { event = null; } _adFeedLoader = new LoadVars(); var target = this; _adFeedLoader.onData = function (data) { target.onAdFeedLoaded(data); }; _adFeedLoader.load(com.newgrounds.API.__get__adFeedURL(), _adFeedLoader); } function onAdFeedLoaded(data) { if (data && (data != "")) { loadAd(data); } else { onAdError(); } } function loadAd(adURL) { _ad = new MovieClipLoader(); _ad.addListener(_adListener); adContainer._lockroot = true; _ad.loadClip(adURL, adContainer); } function removeAd() { _adFeedLoader.onData = null; _adFeedLoader = null; _ad.removeListener(_adListener); if (adContainer) { _ad.unloadClip(adContainer); } _ad = null; } function onAdError(target, error, httpStatus) { com.newgrounds.Logger.logError("Unable to load ad."); removeAd(); } function onNGClick() { com.newgrounds.API.loadNewgrounds(); } }
Symbol 50 MovieClip [__Packages.com.newgrounds.Logger] Frame 0
class com.newgrounds.Logger { function Logger () { } static function logInternal() { var _local2 = arguments; log(PRIORITY_INTERNAL, _local2); } static function logMessage() { var _local2 = arguments; log(PRIORITY_MESSAGE, _local2); } static function logWarning() { var _local2 = arguments; log(PRIORITY_WARNING, _local2); } static function logError() { var _local2 = arguments; log(PRIORITY_ERROR, _local2); } static function log(priority, messages) { if (priority == undefined) { priority = PRIORITY_MESSAGE; } if (messages == undefined) { messages = null; } if (priority >= _messageLevel) { var _local1 = 0; while (_local1 < messages.length) { trace(HEADER + messages[_local1]); _eventDispatcher.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.LOG, messages[_local1])); _local1++; } } if (priority >= _throwLevel) { throw new Error(messages.join(newline)); } } static function addEventListener(event, listener) { _eventDispatcher.addEventListener(event, listener, false, 0, false); } static var PRIORITY_INTERNAL = 0; static var PRIORITY_MESSAGE = 1; static var PRIORITY_WARNING = 2; static var PRIORITY_ERROR = 3; static var PRIORITY_MAX = 4; static var HEADER = "[Newgrounds API] :: "; static var _eventDispatcher = new com.newgrounds.EventDispatcher(); static var _messageLevel = PRIORITY_MESSAGE; static var _throwLevel = PRIORITY_MAX; }
Symbol 265 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher { function EventDispatcher () { } static function _removeEventListener(queue, event, handler) { if (queue != undefined) { var _local4 = queue.length; var _local1; _local1 = 0; while (_local1 < _local4) { var _local2 = queue[_local1]; if (_local2 == handler) { queue.splice(_local1, 1); return(undefined); } _local1++; } } } static function initialize(object) { if (_fEventDispatcher == undefined) { _fEventDispatcher = new mx.events.EventDispatcher(); } object.addEventListener = _fEventDispatcher.addEventListener; object.removeEventListener = _fEventDispatcher.removeEventListener; object.dispatchEvent = _fEventDispatcher.dispatchEvent; object.dispatchQueue = _fEventDispatcher.dispatchQueue; } function dispatchQueue(queueObj, eventObj) { var _local7 = "__q_" + eventObj.type; var _local4 = queueObj[_local7]; if (_local4 != undefined) { var _local5; for (_local5 in _local4) { var _local1 = _local4[_local5]; var _local3 = typeof(_local1); if ((_local3 == "object") || (_local3 == "movieclip")) { if (_local1.handleEvent != undefined) { _local1.handleEvent(eventObj); } if (_local1[eventObj.type] != undefined) { if (exceptions[eventObj.type] == undefined) { _local1[eventObj.type](eventObj); } } } else { _local1.apply(queueObj, [eventObj]); } } } } function dispatchEvent(eventObj) { if (eventObj.target == undefined) { eventObj.target = this; } this[eventObj.type + "Handler"](eventObj); dispatchQueue(this, eventObj); } function addEventListener(event, handler) { var _local3 = "__q_" + event; if (this[_local3] == undefined) { this[_local3] = new Array(); } _global.ASSetPropFlags(this, _local3, 1); _removeEventListener(this[_local3], event, handler); this[_local3].push(handler); } function removeEventListener(event, handler) { var _local2 = "__q_" + event; _removeEventListener(this[_local2], event, handler); } static var _fEventDispatcher = undefined; static var exceptions = {move:1, draw:1, load:1}; }
Symbol 266 MovieClip [__Packages.Playtomic.LogRequest] Frame 0
class Playtomic.LogRequest { var Pieces; function LogRequest () { } function Queue(data) { Pieces++; Data = Data + (((Data == "") ? "" : "~") + data); if ((Pieces == 8) || (Data.length > 300)) { Pieces = 0; Ready = true; } } function Send() { var _local3 = function (success) { if ((this.Data.indexOf("v/") == 0) || (this.Data.indexOf("~v/") > -1)) { Playtomic.Log.IncreaseViews(); } if ((this.Data.indexOf("p/") == 0) || (this.Data.indexOf("~p/") > -1)) { Playtomic.Log.IncreasePlays(); } }; var _local2 = new LoadVars(); _local2.sendAndLoad(((((((((("http://g" + Playtomic.Log.GUID) + ".api.playtomic.com/Tracker/q.aspx?swfid=") + Playtomic.Log.SWFID) + "&q=") + Data) + "&url=") + Playtomic.Log.SourceUrl) + "&") + Math.random()) + "z", _local3, "POST"); } var Data = ""; var Ready = false; }
Symbol 267 MovieClip [__Packages.Playtomic.Log] Frame 0
class Playtomic.Log { static var SourceUrl, Cookie; function Log () { } static function View(swfid, guid, defaulturl) { if (swfid == undefined) { swfid = 0; } if (guid == undefined) { guid = ""; } if (defaulturl == undefined) { defaulturl = ""; } if (SWFID > 0) { return(undefined); } SWFID = swfid; GUID = guid; Enabled = true; if ((SWFID == 0) || (GUID == "")) { Enabled = false; return(undefined); } if (defaulturl.indexOf("http://") != 0) { Enabled = false; return(undefined); } SourceUrl = defaulturl; if (((SourceUrl == null) || (SourceUrl == "")) || (SourceUrl.indexOf("https://") == 0)) { Enabled = false; return(undefined); } Cookie = SharedObject.getLocal("playtomic"); var _local5 = GetCookie("views"); Send("v/" + _local5, true); _global.setTimeout(PingServer, 60000); } static function ForceSend() { if (Request == null) { return(undefined); } Request.Send(); Request = new Playtomic.LogRequest(); } static function Play() { if (!Enabled) { return(undefined); } LevelCounters = new Array(); LevelAverages = new Array(); LevelRangeds = new Array(); Send("p/" + (Plays + 1), true); } static function CustomMetric(name, group, unique) { if (!Enabled) { return(undefined); } if ((group == null) || (group == undefined)) { group = ""; } if ((unique == null) || (unique == undefined)) { unique = false; } if (unique) { if (Customs.indexOf(name) > -1) { return(undefined); } Customs.push(name); } Send((("c/" + Clean(name)) + "/") + Clean(group)); } static function Link(url, name, group, unique, total, fail) { if (!Enabled) { return(undefined); } Send((((((((((("l/" + Clean(name)) + "/") + Clean(group)) + "/") + Clean(url)) + "/") + unique) + "/") + total) + "/") + fail); } static function LevelCounterMetric(name, level, unique) { if (!Enabled) { return(undefined); } if (unique) { var _local1 = (name + ".") + level.toString(); if (LevelCounters.indexOf(_local1) > -1) { return(undefined); } LevelCounters.push(_local1); } Send((("lc/" + Clean(name)) + "/") + Clean(level)); } static function LevelRangedMetric(name, level, value, unique) { if (!Enabled) { return(undefined); } if (unique) { var _local1 = (name + ".") + level.toString(); if (LevelRangeds.indexOf(_local1) > -1) { return(undefined); } LevelRangeds.push(_local1); SaveCookie("lr_" + name, 1); } Send((((("lr/" + Clean(name)) + "/") + Clean(level)) + "/") + value); } static function LevelAverageMetric(name, level, value, unique) { if (!Enabled) { return(undefined); } if (unique) { var _local1 = (name + ".") + level.toString(); if (LevelAverages.indexOf(_local1) > -1) { return(undefined); } LevelAverages.push(_local1); } Send((((("la/" + Clean(name)) + "/") + Clean(level)) + "/") + value); } static function Heatmap(name, group, x, y) { if (!Enabled) { return(undefined); } Send((((((("h/" + Clean(name)) + "/") + Clean(group)) + "/") + x) + "/") + y); } static function Funnel(name, step, stepnum) { if (!Enabled) { return(undefined); } Send((((("f/" + Clean(name)) + "/") + Clean(step)) + "/") + stepnum); } static function PlayerLevelStart(levelid) { if (!Enabled) { return(undefined); } Send("pls/" + levelid); } static function PlayerLevelWin(levelid) { if (!Enabled) { return(undefined); } Send("plw/" + levelid); } static function PlayerLevelQuit(levelid) { if (!Enabled) { return(undefined); } Send("plq/" + levelid); } static function PlayerLevelRetry(levelid) { if (!Enabled) { return(undefined); } Send("plr/" + levelid); } static function PlayerLevelFlag(levelid) { if (!Enabled) { return(undefined); } Send("plf/" + levelid); } static function PingServer() { if (!Enabled) { return(undefined); } Pings++; Send((("t/" + (FirstPing ? "y" : "n")) + "/") + Pings, true); if (FirstPing) { FirstPing = false; setInterval(PingServer, 60000); } } static function Send(s, view) { if (view == undefined) { view = false; } Request.Queue(s); if ((Request.Ready || (view)) || (!Queue)) { Request.Send(); Request = new Playtomic.LogRequest(); } } static function GetCookie(n) { if (Cookie.data[n] == undefined) { return(0); } return(parseInt(Cookie.data[n])); } static function SaveCookie(n, v) { Cookie.data[n] = v.toString(); Cookie.flush(); } static function Clean(s) { while (s.indexOf("/") > -1) { s = Replace(s, "/", "\\"); } while (s.indexOf("~") > -1) { s = Replace(s, "~", "-"); } return(escape(s)); } static function Replace(str, find, replace) { return(str.split(find).join(replace)); } static function IncreaseViews() { var _local1 = GetCookie("views"); _local1++; SaveCookie("views", _local1); } static function IncreasePlays() { Plays++; } static var Enabled = false; static var Queue = true; static var SWFID = 0; static var GUID = ""; static var Request = new Playtomic.LogRequest(); static var FirstPing = true; static var Pings = 0; static var Plays = 0; static var HighestGoal = 0; static var Customs = new Array(); static var LevelCounters = new Array(); static var LevelAverages = new Array(); static var LevelRangeds = new Array(); }
Symbol 268 MovieClip [__Packages.com.as2.GPSAPI] Frame 0
class com.as2.GPSAPI { function GPSAPI () { } static function newGPSAPI(parent) { function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; var pv; mb = "__mochibot__"; mbc = "mochibot.com"; g = (_global ? (_global) : (_level0._root)); if (g[mb + swfid]) { return(g[mb + swfid]); } s = System.security; x = mc._root.getSWFVersion; fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5))); if (!s) { s = {}; } sb = s.sandboxType; if (sb == "localWithFile") { return(null); } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version)); u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : ""); lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv)))); g[mb + "level"] = lv; if (fv == 5) { res = "_level" + lv; if (!eval (res)) { loadMovieNum (u, lv); } } else { res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); } return(res); } System.security.allowDomain("*"); System.security.allowInsecureDomain("*"); __com_mochibot__(MOCHIBOT_STRING, parent, 10301, true); } static var GAME_ID = 990; static var MOCHIBOT_STRING = "e93f7d4b"; }
Symbol 269 MovieClip [__Packages.com.api.as2.evnt.APIEvents] Frame 0
class com.api.as2.evnt.APIEvents { function APIEvents () { } static var USERNAME = "USERNAME"; static var GETSCORE = "GETSCORE"; static var GIVESCORE = "GIVESCORE"; static var STARTGAME = "STARTGAME"; static var AUTHURL = "AUTHURL"; static var BADDATA = "BADDATA"; static var LOADERROR = "LOADERROR"; static var SECURITY_ERROR = "SECURITY_ERROR"; static var IO_ERROR = "IO_ERROR"; }
Symbol 270 MovieClip [__Packages.com.api.as2.API] Frame 0
class com.api.as2.API { var theKey, gameid; function API (gameid, key, url) { if (key != undefined) { theKey = key; } if (url != undefined) { this.url = url; } if (gameid != undefined) { this.gameid = gameid; } mx.events.EventDispatcher.initialize(this); } function startGame() { function loadComplete(success) { if (loader.resp) { reply_en = loader.resp; var _local2 = new XML(com.api.as2.security.RC4.decrypt(loader.resp, this.theKey)); reply_de = _local2.toString(); var _local4 = 0; var _local3 = ""; if (_local2 != "") { _local4 = (_local2.firstChild.firstChild.firstChild.attributes.authed ? (_local2.firstChild.firstChild.firstChild.attributes.authed) : 0); _local3 = (_local2.firstChild.firstChild.firstChild.nextSibling.attributes.username ? (_local2.firstChild.firstChild.firstChild.nextSibling.attributes.username) : ""); this.dispatchEvent({type:com.api.as2.evnt.APIEvents.STARTGAME, authed:_local4, username:_local3, query_de:query_de, query_en:query_en, reply_de:reply_de, reply_en:reply_en}); } } else { trace("Bad xml data loaded in metod 'startGame'."); this.dispatchEvent({type:com.api.as2.evnt.APIEvents.BADDATA, metod:"startGame"}); } } var _local2; var query_de; var query_en; var reply_de; var reply_en; _local2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; _local2 = _local2 + "\t <root>"; _local2 = _local2 + "\t\t<query name=\"startgame\">"; _local2 = _local2 + (("\t\t\t<game gameid=\"" + gameid) + "\"></game>"); _local2 = _local2 + "\t\t</query>"; _local2 = _local2 + "\t</root>"; query_de = _local2; var _local4 = com.api.as2.security.RC4.encrypt(_local2, theKey); _local4 = _local4 + com.api.as2.security.RC4.encrypt(gameid, idkey); query_en = _local4; var loader = new LoadVars(); loader.onLoad = mx.utils.Delegate.create(this, loadComplete); var _local3 = new LoadVars(); _local3.query = _local4; _local3.k = Math.random(); _local3.sendAndLoad(url, loader, "GET"); } function getAuthUrl() { function loadComplete(success) { if (loader.resp) { reply_en = loader.resp; var _local2 = new XML(com.api.as2.security.RC4.decrypt(loader.resp, this.theKey)); reply_de = _local2.toString(); var _local3 = ""; if (_local2 != "") { _local3 = (_local2.firstChild.firstChild.firstChild.attributes.authurl ? (_local2.firstChild.firstChild.firstChild.attributes.authurl) : ""); } this.dispatchEvent({type:com.api.as2.evnt.APIEvents.AUTHURL, authurl:_local3, query_de:query_de, query_en:query_en, reply_de:reply_de, reply_en:reply_en}); } else { trace("Bad xml data loaded in metod 'getAuthUrl'."); this.dispatchEvent({type:com.api.as2.evnt.APIEvents.BADDATA, metod:"getAuthUrl"}); } } var _local2; var query_de; var query_en; var reply_de; var reply_en; _local2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; _local2 = _local2 + "\t <root>"; _local2 = _local2 + "\t\t<query name=\"getauthurl\">"; _local2 = _local2 + (("\t\t\t<game gameid=\"" + gameid) + "\"></game>"); _local2 = _local2 + "\t\t</query>"; _local2 = _local2 + "\t</root>"; query_de = _local2; var _local4 = com.api.as2.security.RC4.encrypt(_local2, theKey); _local4 = _local4 + com.api.as2.security.RC4.encrypt(gameid, idkey); query_en = _local4; var loader = new LoadVars(); loader.onLoad = mx.utils.Delegate.create(this, loadComplete); var _local3 = new LoadVars(); _local3.query = _local4; _local3.k = Math.random(); _local3.sendAndLoad(url, loader, "GET"); } function getUserName() { function loadComplete(success) { if (loader.resp) { reply_en = loader.resp; var _local2 = new XML(com.api.as2.security.RC4.decrypt(loader.resp, this.theKey)); reply_de = _local2.toString(); var _local3 = ""; if (_local2 != "") { _local3 = (_local2.firstChild.firstChild.firstChild.attributes.username ? (_local2.firstChild.firstChild.firstChild.attributes.username) : ""); } this.dispatchEvent({type:com.api.as2.evnt.APIEvents.USERNAME, username:_local3, query_de:query_de, query_en:query_en, reply_de:reply_de, reply_en:reply_en}); } else { trace("Bad xml data loaded in metod 'getUserName'."); this.dispatchEvent({type:com.api.as2.evnt.APIEvents.BADDATA, metod:"getUserName"}); } } var _local2; var query_de; var query_en; var reply_de; var reply_en; _local2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; _local2 = _local2 + "\t <root>"; _local2 = _local2 + "\t\t<query name=\"getusername\">"; _local2 = _local2 + (("\t\t\t<game gameid=\"" + gameid) + "\"></game>"); _local2 = _local2 + "\t\t</query>"; _local2 = _local2 + "\t</root>"; query_de = _local2; var _local4 = com.api.as2.security.RC4.encrypt(_local2, theKey); _local4 = _local4 + com.api.as2.security.RC4.encrypt(gameid, idkey); query_en = _local4; var loader = new LoadVars(); loader.onLoad = mx.utils.Delegate.create(this, loadComplete); var _local3 = new LoadVars(); _local3.query = _local4; _local3.k = Math.random(); _local3.sendAndLoad(url, loader, "GET"); } function getScore(level) { function loadComplete(success) { if (loader.resp) { reply_en = loader.resp; var _local2 = new XML(com.api.as2.security.RC4.decrypt(loader.resp, this.theKey)); reply_de = _local2.toString(); var _local5 = 0; var _local4 = 0; var _local3 = 0; if (_local2 != "") { _local5 = (_local2.firstChild.firstChild.firstChild.attributes.gameid ? (_local2.firstChild.firstChild.firstChild.attributes.gameid) : 0); _local4 = (_local2.firstChild.firstChild.firstChild.attributes.level ? (_local2.firstChild.firstChild.firstChild.attributes.level) : 0); _local3 = (_local2.firstChild.firstChild.firstChild.attributes.score ? (_local2.firstChild.firstChild.firstChild.attributes.score) : 0); } this.dispatchEvent({type:com.api.as2.evnt.APIEvents.GETSCORE, gameid:_local5, level:_local4, score:_local3, query_de:query_de, query_en:query_en, reply_de:reply_de, reply_en:reply_en}); } else { trace("Bad xml data loaded in metod 'getScore'."); this.dispatchEvent({type:com.api.as2.evnt.APIEvents.BADDATA, metod:"getScore"}); } } var _local2; var query_de; var query_en; var reply_de; var reply_en; _local2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; _local2 = _local2 + "\t <root>"; _local2 = _local2 + "\t\t<query name=\"getScore\">"; _local2 = _local2 + (((("\t\t\t<game gameid=\"" + gameid) + "\" level=\"") + level) + "\"></game>"); _local2 = _local2 + "\t\t</query>"; _local2 = _local2 + "\t</root>"; query_de = _local2; var _local4 = com.api.as2.security.RC4.encrypt(_local2, theKey); _local4 = _local4 + com.api.as2.security.RC4.encrypt(gameid, idkey); query_en = _local4; var loader = new LoadVars(); loader.onLoad = mx.utils.Delegate.create(this, loadComplete); var _local3 = new LoadVars(); _local3.query = _local4; _local3.k = Math.random(); _local3.sendAndLoad(url, loader, "GET"); } function giveScore(level, score) { function loadComplete(success) { if (loader.resp) { reply_en = loader.resp; var _local2 = new XML(com.api.as2.security.RC4.decrypt(loader.resp, this.theKey)); reply_de = _local2.toString(); var _local6 = 0; var _local5 = 0; var _local4 = 0; var _local3 = ""; if (_local2 != "") { _local6 = (_local2.firstChild.firstChild.firstChild.attributes.gameid ? (_local2.firstChild.firstChild.firstChild.attributes.gameid) : 0); _local5 = (_local2.firstChild.firstChild.firstChild.attributes.level ? (_local2.firstChild.firstChild.firstChild.attributes.level) : 0); _local4 = (_local2.firstChild.firstChild.firstChild.nextSibling.attributes.authed ? (_local2.firstChild.firstChild.firstChild.nextSibling.attributes.authed) : 0); _local3 = (_local2.firstChild.firstChild.firstChild.nextSibling.attributes.username ? (_local2.firstChild.firstChild.firstChild.nextSibling.attributes.username) : ""); } this.dispatchEvent({type:com.api.as2.evnt.APIEvents.GIVESCORE, gameid:_local6, level:_local5, authed:_local4, username:_local3, query_de:query_de, query_en:query_en, reply_de:reply_de, reply_en:reply_en}); } else { trace("Bad xml data loaded in metod 'giveScore'."); this.dispatchEvent({type:com.api.as2.evnt.APIEvents.BADDATA, metod:"giveScore"}); } } var _local2; var query_de; var query_en; var reply_de; var reply_en; _local2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; _local2 = _local2 + "\t <root>"; _local2 = _local2 + "\t\t<query name=\"givescore\">"; _local2 = _local2 + (((((("\t\t\t<game gameid=\"" + gameid) + "\" level=\"") + level) + "\" score=\"") + score) + "\"></game>"); _local2 = _local2 + "\t\t</query>"; _local2 = _local2 + "\t</root>"; query_de = _local2; var _local4 = com.api.as2.security.RC4.encrypt(_local2, theKey); _local4 = _local4 + com.api.as2.security.RC4.encrypt(gameid, idkey); query_en = _local4; var loader = new LoadVars(); loader.onLoad = mx.utils.Delegate.create(this, loadComplete); var _local3 = new LoadVars(); _local3.query = _local4; _local3.k = Math.random(); _local3.sendAndLoad(url, loader, "GET"); } var url = "/index.php"; var idkey = "JKLdfr34,56D5,673rdSsDS"; }
Symbol 271 MovieClip [__Packages.com.api.as2.security.RC4] Frame 0
class com.api.as2.security.RC4 { function RC4 () { } static function encrypt(src, key) { var _local3 = strToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(charsToHex(_local2)); } static function decrypt(src, key) { var _local3 = hexToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(charsToStr(_local2)); } static function initialize(pwd) { var _local3 = 0; var _local4; var _local5 = pwd.length; var _local1 = 0; while (_local1 <= 255) { mykey[_local1] = pwd[_local1 % _local5]; sbox[_local1] = _local1; _local1++; } var _local2 = 0; while (_local2 <= 255) { _local3 = ((_local3 + sbox[_local2]) + mykey[_local2]) % 256; _local4 = sbox[_local2]; sbox[_local2] = sbox[_local3]; sbox[_local3] = _local4; _local2++; } } static function calculate(plaintxt, psw) { initialize(psw); var _local1 = 0; var _local2 = 0; var _local9 = new Array(); var _local7; var _local5; var _local6; var _local3 = 0; while (_local3 < plaintxt.length) { _local1 = (_local1 + 1) % 256; _local2 = (_local2 + sbox[_local1]) % 256; _local5 = sbox[_local1]; sbox[_local1] = sbox[_local2]; sbox[_local2] = _local5; var _local4 = (sbox[_local1] + sbox[_local2]) % 256; _local7 = sbox[_local4]; _local6 = plaintxt[_local3] ^ _local7; _local9.push(_local6); _local3++; } return(_local9); } static function charsToHex(chars) { var _local4 = new String(""); var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); var _local1 = 0; while (_local1 < chars.length) { _local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]); _local1++; } return(_local4); } static function hexToChars(hex) { var _local3 = new Array(); var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0); while (_local1 < hex.length) { _local3.push(parseInt(hex.substr(_local1, 2), 16)); _local1 = _local1 + 2; } return(_local3); } static function charsToStr(chars) { var _local3 = new String(""); var _local1 = 0; while (_local1 < chars.length) { _local3 = _local3 + String.fromCharCode(chars[_local1]); _local1++; } return(_local3); } static function strToChars(str) { var _local3 = new Array(); var _local1 = 0; while (_local1 < str.length) { _local3.push(str.charCodeAt(_local1)); _local1++; } return(_local3); } static var sbox = new Array(255); static var mykey = new Array(255); }
Symbol 272 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object { var func; function Delegate (f) { super(); func = f; } static function create(obj, func) { var _local2 = function () { var _local2 = arguments.callee.target; var _local3 = arguments.callee.func; return(_local3.apply(_local2, arguments)); }; _local2.target = obj; _local2.func = func; return(_local2); } function createDelegate(obj) { return(create(obj, func)); } }
Symbol 41 MovieClip [__Packages.com.newgrounds.shims.APIShim] Frame 0
class com.newgrounds.shims.APIShim extends MovieClip { function APIShim () { super(); } }
Symbol 46 MovieClip [__Packages.com.newgrounds.APIError] Frame 0
class com.newgrounds.APIError { var message, name, alias; function APIError (error, msg) { if (Number(error).toString() == String(error)) { error = Number(error); } else if (error_codes[String(error)]) { error = error_codes[String(error)]; } else { error = 0; } code = error; message = msg; name = error_names[error]; alias = aliases[error]; } static function init_codes() { var _local2 = new Object(); var _local1 = 0; while (_local1 < aliases.length) { _local2[aliases[_local1]] = _local1; _local1++; } return(_local2); } static function init_names() { var _local5 = new Array(); var _local3 = 0; while (_local3 < aliases.length) { var _local2 = aliases[_local3].toLowerCase().split("_"); var _local1 = 0; while (_local1 < _local2.length) { _local2[_local1] = _local2[_local1].substr(0, 1).toUpperCase() + _local2[_local1].substr(1, _local2[_local1].length); for (var _local4 in always_caps) { if (_local2[_local1].toUpperCase() == always_caps[_local4]) { _local2[_local1] = _local2[_local1].toUpperCase(); } } _local1++; } _local5[_local3] = _local2.join(" "); _local3++; } return(_local5); } function isError() { return(true); } static var 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"); static var always_caps = new Array("API", "URL", "ID"); static var error_codes = init_codes(); static var error_names = init_names(); var code = 0; }
Symbol 57 MovieClip [__Packages.com.newgrounds.crypto.MD5] Frame 0
class com.newgrounds.crypto.MD5 { function MD5 () { } static function hash(src) { return(hex_md5(src)); } static function hex_md5(src) { return(binl2hex(core_md5(str2binl(src), src.length * 8))); } static function core_md5(x, len) { x[len >> 5] = x[len >> 5] | (128 << (len % 32)); x[(((len + 64) >>> 9) << 4) + 14] = len; var _local4 = 1732584193 /* 0x67452301 */; var _local3 = -271733879; var _local2 = -1732584194; var _local1 = 271733878 /* 0x10325476 */; var _local5 = 0; while (_local5 < x.length) { var _local10 = _local4; var _local9 = _local3; var _local8 = _local2; var _local7 = _local1; _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330); _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983); _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162); _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551); _local4 = safe_add(_local4, _local10); _local3 = safe_add(_local3, _local9); _local2 = safe_add(_local2, _local8); _local1 = safe_add(_local1, _local7); _local5 = _local5 + 16; } return(new Array(_local4, _local3, _local2, _local1)); } static function md5_cmn(q, a, b, x, s, t) { return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)); } static function md5_ff(a, b, c, d, x, s, t) { return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)); } static function md5_gg(a, b, c, d, x, s, t) { return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)); } static function md5_hh(a, b, c, d, x, s, t) { return(md5_cmn((b ^ c) ^ d, a, b, x, s, t)); } static function md5_ii(a, b, c, d, x, s, t) { return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t)); } static function bit_rol(num, cnt) { return((num << cnt) | (num >>> (32 - cnt))); } static function safe_add(x, y) { var _local1 = (x & 65535) + (y & 65535); var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16); return((_local2 << 16) | (_local1 & 65535)); } static function str2binl(str) { var _local3 = new Array(); var _local4 = 255; var _local1 = 0; while (_local1 < (str.length * 8)) { _local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32)); _local1 = _local1 + 8; } return(_local3); } static function binl2hex(binarray) { var _local4 = new String(""); var _local3 = new String("0123456789abcdef"); var _local1 = 0; while (_local1 < (binarray.length * 4)) { _local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15)); _local1++; } return(_local4); } }
Symbol 58 MovieClip [__Packages.com.newgrounds.crypto.RC4] Frame 0
class com.newgrounds.crypto.RC4 { function RC4 () { } static function encrypt(src, key) { var _local3 = strToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(charsToHex(_local2)); } static function encryptbin(src, key) { var _local3 = strToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(_local2); } static function decrypt(src, key) { var _local3 = hexToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(charsToStr(_local2)); } static function initialize(pwd) { var _local2 = 0; var _local3; var _local4 = pwd.length; var _local1 = 0; while (_local1 <= 255) { mykey[_local1] = pwd[_local1 % _local4]; sbox[_local1] = _local1; _local1++; } _local1 = 0; while (_local1 <= 255) { _local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256; _local3 = sbox[_local1]; sbox[_local1] = sbox[_local2]; sbox[_local2] = _local3; _local1++; } } static function calculate(plaintxt, psw) { initialize(psw); var _local1 = 0; var _local2 = 0; var _local9 = new Array(); var _local7; var _local5; var _local6; var _local3 = 0; while (_local3 < plaintxt.length) { _local1 = (_local1 + 1) % 256; _local2 = (_local2 + sbox[_local1]) % 256; _local5 = sbox[_local1]; sbox[_local1] = sbox[_local2]; sbox[_local2] = _local5; var _local4 = (sbox[_local1] + sbox[_local2]) % 256; _local7 = sbox[_local4]; _local6 = plaintxt[_local3] ^ _local7; _local9.push(_local6); _local3++; } return(_local9); } static function charsToHex(chars) { var _local4 = new String(""); var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); var _local1 = 0; while (_local1 < chars.length) { _local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]); _local1++; } return(_local4); } static function hexToChars(hex) { var _local3 = new Array(); var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0); while (_local1 < hex.length) { _local3.push(parseInt(hex.substr(_local1, 2), 16)); _local1 = _local1 + 2; } return(_local3); } static function charsToStr(chars) { var _local3 = new String(""); var _local1 = 0; while (_local1 < chars.length) { _local3 = _local3 + String.fromCharCode(chars[_local1]); _local1++; } return(_local3); } static function strToChars(str) { var _local3 = new Array(); var _local1 = 0; while (_local1 < str.length) { _local3.push(str.charCodeAt(_local1)); _local1++; } return(_local3); } static var sbox = new Array(255); static var mykey = new Array(255); }
Symbol 59 MovieClip [__Packages.com.newgrounds.encoders.json.JSON] Frame 0
class com.newgrounds.encoders.json.JSON { static var start, cache, interval; function JSON () { } static function encode(arg, noquotes) { var _local3; var _local2; var _local6; var _local1 = ""; var _local4; if (arg.isSServerVar()) { var _local8 = "sservervariable"; } else { var _local8 = typeof(arg); } switch (_local8) { case "sservervariable" : return("?" + arg.getEncodedValue()); case "object" : if (arg) { if (arg instanceof Array) { _local2 = 0; while (_local2 < arg.length) { _local4 = encode(arg[_local2]); if (_local1) { _local1 = _local1 + ","; } _local1 = _local1 + _local4; _local2++; } return(("[" + _local1) + "]"); } if (typeof(arg.toString) != "undefined") { for (_local2 in arg) { _local4 = arg[_local2]; if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) { _local4 = encode(_local4); if (_local1) { _local1 = _local1 + ","; } _local1 = _local1 + ((encode(_local2) + ":") + _local4); } } return(("{" + _local1) + "}"); } } return("null"); case "number" : return((isFinite(arg) ? (String(arg)) : "null")); case "string" : _local6 = arg.length; if (noquotes) { var _local7 = ""; } else { var _local7 = "\""; } _local1 = _local7; _local2 = 0; while (_local2 < _local6) { _local3 = arg.charAt(_local2); if (_local3 >= " ") { if ((_local3 == "\\") || (_local3 == "\"")) { _local1 = _local1 + "\\"; } _local1 = _local1 + _local3; } else { switch (_local3) { case "\b" : _local1 = _local1 + "\\b"; break; case "\f" : _local1 = _local1 + "\\f"; break; case newline : _local1 = _local1 + "\\n"; break; case "\r" : _local1 = _local1 + "\\r"; break; case "\t" : _local1 = _local1 + "\\t"; break; default : _local3 = _local3.charCodeAt(); _local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16)); } } _local2 = _local2 + 1; } return(_local1 + _local7); case "boolean" : return(String(arg)); } return("null"); } static function background_encode(arg, callback) { if (busy) { trace("[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed"); return(false); } if (!callback) { trace("[Newgrounds Encoder] :: Missing a callback function, skipping encode"); return(false); } busy = true; var _local2 = new Date(); start = _local2.getTime(); cache = {busy:false, complete:false, arg:arg, target:arg, parents:[], encoded:"", callback:callback, encode_chunk:function () { com.newgrounds.encoders.json.JSON.encode_chunk(); }}; if (getType(arg) == "object") { cache.encoded = "{"; } else if (getType(arg) == "array") { cache.encoded = "["; } interval = setInterval(cache, "encode_chunk", 25); return(true); } static function background_decode(arg, callback) { if (busy) { trace("[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed"); return(false); } if (!callback) { trace("[Newgrounds Encoder] :: Missing a callback function, skipping decode"); return(false); } busy = true; var _local1 = new Date(); start = _local1.getTime(); cache = {busy:false, callback:callback, complete:false, arg:arg, pos:0, parents:["root"], target:null, scratch:"", decode_chunk:function () { com.newgrounds.encoders.json.JSON.decode_chunk(); }}; interval = setInterval(cache, "decode_chunk", 25); return(true); } static function decode(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 = at + 1; return(ch); }; var _white = function () { while (ch) { if (ch <= " ") { _next(); } else if (ch == "/") { switch (_next()) { case "/" : while ((_next() && (ch != newline)) && (ch != "\r")) { } break; case "*" : _next(); for(;;){ if (ch) { if (ch == "*") { if (_next() == "/") { _next(); // unexpected jump } } else { _next(); } } else { _error("Unterminated comment"); } }; break; default : _error("Syntax error"); } } else { return; } } }; var _string = function () { var _local4; var _local1 = ""; var _local3; var _local2; var _local5 = false; if (ch == "\"") { while (_next()) { if (ch == "\"") { _next(); return(_local1); } if (ch == "\\") { switch (_next()) { case "b" : _local1 = _local1 + "\b"; break; case "f" : _local1 = _local1 + "\f"; break; case "n" : _local1 = _local1 + newline; break; case "r" : _local1 = _local1 + "\r"; break; case "t" : _local1 = _local1 + "\t"; break; case "u" : _local2 = 0; _local4 = 0; while (_local4 < 4) { _local3 = parseInt(_next(), 16); if (!isFinite(_local3)) { _local5 = true; break; } _local2 = (_local2 * 16) + _local3; _local4 = _local4 + 1; } if (_local5) { _local5 = false; break; } _local1 = _local1 + String.fromCharCode(_local2); break; default : _local1 = _local1 + ch; } } else { _local1 = _local1 + ch; } } } _error("Bad string"); }; var _array = function () { var _local1 = []; if (ch == "[") { _next(); _white(); if (ch == "]") { _next(); return(_local1); } while (ch) { _local1.push(_value()); _white(); if (ch == "]") { _next(); return(_local1); } if (ch != ",") { break; } _next(); _white(); } } _error("Bad array"); }; var _object = function () { var _local2; var _local1 = {}; if (ch == "{") { _next(); _white(); if (ch == "}") { _next(); return(_local1); } while (ch) { _local2 = _string(); _white(); if (ch != ":") { break; } _next(); _local1[_local2] = _value(); _white(); if (ch == "}") { _next(); return(_local1); } if (ch != ",") { break; } _next(); _white(); } } _error("Bad object"); }; var _number = function () { var _local1 = ""; var _local2; if (ch == "-") { _local1 = "-"; _next(); } while ((ch >= "0") && (ch <= "9")) { _local1 = _local1 + ch; _next(); } if (ch == ".") { _local1 = _local1 + "."; while ((_next() && (ch >= "0")) && (ch <= "9")) { _local1 = _local1 + ch; } } _local2 = 1 * _local1; if (!isFinite(_local2)) { _error("Bad number"); } else { return(_local2); } }; 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"))) { break; } _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()); } static function getType(v) { if (v instanceof Array) { return("array"); } return(typeof(v)); } static function decode_chunk() { if ((!cache.busy) && (!cache.complete)) { cache.busy = true; var _local1 = 0; while (_local1 < decode_chunks) { chunk_decoder(); if (cache.complete) { break; } _local1++; } trace(Math.round((cache.pos / cache.arg.length) * 100) + "% decoded"); cache.busy = false; } if (cache.complete) { var _local2 = new Date(); busy = false; clearInterval(interval); cache.callback(cache.root, _local2.getTime() - start); cache.arg = ""; } } static function encode_chunk() { if ((!cache.busy) && (!cache.complete)) { cache.busy = true; var _local1 = 0; while (_local1 < encode_chunks) { chunk_encoder(); if (cache.complete) { break; } _local1++; } cache.busy = false; } if (cache.complete) { var _local3 = new Date(); var _local2 = _local3.getTime(); busy = false; clearInterval(interval); cache.callback(cache.encoded, _local2 - start); cache.encoded = ""; } } static function chunk_decoder() { function _object() { var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (!com.newgrounds.encoders.json.JSON.cache.mode) { com.newgrounds.encoders.json.JSON.cache.mode = "object"; com.newgrounds.encoders.json.JSON.cache.pos++; _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (_local1 != "\"") { throw "Malformed object key in encoded string. Keys must be wrapped in quotes (\"\")"; } com.newgrounds.encoders.json.JSON.cache.scratch = ""; _setTargetValue({}); } else if (_local1 == ",") { com.newgrounds.encoders.json.JSON.cache.pos++; _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (_local1 != "\"") { throw "Malformed object key in encoded string. Keys must be wrapped in quotes (\"\")"; } com.newgrounds.encoders.json.JSON.cache.scratch = ""; } else if (_local1 == "}") { _useParent(); } else if (_local1 == "\"") { com.newgrounds.encoders.json.JSON.cache.pos++; _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (_local1 != ":") { throw "Malformed object notation. Object keys and values must be separated by colons(:)"; } _addParent(com.newgrounds.encoders.json.JSON.cache.scratch); com.newgrounds.encoders.json.JSON.cache.mode = null; } else { if (_local1 == "\\") { com.newgrounds.encoders.json.JSON.cache.pos++; _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); } com.newgrounds.encoders.json.JSON.cache.scratch = com.newgrounds.encoders.json.JSON.cache.scratch + _local1; } com.newgrounds.encoders.json.JSON.cache.pos++; } function _array() { var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (!com.newgrounds.encoders.json.JSON.cache.mode) { com.newgrounds.encoders.json.JSON.cache.mode = "array"; com.newgrounds.encoders.json.JSON.cache.pos++; _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); _setTargetValue([]); if (_local1 != "]") { _addArrayKey(); } else { _useParent(); } return(undefined); } if (_local1 == ",") { _addArrayKey(); } else if (_local1 == "]") { _useParent(); } com.newgrounds.encoders.json.JSON.cache.pos++; } function _boolean() { var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (_local1 == "t") { _setTargetValue(true); com.newgrounds.encoders.json.JSON.cache.pos = com.newgrounds.encoders.json.JSON.cache.pos + 3; } else if (_local1 == "f") { _setTargetValue(false); com.newgrounds.encoders.json.JSON.cache.pos = com.newgrounds.encoders.json.JSON.cache.pos + 4; } else { throw "Bool values must be true or false"; } _useParent(); } function _null() { var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (_local1 == "n") { _setTargetValue(null); com.newgrounds.encoders.json.JSON.cache.pos = com.newgrounds.encoders.json.JSON.cache.pos + 2; } else { throw "Null values must be null"; } _useParent(); } function _string() { var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); if (!com.newgrounds.encoders.json.JSON.cache.mode) { if (_local1 != "\"") { throw "Strings must be wrapped in quotes (\"\")"; } com.newgrounds.encoders.json.JSON.cache.scratch = ""; com.newgrounds.encoders.json.JSON.cache.mode = "string"; } else if (_local1 == "\"") { _setTargetValue(com.newgrounds.encoders.json.JSON.cache.scratch); _useParent(); } else { if (_local1 == "\\") { com.newgrounds.encoders.json.JSON.cache.pos++; _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); switch (_local1) { case "n" : _local1 = newline; break; case "r" : _local1 = newline; break; case "t" : _local1 = "\t"; break; case "u" : _local1 = "\\" + _local1; } } com.newgrounds.encoders.json.JSON.cache.scratch = com.newgrounds.encoders.json.JSON.cache.scratch + _local1; } com.newgrounds.encoders.json.JSON.cache.pos++; } function _number() { var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos); var _local2 = "01234567890.-"; if (!com.newgrounds.encoders.json.JSON.cache.mode) { com.newgrounds.encoders.json.JSON.cache.mode = "number"; com.newgrounds.encoders.json.JSON.cache.scratch = ""; } if (_local2.indexOf(_local1) < 0) { _setTargetValue(Number(com.newgrounds.encoders.json.JSON.cache.scratch)); _useParent(); } else { com.newgrounds.encoders.json.JSON.cache.scratch = com.newgrounds.encoders.json.JSON.cache.scratch + _local1; com.newgrounds.encoders.json.JSON.cache.pos++; } } function _setTargetValue(newval) { var _local2 = _getParent().obj; var _local1 = com.newgrounds.encoders.json.JSON.cache.parents[com.newgrounds.encoders.json.JSON.cache.parents.length - 1]; _local2[_local1] = newval; } function _useParent() { com.newgrounds.encoders.json.JSON.cache.mode = com.newgrounds.encoders.json.JSON.getType(_getParent().obj); com.newgrounds.encoders.json.JSON.cache.parents.pop(); } function _getParent() { var _local2 = com.newgrounds.encoders.json.JSON.cache; var _local1 = 0; while (_local1 < (com.newgrounds.encoders.json.JSON.cache.parents.length - 1)) { _local2 = _local2[com.newgrounds.encoders.json.JSON.cache.parents[_local1]]; _local1++; } return({obj:_local2, name:com.newgrounds.encoders.json.JSON.cache.parents[_local1]}); } function _getCurrent() { var _local2 = com.newgrounds.encoders.json.JSON.cache; var _local1 = 0; while (_local1 < com.newgrounds.encoders.json.JSON.cache.parents.length) { _local2 = _local2[com.newgrounds.encoders.json.JSON.cache.parents[_local1]]; _local1++; } return({obj:_local2, name:com.newgrounds.encoders.json.JSON.cache.parents[_local1]}); } function _addParent(child) { com.newgrounds.encoders.json.JSON.cache.parents.push(child); } function _addArrayKey() { var _local1 = _getCurrent().obj.length; com.newgrounds.encoders.json.JSON.cache.parents.push(_local1); com.newgrounds.encoders.json.JSON.cache.mode = null; } if (cache.pos >= cache.arg.length) { cache.complete = true; return(undefined); } if (cache.mode) { eval ("_" + cache.mode)(); } else { var char = cache.arg.charAt(cache.pos); switch (char) { case "{" : _object(); return; case "[" : _array(); return; case "\"" : _string(); return; case "n" : _null(); return; case "t" : _boolean(); return; case "f" : _boolean(); return; default : _number(); } } } static function chunk_encoder() { if (cache.complete) { return(undefined); } var _local2 = getType(cache.target); switch (_local2) { case "number" : cache.encoded = cache.encoded + cache.target; getParent(); break; case "string" : cache.encoded = cache.encoded + (("\"" + cache.target.split("\"").join("\\\"")) + "\""); getParent(); break; case "boolean" : cache.encoded = cache.encoded + ((cache.target == true) ? "true" : "false"); getParent(); break; case "null" : cache.encoded = cache.encoded + "null"; getParent(); break; case "array" : if (cache.target.length < 1) { cache.encoded = cache.encoded + "]"; getParent(); } else { cache.parents.push(cache.target); cache.target = cache.target[0]; if (getType(cache.target) == "array") { cache.encoded = cache.encoded + "["; } else if (getType(cache.target) == "object") { cache.encoded = cache.encoded + "{"; } } break; case "object" : for (var _local1 in cache.target) { break; } if (_local1 === undefined) { cache.encoded = cache.encoded + "}"; getParent(); } else { cache.parents.push(cache.target); cache.target = cache.target[_local1]; cache.encoded = cache.encoded + (("\"" + _local1.split("\"").join("\\\"")) + "\":"); if (getType(cache.target) == "array") { cache.encoded = cache.encoded + "["; } else if (getType(cache.target) == "object") { cache.encoded = cache.encoded + "{"; } } break; default : cache.encoded = cache.encoded + "null"; getParent(); } } static function getParent() { if (cache.parents.length > 0) { var _local1 = cache.parents.pop(); if (getType(_local1) == "array") { _local1.shift(); } else { for (var _local3 in _local1) { delete _local1[_local3]; break; } } if ((getType(_local1) == "object") or (getType(_local1) == "array")) { for (var _local2 in _local1) { break; } if (!(_local2 === undefined)) { cache.encoded = cache.encoded + ","; } } cache.target = _local1; } else { cache.complete = true; } } static var encode_chunks = 20000; static var decode_chunks = 20000; static var busy = false; }
Symbol 66 MovieClip [__Packages.com.newgrounds.ValidationTools] Frame 0
class com.newgrounds.ValidationTools { function ValidationTools () { } static function isNumber(v) { if (typeof(v) == "number") { return(true); } if ((typeof(v) == "string") and (Number(v).toString() == v)) { return(true); } return(false); } static function isInteger(v) { if (isNumber(v)) { v = Number(v); return(Math.floor(v) == v); } return(false); } static function isFloat(v) { return(isNumber(v)); } static function isString(v) { if ((typeof(v) == "string") or (typeof(v) == "number")) { return(true); } return(false); } static function isEmpty(o) { for (var _local2 in o) { return(false); } return(true); } }
Symbol 67 MovieClip [__Packages.com.newgrounds.SaveGroupQuery] Frame 0
class com.newgrounds.SaveGroupQuery { var _group, _num_results, _pages, _page, _randomize_results, file_conditions, key_conditions, rating_conditions, sort_conditions, lookup_keys, lookup_ratings, _group_by; function SaveGroupQuery (_group) { this._group = _group; reset(); } function get group() { return(_group); } function get groupId() { return(_group.getID()); } function get resultsPerPage() { return(_num_results); } function set resultsPerPage(n) { _num_results = n; //return(resultsPerPage); } function get pages() { return(_pages); } function get page() { return(_page); } function set page(n) { _page = n; //return(page); } function get randomize() { return(_randomize_results); } function set randomize(b) { _randomize_results = b; //return(randomize); } function get results() { return(_results); } function clearCache() { _results = []; } function reset() { file_conditions = new Array(); key_conditions = new Array(); rating_conditions = new Array(); sort_conditions = new Array(); lookup_keys = new Object(); lookup_ratings = new Object(); _num_results = 20; _page = 1; _randomize_results = false; _group_by = new Array(); clearCache(); } function getGroup() { return(_group); } function getGroupID() { return(_group.getID()); } function isRandomized() { return(_randomize_results); } function toObject() { var _local2; var _local11 = {page:_page, num_results:_num_results}; if (_randomize_results) { _local11.randomize = 1; } if (!com.newgrounds.ValidationTools.isEmpty(file_conditions)) { var _local12 = []; _local2 = 0; while (_local2 < file_conditions.length) { var _local6 = file_conditions[_local2]; _local12.push({field:file_fields[_local6.field.toUpperCase()].id, operator:_local6.operator, value:_local6.value}); _local2++; } _local11.file_conditions = _local12; } if (!com.newgrounds.ValidationTools.isEmpty(key_conditions)) { _local11.key_conditions = key_conditions; } if (!com.newgrounds.ValidationTools.isEmpty(rating_conditions)) { _local11.rating_conditions = rating_conditions; } if (!com.newgrounds.ValidationTools.isEmpty(sort_conditions)) { var _local14 = []; _local2 = 0; while (_local2 < sort_conditions.length) { var _local3 = sort_conditions[_local2]; if (_local3.table == TABLE_FILES) { var _local8 = file_fields[_local3.field.toUpperCase()].id; } else { var _local8 = _local3.field; } var _local5 = {field:_local8, table:_local3.table}; if (_local3.desc) { _local5.desc = 1; } if (_local3.extra) { _local5.extra = _local3.extra; } _local14.push(_local5); _local2++; } _local11.sort_conditions = _local14; } if (!com.newgrounds.ValidationTools.isEmpty(lookup_keys)) { var _local15 = []; for (_local2 in lookup_keys) { _local15.push(_local2); } _local11.lookup_keys = _local15; } if (!com.newgrounds.ValidationTools.isEmpty(lookup_ratings)) { var _local13 = []; for (_local2 in lookup_ratings) { _local13.push(_local2); } _local11.lookup_ratings = _local13; } if (!com.newgrounds.ValidationTools.isEmpty(_group_by)) { var _local16 = []; _local2 = 0; while (_local2 < _group_by.length) { var _local4 = _group_by[_local2]; if (_local4.table == TABLE_FILES) { var _local8 = file_fields[_local4.field.toUpperCase()].id; } else { var _local8 = _local4.field; } _local16.push({field:_local8, table:_local4.table}); _local2++; } _local11.group_by = _local16; } return(_local11); } function toString() { var _local9; var _local2; var _local11 = []; _local9 = "Lookup:\r"; var _local14 = []; for (var _local6 in file_fields) { _local14.push(" " + _local6); _local2 = true; } _local9 = _local9 + _local14.join(newline); _local11.push(_local9); _local9 = ""; _local2 = false; var _local16 = []; for (var _local6 in lookup_keys) { _local16.push((" KEY '" + _group.getKeyName(_local6)) + "'"); _local2 = true; } if (_local2) { _local9 = _local9 + _local16.join(newline); _local11.push(_local9); } _local9 = ""; _local2 = false; var _local15 = []; for (var _local6 in lookup_ratings) { _local15.push((" RATING '" + _group.getRatingName(_local6)) + "'"); _local2 = true; } if (_local2) { _local9 = _local9 + _local15.join(newline); _local11.push(_local9); } _local9 = "Where:\r"; _local2 = false; var _local8 = []; var _local6 = 0; while (_local6 < file_conditions.length) { var _local7 = file_conditions[_local6]; var _local10 = ((((" " + _local7.field) + " ") + _local7.operator) + " ") + _local7.value; _local8.push(_local10); _local2 = true; _local6++; } _local6 = 0; while (_local6 < key_conditions.length) { var _local7 = key_conditions[_local6]; var _local10 = ((((" KEY '" + _group.getKeyName(_local7.key_id)) + "' ") + _local7.operator) + " ") + _local7.value; _local8.push(_local10); _local2 = true; _local6++; } _local6 = 0; while (_local6 < rating_conditions.length) { var _local7 = rating_conditions[_local6]; var _local10 = ((((" RATING '" + _group.getRatingName(_local7.rating_id)) + "' ") + _local7.operator) + " ") + _local7.value; _local8.push(_local10); _local2 = true; _local6++; } if (_local2) { _local9 = _local9 + _local8.join(newline); _local11.push(_local9); } _local9 = "Group By:\r"; _local2 = false; var _local13 = []; _local6 = 0; while (_local6 < _group_by.length) { var _local4 = _group_by[_local6]; var _local5; if (_local4.table == TABLE_KEYS) { _local5 = (" KEY '" + _group.getKeyName(_local4.field)) + "'"; } else if (_local4.table == TABLE_RATINGS) { _local5 = (" RATING '" + _group.getRatingName(_local4.field)) + "'"; } else { _local5 = " " + _local4.field; } _local13.push(_local5); _local2 = true; _local6++; } if (_local2) { _local9 = _local9 + _local13.join(newline); _local11.push(_local9); } _local9 = "Order By:\r"; _local2 = false; var _local12 = []; if (isRandomized()) { _local12.push(" RANDOM"); _local2 = true; } _local6 = 0; while (_local6 < sort_conditions.length) { var _local3 = sort_conditions[_local6]; if (_local3.table == TABLE_KEYS) { var _local5 = (" KEY '" + _group.getKeyName(_local3.field)) + "'"; } else if (_local3.table == TABLE_RATINGS) { var _local5 = ((" RATING '" + _group.getRatingName(_local3.field)) + "' ") + ((_local3.extra == "votes") ? "VOTES" : "SCORE"); } else { var _local5 = " " + _local3.field; } var _local5 = _local5 + (_local3.desc ? " (DESCENDING)" : ""); _local12.push(_local5); _local2 = true; _local6++; } if (_local2) { _local9 = _local9 + _local12.join(newline); _local11.push(_local9); } _local11.push("Page:\r " + _page); _local11.push("Results Per Page:\r " + _num_results); return(_local11.join(newline)); } function setResultsPerPage(r) { _num_results = r; clearCache(); } function setPage(p) { _page = p; clearCache(); } function setRandomize(bool) { _randomize_results = ((bool === false) ? false : true); } function includeKey(key) { if (!_group.getKeyID(key)) { trace(((("[SaveGroupQuery Error] :: '" + key) + "' is not a valid key for the '") + _group.__get__name()) + "' group."); return(undefined); } lookup_keys[_group.getKeyID(key)] = 1; clearCache(); } function includeRating(rating) { if (!_group.getRatingID(rating)) { trace(((("[SaveGroupQuery Error] :: '" + rating) + "' is not a valid rating for the '") + _group.__get__name()) + "' group."); return(undefined); } lookup_ratings[_group.getRatingID(rating)] = 1; clearCache(); } function groupBy(field) { addGroupItem(TABLE_FILES, field); } function groupByKey(key) { if (!_group.getKeyID(key)) { error(((("'" + key) + "' is not a valid key for the '") + _group.getName()) + "' _group"); return(undefined); } addGroupItem(TABLE_KEYS, _group.getKeyID(key)); } function groupByRating(rating) { if (!_group.getRatingID(rating)) { error(((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' _group"); return(undefined); } addGroupItem(TABLE_RATINGS, _group.getRatingID(rating)); } function addGroupItem(table, field) { _group_by.push({table:table, field:field}); clearCache(); } function excludeKey(key) { delete lookup_keys[_group.getKeyID(key)]; clearCache(); } function excludeRating(rating) { delete lookup_ratings[_group.getRatingID(rating)]; clearCache(); } function addCondition(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 ((!validateOperator(operator)) or (!validateValue(field, value))) { return(undefined); } file_conditions.push({field:field, operator:operator, value:value}); clearCache(); } function addKeyCondition(key, operator, value) { if (!_group.getKeyID(key)) { error(((("'" + key) + "' is not a valid key for the '") + _group.getName()) + "' save _group"); } else if ((!validateOperator(operator)) or (!validateKeyValue(key, value))) { return(undefined); } key_conditions.push({key_id:_group.getKeyID(key), operator:operator, value:value}); clearCache(); } function addRatingCondition(rating, operator, value, column) { if (!column) { column = "SCORE"; } if (!_group.getRatingID(rating)) { error(((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' save _group"); } else { if (!validateOperator(operator)) { return(undefined); } if (!com.newgrounds.ValidationTools.isNumber(value)) { error(("Expected numeric value for rating '" + rating) + "'"); return(undefined); } } if (!rating_columns[column]) { var _local2 = []; for (var _local3 in rating_columns) { _local2.push(_local3); } error((("Invalid rating column '" + column) + "'. Valid columns are ") + _local2.join(", ")); return(undefined); } rating_conditions.push({rating_id:_group.getRatingID(rating), operator:operator, value:value, column:rating_columns[column]}); clearCache(); } function sortOn(field, order) { if (!file_fields[field]) { var _local2 = []; for (var _local3 in file_fields) { _local2.push(_local3); } error((("'" + field) + "' is not a valid sort field. Valid fields are: ") + _local2.join(", ")); return(undefined); } addSortCondition(TABLE_FILES, field, order); } function sortOnKey(key, order) { if (!_group.getKeyID(key)) { error(((("'" + key) + "' is not a valid key for the '") + _group.getName()) + "' _group"); return(undefined); } addSortCondition(TABLE_KEYS, _group.getKeyID(key), order); } function sortOnRating(rating, order, column) { if (!_group.getRatingID(rating)) { error(((("'" + rating) + "' is not a valid rating for the '") + _group.getName()) + "' _group"); return(undefined); } if (!column) { column = "score"; } addSortCondition(TABLE_RATINGS, _group.getRatingID(rating), order, column); } function sortOnRatingScore(rating, order) { sortOnRating(rating, order, "score"); } function sortOnRatingVotes(rating, order) { sortOnRating(rating, order, "votes"); } function addSortCondition(table, field, order, extra) { var _local7; if (((!order) or (order == "")) or (order.toUpperCase() == "ASC")) { _local7 = false; } else if (order.toUpperCase() == "DESC") { _local7 = true; } else { error(("'" + order) + "' is not a valid sort order!"); return(undefined); } var _local3 = {table:table, field:field, desc:_local7}; if (extra) { _local3.extra = extra; } sort_conditions.push(_local3); clearCache(); } function onExecuted(results) { _results = []; var _local6 = 0; while (_local6 < results.length) { var _local2 = results[_local6]; var _local3 = new com.newgrounds.SaveFile(_group); _local3.setName(_local2.filename); _local3.setID(_local2.save_id); _local3.setDescription(_local2.description); _local3.setThumbnailURL(_local2.thumb); _local3.setFileURL(_local2.file); if (_local2.views) { _local3.setViews(_local2.views); } _local3.setPermissions(_local2.status, _local2.locked); _local3.authorName = _local2.user_name; _local3.authorID = _local2.user_id; var _local5 = 0; while (_local5 < _local2.keys.length) { _local3.setKey(_local2.keys[_local5].id, _local2.keys[_local5].value); _local5++; } var _local4 = 0; while (_local4 < _local2.ratings.length) { _local3.setRating(_local2.ratings[_local4].id, _local2.ratings[_local4].votes, _local2.ratings[_local4].score); _local4++; } getGroup().addFile(_local3); _results.push(_local3); _local6++; } callEventDispatcher(); } function hasResults() { return(_results && (_results.length > 0)); } function callEventDispatcher() { com.newgrounds.API.callListener(com.newgrounds.APIEvent.QUERY_COMPLETE, true, {query:this}); } function execute() { if (hasResults() && (!isRandomized())) { callEventDispatcher(); return(undefined); } _group.query = this; com.newgrounds.API.lookupSaveFiles(_group); } function processResults(files) { return(null); } function validateKeyValue(key, value) { var _local3 = _group.getKeyType(key); if (_local3) { var _local2 = com.newgrounds.SaveGroup.KEY_TYPES[_local3]; if ((_local2 == "float") and com.newgrounds.ValidationTools.isFloat(value)) { return(true); } if ((_local2 == "integer") and com.newgrounds.ValidationTools.isInteger(value)) { return(true); } if ((_local2 == "string") and com.newgrounds.ValidationTools.isString(value)) { return(true); } error(((("Expected type " + _local2) + " for key '") + key) + "'"); } return(false); } function validateValue(field, value) { if (file_fields[field]) { if ((file_fields[field].type == "integer") and com.newgrounds.ValidationTools.isInteger(value)) { return(true); } if ((file_fields[field].type == "float") and com.newgrounds.ValidationTools.isFloat(value)) { return(true); } if ((file_fields[field].type == "string") and com.newgrounds.ValidationTools.isString(value)) { return(true); } error(((("Expecting " + file_fields[field].type) + " value on '") + field) + "' condition"); } else { var _local2 = []; for (var _local4 in file_fields) { _local2.push(_local4); } error((("'" + field) + "' is not a searchable field. Valid fields are: ") + _local2.join(", ")); } return(false); } function validateOperator(operator) { var _local2 = 0; while (_local2 < valid_operators.length) { if (operator == valid_operators[_local2]) { return(true); } _local2++; } error((("'" + operator) + "' is not a valid lookup operation. Valid operations are: ") + valid_operators.join(", ")); return(false); } function error(msg) { trace("[QUERY ERROR] :: " + msg); } static var TABLE_FILES = 1; static var TABLE_KEYS = 2; static var TABLE_RATINGS = 3; var _results = []; static var 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"}}; static var rating_columns = {TOTAL_VOTES:"votes", SCORE:"score"}; static var valid_operators = ["=", "<", ">", "!=", "<>", "<=", ">=", "*", "!*", "!*=", "!=*", "*=", "=*"]; }
Symbol 68 MovieClip [__Packages.com.newgrounds.RemoteAuth] Frame 0
class com.newgrounds.RemoteAuth { var auth_token, receiver; function RemoteAuth (id) { auth_token = id; System.security.allowDomain("*"); receiver = new LocalConnection(); receiver.allowDomain = function () { return(true); }; receiver.onAuth = function (auth_result) { trace("remote login is a success! " + auth_result); com.newgrounds.API.onRemoteAuthentication(auth_result); }; receiver.connect("_" + auth_token); } function get token() { return(auth_token); } }
Symbol 70 MovieClip [__Packages.com.newgrounds.Score] Frame 0
class com.newgrounds.Score { var _rank, _username, _score, _numericValue, _tag; function Score (rank, username, score, numericValue, tag) { (_rank = rank); (_username = username); _score = score; _numericValue = numericValue; _tag = tag; } function get numericValue() { return(_numericValue); } function get rank() { return(_rank); } function get score() { return(_score); } function get tag() { return(_tag); } function get username() { return(_username); } function toString() { return((((_rank + ".\t") + _username) + "\t") + _score); } }
Symbol 72 MovieClip [__Packages.com.newgrounds.encoders.RC4] Frame 0
class com.newgrounds.encoders.RC4 { function RC4 () { } static function encrypt(src, key) { var _local3 = strToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(charsToHex(_local2)); } static function encryptbin(src, key) { var _local3 = strToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(_local2); } static function decrypt(src, key) { var _local3 = hexToChars(src); var _local1 = strToChars(key); var _local2 = calculate(_local3, _local1); return(charsToStr(_local2)); } static function initialize(pwd) { var _local2 = 0; var _local3; var _local4 = pwd.length; var _local1 = 0; while (_local1 <= 255) { mykey[_local1] = pwd[_local1 % _local4]; sbox[_local1] = _local1; _local1++; } _local1 = 0; while (_local1 <= 255) { _local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256; _local3 = sbox[_local1]; sbox[_local1] = sbox[_local2]; sbox[_local2] = _local3; _local1++; } } static function calculate(plaintxt, psw) { initialize(psw); var _local1 = 0; var _local2 = 0; var _local9 = new Array(); var _local7; var _local5; var _local6; var _local3 = 0; while (_local3 < plaintxt.length) { _local1 = (_local1 + 1) % 256; _local2 = (_local2 + sbox[_local1]) % 256; _local5 = sbox[_local1]; sbox[_local1] = sbox[_local2]; sbox[_local2] = _local5; var _local4 = (sbox[_local1] + sbox[_local2]) % 256; _local7 = sbox[_local4]; _local6 = plaintxt[_local3] ^ _local7; _local9.push(_local6); _local3++; } return(_local9); } static function charsToHex(chars) { var _local4 = new String(""); var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); var _local1 = 0; while (_local1 < chars.length) { _local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]); _local1++; } return(_local4); } static function hexToChars(hex) { var _local3 = new Array(); var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0); while (_local1 < hex.length) { _local3.push(parseInt(hex.substr(_local1, 2), 16)); _local1 = _local1 + 2; } return(_local3); } static function charsToStr(chars) { var _local3 = new String(""); var _local1 = 0; while (_local1 < chars.length) { _local3 = _local3 + String.fromCharCode(chars[_local1]); _local1++; } return(_local3); } static function strToChars(str) { var _local3 = new Array(); var _local1 = 0; while (_local1 < str.length) { _local3.push(str.charCodeAt(_local1)); _local1++; } return(_local3); } static var sbox = new Array(255); static var mykey = new Array(255); }
Symbol 73 MovieClip [__Packages.com.newgrounds.encoders.JSON] Frame 0
class com.newgrounds.encoders.JSON { static var start, cache, interval; function JSON () { } static function encode(arg, noquotes) { var _local3; var _local2; var _local6; var _local1 = ""; var _local4; if (arg.isSServerVar()) { var _local8 = "sservervariable"; } else { var _local8 = typeof(arg); } switch (_local8) { case "sservervariable" : return("?" + arg.getEncodedValue()); case "object" : if (arg) { if (arg instanceof Array) { _local2 = 0; while (_local2 < arg.length) { _local4 = encode(arg[_local2]); if (_local1) { _local1 = _local1 + ","; } _local1 = _local1 + _local4; _local2++; } return(("[" + _local1) + "]"); } if (typeof(arg.toString) != "undefined") { for (_local2 in arg) { _local4 = arg[_local2]; if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) { _local4 = encode(_local4); if (_local1) { _local1 = _local1 + ","; } _local1 = _local1 + ((encode(_local2) + ":") + _local4); } } return(("{" + _local1) + "}"); } } return("null"); case "number" : return((isFinite(arg) ? (String(arg)) : "null")); case "string" : _local6 = arg.length; if (noquotes) { var _local7 = ""; } else { var _local7 = "\""; } _local1 = _local7; _local2 = 0; while (_local2 < _local6) { _local3 = arg.charAt(_local2); if (_local3 >= " ") { if ((_local3 == "\\") || (_local3 == "\"")) { _local1 = _local1 + "\\"; } _local1 = _local1 + _local3; } else { switch (_local3) { case "\b" : _local1 = _local1 + "\\b"; break; case "\f" : _local1 = _local1 + "\\f"; break; case newline : _local1 = _local1 + "\\n"; break; case "\r" : _local1 = _local1 + "\\r"; break; case "\t" : _local1 = _local1 + "\\t"; break; default : _local3 = _local3.charCodeAt(); _local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16)); } } _local2 = _local2 + 1; } return(_local1 + _local7); case "boolean" : return(String(arg)); } return("null"); } static function background_encode(arg, callback) { if (busy) { trace("[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed"); return(false); } if (!callback) { trace("[Newgrounds Encoder] :: Missing a callback function, skipping encode"); return(false); } busy = true; var _local2 = new Date(); start = _local2.getTime(); cache = {busy:false, complete:false, arg:arg, target:arg, parents:[], encoded:"", callback:callback, encode_chunk:function () { com.newgrounds.encoders.JSON.encode_chunk(); }}; if (getType(arg) == "object") { cache.encoded = "{"; } else if (getType(arg) == "array") { cache.encoded = "["; } interval = setInterval(cache, "encode_chunk", 25); return(true); } static function background_decode(arg, callback) { if (busy) { trace("[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed"); return(false); } if (!callback) { trace("[Newgrounds Encoder] :: Missing a callback function, skipping decode"); return(false); } busy = true; var _local1 = new Date(); start = _local1.getTime(); 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(); }}; interval = setInterval(cache, "decode_chunk", 25); return(true); } static function decode(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 = at + 1; return(ch); }; var _white = function () { while (ch) { if (ch <= " ") { _next(); } else if (ch == "/") { switch (_next()) { case "/" : while ((_next() && (ch != newline)) && (ch != "\r")) { } break; case "*" : _next(); for(;;){ if (ch) { if (ch == "*") { if (_next() == "/") { _next(); // unexpected jump } } else { _next(); } } else { _error("Unterminated comment"); } }; break; default : _error("Syntax error"); } } else { return; } } }; var _string = function () { var _local4; var _local1 = ""; var _local3; var _local2; var _local5 = false; if (ch == "\"") { while (_next()) { if (ch == "\"") { _next(); return(_local1); } if (ch == "\\") { switch (_next()) { case "b" : _local1 = _local1 + "\b"; break; case "f" : _local1 = _local1 + "\f"; break; case "n" : _local1 = _local1 + newline; break; case "r" : _local1 = _local1 + "\r"; break; case "t" : _local1 = _local1 + "\t"; break; case "u" : _local2 = 0; _local4 = 0; while (_local4 < 4) { _local3 = parseInt(_next(), 16); if (!isFinite(_local3)) { _local5 = true; break; } _local2 = (_local2 * 16) + _local3; _local4 = _local4 + 1; } if (_local5) { _local5 = false; break; } _local1 = _local1 + String.fromCharCode(_local2); break; default : _local1 = _local1 + ch; } } else { _local1 = _local1 + ch; } } } _error("Bad string"); }; var _array = function () { var _local1 = []; if (ch == "[") { _next(); _white(); if (ch == "]") { _next(); return(_local1); } while (ch) { _local1.push(_value()); _white(); if (ch == "]") { _next(); return(_local1); } if (ch != ",") { break; } _next(); _white(); } } _error("Bad array"); }; var _object = function () { var _local2; var _local1 = {}; if (ch == "{") { _next(); _white(); if (ch == "}") { _next(); return(_local1); } while (ch) { _local2 = _string(); _white(); if (ch != ":") { break; } _next(); _local1[_local2] = _value(); _white(); if (ch == "}") { _next(); return(_local1); } if (ch != ",") { break; } _next(); _white(); } } _error("Bad object"); }; var _number = function () { var _local1 = ""; var _local2; if (ch == "-") { _local1 = "-"; _next(); } while ((ch >= "0") && (ch <= "9")) { _local1 = _local1 + ch; _next(); } if (ch == ".") { _local1 = _local1 + "."; while ((_next() && (ch >= "0")) && (ch <= "9")) { _local1 = _local1 + ch; } } _local2 = 1 * _local1; if (!isFinite(_local2)) { _error("Bad number"); } else { return(_local2); } }; 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"))) { break; } _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()); } static function getType(v) { if (v instanceof Array) { return("array"); } return(typeof(v)); } static function decode_chunk() { if ((!cache.busy) && (!cache.complete)) { cache.busy = true; var _local1 = 0; while (_local1 < decode_chunks) { chunk_decoder(); if (cache.complete) { break; } _local1++; } trace(Math.round((cache.pos / cache.arg.length) * 100) + "% decoded"); cache.busy = false; } if (cache.complete) { var _local2 = new Date(); busy = false; clearInterval(interval); cache.callback(cache.root, _local2.getTime() - start); cache.arg = ""; } } static function encode_chunk() { if ((!cache.busy) && (!cache.complete)) { cache.busy = true; var _local1 = 0; while (_local1 < encode_chunks) { chunk_encoder(); if (cache.complete) { break; } _local1++; } cache.busy = false; } if (cache.complete) { var _local3 = new Date(); var _local2 = _local3.getTime(); busy = false; clearInterval(interval); cache.callback(cache.encoded, _local2 - start); cache.encoded = ""; } } static function chunk_decoder() { function _object() { var _local1 = 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++; _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (_local1 != "\"") { throw "Malformed object key in encoded string. Keys must be wrapped in quotes (\"\")"; } com.newgrounds.encoders.JSON.cache.scratch = ""; _setTargetValue({}); } else if (_local1 == ",") { com.newgrounds.encoders.JSON.cache.pos++; _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (_local1 != "\"") { throw "Malformed object key in encoded string. Keys must be wrapped in quotes (\"\")"; } com.newgrounds.encoders.JSON.cache.scratch = ""; } else if (_local1 == "}") { _useParent(); } else if (_local1 == "\"") { com.newgrounds.encoders.JSON.cache.pos++; _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (_local1 != ":") { 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 (_local1 == "\\") { com.newgrounds.encoders.JSON.cache.pos++; _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); } com.newgrounds.encoders.JSON.cache.scratch = com.newgrounds.encoders.JSON.cache.scratch + _local1; } com.newgrounds.encoders.JSON.cache.pos++; } function _array() { var _local1 = 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++; _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); _setTargetValue([]); if (_local1 != "]") { _addArrayKey(); } else { _useParent(); } return(undefined); } if (_local1 == ",") { _addArrayKey(); } else if (_local1 == "]") { _useParent(); } com.newgrounds.encoders.JSON.cache.pos++; } function _boolean() { var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (_local1 == "t") { _setTargetValue(true); com.newgrounds.encoders.JSON.cache.pos = com.newgrounds.encoders.JSON.cache.pos + 3; } else if (_local1 == "f") { _setTargetValue(false); com.newgrounds.encoders.JSON.cache.pos = com.newgrounds.encoders.JSON.cache.pos + 4; } else { throw "Bool values must be true or false"; } _useParent(); } function _null() { var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (_local1 == "n") { _setTargetValue(null); com.newgrounds.encoders.JSON.cache.pos = com.newgrounds.encoders.JSON.cache.pos + 2; } else { throw "Null values must be null"; } _useParent(); } function _string() { var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); if (!com.newgrounds.encoders.JSON.cache.mode) { if (_local1 != "\"") { throw "Strings must be wrapped in quotes (\"\")"; } com.newgrounds.encoders.JSON.cache.scratch = ""; com.newgrounds.encoders.JSON.cache.mode = "string"; } else if (_local1 == "\"") { _setTargetValue(com.newgrounds.encoders.JSON.cache.scratch); _useParent(); } else { if (_local1 == "\\") { com.newgrounds.encoders.JSON.cache.pos++; _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); switch (_local1) { case "n" : _local1 = newline; break; case "r" : _local1 = newline; break; case "t" : _local1 = "\t"; break; case "u" : _local1 = "\\" + _local1; } } com.newgrounds.encoders.JSON.cache.scratch = com.newgrounds.encoders.JSON.cache.scratch + _local1; } com.newgrounds.encoders.JSON.cache.pos++; } function _number() { var _local1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos); var _local2 = "01234567890.-"; if (!com.newgrounds.encoders.JSON.cache.mode) { com.newgrounds.encoders.JSON.cache.mode = "number"; com.newgrounds.encoders.JSON.cache.scratch = ""; } if (_local2.indexOf(_local1) < 0) { _setTargetValue(Number(com.newgrounds.encoders.JSON.cache.scratch)); _useParent(); } else { com.newgrounds.encoders.JSON.cache.scratch = com.newgrounds.encoders.JSON.cache.scratch + _local1; com.newgrounds.encoders.JSON.cache.pos++; } } function _setTargetValue(newval) { var _local2 = _getParent().obj; var _local1 = com.newgrounds.encoders.JSON.cache.parents[com.newgrounds.encoders.JSON.cache.parents.length - 1]; _local2[_local1] = 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 _local2 = com.newgrounds.encoders.JSON.cache; var _local1 = 0; while (_local1 < (com.newgrounds.encoders.JSON.cache.parents.length - 1)) { _local2 = _local2[com.newgrounds.encoders.JSON.cache.parents[_local1]]; _local1++; } return({obj:_local2, name:com.newgrounds.encoders.JSON.cache.parents[_local1]}); } function _getCurrent() { var _local2 = com.newgrounds.encoders.JSON.cache; var _local1 = 0; while (_local1 < com.newgrounds.encoders.JSON.cache.parents.length) { _local2 = _local2[com.newgrounds.encoders.JSON.cache.parents[_local1]]; _local1++; } return({obj:_local2, name:com.newgrounds.encoders.JSON.cache.parents[_local1]}); } function _addParent(child) { com.newgrounds.encoders.JSON.cache.parents.push(child); } function _addArrayKey() { var _local1 = _getCurrent().obj.length; com.newgrounds.encoders.JSON.cache.parents.push(_local1); com.newgrounds.encoders.JSON.cache.mode = null; } if (cache.pos >= cache.arg.length) { cache.complete = true; return(undefined); } if (cache.mode) { eval ("_" + cache.mode)(); } else { var char = cache.arg.charAt(cache.pos); switch (char) { case "{" : _object(); return; case "[" : _array(); return; case "\"" : _string(); return; case "n" : _null(); return; case "t" : _boolean(); return; case "f" : _boolean(); return; default : _number(); } } } static function chunk_encoder() { if (cache.complete) { return(undefined); } var _local2 = getType(cache.target); switch (_local2) { case "number" : cache.encoded = cache.encoded + cache.target; getParent(); break; case "string" : cache.encoded = cache.encoded + (("\"" + cache.target.split("\"").join("\\\"")) + "\""); getParent(); break; case "boolean" : cache.encoded = cache.encoded + ((cache.target == true) ? "true" : "false"); getParent(); break; case "null" : cache.encoded = cache.encoded + "null"; getParent(); break; case "array" : if (cache.target.length < 1) { cache.encoded = cache.encoded + "]"; getParent(); } else { cache.parents.push(cache.target); cache.target = cache.target[0]; if (getType(cache.target) == "array") { cache.encoded = cache.encoded + "["; } else if (getType(cache.target) == "object") { cache.encoded = cache.encoded + "{"; } } break; case "object" : for (var _local1 in cache.target) { break; } if (_local1 === undefined) { cache.encoded = cache.encoded + "}"; getParent(); } else { cache.parents.push(cache.target); cache.target = cache.target[_local1]; cache.encoded = cache.encoded + (("\"" + _local1.split("\"").join("\\\"")) + "\":"); if (getType(cache.target) == "array") { cache.encoded = cache.encoded + "["; } else if (getType(cache.target) == "object") { cache.encoded = cache.encoded + "{"; } } break; default : cache.encoded = cache.encoded + "null"; getParent(); } } static function getParent() { if (cache.parents.length > 0) { var _local1 = cache.parents.pop(); if (getType(_local1) == "array") { _local1.shift(); } else { for (var _local3 in _local1) { delete _local1[_local3]; break; } } if ((getType(_local1) == "object") or (getType(_local1) == "array")) { for (var _local2 in _local1) { break; } if (!(_local2 === undefined)) { cache.encoded = cache.encoded + ","; } } cache.target = _local1; } else { cache.complete = true; } } static var encode_chunks = 20000; static var decode_chunks = 20000; static var busy = false; }
Symbol 74 MovieClip [__Packages.com.newgrounds.encoders.MD5] Frame 0
class com.newgrounds.encoders.MD5 { function MD5 () { } static function calculate(src) { return(hex_md5(src)); } static function hex_md5(src) { return(binl2hex(core_md5(str2binl(src), src.length * 8))); } static function core_md5(x, len) { x[len >> 5] = x[len >> 5] | (128 << (len % 32)); x[(((len + 64) >>> 9) << 4) + 14] = len; var _local4 = 1732584193 /* 0x67452301 */; var _local3 = -271733879; var _local2 = -1732584194; var _local1 = 271733878 /* 0x10325476 */; var _local5 = 0; while (_local5 < x.length) { var _local10 = _local4; var _local9 = _local3; var _local8 = _local2; var _local7 = _local1; _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330); _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983); _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162); _local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682); _local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101); _local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290); _local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501); _local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467); _local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784); _local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473); _local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189); _local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487); _local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835); _local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520); _local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649); _local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070); _local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379); _local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259); _local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551); _local4 = safe_add(_local4, _local10); _local3 = safe_add(_local3, _local9); _local2 = safe_add(_local2, _local8); _local1 = safe_add(_local1, _local7); _local5 = _local5 + 16; } return(new Array(_local4, _local3, _local2, _local1)); } static function md5_cmn(q, a, b, x, s, t) { return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)); } static function md5_ff(a, b, c, d, x, s, t) { return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)); } static function md5_gg(a, b, c, d, x, s, t) { return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)); } static function md5_hh(a, b, c, d, x, s, t) { return(md5_cmn((b ^ c) ^ d, a, b, x, s, t)); } static function md5_ii(a, b, c, d, x, s, t) { return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t)); } static function bit_rol(num, cnt) { return((num << cnt) | (num >>> (32 - cnt))); } static function safe_add(x, y) { var _local1 = (x & 65535) + (y & 65535); var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16); return((_local2 << 16) | (_local1 & 65535)); } static function str2binl(str) { var _local3 = new Array(); var _local4 = 255; var _local1 = 0; while (_local1 < (str.length * 8)) { _local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32)); _local1 = _local1 + 8; } return(_local3); } static function binl2hex(binarray) { var _local4 = new String(""); var _local3 = new String("0123456789abcdef"); var _local1 = 0; while (_local1 < (binarray.length * 4)) { _local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15)); _local1++; } return(_local4); } }
Symbol 118 MovieClip [__Packages.com.newgrounds.components.APIConnector] Frame 0
class com.newgrounds.components.APIConnector extends MovieClip { var _x, _y, fake_session, api_id, nextFrame, _visible, error_screens, medal_popups, debug, version, local_data, encryption_key, stop, gotoframe_interval, _totalframes, _framesloaded, gotoAndStop; function APIConnector () { super(); _x = Math.round(_x); _y = Math.round(_y); if (fake_session and (com.newgrounds.API.getHost() == "localhost")) { com.newgrounds.API.setFakeSession(true); } if (api_id && (!com.newgrounds.API.isConnected())) { (nextFrame());// not popped _visible = false; setGotoFrame("connecting"); if (error_screens) { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, onNewVersion, this); com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.HOST_BLOCKED, onBadHost, this); } if (medal_popups) { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, doUnlock, this); } com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, onConnected, this); if (com.newgrounds.API.isPublishedHost()) { debug = false; } if (version) { com.newgrounds.API.setVersion(version); } if (!com.newgrounds.API.hasUserSession()) { var _local3 = com.newgrounds.API.loadLocal("api_connector_data"); if (_local3) { local_data = _local3; } else { local_data = {medals_unlocked:new Array()}; } } com.newgrounds.API.setPreload(true); com.newgrounds.API.connect(api_id, encryption_key, debug); } else if (api_id && (com.newgrounds.API.isConnected())) { _visible = false; setGotoFrame("done"); } (stop());// not popped } function doUnlock(e) { var _local5 = _root.attachMovie("NewgroundsAPIAsset_Medal_Popup", "medal_pop_" + e.data.medal.getID(), _root.getNextHighestDepth()); if (e.data.x != undefined) { _local5._x = e.data.x + 254; } else { _local5._x = Stage.width; } if (e.data.x != undefined) { _local5._y = e.data.y + 73; } else { _local5._y = Stage.height; } _local5.medal = e.data.medal; var _local3 = com.newgrounds.API.getMedals(); var _local2 = 0; while (_local2 < _local3.length) { if ((_local3[_local2].getID() != e.data.medal.getID()) && (_root["medal_pop_" + _local3[_local2].getID()])) { _root["medal_pop_" + _local3[_local2].getID()]._y = _root["medal_pop_" + _local3[_local2].getID()]._y - 70; } _local2++; } } function onLoginError() { var _local2 = _root.attachMovie("Asset_Login_Warning", "Asset_Login_Warning", _root.getNextHighestDepth()); } function onConnectionError() { var _local3 = _root.attachMovie("Asset_Connection_Error", "Asset_Connection_Error", _root.getNextHighestDepth()); setGotoFrame("done"); } function onConnected(event, params) { if (event.success) { setGotoFrame("connected"); if (((error_screens && (com.newgrounds.API.isPublishedHost())) && (com.newgrounds.API.hasPublisher())) && (!com.newgrounds.API.hasUserSession())) { onLoginError(); } } else if (error_screens) { onConnectionError(); } } function onNewVersion() { var _local2 = _root.attachMovie("NewgroundsAsset_New_Version_Available", "NewgroundsAsset_New_Version_Available", _root.getNextHighestDepth()); _local2.official_version_url = com.newgrounds.API.getOfficialURL(); } function onBadHost() { var _local2 = _root.attachMovie("NewgroundsAsset_Illegal_Host", "NewgroundsAsset_Illegal_Host", _root.getNextHighestDepth()); _local2.official_version_url = com.newgrounds.API.getOfficialURL(); } function setGotoFrame(frame) { if (goto_frame == null) { goto_frame = frame; gotoframe_interval = setInterval(this, "gotoFrameIfLoaded", 50); } } function gotoFrameIfLoaded() { if ((goto_frame != null) && (_framesloaded == _totalframes)) { _visible = true; gotoAndStop(goto_frame); goto_frame = null; clearInterval(gotoframe_interval); } } var goto_frame = null; }

Library Items

Symbol 1 GraphicUsed by:8
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClipUses:2Used by:4
Symbol 4 MovieClipUses:3Used by:8
Symbol 5 GraphicUsed by:6 89 103
Symbol 6 MovieClipUses:5Used by:8 102 103
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:1 4 6 7Used by:21
Symbol 9 GraphicUsed by:20
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:12
Symbol 12 MovieClipUses:11Used by:20
Symbol 13 GraphicUsed by:15
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:13 14Used by:20 102
Symbol 16 GraphicUsed by:20
Symbol 17 SoundUsed by:20
Symbol 18 GraphicUsed by:20
Symbol 19 SoundUsed by:20
Symbol 20 MovieClipUses:9 12 15 16 17 18 19Used by:21
Symbol 21 MovieClip [Preloader]Uses:8 20Used by:40 104
Symbol 22 GraphicUsed by:40 262
Symbol 23 FontUsed by:24 27 28
Symbol 24 TextUses:23Used by:40 262
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClipUses:25Used by:40 262
Symbol 27 TextUses:23Used by:40 262
Symbol 28 TextUses:23Used by:40 262
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:33
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:33
Symbol 33 MovieClipUses:30 32Used by:36
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:36 244 248
Symbol 36 MovieClipUses:33 35Used by:40 259 262
Symbol 37 FontUsed by:38 39 260 261
Symbol 38 EditableTextUses:37Used by:40
Symbol 39 EditableTextUses:37Used by:40
Symbol 40 MovieClip [loading_screen]Uses:21 22 24 26 27 28 36 38 39
Symbol 42 Bitmap [DefaultSaveIcon]Used by:44
Symbol 43 Bitmap [DefaultMedalIcon]Used by:44
Symbol 44 GraphicUses:43 42Used by:45
Symbol 45 MovieClip [Newgrounds API Classes]Uses:44Used by:104
Symbol 76 GraphicUsed by:103
Symbol 77 BitmapUsed by:79
Symbol 78 BitmapUsed by:79
Symbol 79 GraphicUses:77 78Used by:90
Symbol 80 BitmapUsed by:81
Symbol 81 GraphicUses:80Used by:90
Symbol 82 BitmapUsed by:83
Symbol 83 GraphicUses:82Used by:88 90
Symbol 84 BitmapUsed by:85
Symbol 85 GraphicUses:84Used by:88
Symbol 86 BitmapUsed by:87
Symbol 87 GraphicUses:86Used by:88
Symbol 88 MovieClipUses:83 85 87Used by:90
Symbol 89 ButtonUses:5Used by:90
Symbol 90 ButtonUses:79 81 88 83 89Used by:103
Symbol 91 MovieClipUsed by:103
Symbol 92 GraphicUsed by:102
Symbol 93 GraphicUsed by:102
Symbol 94 GraphicUsed by:102
Symbol 95 GraphicUsed by:96
Symbol 96 MovieClipUses:95Used by:102
Symbol 97 GraphicUsed by:101
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:100
Symbol 100 MovieClipUses:99Used by:101
Symbol 101 MovieClipUses:97 100Used by:102
Symbol 102 MovieClipUses:92 6 93 94 96 101 15Used by:103
Symbol 103 MovieClip [FlashAd]Uses:76 90 6 91 102 5Used by:104
Symbol 104 MovieClip [APIConnector]Uses:45 103 21Used by:259
Symbol 105 GraphicUsed by:116
Symbol 106 GraphicUsed by:109
Symbol 107 GraphicUsed by:109
Symbol 108 GraphicUsed by:109
Symbol 109 ButtonUses:106 107 108Used by:116
Symbol 110 BitmapUsed by:111
Symbol 111 GraphicUses:110Used by:116
Symbol 112 GraphicUsed by:116
Symbol 113 GraphicUsed by:116
Symbol 114 GraphicUsed by:115
Symbol 115 MovieClipUses:114Used by:116 126
Symbol 116 MovieClipUses:105 109 111 112 113 115Used by:117
Symbol 117 MovieClip [Flash Ad (NewgroundsAPI)]Uses:116
Symbol 119 GraphicUsed by:126 128 188
Symbol 120 GraphicUsed by:126 128 188
Symbol 121 GraphicUsed by:126 128 188
Symbol 122 GraphicUsed by:126 128 188
Symbol 123 FontUsed by:124 125 127 133 136 142 145 147 175 176 184 185
Symbol 124 TextUses:123Used by:188
Symbol 125 TextUses:123Used by:126
Symbol 126 MovieClipUses:119 120 121 122 115 125Used by:188
Symbol 127 TextUses:123Used by:128
Symbol 128 MovieClipUses:119 120 121 122 127Used by:188
Symbol 129 GraphicUsed by:130
Symbol 130 MovieClipUses:129Used by:140 146 149
Symbol 131 GraphicUsed by:132 141 183
Symbol 132 MovieClip [NewgroundsAPIAsset_Medal_Icon_Placeholder]Uses:131Used by:140
Symbol 133 EditableTextUses:123Used by:140
Symbol 134 FontUsed by:135 148 181 186
Symbol 135 TextUses:134Used by:140
Symbol 136 EditableTextUses:123Used by:140
Symbol 137 Bitmap [NewgroundsAPIAsset_default_medal_icon_1]Used by:139
Symbol 138 Bitmap [NewgroundsAPIAsset_default_medal_icon_2]Used by:139
Symbol 139 GraphicUses:138 137Used by:140
Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup]Uses:130 132 133 135 136 139Used by:188
Symbol 141 ButtonUses:131Used by:182 188
Symbol 142 TextUses:123Used by:146
Symbol 143 BitmapUsed by:144
Symbol 144 GraphicUses:143Used by:146 149
Symbol 145 TextUses:123Used by:146
Symbol 146 MovieClip [NewgroundsAPIAsset_Login_Warning]Uses:130 142 144 145Used by:188
Symbol 147 TextUses:123Used by:149
Symbol 148 TextUses:134Used by:149
Symbol 149 MovieClip [NewgroundsAPIAsset_Connection_Error]Uses:130 147 148 144Used by:188
Symbol 150 GraphicUsed by:151
Symbol 151 MovieClipUses:150Used by:170
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClipUses:152Used by:170
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClipUses:154Used by:170
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClipUses:156Used by:170
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClipUses:158Used by:170
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClipUses:160Used by:170
Symbol 162 GraphicUsed by:163
Symbol 163 MovieClipUses:162Used by:170
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClipUses:164Used by:170
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:166Used by:170
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:168Used by:170
Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background]Uses:151 153 155 157 159 161 163 165 167 169Used by:182 187
Symbol 171 GraphicUsed by:182
Symbol 172 GraphicUsed by:174
Symbol 173 GraphicUsed by:174
Symbol 174 ButtonUses:172 173Used by:182
Symbol 175 TextUses:123Used by:182
Symbol 176 TextUses:123Used by:182
Symbol 177 GraphicUsed by:180
Symbol 178 GraphicUsed by:180
Symbol 179 GraphicUsed by:180
Symbol 180 ButtonUses:177 178 179Used by:182 187
Symbol 181 TextUses:134Used by:182
Symbol 182 MovieClip [NewgroundsAsset_New_Version_Available]Uses:141 170 171 174 175 176 180 181Used by:188
Symbol 183 ButtonUses:131Used by:187
Symbol 184 TextUses:123Used by:187
Symbol 185 TextUses:123Used by:187
Symbol 186 TextUses:134Used by:187
Symbol 187 MovieClip [NewgroundsAsset_Illegal_Host]Uses:183 170 184 185 180 186Used by:188
Symbol 188 MovieClip [API Connector (NewgroundsAPI)]Uses:119 120 121 122 124 126 128 140 141 146 149 182 187
Symbol 189 Bitmap [NewgroundsAPIAsset_default_medal_icon_3]
Symbol 190 Bitmap [NewgroundsAPIAsset_default_medal_icon_4]
Symbol 191 Bitmap [NewgroundsAPIAsset_default_medal_icon_5]
Symbol 192 GraphicUsed by:193
Symbol 193 MovieClipUses:192Used by:210
Symbol 194 GraphicUsed by:195
Symbol 195 MovieClipUses:194Used by:210
Symbol 196 BitmapUsed by:197 204
Symbol 197 GraphicUses:196Used by:208
Symbol 198 BitmapUsed by:199 205
Symbol 199 GraphicUses:198Used by:208
Symbol 200 BitmapUsed by:201 206
Symbol 201 GraphicUses:200Used by:208
Symbol 202 BitmapUsed by:203 207
Symbol 203 GraphicUses:202Used by:208
Symbol 204 GraphicUses:196Used by:208
Symbol 205 GraphicUses:198Used by:208
Symbol 206 GraphicUses:200Used by:208
Symbol 207 GraphicUses:202Used by:208
Symbol 208 MovieClipUses:197 199 201 203 204 205 206 207Used by:210
Symbol 209 GraphicUsed by:210
Symbol 210 MovieClipUses:193 195 208 209Used by:259
Symbol 211 BitmapUsed by:212
Symbol 212 GraphicUses:211Used by:259
Symbol 213 FontUsed by:214 215
Symbol 214 EditableTextUses:213Used by:223
Symbol 215 TextUses:213Used by:216
Symbol 216 MovieClipUses:215Used by:223
Symbol 217 GraphicUsed by:218
Symbol 218 MovieClipUses:217Used by:222
Symbol 219 GraphicUsed by:220
Symbol 220 MovieClipUses:219Used by:221
Symbol 221 MovieClipUses:220Used by:222
Symbol 222 MovieClipUses:218 221Used by:223
Symbol 223 MovieClipUses:214 216 222Used by:259
Symbol 224 GraphicUsed by:230
Symbol 225 GraphicUsed by:230
Symbol 226 GraphicUsed by:230
Symbol 227 GraphicUsed by:230
Symbol 228 GraphicUsed by:230
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:224 225 226 227 228 229Used by:237
Symbol 231 GraphicUsed by:232
Symbol 232 MovieClipUses:231Used by:233
Symbol 233 MovieClipUses:232Used by:234
Symbol 234 MovieClipUses:233Used by:237
Symbol 235 GraphicUsed by:236
Symbol 236 MovieClipUses:235Used by:237
Symbol 237 MovieClipUses:230 234 236Used by:240
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClipUses:238Used by:240
Symbol 240 MovieClipUses:237 239Used by:259
Symbol 241 BitmapUsed by:242
Symbol 242 GraphicUses:241Used by:243
Symbol 243 MovieClipUses:242Used by:244
Symbol 244 MovieClipUses:243 35Used by:259
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:247
Symbol 247 MovieClipUses:246Used by:248
Symbol 248 MovieClipUses:247 35Used by:259
Symbol 249 BitmapUsed by:250
Symbol 250 GraphicUses:249Used by:251
Symbol 251 MovieClipUses:250Used by:259
Symbol 252 GraphicUsed by:253
Symbol 253 MovieClipUses:252Used by:258
Symbol 254 GraphicUsed by:255
Symbol 255 MovieClipUses:254Used by:258
Symbol 256 GraphicUsed by:257
Symbol 257 MovieClipUses:256Used by:258
Symbol 258 MovieClipUses:253 255 257Used by:259
Symbol 259 MovieClipUses:210 212 223 240 244 248 36 251 258 104Used by:262
Symbol 260 EditableTextUses:37Used by:262
Symbol 261 EditableTextUses:37Used by:262
Symbol 262 MovieClipUses:259 22 24 26 27 28 36 260 261Used by:Timeline
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClipUses:263Used by:Timeline
Symbol 65 MovieClip [__Packages.com.newgrounds.API]
Symbol 51 MovieClip [__Packages.com.newgrounds.Bridge]
Symbol 47 MovieClip [__Packages.com.newgrounds.Event]
Symbol 49 MovieClip [__Packages.com.newgrounds.APIEvent]
Symbol 56 MovieClip [__Packages.com.newgrounds.APIConnection]
Symbol 48 MovieClip [__Packages.com.newgrounds.EventDispatcher]
Symbol 52 MovieClip [__Packages.com.newgrounds.APIEventDispatcher]
Symbol 55 MovieClip [__Packages.com.newgrounds.APICommand]
Symbol 53 MovieClip [__Packages.com.newgrounds.encoders.BaseN]
Symbol 64 MovieClip [__Packages.com.newgrounds.SaveFile]
Symbol 54 MovieClip [__Packages.com.newgrounds.encoders.ImageScanner]
Symbol 63 MovieClip [__Packages.com.newgrounds.SaveGroup]
Symbol 61 MovieClip [__Packages.com.newgrounds.SaveKey]
Symbol 62 MovieClip [__Packages.com.newgrounds.SaveRating]
Symbol 60 MovieClip [__Packages.com.newgrounds.BitmapLoader]
Symbol 69 MovieClip [__Packages.com.newgrounds.Medal]
Symbol 71 MovieClip [__Packages.com.newgrounds.ScoreBoard]
Symbol 75 MovieClip [__Packages.com.newgrounds.components.FlashAd]
Symbol 50 MovieClip [__Packages.com.newgrounds.Logger]
Symbol 265 MovieClip [__Packages.mx.events.EventDispatcher]
Symbol 266 MovieClip [__Packages.Playtomic.LogRequest]
Symbol 267 MovieClip [__Packages.Playtomic.Log]
Symbol 268 MovieClip [__Packages.com.as2.GPSAPI]
Symbol 269 MovieClip [__Packages.com.api.as2.evnt.APIEvents]
Symbol 270 MovieClip [__Packages.com.api.as2.API]
Symbol 271 MovieClip [__Packages.com.api.as2.security.RC4]
Symbol 272 MovieClip [__Packages.mx.utils.Delegate]
Symbol 41 MovieClip [__Packages.com.newgrounds.shims.APIShim]
Symbol 46 MovieClip [__Packages.com.newgrounds.APIError]
Symbol 57 MovieClip [__Packages.com.newgrounds.crypto.MD5]
Symbol 58 MovieClip [__Packages.com.newgrounds.crypto.RC4]
Symbol 59 MovieClip [__Packages.com.newgrounds.encoders.json.JSON]
Symbol 66 MovieClip [__Packages.com.newgrounds.ValidationTools]
Symbol 67 MovieClip [__Packages.com.newgrounds.SaveGroupQuery]
Symbol 68 MovieClip [__Packages.com.newgrounds.RemoteAuth]
Symbol 70 MovieClip [__Packages.com.newgrounds.Score]
Symbol 72 MovieClip [__Packages.com.newgrounds.encoders.RC4]
Symbol 73 MovieClip [__Packages.com.newgrounds.encoders.JSON]
Symbol 74 MovieClip [__Packages.com.newgrounds.encoders.MD5]
Symbol 118 MovieClip [__Packages.com.newgrounds.components.APIConnector]

Instance Names

"loader"Frame 1Symbol 262 MovieClip
"container"Frame 1Symbol 264 MovieClip
"loadingBar"Symbol 21 MovieClip [Preloader] Frame 1Symbol 8 MovieClip
"playButton"Symbol 21 MovieClip [Preloader] Frame 10Symbol 20 MovieClip
"preloader"Symbol 40 MovieClip [loading_screen] Frame 1Symbol 21 MovieClip [Preloader]
"playgame"Symbol 40 MovieClip [loading_screen] Frame 2Symbol 38 EditableText
"download"Symbol 40 MovieClip [loading_screen] Frame 2Symbol 39 EditableText
"newgroundsButton"Symbol 103 MovieClip [FlashAd] Frame 1Symbol 90 Button
"adContainer"Symbol 103 MovieClip [FlashAd] Frame 1Symbol 91 MovieClip
"ad"Symbol 104 MovieClip [APIConnector] Frame 1Symbol 103 MovieClip [FlashAd]
"loader"Symbol 104 MovieClip [APIConnector] Frame 1Symbol 21 MovieClip [Preloader]
"background"Symbol 117 MovieClip [Flash Ad (NewgroundsAPI)] Frame 1Symbol 116 MovieClip
"icon"Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 1Symbol 132 MovieClip [NewgroundsAPIAsset_Medal_Icon_Placeholder]
"shadow"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 151 MovieClip
"c"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 153 MovieClip
"b"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 155 MovieClip
"t"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 157 MovieClip
"l"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 159 MovieClip
"r"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 161 MovieClip
"tl"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 163 MovieClip
"tr"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 165 MovieClip
"bl"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 167 MovieClip
"br"Symbol 170 MovieClip [NewgroundsAPIAsset_big_popup_background] Frame 1Symbol 169 MovieClip
"background"Symbol 182 MovieClip [NewgroundsAsset_New_Version_Available] Frame 1Symbol 141 Button
"background"Symbol 187 MovieClip [NewgroundsAsset_Illegal_Host] Frame 1Symbol 183 Button
"connected"Symbol 188 MovieClip [API Connector (NewgroundsAPI)] Frame 11Symbol 128 MovieClip
"b"Symbol 221 MovieClip Frame 1Symbol 220 MovieClip
"b"Symbol 222 MovieClip Frame 1Symbol 221 MovieClip
"b"Symbol 233 MovieClip Frame 1Symbol 232 MovieClip
"b"Symbol 234 MovieClip Frame 1Symbol 233 MovieClip
"flag"Symbol 237 MovieClip Frame 1Symbol 230 MovieClip
"flag1"Symbol 240 MovieClip Frame 1Symbol 237 MovieClip
"flag2"Symbol 240 MovieClip Frame 1Symbol 237 MovieClip
"flag3"Symbol 240 MovieClip Frame 1Symbol 237 MovieClip
"flag4"Symbol 240 MovieClip Frame 1Symbol 237 MovieClip
"flag5"Symbol 240 MovieClip Frame 1Symbol 237 MovieClip
"highlight"Symbol 240 MovieClip Frame 1Symbol 239 MovieClip
"adBox3"Symbol 258 MovieClip Frame 1Symbol 253 MovieClip
"adBox"Symbol 258 MovieClip Frame 1Symbol 255 MovieClip
"adBox1"Symbol 258 MovieClip Frame 1Symbol 257 MovieClip
"adBox"Symbol 259 MovieClip Frame 2Symbol 258 MovieClip
"preloader"Symbol 262 MovieClip Frame 1Symbol 259 MovieClip
"playgame"Symbol 262 MovieClip Frame 2Symbol 260 EditableText
"download"Symbol 262 MovieClip Frame 2Symbol 261 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 21 as "Preloader"
ExportAssets (56)Timeline Frame 1Symbol 40 as "loading_screen"
ExportAssets (56)Timeline Frame 1Symbol 42 as "DefaultSaveIcon"
ExportAssets (56)Timeline Frame 1Symbol 43 as "DefaultMedalIcon"
ExportAssets (56)Timeline Frame 1Symbol 45 as "Newgrounds API Classes"
ExportAssets (56)Timeline Frame 1Symbol 103 as "FlashAd"
ExportAssets (56)Timeline Frame 1Symbol 104 as "APIConnector"
ExportAssets (56)Timeline Frame 1Symbol 117 as "Flash Ad (NewgroundsAPI)"
ExportAssets (56)Timeline Frame 1Symbol 132 as "NewgroundsAPIAsset_Medal_Icon_Placeholder"
ExportAssets (56)Timeline Frame 1Symbol 137 as "NewgroundsAPIAsset_default_medal_icon_1"
ExportAssets (56)Timeline Frame 1Symbol 138 as "NewgroundsAPIAsset_default_medal_icon_2"
ExportAssets (56)Timeline Frame 1Symbol 140 as "NewgroundsAPIAsset_Medal_Popup"
ExportAssets (56)Timeline Frame 1Symbol 146 as "NewgroundsAPIAsset_Login_Warning"
ExportAssets (56)Timeline Frame 1Symbol 149 as "NewgroundsAPIAsset_Connection_Error"
ExportAssets (56)Timeline Frame 1Symbol 170 as "NewgroundsAPIAsset_big_popup_background"
ExportAssets (56)Timeline Frame 1Symbol 182 as "NewgroundsAsset_New_Version_Available"
ExportAssets (56)Timeline Frame 1Symbol 187 as "NewgroundsAsset_Illegal_Host"
ExportAssets (56)Timeline Frame 1Symbol 188 as "API Connector (NewgroundsAPI)"
ExportAssets (56)Timeline Frame 1Symbol 189 as "NewgroundsAPIAsset_default_medal_icon_3"
ExportAssets (56)Timeline Frame 1Symbol 190 as "NewgroundsAPIAsset_default_medal_icon_4"
ExportAssets (56)Timeline Frame 1Symbol 191 as "NewgroundsAPIAsset_default_medal_icon_5"
ExportAssets (56)Timeline Frame 1Symbol 65 as "__Packages.com.newgrounds.API"
ExportAssets (56)Timeline Frame 1Symbol 51 as "__Packages.com.newgrounds.Bridge"
ExportAssets (56)Timeline Frame 1Symbol 47 as "__Packages.com.newgrounds.Event"
ExportAssets (56)Timeline Frame 1Symbol 49 as "__Packages.com.newgrounds.APIEvent"
ExportAssets (56)Timeline Frame 1Symbol 56 as "__Packages.com.newgrounds.APIConnection"
ExportAssets (56)Timeline Frame 1Symbol 48 as "__Packages.com.newgrounds.EventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 52 as "__Packages.com.newgrounds.APIEventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 55 as "__Packages.com.newgrounds.APICommand"
ExportAssets (56)Timeline Frame 1Symbol 53 as "__Packages.com.newgrounds.encoders.BaseN"
ExportAssets (56)Timeline Frame 1Symbol 64 as "__Packages.com.newgrounds.SaveFile"
ExportAssets (56)Timeline Frame 1Symbol 54 as "__Packages.com.newgrounds.encoders.ImageScanner"
ExportAssets (56)Timeline Frame 1Symbol 63 as "__Packages.com.newgrounds.SaveGroup"
ExportAssets (56)Timeline Frame 1Symbol 61 as "__Packages.com.newgrounds.SaveKey"
ExportAssets (56)Timeline Frame 1Symbol 62 as "__Packages.com.newgrounds.SaveRating"
ExportAssets (56)Timeline Frame 1Symbol 60 as "__Packages.com.newgrounds.BitmapLoader"
ExportAssets (56)Timeline Frame 1Symbol 69 as "__Packages.com.newgrounds.Medal"
ExportAssets (56)Timeline Frame 1Symbol 71 as "__Packages.com.newgrounds.ScoreBoard"
ExportAssets (56)Timeline Frame 1Symbol 75 as "__Packages.com.newgrounds.components.FlashAd"
ExportAssets (56)Timeline Frame 1Symbol 50 as "__Packages.com.newgrounds.Logger"
ExportAssets (56)Timeline Frame 1Symbol 265 as "__Packages.mx.events.EventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 266 as "__Packages.Playtomic.LogRequest"
ExportAssets (56)Timeline Frame 1Symbol 267 as "__Packages.Playtomic.Log"
ExportAssets (56)Timeline Frame 1Symbol 268 as "__Packages.com.as2.GPSAPI"
ExportAssets (56)Timeline Frame 1Symbol 269 as "__Packages.com.api.as2.evnt.APIEvents"
ExportAssets (56)Timeline Frame 1Symbol 270 as "__Packages.com.api.as2.API"
ExportAssets (56)Timeline Frame 1Symbol 271 as "__Packages.com.api.as2.security.RC4"
ExportAssets (56)Timeline Frame 1Symbol 272 as "__Packages.mx.utils.Delegate"
ExportAssets (56)Timeline Frame 1Symbol 41 as "__Packages.com.newgrounds.shims.APIShim"
ExportAssets (56)Timeline Frame 1Symbol 46 as "__Packages.com.newgrounds.APIError"
ExportAssets (56)Timeline Frame 1Symbol 57 as "__Packages.com.newgrounds.crypto.MD5"
ExportAssets (56)Timeline Frame 1Symbol 58 as "__Packages.com.newgrounds.crypto.RC4"
ExportAssets (56)Timeline Frame 1Symbol 59 as "__Packages.com.newgrounds.encoders.json.JSON"
ExportAssets (56)Timeline Frame 1Symbol 66 as "__Packages.com.newgrounds.ValidationTools"
ExportAssets (56)Timeline Frame 1Symbol 67 as "__Packages.com.newgrounds.SaveGroupQuery"
ExportAssets (56)Timeline Frame 1Symbol 68 as "__Packages.com.newgrounds.RemoteAuth"
ExportAssets (56)Timeline Frame 1Symbol 70 as "__Packages.com.newgrounds.Score"
ExportAssets (56)Timeline Frame 1Symbol 72 as "__Packages.com.newgrounds.encoders.RC4"
ExportAssets (56)Timeline Frame 1Symbol 73 as "__Packages.com.newgrounds.encoders.JSON"
ExportAssets (56)Timeline Frame 1Symbol 74 as "__Packages.com.newgrounds.encoders.MD5"
ExportAssets (56)Timeline Frame 1Symbol 118 as "__Packages.com.newgrounds.components.APIConnector"

Labels

"_up"Symbol 20 MovieClip Frame 1
"_over"Symbol 20 MovieClip Frame 10
"_down"Symbol 20 MovieClip Frame 20
"loading"Symbol 21 MovieClip [Preloader] Frame 1
"loaded"Symbol 21 MovieClip [Preloader] Frame 10
"sitelock"Symbol 40 MovieClip [loading_screen] Frame 2
"idle"Symbol 103 MovieClip [FlashAd] Frame 1
"loading"Symbol 103 MovieClip [FlashAd] Frame 10
"loaded"Symbol 103 MovieClip [FlashAd] Frame 20
"noBorder"Symbol 103 MovieClip [FlashAd] Frame 30
"adPreloader"Symbol 104 MovieClip [APIConnector] Frame 2
"ad"Symbol 104 MovieClip [APIConnector] Frame 12
"invisible"Symbol 104 MovieClip [APIConnector] Frame 22
"closeme"Symbol 140 MovieClip [NewgroundsAPIAsset_Medal_Popup] Frame 11
"closeme"Symbol 146 MovieClip [NewgroundsAPIAsset_Login_Warning] Frame 11
"closeme"Symbol 149 MovieClip [NewgroundsAPIAsset_Connection_Error] Frame 11
"connecting"Symbol 188 MovieClip [API Connector (NewgroundsAPI)] Frame 2
"connected"Symbol 188 MovieClip [API Connector (NewgroundsAPI)] Frame 11
"done"Symbol 188 MovieClip [API Connector (NewgroundsAPI)] Frame 20
"twotowersgames"Symbol 244 MovieClip Frame 1
"none"Symbol 259 MovieClip Frame 1
"cpmstar"Symbol 259 MovieClip Frame 2
"newgrounds"Symbol 259 MovieClip Frame 3
"sitelock"Symbol 262 MovieClip Frame 2

Dynamic Text Variables

medal_nameSymbol 133 EditableText"medal unlocked!"
medal_valueSymbol 136 EditableText"100pts"
percentageSymbol 214 EditableText"0%"




http://swfchan.com/27/134733/info.shtml
Created: 9/2 -2019 20:07:17 Last modified: 9/2 -2019 20:07:17 Server time: 03/05 -2024 12:06:14