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

swfchan turned sixteen years old the day before yesterday! (5may2024)

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

Newgrounds Pass 3.swf

This is the info page for
Flash #55619

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


ActionScript [AS1/AS2]
Combined Code
movieClip 23 { frame 1 { stop(); } frame 4 { stop(); onEnterFrame = function () { if (_parent.rolledOff) { delete onEnterFrame; play(); } }; } } // unknown tag 88 length 148 movieClip 31 cell { frame 1 { stop(); mark._visible = false; } frame 3 { closeMines_txt.text = closeMines; } } movieClip 33 { } movieClip 36 { } movieClip 38 { frame 1 { gotoAndPlay(2); } frame 15 { stop(); } } movieClip 41 { } movieClip 42 { } movieClip 46 { } movieClip 47 { frame 1 { stop(); } } movieClip 48 { frame 1 { _parent[this._name]['p' + _root.player].gotoAndStop(2); } } movieClip 50 { } movieClip 51 { } movieClip 52 { frame 90 { gotoAndPlay('loop'); } } // unknown tag 88 length 63 movieClip 56 { frame 1 { ach_text.text = _parent.gs + 'XP - ' + _parent.Text; } } movieClip 57 achPopUp { frame 1 { _root.achsQueue.shift(); } frame 132 { if (_root.achsQueue.length > 0) { Text = _root.achs[_root.achsQueue[0]][1]; gs = _root.achs[_root.achsQueue[0]][3]; } else { this.removeMovieClip(); } } } movieClip 61 { } // unknown tag 88 length 78 movieClip 65 hintWin { } frame 1 { _root.API_Settings = {'movie_id': 4039, 'enc_key': '432888355b5bd0a3e4baffe6ee0f969d', 'debug_mode': false, 'movie_version': ''}; } movieClip 69 { } movieClip 72 { } movieClip 75 { } movieClip 79 { } movieClip 88 { frame 40 { stop(); } } movieClip 101 { } button 103 { on (press) { gotoAndStop('end'); _root.play(); } } movieClip 104 { instance of movieClip 79 { onClipEvent (load) { _root.stop(); PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); if (PercentLoaded != 100) { _parent.gotoAndStop(PercentLoaded); } else { _parent.gotoAndStop('lastframe'); } } onClipEvent (enterFrame) { PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); if (PercentLoaded != 100) { _parent.gotoAndStop(PercentLoaded); } else { _parent.gotoAndPlay('loaded'); } } } frame 101 { play(); } frame 165 { stop(); } } button 110 { on (release) { com.Newgrounds.NewgroundsAPI.loadNewgrounds(); } } // unknown tag 88 length 68 // unknown tag 88 length 62 movieClip 118 { } movieClip 119 { frame 1 { com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]); var attachAd = function () { com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]); }; com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, attachAd); background._visible = false; } } button 122 { on (release) { this._visible = false; } } movieClip 129 { frame 1 { _visible = false; var checkConnection = function (event) { if (!event.success) { _visible = true; gotoAndStop(3); } }; if (com.Newgrounds.NewgroundsAPI.isNewgrounds() || _root.API_Settings.debug_mode) { com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection); if (!com.Newgrounds.NewgroundsAPI.hasUserSession() && !_root.API_Settings.debug_mode) { _visible = true; gotoAndStop(2); } } com.Newgrounds.NewgroundsAPI.setMovieVersion(_root.API_Settings.movie_version); com.Newgrounds.NewgroundsAPI.connectMovie(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode); com.Newgrounds.NewgroundsAPI.loadMedals(); stop(); } } // unknown tag 88 length 67 // unknown tag 88 length 62 movieClip 135 { } // unknown tag 88 length 67 movieClip 141 { } movieClip 142 { frame 1 { function unlockMedal(m_name) { clearInterval(pop_delay); var v1 = com.Newgrounds.NewgroundsAPI.getMedals(); var v2 = null; for (i in v1) { if (v1[i].medal_name == m_name) { v2 = v1[i]; medal_name = v2.medal_name; medal_value = v2.medal_value + 'pts'; com.Newgrounds.NewgroundsAPI.unlockMedal(medal_name); pop_delay = setInterval(endDelay, 3000); _visible = true; gotoAndPlay(2); break; } } } function endDelay(params) { gotoAndPlay(10); clearInterval(pop_delay); } var pop_delay; var medal_name = '?????'; var medal_value = '???'; _visible = false; } frame 10 { var myBitmapData = flash.display.BitmapData.loadBitmap(medal_name + '.jpg'); medal_icon.attachBitmap(myBitmapData, 111); stop(); } } movieClip 1790 __Packages.com.Newgrounds.BaseN { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.BaseN) { var v1 = function (hash) { this.ceiling = 100000000000000.0; if (hash) { this.hashIndex = hash; } else { this.hashIndex = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/'; } this.bitSize = this.hashIndex.length; this.hashVal = new Object(); this.i = 0; while (this.i < this.bitSize) { this.hashVal[this.hashIndex.charAt(this.i)] = this.i; ++this.i; } }; com.Newgrounds.BaseN = v1; var v2 = v1.prototype; v2.verify = function (s) { if (this.hashVal[s] != undefined) { return true; } else { return false; } }; v2.encode = function (n, minchars) { this.debug.lastencode = ''; if (typeof this.i != 'string') { n = n.toString(); } if (n.charAt(0) == '-') { var v3 = '-'; n = n.substring(1); } else { var v3 = ''; } if ((String(n)).indexOf('.') > -1) { var v4 = (String(n)).split('.', 2); return v3 + this.baseNEncoder(v4[0], minchars) + '.' + this.baseNEncoder(v4[1]); } else { this.debug.lastencode += '\tNo decimal\r'; return v3 + this.baseNEncoder(n, minchars); } }; v2.decode = function (s) { var v4 = 1; if (s.charAt(0) == '-') { v4 = -1; s = s.substring(1, s.length); } var v3 = s.indexOf('.'); if (v3 > -1) { var v5 = Math.pow(10, this.baseNDecoder(s.substring(v3 + 1, s.length))); return (this.baseNDecoder(s.substring(0, v3)) / v5) * v4; } else { return this.baseNDecoder(s) * v4; } }; v2.baseNEncoder = function (n, minchars) { if (!minchars) { minchars = 1; } var v4 = ''; while (n != 0) { n = Math.round(n); var v3 = n % this.bitSize; if (Math.round(v3) != v3) { trace('BaseN failed on ' + n + '%' + this.bitSize + ' = ' + v3 + ' ' + int(n) + ' ' + int(this.bitSize)); } v4 = this.hashIndex.charAt(v3) + v4; this.debug.lastencode += '\t-> n:' + n + ' % bitSize:' + this.bitSize + ' = ' + v3 + ', final char=' + v4 + '\n'; n -= v3; n /= this.bitSize; } if (minchars) { while (v4.length < minchars) { v4 = this.hashIndex.charAt(0) + v4; } } return v4; }; v2.baseNDecoder = function (s) { var v2 = 0; var v6 = 0; this.i = 0; while (this.i < s.length) { var v3 = s.charAt(s.length - this.i - 1); if (v3 == this.hashIndex.charAt(0)) { var v5 = 0; } else { var v5 = this.hashVal[v3] * Math.pow(this.bitSize, this.i); } v2 += v5; if (v2 >= this.ceiling) { v6 += (v2 - v2 % this.ceiling) / this.ceiling; v2 %= this.ceiling; } ++this.i; } if (v6 > 0) { v2 = '' + v2; while (v2.length < (this.ceiling.toString()).length - 1) { v2 = '0' + v2; } v2 = '' + v6 + v2; } return v2; }; v2.debug = new Object(); ASSetPropFlags(com.Newgrounds.BaseN.prototype, null, 1); } #endinitclip } movieClip 1791 __Packages.com.Newgrounds.NewgroundsAPIError { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPIError) { var v1 = function (error, msg) { if ((Number(error)).toString() == String(error)) { error = Number(error); } else { if (com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]) { error = com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]; } else { error = 0; } } this.code = error; this.message = msg; this.name = com.Newgrounds.NewgroundsAPIError.error_names[error]; this.alias = com.Newgrounds.NewgroundsAPIError.aliases[error]; }; com.Newgrounds.NewgroundsAPIError = v1; var v2 = v1.prototype; v1.init_codes = function () { var v2 = new Object(); var v1 = 0; while (v1 < com.Newgrounds.NewgroundsAPIError.aliases.length) { v2[com.Newgrounds.NewgroundsAPIError.aliases[v1]] = v1; ++v1; } return v2; }; v1.init_names = function () { var v5 = new Array(); var v3 = 0; while (v3 < com.Newgrounds.NewgroundsAPIError.aliases.length) { var v2 = (com.Newgrounds.NewgroundsAPIError.aliases[v3].toLowerCase()).split('_'); var v1 = 0; while (v1 < v2.length) { v2[v1] = (v2[v1].substr(0, 1)).toUpperCase() + v2[v1].substr(1, v2[v1].length); for (var v4 in com.Newgrounds.NewgroundsAPIError.always_caps) { if (v2[v1].toUpperCase() == com.Newgrounds.NewgroundsAPIError.always_caps[v4]) { v2[v1] = v2[v1].toUpperCase(); } } ++v1; } v5[v3] = v2.join(' '); ++v3; } return v5; }; v2.isError = function () { return true; }; v1.aliases = new Array('UNKNOWN_ERROR', 'INVALID_API_ID', 'MISSING_PARAM', 'INVALID_STAT_ID', 'INVALID_COMMAND_ID', 'FLASH_ADS_NOT_APPROVED', 'PERMISSION_DENIED', 'IDENTIFICATION_REQUIRED', 'INVALID_EMAIL_ADDRESS', 'BANNED_USER', 'SESSION_EXPIRED', 'INVALID_SCORE', 'INVALID_MEDAL', 'INVALID_FOLDER', 'FILE_NOT_FOUND', 'SITE_ID_REQUIRED', 'UPLOAD_IN_PROGRESS', 'USER_CANCELLED', 'CONFIRM_REQUEST', 'CONNECTION_FAILED'); v1.always_caps = new Array('API', 'URL', 'ID'); v1.error_codes = com.Newgrounds.NewgroundsAPIError.init_codes(); v1.error_names = com.Newgrounds.NewgroundsAPIError.init_names(); v2.code = 0; ASSetPropFlags(com.Newgrounds.NewgroundsAPIError.prototype, null, 1); } #endinitclip } movieClip 1792 __Packages.com.Newgrounds.NewgroundsAPI { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPI) { var v1 = function () {}; com.Newgrounds.NewgroundsAPI = v1; var v2 = v1.prototype; v1.setMovieVersion = function (v) { if (v) { com.Newgrounds.NewgroundsAPI.version = String(v); } }; v1.setUserEmail = function (e) { com.Newgrounds.NewgroundsAPI.user_email = e; }; v1.getOfficialVersionURL = function () { var v1 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?tracker_id=' + com.Newgrounds.NewgroundsAPI.movie_id + '&command_id=' + com.Newgrounds.NewgroundsAPI.getCommandID('loadOfficalVersion') + '&seed=' + Math.random(); if (com.Newgrounds.NewgroundsAPI.debug) { v1 += '&debug=1'; } return v1; }; v1.hasUserSession = function () { if (com.Newgrounds.NewgroundsAPI.session_id && com.Newgrounds.NewgroundsAPI.publisher_id) { return true; return false; } if (_root.NewgroundsAPI_PublisherID && _root.NewgroundsAPI_SessionID) { return true; } return false; }; v1.isNewgrounds = function () { return com.Newgrounds.NewgroundsAPI.publisher_id == 1 || _root.NewgroundsAPI_PublisherID == 1 || ((com.Newgrounds.NewgroundsAPI.getHost()).toLowerCase()).indexOf('ungrounded.net') > -1; }; v1.hasPublisher = function () { return com.Newgrounds.NewgroundsAPI.publisher_id || _root.NewgroundsAPI_PublisherID; }; v1.hasUserEmail = function () { if (com.Newgrounds.NewgroundsAPI.user_email) { return true; } return false; }; v1.connectionTimeOut = function () { clearInterval(com.Newgrounds.NewgroundsAPI.timeout); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError('CONNECTION_FAILED', 'Connection to NewgroundsAPI gateway timed out.')); }; v1.connectMovie = function (m_id, encrypt_key, debug_mode) { if (com.Newgrounds.NewgroundsAPI.connected) { return undefined; } var v2 = function () { com.Newgrounds.NewgroundsAPI.connectionTimeOut(); }; com.Newgrounds.NewgroundsAPI.timeout = setInterval(v2, 8000, null); if (!m_id) { com.Newgrounds.NewgroundsAPI.fatalError('NewgroundsAPI.connectMovie() - missing required movie_id parameter', 'connectMovie'); } com.Newgrounds.NewgroundsAPI.movie_id = String(m_id); com.Newgrounds.NewgroundsAPI.tracker_id = Number(com.Newgrounds.NewgroundsAPI.movie_id.substring(0, com.Newgrounds.NewgroundsAPI.movie_id.indexOf(':'))); com.Newgrounds.NewgroundsAPI.encryption_key = encrypt_key; com.Newgrounds.NewgroundsAPI.debug = debug_mode; if (_root.NewgroundsAPI_PublisherID) { com.Newgrounds.NewgroundsAPI.publisher_id = _root.NewgroundsAPI_PublisherID; if (_root.NewgroundsAPI_SessionID) { com.Newgrounds.NewgroundsAPI.session_id = _root.NewgroundsAPI_SessionID; } } else { com.Newgrounds.NewgroundsAPI.publisher_id = 1; com.Newgrounds.NewgroundsAPI.session_id = null; com.Newgrounds.NewgroundsAPI.user_id = 0; com.Newgrounds.NewgroundsAPI.user_name = 'Guest'; } if (_root.NewgroundsAPI_UserName) { com.Newgrounds.NewgroundsAPI.user_name = _root.NewgroundsAPI_UserName; } if (_root.NewgroundsAPI_UserID) { com.Newgrounds.NewgroundsAPI.user_id = _root.NewgroundsAPI_UserID; } com.Newgrounds.NewgroundsAPI.connected = true; com.Newgrounds.NewgroundsAPI.sendCommand('connectMovie', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'movie_version': com.Newgrounds.NewgroundsAPI.version}); }; v1.getHost = function () { if (!com.Newgrounds.NewgroundsAPI.host) { var v1 = _url; if (v1.indexOf('http://') > -1 or v1.indexOf('https://') > -1) { com.Newgrounds.NewgroundsAPI.host = (v1.split('/'))[2].toLowerCase(); return com.Newgrounds.NewgroundsAPI.host; } com.Newgrounds.NewgroundsAPI.host = 'localhost'; } return com.Newgrounds.NewgroundsAPI.host; }; v1.loadNewgrounds = function () { com.Newgrounds.NewgroundsAPI.sendCommand('loadNewgrounds', {'host': com.Newgrounds.NewgroundsAPI.getHost()}, true); }; v1.loadMySite = function () { com.Newgrounds.NewgroundsAPI.sendCommand('loadMySite', {'host': com.Newgrounds.NewgroundsAPI.getHost()}); }; v1.loadCustomLink = function (link) { com.Newgrounds.NewgroundsAPI.sendCommand('loadCustomLink', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'link': link}, true); }; v1.logCustomEvent = function (event) { com.Newgrounds.NewgroundsAPI.sendCommand('logCustomEvent', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'event': event}); }; v1.postScore = function (score, value, get_best) { if (!score or value == undefined) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('postScore')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required parameter(s)')); return undefined; } com.Newgrounds.NewgroundsAPI.sendSecureCommand('postScore', {'score': score, 'value': value, 'get_best': get_best}); }; v1.getTodaysScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 't', params, 'getTodaysScores'); }; v1.getYesterdaysScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getYesterdaysScores'); }; v1.getThisWeeksScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'w', params, 'getThisWeeksScores'); }; v1.getThisMonthsScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'm', params, 'getThisMonthsScores'); }; v1.getThisYearsScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getThisYearsScores'); }; v1.getAlltimeScores = function (score, params) { com.Newgrounds.NewgroundsAPI.getScores(score, 'a', params, 'getAlltimeScores'); }; v1.getScores = function (score, period, params, command_name) { if (!score) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required score name')); return undefined; } if (!params) { params = new Object(); } if (!com.Newgrounds.NewgroundsAPI.hasUserSession()) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError('SITE_ID_REQUIRED', 'Host \'' + com.Newgrounds.NewgroundsAPI.getHost() + '\' does not have high scores enabled')); return undefined; } params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; params.period = period; params.score = score; if (params.user_id) { var v3 = period; } else { var v3 = period + '-u'; } if (com.Newgrounds.NewgroundsAPI.score_page_counts[v3] == undefined) { params.request_page_count = true; } com.Newgrounds.NewgroundsAPI.sendCommand('getScores', params); }; v1.unlockMedal = function (medal, get_score) { if (!medal) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('unlockMedal')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required medal name')); return undefined; } var v1 = new Object(); v1.medal = medal; if (get_score) { v1.get_score = get_score; } com.Newgrounds.NewgroundsAPI.sendSecureCommand('unlockMedal', v1); }; v1.loadMedals = function () { if (com.Newgrounds.NewgroundsAPI.medals) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, true, {'medals': com.Newgrounds.NewgroundsAPI.medals}); return undefined; } var v1 = new Object(); if (com.Newgrounds.NewgroundsAPI.hasUserSession()) { v1.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; v1.user_id = com.Newgrounds.NewgroundsAPI.user_id; } com.Newgrounds.NewgroundsAPI.sendCommand('getMedals', v1); }; v1.getMedals = function () { return com.Newgrounds.NewgroundsAPI.medals; }; v1.saveFile = function (folder, filename, contents, thumbnail_source) { if (!com.Newgrounds.NewgroundsAPI.save_file) { com.Newgrounds.NewgroundsAPI.save_file = new com.Newgrounds.NewgroundsAPISaveFile(com.Newgrounds.NewgroundsAPI.movie_id, folder, filename); com.Newgrounds.NewgroundsAPI.save_file.setContents(contents); if (thumbnail_source) { com.Newgrounds.NewgroundsAPI.save_file.setThumbnail(thumbnail_source); } com.Newgrounds.NewgroundsAPI.save_file.onError = function (msg) { var v1 = new com.Newgrounds.NewgroundsAPIError('PERMISSION_DENIED', msg); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); }; com.Newgrounds.NewgroundsAPI.save_file.onCancel = function (msg) { var v1 = new com.Newgrounds.NewgroundsAPIError('USER_CANCELLED', msg); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); }; com.Newgrounds.NewgroundsAPI.save_file.submit(); } else { var v1 = new com.Newgrounds.NewgroundsAPIError('UPLOAD_IN_PROGRESS', 'Please wait for the previous file to finish uploading'); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1); } }; v1.checkFilePrivs = function (folder, filename) { if (com.Newgrounds.NewgroundsAPI.user_id) { var v1 = com.Newgrounds.NewgroundsAPI.user_id; } else { var v1 = 0; } var v2 = {'folder': folder, 'filename': filename, 'user_id': v1, 'publisher_id': com.Newgrounds.NewgroundsAPI.publisher_id}; com.Newgrounds.NewgroundsAPI.sendCommand('checkFilePrivs', v2); }; v1.finishFileSave = function (folder, filename, description, share, file, thumbnail) { var v2; v2 = {'folder': folder, 'filename': filename, 'description': description, 'share': share}; var v1; v1 = {'file': file, 'thumbnail': thumbnail}; com.Newgrounds.NewgroundsAPI.sendSecureCommand('saveFile', v2, null, v1); }; v1.getFiles = function (folder, options) { var v7 = {'name': 1, 'date': 2, 'score': 3}; var v2 = {'user_only': false, 'sort_on': 'date', 'page': 1, 'results_per_page': 20, 'sort_descending': true}; var v6 = new Array(); for (var v10 in v7) { v6.push('\'' + v10 + '\''); } var v4 = new Array(); for (var v9 in v2) { v4.push('\'' + v9 + '\''); } if (options.sort_descending && !v7[options.sort_descending]) { var v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + options.sort_descending + '\' is not a valid sort_on value. Valid values are: ' + v6.join(', ')); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options.sort_descending; } var v8; if (options) { for (v10 in options) { if (v2[v10] == undefined) { v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + v10 + '\' is not a valid option. Valid options are: ' + v4.join(', ')); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options[v10]; } else { if (typeof options[v10] != typeof v2[v10]) { v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'option \'' + v10 + '\' should be the following type: ' + typeof v2[v10]); com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3); delete options[v10]; } } } v8 = options; } else { v8 = new Object(); } if (com.Newgrounds.NewgroundsAPI.hasUserSession()) { v8.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; v8.user_id = com.Newgrounds.NewgroundsAPI.user_id; } v8.folder = folder; com.Newgrounds.NewgroundsAPI.sendCommand('getFiles', v8); }; v1.getConfirmation = function (command_name, event, msg, target, confirm, cancel) { var v1 = new com.Newgrounds.NewgroundsAPIError('CONFIRM_REQUEST', msg); v1.confirm = function () { target[confirm](); }; v1.cancel = function () { target[cancel](); }; v1.command = com.Newgrounds.NewgroundsAPI.getCommandID(command_name); com.Newgrounds.NewgroundsAPI.callListener(event, false, v1); }; v1.doBlockHost = function (event) { _root.stop(); com.Newgrounds.NewgroundsAPI.initTextFormats(); _root.createEmptyMovieClip('NGAPI_deny_host_overlay', _root.getNextHighestDepth()); _root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100); _root.NGAPI_deny_host_overlay.beginFill(6684672); _root.NGAPI_deny_host_overlay.moveTo(0, 0); _root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0); _root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height); _root.NGAPI_deny_host_overlay.lineTo(0, Stage.height); _root.NGAPI_deny_host_overlay.lineTo(0, 0); _root.NGAPI_deny_host_overlay.endFill(); var v2 = 'This movie has not been approved for use on ' + com.Newgrounds.NewgroundsAPI.getHost() + '.'; v2 += '\r\rFor an aproved copy, please visit:\r'; var v4 = v2.length; v2 += event.data.movie_url; var v3 = v2.length; _root.NGAPI_deny_host_overlay.createTextField('mousekill', 100, 0, 0, Stage.width, Stage.height); _root.NGAPI_deny_host_overlay.createTextField('error', 101, (Stage.width - 400) / 2, Stage.height / 2 - 100, 400, 200); _root.NGAPI_deny_host_overlay.error.text = 'ERROR!'; _root.NGAPI_deny_host_overlay.error.setTextFormat(com.Newgrounds.NewgroundsAPI.error_format); _root.NGAPI_deny_host_overlay.createTextField('message', 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200); _root.NGAPI_deny_host_overlay.message.text = v2; _root.NGAPI_deny_host_overlay.message.multiline = true; _root.NGAPI_deny_host_overlay.message.wordWrap = true; _root.NGAPI_deny_host_overlay.message.html = true; _root.NGAPI_deny_host_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format); com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url; _root.NGAPI_deny_host_overlay.message.setTextFormat(v4, v3, com.Newgrounds.NewgroundsAPI.link_format); }; v1.onNewVersionAvailable = function (event) { _root.stop(); com.Newgrounds.NewgroundsAPI.initTextFormats(); var v2 = new Object(); v2.x = Stage.width / 2; v2.y = Stage.height / 2; _root.createEmptyMovieClip('NGAPI_new_version_overlay', _root.getNextHighestDepth()); _root.NGAPI_new_version_overlay.lineStyle(1, 0, 100); _root.NGAPI_new_version_overlay.beginFill(0, 70); _root.NGAPI_new_version_overlay.moveTo(-10, -10); _root.NGAPI_new_version_overlay.lineTo(-10, 1000); _root.NGAPI_new_version_overlay.lineTo(1000, 1000); _root.NGAPI_new_version_overlay.lineTo(1000, -10); _root.NGAPI_new_version_overlay.lineTo(-10, -10); _root.NGAPI_new_version_overlay.endFill(); _root.NGAPI_new_version_overlay.lineStyle(10, 0, 100); _root.NGAPI_new_version_overlay.beginFill(51); _root.NGAPI_new_version_overlay.moveTo(v2.x - 240, v2.y - 120); _root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y - 120); _root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y + 80); _root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y + 80); _root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y - 120); _root.NGAPI_new_version_overlay.endFill(); _root.NGAPI_new_version_overlay.createEmptyMovieClip('exit', 1000); _root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100); _root.NGAPI_new_version_overlay.exit.beginFill(0, 50); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 210, v2.y - 110); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 110); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 90); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 90); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 110); _root.NGAPI_new_version_overlay.exit.endFill(); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 214, v2.y - 106); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 226, v2.y - 94); _root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 226, v2.y - 106); _root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 214, v2.y - 94); _root.NGAPI_new_version_overlay.exit.onMouseUp = function () { if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) { _root.NGAPI_new_version_overlay.removeMovieClip(); } }; var v3 = 'Version ' + event.data.movie_version + ' is now available at:' + '\n'; var v6 = v3.length; v3 += event.data.movie_url; var v4 = v3.length; _root.NGAPI_new_version_overlay.createTextField('mouseblocker', 99, -10, -10, 1000, 1000); _root.NGAPI_new_version_overlay.createTextField('newversion', 100, v2.x - 210, v2.y - 90, 400, 80); _root.NGAPI_new_version_overlay.newversion.text = 'New Version Available!'; _root.NGAPI_new_version_overlay.newversion.setTextFormat(com.Newgrounds.NewgroundsAPI.header_format); _root.NGAPI_new_version_overlay.createTextField('message', 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40); _root.NGAPI_new_version_overlay.message.text = v3; _root.NGAPI_new_version_overlay.message.multiline = true; _root.NGAPI_new_version_overlay.message.wordWrap = true; _root.NGAPI_new_version_overlay.message.html = true; _root.NGAPI_new_version_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format); com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url; _root.NGAPI_new_version_overlay.message.setTextFormat(v6, v4, com.Newgrounds.NewgroundsAPI.link_format); }; v1.initTextFormats = function () { if (!com.Newgrounds.NewgroundsAPI.error_format) { com.Newgrounds.NewgroundsAPI.error_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.error_format.font = 'Arial Black'; com.Newgrounds.NewgroundsAPI.error_format.size = 48; com.Newgrounds.NewgroundsAPI.error_format.color = 16711680; } if (!com.Newgrounds.NewgroundsAPI.header_format) { com.Newgrounds.NewgroundsAPI.header_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.header_format.font = 'Arial Black'; com.Newgrounds.NewgroundsAPI.header_format.size = 24; com.Newgrounds.NewgroundsAPI.header_format.color = 16777215; } if (!com.Newgrounds.NewgroundsAPI.normal_format) { com.Newgrounds.NewgroundsAPI.normal_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.normal_format.font = 'Arial'; com.Newgrounds.NewgroundsAPI.normal_format.bold = true; com.Newgrounds.NewgroundsAPI.normal_format.size = 12; com.Newgrounds.NewgroundsAPI.normal_format.color = 16777215; } if (!com.Newgrounds.NewgroundsAPI.link_format) { com.Newgrounds.NewgroundsAPI.link_format = new TextFormat(); com.Newgrounds.NewgroundsAPI.link_format.color = 16776960; com.Newgrounds.NewgroundsAPI.link_format.underline = true; } }; v1.doEvent = function (e) { switch (com.Newgrounds.NewgroundsAPI.getCommandName(e.command_id)) { case 'connectMovie': clearInterval(com.Newgrounds.NewgroundsAPI.timeout); com.Newgrounds.NewgroundsAPI.sendMessage('You have successfully connected to the Newgrounds API Gateway'); com.Newgrounds.NewgroundsAPI.sendMessage('Movie identified as "' + e.movie_name + '"'); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, e.success, {'movie_name': e.movie_name}); var v4 = false; if (e.ad_status === -1) { var v6 = 'This movie was not approved to run Flash Ads.'; com.Newgrounds.NewgroundsAPI.sendWarning(v6); com.Newgrounds.NewgroundsAPI.sendWarning('visit ' + com.Newgrounds.NewgroundsAPI.AD_TERMS_URL + ' to view our approval guidelines'); if (!e.ad_url) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6)); } else { v4 = true; } } else { if (e.ad_status === 0) { var v6 = 'Flash Ads are currently awaiting approval.'; com.Newgrounds.NewgroundsAPI.sendNotice(v6); if (!e.ad_url) { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6)); } else { v4 = true; } } } if (e.ad_url) { com.Newgrounds.NewgroundsAPI.ad_url = unescape(e.ad_url); if (!v4) { com.Newgrounds.NewgroundsAPI.sendMessage('This movie has been approved to run Flash Ads!'); } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, true); } if (e.deny_host) { v6 = com.Newgrounds.NewgroundsAPI.getHost() + ' does not have permission to run this movie!'; com.Newgrounds.NewgroundsAPI.sendWarning(v6); com.Newgrounds.NewgroundsAPI.sendWarning('\tUpdate your API configuration to unblock ' + com.Newgrounds.NewgroundsAPI.getHost()); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED, true, {'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()}); } if (e.movie_version) { com.Newgrounds.NewgroundsAPI.sendWarning('According to your API Configuration, this version is out of date.'); if (com.Newgrounds.NewgroundsAPI.version) { com.Newgrounds.NewgroundsAPI.sendWarning('\tThe this movie is version ' + com.Newgrounds.NewgroundsAPI.version); } com.Newgrounds.NewgroundsAPI.sendWarning('\tThe most current version is ' + e.movie_version); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE, true, {'movie_version': e.movie_version, 'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()}); } if (e.request_portal_url) { com.Newgrounds.NewgroundsAPI.sendCommand('setPortalID', {'portal_url': _url}); } break; case 'logCustomEvent': if (e.success) { com.Newgrounds.NewgroundsAPI.sendMessage('Event \'' + e.event + '\' was logged.'); } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.EVENT_LOGGED, e.success, {'event': e.event}); break; case 'postScore': var v7; if (e.success) { var v3 = 'User'; if (com.Newgrounds.NewgroundsAPI.user_email) { v3 = com.Newgrounds.NewgroundsAPI.user_email; } else { if (com.Newgrounds.NewgroundsAPI.user_name) { v3 = com.Newgrounds.NewgroundsAPI.user_name; } } com.Newgrounds.NewgroundsAPI.sendMessage(v3 + ' posted ' + e.value + ' to \'' + e.score + '\''); v7 = {'score': e.score, 'value': e.value, 'username': v3}; } com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORE_POSTED, e.success, v7); break; case 'getScores': var v7 = new Object(); if (e.user_id) { var v5 = e.period; } else { var v5 = e.period + '-u'; } if (e.total_pages) { com.Newgrounds.NewgroundsAPI.score_page_counts[v5] = e.total_pages; } v7.user_id = e.user_id; v7.current_page = e.current_page; v7.total_pages = com.Newgrounds.NewgroundsAPI.score_page_counts[v5]; v7.scores = e.scores; v7.period = com.Newgrounds.NewgroundsAPI.getPeriodName(e.period); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, e.success, v7); break; case 'unlockMedal': if (com.Newgrounds.NewgroundsAPI.medals) { var v2 = 0; while (v2 < com.Newgrounds.NewgroundsAPI.medals.length) { if (com.Newgrounds.NewgroundsAPI.medals[v2].medal_name === e.medal_name) { com.Newgrounds.NewgroundsAPI.medals[v2].medal_unlocked = true; break; } ++v2; } } var v7 = {'medal_name': e.medal_name, 'medal_value': e.medal_value, 'medal_difficulty': e.medal_difficulty}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDAL_UNLOCKED, e.success, v7); break; case 'getMedals': com.Newgrounds.NewgroundsAPI.medals = e.medals; var v7 = {'medals': e.medals}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, e.success, v7); break; break; case 'getFiles': break; case 'getSystemFiles': case 'saveFile': com.Newgrounds.NewgroundsAPI.save_file = null; var v7 = {'file_id': e.file_id, 'filename': e.filename, 'file_url': e.file_url, 'thumbnail': e.thumbnail, 'icon': e.icon}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, e.success, v7); break; case 'checkFilePrivs': if (com.Newgrounds.NewgroundsAPI.save_file) { com.Newgrounds.NewgroundsAPI.save_file.checkPrivs(e); } else { var v7 = {'filename': e.filename, 'folder': e.folder, 'can_read': e.can_read, 'can_write': e.can_write}; com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_PRIVS_LOADED, e.success, v7); } } }; v1.setDefaultListeners = function () { var v1 = new Array(); v1[com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED] = {'listener': com.Newgrounds.NewgroundsAPI.doBlockHost}; v1[com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE] = {'listener': com.Newgrounds.NewgroundsAPI.onNewVersionAvailable}; return v1; }; v1.addEventListener = function (event, listener, params) { com.Newgrounds.NewgroundsAPI.listeners[event] = {'listener': listener, 'params': params}; }; v1.removeEventListener = function (event) { delete com.Newgrounds.NewgroundsAPI.listeners[event]; }; v1.getEventName = function (event) { for (var v2 in com.Newgrounds.NewgroundsAPI.events) { if (com.Newgrounds.NewgroundsAPI.events[v2] == event) { return v2; } } return undefined; }; v1.callListener = function (event, success, data, target) { com.Newgrounds.NewgroundsAPI.echo('Fired Event: ' + com.Newgrounds.NewgroundsAPI.getEventName(event)); if (com.Newgrounds.NewgroundsAPI.listeners[event]) { if (data.isError()) { com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'error': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params); } else { com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'data': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params); } } }; v1.getCommandName = function (id) { return id; }; v1.getCommandID = function (name) { return name; }; v1.getPeriodAliases = function () { var v1 = new Object(); for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { v1[com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias] = v2; } return v1; }; v1.getPeriodName = function (p) { for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { if (v2 == p) { return com.Newgrounds.NewgroundsAPI.period_aliases[v2].name; } } return null; }; v1.getPeriodAlias = function (p) { for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) { if (v2 == p) { return com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias; } } return null; }; v1.sendError = function (c, e) { trace('[NewgroundsAPI ERROR] :: ' + com.Newgrounds.NewgroundsAPI.getCommandName(c.command_id) + '() - ' + e.name + ':' + '\n' + '\t\t\t\t' + e.message); }; v1.sendWarning = function (m, c) { if (c) { m += '\r[NewgroundsAPI WARNING] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[NewgroundsAPI WARNING] :: ' + m); }; v1.sendNotice = function (m, c) { if (c) { m += '\r[NewgroundsAPI NOTICE] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } trace('[NewgroundsAPI NOTICE] :: ' + m); }; v1.fatalError = function (m, c) { if (c) { m += '\r\tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.'; } throw '***ERROR*** frame=' + _root._currentframe + ', class=NewgroundsAPI' + '\n' + '\n' + m; }; v1.sendSecureCommand = function (command, secure_params, unsecure_params, files) { if (!com.Newgrounds.NewgroundsAPI.debug && !com.Newgrounds.NewgroundsAPI.hasUserSession() && !com.Newgrounds.NewgroundsAPI.hasUserEmail()) { com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command)}, new com.Newgrounds.NewgroundsAPIError('IDENTIFICATION_REQUIRED', 'You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail("name@domain.com"); ) to use ' + command + '().')); return undefined; } if (!command) { com.Newgrounds.NewgroundsAPI.fatalError('Missing command', 'sendSecureCommand'); } if (!secure_params) { com.Newgrounds.NewgroundsAPI.fatalError('Missing secure_params', 'sendSecureCommand'); } if (!unsecure_params) { unsecure_params = new Object(); } var v4 = ''; var v1 = 0; while (v1 < 16) { v4 += com.Newgrounds.NewgroundsAPI.compression_radix.charAt(Math.floor(Math.random() * com.Newgrounds.NewgroundsAPI.compression_radix.length)); ++v1; } if (com.Newgrounds.NewgroundsAPI.debug) { secure_params.session_id = ''; } else { secure_params.session_id = com.Newgrounds.NewgroundsAPI.session_id; } secure_params.as_version = 2; secure_params.user_email = com.Newgrounds.NewgroundsAPI.user_email; secure_params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id; secure_params.seed = v4; secure_params.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command); var v10 = com.Newgrounds.MD5.calculate(v4); var v3 = v10 + com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), com.Newgrounds.NewgroundsAPI.encryption_key); var v9 = v3.length % 6; var v5 = ''; v1 = 0; while (v1 < v3.length) { var v2 = Number('0x' + v3.substr(v1, 6)); v5 += com.Newgrounds.NewgroundsAPI.compressor.encode(v2, 4); v1 += 6; } unsecure_params.secure = v9 + v5; com.Newgrounds.NewgroundsAPI.sendCommand('securePacket', unsecure_params, false, files); }; v1.sendCommand = function (command, params, open_browser, files) { if (!com.Newgrounds.NewgroundsAPI.connected and command != 'connectMovie') { var v11 = 'NewgroundsAPI.' + command + '() - NewgroundsAPI.connectMovie() must be called before this command can be called' + '\n'; com.Newgrounds.NewgroundsAPI.fatalError(v11, 'connectMovie'); } if (open_browser) { var v1 = new Object(); } else { var v1 = new LoadVars(); } v1.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command); v1.tracker_id = com.Newgrounds.NewgroundsAPI.movie_id; if (com.Newgrounds.NewgroundsAPI.debug) { v1.debug = com.Newgrounds.NewgroundsAPI.debug; } if (params) { for (var v8 in params) { v1[v8] = params[v8]; } } if (files) { for (v8 in files) { v1[v8] = files[v8]; } } com.Newgrounds.NewgroundsAPI.echo('OUTPUT: \r' + com.Newgrounds.JSON.encode(v1) + '\n'); if (open_browser) { var v5 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(); for (v8 in v1) { v5 += '&' + escape(v8) + '=' + escape(v1[v8]); } getURL(v5, '_blank'); v1.removeMovieClip(); } else { var v9 = new LoadVars(); v9.onData = function (data) { com.Newgrounds.NewgroundsAPI.echo('INPUT: \r' + data + '\n'); if (data) { var v1 = com.Newgrounds.JSON.decode(data); } else { var v1 = {'success': false}; } if (!v1.success) { var v3 = new com.Newgrounds.NewgroundsAPIError(v1.error_code, v1.error_msg); com.Newgrounds.NewgroundsAPI.sendError(v1, v3); } else { com.Newgrounds.NewgroundsAPI.doEvent(v1); } }; var v4 = new Array(); for (var v7 in v1) { v4.push(v7 + '=' + escape(v1[v7])); } com.Newgrounds.NewgroundsAPI.echo('POST ' + com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?' + v4.join('&')); v1.sendAndLoad(com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(), v9, 'POST'); } }; v1.renderAd = function (target) { if (com.Newgrounds.NewgroundsAPI.ad_swf_url) { target.background = target.createEmptyMovieClip('background', 100); target.background.beginFill(0); target.background.moveTo(0, 0); target.background.lineTo(300, 0); target.background.lineTo(300, 250); target.background.lineTo(0, 250); target.background.lineTo(0, 0); target.background.endFill(); target.mask = target.createEmptyMovieClip('mask', 101); target.mask.beginFill(0); target.mask.moveTo(0, 0); target.mask.lineTo(300, 0); target.mask.lineTo(300, 250); target.mask.lineTo(0, 250); target.mask.lineTo(0, 0); target.mask.endFill(); target.clip = target.createEmptyMovieClip('clip', 102); target.clip.ad = target.clip.createEmptyMovieClip('ad', 100); target.clip.setMask(target.mask); loadMovie(com.Newgrounds.NewgroundsAPI.ad_swf_url, target.clip.ad); com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, true, null, target); } else { com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', 'Unable to render ad')); } }; v1.attachFlashAd = function (target) { System.security.allowDomain('http://server.cpmstar.com'); System.security.allowDomain('http://www.cpmstar.com'); System.security.allowDomain('https://server.cpmstar.com'); System.security.allowDomain('https://www.cpmstar.com'); System.security.allowInsecureDomain('http://server.cpmstar.com'); System.security.allowInsecureDomain('http://www.cpmstar.com'); System.security.allowInsecureDomain('https://server.cpmstar.com'); System.security.allowInsecureDomain('https://www.cpmstar.com'); com.Newgrounds.NewgroundsAPI.sendMessage('You may get a security sandbox violation from this ad. This is nothing to worry about!'); if (com.Newgrounds.NewgroundsAPI.resetAdTimer()) { if (com.Newgrounds.NewgroundsAPI.ad_url) { var v1 = new LoadVars(); v1.onData = function (data) { if (data) { com.Newgrounds.NewgroundsAPI.ad_swf_url = data; } else { com.Newgrounds.NewgroundsAPI.ad_swf_url = null; } com.Newgrounds.NewgroundsAPI.renderAd(target); }; if (com.Newgrounds.NewgroundsAPI.ad_url.indexOf('?') > -1) { v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '&random=' + Math.random()); } else { v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '?random=' + Math.random()); } } } else { com.Newgrounds.NewgroundsAPI.renderAd(target); } }; v1.resetAdTimer = function () { if (!com.Newgrounds.NewgroundsAPI.ad_url) { return false; } var v1 = new Date(); if (v1.getTime() >= com.Newgrounds.NewgroundsAPI.ad_reset) { com.Newgrounds.NewgroundsAPI.ad_reset = v1.getTime() + 300000; return true; } return false; }; v1.sendMessage = function (m, r) { var v1 = '[NewgroundsAPI] :: ' + m; if (r) { return v1; } else { trace(v1); } }; v1.echo = function (m) { if (com.Newgrounds.NewgroundsAPI.do_echo) { trace(m); } }; v1.do_echo = false; v1.GATEWAY_URL = 'http://www.ngads.com/gateway_v2.php'; v1.AD_TERMS_URL = 'http://www.newgrounds.com/wiki/flashads/terms/'; v1.COMMANDS_WIKI_URL = 'http://www.newgrounds.com/wiki/flashapi/commands/'; v1.ad_reset = 0; v1.save_file = null; v1.medals = null; v1.score_page_counts = new Object(); v1.compression_radix = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X'; v1.compressor = new com.Newgrounds.BaseN(com.Newgrounds.NewgroundsAPI.compression_radix); v1.errors = com.Newgrounds.NewgroundsAPIError.init_codes(); v1.events = {'MOVIE_CONNECTED': 1, 'ADS_APPROVED': 2, 'AD_ATTACHED': 3, 'HOST_BLOCKED': 4, 'NEW_VERSION_AVAILABLE': 5, 'EVENT_LOGGED': 6, 'SCORE_POSTED': 7, 'SCORES_LOADED': 8, 'MEDAL_UNLOCKED': 9, 'MEDALS_LOADED': 10, 'FILE_PRIVS_LOADED': 11, 'FILE_SAVED': 12}; v1.listeners = com.Newgrounds.NewgroundsAPI.setDefaultListeners(); v1.periods = com.Newgrounds.NewgroundsAPI.getPeriodAliases(); v1.period_aliases = {'t': {'name': 'Today', 'alias': 'TODAY'}, 'p': {'name': 'Yesterday', 'alias': 'YESTERDAY'}, 'w': {'name': 'This Week', 'alias': 'THIS_WEEK'}, 'm': {'name': 'This Month', 'alias': 'THIS_MONTH'}, 'y': {'name': 'This Year', 'alias': 'THIS_YEAR'}, 'a': {'name': 'All-Time', 'alias': 'ALL_TIME'}}; ASSetPropFlags(com.Newgrounds.NewgroundsAPI.prototype, null, 1); } #endinitclip } movieClip 1793 __Packages.com.Newgrounds.NewgroundsAPISaveFile { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.NewgroundsAPISaveFile) { var v1 = function (tracker_id, folder, filename) { this.tracker_id = tracker_id; this.folder = folder; this.filename = filename; this.contents = null; this.thumbnail = null; this.icon_url = null; this.thumbnail_url = null; }; com.Newgrounds.NewgroundsAPISaveFile = v1; var v2 = v1.prototype; v2.setDescription = function (description) { this.description = description; }; v2.setShared = function (share) { this.share = share; }; v2.setContents = function (contents) { this.contents = contents; }; v2.setThumbnail = function (thumb) { if (thumb) { this.thumbnail = thumb; } else { this.thumbnail = null; } }; v2.onError = function (msg) { trace('[NewgroundsAPISaveFile ERROR] :: ' + msg); }; v2.onCancel = function (msg) { trace('[NewgroundsAPISaveFile] :: ' + msg); }; v2.submit = function () { this.scan = null; com.Newgrounds.NewgroundsAPI.checkFilePrivs(this.folder, this.filename); }; v2.checkPrivs = function (p) { if (p.success) { if (p.can_write) { this.can_write = p.can_write; if (p.exists) { com.Newgrounds.NewgroundsAPI.getConfirmation('saveFile', com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, 'File \'' + this.filename + '\' exists, overwrite?', this, 'startFile', 'cancelFile'); } else { this.startFile(); } } else { this.onError('This filename is owned by another user.'); } } else { this.onError('There was a problem looking up your file\'s details'); } }; v2.cancelFile = function () { this.onCancel('Overwrite was cancelled'); }; v2.startFile = function () { if (this.can_write) { if (this.thumbnail) { this.scanner = new com.Newgrounds.ImageScanner(this.thumbnail); this.scanner.setCallback(this, 'writeFile'); this.scanner.startScan(100, 100, true); } else { this.writeFile(); } } else { this.onError('You cannot write to filename "' + this.filename + '"'); } }; v2.writeFile = function (img) { trace('FINISHED'); com.Newgrounds.NewgroundsAPI.finishFileSave(this.folder, this.filename, this.description, this.share, com.Newgrounds.JSON.encode(this.contents), img); }; v2.can_write = false; v2.share = true; ASSetPropFlags(com.Newgrounds.NewgroundsAPISaveFile.prototype, null, 1); } #endinitclip } movieClip 1794 __Packages.com.Newgrounds.ImageScanner { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.ImageScanner) { var v1 = function (the_source) { if (the_source) { this.image_source = the_source; } else { this.image_source = _root; } this.reset(); if (typeof this.image_source == 'movieclip') { if (this.image_source == _root) { this.source_width = Stage.width; this.source_height = Stage.height; } else { this.source_width = Math.floor(this.image_source._width); this.source_height = Math.floor(this.image_source._height); } this.sourceBitmap = new flash.display.BitmapData(this.source_width, this.source_height, false, 4294967295.0); this.sourceBitmap.draw(_root); } else { if (this.image_source.width) { this.source_width = this.image_source.width; this.source_height = this.image_source.height; this.sourceBitmap = this.image_source; } else { this.error('You can only use BitMaptData and MovieClip objects to create images'); } } }; com.Newgrounds.ImageScanner = v1; var v2 = v1.prototype; v2.setCallback = function (target, funct) { if (target && funct) { this.callback_target = target; this.callback_function = funct; } }; v2.reset = function () { this.callback_target = null; this.callback_function = null; this.debug.bad_pixels = 0; this.hash = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&'; var v3 = Math.pow(this.hash.length, 2); trace('MAX COLORS: ' + v3); var v2 = Math.floor(Math.pow(v3, 0.3333333333333333)) - 1; var v4 = Math.pow(v2, 3); this.cube = v2; this.basen = new com.Newgrounds.BaseN(this.hash); this.xpos = 0; this.ypos = 0; this.pixels = 0; this.busy = false; }; v2.startScan = function (w, h, s) { if (w) { this.image_width = w; } if (h) { this.image_height = h; } if (s != undefined) { this.crop = s; } var v7 = _root.getNextHighestDepth(); var v6 = _root.createEmptyMovieClip('API_image_container_' + v7, v7); var v5 = v6.createEmptyMovieClip('canvas', 100); v5.attachBitmap(this.sourceBitmap, 100); if (this.crop) { if (this.image_width / this.source_width > this.image_height / this.source_height) { this.canvas_width = this.image_width; this.canvas_height = Math.ceil(this.source_height * (this.image_width / this.source_width)); } else { this.canvas_height = this.image_height; this.canvas_width = Math.ceil(this.source_width * (this.image_height / this.source_height)); } } else { this.canvas_width = this.image_width; this.canvas_height = this.image_height; } v5._x = Math.round((this.image_width - this.canvas_width) / 2); v5._width = this.canvas_width; v5._height = this.canvas_height; this.resizedBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); this.resizedBitmap.draw(v6); v6.removeMovieClip(); this.copyBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0); var v3 = '' + this.image_width; while (v3.length < 3) { v3 = '0' + v3; } var v4 = '' + this.image_height; while (v4.length < 3) { v4 = '0' + v4; } this.output = v3 + v4; this.draw_interval = setInterval(this, 'drawChunk', 10); this.busy = false; return this.resizedBitmap; }; v2.getBitmapData = function () { return this.copyBitmap; }; v2.getBytesTotal = function () { return this.image_width * this.image_height * 2; }; v2.getBytesScanned = function () { return this.pixels * 2; }; v2.drawChunk = function () { if (!this.busy) { this.busy = true; var v2 = 0; while (v2 < 250) { if (!this.nextPixel()) { clearInterval(this.draw_interval); this.callback_interval = setInterval(this, 'doCallback', 25); this.busy = true; break; } ++v2; } this.busy = false; } }; v2.doCallback = function () { this.busy = false; clearInterval(this.callback_interval); if (this.callback_target and this.callback_function) { this.callback_target[this.callback_function](this.output); } else { this.onScanComplete(this.output); } }; v2.onScanComplete = function (packet) { this.sendMessage('packet size: ' + this.output.length + ' bytes', 'onScanComplete'); }; v2.nextPixel = function () { var v15 = this.xpos; var v14 = this.ypos; var v7 = this.resizedBitmap.getPixel(v15, v14); var v17 = v7 >> 16 & 255; var v20 = v7 >> 8 & 255; var v16 = v7 >> 0 & 255; var v11 = Math.round(((v17 + 1) / 256) * this.cube); var v10 = Math.round(((v20 + 1) / 256) * this.cube); var v13 = Math.round(((v16 + 1) / 256) * this.cube); var v12 = v11 * (this.cube + 1) * (this.cube + 1) + v10 * (this.cube + 1) + v13; var v6 = this.basen.encode(v12, 2); this.output += v6; if (v6.length != 2) { trace('bad pixel ' + v6); } var v5 = this.basen.decode(v6); var v18 = v5; var v8 = v5 % (this.cube + 1); v5 = (v5 - v8) / (this.cube + 1); var v9 = v5 % (this.cube + 1); var v19 = (v5 - v9) / (this.cube + 1); if (v13 != v8 and v10 != v9 and v11 != v10) { ++this.debug.bad_pixels; trace('BAD PIXEL ' + this.debug.bad_pixels + ') ' + v12 + ' != ' + v18 + ' ' + v6); trace(this.basen.debug.lastencode); } var v2 = (Math.round((v19 / this.cube) * 255)).toString(16); var v4 = (Math.round((v9 / this.cube) * 255)).toString(16); var v3 = (Math.round((v8 / this.cube) * 255)).toString(16); while (v2.length < 2) { v2 = '0' + v2; } while (v4.length < 2) { v4 = '0' + v4; } while (v3.length < 2) { v3 = '0' + v3; } this.copyBitmap.setPixel(v15, v14, Number('0x' + v2 + v4 + v3)); ++this.pixels; if (this.pixels >= this.image_width * this.image_height) { return false; } ++this.xpos; if (this.xpos >= this.image_width) { this.xpos = 0; ++this.ypos; } return true; }; v2.error = function (e, f) { this.sendMessage(e, f, 'ERROR'); }; v2.sendMessage = function (msg, func, type) { var v1 = 'ImageScanner'; if (func) { v1 += '.' + func + '()'; } if (type) { v1 = type + ' in ' + v1; } v1 += ' :: ' + msg; trace(v1); }; v2.image_width = 100; v2.image_height = 100; v2.crop = true; v2.debug = new Object(); ASSetPropFlags(com.Newgrounds.ImageScanner.prototype, null, 1); } #endinitclip } movieClip 1795 __Packages.com.Newgrounds.JSON { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.JSON) { var v1 = function () {}; com.Newgrounds.JSON = v1; var v2 = v1.prototype; v1.encode = function (arg, noquotes) { var v3; var v2; var v6; var v1 = ''; var v4; if (arg.isSServerVar()) { var v8 = 'sservervariable'; } else { var v8 = typeof arg; } switch (v8) { return 'null'; case 'sservervariable': return '?' + arg.getEncodedValue(); break; case 'object': if (arg) { if (arg instanceof Array) { v2 = 0; while (v2 < arg.length) { v4 = com.Newgrounds.JSON.encode(arg[v2]); if (v1) { v1 += ','; } v1 += v4; ++v2; } return '[' + v1 + ']'; } else { if (typeof arg.toString != 'undefined') { for (v2 in arg) { v4 = arg[v2]; if (typeof v4 != 'undefined' && typeof v4 != 'function') { v4 = com.Newgrounds.JSON.encode(v4); if (v1) { v1 += ','; } v1 += com.Newgrounds.JSON.encode(v2) + ':' + v4; } } return '{' + v1 + '}'; } } } return 'null'; case 'number': return isFinite(arg) ? String(arg) : 'null'; case 'string': v6 = arg.length; if (noquotes) { var v7 = ''; } else { var v7 = '"'; } v1 = v7; v2 = 0; while (v2 < v6) { v3 = arg.charAt(v2); if (v3 >= ' ') { if (v3 == '\\' || v3 == '"') { v1 += '\\'; } v1 += v3; } else { switch (v3) { case '\b': v1 += '\\b'; break; case '\f': v1 += '\\f'; break; case '\n': v1 += '\\n'; break; case '\r': v1 += '\\r'; break; case '\t': v1 += '\\t'; break; default: v3 = v3.charCodeAt(); v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16); } } v2 += 1; } return v1 + v7; case 'boolean': return String(arg); default: return 'null'; } }; v1.decode = function (text) { var at = 0; var ch = ' '; var _value; var _error = function (m) { throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text}; }; var _next = function () { ch = text.charAt(at); at += 1; return ch; }; var _white = function () { while (ch) { if (ch <= ' ') { _next(); } else { if (ch == '/') { switch (_next()) { case '/': for (;;) { if (!(_next() && ch != '\n' && ch != '\r')) break; } break; case '*': _next(); for (;;) { if (ch) { if (ch == '*') { if (_next() == '/') { _next(); break; } } else { _next(); } continue; } _error('Unterminated comment'); } break; default: _error('Syntax error'); } } else { break; } } } }; var _string = function () { var v4; var v1 = ''; var v3; var v2; var v5 = false; if (ch == '"') { while (_next()) { if (ch == '"') { _next(); return v1; } else { if (ch == '\\') { switch (_next()) { case 'b': v1 += '\b'; break; case 'f': v1 += '\f'; break; case 'n': v1 += '\n'; break; case 'r': v1 += '\r'; break; case 't': v1 += '\t'; break; case 'u': v2 = 0; v4 = 0; while (v4 < 4) { v3 = parseInt(_next(), 16); if (!isFinite(v3)) { v5 = true; break; } v2 = v2 * 16 + v3; v4 += 1; } if (v5) { v5 = false; } else { v1 += String.fromCharCode(v2); break; default: v1 += ch; } } } else { v1 += ch; } } } } _error('Bad string'); }; var _array = function () { var v1 = []; if (ch == '[') { _next(); _white(); if (ch == ']') { _next(); return v1; } while (ch) { v1.push(_value()); _white(); if (ch == ']') { _next(); return v1; } else { if (ch != ',') { break; } } _next(); _white(); } } _error('Bad array'); }; var _object = function () { var v2; var v1 = {}; if (ch == '{') { _next(); _white(); if (ch == '}') { _next(); return v1; } while (ch) { v2 = _string(); _white(); if (ch != ':') { break; } _next(); v1[v2] = _value(); _white(); if (ch == '}') { _next(); return v1; } else { if (ch != ',') { break; } } _next(); _white(); } } _error('Bad object'); }; var _number = function () { var v1 = ''; var v2; if (ch == '-') { v1 = '-'; _next(); } for (;;) { if (!(ch >= '0' && ch <= '9')) break; v1 += ch; _next(); } if (ch == '.') { v1 += '.'; for (;;) { if (!(_next() && ch >= '0' && ch <= '9')) break; v1 += ch; } } v2 = 1 * v1; if (!isFinite(v2)) { _error('Bad number'); } else { return v2; } }; var _word = function () { switch (ch) { case 't': if (_next() == 'r' && _next() == 'u' && _next() == 'e') { _next(); return true; } break; case 'f': if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') { _next(); return false; } break; case 'n': if (_next() == 'u' && _next() == 'l' && _next() == 'l') { _next(); return null; } } _error('Syntax error'); }; _value = function () { _white(); switch (ch) { case '{': return _object(); case '[': return _array(); case '"': return _string(); case '-': return _number(); } return (ch >= '0' && ch <= '9') ? _number() : _word(); }; return _value(); }; ASSetPropFlags(com.Newgrounds.JSON.prototype, null, 1); } #endinitclip } movieClip 1796 __Packages.com.Newgrounds.MD5 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.MD5) { var v1 = function () {}; com.Newgrounds.MD5 = v1; var v2 = v1.prototype; v1.calculate = function (src) { return com.Newgrounds.MD5.hex_md5(src); }; v1.hex_md5 = function (src) { return com.Newgrounds.MD5.binl2hex(com.Newgrounds.MD5.core_md5(com.Newgrounds.MD5.str2binl(src), src.length * 8)); }; v1.core_md5 = function (x, len) { x[len >> 5] |= 128 << len % 32; x[(len + 64 >>> 9 << 4) + 14] = len; var v4 = 1732584193; var v3 = -271733879; var v2 = -1732584194; var v1 = 271733878; var v5 = 0; while (v5 < x.length) { var v10 = v4; var v9 = v3; var v8 = v2; var v7 = v1; v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162); v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682); v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101); v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290); v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501); v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467); v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784); v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473); v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189); v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487); v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835); v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520); v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649); v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070); v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379); v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259); v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551); v4 = com.Newgrounds.MD5.safe_add(v4, v10); v3 = com.Newgrounds.MD5.safe_add(v3, v9); v2 = com.Newgrounds.MD5.safe_add(v2, v8); v1 = com.Newgrounds.MD5.safe_add(v1, v7); v5 += 16; } return new Array(v4, v3, v2, v1); }; v1.md5_cmn = function (q, a, b, x, s, t) { return com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.bit_rol(com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.safe_add(a, q), com.Newgrounds.MD5.safe_add(x, t)), s), b); }; v1.md5_ff = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t); }; v1.md5_gg = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t); }; v1.md5_hh = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t); }; v1.md5_ii = function (a, b, c, d, x, s, t) { return com.Newgrounds.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t); }; v1.bit_rol = function (num, cnt) { return num << cnt | num >>> 32 - cnt; }; v1.safe_add = function (x, y) { var v1 = (x & 65535) + (y & 65535); var v2 = (x >> 16) + (y >> 16) + (v1 >> 16); return v2 << 16 | v1 & 65535; }; v1.str2binl = function (str) { var v3 = new Array(); var v4 = 255; var v1 = 0; while (v1 < str.length * 8) { v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32; v1 += 8; } return v3; }; v1.binl2hex = function (binarray) { var v4 = new String(''); var v3 = new String('0123456789abcdef'); var v1 = 0; while (v1 < binarray.length * 4) { v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15); ++v1; } return v4; }; ASSetPropFlags(com.Newgrounds.MD5.prototype, null, 1); } #endinitclip } movieClip 1797 __Packages.com.Newgrounds.RC4 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.Newgrounds) { _global.com.Newgrounds = new Object(); } if (!_global.com.Newgrounds.RC4) { var v1 = function () {}; com.Newgrounds.RC4 = v1; var v2 = v1.prototype; v1.encrypt = function (src, key) { var v3 = com.Newgrounds.RC4.strToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return com.Newgrounds.RC4.charsToHex(v2); }; v1.encryptbin = function (src, key) { var v3 = com.Newgrounds.RC4.strToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return v2; }; v1.decrypt = function (src, key) { var v3 = com.Newgrounds.RC4.hexToChars(src); var v1 = com.Newgrounds.RC4.strToChars(key); var v2 = com.Newgrounds.RC4.calculate(v3, v1); return com.Newgrounds.RC4.charsToStr(v2); }; v1.initialize = function (pwd) { var v2 = 0; var v3; var v4 = pwd.length; var v1 = 0; while (v1 <= 255) { com.Newgrounds.RC4.mykey[v1] = pwd[v1 % v4]; com.Newgrounds.RC4.sbox[v1] = v1; ++v1; } v1 = 0; while (v1 <= 255) { v2 = (v2 + com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.mykey[v1]) % 256; v3 = com.Newgrounds.RC4.sbox[v1]; com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2]; com.Newgrounds.RC4.sbox[v2] = v3; ++v1; } }; v1.calculate = function (plaintxt, psw) { com.Newgrounds.RC4.initialize(psw); var v1 = 0; var v2 = 0; var v9 = new Array(); var v7; var v5; var v6; var v3 = 0; while (v3 < plaintxt.length) { v1 = (v1 + 1) % 256; v2 = (v2 + com.Newgrounds.RC4.sbox[v1]) % 256; v5 = com.Newgrounds.RC4.sbox[v1]; com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2]; com.Newgrounds.RC4.sbox[v2] = v5; var v4 = (com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.sbox[v2]) % 256; v7 = com.Newgrounds.RC4.sbox[v4]; v6 = plaintxt[v3] ^ v7; v9.push(v6); ++v3; } return v9; }; v1.charsToHex = function (chars) { var v4 = new String(''); var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); var v1 = 0; while (v1 < chars.length) { v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15]; ++v1; } return v4; }; v1.hexToChars = function (hex) { var v3 = new Array(); var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0; while (v1 < hex.length) { v3.push(parseInt(hex.substr(v1, 2), 16)); v1 += 2; } return v3; }; v1.charsToStr = function (chars) { var v3 = new String(''); var v1 = 0; while (v1 < chars.length) { v3 += String.fromCharCode(chars[v1]); ++v1; } return v3; }; v1.strToChars = function (str) { var v3 = new Array(); var v1 = 0; while (v1 < str.length) { v3.push(str.charCodeAt(v1)); ++v1; } return v3; }; v1.sbox = new Array(255); v1.mykey = new Array(255); ASSetPropFlags(com.Newgrounds.RC4.prototype, null, 1); } #endinitclip } frame 2 { play(); } movieClip 145 { } movieClip 146 { } movieClip 148 { } movieClip 153 { } movieClip 196 { } movieClip 198 { } // unknown tag 88 length 75 button 201 { on (release) { gotoAndStop('login'); } } button 203 { on (release) { getURL('http://nicholas-deary.newgrounds.com/flash', '_blank'); } } frame 99 { stop(); } movieClip 206 { } movieClip 208 { } movieClip 210 { } movieClip 212 { } movieClip 214 { } movieClip 216 { } movieClip 217 { } movieClip 218 { } movieClip 219 { frame 151 { _root.nextFrame(); } } instance of movieClip 219 { onClipEvent (release) { getURL('http://coolio-niato.newgrounds.com/', _blank); } } frame 100 { function switchMusic(track) { if (track == 'X') { vol = 0; music.setVolume(vol); track_name.text = ''; } else { vol = 100; music.setVolume(vol); music.stop(); music.attachSound(tracks[track - 1][0]); music.start(0, 999); track_name.text = tracks[track - 1][1]; currTrackNum = track; } } function unlockAch(num) { if (!achs[num][0]) { achs[num][0] = 1; savefile.data['ach' + num] = 1; achsQueue.push(num); if (achsQueue.length == 1) { attachMovie('achPopUp', 'achPopUp', getNextHighestDepth(), {'_x': 375, '_y': 500, 'Text': achs[num][1], 'gs': achs[num][3]}); } } } function listUsers() { var v3 = 1; while (v3 <= 5) { var v4 = SharedObject.getLocal('NGP3USER' + v3); if (v4.data.userName != undefined) { _root['user' + v3].user.text = v4.data.userName; _root['user' + v3].userName = v4.data.userName; _root['user' + v3].level = v4.data.level; _root['user' + v3].slot = v3; _root['user' + v3].onRollOver = function () { if (loadUser != this._name) { this.gotoAndStop(2); this.onRollOut = function () { this.gotoAndStop(1); }; this.onDragOut = this.onRollOut; } }; _root['user' + v3].onRelease = function () { _root[loadUser].gotoAndStop(1); lvl = this.level; userName = this.userName; loadUser = this._name; _root.savefile = SharedObject.getLocal('NGP3USER' + this.slot); jack_in1._visible = true; jack_in1.enabled = jack_in1._visible; this.gotoAndStop(2); delete this.onRollOut; }; } else { nextUserNum = v3; break; } ++v3; } } function createUser(userName) { if (userName != '') { var v2 = SharedObject.getLocal('NGP3USER' + nextUserNum); v2.data.userName = userName; v2.data.level = 1; v2.flush(); _root.userName = userName; _root.lvl = 1; _root.savefile = SharedObject.getLocal('NGP3USER' + nextUserNum); play(); } } function answer(pass, level) { if (pass.toLowerCase() == passwords[level - 1]) { trace('correct'); ++lvl; newLVL(lvl); ++savefile.data.level; savefile.flush(); } else { trace('wrong'); } } function newLVL(lvl) { level.text = 'Level ' + lvl; pass.text = ''; } stop(); Stage.showMenu = false; var lvl = 1; var tracks = [['music1', 'Track Name and Artist'], ['music2', 'Track Name and Artist 2'], ['music3', 'Track Name and Artist 3'], ['music4', 'Track Name and Artist 4']]; var vol = 100; var currTrackNum = 1; var music = new Sound(this); music.attachSound(tracks[0][0]); music.start(0, 999); var achs = [[0, 'Create A Profile', 'Sorry, you\'re on your own on this one..', 10], [0, 'Complete Level 5', 'HiNt HaER', 1]]; var achsQueue = new Array(); var passwords = new Array(); var i = 1; while (i < 30) { passwords.push('pass' + i); ++i; } var userName; var nextUserNum = 0; var loadUser; jack_in1.onRelease = function () { for (var v1 in achs) { if (savefile.data['ach' + v1] == 1) { achs[v1][0] = 1; } } play(); }; jack_in1._visible = false; jack_in1.enabled = jack_in1._visible; jack_in2.onRelease = function () { if (nextUserNum != 0) { createUser(new_user.text); } else { trace('All slots are taken'); } }; listUsers(); } movieClip 222 { } movieClip 225 { } movieClip 237 { frame 1 { stop(); } } movieClip 244 { } button 246 { on (release) { gotoAndStop(2); } } button 251 { on (release) { i = 1; while (i < 6) { var savefile = SharedObject.getLocal('NGP3USER' + i); savefile.data.userName = undefined; savefile.data.achiArray = undefined; savefile.data.xp = undefined; ++i; } _root.gotoAndPlay('redirect'); } } button 252 { on (release) { gotoAndStop(1); } } movieClip 253 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 256 { } button 258 { on (release) { gotoAndStop(2); } } // unknown tag 88 length 4 button 264 { on (release) { gotoAndStop(1); } } movieClip 265 { frame 1 { stop(); } } movieClip 268 { } movieClip 269 { } movieClip 270 { } // unknown tag 88 length 66 frame 101 { gotoAndStop('menu'); } movieClip 274 { } frame 152 { gotoAndStop('login'); } frame 153 { stop(); } frame 153 { onEnterFrame = function () { i = 0; while (i < achiNums) { if (achiArray[i]) { _root.achievement.achs.achs['pic' + (i + 1)].gotoAndStop(i + 2); } ++i; } }; } frame 153 { function getAchi(num) { if (!_root.achiArray[num - 1]) { _root.achiArray[num - 1] = true; _root.popup.gotoAndPlay(2); _root.popup.ach.pic.gotoAndStop(num + 1); _root.medal_popup.unlockMedal(_root.achievements[num - 1]); } } function eraseAchi() { i = 0; while (i < achiNums) { achiArray[i] = false; ++i; } savefile.data.achiArray = achiArray; } score = 0; achiArray = new Array(); achievements = new Array('Private', 'Sergeant', 'Major', 'Colonel', 'General', 'True minesweeper', 'Wrong turn', 'Scout', 'Observer', 'Committed', 'Too much free time!', 'Insane', 'The secret ammo box', 'Weebl\'s secret island', 'Eagle Eyes', 'Click, click, click...', 'Takeover', 'Revive'); achiNums = 18; if (savefile.data.achiArray == undefined) { i = 0; while (i < achiNums) { achiArray[i] = false; ++i; } savefile.data.achiArray = achiArray; } else { achiArray = savefile.data.achiArray; } } movieClip 277 { } movieClip 281 { } button 282 { on (release) { gotoAndStop(2); } } movieClip 284 { } button 286 { on (release) { gotoAndStop(1); } } movieClip 287 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 290 { } button 292 { on (release) { savefile.data.score = 1; _root.score = 1; gotoAndStop(157); } } button 294 { on (press) { if (savefile.data.score == undefined) { _root.score = 1; savefile.data.score = _root.score; trace(_root.score); gotoAndStop(_root.score + 4); } else { trace(_root.score + 5 + ' 1'); _root.score = savefile.data.score; gotoAndStop(_root.score + 4); } } } movieClip 297 { } button 299 { on (release) { gotoAndStop('options'); } } movieClip 303 { } button 304 { on (release) { gotoAndStop('credits'); } } movieClip 308 { } button 309 { on (release) { gotoAndStop('links'); } } movieClip 313 { } movieClip 314 { } button 316 { on (release) { gotoAndStop('login'); } } movieClip 320 { } button 322 { on (release) { gotoAndPlay(2); } } movieClip 375 { frame 1 { stop(); } } movieClip 394 { } button 396 { on (keyPress '<Down>') { nextFrame(); } } button 397 { on (keyPress '<Up>') { prevFrame(); } } movieClip 398 { frame 1 { stop(); } } button 399 { on (keyPress '<Space>') { gotoAndPlay(2); } } movieClip 401 { } movieClip 412 { frame 1 { onEnterFrame = function () { time = new Date(); var v2 = time.getSeconds(); var v3 = time.getMinutes(); var v1 = time.getHours(); if (v1 < 12) { ampm = 'AM'; } else { ampm = 'PM'; } while (v1 > 12) { v1 -= 12; } if (v1 < 10) { v1 = '0' + v1; } if (v3 < 10) { v3 = '0' + v3; } if (v2 < 10) { v2 = '0' + v2; } clock_txt.text = v1 + ':' + v3 + ':' + v2 + ' ' + ampm; }; } } button 415 { on (keyPress '<Space>') { gotoAndPlay(14); } } movieClip 416 { frame 1 { stop(); } frame 2 { blank.useHandCursor = false; blank.onRollOver = function () {}; } frame 13 { stop(); profile_name.text = _root.userName; } frame 14 { _root.hintWin.removeMovieClip(); } } movieClip 420 { } movieClip 422 { } movieClip 424 { } movieClip 425 { frame 1 { stop(); } frame 110 { stop(); } } button 426 { on (release) { if (!_root.test or _root.test.length < 1) { _root.test = new Array(); tmp = com.Newgrounds.NewgroundsAPI.getMedals(); for (i in tmp) { _root.test[i] = tmp[i]; } } m = _root.test.pop(); trace('_root.medal_popup.unlockMedal("' + m.medal_name + '");'); _root.medal_popup.unlockMedal(m.medal_name); } } frame 154 { stop(); } movieClip 432 { } button 433 { on (release) { gotoAndStop('main menu'); } } movieClip 437 { } button 438 { on (release) { _quality = 'high'; } } button 440 { on (release) { _quality = 'medium'; } } button 442 { on (release) { _quality = 'low'; } } movieClip 447 { } button 449 { on (release) { gotoAndStop(2); } } movieClip 451 { } movieClip 454 { } button 456 { on (release) { if (superpass eq 'q5v48e') { nextFrame(); } else { gotoAndStop(2); } } } button 462 { on (release) { gotoAndStop(1); } } movieClip 465 { } movieClip 478 { } movieClip 480 { } movieClip 482 { } movieClip 484 { } movieClip 486 { } movieClip 489 { } movieClip 490 { frame 1 { } frame 1 { stop(); } frame 3 { play(); } frame 3 { stopAllSounds(); } } button 491 { on (keyPress '<Space>') { gotoAndPlay(2); } } button 493 { on (keyPress '<Space>') { gotoAndPlay(2); } } button 494 { on (keyPress '<Space>') { gotoAndPlay(14); } } movieClip 495 { frame 1 { stop(); } frame 2 { blank.useHandCursor = false; blank.onRollOver = function () {}; } frame 13 { stop(); profile_name.text = _root.userName; } frame 14 { _root.hintWin.removeMovieClip(); } } frame 155 { stop(); } frame 156 { stop(); } button 502 { on (release) { getURL('http://www.newgrounds.com/portal/view/409841', '_blank'); } } button 506 { on (release) { getURL('http://www.newgrounds.com/portal/view/426939', '_blank'); } } button 510 { on (release) { getURL('http://www.newgrounds.com/game/puzzles.html', '_blank'); } } movieClip 511 { frame 1 { stop(); } } frame 157 { stop(); newLVL(lvl); Selection.setFocus(pass); track_name.text = tracks[currTrackNum - 1][1]; jack_in.onRelease = function () { answer(pass.text, level); }; var kList = new Object(); kList.onKeyDown = function () { var v1 = Key.getCode(); if (v1 == 13) { answer(pass.text, lvl); } }; Key.addListener(kList); } frame 157 { savefile.data.score = 1; } button 513 { on (keyPress '<Tab>') { gotoAndStop(192); } } button 518 { on (rollOver) { gotoAndStop(2); } } button 519 { on (rollOver) { gotoAndStop(1); } } button 521 { on (rollOut) { gotoAndStop(1); } } button 523 { on (rollOver) { gotoAndStop(3); } } movieClip 526 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } button 529 { on (release) { if (pass eq 'operator') { nextFrame(); pass.text = ''; } else { gotoAndStop(157); } } } button 535 { on (release) { gotoAndStop(1); } } button 537 { on (release) { gotoAndStop(2); } } button 539 { on (release) { gotoAndStop(3); } } button 541 { on (release) { gotoAndStop(4); } } button 543 { on (release) { gotoAndStop(9); } } button 545 { on (release) { gotoAndStop(5); } } button 547 { on (release) { gotoAndStop(6); } } button 549 { on (release) { gotoAndStop(7); } } movieClip 551 { } movieClip 553 { } movieClip 555 { } movieClip 557 { } movieClip 559 { } movieClip 561 { } movieClip 563 { } movieClip 565 { frame 1 { stop(); } } movieClip 571 { } button 574 { on (release) { gotoAndStop(153); } } movieClip 578 { } movieClip 581 { } movieClip 584 { } movieClip 587 { } movieClip 590 { } button 592 { on (release) { gotoAndStop(2); } } movieClip 593 { } button 598 { on (release) { gotoAndStop(1); } } movieClip 601 { frame 1 { stop(); } frame 2 { stop(); bg.onRollOver = function () {}; bg.useHandCursor = false; } } button 603 { on (release) { gotoAndStop(2); } } button 608 { on (release) { gotoAndStop(3); } } movieClip 612 { frame 1 { stop(); } frame 3 { stop(); } } frame 158 { savefile.data.score = 2; } button 614 { on (release) { gotoAndPlay(2); } } movieClip 620 { } // unknown tag 88 length 61 movieClip 623 { } movieClip 625 { } movieClip 627 { } movieClip 629 { } movieClip 631 { } button 634 { on (keyPress '<Up>') { gotoAndPlay(159); } } movieClip 636 { } button 638 { on (keyPress '<Left>') { gotoAndPlay(188); } } movieClip 640 { } button 642 { on (keyPress '<Right>') { gotoAndPlay(217); } } movieClip 644 { } button 646 { on (keyPress '<Down>') { gotoAndPlay(248); } } button 647 { on (keyPress '<Right>') { gotoAndPlay(277); } } button 648 { on (keyPress '<Left>') { gotoAndPlay(306); } } button 649 { on (keyPress '<Up>') { gotoAndPlay(338); } } button 650 { on (keyPress '<Down>') { gotoAndPlay(369); } } button 651 { on (keyPress '<Right>') { gotoAndPlay(398); } } button 652 { on (keyPress '<Left>') { gotoAndPlay(427); } } button 653 { on (keyPress '<Up>') { gotoAndPlay(459); } } movieClip 655 { } button 669 { on (release) { gotoAndPlay(2); } } movieClip 670 { frame 1 { stop(); } frame 158 { gotoAndStop(468); } frame 187 { gotoAndStop(468); } frame 216 { gotoAndStop(468); } frame 247 { gotoAndStop(468); } frame 276 { gotoAndStop(468); } frame 305 { gotoAndStop(468); } frame 337 { gotoAndStop(468); } frame 366 { gotoAndStop(468); } frame 395 { gotoAndStop(468); } frame 426 { gotoAndStop(468); } frame 458 { gotoAndStop(468); } frame 467 { stop(); } } button 673 { on (release) { if (pass2 eq 'script') { nextFrame(); pass2.text = ''; } else { gotoAndStop(158); } } } frame 159 { savefile.data.score = 3; } movieClip 681 { } movieClip 683 { } movieClip 685 { } movieClip 690 { } movieClip 693 { } button 695 { on (release) { gotoAndStop(32); } } button 698 { on (release) { gotoAndPlay(33); } } movieClip 703 { } button 705 { on (keyPress '<Enter>') { gotoAndPlay(58); } } movieClip 707 { } movieClip 709 { frame 31 { gotoAndPlay(1); } frame 57 { gotoAndPlay(33); } frame 79 { stop(); } } button 712 { on (release) { if (pass3 eq 'patch') { nextFrame(); pass3.text = ''; } else { gotoAndStop(159); } } } frame 160 { savefile.data.score = 4; } movieClip 718 { } movieClip 721 { } movieClip 722 { } movieClip 724 { } movieClip 725 { } movieClip 732 { } movieClip 735 { } movieClip 738 { } movieClip 740 { } movieClip 747 { } movieClip 748 { } movieClip 756 { } movieClip 759 { } movieClip 760 { } movieClip 761 { frame 1 { gotoAndPlay(8); } frame 17 { gotoAndPlay(11); } } movieClip 762 { frame 1 { stop(); } } movieClip 763 { } movieClip 764 { frame 1 { function correctPos(char) { while (!false) { stand = false; x = 1; while (x < char._width) { if (this.ground.hitTest(char._x + x + this._x, char._y - 1 + this._y, true)) { stand = true; break; } ++x; } if (!stand) { break; } --char._y; } while (!false) { stand = false; x = 1; while (x < char._width - 1) { if (this.ground.hitTest(char._x + x + this._x, char._y - char._height + this._y, true)) { stand = true; break; } ++x; } if (!stand) { break; } ++char._y; yspd = 0; char.char.gotoAndStop(1); } while (!false) { stand = false; x = 1; while (x < char._height) { if (this.ground.hitTest(char._x + this._x, char._y - x + this._y, true)) { stand = true; break; } ++x; } if (!stand) { break; } ++char._x; } while (!false) { stand = false; x = 1; while (x < char._height) { if (this.ground.hitTest(char._x + char._width + this._x, char._y - x + this._y, true)) { stand = true; break; } ++x; } if (!stand) { break; } --char._x; } } yspd = 0; xspd = 5; grav = 3; stand = false; starty = -25; wait = 0; ymin = char._height / 3; standing = false; startScale = char.char._xscale; letters.gotoAndStop(1); i = 1; while (i < 7) { this['ammo' + i].visible = true; ++i; } startxpos = char._x; startypos = char._y; onEnterFrame = function () { standing = false; x = 1; while (x < char._width) { if (this.ground.hitTest(char._x + x + this._x, char._y + 1 + this._y, true)) { standing = true; break; } ++x; } correctPos(char); if (standing) { ymin = char._height / 3; } else { ymin = 1; } if (Key.isDown(37)) { if (char.char._currentframe == 1) { char.char.gotoAndStop(2); } char.char._xscale = -startScale; x = 0; while (x >= -xspd) { stand = false; y = ymin; while (y < char._height) { if (this.ground.hitTest(char._x - 1 + this._x, char._y - y + this._y, true)) { stand = true; break; } ++y; } if (stand) { break; } --char._x; --x; } } if (Key.isDown(39)) { if (char.char._currentframe == 1) { char.char.gotoAndStop(2); } char.char._xscale = startScale; x = 0; while (x <= xspd) { stand = false; y = ymin; while (y < char._height) { if (this.ground.hitTest(char._x + char._width + 1 + this._x, char._y - y + this._y, true)) { stand = true; break; } ++y; } if (stand) { break; } ++char._x; ++x; } } if (!Key.isDown(37) && !Key.isDown(39)) { if (char.char._currentframe == 2) { char.char.gotoAndStop(1); } } if (yspd >= 0) { yspd += grav; y = 0; while (y <= yspd) { stand = false; x = 1; while (x < char._width) { if (this.ground.hitTest(char._x + x + this._x, char._y + 1 + this._y, true)) { stand = true; break; } ++x; } if (stand) { if (char.char._currentframe > 2) { char.char.gotoAndStop(1); } break; } ++char._y; ++y; } } else { yspd += grav; y = 0; while (y >= yspd) { stand = false; x = 1; while (x < char._width) { if (this.ground.hitTest(char._x + x + this._x, char._y - char._height - 1 + this._y, true)) { stand = true; break; } ++x; } if (stand) { yspd = 0; break; } --char._y; --y; } } if (stand) { yspd = 3; } x = 1; while (x < char._width) { if (this.ground.hitTest(char._x + x + this._x, char._y + 1 + this._y, true)) { standing = true; break; } ++x; } if (Key.isDown(38)) { if (standing && yspd >= 0) { yspd = starty; char.char.gotoAndStop(3); } } correctPos(char); this._x = (char._x - Stage.width / 2) * -1; this._y = (char._y - (Stage.height / 4) * 3) * -1; back._x = this._x * -1; back._y = this._y * -1; letters._x = this._x * -1; letters._y = this._y * -1 + 100; i = 1; while (i < 7) { if (this['ammo' + i].hitTest(char)) { if (this['ammo' + i]._visible) { if (i < 6) { this['ammo' + i]._visible = false; letters.nextFrame(); } else { this['ammo' + i]._visible = false; _root.getAchi(13); } } } ++i; } if (char.hitTest(base)) { char._x = startxpos; char._y = startypos; } }; } } instance of movieClip 764 { } button 769 { on (release) { if (pass4 eq 'roses') { nextFrame(); pass4.text = ''; } else { gotoAndStop(160); } } } movieClip 772 { } movieClip 777 { } movieClip 780 { } movieClip 782 { } frame 161 { savefile.data.score = 5; } movieClip 787 { } movieClip 790 { } button 792 { on (release) { nextFrame(); } } button 793 { on (release) { gotoAndStop(5); } } movieClip 798 { } movieClip 801 { } button 802 { on (release) { gotoAndStop(5); } } button 803 { on (release) { nextFrame(); } } movieClip 807 { } movieClip 810 { } button 813 { on (release) { gotoAndStop(1); } } movieClip 815 { frame 1 { stop(); } } button 818 { on (release) { if (pass5 eq 'properties') { nextFrame(); pass5.text = ''; } else { gotoAndStop(161); } } } movieClip 820 { frame 16 { stop(); } } movieClip 825 { frame 37 { stop(); } } frame 162 { _root.getAchi(1); } frame 162 { c1.stop(); c2.stop(); c3.stop(); num = Math.ceil(Math.random() * 3); started = false; count = 1; moving = false; wait = 0; picked = 0; tries = 0; letters._visible = false; onEnterFrame = function () { if (!started) { if (_root['c' + num]._currentframe == 1) { _root['c' + num].gotoAndPlay(2); } } else { if (count < 20) { if (moving == false) { type = Math.random(); a = Math.ceil(Math.random() * 3); while (!false) { b = Math.ceil(Math.random() * 3); if (a != b) { break; } } if (a > b) { numR = b; b = a; a = numR; } if (a == num) { num = b; } else { if (b == num) { num = a; } } if (a == 1 && b == 2) { c1._visible = false; c2._visible = false; if (type < 0.5) { switcher.gotoAndStop(2); } else { switcher.gotoAndStop(3); } } else { if (a == 2 && b == 3) { c2._visible = false; c3._visible = false; if (type < 0.5) { switcher.gotoAndStop(4); } else { switcher.gotoAndStop(5); } } else { if (a == 1 && b == 3) { c1._visible = false; c3._visible = false; if (type < 0.5) { switcher.gotoAndStop(6); } else { switcher.gotoAndStop(7); } } } } moving = true; wait = 0; } ++wait; if (wait == 8) { ++count; c1._visible = true; c2._visible = true; c3._visible = true; moving = false; } } else { if (picked == 0) { switcher.gotoAndStop(1); _root['c' + num].ball.gotoAndStop(1); if (num != 1) { _root.c1.ball.gotoAndStop(2); } if (num != 2) { _root.c2.ball.gotoAndStop(2); } if (num != 3) { _root.c3.ball.gotoAndStop(2); } c1._visible = true; c2._visible = true; c3._visible = true; moving = false; if (clicker) { if (c1.hitTest(_root._xmouse, _root._ymouse, true)) { c1.play(); picked = 1; } else { if (c2.hitTest(_root._xmouse, _root._ymouse, true)) { c2.play(); picked = 2; } else { if (c3.hitTest(_root._xmouse, _root._ymouse, true)) { c3.play(); picked = 3; } } } } } else { ++tries; if (picked == num) { if (tries == 1) { _root.getAchi(15); } if (_root['c' + picked]._currentframe == 1) { letters._visible = true; if (c1._currentframe == 1) { c1.play(); } if (c2._currentframe == 1) { c2.play(); } if (c3._currentframe == 1) { c3.play(); } } } else { if (_root['c' + picked]._currentframe == 1) { letters._visible = false; count = 1; started = false; picked = 0; } } } } } i = 0; while (i < achiNums) { if (achiArray[i]) { _root.achievement.achs.achs['pic' + (i + 1)].gotoAndStop(i + 2); } ++i; } }; onMouseDown = function () { clicker = true; }; onMouseUp = function () { clicker = false; }; } frame 162 { savefile.data.score = 6; } movieClip 827 { frame 1 { stop(); } } movieClip 830 { } movieClip 831 { frame 1 { stop(); } frame 40 { _root.started = true; } } movieClip 832 { } movieClip 833 { } movieClip 834 { frame 1 { stop(); } } movieClip 836 { } button 839 { on (release) { if (pass6 eq 'lantern') { nextFrame(); pass6.text = ''; } else { gotoAndStop(162); } } } frame 163 { onEnterFrame = function () { i = 0; while (i < achiNums) { if (achiArray[i]) { _root.achievement.achs.achs['pic' + (i + 1)].gotoAndStop(i + 2); } ++i; } }; } frame 163 { savefile.data.score = 7; } movieClip 846 { } movieClip 848 { } button 849 { on (release) { nextFrame(); } } movieClip 851 { } button 852 { on (release) { gotoAndStop(1); } } movieClip 854 { } button 855 { on (release) { gotoAndStop(1); } } movieClip 857 { } button 858 { on (release) { gotoAndStop(1); } } movieClip 860 { } button 861 { on (release) { gotoAndStop(1); } } button 862 { on (release) { nextFrame(); } } button 863 { on (release) { nextFrame(); } } button 864 { on (release) { nextFrame(); } } button 865 { on (release) { nextFrame(); } } movieClip 867 { frame 1 { stop(); } } movieClip 868 { } button 871 { on (release) { if (pass7 eq 'faint') { nextFrame(); pass7.text = ''; } else { gotoAndStop(163); } } } frame 164 { savefile.data.score = 8; } movieClip 880 { } movieClip 882 { } button 885 { on (release) { if (pass8 eq 'autopsy') { nextFrame(); pass8.text = ''; } else { gotoAndStop(164); } } } frame 165 { savefile.data.score = 9; } movieClip 891 { } // unknown tag 88 length 41 button 894 { on (release) { gotoAndStop(2); } } button 917 { on (release) { stopAllSounds(); } } movieClip 918 { frame 1 { stop(); } frame 2 { stop(); } } button 921 { on (release) { if (pass9 eq 'aidem') { nextFrame(); pass9.text = ''; } else { gotoAndStop(165); } } } frame 166 { savefile.data.score = 10; } button 928 { on (rollOver) { gotoAndPlay(2); } } button 931 { on (rollOut) { gotoAndPlay(1); } } movieClip 933 { frame 1 { stop(); } frame 18 { stop(); } } button 936 { on (rollOver) { gotoAndPlay(2); } } button 938 { on (rollOut) { gotoAndStop(1); } } button 939 { on (rollOut) { gotoAndStop(1); } } movieClip 941 { frame 1 { stop(); } frame 18 { stop(); } } button 944 { on (rollOver) { gotoAndPlay(2); } } button 946 { on (rollOut) { gotoAndStop(1); } } movieClip 948 { frame 1 { stop(); } frame 18 { stop(); } } button 951 { on (rollOver) { gotoAndPlay(2); } } button 953 { on (rollOut) { gotoAndStop(1); } } movieClip 955 { frame 1 { stop(); } frame 18 { stop(); } } button 958 { on (release) { if (pass10 eq 'lovely') { nextFrame(); pass10.text = ''; } else { gotoAndStop(166); } } } frame 167 { _root.getAchi(2); } frame 167 { savefile.data.score = 11; } button 1004 { on (release) { if (pass11 eq 'log') { nextFrame(); pass11.text = ''; } else { gotoAndStop(167); } } } frame 168 { savefile.data.score = 12; } button 1010 { on (keyPress '<Right>') { gotoAndPlay(2); } } button 1011 { on (keyPress '<Right>') { gotoAndPlay(52); } } button 1013 { on (keyPress '<Right>') { gotoAndPlay(86); } } button 1015 { on (keyPress '<Right>') { gotoAndPlay(120); } } button 1017 { on (keyPress '<Right>') { gotoAndPlay(155); } } button 1019 { on (keyPress '<Right>') { gotoAndPlay(178); } } movieClip 1023 { } movieClip 1025 { frame 1 { stop(); } frame 51 { gotoAndPlay(2); } frame 85 { gotoAndStop(1); } frame 119 { gotoAndStop(1); } frame 154 { gotoAndStop(1); } frame 177 { stop(); } frame 185 { gotoAndStop(1); } } movieClip 1027 { } button 1031 { on (release) { if (pass12 eq 'benny') { nextFrame(); pass12.text = ''; } else { gotoAndStop(168); } } } frame 169 { savefile.data.score = 13; } button 1039 { on (release) { _root.getAchi(14); } } movieClip 1051 { } instance of movieClip 1051 { onClipEvent (load) { var fight = false; } onClipEvent (enterFrame) { if (Key.isDown(39)) { _x = _x - 8; } if (Key.isDown(37)) { _x = _x + 8; } if (Key.isDown(38)) { _y = _y + 8; } if (Key.isDown(40)) { _y = _y - 8; } } } movieClip 1053 { } movieClip 1055 { } movieClip 1057 { } movieClip 1058 { } movieClip 1061 { } movieClip 1062 { } instance of movieClip 1062 { onClipEvent (load) { var fight = false; } onClipEvent (enterFrame) { if (Key.isDown(39)) { _x = _x - 0; _xscale = 100; } if (Key.isDown(37)) { _x = _x + 0; _xscale = -100; } if (Key.isDown(38)) { _y = _y + 0; } if (Key.isDown(40)) { _y = _y - 0; } } } button 1066 { on (release) { if (pass13 eq 'before') { nextFrame(); pass13.text = ''; } else { gotoAndStop(169); } } } frame 170 { savefile.data.score = 14; } movieClip 1076 { } movieClip 1080 { } movieClip 1081 { frame 1 { stop(); } } movieClip 1082 { } movieClip 1085 { frame 1 { stop(); } } movieClip 1088 { frame 1 { stop(); } } movieClip 1091 { frame 1 { stop(); } } movieClip 1094 { frame 1 { stop(); } } movieClip 1097 { frame 1 { function levelUp() { ++level; endisable(); gameArray.push(btnArray[random(btnArray.length)]); currBtnNo = -1; trace(gameArray); onEnterFrame = function () { ++intCount; if (intCount >= interval) { intCount = 0; currBtn.gotoAndStop(1); ++currBtnNo; if (currBtnNo < gameArray.length) { currBtn = this[gameArray[currBtnNo]]; currBtn.gotoAndStop(2); } else { endisable(); delete onEnterFrame; } } }; } function init() { for (var v3 in btnArray) { var v2 = this[btnArray[v3]]; v2.onDragOver = function () { this.gotoAndStop(2); }; v2.onRollOver = v2.onDragOver; v2.onDragOut = function () { this.gotoAndStop(1); }; v2.onRollOut = v2.onDragOut; v2.onRelease = function () { if (this._name == gameArray[nextBtn]) { trace('correct'); ++nextBtn; if (nextBtn >= gameArray.length) { if (level >= levels) { win(); } else { this.gotoAndStop(1); levelUp(); nextBtn = 0; } } } else { lose(); } }; } } function endisable() { for (var v3 in btnArray) { var v2 = this[btnArray[v3]]; v2.enabled = !v2.enabled; } } function win() { gotoAndStop(2); } function lose() { gotoAndPlay(3); } stop(); var levels = 5; var level = 0; var interval = 45; var intCount = 0; var currBtnNo = -1; var currBtn; var nextBtn = 0; var btnArray = new Array('b1', 'b2', 'b3', 'b4', 'b5'); var gameArray = new Array(); levelUp(); init(); } } button 1101 { on (release) { if (pass14 eq 'lolcake') { nextFrame(); pass14.text = ''; } else { gotoAndStop(170); } } } frame 171 { savefile.data.score = 15; } button 1114 { on (release) { if (pass15 eq 'knee') { nextFrame(); pass15.text = ''; } else { gotoAndStop(171); } } } frame 172 { _root.getAchi(3); } frame 172 { savefile.data.score = 16; } movieClip 1121 { } movieClip 1122 { } button 1123 { on (release) { _root.getAchi(7); } } movieClip 1124 { } movieClip 1125 { } movieClip 1126 { } movieClip 1128 { } movieClip 1129 { frame 21 { stop(); } } button 1130 { on (rollOver) { nextFrame(); } } button 1154 { on (rollOver) { nextFrame(); } } movieClip 1156 { frame 1 { stop(); } } movieClip 1158 { } movieClip 1159 { } instance of movieClip 1159 { onClipEvent (load) { var fight = false; } onClipEvent (enterFrame) { if (Key.isDown(39)) { _x = _x - 11; } if (Key.isDown(37)) { _x = _x + 11; } if (Key.isDown(38)) { _y = _y + 0; } if (Key.isDown(40)) { _y = _y - 0; } } } button 1163 { on (release) { if (pass16 eq 'workspace') { nextFrame(); pass16.text = ''; } else { gotoAndStop(172); } } } frame 173 { _root.getAchi(2); } frame 173 { savefile.data.score = 17; } button 1169 { on (keyPress '<Right>') { nextFrame(); } } button 1170 { on (keyPress '<Left>') { prevFrame(); } } movieClip 1171 { } movieClip 1184 { } movieClip 1186 { } movieClip 1188 { frame 1 { stop(); } } button 1191 { on (release) { if (pass17 eq 'free') { nextFrame(); pass17.text = ''; } else { gotoAndStop(173); } } } frame 174 { savefile.data.score = 18; } movieClip 1199 { } movieClip 1201 { } button 1203 { on (release) { gotoAndPlay(2); } } movieClip 1209 { } movieClip 1211 { frame 1 { stop(); } frame 146 { stop(); } } button 1214 { on (release) { if (pass18 eq 'slam') { nextFrame(); pass18.text = ''; } else { gotoAndStop(174); } } } frame 175 { savefile.data.score = 19; } movieClip 1222 { } button 1223 { on (press) { gotoAndStop(10); } } movieClip 1229 { frame 9 { gotoAndPlay(1); } frame 10 { stop(); } } button 1232 { on (release) { if (pass19 eq 'flat') { nextFrame(); pass19.text = ''; } else { gotoAndStop(175); } } } frame 176 { savefile.data.score = 20; } // unknown tag 88 length 68 button 1241 { on (release) { gotoAndStop(188); } } button 1244 { on (release) { if (pass20 eq 'mouse') { nextFrame(); pass20.text = ''; } else { gotoAndStop(176); } } } frame 177 { _root.getAchi(4); } frame 177 { savefile.data.score = 21; } button 1251 { on (release) { gotoAndPlay(2); } } movieClip 1263 { frame 1 { stop(); } frame 11 { stop(); } } button 1265 { on (release) { gotoAndPlay(2); } } movieClip 1275 { frame 1 { stop(); } frame 10 { stop(); } } button 1277 { on (release) { gotoAndPlay(2); } } movieClip 1288 { frame 1 { stop(); } frame 11 { stop(); } } button 1290 { on (release) { gotoAndPlay(2); } } movieClip 1302 { frame 1 { stop(); } frame 12 { stop(); } } movieClip 1305 { } button 1308 { on (release) { if (pass21 eq 'circle') { nextFrame(); pass21.text = ''; } else { gotoAndStop(177); } } } frame 178 { savefile.data.score = 22; } movieClip 1315 { } button 1317 { on (release) { gotoAndStop(189); } } movieClip 1320 { } movieClip 1323 { } button 1324 { on (rollOver) { nextFrame(); } } movieClip 1335 { frame 1 { stop(); } } button 1338 { on (release) { if (pass22 eq 'logic') { nextFrame(); pass22.text = ''; } else { gotoAndStop(178); } } } frame 179 { savefile.data.score = 23; } button 1346 { on (release) { if (pass23 eq 'ground') { nextFrame(); pass23.text = ''; } else { gotoAndStop(179); } } } frame 180 { savefile.data.score = 24; } button 1352 { on (release) { gotoAndPlay(2); } } movieClip 1355 { } movieClip 1356 { } movieClip 1364 { } movieClip 1365 { } button 1368 { on (release) { gotoAndPlay(403); } } movieClip 1371 { } movieClip 1373 { } movieClip 1375 { } movieClip 1378 { } movieClip 1381 { } movieClip 1382 { } movieClip 1388 { } movieClip 1391 { } movieClip 1394 { } button 1400 { on (release) { gotoAndPlay(1126); } } button 1401 { on (release) { gotoAndPlay(2572); } } button 1402 { on (release) { gotoAndPlay(2572); } } movieClip 1405 { } movieClip 1406 { } button 1412 { on (release) { gotoAndPlay(2625); } } button 1413 { on (release) { gotoAndPlay(2625); } } button 1414 { on (release) { gotoAndPlay(1849); } } movieClip 1417 { } button 1422 { on (release) { gotoAndPlay(2731); } } button 1423 { on (release) { gotoAndPlay(2678); } } button 1424 { on (release) { gotoAndPlay(2678); } } movieClip 1427 { } movieClip 1429 { } button 1434 { on (release) { gotoAndPlay(1126); } } movieClip 1437 { } button 1454 { on (release) { gotoAndPlay(1849); } } movieClip 1455 { } movieClip 1459 { } movieClip 1483 { frame 1 { stop(); } frame 1125 { gotoAndPlay(2572); } frame 1848 { gotoAndPlay(2625); } frame 2571 { gotoAndPlay(2678); } frame 2624 { gotoAndPlay(1); } frame 2677 { gotoAndPlay(1); } frame 2730 { gotoAndPlay(1); } frame 2807 { stop(); } } button 1486 { on (release) { if (pass24 eq 'narrative') { nextFrame(); pass24.text = ''; } else { gotoAndStop(180); } } } frame 181 { savefile.data.score = 25; } button 1494 { on (release) { if (pass25 eq 'language') { nextFrame(); pass25.text = ''; } else { gotoAndStop(181); } } } frame 182 { _root.getAchi(5); } frame 182 { savefile.data.score = 26; } movieClip 1503 { } movieClip 1507 { } movieClip 1510 { } movieClip 1511 { frame 9 { stop(); } } button 1514 { on (release) { if (pass26 eq '351') { nextFrame(); pass26.text = ''; } else { gotoAndStop(182); } } } frame 183 { function showArray() { num = 0; i = 0; while (i < 3) { k = 0; while (k < 3) { ++num; _root['s' + num].gotoAndStop(array[i][k]); ++k; } ++i; } } function switchA(x, y) { newPos = new Array(); minx = false; miny = false; maxx = false; maxy = false; if (x > 0) { minx = true; } if (y > 0) { miny = true; } if (x < 2) { maxx = true; } if (y < 2) { maxy = true; } if (minx) { if (array[x - 1][y] == 9) { newPos[0] = x - 1; newPos[1] = y; } } if (miny) { if (array[x][y - 1] == 9) { newPos[0] = x; newPos[1] = y - 1; } } if (maxx) { if (array[x + 1][y] == 9) { newPos[0] = x + 1; newPos[1] = y; } } if (maxy) { if (array[x][y + 1] == 9) { newPos[0] = x; newPos[1] = y + 1; } } if (newPos.length > 0) { } if (newPos.length > 0) { switchPos(x, y, newPos[0], newPos[1]); } } function switchPos(x1, y1, x2, y2) { saveNum = array[x1][y1]; array[x1][y1] = array[x2][y2]; array[x2][y2] = saveNum; } function checkWin() { win = true; num = 0; i = 0; while (i < 3) { k = 0; while (k < 3) { ++num; if (array[i][k] != num) { win = false; break; } ++k; } ++i; } return win; } answerMC._visible = false; answerMC.gotoAndStop(1); array = new Array(new Array(4, 2, 5), new Array(7, 1, 3), new Array(8, 6, 9)); clicker = false; onMouseDown = function () { clicker = true; }; onMouseUp = function () { clicker = false; }; onEnterFrame = function () { i = 0; while (i < achiNums) { if (achiArray[i]) { _root.achievement.achs.achs['pic' + (i + 1)].gotoAndStop(i + 2); } ++i; } if (!checkWin()) { showArray(); if (clicker) { p = 1; while (p < 10) { if (_root['s' + p].hitTest(_root._xmouse, _root._ymouse, true)) { if (p == 1) { switchA(0, 0); } else { if (p == 2) { switchA(0, 1); } else { if (p == 3) { switchA(0, 2); } else { if (p == 4) { switchA(1, 0); } else { if (p == 5) { switchA(1, 1); } else { if (p == 6) { switchA(1, 2); } else { if (p == 7) { switchA(2, 0); } else { if (p == 8) { switchA(2, 1); } else { if (p == 9) { switchA(2, 2); } } } } } } } } } } ++p; } } } else { if (!answerMC._visible) { _root.getAchi(16); answerMC._visible = true; answerMC.play(); } } }; } frame 183 { savefile.data.score = 27; } movieClip 1530 { } movieClip 1535 { } movieClip 1537 { } movieClip 1539 { } movieClip 1541 { } movieClip 1543 { } movieClip 1545 { } movieClip 1547 { } movieClip 1549 { } movieClip 1551 { } movieClip 1554 { } movieClip 1556 { frame 99 { stop(); } } button 1559 { on (release) { if (pass27 eq 'pinnacle') { nextFrame(); pass27.text = ''; } else { gotoAndStop(183); } } } frame 184 { onEnterFrame = function () { i = 0; while (i < achiNums) { if (achiArray[i]) { _root.achievement.achs.achs['pic' + (i + 1)].gotoAndStop(i + 2); } ++i; } }; } frame 184 { savefile.data.score = 28; } button 1567 { on (release) { if (pass28 eq 'hedgehog') { nextFrame(); pass28.text = ''; } else { gotoAndStop(184); } } } frame 185 { savefile.data.score = 29; } movieClip 1573 { } movieClip 1575 { frame 1 { function always() { if (Key.isDown(4)) { if (!middleDown) { cellAction(2, field[selCell.xCor][selCell.yCor] == 1); } middleDown = true; } else { middleDown = false; } } function stopGame() { for (var v1 in grid) { grid[v1].enabled = false; } clearInterval(timerInt); gamePaused = true; } function sweepCell(cell) { field[cell.xCor][cell.yCor] = -1; cell.mark._visible = false; } function cellAction(type, mine) { if (type == 1) { if (mine) { selCell.gotoAndStop('mine'); selCell.mark._visible = false; selCell.detonated = true; stopGame(); restart_btn._visible = true; restart_btn.enabled = true; } else { sweepCell(selCell); if (selCell.closeMines == 0) { selCell.gotoAndStop('zero'); checkZero(selCell.xCor, selCell.yCor); } else { selCell.gotoAndStop('blank'); } } selCell.enabled = false; selCell = undefined; } else { if (type == 2) { selCell.flagged = !selCell.flagged; selCell.gotoAndStop(selCell.flagged ? 'flagged' : 'normal'); } else { if (type == 3) { selCell.mark._visible = !selCell.mark._visible; selCell.gotoAndStop('normal'); } } } } function checkZero(startXCor, startYCor) { var v3 = startXCor - 1; while (v3 <= startXCor + 1) { if (v3 < 0 || v3 > gWidth - 1) { } else { var v2 = startYCor - 1; while (v2 <= startYCor + 1) { if (v2 < 0 || v2 > gHeight - 1) { } else { if (v3 == startXCor && v2 == startYCor) { } else { var v1 = grid['c' + v3 + '_' + v2]; if (v1.closeMines == 0) { if (field[v1.xCor][v1.yCor] == 0) { sweepCell(v1); v1.gotoAndStop('zero'); v1.enabled = false; checkZero(v1.xCor, v1.yCor); } } else { if (field[v1.xCor][v1.yCor] == 0) { sweepCell(v1); v1.enabled = false; v1.gotoAndStop('blank'); } } } } ++v2; } } ++v3; } } function closeMines(xCor, yCor) { var v5 = 0; var v2 = xCor - 1; while (v2 <= xCor + 1) { if (v2 < 0 || v2 > gWidth - 1) { } else { var v1 = yCor - 1; while (v1 <= yCor + 1) { if (v1 < 0 || v1 > gHeight - 1) { } else { if (v2 == xCor && v1 == yCor) { } else { if (field[v2][v1] == 1) { ++v5; } } } ++v1; } } ++v2; } return v5; } function gameOver() { removeMovieClip(grid); play(); } stop(); restart_btn._visible = false; restart_btn.enabled = false; restart_btn.onRelease = function () { gameOver(); }; var middleDown = false; var cSide = 25; var cMargin = 2; onEnterFrame = function () { always(); }; var gHeight = 5; var gWidth = 10; var selCell = undefined; var field = new Array([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 1, 1], [0, 1, 0, 0, 0], [1, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [1, 0, 0, 0, 1], [0, 1, 0, 1, 0], [0, 0, 1, 0, 0]); createEmptyMovieClip('grid', getNextHighestDepth()); var i = 0; while (i < gWidth) { var j = 0; while (j < gHeight) { var newCell = grid.attachMovie('cell', 'c' + i + '_' + j, grid.getNextHighestDepth(), {'_rotation': 0, '_x': i * (cSide + cMargin), '_y': j * (cSide + cMargin), 'xCor': i, 'yCor': j, 'flagged': false, 'closeMines': closeMines(i, j), 'mine': field[i][j] == 1, 'detonated': false}); newCell.tabEnabled = false; newCell.onRelease = function () { if (Key.isDown(17)) { cellAction(2, this.mine); } else { if (!this.flagged && !Key.isDown(17)) { cellAction(1, this.mine); } } }; newCell.onDragOver = function () { selCell = this; this.rolledOff = false; this.hlight.play(); }; newCell.onRollOver = newCell.onDragOver; newCell.onDragOut = function () { selCell = undefined; this.rolledOff = true; }; newCell.onRollOut = newCell.onDragOut; ++j; } ++i; } grid._x = -grid._width / 2; grid._y = -grid._height / 2; grid._alpha = 0; grid.onEnterFrame = function () { this._alpha += 4; if (this._alpha >= 100) { this._alpha = 100; delete this.onEnterFrame; } }; } } button 1579 { on (release) { if (pass29 eq 'yo') { nextFrame(); pass29.text = ''; } else { gotoAndStop(185); } } } frame 186 { _root.getAchi(6); } frame 186 { savefile.data.score = 30; } // unknown tag 88 length 72 button 1586 { on (release) { gotoAndPlay(2); } } button 1606 { on (release) { _root.gotoAndStop('takeover'); } } button 1608 { on (release) { _root.gotoAndStop('revive'); } } movieClip 1609 { } movieClip 1610 { frame 1 { stop(); } frame 2 { stopAllSounds(); } frame 554 { stop(); } } button 1613 { on (release) { if (pass30 eq 'sbc') { gotoAndStop(190); pass30.text = ''; } else { gotoAndStop(186); } } } button 1618 { on (release) { gotoAndStop(191); } } frame 187 { _root.getAchi(8); } frame 187 { stop(); } movieClip 1620 { } movieClip 1623 { } movieClip 1624 { } movieClip 1625 { } button 1630 { on (release) { gotoAndStop(192); } } movieClip 1635 { frame 22 { stop(); } } frame 188 { _root.getAchi(9); } button 1639 { on (release) { gotoAndStop(176); } } frame 189 { _root.getAchi(10); } movieClip 1642 { } movieClip 1643 { } button 1645 { on (release) { gotoAndStop(178); } } frame 190 { _root.getAchi(11); } movieClip 1648 { } button 1650 { on (release) { gotoAndStop(186); } } frame 191 { _root.getAchi(12); } movieClip 1653 { } movieClip 1654 { } frame 192 { stop(); } button 1659 { on (release) { gotoAndStop(157); } } movieClip 1664 { } button 1665 { on (release) { gotoAndStop(187); } } movieClip 1668 { } movieClip 1669 { } movieClip 1670 { } movieClip 1674 { } movieClip 1675 { } movieClip 1679 { } movieClip 1680 { } movieClip 1686 { } movieClip 1689 { } movieClip 1697 { } movieClip 1699 { } movieClip 1700 { } movieClip 1703 { } movieClip 1705 { } movieClip 1706 { } movieClip 1709 { } movieClip 1710 { } movieClip 1714 { } movieClip 1715 { } movieClip 1716 { } movieClip 1718 { } movieClip 1721 { } movieClip 1722 { frame 722 { _root.getAchi(17); } frame 722 { _root.gotoAndPlay('endtakeover'); } } frame 914 { gotoAndPlay(1728); } movieClip 1724 { } movieClip 1725 { } movieClip 1728 { } movieClip 1732 { } movieClip 1733 { } movieClip 1740 { } movieClip 1742 { } movieClip 1747 { } movieClip 1749 { } movieClip 1754 { } movieClip 1755 { } movieClip 1756 { } movieClip 1758 { } movieClip 1761 { } movieClip 1762 { frame 811 { _root.getAchi(18); } frame 812 { _root.gotoAndPlay('reviveend'); } } movieClip 1763 { } movieClip 1765 { } movieClip 1767 { } movieClip 1769 { } movieClip 1771 { } movieClip 1772 { } movieClip 1774 { } movieClip 1777 { } frame 2841 { _root.gotoAndStop('menu'); }




http://swfchan.com/12/55619/info.shtml
Created: 20/4 -2019 06:46:22 Last modified: 20/4 -2019 06:46:22 Server time: 08/05 -2024 05:49:39