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

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

L.A. Noire- Deleted Cases.swf

This is the info page for
Flash #100053

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


ActionScript [AS1/AS2]
Frame 1
stop();
Instance of Symbol 62 MovieClip [com.newgrounds.components.APIConnector] in Frame 1
//component parameters onClipEvent (construct) { apiId = "18817:aSqjQDPa"; encryptionKey = "KnjV5JzigU46nREtz4wjs2IYFL7gTJOv"; debugMode = "Off"; movieVersion = ""; connectorType = "Flash Ad + Preloader"; }
Frame 2
stop();
Symbol 22 MovieClip [com.newgrounds.components.Preloader] Frame 1
#initclip 37 Object.registerClass("com.newgrounds.components.Preloader", com.newgrounds.components.Preloader); #endinitclip
Symbol 24 MovieClip [Flash Ad Class] Frame 1
#initclip 33 Object.registerClass("Flash Ad Class", com.newgrounds.shims.FlashAdShim); #endinitclip
Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 1
#initclip 35 Object.registerClass("com.newgrounds.components.FlashAd", com.newgrounds.components.FlashAd); #endinitclip
Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 1
#initclip 36 Object.registerClass("com.newgrounds.components.APIConnector", com.newgrounds.components.APIConnector); #endinitclip
Instance of Symbol 61 MovieClip [com.newgrounds.components.FlashAd] "ad" in Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 1
//component parameters onClipEvent (construct) { apiId = ""; showBorder = true; }
Instance of Symbol 22 MovieClip [com.newgrounds.components.Preloader] "loader" in Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 1
//component parameters onClipEvent (construct) { autoPlay = false; mainClass = ""; }
Symbol 64 MovieClip [Newgrounds API Classes] Frame 1
#initclip 34 Object.registerClass("Newgrounds API Classes", com.newgrounds.shims.APIShim); #endinitclip
Symbol 25 MovieClip [__Packages.com.newgrounds.components.FlashAd] Frame 0
class com.newgrounds.components.FlashAd extends MovieClip { static var debugMode; var _x, _y, stop, newgroundsButton, onUnload, _adListener, onEnterFrame, _parent, _apiId, _showBorder, _ad, adContainer, gotoAndStop, _adFeedLoader; function FlashAd () { super(); System.security.allowDomain("server.cpmstar.com"); _x = int(_x); _y = int(_y); (stop());// not popped if (newgroundsButton) { newgroundsButton.onRelease = onNGClick; } onUnload = removeAd; var _local3 = this; _adListener = {onLoadError:function (target, error, httpStatus) { target._parent.onAdError(target, error, httpStatus); }}; onEnterFrame = init; } function init() { onEnterFrame = null; var _local2; _local2 = !(_parent instanceof com.newgrounds.components.APIConnector); if (_local2 && ((!_apiId) || (_apiId == ""))) { trace("[Newgrounds API] :: You must enter the API ID for your movie into the ad component.\nFor more info, please see http://www.newgrounds.com/wiki."); } } function get apiId() { return(_apiId); } function set apiId(value) { _apiId = value; if (_apiId && (_apiId != "")) { loadAdFeed(_adFeedURL); } //return(apiId); } 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"));// not popped } else { (gotoAndStop("loading"));// not popped } } else { (gotoAndStop("idle"));// not popped } } else { (gotoAndStop("noBorder"));// not popped } //return(showBorder); } function loadAdFeed(adFeedURL) { _adFeedLoader = new LoadVars(); var target = this; _adFeedLoader.onData = function (data) { target.onAdFeedLoaded(data); }; if (debugMode) { adFeedURL = TEST_AD_FEED_URL; } else { var _local2 = _apiId; var _local3 = _local2.indexOf(":"); if (_local3 != -1) { _local2 = _local2.substring(0, _local3); } adFeedURL = adFeedURL + _local2; } _adFeedLoader.load(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) { trace("[Newgrounds API] :: Unable to load ad." + error); removeAd(); } function onNGClick() { _root.getURL("http://www.newgrounds.com", "_blank"); } static var _adFeedURL = "http://www.ngads.com/getad.php?url=http%3A%2F%2Fserver.cpmstar.com%2Fadviewas2.swf%3Fpoolid=731%26subpoolid="; static var TEST_AD_FEED_URL = "http://www.ngads.com/adtest.php"; }
Symbol 30 MovieClip [__Packages.com.newgrounds.components.APIConnector] Frame 0
class com.newgrounds.components.APIConnector extends MovieClip { var stop, _x, _y, onEnterFrame, connectorType, gotoAndStop, ad, apiId, debugMode, encryptionKey, movieVersion; function APIConnector () { super(); (stop());// not popped _x = int(_x); _y = int(_y); gotoFrame(); _root.stop(); connect(); onEnterFrame = init; } function gotoFrame() { switch (connectorType) { case "Flash Ad + Preloader" : default : (gotoAndStop("adPreloader"));// not popped break; case "Flash Ad Only" : (gotoAndStop("ad"));// not popped break; case "Invisible" : (gotoAndStop("invisible"));// not popped } } function init() { onEnterFrame = null; if (ad) { if (apiId && (apiId != "")) { if (debugMode != "Off") { com.newgrounds.components.FlashAd.debugMode = (_root._url == "localhost") || (_root._url.indexOf("file://") != -1); } ad.__set__apiId(apiId); } else { com.newgrounds.Logger.logError("You must enter the API ID for your movie into the API Connector.", "For a tutorial, please go to http://www.newgrounds.com/account/flashapi2"); } } } function connect() { if (apiId && (apiId != "")) { var _local4; _local4 = _global.com.newgrounds.API; if (_local4 && (!_local4.connected)) { switch (debugMode) { case "Off" : default : _local4.debugMode = _local4.RELEASE_MODE; break; case "Simulate Logged-in User" : _local4.debugMode = _local4.DEBUG_MODE_LOGGED_IN; break; case "Simulate Logged-out User" : _local4.debugMode = _local4.DEBUG_MODE_LOGGED_OUT; break; case "Simulate New Version" : _local4.debugMode = _local4.DEBUG_MODE_NEW_VERSION; break; case "Simulate Host Blocked" : _local4.debugMode = _local4.DEBUG_MODE_HOST_BLOCKED; } _local4.addEventListener("apiConnected", {target:this, func:onConnected}); _local4.connect(_root, apiId, encryptionKey, movieVersion); } } } function onConnected(event) { } }
Symbol 26 MovieClip [__Packages.com.newgrounds.components.Preloader] Frame 0
class com.newgrounds.components.Preloader extends MovieClip { var gotoAndStop, _autoPlay, loadingBar, playButton, onLoadComplete; function Preloader () { super(); (gotoAndStop("loading"));// not popped _root.stop(); } function get autoPlay() { return(_autoPlay); } function set autoPlay(v) { _autoPlay = v; if (v && (percentLoaded >= 1)) { playMovie(); } //return(autoPlay); } function get bytesLoaded() { return(_root.getBytesLoaded()); } function get bytesTotal() { return(_root.getBytesTotal()); } function get percentLoaded() { return(((bytesTotal > 0) ? (bytesLoaded / bytesTotal) : 0)); } function onEnterFrame(event) { if (loadingBar) { loadingBar.gotoAndStop(int((percentLoaded * (loadingBar._totalframes - 1)) + 1)); } if (percentLoaded >= 1) { if (autoPlay) { playMovie(); } else { (gotoAndStop("loaded"));// not popped } } if (playButton && (!playButton.onRelease)) { var thisObj = this; playButton.onRelease = function () { thisObj.onPlayClick(); }; } } function playMovie() { _root.nextFrame(); _root.play(); if (typeof(onLoadComplete) == "function") { onLoadComplete.call(); } else { onLoadComplete.func.call(onLoadComplete.target); } } function onPlayClick(event) { onEnterFrame = null; playMovie(); } }
Symbol 23 MovieClip [__Packages.com.newgrounds.shims.FlashAdShim] Frame 0
class com.newgrounds.shims.FlashAdShim extends MovieClip { function FlashAdShim () { super(); } }
Symbol 27 MovieClip [__Packages.com.newgrounds.Event] Frame 0
class com.newgrounds.Event { var _type; function Event (type) { _type = type; } function get type() { return(_type); } }
Symbol 28 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 29 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]); _local1++; } } if (priority >= _throwLevel) { throw new Error(messages.join(newline)); } } static var LOG = "log"; 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 63 MovieClip [__Packages.com.newgrounds.shims.APIShim] Frame 0
class com.newgrounds.shims.APIShim extends MovieClip { function APIShim () { super(); } }
Symbol 65 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 66 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 67 MovieClip [__Packages.com.newgrounds.APIConnection] Frame 0
class com.newgrounds.APIConnection { var hostDomain, hostURL, sessionId, publisherId, apiId, trackerId, encryptionKey, userEmail, username, userId, userpageFormat, initialized; function APIConnection () { reset(); } function get isNetworkHost() { return((hostDomain != "localhost") && (hostURL.indexOf("file://") == -1)); } function get hasUserSession() { return(((sessionId != null) && (sessionId != "")) && (publisherId != 0)); } function get connected() { return(connectionState == CONNECTED); } function reset() { connectionState = NOT_CONNECTED; apiId = null; trackerId = 0; publisherId = 0; encryptionKey = null; sessionId = null; userEmail = null; username = null; userId = 0; userpageFormat = 0; hostURL = null; hostDomain = "localhost"; } 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); } 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 68 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 69 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 70 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 71 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 API_CONNECTED = "movieConnected"; 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"; }
Symbol 72 MovieClip [__Packages.com.newgrounds.APICommand] Frame 0
class com.newgrounds.APICommand extends com.newgrounds.APIEventDispatcher { var _command, _parameters, _secureParameters, _hasTimeout, _preventCache, _openBrowser, _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 get openBrowser() { return(_openBrowser); } function set openBrowser(value) { _openBrowser = value; //return(openBrowser); } 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 send(connection) { if (_throttleCount >= THROTTLE_THRESHOLD) { _commandQueue.push({connection:connection, command:this}); } else { sendInternal(connection); } } function sendInternal(connection) { var _local5; _local5 = new LoadVars(); _local5.command_id = _command; _local5.tracker_id = connection.apiId; if (connection.debug) { _local5.debug = 1; } if (_preventCache) { _local5.seed = Math.random(); } var _local3; var _local4; var _local8; for (_local3 in _parameters) { _local4 = _parameters[_local3]; if (_local4 != null) { if (typeof(_local4) == "boolean") { _local5[_local3] = int(_local4); } else { _local5[_local3] = _local4; } } } if (hasSecureParameters) { var _local7 = new Object(); for (_local3 in _secureParameters) { _local4 = _secureParameters[_local3]; if (_local4 != null) { if (typeof(_local4) == "boolean") { _local7[_local3] = int(_local4); } else { _local7[_local3] = _local4; } } } var _local9 = ""; _local8 = 0; while (_local8 < 16) { _local9 = _local9 + ENCRYPTOR_RADIX.charAt(int(Math.random() * ENCRYPTOR_RADIX.length)); _local8++; } _local5.command_id = "securePacket"; _local7.command_id = _command; _local7.as_version = 3; _local7.session_id = connection.sessionId; _local7.user_email = connection.userEmail; _local7.publisher_id = connection.publisherId; _local7.seed = _local9; var _local14 = com.newgrounds.crypto.MD5.hash(_local9); var _local12 = com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(_local7), connection.encryptionKey); _local5.secure = encryptHex(_local14 + _local12); } var _local13; _local13 = "application/x-www-form-urlencoded"; for (_local3 in _local5) { if (typeof(_local5[_local3]) == "object") { _local5[_local3] = com.newgrounds.encoders.json.JSON.encode(_local5[_local3]); } } if (_files) { for (var _local11 in _files) { var _local6 = _files[_local11]; if (typeof(_local6.data) == "string") { _local5[_local11] = _local6.data; } else { _local5[_local11] = com.newgrounds.encoders.json.JSON.encode(_local6.data); } } } if (_openBrowser) { _root.getURL(connection.apiURL, "_blank", "GET"); } else { com.newgrounds.Logger.logInternal("Sending packet:", _local5); _pendingCommands.push(this); _throttleCount++; startLoader(connection.apiURL, _local5, _local13); } } 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 73 MovieClip [__Packages.com.newgrounds.BitmapLoader] Frame 0
class com.newgrounds.BitmapLoader { var _bitmapData, _url, _loaded, _loader, _loaderClip; function BitmapLoader (defaultBitmap, url) { _bitmapData = defaultBitmap; _url = url; } function get url() { return(_url); } function set url(v) { _url = v; _loaded = false; //return(url); } function get bitmapData() { return(_bitmapData); } function set bitmapData(v) { _bitmapData = v; //return(bitmapData); } function disposeLoader() { if (_loader) { _loader.unloadClip(_loaderClip.bitmap); _loader = null; _loaderClip.removeMovieClip(); _loaderClip = null; } } function load() { if ((!_url) || (_url == "")) { return(undefined); } 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); var _local6 = new MovieClipLoader(); if (parent == _root) { _loader = _local6; _loaderClip = _local3; _loaderClip._visible = false; _loaderClip.onEnterFrame = pollLoad; var thisObj = this; _loader.addListener({onLoadError:function () { thisObj.onLoadComplete(); }}); } _local6.loadClip(_url, _local3.bitmap); } else { _local3.attachBitmap(_bitmapData, 0); } return(_local3); } function pollLoad() { if (_loaderClip._width) { onLoadComplete(); } } function onLoadComplete() { if ((_loader && (_loaderClip)) && (_loaderClip._width)) { try { _bitmapData = new flash.display.BitmapData(_loaderClip._width, _loaderClip._height, true, 0); _bitmapData.draw(_loaderClip); _loaded = true; } catch(error) { _bitmapData = null; _loaded = false; } } disposeLoader(); } }
Symbol 74 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 75 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 76 MovieClip [__Packages.com.newgrounds.ScoreBoard] Frame 0
class com.newgrounds.ScoreBoard extends com.newgrounds.APIEventDispatcher { var _connection, _name, _id, _scores, _period, _firstResult, _numResults, _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 prevPage() { firstResult = firstResult - _numResults; loadScores(); } function nextPage() { firstResult = firstResult + _numResults; loadScores(); } 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 _local2 = event.__get__data(); var _local3 = {}; _local3.bestScore = {}; _local3.bestRank = {}; _local3.score = _local2.value; _local3.scoreBoard = this; if (_local2.best_scores.D) { _local3.bestScore.daily = _local2.best_scores.D; } if (_local2.best_scores.W) { _local3.bestScore.weekly = _local2.best_scores.W; } if (_local2.best_scores.M) { _local3.bestScore.monthly = _local2.best_scores.M; } if (_local2.best_scores.Y) { _local3.bestScore.yearly = _local2.best_scores.Y; } if (_local2.best_scores.A) { _local3.bestScore.allTime = _local2.best_scores.A; } if (_local2.best_ranks.D) { _local3.bestRank.daily = _local2.best_ranks.D; } if (_local2.best_ranks.W) { _local3.bestRank.weekly = _local2.best_ranks.W; } if (_local2.best_ranks.M) { _local3.bestRank.monthly = _local2.best_ranks.M; } if (_local2.best_ranks.Y) { _local3.bestRank.yearly = _local2.best_ranks.Y; } if (_local2.best_ranks.A) { _local3.bestRank.allTime = _local2.best_ranks.A; } } else { com.newgrounds.Logger.logError("Error posting score: " + event.__get__error()); } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, event.__get__data(), 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"; }
Symbol 77 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.toString()); } return(null); } function toString() { return(_name); } static var TYPE_FLOAT = "float"; static var TYPE_INTEGER = "integer"; static var TYPE_STRING = "string"; static var TYPE_BOOLEAN = "boolean"; }
Symbol 78 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 79 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 80 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 81 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, _readOnly, _draft, _authorId, _authorName, _encodedIcon, _encodedData, _encoderQueue, _encoding, dispatchEvent, _encodingParent, _encodingProperty, _dataLoader, _dataURL, _fileSize; 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._createdOn = fileData.created; _local4._modifiedOn = 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 = !fileData.readOnly; _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() { return(0); } function get bytesTotal() { return(0); } 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 toString() { return("Save File: " + _name); } function get icon() { return(_iconLoader.__get__bitmapData()); } function set icon(v) { createIcon(v); //return(icon); } 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() { _currentFile = this; if (icon) { 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 (icon) { _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; if (_local5) { _encoderQueue.push({parent:parent, property:property}); } else if (typeof(_local3) == "object") { 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 { com.newgrounds.Logger.logMessage("Data loaded."); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this)); } 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; _dataLoader = new LoadVars(); var file = this; _dataLoader.onData = function (data) { file.onDataLoaded(data); }; _dataLoader.load(_dataURL); } 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 82 MovieClip [__Packages.com.newgrounds.SaveQuery] Frame 0
class com.newgrounds.SaveQuery extends com.newgrounds.APIEventDispatcher { var _group, _connection, dispatchEvent; function SaveQuery (group) { super(); _group = group; _connection = group.connection; includeAllFields(); } function get group() { return(_group); } function get resultsPerPage() { return(_resultsPerPage); } function set resultsPerPage(val) { _resultsPerPage = Math.min(Math.max(val, 1), 100); //return(resultsPerPage); } function get page() { return(_page); } function set page(val) { _page = Math.max(val, 1); //return(page); } function get isRandomized() { return(_isRandomized); } function set isRandomized(val) { _isRandomized = val; //return(isRandomized); } function get files() { return(_files); } function reset() { _page = 1; _resultsPerPage = 10; _isRandomized = false; _lookupKeys = []; _lookupRatings = []; _fileConditions = []; _keyConditions = []; _ratingConditions = []; _files = []; includeAllFields(); } function includeAllFields() { for (var _local5 in _group.__get__keys()) { var _local2 = _group.__get__keys()[_local5]; _lookupKeys.push(_local2.__get__id()); } for (var _local4 in _group.__get__ratings()) { var _local3 = _group.__get__ratings()[_local4]; _lookupRatings.push(_local3.__get__id()); } } function addCondition(field, operator, value) { var _local2; _local2 = 0; while (_local2 < FILE_FIELDS.length) { if (FILE_FIELDS[_local2] == field) { break; } _local2++; } if (_local2 == FILE_FIELDS.length) { _local2 = -1; } if (_local2 >= 0) { _fileConditions.push({field:_local2, operator:operator, value:value}); } else { var _local3 = _group.getKey(field); if (_local3) { value = _local3.validateValue(value); _keyConditions.push({key_id:_local3.__get__id(), operator:operator, value:value}); return(undefined); } var _local4 = field.split("."); var _local6 = _group.getRating(_local4[0]); if (_local6) { value = _local6.validateValue(value); _ratingConditions.push({rating_id:_local6.__get__id(), operator:operator, value:value, column:(_local4[1] ? (_local4[1]) : "score")}); return(undefined); } com.newgrounds.Logger.logError(((("The save group \"" + _group.__get__name()) + "\" does not have a field named \"") + field) + "\"."); } } function sortOn(field, sortDescending) { if (sortDescending == undefined) { sortDescending = false; } var _local2; _local2 = 0; while (_local2 < FILE_FIELDS.length) { if (FILE_FIELDS[_local2] == field) { break; } _local2++; } if (_local2 == FILE_FIELDS.length) { _local2 = -1; } if (_local2 >= 0) { _sortFields.push({table:TABLE_FILES, field:_local2, desc:sortDescending}); } else { var _local5 = _group.getKey(field); if (_local5) { _sortFields.push({table:TABLE_KEYS, field:_local5.__get__id(), desc:sortDescending}); return(undefined); } var _local3 = field.split("."); var _local6 = _group.getRating(_local3[0]); if (_local6) { _sortFields.push({table:TABLE_RATINGS, field:_local6.__get__id(), desc:sortDescending, extra:(_local3[1] ? (_local3[1]) : "score")}); return(undefined); } com.newgrounds.Logger.logError(((("The save group \"" + _group.__get__name()) + "\" does not have a field named \"") + field) + "\"."); } } function execute() { var _local5 = {}; _local5.page = _page; _local5.num_results = _resultsPerPage; if (_isRandomized) { _local5.randomize = 1; } if (_lookupKeys && (_lookupKeys.length)) { _local5.lookup_keys = _lookupKeys; } if (_lookupRatings && (_lookupRatings.length)) { _local5.lookup_ratings = _lookupRatings; } if (_fileConditions && (_fileConditions.length)) { _local5.file_conditions = _fileConditions; } if (_keyConditions && (_keyConditions.length)) { _local5.key_conditions = _keyConditions; } if (_ratingConditions && (_ratingConditions.length)) { _local5.rating_conditions = _ratingConditions; } if (_sortFields && (_sortFields.length)) { _local5.sort_conditions = _sortFields; } _connection.sendSimpleCommand("lookupSaveFiles", {target:this, func:onQueryComplete}, {publisher_id:_connection.publisherId, group_id:_group.__get__id(), query:_local5}); } function onQueryComplete(event) { if (event.__get__success()) { var _local4 = event.__get__data(); _files = []; if (_local4.files) { var _local2 = 0; while (_local2 < _local4.files.length) { var _local3 = com.newgrounds.SaveFile.fromObject(_group, _local4.files[_local2]); if (_local3) { _files.push(_local3); } _local2++; } } dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this)); } else { com.newgrounds.Logger.logError("Query failed: " + event.__get__error()); dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this, event.__get__error())); } } static var FILE_ID = "fileId"; static var AUTHOR_ID = "authorId"; static var AUTHOR_NAME = "authorName"; static var FILE_NAME = "fileName"; static var CREATED_ON = "createdOn"; static var UPDATED_ON = "updatedOn"; static var FILE_VIEWS = "fileViews"; static var FILE_STATUS = "fileStatus"; static var FILE_FIELDS = [FILE_ID, AUTHOR_ID, AUTHOR_NAME, FILE_NAME, CREATED_ON, UPDATED_ON, FILE_VIEWS, FILE_STATUS]; static var OPERATOR_EQUAL = "="; static var OPERATOR_LESS_THAN = "<"; static var OPERATOR_GREATER_THAN = ">"; static var OPERATOR_NOT_EQUAL = "!="; static var OPERATOR_LESS_OR_EQUAL = "<="; static var OPERATOR_GREATER_OR_EQUAL = ">="; static var OPERATOR_CONTAINS = "*"; static var OPERATOR_NOT_CONTAINS = "!*"; static var OPERATOR_NOT_BEGINS_WITH = "!*="; static var OPERATOR_NOT_ENDS_WITH = "!=*"; static var OPERATOR_BEGINS_WITH = "*="; static var OPERATOR_ENDS_WITH = "=*"; static var TABLE_FILES = 1; static var TABLE_KEYS = 2; static var TABLE_RATINGS = 3; var _page = 1; var _resultsPerPage = 10; var _isRandomized = false; var _files = []; var _lookupKeys = []; var _lookupRatings = []; var _fileConditions = []; var _keyConditions = []; var _ratingConditions = []; var _sortFields = []; }
Symbol 83 MovieClip [__Packages.com.newgrounds.API] Frame 0
class com.newgrounds.API { static var _movieVersion, _movieName, _saveFilePath, _imageFilePath, _root; function API () { } static function get connected() { return(_connection.__get__connected()); } static function get isNetworkHost() { _connection.assertInitialized(); return(_connection.__get__isNetworkHost()); } static function get hasUserSession() { _connection.assertInitialized(); return(_connection.__get__hasUserSession()); } static function get apiId() { _connection.assertInitialized(); return(_connection.apiId); } static function get debugMode() { return(_debugMode); } static function set debugMode(val) { _debugMode = val; //return(debugMode); } static function get publisherId() { _connection.assertInitialized(); return(_connection.publisherId); } static function get sessionId() { _connection.assertInitialized(); return(_connection.sessionId); } static function get hostDomain() { _connection.assertInitialized(); return(_connection.hostDomain); } static function get hostURL() { _connection.assertInitialized(); return(_connection.hostURL); } static function get username() { _connection.assertInitialized(); return(_connection.username); } static function get userId() { _connection.assertInitialized(); return(_connection.userId); } static function assertConnected(eventType) { if (eventType == undefined) { eventType = null; } if (_connection.assertConnected()) { return(true); } if (eventType) { dispatchEvent(eventType, null, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED); } return(false); } static function get medals() { return(_medalsArray); } static function get scoreBoards() { return(_scoreBoardsArray); } static function get saveGroups() { return(_saveGroupsArray); } static function get officialURL() { if (_connection && (_connection.apiId)) { return((((_connection.apiURL + "?tracker_id=") + _connection.apiId) + "&command_id=loadOfficalVersion&seed=") + Math.random()); } return("http://www.newgrounds.com"); } static function get isNewgrounds() { return(_connection.publisherId == 1); } static function connect(_root, apiId, encryptionKey, movieVersion) { if (encryptionKey == undefined) { encryptionKey = null; } if (movieVersion == undefined) { movieVersion = ""; } if (_connection.initialized) { com.newgrounds.Logger.logError("Connection already in progress. Please call API.disconnect() before attempting another connection."); dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED); return(undefined); } if ((!apiId) || (apiId == "")) { com.newgrounds.Logger.logError("No apiId given. Please use the API ID from your API settings page."); dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return(undefined); } com.newgrounds.Logger.logMessage(("====== Newgrounds API v" + VERSION) + " ======"); com.newgrounds.APIEventDispatcher.__set__globalDispatcher(_dispatcher); _root=_root;//parameter overwritten _movieVersion = movieVersion; _connection.apiId = apiId; if (apiId.indexOf(":") != -1) { _connection.trackerId = int(apiId.substring(0, apiId.indexOf(":"))); } _connection.encryptionKey = encryptionKey; _connection.initialized = true; _connection.hostURL = _root._url; doConnect(_root); } static function doConnect(flashVars) { if (isNetworkHost && (_debugMode != RELEASE_MODE)) { com.newgrounds.Logger.logMessage("Live file detected, turning off debug mode."); _debugMode = RELEASE_MODE; } _connection.connectionState = com.newgrounds.APIConnection.CONNECTING; if (_debugMode == RELEASE_MODE) { if (flashVars) { if (flashVars.NewgroundsAPI_UserName) { _connection.username = flashVars.NewgroundsAPI_UserName; } if (flashVars.NewgroundsAPI_UserID) { _connection.userId = flashVars.NewgroundsAPI_UserID; } if (flashVars.NewgroundsAPI_PublisherID) { _connection.publisherId = flashVars.NewgroundsAPI_PublisherID; } if (flashVars.NewgroundsAPI_UserpageFormat) { _connection.userpageFormat = flashVars.NewgroundsAPI_UserpageFormat; } if (flashVars.NewgroundsAPI_SessionID) { _connection.sessionId = flashVars.NewgroundsAPI_SessionID; } } } else { _connection.debug = true; if ((_debugMode == DEBUG_MODE_LOGGED_IN) || (_debugMode == DEBUG_MODE_LOGGED_OUT)) { _connection.publisherId = 1; } if (_debugMode == DEBUG_MODE_LOGGED_IN) { _connection.sessionId = "D3bu64p1U53R"; _connection.userId = 10; _connection.username = "API-Debugger"; } } _connection.sendSimpleCommand("connectMovie", onConnect, {host:_connection.hostDomain, movie_version:_movieVersion}); } static function onConnect(event) { var _local1 = event.__get__data(); if (!event.__get__success()) { com.newgrounds.Logger.logError("Unable to connect to the API."); _connection.reset(); dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, event.__get__data(), event.__get__error()); return(undefined); } if (_local1.ad_url) { } else if (_local1.ad_status === -1) { } else if (_local1.ad_status === 0) { } if ((_debugMode == DEBUG_MODE_HOST_BLOCKED) || (_local1.deny_host)) { com.newgrounds.Logger.logMessage(_connection.hostDomain + " does not have permission to host this movie!", "Update your API configuration to allow this host."); dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {officialURL:unescape(_local1.movie_url)}, com.newgrounds.APIEvent.ERROR_HOST_BLOCKED); if (redirectOnHostBlocked) { loadOfficialVersion(); } _connection.reset(); return(undefined); } _movieName = (_local1.movieName ? (_local1.movieName) : ""); com.newgrounds.Logger.logMessage("Connecting to the Newgrounds API Gateway...", ("----- " + _local1.movie_name) + " -----"); if ((_debugMode == DEBUG_MODE_NEW_VERSION) || (_local1.movie_version)) { com.newgrounds.Logger.logMessage("A new version of this movie is available.", "Current version:\t" + _movieVersion, "Newest version:\t" + _local1.movie_version, "Newest URL:\t" + officialURL); } if (_local1.request_portal_url) { _connection.sendSimpleCommand("setPortalID", null, {portal_url:_connection.hostURL}); } _connection.sendSimpleCommand("preloadSettings", onMetadataLoaded, {publisher_id:_connection.publisherId, user_id:_connection.userId}); } static function onMetadataLoaded(event) { var _local11 = event.__get__data(); var _local1; var _local7; if (!event.__get__success()) { com.newgrounds.Logger.logWarning("Unable to load movie metadata."); disconnect(); dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, null, event.__get__error()); return(undefined); } var _local10 = 0; if (_local11.medals) { _local10 = _local11.medals.length; var _local17; if (hasUserSession) { _local17 = loadLocal("medals_unlocked_" + username); } else { _local17 = loadLocal("medals_unlocked"); } _local1 = 0; while (_local1 < _local10) { var _local6 = _local11.medals[_local1]; var _local14 = _local6.medal_unlocked; var _local16 = _local17 && (_local17[_local6.medal_id]); var _local4 = new com.newgrounds.Medal(_connection, _local6.medal_id, _local6.medal_name, (hasUserSession ? (_local14) : (_local16)), _local6.medal_value, _local6.medal_difficulty, _local6.medal_icon); _local4.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, onMedalUnlocked, false, 0, true); _local4.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, onMedalUnlockConfirmed, false, 0, true); _medals[_local4.__get__name()] = _local4; _medalsArray.push(_local4); com.newgrounds.Logger.logMessage(_local4); if ((hasUserSession && (_local16)) && (!_local14)) { com.newgrounds.Logger.logMessage(("Server missed the \"" + _local4.__get__name()) + "\" unlock. Resending..."); _local4.unlock(); } _local1++; } } com.newgrounds.Logger.logMessage(((_local10 + " medal") + ((_local10 != 1) ? "s" : "")) + " initialized."); _local10 = 0; if (_local11.score_boards) { _local10 = _local11.score_boards.length; _local1 = 0; while (_local1 < _local10) { var _local15 = _local11.score_boards[_local1]; var _local9 = new com.newgrounds.ScoreBoard(_connection, _local15.name, _local15.id); _scoreBoards[_local9.__get__name()] = _local9; _scoreBoardsArray.push(_local9); com.newgrounds.Logger.logMessage(_local9); _local1++; } } com.newgrounds.Logger.logMessage(((_local10 + " scoreboard") + ((_local10 != 1) ? "s" : "")) + " initialized."); _local10 = 0; if (_local11.save_groups) { _local10 = _local11.save_groups.length; _local1 = 0; while (_local1 < _local10) { var _local2 = _local11.save_groups[_local1]; var _local13 = []; if (_local2.keys) { _local7 = 0; while (_local7 < _local2.keys.length) { var _local5 = _local2.keys[_local7]; _local13.push(new com.newgrounds.SaveKey(_local5.name, _local5.id, _local5.type)); _local7++; } } var _local12 = []; if (_local2.ratings) { _local1 = 0; while (_local1 < _local2.ratings.length) { var _local3 = _local2.ratings[_local1]; _local12.push(new com.newgrounds.SaveRating(_local3.name, _local3.id, _local3.float, _local3.min, _local3.max)); _local1++; } } var _local8 = new com.newgrounds.SaveGroup(_connection, _local2.group_name, _local2.group_id, _local2.group_type, _local13, _local12); _saveGroups[_local8.__get__name()] = _local8; _saveGroupsArray.push(_local8); com.newgrounds.Logger.logMessage(_local8); _local1++; } } com.newgrounds.Logger.logMessage(((_local10 + " save group") + ((_local10 != 1) ? "s" : "")) + " initialized."); if (_local11.save_file_path) { _saveFilePath = _local11.save_file_path + "/"; com.newgrounds.SaveFile._saveFilePath = _saveFilePath; com.newgrounds.Logger.logInternal("Save file path: " + _saveFilePath); } if (_local11.image_file_path) { _imageFilePath = _local11.image_file_path + "/"; com.newgrounds.SaveFile._imageFilePath = _imageFilePath; com.newgrounds.Logger.logInternal("Image file path: " + _imageFilePath); } com.newgrounds.Logger.logMessage("Connection complete!"); _connection.connectionState = com.newgrounds.APIConnection.CONNECTED; dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {movieName:_movieName}); } static function disconnect() { if (!_connection.__get__connected()) { com.newgrounds.Logger.logWarning("The Newgrounds API is already disconnected."); return(undefined); } _connection.reset(); for (var _local2 in _medals) { var _local1 = _medals[_local2]; _local1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, onMedalUnlocked); _local1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, onMedalUnlockConfirmed); } _medals = new Object(); _medalsArray = []; _scoreBoards = new Object(); _scoreBoardsArray = []; _saveGroups = new Object(); _saveGroupsArray = []; _sharedObjects = new Object(); _imageFilePath = null; _saveFilePath = null; com.newgrounds.Logger.logMessage("Disconnected from the Newgrounds API."); } static function loadNewgrounds() { if (connected) { var _local1 = new com.newgrounds.APICommand("loadNewgrounds"); _local1.__set__openBrowser(true); _local1.__get__parameters().host = _connection.hostDomain; _local1.send(_connection); } else { getURL ("http://www.newgrounds.com", "_blank"); } } static function loadOfficialVersion() { _root.getURL(officialURL); } static function loadMySite() { if (!assertConnected()) { return(undefined); } var _local1 = new com.newgrounds.APICommand("loadMySite"); _local1.__set__openBrowser(true); _local1.__get__parameters().host = _connection.hostDomain; _local1.send(_connection); } static function loadCustomLink(url) { if (!assertConnected()) { return(undefined); } var _local1 = new com.newgrounds.APICommand("loadCustomLink"); _local1.__set__openBrowser(true); _local1.__get__parameters().link = url; _local1.__get__parameters().host = _connection.hostDomain; _local1.send(_connection); } static function getMedal(medalName) { return(_medals[medalName]); } static function unlockMedal(medalName) { if (!assertConnected()) { return(undefined); } var _local1 = _medals[medalName]; if (!_local1) { com.newgrounds.Logger.logError(("No medal named \"" + medalName) + "\" w."); return(undefined); } _local1.unlock(); } static function onMedalUnlocked(event) { if (event.__get__success()) { var _local2 = com.newgrounds.Medal(event.__get__data()); var _local1; if (hasUserSession) { _local1 = loadLocal("medals_unlocked_" + username); if (!_local1) { _local1 = new Object(); } _local1[_local2.__get__id()] = true; saveLocal("medals_unlocked_" + username, _local1); } else { _local1 = loadLocal("medals_unlocked"); if (!_local1) { _local1 = new Object(); } _local1[com.newgrounds.Medal(event.__get__data()).__get__id()] = true; saveLocal("medals_unlocked", _local1); com.newgrounds.Logger.logMessage(("User instanceof not logged in. Medal \"" + _local2.__get__name()) + "\" unlocked locally."); } } } static function onMedalUnlockConfirmed(event) { if (hasUserSession) { var _local1 = loadLocal("medals_unlocked_" + username); if (!_local1) { _local1 = new Object(); } else { delete _local1[com.newgrounds.Medal(event.__get__data()).__get__id()]; } saveLocal("medals_unlocked_" + username, _local1); } } static function loadScores(scoreBoardName, period, firstResult, numResults, tag) { if (period == undefined) { period = "All-Time"; } if (firstResult == undefined) { firstResult = 1; } if (numResults == undefined) { numResults = 10; } if (tag == undefined) { tag = null; } if (!assertConnected()) { return(null); } var _local1 = _scoreBoards[scoreBoardName]; if (!_local1) { com.newgrounds.Logger.logError(("No scoreboard named \"" + scoreBoardName) + "\" w."); dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return(null); } _local1.__set__period(period); _local1.__set__firstResult(firstResult); _local1.__set__numResults(numResults); _local1.__set__tag(tag); _local1.loadScores(); return(_local1); } static function postScore(scoreBoardName, numericScore, tag) { if (tag == undefined) { tag = null; } if (!assertConnected()) { return(undefined); } var _local1 = _scoreBoards[scoreBoardName]; if (!_local1) { com.newgrounds.Logger.logError(("No scoreboard named \"" + scoreBoardName) + "\" w."); dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT); return(undefined); } _local1.postScore(numericScore, tag); } static function getSaveGroup(groupName) { if (!assertConnected()) { return(null); } return(_saveGroups[groupName]); } static function getSaveGroupById(id) { for (var _local3 in _saveGroups) { var _local1 = _saveGroups[_local3]; if (_local1.__get__id() == id) { return(_local1); } } return(null); } static function createSaveFile(groupName) { if (!assertConnected()) { return(null); } var _local1 = getSaveGroup(groupName); if (!_local1) { com.newgrounds.Logger.logError(("The save group \"" + groupName) + "\" w found."); return(null); } return(new com.newgrounds.SaveFile(_local1)); } static function loadSaveFile(saveId, loadContents) { if (loadContents == undefined) { loadContents = true; } _connection.sendSimpleCommand("loadSaveFile", onFileLoaded, {save_id:saveId, get_contents:loadContents}); } static function onFileLoaded(event) { if (event.__get__success()) { var _local2 = com.newgrounds.SaveFile.fromObject(getSaveGroupById(event.__get__data().group_id), event.__get__data().file); if (event.__get__data().get_contents) { _local2.load(); } else { dispatchEvent(com.newgrounds.APIEvent.FILE_LOADED, _local2); } } else { com.newgrounds.Logger.logError("Unable to load file:", event.__get__error()); } } static function createSaveQuery(groupName) { if (!assertConnected()) { return(null); } var _local1 = getSaveGroup(groupName); if (!_local1) { com.newgrounds.Logger.logError(("The save group \"" + groupName) + "\" w found."); return(null); } var _local2 = new com.newgrounds.SaveQuery(_local1); return(_local2); } static function createSaveQueryByDate(groupName, sortDescending) { if (sortDescending == undefined) { sortDescending = true; } var _local1 = createSaveQuery(groupName); if (!_local1) { return(null); } _local1.sortOn(com.newgrounds.SaveQuery.CREATED_ON, sortDescending); return(_local1); } static function createSaveQueryByName(groupName, filename, exactMatch, sortDescending) { if (exactMatch == undefined) { exactMatch = false; } if (sortDescending == undefined) { sortDescending = true; } var _local1 = createSaveQuery(groupName); _local1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, (exactMatch ? (com.newgrounds.SaveQuery.OPERATOR_EQUAL) : (com.newgrounds.SaveQuery.OPERATOR_CONTAINS)), filename); return(_local1); } static function createSaveQueryByRating(groupName, ratingName, sortDescending) { if (sortDescending == undefined) { sortDescending = true; } var _local1 = createSaveQuery(groupName); _local1.sortOn(ratingName, sortDescending); return(_local1); } static function addEventListener(eventType, listener, useCapture, priority, useWeakReference) { if (useCapture == undefined) { useCapture = false; } if (priority == undefined) { priority = 0; } if (useWeakReference == undefined) { useWeakReference = true; } _dispatcher.addEventListener(eventType, listener, useCapture, priority, useWeakReference); } static function removeEventListener(eventType, listener, useCapture) { if (useCapture == undefined) { useCapture = false; } _dispatcher.removeEventListener(eventType, listener); } static function dispatchEvent(event, data, error) { if (data == undefined) { data = null; } if (error == undefined) { error = null; } _dispatcher.dispatchEvent(new com.newgrounds.APIEvent(event, data, error)); } static function saveLocal(saveId, saveData) { try { var _local3; var _local2 = (("ng_ap_secure_" + _connection.trackerId) + "_") + com.newgrounds.crypto.RC4.encrypt(saveId, _connection.encryptionKey); if (!_sharedObjects[saveId]) { _sharedObjects[saveId] = SharedObject.getLocal(_local2); } _local3 = _sharedObjects[saveId]; _local3.data.data = encodeData(saveData); } catch(_local) { if (Error( /* Error999 */ ) != null) { var error = Error( /* Error999 */ ); com.newgrounds.Logger.logError("Unable to save local data.", error); return(false); } Error( /* Error999 */ ); throw /* Error999 */ ; } return(true); } static function loadLocal(saveId) { try { var _local1; var _local3 = (("ng_ap_secure_" + _connection.trackerId) + "_") + com.newgrounds.crypto.RC4.encrypt(saveId, _connection.encryptionKey); if (!_sharedObjects[saveId]) { _sharedObjects[saveId] = SharedObject.getLocal(_local3); } _local1 = _sharedObjects[saveId]; if ((_local1 && (_local1.data)) && (_local1.data.data)) { return(decodeData(_local1.data.data)); } return(null); } catch(error:Error) { com.newgrounds.Logger.logError("Unable to load local data.", error); } return(null); } static function encodeData(data) { if (!_connection.assertInitialized()) { return(null); } return(com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(data), _connection.encryptionKey)); } static function decodeData(data) { if (!_connection.assertInitialized()) { return(null); } try { return(com.newgrounds.encoders.json.JSON.decode(com.newgrounds.crypto.RC4.decrypt(data, _connection.encryptionKey))); } catch(error:Error) { } return(null); } static function stopPendingCommands() { com.newgrounds.APICommand.stopPendingCommands(); com.newgrounds.Logger.logMessage("Pending commands stopped."); } static var VERSION = "3.0 beta 2 AS2"; static var RELEASE_MODE = "releaseMode"; static var DEBUG_MODE_LOGGED_IN = "debugModeLoggedIn"; static var DEBUG_MODE_LOGGED_OUT = "debugModeLoggedOut"; static var DEBUG_MODE_NEW_VERSION = "debugModeNewVersion"; static var DEBUG_MODE_HOST_BLOCKED = "debugModeHostBlocked"; static var _dispatcher = new com.newgrounds.APIEventDispatcher(); static var _connection = new com.newgrounds.APIConnection(); static var _debugMode = DEBUG_MODE_LOGGED_IN; static var redirectOnHostBlocked = true; static var _medals = new Object(); static var _medalsArray = []; static var _scoreBoards = new Object(); static var _scoreBoardsArray = []; static var _saveGroups = new Object(); static var _saveGroupsArray = []; static var _sharedObjects = new Object(); }
Symbol 84 MovieClip [__Packages.com.newgrounds.components.APIComponent] Frame 0
class com.newgrounds.components.APIComponent extends MovieClip { var stop, _x, _y, _properties, _listItems, _listDown, _initialized; function APIComponent () { super(); (stop());// not popped _x = int(_x); _y = int(_y); _properties = {}; } function stageInstanceInit() { } function setVariable(propertyPath, value) { var _local4 = false; var _local6; var _local7 = propertyPath; try { var _local3 = _local7.split("."); _local6 = this; var _local2 = 0; while (_local2 < (_local3.length - 1)) { _local6 = _local6[_local3[_local2]]; _local2++; } _local7 = _local3[_local2]; _local4 = setObjectProperty(_local6, _local7, value); } catch(error) { } _properties[propertyPath] = {object:_local6, property:_local7, propertyPath:propertyPath, value:value, active:false}; return(_local4); } function setObjectProperty(object, property, value) { try { if (object) { var thisObj = this; if (property == "onClick") { if (value) { object.onRelease = function () { value.call(thisObj, object); thisObj.updateProperties(); }; object.enabled = true; } else { object.onRelease = null; object.enabled = false; } if (object instanceof MovieClip) { object.gotoAndStop("_up"); } } else if (property == "onRollOver") { object.onRollOver = (value ? (function () { value.call(thisObj, object)}) : null); } else if (property == "onRollOut") { object.onRollOut = (value ? (function () { value.call(thisObj, object)}) : null); } else if (property == "font") { var _local3 = _textFormats[value]; if (!_local3) { return(true); } object.setNewTextFormat(_local3); object.setTextFormat(_local3); object.embedFonts = true; } else if (property == "frame") { object.gotoAndStop(value); } else if (property == "brightness") { object.transform.colorTransform = new flash.geom.ColorTransform(value * 100, value * 100, value * 100, 1, 0, 0, 0, 0); } else if (property == "attachIcon") { value.attachIcon(object); } else { if (property == "mouseEnabled") { property = "enabled"; } else if (((((property == "width") || (property == "height")) || (property == "visible")) || (property == "x")) || (property == "y")) { property = "_" + property; } object[property] = value; } return(true); } } catch(error) { } return(false); } function initListBox(items, selectedItem) { if (selectedItem == undefined) { selectedItem = 0; } setVariable("listBox.frame", "sortUP"); setVariable("listBox.currentItem.onClick", onListClick); setVariable("listBox.listButton.onClick", onListClick); var _local2 = 0; while (_local2 < _numListItems) { if (_local2 < items.length) { if (typeof(items[_local2]) != "object") { items[_local2] = {label:items[_local2], data:items[_local2]}; } } _local2++; } if (selectedItem >= items.length) { selectedItem = 0; } setVariable("listBox.currentItem.label.text", items[selectedItem].label); _listItems = items; } function onListClick(clip) { if (_listDown) { setVariable("listBox.frame", "sortUP"); } else { setVariable("listBox.frame", "sortDOWN"); var _local2 = 0; while (_local2 < _numListItems) { if (_local2 < _listItems.length) { setVariable(("listBox.item" + _local2) + ".visible", true); setVariable(("listBox.item" + _local2) + ".onClick", onListItemClick); setVariable(("listBox.item" + _local2) + ".label.text", _listItems[_local2].label); setVariable(("listBox.item" + _local2) + ".data", _listItems[_local2].data); } else { setVariable(("listBox.item" + _local2) + ".visible", false); } _local2++; } } _listDown = !_listDown; } function onListItemClick(target) { if (!target) { return(undefined); } var _local3 = target.data; if (target.label.text) { setVariable("listBox.currentItem.label.text", target.label.text); } setVariable("listBox.frame", "sortUP"); _listDown = false; onListItemChange(_local3); } function onListItemChange(data) { } function countInstances(propertyPath) { var _local6 = propertyPath; var _local3; try { var _local4 = _local6.split("."); _local3 = this; var _local2 = 0; while (_local2 < (_local4.length - 1)) { _local3 = _local3[_local4[_local2]]; _local2++; } var _local5 = _local4[_local2]; _local2 = 0; while (_local3[_local5 + _local2]) { _local2++; } return(_local2); } catch(error) { } return(0); } function onEnterFrame(event) { if (!_initialized) { _initialized = true; stageInstanceInit(); } updateProperties(); } function updateProperties() { for (var _local3 in _properties) { var _local2 = _properties[_local3]; if (!_local2.active) { _local2.active = true; } else if (setVariable(_local2.propertyPath, _local2.value)) { delete _properties[_local2.propertyPath]; } } } function onUnload(event) { } static var FONT_HEADER = 0; static var _textFormats = [new TextFormat("Pakenham")]; var _numListItems = 6; }
Symbol 85 MovieClip [__Packages.com.newgrounds.components.MedalPopup] Frame 0
class com.newgrounds.components.MedalPopup extends com.newgrounds.components.APIComponent { var gotoAndStop, _x, _y, _unlockedMedal, _iconAttached, gotoAndPlay, setVariable, medalNameText, medalIcon, _totalframes, _currentframe; function MedalPopup () { super(); (gotoAndStop("hidden"));// not popped _x = int(_x); _y = int(_y); com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, {target:this, func:onMedalUnlocked}); } function onMedalUnlocked(event) { if (event.__get__success()) { var _local2 = com.newgrounds.Medal(event.__get__data()); if (_local2) { _medalQueue.push(_local2); showNextUnlock(); } } } function showNextUnlock() { if (_unlockedMedal) { return(undefined); } if (_medalQueue.length == 0) { (gotoAndStop("hidden"));// not popped return(undefined); } _iconAttached = false; _unlockedMedal = com.newgrounds.Medal(_medalQueue.shift()); (gotoAndPlay("medalUnlocked"));// not popped setVariable("medalNameText.font", com.newgrounds.components.APIComponent.FONT_HEADER); setVariable("medalNameText.text", _unlockedMedal.__get__name().toString()); setVariable("medalPointsText.text", _unlockedMedal.__get__value().toString()); } function onEnterFrame(event) { super.onEnterFrame(event); if (_unlockedMedal) { if (medalNameText) { var _local3; _local3 = medalNameText._width; while (medalNameText.textWidth > _local3) { medalNameText.text = medalNameText.text.substr(0, medalNameText.text.length - 4) + "..."; } } if ((!_iconAttached) && (medalIcon)) { _iconAttached = true; _unlockedMedal.attachIcon(medalIcon); } } if (_currentframe == _totalframes) { _unlockedMedal = null; showNextUnlock(); } } var _medalQueue = []; }
Symbol 86 MovieClip [__Packages.com.newgrounds.components.ScoreBrowser] Frame 0
class com.newgrounds.components.ScoreBrowser extends com.newgrounds.components.APIComponent { var gotoAndStop, setVariable, _title, initListBox, _scoreBoard, _loading, prevButton; function ScoreBrowser () { super(); (gotoAndStop("loading"));// not popped setVariable("titleText.font", com.newgrounds.components.APIComponent.FONT_HEADER); setVariable("pageText.text", "Page " + _page); setVariable("orderButton.frame", "sortDESC"); setVariable("prevButton.onClick", onPageClick); setVariable("nextButton.onClick", onPageClick); updatePeriods(); var _local3 = 0; while (_local3 < _numScores) { setVariable(("scores.score" + _local3) + ".rankText.text", ""); setVariable(("scores.score" + _local3) + ".usernameText.text", ""); setVariable(("scores.score" + _local3) + ".scoreText.text", ""); setVariable(("scores.score" + _local3) + ".onClick", null); _local3++; } } function get title() { return(_title); } function set title(value) { _title = (value ? (value) : ""); setVariable("titleText.text", value); //return(title); } function updatePeriods() { var _local3 = ["Today", "This Week", "This Month", "This Year", "All-Time"]; var _local2 = 0; while (_local2 < _local3.length) { if (_local3[_local2] == _period) { break; } _local2++; } initListBox(_local3, _local2); } function get scoreBoard() { return(_scoreBoard); } function set scoreBoard(value) { _scoreBoard = value; //return(scoreBoard); } function get period() { return(_period); } function set period(v) { _period = v; updatePeriods(); //return(period); } function loadScores() { if (!_scoreBoard) { var _local3 = com.newgrounds.API.__get__scoreBoards()[0]; if (!_local3) { com.newgrounds.Logger.logWarning("You must enter a scoreboard name into the properties of the Score Browser component.", "You can create scoreboards on your API Settings page at http://www.newgrounds.com/account/flashapi"); (gotoAndStop("idle"));// not popped return(undefined); } _scoreBoard = _local3.name; com.newgrounds.Logger.logWarning(("No scoreboard name w in the Score Browser component. Defaulting to " + _scoreBoard) + "."); } _loading = true; (gotoAndStop("loading"));// not popped var _local3 = com.newgrounds.API.loadScores(_scoreBoard, _period, ((_page - 1) * 10) + 1, 10); _local3.addEventListener(com.newgrounds.APIEvent.SCORES_LOADED, {target:this, func:onScoresLoaded}); setVariable("titleText.font", com.newgrounds.components.APIComponent.FONT_HEADER); setVariable("titleText.text", _title); setVariable("pageText.text", "Page " + _page); setVariable("orderButton.frame", "sortDESC"); setVariable("prevButton.onClick", onPageClick); setVariable("nextButton.onClick", onPageClick); updatePeriods(); var _local2 = 0; while (_local2 < _numScores) { setVariable(("scores.score" + _local2) + ".rankText.text", ""); setVariable(("scores.score" + _local2) + ".usernameText.text", ""); setVariable(("scores.score" + _local2) + ".scoreText.text", ""); setVariable(("scores.score" + _local2) + ".onClick", null); _local2++; } } function onPageClick(target) { if (_loading) { return(undefined); } _page = _page + ((target == prevButton) ? -1 : 1); if (_page < 1) { _page = 1; } setVariable("pageText.text", "Page " + _page); loadScores(); } function stageInstanceInit() { loadScores(); updatePeriods(); } function onScoresLoaded(event) { _loading = false; var _local4 = event.__get__data(); if (_local4) { _local4.removeEventListener(com.newgrounds.APIEvent.SCORES_LOADED, onScoresLoaded); } if (event.__get__success()) { (gotoAndStop("scores"));// not popped var _local2 = 0; while (_local2 < _numScores) { var _local3 = _local4.__get__scores()[_local2]; if (_local3) { setVariable(("scores.score" + _local2) + ".rankText.text", _local3.__get__rank()); setVariable(("scores.score" + _local2) + ".usernameText.text", _local3.__get__username()); setVariable(("scores.score" + _local2) + ".scoreText.text", _local3.__get__score()); setVariable(("scores.score" + _local2) + ".onClick", onScoreClick); } else { setVariable(("scores.score" + _local2) + ".rankText.text", ""); setVariable(("scores.score" + _local2) + ".usernameText.text", ""); setVariable(("scores.score" + _local2) + ".scoreText.text", ""); setVariable(("scores.score" + _local2) + ".onClick", null); } _local2++; } } else { (gotoAndStop("error"));// not popped setVariable("reloadButton.onClick", onReloadClick); } } function onReloadClick(target) { loadScores(); } function onScoreClick(clip) { if (((!clip) || (!clip.usernameText)) || (!clip.usernameText.text)) { return(undefined); } var _local3 = ("http://" + clip.usernameText.text) + ".newgrounds.com"; _root.getURL(_local3, "_blank"); } function onListItemChange(data) { period = (data); loadScores(); } var _numScores = 10; var _page = 1; var _period = com.newgrounds.ScoreBoard.ALL_TIME; }
Symbol 87 MovieClip [__Packages.com.newgrounds.components.SaveBrowser] Frame 0
class com.newgrounds.components.SaveBrowser extends com.newgrounds.components.APIComponent { var stop, gotoAndStop, _title, setVariable, _listData, _saveGroup, _displayFields, initListBox, _loading, _query, prevButton, __get__customSortField, iconList, setObjectProperty, infoBox; function SaveBrowser () { super(); (stop());// not popped (gotoAndStop("idle"));// not popped } function get title() { return(_title); } function set title(value) { _title = (value ? (value) : ""); setVariable("titleText.text", value); //return(title); } function doInit() { setVariable("pageText.text", ""); setVariable("titleText.font", com.newgrounds.components.APIComponent.FONT_HEADER); setVariable("titleText.text", _title); setVariable("nextButton.onClick", onPageClick); setVariable("prevButton.onClick", onPageClick); setVariable("orderButton.frame", (_sortDescending ? "sortDESC" : "sortASC")); setVariable("orderButton.onClick", onOrderClick); setVariable("infoBox.mouseEnabled", false); setVariable("infoBox.visible", false); setVariable("infoBox.infoText.text", ""); setVariable("infoBox.filenameText.text", ""); var _local2 = 0; while (_local2 < _numIcons) { setVariable(("iconList.icon" + _local2) + ".onRollOver", onFileRollOver); setVariable(("iconList.icon" + _local2) + ".onRollOut", onFileRollOut); _local2++; } populateSortList(); } function stageInstanceInit() { doInit(); loadFiles(); } function updateOrderText() { var _local3 = ""; if (_sortField) { _local3 = _local3 + "Sorted "; var _local2 = 0; while (_local2 < _listData.length) { if (_listData[_local2].data == _sortField) { break; } _local2++; } if (_local2 < _listData.length) { _local3 = _local3 + (("by " + _listData[_local2].label) + ", "); } _local3 = _local3 + (_sortDescending ? "Descending" : "Ascending"); } setVariable("orderText.text", _local3); } function onListItemChange(data) { sortField = (data.toString()); doLoad(); } function populateSortList() { _listData = [{label:"Name", data:"fileName"}, {label:"Date", data:"createdOn"}]; var _local4 = com.newgrounds.API.getSaveGroup(_saveGroup); var _local3; if (_local4) { if ((!_displayFields) || (_displayFields.length)) { var _local2 = 0; while (_local2 < _local4.__get__ratings().length) { _local3 = _local4.__get__ratings()[_local2].name; _listData.push({label:_local3, data:_local3}); _local2++; } _local2 = 0; while (_local2 < _local4.__get__keys().length) { _local3 = _local4.__get__keys()[_local2].name; _listData.push({label:_local3, data:_local3}); _local2++; } } else { var _local2 = 0; while (_local2 < _displayFields.length) { _listData.push(_displayFields[_local2]); _local2++; } } } var _local2 = 0; while (_local2 < _listData.length) { if (_listData[_local2].data == _sortField) { break; } _local2++; } initListBox(_listData, _local2); updateOrderText(); } function onPageClick(target) { if (_loading || (!_query)) { return(undefined); } if (target == prevButton) { _query.__set__page((_query.__get__page()-1)); } else { _query.__set__page((_query.__get__page()+1)); } doLoad(); } function get sortDescending() { return(_sortDescending); } function set sortDescending(value) { _sortDescending = value; setVariable("orderButton.frame", (_sortDescending ? "sortDESC" : "sortASC")); updateOrderText(); //return(sortDescending); } function get saveGroup() { return(_query.__get__group().__get__name()); } function set saveGroup(value) { _saveGroup = value; populateSortList(); //return(saveGroup); } function get sortField() { return(_sortField); } function set sortField(v) { _sortField = v; updateOrderText(); //return(sortField); } function set customSortField(v) { if (v && (v != "")) { _sortField = v; } //return(__get__customSortField()); } function get displayFields() { return(_displayFields); } function set displayFields(v) { _displayFields = v; //return(displayFields); } function loadFiles(query) { if (query == undefined) { query = null; } if (!_saveGroup) { var _local3 = com.newgrounds.API.__get__saveGroups()[0]; if (!_local3) { com.newgrounds.Logger.logWarning("You must create a save group in order to use the Save Browser component.", "You can create save groups on your API Settings page at http://www.newgrounds.com/account/flashapi"); (gotoAndStop("idle"));// not popped return(undefined); } _saveGroup = _local3.name; com.newgrounds.Logger.logWarning(("No save group name w in the Save Browser component. Defaulting to " + _saveGroup) + "."); } setVariable("listBox.visible", query == null); if (query) { _query = query; sortField = (null); } else { _query = com.newgrounds.API.createSaveQuery(_saveGroup); if (!_query) { return(undefined); } setVariable("pageText.text", "Page 1"); _query.sortOn(_sortField, _sortDescending); } _query.__set__resultsPerPage(_numIcons); _query.addEventListener(com.newgrounds.APIEvent.QUERY_COMPLETE, {target:this, func:onQueryComplete}); doLoad(); } function doLoad() { setVariable("infoBox.mouseEnabled", false); setVariable("infoBox.visible", false); setVariable("pageText.text", "Page " + _query.__get__page()); setVariable("titleText.font", com.newgrounds.components.APIComponent.FONT_HEADER); setVariable("titleText.text", _title); setVariable("nextButton.onClick", onPageClick); setVariable("prevButton.onClick", onPageClick); setVariable("orderButton.frame", (_sortDescending ? "sortDESC" : "sortASC")); setVariable("orderButton.onClick", onOrderClick); setVariable("infoBox.mouseEnabled", false); setVariable("infoBox.visible", false); setVariable("infoBox.infoText.text", ""); setVariable("infoBox.filenameText.text", ""); updateOrderText(); var _local2 = 0; while (_local2 < _numIcons) { setVariable(("iconList.icon" + _local2) + ".onRollOver", onFileRollOver); setVariable(("iconList.icon" + _local2) + ".onRollOut", onFileRollOut); setVariable(("iconList.icon" + _local2) + ".frame", "empty"); _local2++; } (gotoAndStop("loading"));// not popped dispose(); _query.execute(); _loading = true; } function onQueryComplete(event) { _loading = false; var _local5 = event.__get__data(); if ((!event.__get__success()) || (!_local5)) { (gotoAndStop("error"));// not popped setVariable("refreshButton.onClick", onRefreshClick); return(undefined); } (gotoAndStop("files"));// not popped setVariable("infoBox.mouseEnabled", false); setVariable("infoBox.visible", false); if (!iconList) { return(undefined); } var _local6 = _local5.__get__files().length; var _local2 = 0; while (_local2 < _local6) { var _local4 = _local5.__get__files()[_local2]; var _local3 = iconList["icon" + _local2]; if (!_local3) { break; } setObjectProperty(_local3, "file", _local4); setObjectProperty(_local3, "onClick", onFileClicked); setVariable(("iconList.icon" + _local2) + ".icon.attachIcon", _local4); _local3.gotoAndStop("file"); _local2++; } if (_local6 == 0) { (gotoAndStop("noResults"));// not popped setVariable("refreshButton.onClick", onRefreshClick); } } function onRefreshClick(target) { loadFiles(); } function onFileClicked(target) { if (!target) { return(undefined); } var _local2 = target.file; if (!_local2) { return(undefined); } _loading = true; (gotoAndStop("loading"));// not popped _local2.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, {target:this, func:onFileLoaded}); _local2.load(); } function onFileLoaded(event) { _loading = false; var _local2 = event.__get__data(); if (_local2) { _local2.removeEventListener(com.newgrounds.APIEvent.FILE_LOADED, onFileLoaded); } } function onFileRollOver(target) { if (!target) { return(undefined); } var _local3 = target.file; if (!_local3) { return(undefined); } var _local4 = ""; _local4 = _local4 + (("by " + _local3.__get__authorName()) + newline); _local4 = _local4 + (_local3.__get__description() + newline); var _local5 = _displayFields; if ((!_local5) || (_local5.length == 0)) { _local5 = _local3.__get__group().__get__keys().concat(_local3.__get__group().__get__ratings()); } for (var _local6 in _local5) { var _local2 = _local5[_local6]; if (_local3.__get__keys()[_local2] != null) { _local4 = _local4 + (((_local2 + ": ") + _local3.__get__keys()[_local2]) + newline); } else if (_local3.__get__ratings()[_local2] != null) { _local4 = _local4 + (((((_local2 + ": ") + Number(_local3.__get__ratings()[_local2])) + " / ") + _local3.__get__group().getRating(_local2).__get__maximum()) + newline); } } if (target) { target.gotoAndStop("fileHover"); } setVariable("infoBox.visible", true); setVariable("infoBox.infoText.text", _local4); setVariable("infoBox.filenameText.text", _local3.__get__name()); if (infoBox) { infoBox.startDrag(true); } } function onFileRollOut(target) { if ((!target) || (!target.file)) { return(undefined); } if (target) { target.gotoAndStop("file"); } setVariable("infoBox.visible", false); if (infoBox) { infoBox.stopDrag(); } if (!target) { return(undefined); } } function onOrderClick(target) { sortDescending = (!_sortDescending); loadFiles(); } function dispose() { onFileRollOut(null); if (iconList) { var _local3 = 0; while (_local3 < _numIcons) { var _local2 = iconList["icon" + _local3]; if (!_local2) { break; } _local2.gotoAndStop("empty"); _local2.file = null; setObjectProperty(_local2, "onClick", null); _local3++; } } } var _numIcons = 12; var _sortField = com.newgrounds.SaveQuery.CREATED_ON; var _sortDescending = true; }
Symbol 88 MovieClip [__Packages.com.newgrounds.components.VoteBar] Frame 0
class com.newgrounds.components.VoteBar extends com.newgrounds.components.APIComponent { var gotoAndStop, setVariable, _title, _rating, _saveFile, _saveGroup; function VoteBar () { super(); (gotoAndStop("idle"));// not popped setVariable("titleText.font", com.newgrounds.components.APIComponent.FONT_HEADER); } function get title() { return(_title); } function set title(value) { _title = (value ? (value) : ""); setVariable("titleText.text", value); //return(title); } function get rating() { return(_rating); } function set rating(v) { _rating = v; //return(rating); } function get saveFile() { return(_saveFile); } function set saveFile(value) { _saveFile = value; _saveGroup = _saveFile.group; com.newgrounds.API.removeEventListener(com.newgrounds.APIEvent.VOTE_COMPLETE, onVoteComplete); //return(saveFile); } function start() { (gotoAndStop("ballot"));// not popped if ((!_rating) || (_rating == "")) { rating = (_saveGroup.__get__ratings()[0]); } var _local2 = 0; while (_local2 < _numVoteButtons) { setVariable(("voteMenu.voteButton" + _local2) + ".onClick", onVoteClick); _local2++; } setVariable("titleText.text", _title); setVariable("titleText.font", com.newgrounds.components.APIComponent.FONT_HEADER); } function stageInstanceInit() { if (com.newgrounds.SaveFile.__get__currentFile()) { saveFile = (com.newgrounds.SaveFile.currentFile); start(); } else { com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, {target:this, func:onFileLoaded}); } } function onFileLoaded(event) { com.newgrounds.API.removeEventListener(com.newgrounds.APIEvent.FILE_LOADED, onFileLoaded); saveFile = (com.newgrounds.SaveFile.currentFile); start(); } function onVoteClick(target) { target.name = target._name; if ((!_saveFile) || (!target.name)) { return(undefined); } var _local3 = target.name.split("voteButton")[1]; var _local2 = _saveGroup.getRating(_rating); var _local4 = _local2.__get__minimum() + (((_local2.__get__maximum() - _local2.__get__minimum()) * _local3) / (_numVoteButtons - 1)); _saveFile.sendVote(_local2.__get__name(), _local4); _saveFile.addEventListener(com.newgrounds.APIEvent.VOTE_COMPLETE, {target:this, func:onVoteComplete}); (gotoAndStop("voting"));// not popped } function onVoteComplete(event) { if (_saveFile) { _saveFile.removeEventListener(com.newgrounds.APIEvent.VOTE_COMPLETE, onVoteComplete); } (gotoAndStop("idle"));// not popped } var _numVoteButtons = 6; }
Symbol 296 MovieClip Frame 1
function camControl() { rp.x = _x; rp.y = _y; var _local5 = camH * (_yscale * 0.01); var _local6 = camW * (_xscale * 0.01); var _local3 = sH / _local5; var _local4 = sW / _local6; _x2 = (_local6 / 2) * _local4; _y2 = (_local5 / 2) * _local3; _xscale2 = _local4 * 100; _yscale2 = _local3 * 100; _rotation2 = -_rotation; _parent.filters = this.filters; _parent.transform.colorTransform = this.transform.colorTransform; } function reset() { _parent._xscale = 100; _parent._yscale = 100; _parent._x = 0; _parent._y = 0; _parent._rotation = 0; _parent._visible = true; } function set_x2(value) { var _local2 = {x:rp.x, y:rp.y}; _parent.localToGlobal(_local2); _parent._x = _parent._x + (value - _local2.x); } function get_x2() { var _local2 = {x:rp.x, y:rp.y}; _parent.localToGlobal(_local2); return(_local2.x); } function set_y2(value) { var _local2 = {x:rp.x, y:rp.y}; _parent.localToGlobal(_local2); _parent._y = _parent._y + (value - _local2.y); } function get_y2() { var _local2 = {x:rp.x, y:rp.y}; _parent.localToGlobal(_local2); return(_local2.y); } function get_xscale2() { return(_parent._xscale); } function set_xscale2(value) { setProperty2("_xscale", value); } function get_yscale2() { return(_parent._yscale); } function set_yscale2(value) { setProperty2("_yscale", value); } function get_rotation2() { return(parent.rotation); } function set_rotation2(value) { setProperty2("_rotation", value); } function setProperty2(prop, n) { var _local3 = {x:rp.x, y:rp.y}; _parent.localToGlobal(_local3); _parent[prop] = n; var _local2 = {x:rp.x, y:rp.y}; _parent.localToGlobal(_local2); _parent._x = _parent._x - (_local2.x - _local3.x); _parent._y = _parent._y - (_local2.y - _local3.y); } _visible = false; addProperty("_x2", get_x2, set_x2); addProperty("_y2", get_y2, set_y2); addProperty("_xscale2", get_xscale2, set_xscale2); addProperty("_yscale2", get_yscale2, set_yscale2); addProperty("_rotation2", get_rotation2, set_rotation2); var oldScaleMode = stage.scaleMode; stage.scaleMode = "exactFit"; var sW = Stage.width; var sH = Stage.height; stage.scaleMode = oldScaleMode; var bounds_obj = this.getBounds(this); var camH = Math.abs(bounds_obj.yMax - bounds_obj.yMin); var camW = Math.abs(bounds_obj.xMax - bounds_obj.xMin); var rp = {x:this._x, y:this._y}; onEnterFrame = function () { camControl(); }; this.onUnload = reset;
Symbol 320 Button
on (release) { gotoAndPlay (1); }
Symbol 321 MovieClip Frame 1
_quality = "medium";
Symbol 321 MovieClip Frame 2452
stop();

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 47 61
Symbol 6 MovieClipUses:5Used by:8 60 61
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:1 4 6 7Used by:22
Symbol 9 GraphicUsed by:21
Symbol 10 GraphicUsed by:21
Symbol 11 GraphicUsed by:12 21
Symbol 12 MovieClipUses:11Used by:13
Symbol 13 MovieClipUses:12Used by:21
Symbol 14 GraphicUsed by:16 21
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClipUses:14 15Used by:21 60
Symbol 17 GraphicUsed by:21
Symbol 18 GraphicUsed by:21
Symbol 19 SoundUsed by:21
Symbol 20 SoundUsed by:21
Symbol 21 ButtonUses:9 10 13 16 17 18 11 14 19 20Used by:22
Symbol 22 MovieClip [com.newgrounds.components.Preloader]Uses:8 21Used by:62
Symbol 24 MovieClip [Flash Ad Class]Used by:61 62
Symbol 31 GraphicUsed by:61
Symbol 32 GraphicUsed by:61
Symbol 33 GraphicUsed by:61
Symbol 34 GraphicUsed by:61
Symbol 35 BitmapUsed by:37
Symbol 36 BitmapUsed by:37
Symbol 37 GraphicUses:35 36Used by:48
Symbol 38 BitmapUsed by:39
Symbol 39 GraphicUses:38Used by:48
Symbol 40 BitmapUsed by:41
Symbol 41 GraphicUses:40Used by:46 48
Symbol 42 BitmapUsed by:43
Symbol 43 GraphicUses:42Used by:46
Symbol 44 BitmapUsed by:45
Symbol 45 GraphicUses:44Used by:46
Symbol 46 MovieClipUses:41 43 45Used by:48
Symbol 47 ButtonUses:5Used by:48
Symbol 48 ButtonUses:37 39 46 41 47Used by:61
Symbol 49 MovieClipUsed by:61
Symbol 50 GraphicUsed by:60
Symbol 51 GraphicUsed by:60
Symbol 52 GraphicUsed by:60
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:60
Symbol 55 GraphicUsed by:59
Symbol 56 BitmapUsed by:57
Symbol 57 GraphicUses:56Used by:58
Symbol 58 MovieClipUses:57Used by:59
Symbol 59 MovieClipUses:55 58Used by:60
Symbol 60 MovieClipUses:50 6 51 52 54 59 16Used by:61
Symbol 61 MovieClip [com.newgrounds.components.FlashAd]Uses:24 31 32 33 34 48 6 49 60 5Used by:62
Symbol 62 MovieClip [com.newgrounds.components.APIConnector]Uses:24 61 22Used by:Timeline
Symbol 64 MovieClip [Newgrounds API Classes]
Symbol 89 BitmapUsed by:90
Symbol 90 GraphicUses:89Used by:Timeline
Symbol 91 GraphicUsed by:93
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClipUses:91 92Used by:Timeline
Symbol 94 GraphicUsed by:Timeline
Symbol 95 BitmapUsed by:96
Symbol 96 GraphicUses:95Used by:97
Symbol 97 MovieClipUses:96Used by:98
Symbol 98 MovieClipUses:97Used by:Timeline
Symbol 99 GraphicUsed by:100
Symbol 100 MovieClipUses:99Used by:321  Timeline
Symbol 101 GraphicUsed by:Timeline
Symbol 102 GraphicUsed by:Timeline
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClipUses:103Used by:Timeline
Symbol 105 GraphicUsed by:106
Symbol 106 MovieClipUses:105Used by:Timeline
Symbol 25 MovieClip [__Packages.com.newgrounds.components.FlashAd]
Symbol 30 MovieClip [__Packages.com.newgrounds.components.APIConnector]
Symbol 26 MovieClip [__Packages.com.newgrounds.components.Preloader]
Symbol 23 MovieClip [__Packages.com.newgrounds.shims.FlashAdShim]
Symbol 27 MovieClip [__Packages.com.newgrounds.Event]
Symbol 28 MovieClip [__Packages.com.newgrounds.EventDispatcher]
Symbol 29 MovieClip [__Packages.com.newgrounds.Logger]
Symbol 63 MovieClip [__Packages.com.newgrounds.shims.APIShim]
Symbol 65 MovieClip [__Packages.com.newgrounds.APIEventDispatcher]
Symbol 66 MovieClip [__Packages.com.newgrounds.encoders.BaseN]
Symbol 67 MovieClip [__Packages.com.newgrounds.APIConnection]
Symbol 68 MovieClip [__Packages.com.newgrounds.crypto.MD5]
Symbol 69 MovieClip [__Packages.com.newgrounds.crypto.RC4]
Symbol 70 MovieClip [__Packages.com.newgrounds.encoders.json.JSON]
Symbol 71 MovieClip [__Packages.com.newgrounds.APIEvent]
Symbol 72 MovieClip [__Packages.com.newgrounds.APICommand]
Symbol 73 MovieClip [__Packages.com.newgrounds.BitmapLoader]
Symbol 74 MovieClip [__Packages.com.newgrounds.Medal]
Symbol 75 MovieClip [__Packages.com.newgrounds.Score]
Symbol 76 MovieClip [__Packages.com.newgrounds.ScoreBoard]
Symbol 77 MovieClip [__Packages.com.newgrounds.SaveKey]
Symbol 78 MovieClip [__Packages.com.newgrounds.SaveRating]
Symbol 79 MovieClip [__Packages.com.newgrounds.SaveGroup]
Symbol 80 MovieClip [__Packages.com.newgrounds.encoders.ImageScanner]
Symbol 81 MovieClip [__Packages.com.newgrounds.SaveFile]
Symbol 82 MovieClip [__Packages.com.newgrounds.SaveQuery]
Symbol 83 MovieClip [__Packages.com.newgrounds.API]
Symbol 84 MovieClip [__Packages.com.newgrounds.components.APIComponent]
Symbol 85 MovieClip [__Packages.com.newgrounds.components.MedalPopup]
Symbol 86 MovieClip [__Packages.com.newgrounds.components.ScoreBrowser]
Symbol 87 MovieClip [__Packages.com.newgrounds.components.SaveBrowser]
Symbol 88 MovieClip [__Packages.com.newgrounds.components.VoteBar]
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:321
Symbol 109 GraphicUsed by:282
Symbol 110 GraphicUsed by:282 321
Symbol 111 GraphicUsed by:282
Symbol 112 GraphicUsed by:282 321
Symbol 113 GraphicUsed by:282
Symbol 114 GraphicUsed by:282
Symbol 115 GraphicUsed by:282
Symbol 116 GraphicUsed by:282 321
Symbol 117 GraphicUsed by:282
Symbol 118 GraphicUsed by:282
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClipUses:119Used by:282
Symbol 121 GraphicUsed by:282
Symbol 122 GraphicUsed by:282
Symbol 123 GraphicUsed by:282
Symbol 124 GraphicUsed by:282
Symbol 125 GraphicUsed by:282
Symbol 126 GraphicUsed by:282
Symbol 127 GraphicUsed by:282
Symbol 128 GraphicUsed by:282
Symbol 129 GraphicUsed by:282
Symbol 130 GraphicUsed by:282
Symbol 131 GraphicUsed by:282
Symbol 132 GraphicUsed by:282
Symbol 133 GraphicUsed by:282
Symbol 134 GraphicUsed by:282
Symbol 135 GraphicUsed by:282
Symbol 136 GraphicUsed by:282
Symbol 137 GraphicUsed by:282
Symbol 138 GraphicUsed by:282
Symbol 139 GraphicUsed by:282
Symbol 140 GraphicUsed by:282
Symbol 141 GraphicUsed by:282
Symbol 142 GraphicUsed by:282
Symbol 143 GraphicUsed by:282
Symbol 144 GraphicUsed by:282
Symbol 145 GraphicUsed by:282
Symbol 146 GraphicUsed by:282
Symbol 147 GraphicUsed by:282
Symbol 148 GraphicUsed by:282
Symbol 149 GraphicUsed by:282
Symbol 150 GraphicUsed by:282
Symbol 151 GraphicUsed by:282
Symbol 152 GraphicUsed by:282
Symbol 153 GraphicUsed by:282
Symbol 154 GraphicUsed by:282
Symbol 155 GraphicUsed by:156
Symbol 156 MovieClipUses:155Used by:282
Symbol 157 GraphicUsed by:282
Symbol 158 GraphicUsed by:282
Symbol 159 GraphicUsed by:282
Symbol 160 GraphicUsed by:282
Symbol 161 GraphicUsed by:282
Symbol 162 GraphicUsed by:282
Symbol 163 GraphicUsed by:282
Symbol 164 GraphicUsed by:282
Symbol 165 GraphicUsed by:282
Symbol 166 GraphicUsed by:282
Symbol 167 GraphicUsed by:282
Symbol 168 GraphicUsed by:282
Symbol 169 GraphicUsed by:282
Symbol 170 GraphicUsed by:282 321
Symbol 171 GraphicUsed by:282 321
Symbol 172 GraphicUsed by:282 321
Symbol 173 GraphicUsed by:282
Symbol 174 GraphicUsed by:282
Symbol 175 GraphicUsed by:282
Symbol 176 GraphicUsed by:282 321
Symbol 177 GraphicUsed by:282
Symbol 178 GraphicUsed by:282
Symbol 179 GraphicUsed by:282 321
Symbol 180 GraphicUsed by:282 321
Symbol 181 GraphicUsed by:282
Symbol 182 GraphicUsed by:282
Symbol 183 GraphicUsed by:282
Symbol 184 GraphicUsed by:282
Symbol 185 GraphicUsed by:282
Symbol 186 GraphicUsed by:282
Symbol 187 GraphicUsed by:282
Symbol 188 GraphicUsed by:282
Symbol 189 GraphicUsed by:282
Symbol 190 GraphicUsed by:282
Symbol 191 GraphicUsed by:282
Symbol 192 GraphicUsed by:282
Symbol 193 GraphicUsed by:282
Symbol 194 GraphicUsed by:282
Symbol 195 GraphicUsed by:282
Symbol 196 GraphicUsed by:282
Symbol 197 GraphicUsed by:282
Symbol 198 GraphicUsed by:282
Symbol 199 GraphicUsed by:282
Symbol 200 GraphicUsed by:282
Symbol 201 GraphicUsed by:282
Symbol 202 GraphicUsed by:282
Symbol 203 GraphicUsed by:282
Symbol 204 GraphicUsed by:282
Symbol 205 GraphicUsed by:282
Symbol 206 GraphicUsed by:282
Symbol 207 GraphicUsed by:282
Symbol 208 GraphicUsed by:282
Symbol 209 GraphicUsed by:282
Symbol 210 GraphicUsed by:282
Symbol 211 GraphicUsed by:282
Symbol 212 GraphicUsed by:282
Symbol 213 GraphicUsed by:282
Symbol 214 GraphicUsed by:282
Symbol 215 GraphicUsed by:282
Symbol 216 GraphicUsed by:282
Symbol 217 GraphicUsed by:282
Symbol 218 GraphicUsed by:282
Symbol 219 GraphicUsed by:282
Symbol 220 GraphicUsed by:282
Symbol 221 GraphicUsed by:282
Symbol 222 GraphicUsed by:282
Symbol 223 GraphicUsed by:282
Symbol 224 GraphicUsed by:282
Symbol 225 GraphicUsed by:282
Symbol 226 GraphicUsed by:282
Symbol 227 GraphicUsed by:282
Symbol 228 GraphicUsed by:282
Symbol 229 GraphicUsed by:282
Symbol 230 GraphicUsed by:282
Symbol 231 GraphicUsed by:282
Symbol 232 GraphicUsed by:282
Symbol 233 GraphicUsed by:282
Symbol 234 GraphicUsed by:282
Symbol 235 GraphicUsed by:282
Symbol 236 GraphicUsed by:282
Symbol 237 GraphicUsed by:282
Symbol 238 GraphicUsed by:282
Symbol 239 GraphicUsed by:282
Symbol 240 GraphicUsed by:282
Symbol 241 GraphicUsed by:282
Symbol 242 GraphicUsed by:282
Symbol 243 GraphicUsed by:282
Symbol 244 GraphicUsed by:282
Symbol 245 GraphicUsed by:282
Symbol 246 GraphicUsed by:282
Symbol 247 GraphicUsed by:282
Symbol 248 GraphicUsed by:282
Symbol 249 GraphicUsed by:282
Symbol 250 GraphicUsed by:282
Symbol 251 GraphicUsed by:282
Symbol 252 GraphicUsed by:282
Symbol 253 GraphicUsed by:282
Symbol 254 GraphicUsed by:282
Symbol 255 GraphicUsed by:282
Symbol 256 GraphicUsed by:282
Symbol 257 GraphicUsed by:282
Symbol 258 GraphicUsed by:282
Symbol 259 GraphicUsed by:282
Symbol 260 GraphicUsed by:282
Symbol 261 GraphicUsed by:282
Symbol 262 GraphicUsed by:282
Symbol 263 GraphicUsed by:264
Symbol 264 ButtonUses:263Used by:282
Symbol 265 GraphicUsed by:282
Symbol 266 GraphicUsed by:282
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClipUses:267Used by:282
Symbol 269 GraphicUsed by:282
Symbol 270 GraphicUsed by:282
Symbol 271 GraphicUsed by:282
Symbol 272 GraphicUsed by:282
Symbol 273 GraphicUsed by:282
Symbol 274 GraphicUsed by:282
Symbol 275 GraphicUsed by:282
Symbol 276 GraphicUsed by:282
Symbol 277 GraphicUsed by:282
Symbol 278 GraphicUsed by:282
Symbol 279 GraphicUsed by:282
Symbol 280 GraphicUsed by:282
Symbol 281 GraphicUsed by:282
Symbol 282 MovieClipUses:109 110 111 112 113 114 115 116 117 118 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 264 265 266 268 269 270 271 272 273 274 275 276 277 278 279 280 281Used by:290
Symbol 283 GraphicUsed by:289
Symbol 284 GraphicUsed by:289
Symbol 285 BitmapUsed by:286
Symbol 286 GraphicUses:285Used by:287
Symbol 287 MovieClipUses:286Used by:289
Symbol 288 GraphicUsed by:289
Symbol 289 MovieClipUses:283 284 287 288Used by:290
Symbol 290 MovieClipUses:282 289Used by:321
Symbol 291 GraphicUsed by:321
Symbol 292 GraphicUsed by:321
Symbol 293 BitmapUsed by:294
Symbol 294 GraphicUses:293Used by:321
Symbol 295 GraphicUsed by:296
Symbol 296 MovieClipUses:295Used by:321
Symbol 297 GraphicUsed by:321
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:321
Symbol 300 GraphicUsed by:321
Symbol 301 BitmapUsed by:302
Symbol 302 GraphicUses:301Used by:321
Symbol 303 GraphicUsed by:321
Symbol 304 BitmapUsed by:305
Symbol 305 GraphicUses:304Used by:321
Symbol 306 GraphicUsed by:321
Symbol 307 BitmapUsed by:308
Symbol 308 GraphicUses:307Used by:321
Symbol 309 GraphicUsed by:321
Symbol 310 BitmapUsed by:311
Symbol 311 GraphicUses:310Used by:321
Symbol 312 BitmapUsed by:313
Symbol 313 GraphicUses:312Used by:321
Symbol 314 GraphicUsed by:321
Symbol 315 GraphicUsed by:321
Symbol 316 GraphicUsed by:321
Symbol 317 GraphicUsed by:321
Symbol 318 GraphicUsed by:320
Symbol 319 GraphicUsed by:320
Symbol 320 ButtonUses:318 319Used by:321
Symbol 321 MovieClipUses:108 290 291 292 294 100 296 297 299 300 302 303 305 306 308 309 311 313 314 116 315 112 170 171 172 110 316 179 176 180 317 320 SS1Used by:Timeline
Streaming Sound 1Used by:Symbol 321 MovieClip

Instance Names

"loadingBar"Symbol 22 MovieClip [com.newgrounds.components.Preloader] Frame 1Symbol 8 MovieClip
"playButton"Symbol 22 MovieClip [com.newgrounds.components.Preloader] Frame 10Symbol 21 Button
"newgroundsButton"Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 1Symbol 48 Button
"adContainer"Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 1Symbol 49 MovieClip
"ad"Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 1Symbol 61 MovieClip [com.newgrounds.components.FlashAd]
"loader"Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 1Symbol 22 MovieClip [com.newgrounds.components.Preloader]

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 22 as "com.newgrounds.components.Preloader"
ExportAssets (56)Timeline Frame 1Symbol 24 as "Flash Ad Class"
ExportAssets (56)Timeline Frame 1Symbol 61 as "com.newgrounds.components.FlashAd"
ExportAssets (56)Timeline Frame 1Symbol 62 as "com.newgrounds.components.APIConnector"
ExportAssets (56)Timeline Frame 1Symbol 64 as "Newgrounds API Classes"
ExportAssets (56)Timeline Frame 1Symbol 25 as "__Packages.com.newgrounds.components.FlashAd"
ExportAssets (56)Timeline Frame 1Symbol 30 as "__Packages.com.newgrounds.components.APIConnector"
ExportAssets (56)Timeline Frame 1Symbol 26 as "__Packages.com.newgrounds.components.Preloader"
ExportAssets (56)Timeline Frame 1Symbol 23 as "__Packages.com.newgrounds.shims.FlashAdShim"
ExportAssets (56)Timeline Frame 1Symbol 27 as "__Packages.com.newgrounds.Event"
ExportAssets (56)Timeline Frame 1Symbol 28 as "__Packages.com.newgrounds.EventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 29 as "__Packages.com.newgrounds.Logger"
ExportAssets (56)Timeline Frame 1Symbol 63 as "__Packages.com.newgrounds.shims.APIShim"
ExportAssets (56)Timeline Frame 1Symbol 65 as "__Packages.com.newgrounds.APIEventDispatcher"
ExportAssets (56)Timeline Frame 1Symbol 66 as "__Packages.com.newgrounds.encoders.BaseN"
ExportAssets (56)Timeline Frame 1Symbol 67 as "__Packages.com.newgrounds.APIConnection"
ExportAssets (56)Timeline Frame 1Symbol 68 as "__Packages.com.newgrounds.crypto.MD5"
ExportAssets (56)Timeline Frame 1Symbol 69 as "__Packages.com.newgrounds.crypto.RC4"
ExportAssets (56)Timeline Frame 1Symbol 70 as "__Packages.com.newgrounds.encoders.json.JSON"
ExportAssets (56)Timeline Frame 1Symbol 71 as "__Packages.com.newgrounds.APIEvent"
ExportAssets (56)Timeline Frame 1Symbol 72 as "__Packages.com.newgrounds.APICommand"
ExportAssets (56)Timeline Frame 1Symbol 73 as "__Packages.com.newgrounds.BitmapLoader"
ExportAssets (56)Timeline Frame 1Symbol 74 as "__Packages.com.newgrounds.Medal"
ExportAssets (56)Timeline Frame 1Symbol 75 as "__Packages.com.newgrounds.Score"
ExportAssets (56)Timeline Frame 1Symbol 76 as "__Packages.com.newgrounds.ScoreBoard"
ExportAssets (56)Timeline Frame 1Symbol 77 as "__Packages.com.newgrounds.SaveKey"
ExportAssets (56)Timeline Frame 1Symbol 78 as "__Packages.com.newgrounds.SaveRating"
ExportAssets (56)Timeline Frame 1Symbol 79 as "__Packages.com.newgrounds.SaveGroup"
ExportAssets (56)Timeline Frame 1Symbol 80 as "__Packages.com.newgrounds.encoders.ImageScanner"
ExportAssets (56)Timeline Frame 1Symbol 81 as "__Packages.com.newgrounds.SaveFile"
ExportAssets (56)Timeline Frame 1Symbol 82 as "__Packages.com.newgrounds.SaveQuery"
ExportAssets (56)Timeline Frame 1Symbol 83 as "__Packages.com.newgrounds.API"
ExportAssets (56)Timeline Frame 1Symbol 84 as "__Packages.com.newgrounds.components.APIComponent"
ExportAssets (56)Timeline Frame 1Symbol 85 as "__Packages.com.newgrounds.components.MedalPopup"
ExportAssets (56)Timeline Frame 1Symbol 86 as "__Packages.com.newgrounds.components.ScoreBrowser"
ExportAssets (56)Timeline Frame 1Symbol 87 as "__Packages.com.newgrounds.components.SaveBrowser"
ExportAssets (56)Timeline Frame 1Symbol 88 as "__Packages.com.newgrounds.components.VoteBar"

Labels

"loading"Symbol 22 MovieClip [com.newgrounds.components.Preloader] Frame 1
"loaded"Symbol 22 MovieClip [com.newgrounds.components.Preloader] Frame 10
"idle"Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 1
"loading"Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 10
"loaded"Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 20
"noBorder"Symbol 61 MovieClip [com.newgrounds.components.FlashAd] Frame 30
"adPreloader"Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 2
"ad"Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 12
"invisible"Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 22
"hostBlocked"Symbol 62 MovieClip [com.newgrounds.components.APIConnector] Frame 32




http://swfchan.com/21/100053/info.shtml
Created: 21/3 -2019 12:58:23 Last modified: 21/3 -2019 12:58:23 Server time: 25/04 -2024 11:52:18