Combined Code
button 20 {
on (release) {
com.newgrounds.API.loadNewgrounds();
}
}
movieClip 33 {
}
button 39 {
on (release) {
nextFrame();
}
}
button 40 {
on (release) {
prevFrame();
}
}
button 44 {
on (release) {
selectPeriod('Today');
}
}
button 47 {
on (release) {
selectPeriod('This Week');
}
}
button 50 {
on (release) {
selectPeriod('This Month');
}
}
button 53 {
on (release) {
selectPeriod('This Year');
}
}
button 56 {
on (release) {
selectPeriod('All-Time');
}
}
movieClip 57 {
frame 1 {
function selectPeriod(p) {
_parent.loadScores(10, p);
period = p;
gotoAndStop(1);
}
stop();
}
}
movieClip 58 Score Board (NewgroundsAPI) {
#initclip
Object.registerClass('Score Board (NewgroundsAPI)', com.newgrounds.components.ScoreTable);
#endinitclip
frame 1 {
loadScores(10);
}
}
movieClip 82 {
}
movieClip 84 VideoPlayer {
#initclip
Object.registerClass('VideoPlayer', mx.video.VideoPlayer);
#endinitclip
}
movieClip 87 Icon {
}
movieClip 88 FLVPlayback {
#initclip
Object.registerClass('FLVPlayback', mx.video.FLVPlayback);
#endinitclip
frame 1 {
stop();
}
}
movieClip 106 {
frame 1 {
onEnterFrame = function () {
if (_visible) {
_rotation = _rotation + 30;
} else {
delete onEnterFrame;
}
};
}
}
movieClip 108 {
frame 10 {
stop();
}
}
movieClip 110 {
frame 37 {
_parent.setGotoFrame('done');
stop();
}
}
movieClip 112 {
}
movieClip 114 NewgroundsAPIAsset_Medal_Icon_Placeholder {
}
movieClip 122 NewgroundsAPIAsset_Medal_Popup {
frame 1 {
function endDelay() {
clearInterval(pop_delay);
gotoAndPlay('closeme');
}
_visible = true;
icon._visible = false;
pop_delay = setInterval(endDelay, 3000);
}
frame 2 {
medal.attachIcon(icon);
}
frame 10 {
icon._visible = true;
medal_name = medal.getName();
medal_value = medal.getValue() + 'pts';
stop();
}
frame 21 {
this.removeMovieClip();
_visible = false;
stop();
}
}
movieClip 128 NewgroundsAPIAsset_Login_Warning {
frame 1 {
function endDelay() {
clearInterval(pop_delay);
gotoAndPlay('closeme');
}
_x = 0;
_y = 0;
_visible = true;
pop_delay = setInterval(endDelay, 6000);
}
frame 10 {
stop();
}
frame 21 {
this.removeMovieClip();
_visible = false;
stop();
}
}
movieClip 131 NewgroundsAPIAsset_Connection_Error {
frame 1 {
function endDelay() {
clearInterval(pop_delay);
gotoAndPlay('closeme');
}
_x = 0;
_y = 0;
_visible = true;
pop_delay = setInterval(endDelay, 6000);
}
frame 10 {
stop();
}
frame 21 {
this.removeMovieClip();
_visible = false;
stop();
}
}
movieClip 133 {
}
movieClip 135 {
}
movieClip 137 {
}
movieClip 139 {
}
movieClip 141 {
}
movieClip 143 {
}
movieClip 145 {
}
movieClip 147 {
}
movieClip 149 {
}
movieClip 151 {
}
movieClip 152 NewgroundsAPIAsset_big_popup_background {
frame 1 {
var w = Math.round(this._width);
var h = Math.round(this._height);
if (w < 80) {
w = 80;
}
if (h < 80) {
h = 80;
}
this._width = 350;
this._height = 120;
t._width = w - 2;
t._x = 1;
b._width = w - 2;
b._x = 1;
c._width = w - 2;
c._x = 1;
c._height = h - 2;
c._y = 1;
l._height = h - 2;
l._y = 1;
r._height = h - 2;
r._y = 1;
tr._x = w - 7;
r._x = w - 7;
br._x = w - 7;
b._y = h - 7;
bl._y = h - 7;
br._y = h - 7;
shadow._width = w + 10;
shadow._height = h + 10;
}
}
button 156 {
on (release) {
this._visible = false;
this.removeMovieClip();
}
}
button 162 {
on (release) {
getURL(official_version_url, '_blank');
}
}
movieClip 164 NewgroundsAsset_New_Version_Available {
frame 1 {
_x = Stage.width / 2;
_y = Stage.height / 2;
background._width = Stage.width + 200;
background._height = Stage.height + 200;
background._x = -(_x + 100);
background._y = -(_y + 100);
}
}
button 165 {
on (release) {
getURL(official_version_url, '_blank');
}
}
movieClip 169 NewgroundsAsset_Illegal_Host {
frame 1 {
_x = Stage.width / 2;
_y = Stage.height / 2;
background._width = Stage.width + 200;
background._height = Stage.height + 200;
background._x = -(_x + 100);
background._y = -(_y + 100);
}
}
movieClip 170 API Connector (NewgroundsAPI) {
#initclip
Object.registerClass('API Connector (NewgroundsAPI)', com.newgrounds.components.APIConnector);
#endinitclip
frame 20 {
_visible = false;
}
}
movieClip 179 {
frame 11 {
gotoAndPlay(1);
}
}
movieClip 180 Flash Ad (NewgroundsAPI) {
#initclip
Object.registerClass('Flash Ad (NewgroundsAPI)', com.newgrounds.components.FlashAd);
#endinitclip
}
frame 1 {
var saveGame = SharedObject.getLocal('sushiBoy7');
startUp = new Sound();
startUp.attachSound('startUp');
}
frame 1 {
function goToThisURL() {
getURL(linkURL, '_blank');
}
function goToThisURL2() {
getURL(linkURL2, '_blank');
}
var linkURL = 'http://www.wefiends.com';
var linkText = 'WeFiends';
var linkURL2 = 'http://truedarkness.newgrounds.com';
var linkText2 = 'David Silver';
var myMenu = new ContextMenu();
var copyright = new ContextMenuItem(linkText, goToThisURL);
var copyright2 = new ContextMenuItem(linkText2, goToThisURL2);
myMenu.customItems.push(copyright);
myMenu.customItems.push(copyright2);
_root.menu = myMenu;
}
frame 1 {
firstTime = saveGame.data.firstTime;
if (firstTime == undefined) {
firstTime = true;
}
}
frame 1 {
stop();
}
movieClip 184 {
}
movieClip 185 {
}
instance of movieClip 185 {
onClipEvent (press) {
if (a != true) {
_root.startUp.start(0, 1);
a = true;
}
}
onClipEvent (load) {
i = 0;
}
onClipEvent (enterFrame) {
if (a == true) {
++i;
}
if (i >= 30) {
_root.nextFrame();
}
}
}
movieClip 188 {
}
// unknown tag 88 length 93
movieClip 192 {
}
movieClip 193 {
}
movieClip 195 {
}
movieClip 196 {
}
movieClip 198 {
}
movieClip 200 {
}
movieClip 202 {
}
movieClip 203 {
}
movieClip 205 {
}
movieClip 208 {
}
movieClip 210 {
}
movieClip 212 {
}
movieClip 213 {
}
movieClip 214 {
frame 1 {
stop();
}
instance loadingBar of movieClip 198 {
onClipEvent (enterFrame) {
kBytesLoaded = _root.getBytesLoaded() / 1024;
kBytesTotal = _root.getBytesTotal() / 1024;
percentage = Math.round((kBytesLoaded / kBytesTotal) * 100);
this.per.text = percentage + '%';
if (percentage >= 99) {
_root.loader.gotoAndStop(2);
}
}
}
instance of movieClip 203 {
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100 && varA != true) {
_alpha = _alpha + 10;
}
if (_alpha >= 100) {
varA = true;
}
if (_alpha > 0 && varA == true) {
_alpha = _alpha - 10;
}
if (_alpha <= 0 && varA) {
varA = false;
}
}
}
}
movieClip 218 {
}
button 220 {
on (press) {
getURL('http://itunes.apple.com/us/app/sushi-boy-thunder/id445672876?ls=1&mt=8', '_blank');
}
}
button 223 {
on (press) {
getURL('http://www.wefiends.com/', '_blank');
}
}
instance of movieClip 180 Flash Ad (NewgroundsAPI) {
onClipEvent (construct) {
show_background = true;
}
}
instance of movieClip 170 API Connector (NewgroundsAPI) {
onClipEvent (construct) {
api_id = '19651:XDg0yDIE';
encryption_key = 'ST89cU6VHeBYhw0n86COXqVHVaNe8YHZ';
version = '';
fake_session = true;
debug = true;
error_screens = true;
medal_popups = true;
}
}
movieClip 15 __Packages.com.newgrounds.components.ScoreTable {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.components) {
_global.com.newgrounds.components = new Object();
}
if (!_global.com.newgrounds.components.ScoreTable) {
var v1 = function () {
if (!this.board_name) {
throw '[ERROR] :: Score Board components require the \'Board Name\' parameter to be populated';
}
var v2 = com.newgrounds.API.getScoreBoard(this.board_name);
if (v2.exists()) {
this.board = v2;
} else {
trace('[WARNING] :: Could not initialize the scoreboard for \'' + this.board_name + '\'.');
}
this.period_select.period = this.period;
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.SCORES_LOADED, this.scoresLoaded, this);
};
com.newgrounds.components.ScoreTable = v1;
var v2 = v1.prototype;
v2.loadScores = function (numresults, p) {
if (numresults) {
this.num_results = numresults;
}
if (p) {
this.period = p;
}
var v3 = 0;
while (v3 < this.num_results) {
var v2 = this['score_row_' + v3];
v2.gotoAndStop((v3 % 2 == 0) ? 1 : 2);
v2.position = '';
v2.username = '';
v2.score = '';
++v3;
}
this.board.loadScores(this.period, 1, this.num_results, this.tag);
};
v2.scoresLoaded = function (event) {
if (event.data.board.id != this.board.__get__id()) {
return undefined;
}
var v2 = 0;
while (v2 < this.num_results) {
var v3 = this['score_row_' + v2];
if ((this.board.__get__scores())[v2]) {
v3.position = (this.board.__get__scores())[v2].position + ':';
v3.username = (this.board.__get__scores())[v2].username;
v3.score = (this.board.__get__scores())[v2].value;
} else {
v3.position = '';
v3.username = '';
v3.score = '';
}
++v2;
}
};
v2.num_results = 10;
ASSetPropFlags(com.newgrounds.components.ScoreTable.prototype, null, 1);
}
#endinitclip
}
movieClip 59 __Packages.com.newgrounds.APIError {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIError) {
var v1 = function (error, msg) {
if ((Number(error)).toString() == String(error)) {
error = Number(error);
} else {
if (com.newgrounds.APIError.error_codes[String(error)]) {
error = com.newgrounds.APIError.error_codes[String(error)];
} else {
error = 0;
}
}
this.code = error;
this.message = msg;
this.name = com.newgrounds.APIError.error_names[error];
this.alias = com.newgrounds.APIError.aliases[error];
};
com.newgrounds.APIError = v1;
var v2 = v1.prototype;
v1.init_codes = function () {
var v2 = new Object();
var v1 = 0;
while (v1 < com.newgrounds.APIError.aliases.length) {
v2[com.newgrounds.APIError.aliases[v1]] = v1;
++v1;
}
return v2;
};
v1.init_names = function () {
var v5 = new Array();
var v3 = 0;
while (v3 < com.newgrounds.APIError.aliases.length) {
var v2 = (com.newgrounds.APIError.aliases[v3].toLowerCase()).split('_');
var v1 = 0;
while (v1 < v2.length) {
v2[v1] = (v2[v1].substr(0, 1)).toUpperCase() + v2[v1].substr(1, v2[v1].length);
for (var v4 in com.newgrounds.APIError.always_caps) {
if (v2[v1].toUpperCase() == com.newgrounds.APIError.always_caps[v4]) {
v2[v1] = v2[v1].toUpperCase();
}
}
++v1;
}
v5[v3] = v2.join(' ');
++v3;
}
return v5;
};
v2.isError = function () {
return true;
};
v1.aliases = new Array('UNKNOWN_ERROR', 'INVALID_API_ID', 'MISSING_PARAM', 'INVALID_STAT_ID', 'INVALID_COMMAND_ID', 'FLASH_ADS_NOT_APPROVED', 'PERMISSION_DENIED', 'IDENTIFICATION_REQUIRED', 'INVALID_EMAIL_ADDRESS', 'BANNED_USER', 'SESSION_EXPIRED', 'INVALID_SCORE', 'INVALID_MEDAL', 'INVALID_SAVE_GROUP', 'FILE_NOT_FOUND', 'SITE_ID_REQUIRED', 'UPLOAD_IN_PROGRESS', 'USER_CANCELLED', 'CONFIRM_REQUEST', 'ILLEGAL_REQUEST', 'CONNECTION_FAILED', 'QUERY_INCOMPLETE', 'SAVE_FILE_ERROR', 'INVALID_VALUE', 'SERVER_ERROR', 'INVALID_SCOREBOARD');
v1.always_caps = new Array('API', 'URL', 'ID');
v1.error_codes = com.newgrounds.APIError.init_codes();
v1.error_names = com.newgrounds.APIError.init_names();
v2.code = 0;
ASSetPropFlags(com.newgrounds.APIError.prototype, null, 1);
}
#endinitclip
}
movieClip 60 __Packages.com.newgrounds.APIEvent {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIEvent) {
var v1 = function (type, success, data) {
this._type = type;
this._success = success;
if (data.isError()) {
this._error = data;
this.data = null;
} else {
if (data.error && data.error.isError()) {
this._error = data.error;
this.data = data;
} else {
this.data = data;
this._error = null;
}
}
};
com.newgrounds.APIEvent = v1;
var v2 = v1.prototype;
v2.__get__error = function () {
return this._error;
};
v2.__get__type = function () {
return this._type;
};
v2.__get__success = function () {
return this._success;
};
v1.API_CONNECTED = 'apiConnected';
v1.ADS_APPROVED = 'adsApproved';
v1.AD_ATTACHED = 'adAttached';
v1.HOST_BLOCKED = 'hostBlocked';
v1.NEW_VERSION_AVAILABLE = 'newVersionAvailable';
v1.EVENT_LOGGED = 'eventLogged';
v1.SCORE_POSTED = 'scorePosted';
v1.SCORES_LOADED = 'scoresLoaded';
v1.UNLOCK_MEDAL = 'unlockMedal';
v1.MEDAL_UNLOCKED = 'medalUnlocked';
v1.MEDALS_LOADED = 'medalsLoaded';
v1.METADATA_LOADED = 'metadataLoaded';
v1.FILE_PRIVS_LOADED = 'filePrivsLoaded';
v1.FILE_SAVED = 'fileSaved';
v1.FILE_LOADED = 'fileLoaded';
v1.FILE_INITIALIZED = 'fileInitialized';
v1.FILE_REQUESTED = 'fileRequested';
v1.QUERY_COMPLETE = 'queryComplete';
v1.VOTE_COMPLETE = 'voteComplete';
v1.API_ERROR = 'apiError';
v1.UNCAUGHT_EVENT = 'uncaughtEvent';
v2.addProperty('error', v2.__get__error, function () {});
v2.addProperty('success', v2.__get__success, function () {});
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.APIEvent.prototype, null, 1);
}
#endinitclip
}
movieClip 61 __Packages.com.newgrounds.API {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.API) {
var v1 = function () {};
com.newgrounds.API = v1;
var v2 = v1.prototype;
v1.setVersion = function (v) {
com.newgrounds.API.version = v;
};
v1.setUserEmail = function (e) {
com.newgrounds.API.user_email = e;
};
v1.setFakeSession = function (fake) {
com.newgrounds.API.fake_session = fake;
};
v1.setPreload = function (p) {
com.newgrounds.API.preload = p;
};
v1.getPercentLoaded = function () {
var v2;
if (com.newgrounds.API.preload && com.newgrounds.API.preload_items > 0) {
v2 = 80;
var v4 = Math.round((com.newgrounds.API.preload_items_loaded / com.newgrounds.API.preload_items) * 20);
var v3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * v2) + v4;
return v3;
}
v2 = 100;
v3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * v2);
return v3;
};
v1.reportNewAsset = function () {
if (com.newgrounds.API.preload) {
++com.newgrounds.API.preload_items;
}
};
v1.reportAssetLoaded = function () {
if (com.newgrounds.API.preload) {
++com.newgrounds.API.preload_items_loaded;
}
};
v1.populateMedals = function (medal_list) {
if (com.newgrounds.API.medals === null) {
com.newgrounds.API.medals = new Array();
var v2 = 0;
while (v2 < medal_list.length) {
var v1 = medal_list[v2];
com.newgrounds.API.medals.push(new com.newgrounds.Medal(v1.medal_id, v1.medal_name, v1.medal_value, v1.medal_difficulty, v1.medal_unlocked, v1.medal_icon));
++v2;
}
}
};
v1.populateSaveGroups = function (save_group_list, file_path, image_path) {
com.newgrounds.SaveFile.setFilePath(file_path);
com.newgrounds.SaveFile.setImagePath(image_path);
com.newgrounds.API.save_groups = new Array();
var v6 = 0;
while (v6 < save_group_list.length) {
var v2 = save_group_list[v6];
var v5 = new com.newgrounds.SaveGroup(v2.group_id, v2.group_name, v2.group_type);
var v4 = 0;
while (v4 < v2.keys.length) {
var v3 = v2.keys[v4];
v5.addKey(v3.id, v3.name, v3.type);
++v4;
}
v4 = 0;
while (v4 < v2.ratings.length) {
var v1 = v2.ratings[v4];
v5.addRating(v1.id, v1.name, v1.min, v1.max, v1.float);
++v4;
}
com.newgrounds.API.save_groups.push(v5);
++v6;
}
};
v1.populateScoreBoards = function (score_boards) {
com.newgrounds.API.scoreboards = new Array();
var v1 = 0;
while (v1 < score_boards.length) {
com.newgrounds.API.scoreboards.push(new com.newgrounds.ScoreBoard(score_boards[v1].id, score_boards[v1].name));
++v1;
}
};
v1.getOfficialURL = function () {
var v1 = com.newgrounds.API.GATEWAY_URL + '?tracker_id=' + com.newgrounds.API.movie_id + '&command_id=loadOfficalVersion&seed=' + Math.random();
if (com.newgrounds.API.debug) {
v1 += '&debug=1';
}
return v1;
};
v1.loadOfficialURL = function () {
getURL(com.newgrounds.API.getOfficialURL(), '_blank');
};
v1.hasUserSession = function () {
if (com.newgrounds.API.session_id && com.newgrounds.API.publisher_id) {
return true;
return false;
}
if (_root.NewgroundsAPI_PublisherID && _root.NewgroundsAPI_SessionID) {
return true;
}
return false;
};
v1.hostIsCompatible = function () {
return _root.NewgroundsAPI_PublisherID !== undefined;
};
v1.isNewgrounds = function () {
return com.newgrounds.API.publisher_id == 1 || _root.NewgroundsAPI_PublisherID == 1 || ((com.newgrounds.API.getHost()).toLowerCase()).indexOf('ungrounded.net') > -1 || ((com.newgrounds.API.getHost()).toLowerCase()).indexOf('newgrounds.com') > -1;
};
v1.hasPublisher = function () {
return com.newgrounds.API.publisher_id || _root.NewgroundsAPI_PublisherID;
};
v1.hasUserEmail = function () {
if (com.newgrounds.API.user_email) {
return true;
}
return false;
};
v1.isConnected = function () {
return com.newgrounds.API.connected;
};
v1.getID = function () {
return com.newgrounds.API.getTrackerID();
};
v1.getTrackerID = function () {
return com.newgrounds.API.tracker_id;
};
v1.getUserID = function () {
return com.newgrounds.API.user_id;
};
v1.getUserName = function () {
return com.newgrounds.API.user_name;
};
v1.connectionTimeOut = function () {
com.newgrounds.API.reportAssetLoaded();
clearInterval(com.newgrounds.API.timeout);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.API_CONNECTED, false, new com.newgrounds.APIError('CONNECTION_FAILED', 'Connection to API gateway timed out.'));
};
v1.connect = function (m_id, encrypt_key, debug_mode) {
if (com.newgrounds.API.connected) {
return undefined;
}
com.newgrounds.API.sendMessage('Connecting to the Newgrounds API Gateway...');
var v2 = function () {
com.newgrounds.API.connectionTimeOut();
};
com.newgrounds.API.timeout = setInterval(v2, 10000, null);
if (!m_id) {
com.newgrounds.API.fatalError('API.connect() - missing required movie_id parameter', 'connect');
}
com.newgrounds.API.movie_id = String(m_id);
com.newgrounds.API.tracker_id = Number(com.newgrounds.API.movie_id.substring(0, com.newgrounds.API.movie_id.indexOf(':')));
com.newgrounds.API.encryption_key = encrypt_key;
com.newgrounds.API.debug = debug_mode;
com.newgrounds.API.user_id = 0;
com.newgrounds.API.user_name = 'Guest';
if (_root.NewgroundsAPI_PublisherID) {
com.newgrounds.API.publisher_id = _root.NewgroundsAPI_PublisherID;
if (_root.NewgroundsAPI_SessionID) {
com.newgrounds.API.session_id = _root.NewgroundsAPI_SessionID;
}
} else {
if (com.newgrounds.API.fake_session) {
com.newgrounds.API.publisher_id = 1;
com.newgrounds.API.session_id = 'D3bu64p1U53R';
com.newgrounds.API.user_id = 10;
com.newgrounds.API.user_name = 'API-Debugger';
} else {
if (com.newgrounds.API.debug) {
com.newgrounds.API.publisher_id = 1;
}
com.newgrounds.API.session_id = null;
}
}
if (_root.NewgroundsAPI_UserName) {
com.newgrounds.API.user_name = _root.NewgroundsAPI_UserName;
}
if (_root.NewgroundsAPI_UserID) {
com.newgrounds.API.user_id = _root.NewgroundsAPI_UserID;
}
if (_root.NewgroundsAPI_UserpageFormat) {
com.newgrounds.API.userpage_format = _root.NewgroundsAPI_UserpageFormat;
}
com.newgrounds.API.reportNewAsset();
com.newgrounds.API.connected = true;
com.newgrounds.API.sendCommand('connectMovie', {'host': com.newgrounds.API.getHost(), 'movie_version': com.newgrounds.API.version});
};
v1.getHost = function () {
if (!com.newgrounds.API.host) {
var v1 = _url;
if ((v1.toLowerCase()).indexOf('http://') > -1 or (v1.toLowerCase()).indexOf('https://') > -1) {
if ((v1.toLowerCase()).indexOf(com.newgrounds.API.NEWGROUNDS_PREVIEW) > -1) {
com.newgrounds.API.host = com.newgrounds.API.NEWGROUNDS_PREVIEW;
} else {
com.newgrounds.API.host = (v1.split('/'))[2].toLowerCase();
}
return com.newgrounds.API.host;
}
com.newgrounds.API.host = com.newgrounds.API.LOCAL_HOST;
}
return com.newgrounds.API.host;
};
v1.isPublishedHost = function () {
for (var v1 in com.newgrounds.API.PREVIEW_HOSTS) {
if (com.newgrounds.API.getHost() == com.newgrounds.API.PREVIEW_HOSTS[v1]) {
return false;
}
}
return true;
};
v1.loadUserPage = function (u_id, u_name) {
if (u_id == undefined && u_name == undefined) {
if (com.newgrounds.API.hasUserSession()) {
u_id = com.newgrounds.API.user_id;
u_name = com.newgrounds.API.user_name;
} else {
return false;
}
}
if (com.newgrounds.API.publisher_id == 1) {
var v1 = 'http://' + com.newgrounds.API.user_name.toLowerCase() + '.newgrounds.com';
getURL(v1, '_blank');
return true;
return false;
}
if (com.newgrounds.API.userpage_format) {
v1 = com.newgrounds.API.userpage_format;
v1 = (v1.split(':user_id:')).join(u_id.toString());
v1 = (v1.split(':user_name:')).join(escape(u_name));
getURL(v1, '_blank');
return true;
}
return false;
};
v1.loadNewgrounds = function () {
com.newgrounds.API.sendCommand('loadNewgrounds', {'host': com.newgrounds.API.getHost()}, true);
};
v1.loadMySite = function () {
com.newgrounds.API.sendCommand('loadMySite', {'host': com.newgrounds.API.getHost()}, true);
};
v1.loadCustomLink = function (link) {
com.newgrounds.API.sendCommand('loadCustomLink', {'host': com.newgrounds.API.getHost(), 'link': link}, true);
};
v1.logCustomEvent = function (event) {
com.newgrounds.API.sendCommand('logCustomEvent', {'host': com.newgrounds.API.getHost(), 'event': event});
};
v1.getScoreBoard = function (board) {
if (!com.newgrounds.API.scoreboards || com.newgrounds.API.scoreboards.length < 1) {
com.newgrounds.API.sendWarning('You do not have any scoreboards configured in your API setup.');
return null;
}
for (var v2 in com.newgrounds.API.scoreboards) {
if (typeof board == 'string' && com.newgrounds.API.scoreboards[v2].name == board) {
return com.newgrounds.API.scoreboards[v2];
} else {
if (typeof board == 'number' && com.newgrounds.API.scoreboards[v2].id == board) {
return com.newgrounds.API.scoreboards[v2];
}
}
}
com.newgrounds.API.sendWarning('Could not find any scoreboards named \'' + board + '\'.');
return null;
};
v1.postScore = function (board_name, value, tag) {
var v3 = com.newgrounds.API.getScoreBoard(board_name);
if (tag === undefined) {
tag = '';
}
if (!v3) {
com.newgrounds.API.sendError({'command_id': 'postScore'}, new com.newgrounds.APIError('INVALID_SCOREBOARD', 'Failed to post score. Check the spelling of your board name.'));
return undefined;
}
if (value == undefined) {
com.newgrounds.API.sendError({'command_id': 'postScore'}, new com.newgrounds.APIError('MISSING_PARAM', 'Missing score value'));
return undefined;
}
com.newgrounds.API.sendSecureCommand('postScore', {'user_name': com.newgrounds.API.user_name, 'board': v3.id, 'value': value, 'tag': tag, 'publisher_id': com.newgrounds.API.publisher_id});
};
v1.loadScores = function (board_name, period, tag) {
var v3 = 'loadScores';
var v2 = com.newgrounds.API.getScoreBoard(board_name);
if (!v2) {
com.newgrounds.API.sendError({'command_id': v3}, new com.newgrounds.APIError('INVALID_SCOREBOARD', 'Failed to load scores. Check the spelling of your board name.'));
return undefined;
}
var v1 = {};
v1.publisher_id = com.newgrounds.API.publisher_id;
v1.board = v2.id;
v1.num_results = v2.num_results;
v1.page = v2.page;
if (period === undefined) {
v1.period = v2.period;
} else {
v1.period = period;
}
if (tag === undefined) {
v1.tag = v2.tag;
} else {
v1.tag = tag;
}
com.newgrounds.API.sendCommand(v3, v1);
};
v1.unlockMedal = function (medal, x, y) {
if (!medal) {
com.newgrounds.API.sendError({'command_id': 'unlockMedal'}, new com.newgrounds.APIError('MISSING_PARAM', 'missing required medal name'));
return undefined;
}
if (typeof medal != 'object') {
medal = com.newgrounds.API.getMedal(medal);
}
if (!medal) {
com.newgrounds.API.sendError({'command_id': 'unlockMedal'}, new com.newgrounds.APIError('INVALID_MEDAL', 'medal unlock failed, check your medal name for correct spelling.'));
return undefined;
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, true, {'medal': medal, 'x': x, 'y': y});
if (com.newgrounds.API.hasUserSession() or com.newgrounds.API.debug) {
com.newgrounds.API.sendMessage('Attempting to unlock \'' + medal.getName() + '\'');
var v3 = new Object();
v3.medal_id = medal.getID();
com.newgrounds.API.sendSecureCommand('unlockMedal', v3);
} else {
com.newgrounds.API.sendMessage('Unlocking \'' + medal.getName() + '\'');
medal.setUnlocked(true);
var v2 = com.newgrounds.API.loadLocal('medals_unlocked');
if (!v2) {
v2 = new Object();
}
v2[medal.getID()] = true;
com.newgrounds.API.saveLocal('medals_unlocked', v2);
}
};
v1.loadMedals = function () {
if (com.newgrounds.API.medals) {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.MEDALS_LOADED, true, {'medals': com.newgrounds.API.medals});
return undefined;
}
var v1 = new Object();
if (com.newgrounds.API.hasUserSession()) {
v1.publisher_id = com.newgrounds.API.publisher_id;
v1.user_id = com.newgrounds.API.user_id;
}
com.newgrounds.API.sendCommand('getMedals', v1);
};
v1.getMedals = function () {
return com.newgrounds.API.medals;
};
v1.getMedal = function (identifier) {
if (!com.newgrounds.API.medals || com.newgrounds.API.medals.length < 1) {
com.newgrounds.API.sendWarning('You do not have any medals configured on your API setup!');
return false;
}
for (var v3 in com.newgrounds.API.medals) {
var v1 = com.newgrounds.API.medals[v3];
if (typeof identifier == 'string' && v1.getName() == identifier) {
return v1;
} else {
if (v1.getID() == identifier) {
return v1;
}
}
}
com.newgrounds.API.sendWarning('Could not find any medals named \'' + identifier + '\'.');
return false;
};
v1.saveLocal = function (save_id, save_data, size_allocation) {
if (!com.newgrounds.API.sharedObjects[save_id]) {
com.newgrounds.API.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.newgrounds.API.movie_id + '_' + save_id);
}
com.newgrounds.API.sharedObjects[save_id].data[save_id] = com.newgrounds.API.encodeData(save_data);
com.newgrounds.API.sharedObjects[save_id].flush();
};
v1.loadLocal = function (save_id) {
if (!com.newgrounds.API.sharedObjects[save_id]) {
com.newgrounds.API.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.newgrounds.API.movie_id + '_' + save_id);
}
com.newgrounds.API.sharedObjects[save_id].flush();
com.newgrounds.API.echo('sharedobject ' + save_id + ' is: ' + com.newgrounds.API.sharedObjects[save_id].data[save_id]);
if (com.newgrounds.API.sharedObjects[save_id].data[save_id]) {
com.newgrounds.API.echo('decoded: ' + com.newgrounds.API.decodeData(com.newgrounds.API.sharedObjects[save_id].data[save_id]));
return com.newgrounds.API.decodeData(com.newgrounds.API.sharedObjects[save_id].data[save_id]);
} else {
return null;
}
};
v1.encodeData = function (data) {
return com.newgrounds.API.compressHex(com.newgrounds.encoders.RC4.encrypt(com.newgrounds.encoders.JSON.encode(data), com.newgrounds.API.encryption_key));
};
v1.decodeData = function (base) {
return com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(com.newgrounds.API.uncompressHex(base), com.newgrounds.API.encryption_key));
};
v1.compressHex = function (hex_value) {
var v6 = hex_value.length % 6;
var v4 = '';
var v5 = new com.newgrounds.encoders.BaseN(com.newgrounds.API.compression_radix);
var v1 = 0;
while (v1 < hex_value.length) {
var v2 = Number('0x' + hex_value.substr(v1, 6));
v4 += v5.encode(v2, 4);
v1 += 6;
}
return v6 + v4;
};
v1.uncompressHex = function (base_value) {
var v9 = Number(base_value.charAt(0));
var v7 = '';
var v3;
var v8 = new com.newgrounds.encoders.BaseN(com.newgrounds.API.compression_radix);
var v2 = 1;
while (v2 < base_value.length) {
var v6 = base_value.substr(v2, 4);
var v5 = v8.decode(v6);
var v1 = com.newgrounds.API.dec2hex(v5);
if (v2 + 4 < base_value.length) {
v3 = 6;
} else {
v3 = v9;
}
while (v1.length < v3) {
v1 = '0' + v1;
}
v7 += v1;
v2 += 4;
}
return v7;
};
v1.dec2hex = function (dec) {
var v4 = '0123456789ABCDEF';
var v3 = '';
while (dec > 0) {
var v2 = dec % 16;
v3 = v4.charAt(v2) + v3;
dec = (dec - v2) / 16;
}
return v3;
};
v1.getSaveGroup = function (group) {
if (com.newgrounds.API.save_groups == null || com.newgrounds.API.save_groups.length < 1) {
com.newgrounds.API.sendWarning('You do not have any save groups configured in your API setup!');
return null;
}
var v1 = 0;
while (v1 <= com.newgrounds.API.save_groups.length) {
if (typeof group == 'number' or (Number(group)).toString() == String(group)) {
if (com.newgrounds.API.save_groups[v1].getID() == Number(group)) {
return com.newgrounds.API.save_groups[v1];
}
} else {
if (typeof group == 'string') {
if ((com.newgrounds.API.save_groups[v1].getName()).toLowerCase() == group.toLowerCase()) {
return com.newgrounds.API.save_groups[v1];
}
}
}
++v1;
}
com.newgrounds.API.sendWarning('Could not find any save groups named \'' + group + '\'.');
return null;
};
v1.getCurrentSaveFile = function () {
return com.newgrounds.API.save_file;
};
v1.setCurrentSaveFile = function (current) {
com.newgrounds.API.save_file = current;
};
v1.loadSaveFile = function (save_id, get_contents) {
if (get_contents === undefined) {
get_contents = true;
}
var v1 = 'loadSaveFile';
var v2 = {'publisher_id': com.newgrounds.API.publisher_id, 'save_id': save_id, 'get_contents': get_contents};
com.newgrounds.API.save_file = null;
com.newgrounds.API.sendCommand(v1, v2);
};
v1.loadFilesByDate = function (group_name, sort_descending, key_name, key_value) {
if (sort_descending === undefined) {
sort_descending = true;
}
var v2 = com.newgrounds.API.getSaveGroup(group_name);
if (!v2) {
var v3 = new com.newgrounds.APIError('QUERY_INCOMPLETE', 'The query could not be preformed, check the spelling of your save group name.');
com.newgrounds.API.sendError({'command_id': 'loadFilesByDate'}, v3);
return undefined;
}
var v1 = new com.newgrounds.SaveGroupQuery(v2);
if (key_name) {
v1.addKeyCondition(key_name, '=', key_value);
}
v1.sortOn('CREATED_ON', sort_descending ? 'DESC' : 'ASC');
v1.execute();
};
v1.loadFilesByViews = function (group_name, sort_descending, key_name, key_value) {
if (sort_descending === undefined) {
sort_descending = true;
}
var v2 = com.newgrounds.API.getSaveGroup(group_name);
if (!v2) {
var v3 = new com.newgrounds.APIError('QUERY_INCOMPLETE', 'The query could not be preformed, check the spelling of your save group name.');
com.newgrounds.API.sendError({'command_id': 'loadFilesByViews'}, v3);
return undefined;
}
var v1 = new com.newgrounds.SaveGroupQuery(v2);
if (key_name) {
v1.addKeyCondition(key_name, '=', key_value);
}
v1.sortOn('TOTAL_VIEWS', sort_descending ? 'DESC' : 'ASC');
v1.execute();
};
v1.loadFilesByRating = function (group_name, rating_name, sort_descending, key_name, key_value) {
if (sort_descending === undefined) {
sort_descending = true;
}
var v2 = com.newgrounds.API.getSaveGroup(group_name);
if (!v2) {
var v3 = new com.newgrounds.APIError('QUERY_INCOMPLETE', 'The query could not be preformed, check the spelling of your save group name.');
com.newgrounds.API.sendError({'command_id': 'loadFilesByRating'}, v3);
return undefined;
}
var v1 = new com.newgrounds.SaveGroupQuery(v2);
if (key_name) {
v1.addKeyCondition(key_name, '=', key_value);
}
v1.sortOnRating(rating_name, sort_descending ? 'DESC' : 'ASC', 'score');
v1.execute();
};
v1.lookupSaveFiles = function (save_group) {
var v1 = 'lookupSaveFiles';
var v2 = {'publisher_id': com.newgrounds.API.publisher_id, 'group_id': save_group.getID(), 'query': com.newgrounds.encoders.JSON.encode(save_group.getQuery(true))};
com.newgrounds.API.sendCommand(v1, v2);
};
v1.newSaveFile = function (group) {
var v1 = com.newgrounds.API.getSaveGroup(group);
if (v1) {
return v1.newFile();
} else {
var v2 = new com.newgrounds.APIError('INVALID_SAVE_GROUP', 'You can not create new files in invalid groups.');
com.newgrounds.API.sendError({'command_id': 'newSaveFile'}, v2);
}
};
v1.newSaveQuery = function (group) {
var v1 = com.newgrounds.API.getSaveGroup(group);
if (v1) {
return v1.newQuery();
} else {
var v2 = new com.newgrounds.APIError('INVALID_SAVE_GROUP', '\'' + group + '\' is not a valid save group.');
com.newgrounds.API.sendError({'command_id': 'newSaveQuery'}, v2);
}
};
v1.checkFilePrivs = function (file) {
if (com.newgrounds.API.user_id) {
var v1 = com.newgrounds.API.user_id;
} else {
var v1 = 0;
}
var v2 = {'group': (file.getGroup()).getID(), 'filename': file.getName(), 'user_id': v1, 'publisher_id': com.newgrounds.API.publisher_id};
com.newgrounds.API.sendCommand('checkFilePrivs', v2);
};
v1.saveFile = function (file, overwrite) {
var v1;
v1 = {'group': (file.getGroup()).getID(), 'filename': file.getName(), 'description': file.getDescription(), 'draft': file.__get__draft(), 'user_name': com.newgrounds.API.user_name};
if (overwrite) {
v1.overwrite = overwrite;
}
if (file.getDuplicateID()) {
v1.save_id = file.getDuplicateID();
}
if ((file.getKeys()).length > 0) {
v1.keys = file.getKeys();
}
var v3;
v3 = {'file': file.getRawContents()};
if (file.getThumbnailImageScan()) {
v3.thumbnail = file.getThumbnailImageScan();
}
com.newgrounds.API.save_file = file;
com.newgrounds.API.sendSecureCommand('saveFile', v1, null, v3);
};
v1.rateSaveFile = function (file, rating, vote) {
var v1 = {'group': (file.getGroup()).getID(), 'save_id': file.getID(), 'rating_id': rating.rating_id, 'vote': vote, 'user_id': com.newgrounds.API.user_id};
com.newgrounds.API.sendSecureCommand('rateSaveFile', v1);
};
v1.getConfirmation = function (command_name, event, msg, target, confirm, cancel) {
var v1 = new com.newgrounds.APIError('CONFIRM_REQUEST', msg);
v1.confirm = function () {
target[confirm]();
};
v1.cancel = function () {
target[cancel]();
};
v1.command = command_name;
com.newgrounds.API.callListener(event, false, v1);
};
v1.onRemoteAuthentication = function (auth_result) {
var v1 = com.newgrounds.encoders.JSON.decode(com.newgrounds.encoders.RC4.decrypt(auth_result, com.newgrounds.API.encryption_key));
delete com.newgrounds.API.remote_auth;
com.newgrounds.API.user_id = v1.NewgroundsAPI_UserID;
com.newgrounds.API.user_name = v1.NewgroundsAPI_UserName;
com.newgrounds.API.session_id = v1.NewgroundsAPI_SessionID;
com.newgrounds.API.publisher_id = v1.NewgroundsAPI_PublisherID;
};
v1.doEvent = function (e) {
switch (e.command_id) {
case 'connectMovie':
clearInterval(com.newgrounds.API.timeout);
com.newgrounds.API.sendMessage('You have successfully connected to the Newgrounds API Gateway');
com.newgrounds.API.sendMessage('Movie identified as "' + e.movie_name + '"');
com.newgrounds.API.callListener(com.newgrounds.APIEvent.API_CONNECTED, e.success, {'title': e.movie_name});
var v7 = false;
if (e.ad_status === -1) {
var v11 = 'This movie was not approved to run Flash Ads.';
com.newgrounds.API.sendWarning(v11);
com.newgrounds.API.sendWarning('visit ' + com.newgrounds.API.AD_TERMS_URL + ' to view our approval guidelines');
if (!e.ad_url) {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError('FLASH_ADS_NOT_APPROVED', v11));
} else {
v7 = true;
}
} else {
if (e.ad_status === 0) {
var v11 = 'Flash Ads are currently awaiting approval.';
com.newgrounds.API.sendNotice(v11);
if (!e.ad_url) {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.ADS_APPROVED, false, new com.newgrounds.APIError('FLASH_ADS_NOT_APPROVED', v11));
} else {
v7 = true;
}
}
}
if (e.ad_url) {
com.newgrounds.API.ad_url = unescape(e.ad_url);
if (!v7) {
com.newgrounds.API.sendMessage('This movie has been approved to run Flash Ads!');
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.ADS_APPROVED, true);
}
if (e.deny_host) {
v11 = com.newgrounds.API.getHost() + ' does not have permission to run this movie!';
com.newgrounds.API.sendWarning(v11);
com.newgrounds.API.sendWarning('\tUpdate your API configuration to unblock ' + com.newgrounds.API.getHost());
com.newgrounds.API.callListener(com.newgrounds.APIEvent.HOST_BLOCKED, true, {'real_url': unescape(e.movie_url), 'url': com.newgrounds.API.getOfficialURL()});
} else {
if (e.movie_version) {
com.newgrounds.API.sendWarning('According to your API Configuration, this version is out of date.');
if (com.newgrounds.API.version) {
com.newgrounds.API.sendWarning('\tThe this movie is version ' + com.newgrounds.API.version);
}
com.newgrounds.API.sendWarning('\tThe most current version is ' + e.movie_version);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, true, {'version': e.movie_version, 'real_url': unescape(e.movie_url), 'url': com.newgrounds.API.getOfficialURL()});
}
}
if (e.request_portal_url) {
com.newgrounds.API.sendCommand('setPortalID', {'portal_url': _url});
}
if (com.newgrounds.API.preload) {
com.newgrounds.API.reportNewAsset();
var v8 = {};
if (com.newgrounds.API.hasUserSession()) {
v8.publisher_id = com.newgrounds.API.publisher_id;
v8.user_id = com.newgrounds.API.user_id;
}
com.newgrounds.API.sendCommand('preloadSettings', v8);
}
com.newgrounds.API.reportAssetLoaded();
break;
case 'preloadSettings':
if (e.medals) {
com.newgrounds.API.populateMedals(e.medals);
if (!com.newgrounds.API.hasUserSession() and !com.newgrounds.API.debug) {
com.newgrounds.API.echo('checking for sharedobject medals...');
var v4 = com.newgrounds.API.loadLocal('medals_unlocked');
if (v4) {
for (var v32 in v4) {
v32 = Number(v32);
if (v4[v32]) {
var v3 = com.newgrounds.API.getMedal(v32);
com.newgrounds.API.echo('now unlocking ' + v3.getName());
v3.setUnlocked(true);
}
}
}
}
}
if (e.save_groups) {
com.newgrounds.API.populateSaveGroups(e.save_groups, e.save_file_path);
}
if (e.score_boards) {
com.newgrounds.API.populateScoreBoards(e.score_boards);
}
if (_root.NewgroundsAPI_SaveFileID && _root.NewgroundsAPI_SaveGroupID) {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_REQUESTED, true, {'save_id': _root.NewgroundsAPI_SaveFileID, 'group': com.newgrounds.API.getSaveGroup(_root.NewgroundsAPI_SaveGroupID)});
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.METADATA_LOADED, true);
com.newgrounds.API.reportAssetLoaded();
break;
case 'logCustomEvent':
if (e.success) {
com.newgrounds.API.sendMessage('Event \'' + e.event + '\' was logged.');
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.EVENT_LOGGED, e.success, {'event': e.event});
break;
case 'postScore':
var v9;
if (e.success) {
var v5 = 'User';
if (com.newgrounds.API.user_email) {
v5 = com.newgrounds.API.user_email;
} else {
if (com.newgrounds.API.user_name) {
v5 = com.newgrounds.API.user_name;
}
}
var v19 = com.newgrounds.API.getScoreBoard(e.board);
com.newgrounds.API.sendMessage(v5 + ' posted ' + e.value + ' to \'' + v19.name + '\'');
v9 = {'board': v19, 'value': e.value, 'username': v5};
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.SCORE_POSTED, e.success, v9);
break;
case 'loadScores':
var v9 = new Object();
var v19 = com.newgrounds.API.getScoreBoard(e.board);
if (v19.exists()) {
v19.setScores(e.scores, e.period, e.page, e.num_results);
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.SCORES_LOADED, e.success, {'board': v19});
break;
case 'unlockMedal':
var v24 = com.newgrounds.API.getMedal(e.medal_name);
v24.setUnlocked(true);
com.newgrounds.API.sendMessage('Successfuly unlocked \'' + v24.getName() + '\'');
com.newgrounds.API.callListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, e.success, {'medal_id': v24.id, 'medal': v24});
break;
case 'getMedals':
com.newgrounds.API.populateMedals(e.medals);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.MEDALS_LOADED, e.success, {'medals': com.newgrounds.API.medals});
break;
case 'loadSaveFile':
var v16 = com.newgrounds.API.getSaveGroup(e.group_id);
var v14 = new com.newgrounds.SaveFile(v16);
v14.id = e.file.save_id;
v14.name = e.file.filename;
v14.fileUrl = e.file.file;
v14.thumbnailUrl = e.file.thumb;
v14.authorName = e.file.user_name;
v14.authorId = e.file.user_id;
v14.description = e.file.description;
v14.setPermissions(e.file.status, e.file.locked);
for (var v6 in e.file.keys) {
v14.setKey(e.file.keys[v6].id, e.file.keys[v6].value);
}
for (v6 in e.file.ratings) {
v14.setRating(e.file.ratings[v6].id, e.file.ratings[v6].votes, e.file.ratings[v6].score);
}
if (e.get_contents) {
v14.loadContents();
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_INITIALIZED, e.success, {'save_id': v14.id, 'file': v14});
com.newgrounds.API.save_file = v14;
break;
case 'lookupSaveFiles':
var v12 = (com.newgrounds.API.getSaveGroup(e.group_id)).getQuery();
v12.onExecuted(e.files);
break;
case 'rateSaveFile':
var v16 = com.newgrounds.API.getSaveGroup(e.group_id);
var v14 = v16.getFile(e.save_id);
if (e.already_voted) {
var v27 = new com.newgrounds.APIError('PERMISSION_DENIED', 'You have already voted on this item today');
com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {'error': v27, 'file': v14, 'save_id': v14.id});
return undefined;
} else {
if (e.success) {
var v10 = v14.onVoted(e);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {'rating': v10, 'file': v14, 'save_id': v14.id});
} else {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, e.success, {'file': v14, 'save_id': v14.id});
com.newgrounds.API.sendError('Your vote was not accepted.');
}
}
break;
case 'saveFile':
if (com.newgrounds.API.save_file) {
if (!com.newgrounds.API.save_file.exists()) {
com.newgrounds.API.save_file.setID(e.save_id, true);
}
com.newgrounds.API.save_file.onSaved(e);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_SAVED, e.success, {'save_id': com.newgrounds.API.save_file.__get__id(), 'file': com.newgrounds.API.save_file});
if (e.success) {
com.newgrounds.API.sendMessage('You just saved a new file (id #' + e.save_id + ') to the \'' + (com.newgrounds.API.save_file.__get__group()).__get__name() + '\' save group.');
}
}
com.newgrounds.API.save_file = null;
break;
case 'checkFilePrivs':
var v9 = {'file': com.newgrounds.API.save_file, 'filename': e.filename, 'group': e.group, 'exists': e.exists, 'can_write': e.can_write};
if (e.duplicate_id) {
v9.duplicate_id = e.duplicate_id;
}
if (!e.success) {
com.newgrounds.API.sendWarning('You do not have permission to save this file!');
}
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, e.success, v9);
}
};
v1.getDispatcher = function () {
if (!com.newgrounds.API.eventDispatcher) {
com.newgrounds.API.eventDispatcher = new com.newgrounds.APIEventDispatcher();
}
return com.newgrounds.API.eventDispatcher;
};
v1.hasEventListener = function (event) {
return (com.newgrounds.API.getDispatcher()).hasEventListener(event);
};
v1.addEventListener = function (event, listener, target) {
com.newgrounds.API.echo('Adding a listener for \'' + event + '\'');
(com.newgrounds.API.getDispatcher()).addEventListener(event, listener, target);
};
v1.removeEventListener = function (event, target) {
(com.newgrounds.API.getDispatcher()).removeEventListener(event, target);
};
v1.callListener = function (event, success, data, target) {
com.newgrounds.API.echo('Fired Event: ' + event);
var v2 = new com.newgrounds.APIEvent(event, success, data);
(com.newgrounds.API.getDispatcher()).dispatchEvent(v2);
if (event == com.newgrounds.APIEvent.API_CONNECTED && !success) {
com.newgrounds.API.connected = false;
}
com.newgrounds.API.bridge.sendEvent(event, {'success': success, 'data': data});
};
v1.sendError = function (c, e) {
switch (c.command_id) {
case 'connectMovie':
clearInterval(com.newgrounds.API.timeout);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.API_CONNECTED, false, {'error': e, 'response': c});
break;
case 'saveFile':
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_SAVED, false, {'error': e, 'file': com.newgrounds.API.save_file, 'response': c});
com.newgrounds.API.save_file = null;
}
var v3 = '[Newgrounds API ERROR] :: ' + c.command_id + '() - ' + e.name + ':' + '\n' + '\t\t\t\t' + e.message;
trace(v3);
com.newgrounds.API.bridge.sendEvent('trace', {'data': v3});
};
v1.sendWarning = function (m, c) {
if (c) {
m += '\r[Newgrounds API WARNING] :: \tSee ' + com.newgrounds.API.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.';
}
var v1 = '[Newgrounds API WARNING] :: ' + m;
trace(v1);
com.newgrounds.API.bridge.sendEvent('trace', {'data': v1});
};
v1.sendNotice = function (m, c) {
if (c) {
m += '\r[Newgrounds API NOTICE] :: \tSee ' + com.newgrounds.API.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.';
}
trace('[Newgrounds API NOTICE] :: ' + m);
};
v1.fatalError = function (m, c) {
if (c) {
m += '\r\tSee ' + com.newgrounds.API.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.';
}
throw '***ERROR*** frame=' + _root._currentframe + ', class=API' + '\n' + '\n' + m;
};
v1.openLoginPage = function () {
if (com.newgrounds.API.hasUserSession()) {
return undefined;
}
if (!com.newgrounds.API.remote_auth) {
var v1 = com.newgrounds.encoders.MD5.calculate(Math.random() + 'a' + com.newgrounds.API.movie_id);
v1 = 'POOPYPANTS';
com.newgrounds.API.remote_auth = new com.newgrounds.RemoteAuth(v1);
}
var v2 = com.newgrounds.encoders.RC4.encrypt(com.newgrounds.API.remote_auth.__get__token(), com.newgrounds.API.encryption_key);
getURL(com.newgrounds.API.LOGIN_URL + '?api_auth_id=' + com.newgrounds.API.movie_id + '&api_auth_key=' + v2, '_blank');
};
v1.sendSecureCommand = function (command, secure_params, unsecure_params, files) {
if (!com.newgrounds.API.debug && !com.newgrounds.API.hasUserSession() && !com.newgrounds.API.hasUserEmail()) {
com.newgrounds.API.sendError({'command_id': command}, new com.newgrounds.APIError('IDENTIFICATION_REQUIRED', 'You must be logged in, or provide an e-mail address using \'API.setUserEmail("name@domain.com");\' to use ' + command + '().'));
return undefined;
}
if (!command) {
com.newgrounds.API.fatalError('Missing command', 'sendSecureCommand');
}
if (!secure_params) {
com.newgrounds.API.fatalError('Missing secure_params', 'sendSecureCommand');
}
if (!unsecure_params) {
unsecure_params = new Object();
}
var v2 = '';
var v1 = 0;
while (v1 < 16) {
v2 += com.newgrounds.API.compression_radix.charAt(Math.floor(Math.random() * com.newgrounds.API.compression_radix.length));
++v1;
}
if (com.newgrounds.API.debug && !com.newgrounds.API.fake_session && !com.newgrounds.API.session_id) {
secure_params.session_id = '';
} else {
secure_params.session_id = com.newgrounds.API.session_id;
}
secure_params.as_version = 2;
secure_params.user_email = com.newgrounds.API.user_email;
secure_params.publisher_id = com.newgrounds.API.publisher_id;
secure_params.seed = v2;
secure_params.command_id = command;
var v8 = com.newgrounds.encoders.JSON.encode(secure_params);
var v9 = com.newgrounds.encoders.MD5.calculate(v2);
var v6 = com.newgrounds.encoders.RC4.encrypt(v8, com.newgrounds.API.encryption_key);
var v7 = v9 + v6;
unsecure_params.secure = com.newgrounds.API.compressHex(v7);
com.newgrounds.API.sendCommand('securePacket', unsecure_params, false, files);
};
v1.sendCommand = function (command, params, open_browser, files) {
if (!com.newgrounds.API.connected and command != 'connectMovie') {
var v12 = 'API.' + command + '() - API.connect() must be called before this command can be called' + '\n';
com.newgrounds.API.fatalError(v12, 'connect');
}
if (open_browser) {
var v2 = new Object();
} else {
var v2 = new LoadVars();
}
v2.command_id = command;
v2.tracker_id = com.newgrounds.API.movie_id;
if (com.newgrounds.API.debug) {
v2.debug = com.newgrounds.API.debug;
}
if (params) {
for (var v9 in params) {
v2[v9] = params[v9];
}
}
if (files) {
for (v9 in files) {
v2[v9] = files[v9];
}
}
if (open_browser) {
var v6 = com.newgrounds.API.GATEWAY_URL + '?seed=' + Math.random();
for (v9 in v2) {
v6 += '&' + escape(v9) + '=' + escape(v2[v9]);
}
trace('OPENING ' + v6);
getURL(v6, '_blank');
v2.removeMovieClip();
} else {
var v10 = new LoadVars();
v10.remember_command_id = v2.command_id;
v10.onData = function (data) {
com.newgrounds.API.echo('INPUT: \r' + data + '\n');
if (data) {
var v2 = com.newgrounds.encoders.JSON.decode(data);
} else {
var v2 = {'success': false};
}
if (!v2.success) {
if (!v2.error_code && !v2.error_msg) {
v2.error_code = 'CONNECTION_FAILED';
v2.error_msg = 'Could not contact the API Gateway';
v2.command_id = this.remember_command_id;
}
var v4 = new com.newgrounds.APIError(v2.error_code, v2.error_msg);
com.newgrounds.API.sendError(v2, v4);
} else {
com.newgrounds.API.doEvent(v2);
}
};
var v7 = new Array();
for (var v8 in v2) {
v7.push(v8 + '=' + escape(v2[v8]));
}
com.newgrounds.API.echo('POST ' + com.newgrounds.API.GATEWAY_URL + '?' + v7.join('&'));
v2.sendAndLoad(com.newgrounds.API.GATEWAY_URL + '?seed=' + Math.random(), v10, 'POST');
com.newgrounds.API.last_command = v2.command_id;
}
};
v1.renderAd = function (target) {
if (com.newgrounds.API.ad_swf_url) {
target.background = target.createEmptyMovieClip('background', 100);
target.background.beginFill(0);
target.background.moveTo(0, 0);
target.background.lineTo(300, 0);
target.background.lineTo(300, 250);
target.background.lineTo(0, 250);
target.background.lineTo(0, 0);
target.background.endFill();
target.mask = target.createEmptyMovieClip('mask', 101);
target.mask.beginFill(0);
target.mask.moveTo(0, 0);
target.mask.lineTo(300, 0);
target.mask.lineTo(300, 250);
target.mask.lineTo(0, 250);
target.mask.lineTo(0, 0);
target.mask.endFill();
target.clip = target.createEmptyMovieClip('clip', 102);
target.clip.ad = target.clip.createEmptyMovieClip('ad', 100);
target.clip.setMask(target.mask);
target.clip.ad._lockroot = true;
loadMovie(com.newgrounds.API.ad_swf_url, target.clip.ad);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.AD_ATTACHED, true, {'target': target});
} else {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.AD_ATTACHED, false, new com.newgrounds.APIError('FLASH_ADS_NOT_APPROVED', 'Unable to render ad'));
}
};
v1.attachFlashAd = function (target) {
System.security.allowDomain('http://server.cpmstar.com');
System.security.allowDomain('http://www.cpmstar.com');
System.security.allowDomain('https://server.cpmstar.com');
System.security.allowDomain('https://www.cpmstar.com');
System.security.allowInsecureDomain('http://server.cpmstar.com');
System.security.allowInsecureDomain('http://www.cpmstar.com');
System.security.allowInsecureDomain('https://server.cpmstar.com');
System.security.allowInsecureDomain('https://www.cpmstar.com');
if (com.newgrounds.API.checkAdFlood()) {
com.newgrounds.API.ad_swf_url = null;
} else {
if (com.newgrounds.API.checkAdCache()) {
com.newgrounds.API.reportNewAsset();
var v1 = new LoadVars();
v1.onData = function (data) {
if (data) {
com.newgrounds.API.ad_swf_url = data;
} else {
com.newgrounds.API.ad_swf_url = null;
}
com.newgrounds.API.reportAssetLoaded();
com.newgrounds.API.renderAd(target);
};
if (com.newgrounds.API.ad_url.indexOf('?') > -1) {
v1.load(com.newgrounds.API.ad_url + '&random=' + Math.random());
} else {
v1.load(com.newgrounds.API.ad_url + '?random=' + Math.random());
}
if (!com.newgrounds.API.ad_warning) {
com.newgrounds.API.ad_warning = true;
com.newgrounds.API.sendMessage('You may get a security sandbox violation from this ad. This is nothing to worry about!');
}
} else {
if (com.newgrounds.API.ad_swf_url) {
com.newgrounds.API.renderAd(target);
}
}
}
};
v1.checkAdFlood = function () {
if (!com.newgrounds.API.ad_url) {
return false;
}
var v2 = new Date();
var v1 = v2.getTime();
if (v1 >= com.newgrounds.API.ad_flood) {
if (v1 - com.newgrounds.API.ad_flood > 1000) {
com.newgrounds.API.ad_flood = v1 + 1000;
return false;
}
com.newgrounds.API.ad_flood = v1;
com.newgrounds.API.sendWarning('This movie is attempting to load multiple ads at too high of a frequency; you may have a bad preloader loop.');
return true;
}
return false;
};
v1.checkAdCache = function () {
if (!com.newgrounds.API.ad_url) {
return false;
}
var v2 = new Date();
var v1 = v2.getTime();
if (v1 >= com.newgrounds.API.ad_url_cache) {
com.newgrounds.API.ad_url_cache = v1 + 300000;
return true;
}
return false;
};
v1.sendMessage = function (m, r) {
var v1 = '[Newgrounds API] :: ' + m;
if (r) {
return v1;
} else {
trace(v1);
com.newgrounds.API.bridge.sendEvent('trace', {'data': v1});
}
};
v1.echo = function (m) {
if (com.newgrounds.API.do_echo) {
trace(m);
}
};
v1.LOGIN_URL = 'http://ng-local.newgrounds.com/apilogin/';
v1.do_echo = true;
v1.GATEWAY_URL = 'http://www.ngads.com/gateway_v2.php';
v1.NEWGROUNDS_PREVIEW = 'uploads.ungrounded.net/previews';
v1.AD_TERMS_URL = 'http://www.newgrounds.com/wiki/using-the-site/terms-of-use/flash-ads/';
v1.COMMANDS_WIKI_URL = 'http://www.newgrounds.com/wiki/developer-resources/flash-api/commands/';
v1.LOCAL_HOST = 'localhost';
v1.NEWGROUNDS_WWW = 'www.newgrounds.com';
v1.PREVIEW_HOSTS = new Array(com.newgrounds.API.LOCAL_HOST, com.newgrounds.API.NEWGROUNDS_PREVIEW);
v1.ad_url_cache = 0;
v1.ad_flood = 0;
v1.ad_warning = false;
v1.save_file = null;
v1.publisher_id = 1;
v1.fake_session = false;
v1.medals = null;
v1.userpage_format = null;
v1.scoreboards = new Array();
v1.save_groups = null;
v1.compression_radix = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X';
v1.errors = com.newgrounds.APIError.init_codes();
v1.sharedObjects = new Object();
v1.bridge = new com.newgrounds.Bridge(_root.NewgroundsAPI_SandboxID);
v1.preload = true;
v1.preload_items = 0;
v1.preload_items_loaded = 0;
ASSetPropFlags(com.newgrounds.API.prototype, null, 1);
}
#endinitclip
}
movieClip 62 __Packages.com.newgrounds.Bridge {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Bridge) {
var v1 = function (id) {
this.widget_id = id;
this.receiver = new LocalConnection();
this.transmitter = new LocalConnection();
this.receiver.receiveEvent = function (event, params) {
com.newgrounds.API.callListener(event, params.success, params.data);
};
try {
this.receiver.connect('rec_' + this.widget_id);
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
} else {
throw v0;
}
}
};
com.newgrounds.Bridge = v1;
var v2 = v1.prototype;
v2.sendEvent = function (event, params) {
if (this.widget_id) {
this.transmitter.send(this.widget_id, 'sendEvent', event, this.validateParams(params));
}
};
v2.sendCommand = function (command, params) {
if (this.widget_id) {
this.transmitter.send(this.widget_id, 'sendCommand', command, this.validateParams(params));
}
};
v2.validateParams = function (params) {
var v2 = {};
for (var v3 in params) {
if (typeof params[v3] == 'string' || typeof params[v3] == 'number') {
v2[v3] = params[v3];
}
}
return v2;
};
ASSetPropFlags(com.newgrounds.Bridge.prototype, null, 1);
}
#endinitclip
}
movieClip 63 __Packages.com.newgrounds.SaveFile {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveFile) {
var v1 = function (_group) {
this._group = _group;
this._filename = null;
this._file_id = null;
this._contents = null;
this._thumbnail = null;
this._thumbnail_url = null;
this.raw = null;
this.img = null;
this._draft = false;
this._keys = new Array();
this._ratings = new Array();
this._file_url = null;
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_PRIVS_LOADED, this.checkPrivs, this);
};
com.newgrounds.SaveFile = v1;
var v2 = v1.prototype;
v1.setFilePath = function (path) {
com.newgrounds.SaveFile.file_path = path + '/';
};
v1.setImagePath = function (path) {
com.newgrounds.SaveFile.image_path = path + '/';
};
v2.__get__name = function () {
return this._filename;
};
v2.__set__name = function (s) {
this._filename = s;
return this.__get__name();
};
v2.__get__id = function () {
return this._file_id;
};
v2.__get__description = function () {
return this._description;
};
v2.__set__description = function (s) {
this._description = s;
return this.__get__description();
};
v2.__get__contents = function () {
return this._contents;
};
v2.__set__contents = function (o) {
this._contents = o;
return this.__get__contents();
};
v2.__get__thumbnailUrl = function () {
return com.newgrounds.SaveFile.image_path + this._thumbnail_url;
};
v2.__set__thumbnailUrl = function (s) {
this._thumbnail_url = s;
return this.__get__thumbnailUrl();
};
v2.__get__fileUrl = function () {
return com.newgrounds.SaveFile.file_path + this._file_url;
};
v2.__set__fileUrl = function (s) {
this._file_url = s;
return this.__get__fileUrl();
};
v2.__get__authorID = function () {
return this._author_id;
};
v2.__set__authorID = function (i) {
this._author_id = i;
return this.__get__authorID();
};
v2.__get__authorName = function () {
return this._author_name;
};
v2.__set__authorName = function (n) {
this._author_name = n;
return this.__get__authorName();
};
v2.__get__views = function () {
return this._views;
};
v2.__get__draft = function () {
return this._draft;
};
v2.__set__draft = function (d) {
this._draft = d;
return this.__get__draft();
};
v2.__get__group = function () {
return this._group;
};
v2.__get__groupId = function () {
return this._group.getID();
};
v2.__get__groupName = function () {
return this._group.getName();
};
v2.__get__groupType = function () {
return this._group.getType();
};
v2.__get__locked = function () {
return this._locked;
};
v2.__get__shared = function () {
return this._isShared();
};
v2.__get__isPrivate = function () {
return this._isPrivate();
};
v2.__get__isPublic = function () {
return this._isPublic();
};
v2.__get__approved = function () {
return this._isApproved();
};
v2.__get__keys = function () {
return this._keys;
};
v2.__get__ratings = function () {
return this._ratings;
};
v2.loadAuthorPage = function () {
com.newgrounds.API.loadUserPage(this._author_id, this._author_name);
};
v2.getID = function () {
return this._file_id;
};
v2.exists = function () {
return this._file_id !== null;
};
v2.getGroup = function () {
return this._group;
};
v2.getName = function () {
return this._filename;
};
v2._isPrivate = function () {
return this.status == com.newgrounds.SaveFile.STATUS.PRIVATE;
};
v2._isShared = function () {
return this.status > com.newgrounds.SaveFile.STATUS.PRIVATE;
};
v2._isApproved = function () {
return this.status > com.newgrounds.SaveFile.STATUS.UNAPPROVED;
};
v2._isPublic = function () {
if (this._isPrivate()) {
return false;
return false;
}
if (this._group.isType('SYSTEM') or this._group.isType('PRIVATE')) {
return false;
return false;
}
if (this._group.isType('PUBLIC')) {
return true;
return false;
}
if (this._isApproved()) {
return true;
}
return false;
};
v2.isLocked = function () {
return this._locked;
};
v2.getDescription = function () {
return this._description;
};
v2.getShared = function () {
return this._draft;
};
v2.getThumbnailImageScan = function () {
return this.img;
};
v2.getRawContents = function () {
return this.raw;
};
v2.getDuplicateID = function () {
return this.duplicate_id;
};
v2.getKeys = function () {
return this._keys;
};
v2.getKey = function (key) {
var v3 = (this.getGroup()).getKey(key);
var v2 = 0;
while (v2 < this._keys.length) {
if (this._keys[v2].id == v3.key_id) {
return this._keys[v2].value;
}
++v2;
}
};
v2.getRating = function (rating) {
var v2 = (this.getGroup()).getRating(rating);
if (this._ratings[v2.rating_id]) {
return this._ratings[v2.rating_id];
} else {
return null;
}
};
v2.overwriteAllowed = function () {
return this.overwrite;
};
v2.getFileURL = function () {
return com.newgrounds.SaveFile.file_path + this._file_url;
};
v2.getThumbnailURL = function () {
return com.newgrounds.SaveFile.image_path + this._thumbnail_url;
};
v2.overwriteExisting = function () {
this.overwrite = true;
};
v2.setID = function (id, add_to_group) {
this._file_id = id;
if (add_to_group) {
(this.getGroup()).addFile(this);
}
};
v2.setName = function (filename, locked) {
this._filename = filename;
this._locked = locked;
};
v2.setDescription = function (description) {
this._description = description;
};
v2.setDraft = function (draft) {
this._draft = draft;
};
v2.setContents = function (_contents) {
this._contents = _contents;
};
v2.setThumbnail = function (thumb) {
if (thumb) {
this._thumbnail = thumb;
} else {
this._thumbnail = null;
}
};
v2.setThumbnailURL = function (url) {
this._thumbnail_url = url;
};
v2.setFileURL = function (url) {
this._file_url = url;
};
v2.setPermissions = function (status, _locked) {
this._locked = _locked;
this.status = status;
};
v2.setKey = function (key, val) {
var v4 = (this.getGroup()).getKeyID(key);
var v2;
if (!v4) {
this.onError('\'' + key + '\' is not a valid key for the \'' + this._group.__get__name() + '\' save group', 'setKey', 'INVALID_VALUE', true);
return undefined;
}
if (!this._group.keyValueIsValid(key, val) && val !== null) {
this.onError('\'' + val + '\' is not a valid ' + this._group.getKeyType(key, true), 'setKey', 'INVALID_VALUE', true);
return undefined;
}
switch (this._group.getKeyType(key, true)) {
case 'string':
if (val) {
val = String(val);
} else {
val = undefined;
}
break;
default:
val = Number(val);
}
var v5 = {'id': v4, 'value': val};
for (var v6 in this._keys) {
v2 = this._keys[v6];
if (v2.id == v4) {
this._keys[v6] = v5;
return undefined;
}
}
this._keys.push(v5);
};
v2.setRating = function (rating, votes, score) {
var v2 = (this.getGroup()).getRating(rating);
if (!votes) {
votes = 0;
}
if (!score) {
score = 0;
}
if (!v2.is_float) {
score = Math.round(Number(score));
}
this._ratings[v2.rating_id] = {'id': Number(v2.rating_id), 'name': v2.rating_name, 'votes': Number(votes), 'score': Number(score)};
return this._ratings[v2.rating_id];
};
v2.clearBuffer = function () {
this._contents = null;
this.raw = null;
this.img = null;
this.scanner = null;
this.overwrite = false;
this.duplicate_id = null;
};
v2.onError = function (msg, funct, code) {
com.newgrounds.SaveFile.busy = false;
if (!code) {
code = 'SAVE_FILE_ERROR';
}
if (!funct) {
funct = 'unknown_function';
}
var v3 = 'getSaveGroup(\'' + this._group.getName() + '\')';
if (this.exists()) {
funct = v3 + '.getFile(\'' + this.getName() + '\').' + funct;
} else {
funct = v3 + '.getNewFile().' + funct;
}
var v5 = new com.newgrounds.APIError(code, msg);
com.newgrounds.API.sendError({'command_id': funct}, v5);
};
v2.onSaved = function (p) {
com.newgrounds.SaveFile.busy = false;
if (!this.exists()) {
this.setID(p.save_id, true);
}
this.setName(p.filename);
this.setFileURL(p.file_url);
if (p.thumbnail) {
this._thumbnail_url = p.thumbnail;
}
};
v2.onVoted = function (p) {
trace('ONVOTED WAS CALLED');
return this.setRating(p.rating_id, p.votes, p.score);
};
v2.sendRating = function (rating, vote) {
var v6 = null;
if (!com.newgrounds.API.hasUserSession()) {
v6 = new com.newgrounds.APIError('PERMISSION_DENIED', 'You must be logged in to vote on save files');
}
var v2 = this._group.getRating(rating);
if (!v2) {
v6 = new com.newgrounds.APIError('PERMISSION_DENIED', '\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' save group');
}
if (this.voted === true) {
v6 = new com.newgrounds.APIError('PERMISSION_DENIED', 'You have already voted on this item today');
}
if (vote < v2.min_value or vote > v2.max_value) {
v6 = new com.newgrounds.APIError('PERMISSION_DENIED', '\'' + rating + '\' votes must be between ' + v2.min_value + ' and ' + v2.max_value);
}
if (v6) {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.VOTE_COMPLETE, false, {'error': v6, 'file': this});
return undefined;
}
this.voted = true;
com.newgrounds.API.rateSaveFile(this, v2, vote);
};
v2.replace = function () {
if (com.newgrounds.SaveFile.busy) {
this.onError('Another file is currently being saved, please try again later', 'replace');
return undefined;
}
this.overwriteExisting();
this.save();
};
v2.save = function () {
if (com.newgrounds.API.hasUserSession() && !this._author_id && !this._author_name) {
this._author_id = com.newgrounds.API.getUserID();
this._author_name = com.newgrounds.API.getUserName();
}
if (com.newgrounds.SaveFile.busy) {
this.onError('Another file is currently being saved, please try again later', 'save', 'UPLOAD_IN_PROGRESS');
return undefined;
}
com.newgrounds.SaveFile.busy = true;
if (this.isLocked()) {
this.onError('This file is _locked and cannot be overwritten.', 'save', 'PERMISSION_DENIED');
return undefined;
}
if (!this._filename) {
this.onError('Please provide a name for your file.', 'save', 'MISSING_PARAM');
return undefined;
} else {
if (!this._contents) {
this.onError('The file is empty.', 'save', 'MISSING_PARAM');
return undefined;
}
}
this.img = null;
com.newgrounds.API.checkFilePrivs(this);
};
v2.checkPrivs = function (e) {
if (e.data.file.id != this.__get__id()) {
return undefined;
}
if (e.success) {
if (e.data.can_write) {
this.can_write = e.data.can_write;
if (e.data.duplicate_id) {
this.duplicate_id = e.data.duplicate_id;
}
if (e.data.exists && !this.overwriteAllowed()) {
this.onError('You already have a file named \'' + this.getName() + '\'', 'save', 'CONFIRM_REQUEST');
} else {
this.startFile();
}
} else {
this.onError('This file is _locked and cannot be overwritten', 'save', 'PERMISSION_DENIED');
}
} else {
this.onError('There was a problem looking up your file\'s details. The server may be down.', 'save', 'UNKNOWN_ERROR');
}
};
v2.startFile = function () {
if (this.can_write) {
if (this._thumbnail) {
this.scanner = new com.newgrounds.encoders.ImageScanner(this._thumbnail);
this.scanner.setCallback(this, 'encodeFile');
this.scanner.startScan(100, 100, true);
} else {
this.encodeFile();
}
} else {
this.onError('You do not have permission to save this file.', 'save', 'PERMISSION_DENIED');
}
};
v2.encodeFile = function (img) {
this.img = img;
this.raw = (com.newgrounds.encoders.SerialXML.encode(this._contents)).toString();
this.compressFile();
};
v2.compressFile = function () {
com.newgrounds.encoders.LZW2.compress(this.raw, function (s, p) {
p.file.onCompressed(s);
}, {'file': this});
};
v2.onCompressed = function (compressed) {
this.raw = escape(compressed);
this.writeFile();
};
v2.getProgress = function () {};
v2.writeFile = function () {
((this.getGroup()).getQuery()).clearCache();
com.newgrounds.API.saveFile(this);
this.clearBuffer();
};
v2.loadContents = function () {
if (this._contents) {
com.newgrounds.API.setCurrentSaveFile(this);
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, true, {'file': this});
return undefined;
}
if (!this.getFileURL()) {
var v4 = new com.newgrounds.APIError('FILE_NOT_FOUND', 'Attempted to load contents of an unsaved file.');
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, false, {'file': this, 'error': v4});
return undefined;
}
var v2 = new LoadVars();
v2.target = this;
var target = this;
v2.onData = function (encoded) {
target.onLoaded(encoded);
};
v2.load(this.getFileURL());
};
v2.onLoaded = function (encoded) {
if (encoded == undefined) {
var v3 = new com.newgrounds.APIError('FILE_NOT_FOUND', 'We could not find the contents for this file. It may have been deleted.');
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, false, {'file': this, 'error': v3});
return undefined;
}
com.newgrounds.encoders.LZW.setXMLSafe(true);
this._contents = com.newgrounds.encoders.SerialXML.decode(com.newgrounds.encoders.LZW.decompress(encoded));
com.newgrounds.API.callListener(com.newgrounds.APIEvent.FILE_LOADED, true, {'file': this});
};
v2.setViews = function (n) {
this._views = n;
};
v1.busy = false;
v2.can_write = false;
v2._draft = false;
v2.status = 0;
v2.voted = false;
v2._views = 0;
v2._locked = false;
v2.overwrite = false;
v2.duplicate_id = null;
v2._keys = null;
v2._ratings = null;
v2._author_id = null;
v2._author_name = null;
v1.STATUS = {'PRIVATE': 1, 'PUBLIC': 2, 'UNAPPROVED': 3, 'APPROVED': 4};
v2.addProperty('approved', v2.__get__approved, function () {});
v2.addProperty('authorID', v2.__get__authorID, v2.__set__authorID);
v2.addProperty('authorName', v2.__get__authorName, v2.__set__authorName);
v2.addProperty('contents', v2.__get__contents, v2.__set__contents);
v2.addProperty('description', v2.__get__description, v2.__set__description);
v2.addProperty('draft', v2.__get__draft, v2.__set__draft);
v2.addProperty('fileUrl', v2.__get__fileUrl, v2.__set__fileUrl);
v2.addProperty('group', v2.__get__group, function () {});
v2.addProperty('groupId', v2.__get__groupId, function () {});
v2.addProperty('groupName', v2.__get__groupName, function () {});
v2.addProperty('groupType', v2.__get__groupType, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('isPrivate', v2.__get__isPrivate, function () {});
v2.addProperty('isPublic', v2.__get__isPublic, function () {});
v2.addProperty('keys', v2.__get__keys, function () {});
v2.addProperty('locked', v2.__get__locked, function () {});
v2.addProperty('name', v2.__get__name, v2.__set__name);
v2.addProperty('ratings', v2.__get__ratings, function () {});
v2.addProperty('shared', v2.__get__shared, function () {});
v2.addProperty('thumbnailUrl', v2.__get__thumbnailUrl, v2.__set__thumbnailUrl);
v2.addProperty('views', v2.__get__views, function () {});
ASSetPropFlags(com.newgrounds.SaveFile.prototype, null, 1);
}
#endinitclip
}
movieClip 64 __Packages.com.newgrounds.SaveGroup {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveGroup) {
var v1 = function (group_id, group_name, group_type) {
this.group_name = group_name;
this.group_id = group_id;
this.group_type = group_type;
this.query = new com.newgrounds.SaveGroupQuery(this);
this.ratings = new Array();
this.keys = new Array();
this.files = new Array();
};
com.newgrounds.SaveGroup = v1;
var v2 = v1.prototype;
v2.__get__id = function () {
return this.group_id;
};
v2.__get__name = function () {
return this.group_name;
};
v2.__get__type = function () {
return this.group_type;
};
v2.addFile = function (file) {
var v2 = 0;
while (v2 < this.files.length) {
if (this.files[v2].getID() == file.getID()) {
this.files[v2] = file;
return undefined;
}
++v2;
}
this.files.push(file);
};
v2.getFile = function (file_id) {
trace('getting the file ' + file_id);
var v2 = 0;
while (v2 < this.files.length) {
trace('Looking up ' + file_id + ' :: ' + this.files[v2].getID() + ' || ' + this.files[v2].getName());
if (com.newgrounds.SaveGroup.isNumeric(file_id) and this.files[v2].getID() == Number(file_id)) {
return this.files[v2];
} else {
if (this.files[v2].getName() == file_id) {
return this.files[v2];
}
}
++v2;
}
return null;
};
v2.addRating = function (rating_id, rating_name, min_value, max_value, is_float) {
var v3 = {'rating_id': rating_id, 'rating_name': rating_name, 'min_value': min_value, 'max_value': max_value, 'is_float': is_float};
if (!this.getRatingID(rating_name)) {
this.ratings.push(v3);
}
};
v2.getRating = function (rating_id) {
var v2 = 0;
while (v2 < this.ratings.length) {
if (com.newgrounds.SaveGroup.isNumeric(rating_id) and this.ratings[v2].rating_id == rating_id) {
return this.ratings[v2];
} else {
if (this.ratings[v2].rating_name == rating_id) {
return this.ratings[v2];
}
}
++v2;
}
return null;
};
v2.getRatingID = function (rating_id) {
var v2 = this.getRating(rating_id);
if (v2) {
return v2.rating_id;
}
return null;
};
v2.getRatingName = function (rating_id) {
var v2 = this.getRating(rating_id);
if (v2) {
return v2.rating_name;
}
return null;
};
v2.addKey = function (key_id, key_name, key_type) {
trace('>>>>>>>>>>> ADDING KEY ' + key_id + ' ' + key_name + ' ' + key_type);
var v2 = {'key_id': key_id, 'key_name': key_name, 'key_type': key_type};
if (!this.getKey(key_name)) {
this.keys.push(v2);
}
};
v2.getKey = function (key_id) {
var v2 = 0;
while (v2 < this.keys.length) {
if (com.newgrounds.SaveGroup.isNumeric(key_id) and this.keys[v2].key_id == key_id) {
return this.keys[v2];
} else {
if (this.keys[v2].key_name == key_id) {
return this.keys[v2];
}
}
++v2;
}
return null;
};
v2.getKeyType = function (key_name, as_string) {
var v2 = this.getKey(key_name);
if (v2) {
return as_string ? com.newgrounds.SaveGroup.KEY_TYPES[v2.key_type] : v2.key_type;
}
return null;
};
v2.getKeyID = function (key_id) {
var v2 = this.getKey(key_id);
if (v2) {
return v2.key_id;
}
return null;
};
v2.getKeyName = function (key_id) {
var v2 = this.getKey(key_id);
if (v2) {
return v2.key_name;
}
return null;
};
v2.keyValueIsValid = function (key, value) {
var v4;
var v7;
if (typeof value == 'number' or (Number(value)).toString() == String(value)) {
value = Number(value);
v4 = (Math.round(value) === value) ? 'integer' : 'float';
} else {
v4 = typeof value;
if (v4 == 'string') {
var v6 = '01234567890.-';
var v5 = true;
var v2 = 0;
while (v2 < value.length) {
if (v6.indexOf(value.charAt(v2)) < 0) {
v5 = false;
break;
}
++v2;
}
if (v5) {
value = Number(value);
v4 = 'float';
}
}
}
switch (this.getKeyType(key, true)) {
case 'integer':
v7 = v4 == 'integer' or v4 == 'boolean';
return v7;
case 'float':
v7 = v4 == 'float' or v4 == 'integer' or v4 == 'boolean';
return v7;
case 'string':
v7 = v4 == 'string' or v4 == 'float' or v4 == 'integer' or v4 == 'boolean';
return v7;
case 'boolean':
v7 = v4 == 'boolean' or value == 1 or value == 0 or value == '';
return v7;
}
v7 = false;
return v7;
};
v2.isType = function (type) {
return this.group_type == com.newgrounds.SaveGroup.TYPES[type.toUpperCase()];
};
v2.getID = function () {
return this.group_id;
};
v2.getName = function () {
return this.group_name;
};
v2.getType = function () {
return this.group_type;
};
v2.isSystem = function () {
return undefined;
};
v2.getQuery = function (as_object) {
if (as_object) {
return this.query.toObject();
}
return this.query;
};
v2.newQuery = function () {
this.query.reset();
return this.query;
};
v2.clearQuery = function () {
this.query.reset();
};
v2.newFile = function () {
var v2 = new com.newgrounds.SaveFile(this);
return v2;
};
v1.isNumeric = function (value) {
return typeof value == 'number' or (Number(value)).toString() == String(value);
};
v1.KEY_TYPES = [null, 'float', 'integer', 'string', 'boolean'];
v1.TYPES = {'SYSTEM': 0, 'PRIVATE': 1, 'PUBLIC': 2, 'MODERATED': 3};
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.SaveGroup.prototype, null, 1);
}
#endinitclip
}
movieClip 65 __Packages.com.newgrounds.ValidationTools {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.ValidationTools) {
var v1 = function () {};
com.newgrounds.ValidationTools = v1;
var v2 = v1.prototype;
v1.isNumber = function (v) {
if (typeof v == 'number') {
return true;
return false;
}
if (typeof v == 'string' and (Number(v)).toString() == v) {
return true;
}
return false;
};
v1.isInteger = function (v) {
if (com.newgrounds.ValidationTools.isNumber(v)) {
v = Number(v);
return Math.floor(v) == v;
}
return false;
};
v1.isFloat = function (v) {
return com.newgrounds.ValidationTools.isNumber(v);
};
v1.isString = function (v) {
if (typeof v == 'string' or typeof v == 'number') {
return true;
}
return false;
};
v1.isEmpty = function (o) {
for (var v2 in o) {
return false;
}
return true;
};
ASSetPropFlags(com.newgrounds.ValidationTools.prototype, null, 1);
}
#endinitclip
}
movieClip 66 __Packages.com.newgrounds.SaveGroupQuery {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveGroupQuery) {
var v1 = function (_group) {
this._group = _group;
this.reset();
};
com.newgrounds.SaveGroupQuery = v1;
var v2 = v1.prototype;
v2.__get__group = function () {
return this._group;
};
v2.__get__groupId = function () {
return this._group.getID();
};
v2.__get__resultsPerPage = function () {
return this._num_results;
};
v2.__set__resultsPerPage = function (n) {
this._num_results = n;
return this.__get__resultsPerPage();
};
v2.__get__pages = function () {
return this._pages;
};
v2.__get__page = function () {
return this._page;
};
v2.__set__page = function (n) {
this._page = n;
return this.__get__page();
};
v2.__get__randomize = function () {
return this._randomize_results;
};
v2.__set__randomize = function (b) {
this._randomize_results = b;
return this.__get__randomize();
};
v2.__get__results = function () {
return this._results;
};
v2.clearCache = function () {
this._results = [];
};
v2.reset = function () {
this.file_conditions = new Array();
this.key_conditions = new Array();
this.rating_conditions = new Array();
this.sort_conditions = new Array();
this.lookup_keys = new Object();
this.lookup_ratings = new Object();
this._num_results = 20;
this._page = 1;
this._randomize_results = false;
this._group_by = new Array();
this.clearCache();
};
v2.getGroup = function () {
return this._group;
};
v2.getGroupID = function () {
return this._group.getID();
};
v2.isRandomized = function () {
return this._randomize_results;
};
v2.toObject = function () {
var v2;
var v11 = {'page': this._page, 'num_results': this._num_results};
if (this._randomize_results) {
v11.randomize = 1;
}
if (!com.newgrounds.ValidationTools.isEmpty(this.file_conditions)) {
var v12 = [];
v2 = 0;
while (v2 < this.file_conditions.length) {
var v6 = this.file_conditions[v2];
v12.push({'field': com.newgrounds.SaveGroupQuery.file_fields[v6.field.toUpperCase()].id, 'operator': v6.operator, 'value': v6.value});
++v2;
}
v11.file_conditions = v12;
}
if (!com.newgrounds.ValidationTools.isEmpty(this.key_conditions)) {
v11.key_conditions = this.key_conditions;
}
if (!com.newgrounds.ValidationTools.isEmpty(this.rating_conditions)) {
v11.rating_conditions = this.rating_conditions;
}
if (!com.newgrounds.ValidationTools.isEmpty(this.sort_conditions)) {
var v14 = [];
v2 = 0;
while (v2 < this.sort_conditions.length) {
var v3 = this.sort_conditions[v2];
if (v3.table == com.newgrounds.SaveGroupQuery.TABLE_FILES) {
var v8 = com.newgrounds.SaveGroupQuery.file_fields[v3.field.toUpperCase()].id;
} else {
var v8 = v3.field;
}
var v5 = {'field': v8, 'table': v3.table};
if (v3.desc) {
v5.desc = 1;
}
if (v3.extra) {
v5.extra = v3.extra;
}
v14.push(v5);
++v2;
}
v11.sort_conditions = v14;
}
if (!com.newgrounds.ValidationTools.isEmpty(this.lookup_keys)) {
var v15 = [];
for (v2 in this.lookup_keys) {
v15.push(v2);
}
v11.lookup_keys = v15;
}
if (!com.newgrounds.ValidationTools.isEmpty(this.lookup_ratings)) {
var v13 = [];
for (v2 in this.lookup_ratings) {
v13.push(v2);
}
v11.lookup_ratings = v13;
}
if (!com.newgrounds.ValidationTools.isEmpty(this._group_by)) {
var v16 = [];
v2 = 0;
while (v2 < this._group_by.length) {
var v4 = this._group_by[v2];
if (v4.table == com.newgrounds.SaveGroupQuery.TABLE_FILES) {
v8 = com.newgrounds.SaveGroupQuery.file_fields[v4.field.toUpperCase()].id;
} else {
v8 = v4.field;
}
v16.push({'field': v8, 'table': v4.table});
++v2;
}
v11.group_by = v16;
}
return v11;
};
v2.toString = function () {
var v9;
var v2;
var v11 = [];
v9 = 'Lookup:\r';
var v14 = [];
for (var v6 in com.newgrounds.SaveGroupQuery.file_fields) {
v14.push(' ' + v6);
v2 = true;
}
v9 += v14.join('\n');
v11.push(v9);
v9 = '';
v2 = false;
var v16 = [];
for (v6 in this.lookup_keys) {
v16.push(' KEY \'' + this._group.getKeyName(v6) + '\'');
v2 = true;
}
if (v2) {
v9 += v16.join('\n');
v11.push(v9);
}
v9 = '';
v2 = false;
var v15 = [];
for (v6 in this.lookup_ratings) {
v15.push(' RATING \'' + this._group.getRatingName(v6) + '\'');
v2 = true;
}
if (v2) {
v9 += v15.join('\n');
v11.push(v9);
}
v9 = 'Where:\r';
v2 = false;
var v8 = [];
v6 = 0;
while (v6 < this.file_conditions.length) {
var v7 = this.file_conditions[v6];
var v10 = ' ' + v7.field + ' ' + v7.operator + ' ' + v7.value;
v8.push(v10);
v2 = true;
++v6;
}
v6 = 0;
while (v6 < this.key_conditions.length) {
v7 = this.key_conditions[v6];
v10 = ' KEY \'' + this._group.getKeyName(v7.key_id) + '\' ' + v7.operator + ' ' + v7.value;
v8.push(v10);
v2 = true;
++v6;
}
v6 = 0;
while (v6 < this.rating_conditions.length) {
v7 = this.rating_conditions[v6];
v10 = ' RATING \'' + this._group.getRatingName(v7.rating_id) + '\' ' + v7.operator + ' ' + v7.value;
v8.push(v10);
v2 = true;
++v6;
}
if (v2) {
v9 += v8.join('\n');
v11.push(v9);
}
v9 = 'Group By:\r';
v2 = false;
var v13 = [];
v6 = 0;
while (v6 < this._group_by.length) {
var v4 = this._group_by[v6];
var v5;
if (v4.table == com.newgrounds.SaveGroupQuery.TABLE_KEYS) {
v5 = ' KEY \'' + this._group.getKeyName(v4.field) + '\'';
} else {
if (v4.table == com.newgrounds.SaveGroupQuery.TABLE_RATINGS) {
v5 = ' RATING \'' + this._group.getRatingName(v4.field) + '\'';
} else {
v5 = ' ' + v4.field;
}
}
v13.push(v5);
v2 = true;
++v6;
}
if (v2) {
v9 += v13.join('\n');
v11.push(v9);
}
v9 = 'Order By:\r';
v2 = false;
var v12 = [];
if (this.isRandomized()) {
v12.push(' RANDOM');
v2 = true;
}
v6 = 0;
while (v6 < this.sort_conditions.length) {
var v3 = this.sort_conditions[v6];
if (v3.table == com.newgrounds.SaveGroupQuery.TABLE_KEYS) {
v5 = ' KEY \'' + this._group.getKeyName(v3.field) + '\'';
} else {
if (v3.table == com.newgrounds.SaveGroupQuery.TABLE_RATINGS) {
v5 = ' RATING \'' + this._group.getRatingName(v3.field) + '\' ' + ((v3.extra == 'votes') ? 'VOTES' : 'SCORE');
} else {
v5 = ' ' + v3.field;
}
}
v5 += v3.desc ? ' (DESCENDING)' : '';
v12.push(v5);
v2 = true;
++v6;
}
if (v2) {
v9 += v12.join('\n');
v11.push(v9);
}
v11.push('Page:\r ' + this._page);
v11.push('Results Per Page:\r ' + this._num_results);
return v11.join('\n');
};
v2.setResultsPerPage = function (r) {
this._num_results = r;
this.clearCache();
};
v2.setPage = function (p) {
this._page = p;
this.clearCache();
};
v2.setRandomize = function (bool) {
this._randomize_results = (bool === false) ? false : true;
};
v2.includeKey = function (key) {
if (!this._group.getKeyID(key)) {
trace('[SaveGroupQuery Error] :: \'' + key + '\' is not a valid key for the \'' + this._group.__get__name() + '\' group.');
return undefined;
}
this.lookup_keys[this._group.getKeyID(key)] = 1;
this.clearCache();
};
v2.includeRating = function (rating) {
if (!this._group.getRatingID(rating)) {
trace('[SaveGroupQuery Error] :: \'' + rating + '\' is not a valid rating for the \'' + this._group.__get__name() + '\' group.');
return undefined;
}
this.lookup_ratings[this._group.getRatingID(rating)] = 1;
this.clearCache();
};
v2.groupBy = function (field) {
this.addGroupItem(com.newgrounds.SaveGroupQuery.TABLE_FILES, field);
};
v2.groupByKey = function (key) {
if (!this._group.getKeyID(key)) {
this.error('\'' + key + '\' is not a valid key for the \'' + this._group.getName() + '\' _group');
return undefined;
}
this.addGroupItem(com.newgrounds.SaveGroupQuery.TABLE_KEYS, this._group.getKeyID(key));
};
v2.groupByRating = function (rating) {
if (!this._group.getRatingID(rating)) {
this.error('\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' _group');
return undefined;
}
this.addGroupItem(com.newgrounds.SaveGroupQuery.TABLE_RATINGS, this._group.getRatingID(rating));
};
v2.addGroupItem = function (table, field) {
this._group_by.push({'table': table, 'field': field});
this.clearCache();
};
v2.excludeKey = function (key) {
delete this.lookup_keys[this._group.getKeyID(key)];
this.clearCache();
};
v2.excludeRating = function (rating) {
delete this.lookup_ratings[this._group.getRatingID(rating)];
this.clearCache();
};
v2.addCondition = function (field, operator, value) {
if (field == 'FILE_STATUS' && typeof value == 'string' && com.newgrounds.SaveFile.STATUS[value.toUpperCase()] !== undefined) {
value = com.newgrounds.SaveFile.STATUS[value.toUpperCase()];
}
if (operator == '==') {
operator = '=';
}
if (!this.validateOperator(operator) or !this.validateValue(field, value)) {
return undefined;
}
this.file_conditions.push({'field': field, 'operator': operator, 'value': value});
this.clearCache();
};
v2.addKeyCondition = function (key, operator, value) {
if (!this._group.getKeyID(key)) {
this.error('\'' + key + '\' is not a valid key for the \'' + this._group.getName() + '\' save _group');
} else {
if (!this.validateOperator(operator) or !this.validateKeyValue(key, value)) {
return undefined;
}
}
this.key_conditions.push({'key_id': this._group.getKeyID(key), 'operator': operator, 'value': value});
this.clearCache();
};
v2.addRatingCondition = function (rating, operator, value, column) {
if (!column) {
column = 'SCORE';
}
if (!this._group.getRatingID(rating)) {
this.error('\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' save _group');
} else {
if (!this.validateOperator(operator)) {
return undefined;
} else {
if (!com.newgrounds.ValidationTools.isNumber(value)) {
this.error('Expected numeric value for rating \'' + rating + '\'');
return undefined;
}
}
}
if (!com.newgrounds.SaveGroupQuery.rating_columns[column]) {
var v2 = [];
for (var v3 in com.newgrounds.SaveGroupQuery.rating_columns) {
v2.push(v3);
}
this.error('Invalid rating column \'' + column + '\'. Valid columns are ' + v2.join(', '));
return undefined;
}
this.rating_conditions.push({'rating_id': this._group.getRatingID(rating), 'operator': operator, 'value': value, 'column': com.newgrounds.SaveGroupQuery.rating_columns[column]});
this.clearCache();
};
v2.sortOn = function (field, order) {
if (!com.newgrounds.SaveGroupQuery.file_fields[field]) {
var v2 = [];
for (var v3 in com.newgrounds.SaveGroupQuery.file_fields) {
v2.push(v3);
}
this.error('\'' + field + '\' is not a valid sort field. Valid fields are: ' + v2.join(', '));
return undefined;
}
this.addSortCondition(com.newgrounds.SaveGroupQuery.TABLE_FILES, field, order);
};
v2.sortOnKey = function (key, order) {
if (!this._group.getKeyID(key)) {
this.error('\'' + key + '\' is not a valid key for the \'' + this._group.getName() + '\' _group');
return undefined;
}
this.addSortCondition(com.newgrounds.SaveGroupQuery.TABLE_KEYS, this._group.getKeyID(key), order);
};
v2.sortOnRating = function (rating, order, column) {
if (!this._group.getRatingID(rating)) {
this.error('\'' + rating + '\' is not a valid rating for the \'' + this._group.getName() + '\' _group');
return undefined;
}
if (!column) {
column = 'score';
}
this.addSortCondition(com.newgrounds.SaveGroupQuery.TABLE_RATINGS, this._group.getRatingID(rating), order, column);
};
v2.sortOnRatingScore = function (rating, order) {
this.sortOnRating(rating, order, 'score');
};
v2.sortOnRatingVotes = function (rating, order) {
this.sortOnRating(rating, order, 'votes');
};
v2.addSortCondition = function (table, field, order, extra) {
var v7;
if (!order or order == '' or order.toUpperCase() == 'ASC') {
v7 = false;
} else {
if (order.toUpperCase() == 'DESC') {
v7 = true;
} else {
this.error('\'' + order + '\' is not a valid sort order!');
return undefined;
}
}
var v3 = {'table': table, 'field': field, 'desc': v7};
if (extra) {
v3.extra = extra;
}
this.sort_conditions.push(v3);
this.clearCache();
};
v2.onExecuted = function (results) {
this._results = [];
var v6 = 0;
while (v6 < results.length) {
var v2 = results[v6];
var v3 = new com.newgrounds.SaveFile(this._group);
v3.setName(v2.filename);
v3.setID(v2.save_id);
v3.setDescription(v2.description);
v3.setThumbnailURL(v2.thumb);
v3.setFileURL(v2.file);
if (v2.views) {
v3.setViews(v2.views);
}
v3.setPermissions(v2.status, v2.locked);
v3.authorName = v2.user_name;
v3.authorID = v2.user_id;
var v5 = 0;
while (v5 < v2.keys.length) {
v3.setKey(v2.keys[v5].id, v2.keys[v5].value);
++v5;
}
var v4 = 0;
while (v4 < v2.ratings.length) {
v3.setRating(v2.ratings[v4].id, v2.ratings[v4].votes, v2.ratings[v4].score);
++v4;
}
(this.getGroup()).addFile(v3);
this._results.push(v3);
++v6;
}
this.callEventDispatcher();
};
v2.hasResults = function () {
return this._results && this._results.length > 0;
};
v2.callEventDispatcher = function () {
com.newgrounds.API.callListener(com.newgrounds.APIEvent.QUERY_COMPLETE, true, {'query': this});
};
v2.execute = function () {
if (this.hasResults() && !this.isRandomized()) {
this.callEventDispatcher();
return undefined;
}
this._group.query = this;
com.newgrounds.API.lookupSaveFiles(this._group);
};
v2.processResults = function (files) {
return null;
};
v2.validateKeyValue = function (key, value) {
var v3 = this._group.getKeyType(key);
if (v3) {
var v2 = com.newgrounds.SaveGroup.KEY_TYPES[v3];
if (v2 == 'float' and com.newgrounds.ValidationTools.isFloat(value)) {
return true;
} else {
if (v2 == 'integer' and com.newgrounds.ValidationTools.isInteger(value)) {
return true;
} else {
if (v2 == 'string' and com.newgrounds.ValidationTools.isString(value)) {
return true;
}
}
}
this.error('Expected type ' + v2 + ' for key \'' + key + '\'');
}
return false;
};
v2.validateValue = function (field, value) {
if (com.newgrounds.SaveGroupQuery.file_fields[field]) {
if (com.newgrounds.SaveGroupQuery.file_fields[field].type == 'integer' and com.newgrounds.ValidationTools.isInteger(value)) {
return true;
} else {
if (com.newgrounds.SaveGroupQuery.file_fields[field].type == 'float' and com.newgrounds.ValidationTools.isFloat(value)) {
return true;
} else {
if (com.newgrounds.SaveGroupQuery.file_fields[field].type == 'string' and com.newgrounds.ValidationTools.isString(value)) {
return true;
} else {
this.error('Expecting ' + com.newgrounds.SaveGroupQuery.file_fields[field].type + ' value on \'' + field + '\' condition');
}
}
}
return false;
}
var v2 = [];
for (var v4 in com.newgrounds.SaveGroupQuery.file_fields) {
v2.push(v4);
}
this.error('\'' + field + '\' is not a searchable field. Valid fields are: ' + v2.join(', '));
return false;
};
v2.validateOperator = function (operator) {
var v2 = 0;
while (v2 < com.newgrounds.SaveGroupQuery.valid_operators.length) {
if (operator == com.newgrounds.SaveGroupQuery.valid_operators[v2]) {
return true;
}
++v2;
}
this.error('\'' + operator + '\' is not a valid lookup operation. Valid operations are: ' + com.newgrounds.SaveGroupQuery.valid_operators.join(', '));
return false;
};
v2.error = function (msg) {
trace('[QUERY ERROR] :: ' + msg);
};
v1.TABLE_FILES = 1;
v1.TABLE_KEYS = 2;
v1.TABLE_RATINGS = 3;
v2._results = [];
v1.file_fields = {'FILE_ID': {'id': 0, 'field': 'file_id', 'type': 'integer'}, 'AUTHOR_ID': {'id': 1, 'field': 'user_id', 'type': 'integer'}, 'AUTHOR_NAME': {'id': 2, 'field': 'user_name', 'type': 'string'}, 'FILE_NAME': {'id': 3, 'field': 'file_name', 'type': 'string'}, 'CREATED_ON': {'id': 4, 'field': 'created', 'type': 'string'}, 'UPDATED_ON': {'id': 5, 'field': 'last_update', 'type': 'string'}, 'TOTAL_VIEWS': {'id': 6, 'field': 'views', 'type': 'integer'}, 'FILE_STATUS': {'id': 7, 'field': 'status', 'type': 'integer'}};
v1.rating_columns = {'TOTAL_VOTES': 'votes', 'SCORE': 'score'};
v1.valid_operators = ['=', '<', '>', '!=', '<>', '<=', '>=', '*', '!*', '!*=', '!=*', '*=', '=*'];
v2.addProperty('group', v2.__get__group, function () {});
v2.addProperty('groupId', v2.__get__groupId, function () {});
v2.addProperty('page', v2.__get__page, v2.__set__page);
v2.addProperty('pages', v2.__get__pages, function () {});
v2.addProperty('randomize', v2.__get__randomize, v2.__set__randomize);
v2.addProperty('results', v2.__get__results, function () {});
v2.addProperty('resultsPerPage', v2.__get__resultsPerPage, v2.__set__resultsPerPage);
ASSetPropFlags(com.newgrounds.SaveGroupQuery.prototype, null, 1);
}
#endinitclip
}
movieClip 67 __Packages.com.newgrounds.encoders.BaseN {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.BaseN) {
var v1 = function (hash) {
this.ceiling = 100000000000000.0;
if (hash) {
this.hashIndex = hash;
} else {
this.hashIndex = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/';
}
this.bitSize = this.hashIndex.length;
this.hashVal = new Object();
this.i = 0;
while (this.i < this.bitSize) {
this.hashVal[this.hashIndex.charAt(this.i)] = this.i;
++this.i;
}
};
com.newgrounds.encoders.BaseN = v1;
var v2 = v1.prototype;
v2.verify = function (s) {
if (this.hashVal[s] != undefined) {
return true;
} else {
return false;
}
};
v2.encode = function (n, minchars) {
this.debug.lastencode = '';
if (typeof this.i != 'string') {
n = n.toString();
}
if (n.charAt(0) == '-') {
var v3 = '-';
n = n.substring(1);
} else {
var v3 = '';
}
if ((String(n)).indexOf('.') > -1) {
var v4 = (String(n)).split('.', 2);
return v3 + this.baseNEncoder(v4[0], minchars) + '.' + this.baseNEncoder(v4[1]);
} else {
this.debug.lastencode += '\tNo decimal\r';
return v3 + this.baseNEncoder(n, minchars);
}
};
v2.decode = function (s) {
var v4 = 1;
if (s.charAt(0) == '-') {
v4 = -1;
s = s.substring(1, s.length);
}
var v3 = s.indexOf('.');
if (v3 > -1) {
var v5 = Math.pow(10, this.baseNDecoder(s.substring(v3 + 1, s.length)));
return (this.baseNDecoder(s.substring(0, v3)) / v5) * v4;
} else {
return this.baseNDecoder(s) * v4;
}
};
v2.baseNEncoder = function (n, minchars) {
if (!minchars) {
minchars = 1;
}
var v4 = '';
while (n != 0) {
n = Math.round(n);
var v3 = n % this.bitSize;
if (Math.round(v3) != v3) {
trace('BaseN failed on ' + n + '%' + this.bitSize + ' = ' + v3 + ' ' + int(n) + ' ' + int(this.bitSize));
}
v4 = this.hashIndex.charAt(v3) + v4;
this.debug.lastencode += '\t-> n:' + n + ' % bitSize:' + this.bitSize + ' = ' + v3 + ', final char=' + v4 + '\n';
n -= v3;
n /= this.bitSize;
}
if (minchars) {
while (v4.length < minchars) {
v4 = this.hashIndex.charAt(0) + v4;
}
}
return v4;
};
v2.baseNDecoder = function (s) {
var v2 = 0;
var v6 = 0;
this.i = 0;
while (this.i < s.length) {
var v3 = s.charAt(s.length - this.i - 1);
if (v3 == this.hashIndex.charAt(0)) {
var v5 = 0;
} else {
var v5 = this.hashVal[v3] * Math.pow(this.bitSize, this.i);
}
v2 += v5;
if (v2 >= this.ceiling) {
v6 += (v2 - v2 % this.ceiling) / this.ceiling;
v2 %= this.ceiling;
}
++this.i;
}
if (v6 > 0) {
v2 = '' + v2;
while (v2.length < (this.ceiling.toString()).length - 1) {
v2 = '0' + v2;
}
v2 = '' + v6 + v2;
}
return v2;
};
v2.debug = new Object();
ASSetPropFlags(com.newgrounds.encoders.BaseN.prototype, null, 1);
}
#endinitclip
}
movieClip 68 __Packages.com.newgrounds.encoders.ImageScanner {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.ImageScanner) {
var v1 = function (the_source) {
if (the_source) {
this.image_source = the_source;
} else {
this.image_source = _root;
}
this.reset();
if (typeof this.image_source == 'movieclip') {
if (this.image_source == _root) {
this.source_width = Stage.width;
this.source_height = Stage.height;
} else {
this.source_width = Math.floor(this.image_source._width);
this.source_height = Math.floor(this.image_source._height);
}
this.sourceBitmap = new flash.display.BitmapData(this.source_width, this.source_height, false, 4294967295.0);
this.sourceBitmap.draw(_root);
} else {
if (this.image_source.width) {
this.source_width = this.image_source.width;
this.source_height = this.image_source.height;
this.sourceBitmap = this.image_source;
} else {
this.error('You can only use BitMaptData and MovieClip objects to create images');
}
}
};
com.newgrounds.encoders.ImageScanner = v1;
var v2 = v1.prototype;
v2.setCallback = function (target, funct) {
if (target && funct) {
this.callback_target = target;
this.callback_function = funct;
}
};
v2.reset = function () {
this.callback_target = null;
this.callback_function = null;
this.debug.bad_pixels = 0;
this.hash = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&';
var v3 = Math.pow(this.hash.length, 2);
trace('MAX COLORS: ' + v3);
var v2 = Math.floor(Math.pow(v3, 0.3333333333333333)) - 1;
var v4 = Math.pow(v2, 3);
this.cube = v2;
this.basen = new com.newgrounds.encoders.BaseN(this.hash);
this.xpos = 0;
this.ypos = 0;
this.pixels = 0;
this.busy = false;
};
v2.startScan = function (w, h, s) {
if (w) {
this.image_width = w;
}
if (h) {
this.image_height = h;
}
if (s != undefined) {
this.crop = s;
}
var v7 = _root.getNextHighestDepth();
var v6 = _root.createEmptyMovieClip('API_image_container_' + v7, v7);
var v5 = v6.createEmptyMovieClip('canvas', 100);
v5.attachBitmap(this.sourceBitmap, 100);
if (this.crop) {
if (this.image_width / this.source_width > this.image_height / this.source_height) {
this.canvas_width = this.image_width;
this.canvas_height = Math.ceil(this.source_height * (this.image_width / this.source_width));
} else {
this.canvas_height = this.image_height;
this.canvas_width = Math.ceil(this.source_width * (this.image_height / this.source_height));
}
} else {
this.canvas_width = this.image_width;
this.canvas_height = this.image_height;
}
v5._x = Math.round((this.image_width - this.canvas_width) / 2);
v5._width = this.canvas_width;
v5._height = this.canvas_height;
this.resizedBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0);
this.resizedBitmap.draw(v6);
v6.removeMovieClip();
this.copyBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0);
var v3 = '' + this.image_width;
while (v3.length < 3) {
v3 = '0' + v3;
}
var v4 = '' + this.image_height;
while (v4.length < 3) {
v4 = '0' + v4;
}
this.output = v3 + v4;
this.draw_interval = setInterval(this, 'drawChunk', 10);
this.busy = false;
return this.resizedBitmap;
};
v2.getBitmapData = function () {
return this.copyBitmap;
};
v2.getBytesTotal = function () {
return this.image_width * this.image_height * 2;
};
v2.getBytesScanned = function () {
return this.pixels * 2;
};
v2.getProgress = function () {
return Math.round((this.getBytesScanned() / this.getBytesTotal()) * 100);
};
v2.drawChunk = function () {
if (!this.busy) {
this.busy = true;
var v2 = 0;
while (v2 < this.pixels_per_chunk) {
if (!this.nextPixel()) {
trace(this.output.length);
clearInterval(this.draw_interval);
this.callback_interval = setInterval(this, 'doCallback', 25);
this.busy = true;
break;
}
++v2;
}
this.busy = false;
}
};
v2.doCallback = function () {
this.busy = false;
clearInterval(this.callback_interval);
if (this.callback_target and this.callback_function) {
this.callback_target[this.callback_function](this.output);
} else {
this.onScanComplete(this.output);
}
};
v2.onScanComplete = function (packet) {
this.sendMessage('packet size: ' + this.output.length + ' bytes', 'onScanComplete');
};
v2.nextPixel = function () {
var v15 = this.xpos;
var v14 = this.ypos;
var v7 = this.resizedBitmap.getPixel(v15, v14);
var v17 = v7 >> 16 & 255;
var v20 = v7 >> 8 & 255;
var v16 = v7 >> 0 & 255;
var v11 = Math.round(((v17 + 1) / 256) * this.cube);
var v10 = Math.round(((v20 + 1) / 256) * this.cube);
var v13 = Math.round(((v16 + 1) / 256) * this.cube);
var v12 = v11 * (this.cube + 1) * (this.cube + 1) + v10 * (this.cube + 1) + v13;
var v6 = this.basen.encode(v12, 2);
this.output += v6;
if (v6.length != 2) {
trace('bad pixel ' + v6);
}
var v5 = this.basen.decode(v6);
var v18 = v5;
var v8 = v5 % (this.cube + 1);
v5 = (v5 - v8) / (this.cube + 1);
var v9 = v5 % (this.cube + 1);
var v19 = (v5 - v9) / (this.cube + 1);
if (v13 != v8 and v10 != v9 and v11 != v10) {
++this.debug.bad_pixels;
trace('BAD PIXEL ' + this.debug.bad_pixels + ') ' + v12 + ' != ' + v18 + ' ' + v6);
trace(this.basen.debug.lastencode);
}
var v2 = (Math.round((v19 / this.cube) * 255)).toString(16);
var v4 = (Math.round((v9 / this.cube) * 255)).toString(16);
var v3 = (Math.round((v8 / this.cube) * 255)).toString(16);
while (v2.length < 2) {
v2 = '0' + v2;
}
while (v4.length < 2) {
v4 = '0' + v4;
}
while (v3.length < 2) {
v3 = '0' + v3;
}
this.copyBitmap.setPixel(v15, v14, Number('0x' + v2 + v4 + v3));
++this.pixels;
if (this.pixels >= this.image_width * this.image_height) {
return false;
}
++this.xpos;
if (this.xpos >= this.image_width) {
this.xpos = 0;
++this.ypos;
}
return true;
};
v2.error = function (e, f) {
this.sendMessage(e, f, 'ERROR');
};
v2.sendMessage = function (msg, func, type) {
var v1 = 'ImageScanner';
if (func) {
v1 += '.' + func + '()';
}
if (type) {
v1 = type + ' in ' + v1;
}
v1 += ' :: ' + msg;
trace(v1);
};
v2.image_width = 100;
v2.image_height = 100;
v2.crop = true;
v2.pixels_per_chunk = 500;
v2.debug = new Object();
ASSetPropFlags(com.newgrounds.encoders.ImageScanner.prototype, null, 1);
}
#endinitclip
}
movieClip 69 __Packages.com.newgrounds.encoders.SerialXML {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.SerialXML) {
var v1 = function () {};
com.newgrounds.encoders.SerialXML = v1;
var v2 = v1.prototype;
v1.decode = function (xml) {
if (!(xml instanceof XML)) {
xml = new XML(xml);
}
var v2 = com.newgrounds.encoders.SerialXML.populateObject(xml.firstChild, {});
return v2.DATA;
};
v1.encode = function (obj) {
var v1 = new XML();
com.newgrounds.encoders.SerialXML.populateXML(v1, obj, 'DATA');
return v1;
};
v1.populateObject = function (child, object) {
var v6 = child.nodeName;
var v5 = com.newgrounds.encoders.SerialXML.getValue(v6, child.attributes.v);
var v4 = child.attributes.n;
if (object instanceof Array) {
v4 = object.length;
object.push(v5);
} else {
object[v4] = v5;
}
if (child.hasChildNodes()) {
var v1 = 0;
while (v1 < child.childNodes.length) {
com.newgrounds.encoders.SerialXML.populateObject(child.childNodes[v1], object[v4]);
++v1;
}
}
return object;
};
v1.populateXML = function (child, obj, name) {
if (obj === undefined) {
return undefined;
}
var v5 = new XML();
var v2;
if (obj instanceof Array) {
v2 = v5.createElement(com.newgrounds.encoders.SerialXML.getType(obj));
if (name) {
v2.attributes.n = name;
}
child.appendChild(v2);
var v4 = 0;
while (v4 < obj.length) {
com.newgrounds.encoders.SerialXML.populateXML(v2, obj[v4]);
++v4;
}
} else {
if (typeof obj == 'object') {
v2 = v5.createElement(com.newgrounds.encoders.SerialXML.getType(obj));
if (name) {
v2.attributes.n = name;
}
child.appendChild(v2);
for (var v4 in obj) {
com.newgrounds.encoders.SerialXML.populateXML(v2, obj[v4], v4);
}
} else {
v2 = v5.createElement(com.newgrounds.encoders.SerialXML.getType(obj));
if (name) {
v2.attributes.n = name;
}
if ((com.newgrounds.encoders.SerialXML.getType(obj)).length == 1) {
v2.attributes.v = obj;
}
child.appendChild(v2);
}
}
};
v1.getValue = function (type, stringval) {
switch (type.toUpperCase()) {
case 'O':
return new Object();
break;
case 'A':
return new Array();
break;
case 'N':
return Number(stringval);
break;
case 'S':
return String(stringval);
break;
case 'TRUE':
return true;
break;
case 'FALSE':
return false;
break;
default:
return null;
}
};
v1.getType = function (obj) {
switch (obj instanceof Array ? 'array' : typeof obj) {
case 'array':
return 'A';
break;
case 'object':
return 'O';
break;
case 'string':
return 'S';
break;
case 'number':
return 'N';
case 'boolean':
return (obj === true) ? 'TRUE' : 'FALSE';
break;
default:
return 'NULL';
}
};
ASSetPropFlags(com.newgrounds.encoders.SerialXML.prototype, null, 1);
}
#endinitclip
}
movieClip 70 __Packages.com.newgrounds.encoders.LZW2 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.LZW2) {
var v1 = function () {};
com.newgrounds.encoders.LZW2 = v1;
var v2 = v1.prototype;
v1.doCompressorConfig = function () {
com.newgrounds.encoders.LZW2.comp_dict = [];
var v1 = 0;
while (v1 < 256) {
com.newgrounds.encoders.LZW2.comp_dict[String.fromCharCode(v1)] = v1;
++v1;
}
com.newgrounds.encoders.LZW2.comp_dict.< = 256;
com.newgrounds.encoders.LZW2.comp_dict.> = 257;
com.newgrounds.encoders.LZW2.comp_dict.& = 258;
com.newgrounds.encoders.LZW2.comp_dict." = 259;
com.newgrounds.encoders.LZW2.comp_dict.\' = 260;
com.newgrounds.encoders.LZW2.pos = 0;
com.newgrounds.encoders.LZW2.result = '';
com.newgrounds.encoders.LZW2.buffer = '';
com.newgrounds.encoders.LZW2.nbChar = 256 + com.newgrounds.encoders.LZW2.skipnum;
};
v1.compress = function (string, callback, callback_params) {
com.newgrounds.encoders.LZW2.doCompressorConfig();
if (com.newgrounds.encoders.LZW2.busy) {
trace('[LZW COMPRESSOR] :: Compression can not begin until previous compression or decompression is complete!');
return undefined;
}
com.newgrounds.encoders.LZW2.splitStr = string.split('');
string = '';
com.newgrounds.encoders.LZW2.len = com.newgrounds.encoders.LZW2.splitStr.length;
com.newgrounds.encoders.LZW2.local = {'delay': 30, 'callback': callback, 'callback_params': callback_params, 'compress_chunk': function () {
com.newgrounds.encoders.LZW2.compress_chunk();
}, 'busy': false, 'complete': false};
com.newgrounds.encoders.LZW2.interval = setInterval(com.newgrounds.encoders.LZW2.local, 'compress_chunk', 5);
};
v1.getProgress = function () {
return Math.round((com.newgrounds.encoders.LZW2.pos / com.newgrounds.encoders.LZW2.len) * 100);
};
v1.compress_chunk = function () {
if (com.newgrounds.encoders.LZW2.local.delay > 0) {
--com.newgrounds.encoders.LZW2.local.delay;
} else {
if (!com.newgrounds.encoders.LZW2.local.busy) {
com.newgrounds.encoders.LZW2.local.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.LZW2.max_chunk_length) {
com.newgrounds.encoders.LZW2.encode_next();
if (com.newgrounds.encoders.LZW2.local.complete) {
break;
}
++v1;
}
com.newgrounds.encoders.LZW2.local.busy = false;
}
}
if (com.newgrounds.encoders.LZW2.local.complete) {
trace('LZW2 complete ' + com.newgrounds.encoders.LZW2.nbChar + ' ' + com.newgrounds.encoders.LZW2.comp_dict.length + ' ' + com.newgrounds.encoders.LZW2.len + ' ' + com.newgrounds.encoders.LZW2.pos + ' ' + com.newgrounds.encoders.LZW2.skipnum);
clearInterval(com.newgrounds.encoders.LZW2.interval);
com.newgrounds.encoders.LZW2.local.callback(com.newgrounds.encoders.LZW2.result, com.newgrounds.encoders.LZW2.local.callback_params);
com.newgrounds.encoders.LZW2.result = '';
com.newgrounds.encoders.LZW2.buffer = '';
}
};
v1.encode_next = function () {
if (com.newgrounds.encoders.LZW2.pos <= com.newgrounds.encoders.LZW2.len) {
var v1 = com.newgrounds.encoders.LZW2.splitStr[com.newgrounds.encoders.LZW2.pos];
if (com.newgrounds.encoders.LZW2.comp_dict[com.newgrounds.encoders.LZW2.buffer + v1] !== undefined) {
com.newgrounds.encoders.LZW2.buffer += v1;
} else {
com.newgrounds.encoders.LZW2.result += String.fromCharCode(com.newgrounds.encoders.LZW2.comp_dict[com.newgrounds.encoders.LZW2.buffer]);
com.newgrounds.encoders.LZW2.comp_dict[com.newgrounds.encoders.LZW2.buffer + v1] = com.newgrounds.encoders.LZW2.nbChar;
++com.newgrounds.encoders.LZW2.nbChar;
com.newgrounds.encoders.LZW2.buffer = v1;
}
++com.newgrounds.encoders.LZW2.pos;
} else {
com.newgrounds.encoders.LZW2.local.complete = true;
return undefined;
}
};
v1.comp_config = false;
v1.skipnum = 5;
v1.busy = false;
v1.max_chunk_length = 12000;
ASSetPropFlags(com.newgrounds.encoders.LZW2.prototype, null, 1);
}
#endinitclip
}
movieClip 71 __Packages.com.newgrounds.encoders.LZW {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.LZW) {
var v1 = function () {};
com.newgrounds.encoders.LZW = v1;
var v2 = v1.prototype;
v1.setXMLSafe = function (x) {
com.newgrounds.encoders.LZW.xmlsafe = x;
};
v1.compress = function (str, escape_chars) {
var v2 = new Array();
var v11 = com.newgrounds.encoders.LZW.xmlsafe ? 5 : 0;
var v5 = 0;
while (v5 < 256) {
v2[String.fromCharCode(v5)] = v5;
++v5;
}
if (com.newgrounds.encoders.LZW.xmlsafe) {
v2.< = 256;
v2.> = 257;
v2.& = 258;
v2." = 259;
v2.\' = 260;
}
var v7 = '';
var v8 = str.split('');
var v9 = v8.length;
var v6 = 256 + v11;
var v1 = '';
var v4;
v5 = 0;
while (v5 <= v9) {
var v3 = v8[v5];
if (v2[v1 + v3] !== undefined) {
v1 += v3;
} else {
v4 = String.fromCharCode(v2[v1]);
if (escape_chars and (v2[v1] < 33 or v2[v1] > 126 or v4 == '%')) {
v4 = escape(v4);
}
v7 += v4;
v2[v1 + v3] = v6;
++v6;
v1 = v3;
}
++v5;
}
return v7;
};
v1.decompress = function (str) {
var v4 = new Array();
var v10 = com.newgrounds.encoders.LZW.xmlsafe ? 5 : 0;
var v6 = 0;
while (v6 < 256) {
var v9 = String.fromCharCode(v6);
v4[v6] = v9;
++v6;
}
if (com.newgrounds.encoders.LZW.xmlsafe) {
v4[256] = '<';
v4[257] = '>';
v4[258] = '&';
v4[259] = '"';
v4[260] = '\'';
}
var v11 = str;
var v13 = v11.split('');
var v12 = v13.length;
var v7 = 256 + v10;
var v1 = '';
var v2 = '';
var v8 = '';
v6 = 0;
while (v6 < v12) {
var v5 = v11.charCodeAt(v6);
var v3 = v4[v5];
if (v1 == '') {
v1 = v3;
v8 += v3;
} else {
if (v5 <= 255 + v10) {
v8 += v3;
v2 = v1 + v3;
v4[v7] = v2;
++v7;
v1 = v3;
} else {
v2 = v4[v5];
if (v2 == undefined) {
v2 = v1 + v1.slice(0, 1);
}
v8 += v2;
v4[v7] = v1 + v2.slice(0, 1);
++v7;
v1 = v2;
}
}
++v6;
}
return v8;
};
v1.compress_fp6 = function (str) {
var v3 = new Array();
var v10 = com.newgrounds.encoders.LZW.xmlsafe ? 5 : 0;
var v4 = 0;
while (v4 < 256) {
v3[String(v4)] = v4;
++v4;
}
if (com.newgrounds.encoders.LZW.xmlsafe) {
var v14 = String((new String('<')).charCodeAt(0));
var v11 = String((new String('>')).charCodeAt(0));
var v13 = String((new String('&')).charCodeAt(0));
var v15 = String((new String('"')).charCodeAt(0));
var v12 = String((new String('\'')).charCodeAt(0));
v3[v14] = 256;
v3[v11] = 257;
v3[v13] = 258;
v3[v15] = 259;
v3[v12] = 260;
}
var v7 = '';
var v16 = str;
var v8 = v16.split('');
var v9 = v8.length;
var v6 = 256 + v10;
var v1 = new Array();
v4 = 0;
while (v4 <= v9) {
var v2 = v8[v4];
if (v1.length == 0) {
var v5 = String(v2.charCodeAt(0));
} else {
var v5 = v1.join('-') + '-' + String(v2.charCodeAt(0));
}
if (v3[v5] !== undefined) {
v1.push(v2.charCodeAt(0));
} else {
v7 += String.fromCharCode(v3[v1.join('-')]);
v3[v5] = v6;
++v6;
false;
v1 = new Array();
v1.push(v2.charCodeAt(0));
}
++v4;
}
return v7;
};
v1.xmlsafe = false;
ASSetPropFlags(com.newgrounds.encoders.LZW.prototype, null, 1);
}
#endinitclip
}
movieClip 72 __Packages.com.newgrounds.RemoteAuth {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.RemoteAuth) {
var v1 = function (id) {
this.auth_token = id;
System.security.allowDomain('*');
this.receiver = new LocalConnection();
this.receiver.allowDomain = function () {
return true;
};
this.receiver.onAuth = function (auth_result) {
trace('remote login is a success! ' + auth_result);
com.newgrounds.API.onRemoteAuthentication(auth_result);
};
this.receiver.connect('_' + this.auth_token);
};
com.newgrounds.RemoteAuth = v1;
var v2 = v1.prototype;
v2.__get__token = function () {
return this.auth_token;
};
v2.addProperty('token', v2.__get__token, function () {});
ASSetPropFlags(com.newgrounds.RemoteAuth.prototype, null, 1);
}
#endinitclip
}
movieClip 73 __Packages.com.newgrounds.Medal {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Medal) {
var v1 = function (id, name, value, difficulty, unlocked, _icon_url) {
if (id == undefined || name == undefined || value == undefined || difficulty == undefined) {
com.newgrounds.API.fatalError('Medal instances require an id, name, value and difficulty');
}
this._medal_id = id;
this._medal_name = name;
this._medal_value = value;
this._medal_difficulty = difficulty;
if (unlocked) {
this._medal_unlocked = true;
}
if (_icon_url) {
this._icon_url = _icon_url;
}
};
com.newgrounds.Medal = v1;
var v2 = v1.prototype;
v2.__get__difficulty = function () {
return com.newgrounds.Medal.difficulty_names[this._medal_difficulty];
};
v2.__get__difficultyId = function () {
return this._medal_difficulty;
};
v2.__get__icon_url = function () {
return this._icon_url;
};
v2.__get__id = function () {
return this._medal_id;
};
v2.__get__name = function () {
return this._medal_name;
};
v2.__get__unlocked = function () {
return this._medal_unlocked;
};
v2.__get__value = function () {
return this._medal_value;
};
v2.isUnlocked = function () {
return this._medal_unlocked;
};
v2.unlock = function () {
if (!this.isUnlocked()) {
com.newgrounds.API.unlockMedal(this);
}
};
v2.setUnlocked = function (u) {
this._medal_unlocked = u;
};
v2.attachIcon = function (target, depth) {
if (!depth) {
depth = target.getNextHighestDepth();
}
var v3 = target.createEmptyMovieClip('Asset_Medal_Icon_' + this.getID(), depth);
if (this._icon_url) {
v3.loadMovie(this._icon_url);
} else {
var v4 = flash.display.BitmapData.loadBitmap('Asset_default_medal_icon_' + this.getDifficulty(), depth);
v3.attachBitmap(v4, depth, true);
}
};
v2.getID = function () {
return this._medal_id;
};
v2.getName = function () {
return this._medal_name;
};
v2.getValue = function () {
return this._medal_value;
};
v2.getDifficulty = function (as_string) {
if (as_string) {
return com.newgrounds.Medal.difficulty_names[this._medal_difficulty];
} else {
return this._medal_difficulty;
}
};
v2._medal_unlocked = false;
v2._icon_loaded = false;
v2._icon_width = 50;
v2._icon_height = 50;
v2._icon_url = null;
v1.difficulty_names = new Array(null, 'Easy', 'Moderate', 'Challenging', 'Difficult', 'Brutal');
v2.addProperty('difficulty', v2.__get__difficulty, function () {});
v2.addProperty('difficultyId', v2.__get__difficultyId, function () {});
v2.addProperty('icon_url', v2.__get__icon_url, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('unlocked', v2.__get__unlocked, function () {});
v2.addProperty('value', v2.__get__value, function () {});
ASSetPropFlags(com.newgrounds.Medal.prototype, null, 1);
}
#endinitclip
}
movieClip 74 __Packages.com.newgrounds.ScoreBoard {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.ScoreBoard) {
var v1 = function (id, name, tag) {
this._name = name;
this._id = id;
if (tag !== undefined) {
this._tag = tag;
}
};
com.newgrounds.ScoreBoard = v1;
var v2 = v1.prototype;
v2.exists = function () {
return Number(this._id) > 0;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__name = function () {
return this._name;
};
v2.__get__period = function () {
return this._period;
};
v2.__get__tag = function () {
return this._tag;
};
v2.__get__page = function () {
return this._page;
};
v2.__get__num_results = function () {
return this._num_results;
};
v2.__get__scores = function () {
return this._scores;
};
v2.postScore = function (value, tag) {
if (tag !== undefined) {
this._tag = tag;
}
com.newgrounds.API.postScore(this._name, value, this._tag);
};
v2.loadScores = function (period, page, num_results, tag) {
if (period) {
this._period = period;
}
if (page) {
this._page = page;
}
if (num_results) {
this._num_results = num_results;
}
this._scores = [];
com.newgrounds.API.loadScores(this._name, this._period, tag);
};
v2.setScores = function (scores, period, page, num_results) {
if (period) {
this._period = period;
}
if (page) {
this._page = page;
}
if (num_results) {
this._num_results = num_results;
}
this._scores = [];
var v2 = 0;
while (v2 < scores.length) {
var v4 = this._num_results * (this._page - 1) + 1 + v2;
this._scores.push(new com.newgrounds.Score(this, v4, scores[v2].username, scores[v2].value, scores[v2].numeric_value));
++v2;
}
};
v2._period = 'Today';
v2._num_results = 10;
v2._page = 1;
v2._tag = '';
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('num_results', v2.__get__num_results, function () {});
v2.addProperty('page', v2.__get__page, function () {});
v2.addProperty('period', v2.__get__period, function () {});
v2.addProperty('scores', v2.__get__scores, function () {});
v2.addProperty('tag', v2.__get__tag, function () {});
ASSetPropFlags(com.newgrounds.ScoreBoard.prototype, null, 1);
}
#endinitclip
}
movieClip 75 __Packages.com.newgrounds.encoders.RC4 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.RC4) {
var v1 = function () {};
com.newgrounds.encoders.RC4 = v1;
var v2 = v1.prototype;
v1.encrypt = function (src, key) {
var v3 = com.newgrounds.encoders.RC4.strToChars(src);
var v1 = com.newgrounds.encoders.RC4.strToChars(key);
var v2 = com.newgrounds.encoders.RC4.calculate(v3, v1);
return com.newgrounds.encoders.RC4.charsToHex(v2);
};
v1.encryptbin = function (src, key) {
var v3 = com.newgrounds.encoders.RC4.strToChars(src);
var v1 = com.newgrounds.encoders.RC4.strToChars(key);
var v2 = com.newgrounds.encoders.RC4.calculate(v3, v1);
return v2;
};
v1.decrypt = function (src, key) {
var v3 = com.newgrounds.encoders.RC4.hexToChars(src);
var v1 = com.newgrounds.encoders.RC4.strToChars(key);
var v2 = com.newgrounds.encoders.RC4.calculate(v3, v1);
return com.newgrounds.encoders.RC4.charsToStr(v2);
};
v1.initialize = function (pwd) {
var v2 = 0;
var v3;
var v4 = pwd.length;
var v1 = 0;
while (v1 <= 255) {
com.newgrounds.encoders.RC4.mykey[v1] = pwd[v1 % v4];
com.newgrounds.encoders.RC4.sbox[v1] = v1;
++v1;
}
v1 = 0;
while (v1 <= 255) {
v2 = (v2 + com.newgrounds.encoders.RC4.sbox[v1] + com.newgrounds.encoders.RC4.mykey[v1]) % 256;
v3 = com.newgrounds.encoders.RC4.sbox[v1];
com.newgrounds.encoders.RC4.sbox[v1] = com.newgrounds.encoders.RC4.sbox[v2];
com.newgrounds.encoders.RC4.sbox[v2] = v3;
++v1;
}
};
v1.calculate = function (plaintxt, psw) {
com.newgrounds.encoders.RC4.initialize(psw);
var v1 = 0;
var v2 = 0;
var v9 = new Array();
var v7;
var v5;
var v6;
var v3 = 0;
while (v3 < plaintxt.length) {
v1 = (v1 + 1) % 256;
v2 = (v2 + com.newgrounds.encoders.RC4.sbox[v1]) % 256;
v5 = com.newgrounds.encoders.RC4.sbox[v1];
com.newgrounds.encoders.RC4.sbox[v1] = com.newgrounds.encoders.RC4.sbox[v2];
com.newgrounds.encoders.RC4.sbox[v2] = v5;
var v4 = (com.newgrounds.encoders.RC4.sbox[v1] + com.newgrounds.encoders.RC4.sbox[v2]) % 256;
v7 = com.newgrounds.encoders.RC4.sbox[v4];
v6 = plaintxt[v3] ^ v7;
v9.push(v6);
++v3;
}
return v9;
};
v1.charsToHex = function (chars) {
var v4 = new String('');
var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
var v1 = 0;
while (v1 < chars.length) {
v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15];
++v1;
}
return v4;
};
v1.hexToChars = function (hex) {
var v3 = new Array();
var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0;
while (v1 < hex.length) {
v3.push(parseInt(hex.substr(v1, 2), 16));
v1 += 2;
}
return v3;
};
v1.charsToStr = function (chars) {
var v3 = new String('');
var v1 = 0;
while (v1 < chars.length) {
v3 += String.fromCharCode(chars[v1]);
++v1;
}
return v3;
};
v1.strToChars = function (str) {
var v3 = new Array();
var v1 = 0;
while (v1 < str.length) {
v3.push(str.charCodeAt(v1));
++v1;
}
return v3;
};
v1.sbox = new Array(255);
v1.mykey = new Array(255);
ASSetPropFlags(com.newgrounds.encoders.RC4.prototype, null, 1);
}
#endinitclip
}
movieClip 76 __Packages.com.newgrounds.encoders.JSON {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.JSON) {
var v1 = function () {};
com.newgrounds.encoders.JSON = v1;
var v2 = v1.prototype;
v1.encode = function (arg, noquotes) {
var v3;
var v2;
var v6;
var v1 = '';
var v4;
if (arg.isSServerVar()) {
var v8 = 'sservervariable';
} else {
var v8 = typeof arg;
}
switch (v8) {
return 'null';
case 'sservervariable':
return '?' + arg.getEncodedValue();
break;
case 'object':
if (arg) {
if (arg instanceof Array) {
v2 = 0;
while (v2 < arg.length) {
v4 = com.newgrounds.encoders.JSON.encode(arg[v2]);
if (v1) {
v1 += ',';
}
v1 += v4;
++v2;
}
return '[' + v1 + ']';
} else {
if (typeof arg.toString != 'undefined') {
for (v2 in arg) {
v4 = arg[v2];
if (typeof v4 != 'undefined' && typeof v4 != 'function') {
v4 = com.newgrounds.encoders.JSON.encode(v4);
if (v1) {
v1 += ',';
}
v1 += com.newgrounds.encoders.JSON.encode(v2) + ':' + v4;
}
}
return '{' + v1 + '}';
}
}
}
return 'null';
case 'number':
return isFinite(arg) ? String(arg) : 'null';
case 'string':
v6 = arg.length;
if (noquotes) {
var v7 = '';
} else {
var v7 = '"';
}
v1 = v7;
v2 = 0;
while (v2 < v6) {
v3 = arg.charAt(v2);
if (v3 >= ' ') {
if (v3 == '\\' || v3 == '"') {
v1 += '\\';
}
v1 += v3;
} else {
switch (v3) {
case '\b':
v1 += '\\b';
break;
case '\f':
v1 += '\\f';
break;
case '\n':
v1 += '\\n';
break;
case '\r':
v1 += '\\r';
break;
case '\t':
v1 += '\\t';
break;
default:
v3 = v3.charCodeAt();
v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16);
}
}
v2 += 1;
}
return v1 + v7;
case 'boolean':
return String(arg);
default:
return 'null';
}
};
v1.background_encode = function (arg, callback) {
if (com.newgrounds.encoders.JSON.busy) {
trace('[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed');
return false;
} else {
if (!callback) {
trace('[Newgrounds Encoder] :: Missing a callback function, skipping encode');
return false;
}
}
com.newgrounds.encoders.JSON.busy = true;
var v2 = new Date();
com.newgrounds.encoders.JSON.start = v2.getTime();
com.newgrounds.encoders.JSON.cache = {'busy': false, 'complete': false, 'arg': arg, 'target': arg, 'parents': [], 'encoded': '', 'callback': callback, 'encode_chunk': function () {
com.newgrounds.encoders.JSON.encode_chunk();
}};
if (com.newgrounds.encoders.JSON.getType(arg) == 'object') {
com.newgrounds.encoders.JSON.cache.encoded = '{';
com.newgrounds.encoders.JSON.interval = setInterval(com.newgrounds.encoders.JSON.cache, 'encode_chunk', 25);
return true;
}
if (com.newgrounds.encoders.JSON.getType(arg) == 'array') {
com.newgrounds.encoders.JSON.cache.encoded = '[';
}
com.newgrounds.encoders.JSON.interval = setInterval(com.newgrounds.encoders.JSON.cache, 'encode_chunk', 25);
return true;
};
v1.background_decode = function (arg, callback) {
if (com.newgrounds.encoders.JSON.busy) {
trace('[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed');
return false;
} else {
if (!callback) {
trace('[Newgrounds Encoder] :: Missing a callback function, skipping decode');
return false;
}
}
com.newgrounds.encoders.JSON.busy = true;
var v1 = new Date();
com.newgrounds.encoders.JSON.start = v1.getTime();
com.newgrounds.encoders.JSON.cache = {'busy': false, 'callback': callback, 'complete': false, 'arg': arg, 'pos': 0, 'parents': ['root'], 'target': null, 'scratch': '', 'decode_chunk': function () {
com.newgrounds.encoders.JSON.decode_chunk();
}};
com.newgrounds.encoders.JSON.interval = setInterval(com.newgrounds.encoders.JSON.cache, 'decode_chunk', 25);
return true;
};
v1.decode = function (text) {
var at = 0;
var ch = ' ';
var _value;
var _error = function (m) {
throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text};
};
var _next = function () {
ch = text.charAt(at);
at += 1;
return ch;
};
var _white = function () {
while (ch) {
if (ch <= ' ') {
_next();
} else {
if (ch == '/') {
switch (_next()) {
case '/':
for (;;) {
if (!(_next() && ch != '\n' && ch != '\r')) break;
}
break;
case '*':
_next();
for (;;) {
if (ch) {
if (ch == '*') {
if (_next() == '/') {
_next();
break;
}
} else {
_next();
}
continue;
}
_error('Unterminated comment');
}
break;
default:
_error('Syntax error');
}
} else {
break;
}
}
}
};
var _string = function () {
var v4;
var v1 = '';
var v3;
var v2;
var v5 = false;
if (ch == '"') {
while (_next()) {
if (ch == '"') {
_next();
return v1;
} else {
if (ch == '\\') {
switch (_next()) {
case 'b':
v1 += '\b';
break;
case 'f':
v1 += '\f';
break;
case 'n':
v1 += '\n';
break;
case 'r':
v1 += '\r';
break;
case 't':
v1 += '\t';
break;
case 'u':
v2 = 0;
v4 = 0;
while (v4 < 4) {
v3 = parseInt(_next(), 16);
if (!isFinite(v3)) {
v5 = true;
break;
}
v2 = v2 * 16 + v3;
v4 += 1;
}
if (v5) {
v5 = false;
} else {
v1 += String.fromCharCode(v2);
break;
default:
v1 += ch;
}
}
} else {
v1 += ch;
}
}
}
}
_error('Bad string');
};
var _array = function () {
var v1 = [];
if (ch == '[') {
_next();
_white();
if (ch == ']') {
_next();
return v1;
}
while (ch) {
v1.push(_value());
_white();
if (ch == ']') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad array');
};
var _object = function () {
var v2;
var v1 = {};
if (ch == '{') {
_next();
_white();
if (ch == '}') {
_next();
return v1;
}
while (ch) {
v2 = _string();
_white();
if (ch != ':') {
break;
}
_next();
v1[v2] = _value();
_white();
if (ch == '}') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad object');
};
var _number = function () {
var v1 = '';
var v2;
if (ch == '-') {
v1 = '-';
_next();
}
for (;;) {
if (!(ch >= '0' && ch <= '9')) break;
v1 += ch;
_next();
}
if (ch == '.') {
v1 += '.';
for (;;) {
if (!(_next() && ch >= '0' && ch <= '9')) break;
v1 += ch;
}
}
v2 = 1 * v1;
if (!isFinite(v2)) {
_error('Bad number');
} else {
return v2;
}
};
var _word = function () {
switch (ch) {
case 't':
if (_next() == 'r' && _next() == 'u' && _next() == 'e') {
_next();
return true;
}
break;
case 'f':
if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') {
_next();
return false;
}
break;
case 'n':
if (_next() == 'u' && _next() == 'l' && _next() == 'l') {
_next();
return null;
}
}
_error('Syntax error');
};
_value = function () {
_white();
switch (ch) {
case '{':
return _object();
case '[':
return _array();
case '"':
return _string();
case '-':
return _number();
}
return (ch >= '0' && ch <= '9') ? _number() : _word();
};
return _value();
};
v1.getType = function (v) {
if (v instanceof Array) {
return 'array';
} else {
return typeof v;
}
};
v1.decode_chunk = function () {
if (!com.newgrounds.encoders.JSON.cache.busy && !com.newgrounds.encoders.JSON.cache.complete) {
com.newgrounds.encoders.JSON.cache.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.JSON.decode_chunks) {
com.newgrounds.encoders.JSON.chunk_decoder();
if (com.newgrounds.encoders.JSON.cache.complete) {
break;
}
++v1;
}
trace(Math.round((com.newgrounds.encoders.JSON.cache.pos / com.newgrounds.encoders.JSON.cache.arg.length) * 100) + '% decoded');
com.newgrounds.encoders.JSON.cache.busy = false;
}
if (com.newgrounds.encoders.JSON.cache.complete) {
var v2 = new Date();
com.newgrounds.encoders.JSON.busy = false;
clearInterval(com.newgrounds.encoders.JSON.interval);
com.newgrounds.encoders.JSON.cache.callback(com.newgrounds.encoders.JSON.cache.root, v2.getTime() - com.newgrounds.encoders.JSON.start);
com.newgrounds.encoders.JSON.cache.arg = '';
}
};
v1.encode_chunk = function () {
if (!com.newgrounds.encoders.JSON.cache.busy && !com.newgrounds.encoders.JSON.cache.complete) {
com.newgrounds.encoders.JSON.cache.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.JSON.encode_chunks) {
com.newgrounds.encoders.JSON.chunk_encoder();
if (com.newgrounds.encoders.JSON.cache.complete) {
break;
}
++v1;
}
com.newgrounds.encoders.JSON.cache.busy = false;
}
if (com.newgrounds.encoders.JSON.cache.complete) {
var v3 = new Date();
var v2 = v3.getTime();
com.newgrounds.encoders.JSON.busy = false;
clearInterval(com.newgrounds.encoders.JSON.interval);
com.newgrounds.encoders.JSON.cache.callback(com.newgrounds.encoders.JSON.cache.encoded, v2 - com.newgrounds.encoders.JSON.start);
com.newgrounds.encoders.JSON.cache.encoded = '';
}
};
v1.chunk_decoder = function () {
function _object() {
var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (!com.newgrounds.encoders.JSON.cache.mode) {
com.newgrounds.encoders.JSON.cache.mode = 'object';
++com.newgrounds.encoders.JSON.cache.pos;
v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (v1 != '"') {
throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")';
}
com.newgrounds.encoders.JSON.cache.scratch = '';
_setTargetValue({});
} else {
if (v1 == ',') {
++com.newgrounds.encoders.JSON.cache.pos;
v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (v1 != '"') {
throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")';
}
com.newgrounds.encoders.JSON.cache.scratch = '';
} else {
if (v1 == '}') {
_useParent();
} else {
if (v1 == '"') {
++com.newgrounds.encoders.JSON.cache.pos;
v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (v1 != ':') {
throw 'Malformed object notation. Object keys and values must be separated by colons(:)';
}
_addParent(com.newgrounds.encoders.JSON.cache.scratch);
com.newgrounds.encoders.JSON.cache.mode = null;
} else {
if (v1 == '\\') {
++com.newgrounds.encoders.JSON.cache.pos;
v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
}
com.newgrounds.encoders.JSON.cache.scratch += v1;
}
}
}
}
++com.newgrounds.encoders.JSON.cache.pos;
}
function _array() {
var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (!com.newgrounds.encoders.JSON.cache.mode) {
com.newgrounds.encoders.JSON.cache.mode = 'array';
++com.newgrounds.encoders.JSON.cache.pos;
v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
_setTargetValue([]);
if (v1 != ']') {
_addArrayKey();
} else {
_useParent();
}
return undefined;
} else {
if (v1 == ',') {
_addArrayKey();
} else {
if (v1 == ']') {
_useParent();
}
}
}
++com.newgrounds.encoders.JSON.cache.pos;
}
function _boolean() {
var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (v1 == 't') {
_setTargetValue(true);
com.newgrounds.encoders.JSON.cache.pos += 3;
} else {
if (v1 == 'f') {
_setTargetValue(false);
com.newgrounds.encoders.JSON.cache.pos += 4;
} else {
throw 'Bool values must be true or false';
}
}
_useParent();
}
function _null() {
var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (v1 == 'n') {
_setTargetValue(null);
com.newgrounds.encoders.JSON.cache.pos += 2;
} else {
throw 'Null values must be null';
}
_useParent();
}
function _string() {
var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
if (!com.newgrounds.encoders.JSON.cache.mode) {
if (v1 != '"') {
throw 'Strings must be wrapped in quotes ("")';
}
com.newgrounds.encoders.JSON.cache.scratch = '';
com.newgrounds.encoders.JSON.cache.mode = 'string';
} else {
if (v1 == '"') {
_setTargetValue(com.newgrounds.encoders.JSON.cache.scratch);
_useParent();
} else {
if (v1 == '\\') {
++com.newgrounds.encoders.JSON.cache.pos;
v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
switch (v1) {
case 'n':
v1 = '\n';
break;
case 'r':
v1 = '\n';
break;
case 't':
v1 = '\t';
break;
case 'u':
v1 = '\\' + v1;
}
}
com.newgrounds.encoders.JSON.cache.scratch += v1;
}
}
++com.newgrounds.encoders.JSON.cache.pos;
}
function _number() {
var v1 = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
var v2 = '01234567890.-';
if (!com.newgrounds.encoders.JSON.cache.mode) {
com.newgrounds.encoders.JSON.cache.mode = 'number';
com.newgrounds.encoders.JSON.cache.scratch = '';
}
if (v2.indexOf(v1) < 0) {
_setTargetValue(Number(com.newgrounds.encoders.JSON.cache.scratch));
_useParent();
} else {
com.newgrounds.encoders.JSON.cache.scratch += v1;
++com.newgrounds.encoders.JSON.cache.pos;
}
}
function _setTargetValue(newval) {
var v2 = (_getParent()).obj;
var v1 = com.newgrounds.encoders.JSON.cache.parents[com.newgrounds.encoders.JSON.cache.parents.length - 1];
v2[v1] = newval;
}
function _useParent() {
com.newgrounds.encoders.JSON.cache.mode = com.newgrounds.encoders.JSON.getType((_getParent()).obj);
com.newgrounds.encoders.JSON.cache.parents.pop();
}
function _getParent() {
var v2 = com.newgrounds.encoders.JSON.cache;
var v1 = 0;
while (v1 < com.newgrounds.encoders.JSON.cache.parents.length - 1) {
v2 = v2[com.newgrounds.encoders.JSON.cache.parents[v1]];
++v1;
}
return {'obj': v2, 'name': com.newgrounds.encoders.JSON.cache.parents[v1]};
}
function _getCurrent() {
var v2 = com.newgrounds.encoders.JSON.cache;
var v1 = 0;
while (v1 < com.newgrounds.encoders.JSON.cache.parents.length) {
v2 = v2[com.newgrounds.encoders.JSON.cache.parents[v1]];
++v1;
}
return {'obj': v2, 'name': com.newgrounds.encoders.JSON.cache.parents[v1]};
}
function _addParent(child) {
com.newgrounds.encoders.JSON.cache.parents.push(child);
}
function _addArrayKey() {
var v1 = (_getCurrent()).obj.length;
com.newgrounds.encoders.JSON.cache.parents.push(v1);
com.newgrounds.encoders.JSON.cache.mode = null;
}
if (com.newgrounds.encoders.JSON.cache.pos >= com.newgrounds.encoders.JSON.cache.arg.length) {
com.newgrounds.encoders.JSON.cache.complete = true;
return undefined;
} else {
if (com.newgrounds.encoders.JSON.cache.mode) {
('_' + com.newgrounds.encoders.JSON.cache.mode)();
} else {
var char = com.newgrounds.encoders.JSON.cache.arg.charAt(com.newgrounds.encoders.JSON.cache.pos);
switch (char) {
case '{':
_object();
break;
case '[':
_array();
break;
case '"':
_string();
break;
case 'n':
_null();
break;
case 't':
_boolean();
break;
case 'f':
_boolean();
break;
default:
_number();
}
}
}
};
v1.chunk_encoder = function () {
if (com.newgrounds.encoders.JSON.cache.complete) {
return undefined;
}
var v2 = com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target);
switch (v2) {
case 'number':
com.newgrounds.encoders.JSON.cache.encoded += com.newgrounds.encoders.JSON.cache.target;
com.newgrounds.encoders.JSON.getParent();
break;
case 'string':
com.newgrounds.encoders.JSON.cache.encoded += '"' + (com.newgrounds.encoders.JSON.cache.target.split('"')).join('\\"') + '"';
com.newgrounds.encoders.JSON.getParent();
break;
case 'boolean':
com.newgrounds.encoders.JSON.cache.encoded += (com.newgrounds.encoders.JSON.cache.target == true) ? 'true' : 'false';
com.newgrounds.encoders.JSON.getParent();
break;
case 'null':
com.newgrounds.encoders.JSON.cache.encoded += 'null';
com.newgrounds.encoders.JSON.getParent();
break;
case 'array':
if (com.newgrounds.encoders.JSON.cache.target.length < 1) {
com.newgrounds.encoders.JSON.cache.encoded += ']';
com.newgrounds.encoders.JSON.getParent();
} else {
com.newgrounds.encoders.JSON.cache.parents.push(com.newgrounds.encoders.JSON.cache.target);
com.newgrounds.encoders.JSON.cache.target = com.newgrounds.encoders.JSON.cache.target[0];
if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'array') {
com.newgrounds.encoders.JSON.cache.encoded += '[';
} else {
if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'object') {
com.newgrounds.encoders.JSON.cache.encoded += '{';
}
}
}
break;
case 'object':
for (var v1 in com.newgrounds.encoders.JSON.cache.target) {
break;
}
if (v1 === undefined) {
com.newgrounds.encoders.JSON.cache.encoded += '}';
com.newgrounds.encoders.JSON.getParent();
} else {
com.newgrounds.encoders.JSON.cache.parents.push(com.newgrounds.encoders.JSON.cache.target);
com.newgrounds.encoders.JSON.cache.target = com.newgrounds.encoders.JSON.cache.target[v1];
com.newgrounds.encoders.JSON.cache.encoded += '"' + (v1.split('"')).join('\\"') + '":';
if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'array') {
com.newgrounds.encoders.JSON.cache.encoded += '[';
} else {
if (com.newgrounds.encoders.JSON.getType(com.newgrounds.encoders.JSON.cache.target) == 'object') {
com.newgrounds.encoders.JSON.cache.encoded += '{';
}
}
}
break;
default:
com.newgrounds.encoders.JSON.cache.encoded += 'null';
com.newgrounds.encoders.JSON.getParent();
}
};
v1.getParent = function () {
if (com.newgrounds.encoders.JSON.cache.parents.length > 0) {
var v1 = com.newgrounds.encoders.JSON.cache.parents.pop();
if (com.newgrounds.encoders.JSON.getType(v1) == 'array') {
v1.shift();
} else {
for (var v3 in v1) {
delete v1[v3];
break;
}
}
if (com.newgrounds.encoders.JSON.getType(v1) == 'object' or com.newgrounds.encoders.JSON.getType(v1) == 'array') {
for (var v2 in v1) {
break;
}
if (v2 !== undefined) {
com.newgrounds.encoders.JSON.cache.encoded += ',';
}
}
com.newgrounds.encoders.JSON.cache.target = v1;
} else {
com.newgrounds.encoders.JSON.cache.complete = true;
}
};
v1.encode_chunks = 20000;
v1.decode_chunks = 20000;
v1.busy = false;
ASSetPropFlags(com.newgrounds.encoders.JSON.prototype, null, 1);
}
#endinitclip
}
movieClip 77 __Packages.com.newgrounds.APIEventDispatcher {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIEventDispatcher) {
var v1 = function () {};
com.newgrounds.APIEventDispatcher = v1;
var v2 = v1.prototype;
v2.addEventListener = function (event, callback, target) {
if (!target) {
throw 'Attempted to create a listener without providing a target object.';
}
if (!this.listeners[event]) {
this.listeners[event] = [];
} else {
this.removeEventListener(event, target);
}
this.listeners[event].push({'target': target, 'callback': callback});
};
v2.removeEventListener = function (event, target) {
if (!target) {
throw 'Attempted to remove a listener without providing a target object.';
}
if (!this.listeners[event] || this.listeners[event].length < 1) {
return undefined;
}
var v4 = [];
var v2 = 0;
while (v2 < this.listeners[event].length) {
if (this.listeners[event][v2].target != target) {
v4.push(this.listeners[event][v2]);
}
++v2;
}
this.listeners[event] = v4;
};
v2.dispatchEvent = function (event) {
if (!this.hasEventListener(event.__get__type())) {
return false;
}
this.collectGarbage(event.__get__type());
var v2 = 0;
while (v2 < this.listeners[event.__get__type()].length) {
var v4 = this.listeners[event.__get__type()][v2].callback;
if (this.listeners[event.__get__type()][v2].target) {
var v5 = this.listeners[event.__get__type()][v2].target;
v4.call(v5, event);
} else {
v4(event);
}
++v2;
}
return true;
};
v2.hasEventListener = function (event) {
return this.listeners[event] != undefined && this.listeners[event].length > 0;
};
v2.collectGarbage = function (event) {
var v5 = [];
if (!this.hasEventListener) {
return undefined;
}
var v2 = 0;
while (v2 < this.listeners[event].length) {
var v4 = this.listeners[event][v2].target;
if (v4) {
v5.push(this.listeners[event][v2]);
}
++v2;
}
this.listeners[event] = v5;
};
v2.listeners = {};
ASSetPropFlags(com.newgrounds.APIEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 78 __Packages.com.newgrounds.encoders.MD5 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.MD5) {
var v1 = function () {};
com.newgrounds.encoders.MD5 = v1;
var v2 = v1.prototype;
v1.calculate = function (src) {
return com.newgrounds.encoders.MD5.hex_md5(src);
};
v1.hex_md5 = function (src) {
return com.newgrounds.encoders.MD5.binl2hex(com.newgrounds.encoders.MD5.core_md5(com.newgrounds.encoders.MD5.str2binl(src), src.length * 8));
};
v1.core_md5 = function (x, len) {
x[len >> 5] |= 128 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var v4 = 1732584193;
var v3 = -271733879;
var v2 = -1732584194;
var v1 = 271733878;
var v5 = 0;
while (v5 < x.length) {
var v10 = v4;
var v9 = v3;
var v8 = v2;
var v7 = v1;
v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936);
v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586);
v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819);
v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330);
v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897);
v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426);
v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341);
v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983);
v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416);
v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417);
v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063);
v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162);
v4 = com.newgrounds.encoders.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682);
v1 = com.newgrounds.encoders.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101);
v2 = com.newgrounds.encoders.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290);
v3 = com.newgrounds.encoders.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329);
v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510);
v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632);
v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713);
v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302);
v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691);
v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083);
v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335);
v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848);
v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438);
v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690);
v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961);
v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501);
v4 = com.newgrounds.encoders.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467);
v1 = com.newgrounds.encoders.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784);
v2 = com.newgrounds.encoders.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473);
v3 = com.newgrounds.encoders.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734);
v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558);
v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463);
v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562);
v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556);
v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060);
v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353);
v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632);
v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640);
v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174);
v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222);
v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979);
v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189);
v4 = com.newgrounds.encoders.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487);
v1 = com.newgrounds.encoders.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835);
v2 = com.newgrounds.encoders.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520);
v3 = com.newgrounds.encoders.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651);
v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844);
v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415);
v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905);
v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055);
v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571);
v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606);
v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523);
v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799);
v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359);
v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744);
v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380);
v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649);
v4 = com.newgrounds.encoders.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070);
v1 = com.newgrounds.encoders.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379);
v2 = com.newgrounds.encoders.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259);
v3 = com.newgrounds.encoders.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551);
v4 = com.newgrounds.encoders.MD5.safe_add(v4, v10);
v3 = com.newgrounds.encoders.MD5.safe_add(v3, v9);
v2 = com.newgrounds.encoders.MD5.safe_add(v2, v8);
v1 = com.newgrounds.encoders.MD5.safe_add(v1, v7);
v5 += 16;
}
return new Array(v4, v3, v2, v1);
};
v1.md5_cmn = function (q, a, b, x, s, t) {
return com.newgrounds.encoders.MD5.safe_add(com.newgrounds.encoders.MD5.bit_rol(com.newgrounds.encoders.MD5.safe_add(com.newgrounds.encoders.MD5.safe_add(a, q), com.newgrounds.encoders.MD5.safe_add(x, t)), s), b);
};
v1.md5_ff = function (a, b, c, d, x, s, t) {
return com.newgrounds.encoders.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t);
};
v1.md5_gg = function (a, b, c, d, x, s, t) {
return com.newgrounds.encoders.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t);
};
v1.md5_hh = function (a, b, c, d, x, s, t) {
return com.newgrounds.encoders.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t);
};
v1.md5_ii = function (a, b, c, d, x, s, t) {
return com.newgrounds.encoders.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t);
};
v1.bit_rol = function (num, cnt) {
return num << cnt | num >>> 32 - cnt;
};
v1.safe_add = function (x, y) {
var v1 = (x & 65535) + (y & 65535);
var v2 = (x >> 16) + (y >> 16) + (v1 >> 16);
return v2 << 16 | v1 & 65535;
};
v1.str2binl = function (str) {
var v3 = new Array();
var v4 = 255;
var v1 = 0;
while (v1 < str.length * 8) {
v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32;
v1 += 8;
}
return v3;
};
v1.binl2hex = function (binarray) {
var v4 = new String('');
var v3 = new String('0123456789abcdef');
var v1 = 0;
while (v1 < binarray.length * 4) {
v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15);
++v1;
}
return v4;
};
ASSetPropFlags(com.newgrounds.encoders.MD5.prototype, null, 1);
}
#endinitclip
}
movieClip 79 __Packages.com.newgrounds.Score {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Score) {
var v1 = function (board, position, username, value, numeric_value) {
this._board = board;
this._position = position;
this._username = username;
this._value = value;
this._numeric_value = numeric_value;
};
com.newgrounds.Score = v1;
var v2 = v1.prototype;
v2.__get__board = function () {
return this._board;
};
v2.__get__position = function () {
return this._position;
};
v2.__get__username = function () {
return this._username;
};
v2.__get__value = function () {
return this._value;
};
v2.__get__numeric_value = function () {
return this._numeric_value;
};
v1.fromTime = function (time) {
var v1 = time.split(':');
var v2 = Math.round(Number(v1.pop()) * 1000);
if (v1.length > 0) {
v2 += Number(v1.pop()) * 60;
}
if (v1.length > 0) {
v2 += Number(v1.pop()) * 3600;
}
return v2;
};
v1.fromDistance = function (distance) {
var v1 = distance.indexOf('\'');
var v5 = distance.indexOf('"', v1);
var v3 = Number(distance.substr(0, v1));
var v4 = Number(distance.substring(v1 + 1, v5));
return Math.round(v3 * 12 + v4);
};
v2.addProperty('board', v2.__get__board, function () {});
v2.addProperty('numeric_value', v2.__get__numeric_value, function () {});
v2.addProperty('position', v2.__get__position, function () {});
v2.addProperty('username', v2.__get__username, function () {});
v2.addProperty('value', v2.__get__value, function () {});
ASSetPropFlags(com.newgrounds.Score.prototype, null, 1);
}
#endinitclip
}
movieClip 80 __Packages.mx.video.FLVPlayback {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.FLVPlayback) {
var v1 = function () {
super();
mx.events.EventDispatcher.initialize(this);
if (this._autoPlay == undefined) {
this._autoPlay = true;
}
if (this._autoRewind == undefined) {
this._autoRewind = true;
}
if (this._autoSize == undefined) {
this._autoSize = false;
}
if (this._bufferTime == undefined) {
this._bufferTime = 0.1;
}
if (this._contentPath == undefined) {
this._contentPath = '';
}
if (this._cuePoints == undefined) {
this._cuePoints = null;
}
if (this._idleTimeout == undefined) {
this._idleTimeout = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL;
}
if (this._isLive == undefined) {
this._isLive = false;
}
if (this._aspectRatio == undefined) {
this._aspectRatio = true;
}
if (this._seekToPrevOffset == undefined) {
this._seekToPrevOffset = mx.video.FLVPlayback.SEEK_TO_PREV_OFFSET_DEFAULT;
}
if (this._playheadUpdateInterval == undefined) {
this._playheadUpdateInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL;
}
if (this._progressInterval == undefined) {
this._progressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL;
}
if (this._totalTime == undefined) {
this._totalTime = 0;
}
if (this._transform == undefined) {
this._transform = null;
}
if (this._volume == undefined) {
this._volume = 100;
}
if (this._skinAutoHide == undefined) {
this._skinAutoHide = false;
}
if (this._bufferingBarHides == undefined) {
this._bufferingBarHides = false;
}
this.__height = this._height;
this._origHeight = this.__height;
this.__width = this._width;
this._origWidth = this.__width;
this._scaleX = 100;
this._scaleY = 100;
this._xscale = 100;
this._yscale = 100;
this._preSeekTime = -1;
this._firstStreamReady = false;
this._firstStreamShown = false;
this.createUIManager();
this._activeVP = 0;
this._visibleVP = 0;
this._topVP = 0;
this._vp = new Array();
this._vpState = new Array();
this._cpMgr = new Array();
this.createVideoPlayer(0);
this._vp[0].visible = false;
this._vp[0].volume = 0;
this.boundingBox_mc._visible = false;
this.boundingBox_mc.unloadMovie();
delete this.boundingBox_mc;
if (_global.isLivePreview) {
this.createLivePreviewMovieClip();
this.setSize(this.__width, this.__height);
}
this._cpMgr[0].processCuePointsProperty(this._cuePoints);
delete this._cuePoints;
this._cuePoints = null;
};
mx.video.FLVPlayback = v1;
mx.video.FLVPlayback extends MovieClip;
var v2 = v1.prototype;
v2.setSize = function (w, h) {
if (_global.isLivePreview) {
if (this.preview_mc == undefined) {
this.createLivePreviewMovieClip();
}
this.preview_mc.box_mc._width = w;
this.preview_mc.box_mc._height = h;
if (this.preview_mc.box_mc._width < this.preview_mc.icon_mc._width || this.preview_mc.box_mc._height < this.preview_mc.icon_mc._height) {
this.preview_mc.icon_mc._visible = false;
} else {
this.preview_mc.icon_mc._visible = true;
this.preview_mc.icon_mc._x = (this.preview_mc.box_mc._width - this.preview_mc.icon_mc._width) / 2;
this.preview_mc.icon_mc._y = (this.preview_mc.box_mc._height - this.preview_mc.icon_mc._height) / 2;
}
}
if (w == this.__get__width() && h == this.__get__height()) {
return undefined;
}
this.__width = w;
this.__height = h;
var v3 = 0;
while (v3 < this._vp.length) {
if (this._vp[v3] != undefined) {
this._vp[v3].setSize(w, h);
}
++v3;
}
this.dispatchEvent({'type': 'resize', 'x': this.__get__x(), 'y': this.__get__y(), 'width': w, 'height': h});
};
v2.setScale = function (xs, ys) {
if (xs == this.__get__scaleX() && ys == this.__get__scaleY()) {
return undefined;
}
this._scaleX = xs;
this._scaleY = ys;
var v2 = 0;
while (v2 < this._vp.length) {
if (this._vp[v2] != undefined) {
this._vp[v2].setSize(this._origWidth * xs / 100, this._origHeight * ys / 100);
}
++v2;
}
this.dispatchEvent({'type': 'resize', 'x': this.__get__x(), 'y': this.__get__y(), 'width': this.__get__width(), 'height': this.__get__height()});
};
v2.handleEvent = function (e) {
var v3 = e.state;
if (e.state != undefined && e.target._name == this._visibleVP && this.__get__scrubbing()) {
v3 = mx.video.FLVPlayback.SEEKING;
}
if (e.type == 'metadataReceived') {
this._cpMgr[e.target._name].processFLVCuePoints(e.info.cuePoints);
this.dispatchEvent({'type': e.type, 'info': e.info, 'vp': e.target._name});
} else {
if (e.type == 'cuePoint') {
if (this._cpMgr[e.target._name].isFLVCuePointEnabled(e.info)) {
this.dispatchEvent({'type': e.type, 'info': e.info, 'vp': e.target._name});
}
} else {
if (e.type == 'rewind') {
this.dispatchEvent({'type': e.type, 'auto': true, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
this._cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime);
} else {
if (e.type == 'resize') {
this.dispatchEvent({'type': e.type, 'x': this.__get__x(), 'y': this.__get__y(), 'width': this.__get__width(), 'height': this.__get__height(), 'auto': true, 'vp': e.target._name});
} else {
if (e.type == 'playheadUpdate') {
this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
if (this._preSeekTime >= 0 && e.target.state != mx.video.FLVPlayback.SEEKING) {
var v5 = this._preSeekTime;
this._preSeekTime = -1;
this._cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime);
this.dispatchEvent({'type': 'seek', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
if (v5 < e.playheadTime) {
this.dispatchEvent({'type': 'fastForward', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
} else {
if (v5 > e.playheadTime) {
this.dispatchEvent({'type': 'rewind', 'auto': false, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
}
}
}
this._cpMgr[e.target._name].dispatchASCuePoints();
} else {
if (e.type == 'stateChange') {
var v4 = e.target._name;
if (v4 == this._visibleVP && this.__get__scrubbing()) {
return undefined;
}
if (e.state == mx.video.VideoPlayer.RESIZING) {
return undefined;
}
if (this._vpState[v4].prevState == mx.video.FLVPlayback.LOADING && this._vpState[v4].autoPlay && e.state == mx.video.FLVPlayback.STOPPED) {
return undefined;
}
this._vpState[v4].prevState = e.state;
this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
if (this._vp[e.target._name].state != v3) {
return undefined;
}
switch (v3) {
case mx.video.FLVPlayback.BUFFERING:
this.dispatchEvent({'type': 'buffering', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
break;
case mx.video.FLVPlayback.PAUSED:
this.dispatchEvent({'type': 'paused', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
break;
case mx.video.FLVPlayback.PLAYING:
this.dispatchEvent({'type': 'playing', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
break;
case mx.video.FLVPlayback.STOPPED:
this.dispatchEvent({'type': 'stopped', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
}
} else {
if (e.type == 'progress') {
this.dispatchEvent({'type': e.type, 'bytesLoaded': e.bytesLoaded, 'bytesTotal': e.bytesTotal, 'vp': e.target._name});
} else {
if (e.type == 'ready') {
var v4 = e.target._name;
if (!this._firstStreamReady) {
if (v4 == this._visibleVP) {
this._firstStreamReady = true;
if (this._uiMgr.__get__skinReady() && !this._firstStreamShown) {
this._uiMgr.__set__visible(true);
this.showFirstStream();
}
}
} else {
if (this._firstStreamShown && v3 == mx.video.FLVPlayback.STOPPED && this._vpState[v4].autoPlay) {
this._vp[v4].play();
}
}
this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
} else {
if (e.type == 'close' || e.type == 'complete') {
this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name});
}
}
}
}
}
}
}
}
}
};
v2.load = function (contentPath, totalTime, isLive) {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
if (contentPath == null || contentPath == '') {
return undefined;
}
this.__set__autoPlay(false);
if (totalTime != undefined) {
this.__set__totalTime(totalTime);
}
if (isLive != undefined) {
this.__set__isLive(isLive);
}
this.__set__contentPath(contentPath);
};
v2.play = function (contentPath, totalTime, isLive) {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
if (contentPath == undefined) {
this._vp[this._activeVP].play();
} else {
this.__set__autoPlay(true);
if (totalTime != undefined) {
this.__set__totalTime(totalTime);
}
if (isLive != undefined) {
this.__set__isLive(isLive);
}
this.__set__contentPath(contentPath);
}
};
v2.pause = function () {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
this._vp[this._activeVP].pause();
};
v2.stop = function () {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
this._vp[this._activeVP].stop();
};
v2.seek = function (time) {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
this._preSeekTime = this.playheadTime;
this._vp[this._activeVP].seek(time);
};
v2.seekSeconds = function (time) {
this.seek(time);
};
v2.seekPercent = function (percent) {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
if (percent < 0 || percent > 100 || this._vp[this._activeVP].totalTime == null || this._vp[this._activeVP].totalTime <= 0) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
this.seek(this._vp[this._activeVP].totalTime * percent / 100);
};
v2.__get__playheadPercentage = function () {
if (this._vp[this._activeVP].totalTime == null || this._vp[this._activeVP].totalTime <= 0) {
return undefined;
}
return (this._vp[this._activeVP].playheadTime / this._vp[this._activeVP].totalTime) * 100;
};
v2.__set__playheadPercentage = function (percent) {
this.seekPercent(percent);
return this.__get__playheadPercentage();
};
v2.seekToNavCuePoint = function (timeNameOrCuePoint) {
var v3;
switch (typeof timeNameOrCuePoint) {
case 'string':
v3 = {'name': timeNameOrCuePoint};
break;
case 'number':
v3 = {'time': timeNameOrCuePoint};
break;
case 'object':
v3 = timeNameOrCuePoint;
}
if (v3.name == null || typeof v3.name != 'string') {
this.seekToNextNavCuePoint(v3.time);
return undefined;
}
if (isNaN(v3.time)) {
v3.time = 0;
}
var v2 = this.findNearestCuePoint(timeNameOrCuePoint, mx.video.FLVPlayback.NAVIGATION);
for (;;) {
if (!(v2 != null && (v2.time < v3.time || !this.isFLVCuePointEnabled(v2)))) break;
v2 = this.findNextCuePointWithName(v2);
}
if (v2 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
this.seek(v2.time);
};
v2.seekToNextNavCuePoint = function (time) {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
if (isNaN(time) || time < 0) {
time = this._vp[this._activeVP].playheadTime + 0.001;
}
var v3;
v3 = this.findNearestCuePoint(time, mx.video.FLVPlayback.NAVIGATION);
if (v3 == null) {
this.seek(this._vp[this._activeVP].totalTime);
return undefined;
}
var v2 = v3.index;
if (v3.time < time) {
++v2;
}
for (;;) {
if (!(v2 < v3.array.length && !this.isFLVCuePointEnabled(v3.array[v2]))) break;
++v2;
}
if (v2 >= v3.array.length) {
var v5 = this._vp[this._activeVP].totalTime;
if (v3.array[v3.array.length - 1].time > v5) {
v5 = v3.array[v3.array.length - 1];
}
this.seek(v5);
} else {
this.seek(v3.array[v2].time);
}
};
v2.seekToPrevNavCuePoint = function (time) {
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
if (isNaN(time) || time < 0) {
time = this._vp[this._activeVP].playheadTime;
}
var v3 = this.findNearestCuePoint(time, mx.video.FLVPlayback.NAVIGATION);
if (v3 == null) {
this.seek(0);
return undefined;
}
var v2 = v3.index;
for (;;) {
if (!(v2 >= 0 && (!this.isFLVCuePointEnabled(v3.array[v2]) || v3.array[v2].time >= time - this._seekToPrevOffset))) break;
--v2;
}
if (v2 < 0) {
this.seek(0);
} else {
this.seek(v3.array[v2].time);
}
};
v2.addASCuePoint = function (timeOrCuePoint, name, parameters) {
return this._cpMgr[this._activeVP].addASCuePoint(timeOrCuePoint, name, parameters);
};
v2.removeASCuePoint = function (timeNameOrCuePoint) {
return this._cpMgr[this._activeVP].removeASCuePoint(timeNameOrCuePoint);
};
v2.findCuePoint = function (timeNameOrCuePoint, type) {
switch (type) {
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, false, timeNameOrCuePoint);
case 'event':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].eventCuePoints, false, timeNameOrCuePoint);
case 'navigation':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].navCuePoints, false, timeNameOrCuePoint);
case 'flv':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].flvCuePoints, false, timeNameOrCuePoint);
case 'actionscript':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].asCuePoints, false, timeNameOrCuePoint);
case 'all':
}
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, false, timeNameOrCuePoint);
};
v2.findNearestCuePoint = function (timeNameOrCuePoint, type) {
switch (type) {
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, true, timeNameOrCuePoint);
case 'event':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].eventCuePoints, true, timeNameOrCuePoint);
case 'navigation':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].navCuePoints, true, timeNameOrCuePoint);
case 'flv':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].flvCuePoints, true, timeNameOrCuePoint);
case 'actionscript':
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].asCuePoints, true, timeNameOrCuePoint);
case 'all':
}
return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, true, timeNameOrCuePoint);
};
v2.findNextCuePointWithName = function (cuePoint) {
return this._cpMgr[this._activeVP].getNextCuePointWithName(cuePoint);
};
v2.setFLVCuePointEnabled = function (enabled, timeNameOrCuePoint) {
return this._cpMgr[this._activeVP].setFLVCuePointEnabled(enabled, timeNameOrCuePoint);
};
v2.isFLVCuePointEnabled = function (timeNameOrCuePoint) {
return this._cpMgr[this._activeVP].isFLVCuePointEnabled(timeNameOrCuePoint);
};
v2.getNextHighestDepth = function () {
var v2 = super.getNextHighestDepth();
return v2 < 1000 ? 1000 : v2;
};
v2.bringVideoPlayerToFront = function (index) {
if (index == this._topVP || this._vp[index] == undefined) {
return undefined;
}
this._vp[this._topVP].swapDepths(this._vp[index].getDepth());
this._topVP = index;
};
v2.getVideoPlayer = function (index) {
return this._vp[index];
};
v2.closeVideoPlayer = function (index) {
if (this._vp[index] == undefined) {
return undefined;
}
if (index == 0) {
throw new mx.video.VideoError(mx.video.VideoError.DELETE_DEFAULT_PLAYER);
}
if (this._visibleVP == index) {
this.__set__visibleVideoPlayerIndex(0);
}
if (this._activeVP == index) {
this.__set__activeVideoPlayerIndex(0);
}
this._vp[index].close();
this._vp[index].unloadMovie();
delete this._vp[index];
this._vp[index] = undefined;
};
v2.__get__activeVideoPlayerIndex = function () {
return this._activeVP;
};
v2.__set__activeVideoPlayerIndex = function (i) {
if (this._activeVP == i) {
return undefined;
}
if (this._vp[this._activeVP].onEnterFrame != undefined) {
this.doContentPathConnect();
}
this._activeVP = i;
if (this._vp[this._activeVP] == undefined) {
this.createVideoPlayer(this._activeVP);
this._vp[this._activeVP].visible = false;
this._vp[this._activeVP].volume = 0;
}
return this.__get__activeVideoPlayerIndex();
};
v2.__get__autoPlay = function () {
if (this._vpState[this._activeVP] == undefined) {
return this._autoPlay;
}
return this._vpState[this._activeVP].autoPlay;
};
v2.__set__autoPlay = function (flag) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._autoPlay = flag;
}
this._vpState[this._activeVP].autoPlay = flag;
return this.__get__autoPlay();
};
v2.__get__autoRewind = function () {
if (this._vp[this._activeVP] == undefined) {
return this._autoRewind;
}
return this._vp[this._activeVP].autoRewind;
};
v2.__set__autoRewind = function (flag) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._autoRewind = flag;
}
this._vp[this._activeVP].autoRewind = flag;
return this.__get__autoRewind();
};
v2.__get__autoSize = function () {
if (this._vp[this._activeVP] == undefined) {
return this._autoSize;
}
return this._vp[this._activeVP].autoSize;
};
v2.__set__autoSize = function (flag) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._autoSize = flag;
}
this._vp[this._activeVP].autoSize = flag;
return this.__get__autoSize();
};
v2.__get__bitrate = function () {
return (this.__get__ncMgr()).getBitrate();
};
v2.__set__bitrate = function (b) {
(this.__get__ncMgr()).setBitrate(b);
return this.__get__bitrate();
};
v2.__get__buffering = function () {
if (this._vp[this._activeVP] == undefined) {
return false;
}
return this._vp[this._activeVP].state == mx.video.FLVPlayback.BUFFERING;
};
v2.__get__bufferingBar = function () {
if (this._uiMgr != null) {
this._bufferingBar = this._uiMgr.getControl(mx.video.UIManager.BUFFERING_BAR);
}
return this._bufferingBar;
};
v2.__set__bufferingBar = function (s) {
this._bufferingBar = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, s);
}
return this.__get__bufferingBar();
};
v2.__get__bufferingBarHidesAndDisablesOthers = function () {
if (this._uiMgr != null) {
this._bufferingBarHides = this._uiMgr.bufferingBarHidesAndDisablesOthers;
}
return this._bufferingBarHides;
};
v2.__set__bufferingBarHidesAndDisablesOthers = function (b) {
this._bufferingBarHides = b;
if (this._uiMgr != null) {
this._uiMgr.__set__bufferingBarHidesAndDisablesOthers(b);
}
return this.__get__bufferingBarHidesAndDisablesOthers();
};
v2.__get__backButton = function () {
if (this._uiMgr != null) {
this._backButton = this._uiMgr.getControl(mx.video.UIManager.BACK_BUTTON);
}
return this._backButton;
};
v2.__set__backButton = function (s) {
this._backButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, s);
}
return this.__get__backButton();
};
v2.__get__bufferTime = function () {
if (this._vp[this._activeVP] == undefined) {
return this._bufferTime;
}
return this._vp[this._activeVP].bufferTime;
};
v2.__set__bufferTime = function (aTime) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._bufferTime = aTime;
}
this._vp[this._activeVP].bufferTime = aTime;
return this.__get__bufferTime();
};
v2.__get__bytesLoaded = function () {
return this._vp[this._activeVP].bytesLoaded;
};
v2.__get__bytesTotal = function () {
return this._vp[this._activeVP].bytesTotal;
};
v2.__get__contentPath = function () {
if (this._vp[this._activeVP] == undefined || this._vp[this._activeVP].onEnterFrame != undefined) {
return this._contentPath;
}
return this._vp[this._activeVP].url;
};
v2.__set__contentPath = function (url) {
if (_global.isLivePreview) {
return undefined;
}
if (this._vp[this._activeVP] == undefined) {
if (url == this._contentPath) {
return undefined;
}
this._contentPath = url;
} else {
if (this._vp[this._activeVP].url == url) {
return undefined;
}
this._vpState[this._activeVP].minProgressPercent = undefined;
if (this._vp[this._activeVP].onEnterFrame != undefined) {
delete this._vp[this._activeVP].onEnterFrame;
this._vp[this._activeVP].onEnterFrame = undefined;
}
this._cpMgr[this._activeVP].reset();
if (this._vpState[this._activeVP].autoPlay && this._firstStreamShown) {
this._vp[this._activeVP].play(url, this._vpState[this._activeVP].isLive, this._vpState[this._activeVP].totalTime);
} else {
this._vp[this._activeVP].load(url, this._vpState[this._activeVP].isLive, this._vpState[this._activeVP].totalTime);
}
this._vpState[this._activeVP].isLiveSet = false;
this._vpState[this._activeVP].totalTimeSet = false;
}
return this.__get__contentPath();
};
v2.__set__cuePoints = function (cp) {
if (this._cuePoints != undefined) {
return undefined;
}
this._cuePoints = cp;
return this.__get__cuePoints();
};
v2.__get__forwardButton = function () {
if (this._uiMgr != null) {
this._forwardButton = this._uiMgr.getControl(mx.video.UIManager.FORWARD_BUTTON);
}
return this._forwardButton;
};
v2.__set__forwardButton = function (s) {
this._forwardButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, s);
}
return this.__get__forwardButton();
};
v2.__get__height = function () {
if (_global.isLivePreview) {
return this.__height;
}
if (this._vp[this._visibleVP] != undefined) {
this.__height = this._vp[this._visibleVP].height;
}
return this.__height;
};
v2.__set__height = function (h) {
this.setSize(this.__get__width(), h);
return this.__get__height();
};
v2.__get__idleTimeout = function () {
if (this._vp[this._activeVP] == undefined) {
return this._idleTimeout;
}
return this._vp[this._activeVP].idleTimeout;
};
v2.__set__idleTimeout = function (aTime) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._idleTimeout = aTime;
}
this._vp[this._activeVP].idleTimeout = aTime;
return this.__get__idleTimeout();
};
v2.__get__isRTMP = function () {
if (_global.isLivePreview) {
return true;
}
if (this._vp[this._activeVP] == undefined) {
return undefined;
}
return this._vp[this._activeVP].isRTMP;
};
v2.__get__isLive = function () {
if (this._vp[this._activeVP] == undefined) {
return this._isLive;
} else {
if (this._vpState[this._activeVP].isLiveSet) {
return this._vpState[this._activeVP].isLive;
} else {
return this._vp[this._activeVP].isLive;
}
}
};
v2.__set__isLive = function (flag) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._isLive = flag;
}
this._vpState[this._activeVP].isLive = flag;
this._vpState[this._activeVP].isLiveSet = true;
return this.__get__isLive();
};
v2.__get__maintainAspectRatio = function () {
if (this._vp[this._activeVP] == undefined) {
return this._aspectRatio;
}
return this._vp[this._activeVP].maintainAspectRatio;
};
v2.__set__maintainAspectRatio = function (flag) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._aspectRatio = flag;
}
this._vp[this._activeVP].maintainAspectRatio = flag;
return this.__get__maintainAspectRatio();
};
v2.__get__metadata = function () {
if (this._vp[this._activeVP] == undefined) {
return null;
}
return this._vp[this._activeVP].metadata;
};
v2.__get__metadataLoaded = function () {
if (this._vp[this._activeVP] == undefined) {
return false;
}
return this._cpMgr[this._activeVP].metadataLoaded;
};
v2.__get__muteButton = function () {
if (this._uiMgr != null) {
this._muteButton = this._uiMgr.getControl(mx.video.UIManager.MUTE_BUTTON);
}
return this._muteButton;
};
v2.__set__muteButton = function (s) {
this._muteButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, s);
}
return this.__get__muteButton();
};
v2.__get__ncMgr = function () {
if (this._vp[this._activeVP] == undefined) {
return null;
}
return this._vp[this._activeVP].ncMgr;
};
v2.__get__pauseButton = function () {
if (this._uiMgr != null) {
this._pauseButton = this._uiMgr.getControl(mx.video.UIManager.PAUSE_BUTTON);
}
return this._pauseButton;
};
v2.__set__pauseButton = function (s) {
this._pauseButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, s);
}
return this.__get__pauseButton();
};
v2.__get__paused = function () {
if (this._vp[this._activeVP] == undefined) {
return false;
}
return this._vp[this._activeVP].state == mx.video.FLVPlayback.PAUSED;
};
v2.__get__playButton = function () {
if (this._uiMgr != null) {
this._playButton = this._uiMgr.getControl(mx.video.UIManager.PLAY_BUTTON);
}
return this._playButton;
};
v2.__set__playButton = function (s) {
this._playButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, s);
}
return this.__get__playButton();
};
v2.__get__playheadTime = function () {
if (this._vp[this._activeVP] == undefined) {
return 0;
}
return this._vp[this._activeVP].playheadTime;
};
v2.__set__playheadTime = function (position) {
this.seek(position);
return this.__get__playheadTime();
};
v2.__get__playheadUpdateInterval = function () {
if (this._vp[this._activeVP] == undefined) {
return this._playheadUpdateInterval;
}
return this._vp[this._activeVP].playheadUpdateInterval;
};
v2.__set__playheadUpdateInterval = function (aTime) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._playheadUpdateInterval = aTime;
}
this._cpMgr[this._activeVP].playheadUpdateInterval = aTime;
this._vp[this._activeVP].playheadUpdateInterval = aTime;
return this.__get__playheadUpdateInterval();
};
v2.__get__playing = function () {
if (this._vp[this._activeVP] == undefined) {
return false;
}
return this._vp[this._activeVP].state == mx.video.FLVPlayback.PLAYING;
};
v2.__get__playPauseButton = function () {
if (this._uiMgr != null) {
this._playPauseButton = this._uiMgr.getControl(mx.video.UIManager.PLAY_PAUSE_BUTTON);
}
return this._playPauseButton;
};
v2.__set__playPauseButton = function (s) {
this._playPauseButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, s);
}
return this.__get__playPauseButton();
};
v2.__get__preferredHeight = function () {
if (this._vp[this._activeVP] == undefined) {
return 0;
}
return this._vp[this._activeVP].videoHeight;
};
v2.__get__preferredWidth = function () {
if (this._vp[this._activeVP] == undefined) {
return 0;
}
return this._vp[this._activeVP].videoWidth;
};
v2.__get__progressInterval = function () {
if (this._vp[this._activeVP] == undefined) {
return this._progressInterval;
}
return this._vp[this._activeVP].progressInterval;
};
v2.__set__progressInterval = function (aTime) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._progressInterval = aTime;
}
this._vp[this._activeVP].progressInterval = aTime;
return this.__get__progressInterval();
};
v2.__get__scaleX = function () {
if (this._vp[this._visibleVP] != undefined) {
this._scaleX = (this._vp[this._visibleVP].width / this._origWidth) * 100;
}
return this._scaleX;
};
v2.__set__scaleX = function (xs) {
this.setScale(xs, this.__get__scaleY());
return this.__get__scaleX();
};
v2.__get__scaleY = function () {
if (this._vp[this._visibleVP] != undefined) {
this._scaleY = (this._vp[this._visibleVP].height / this._origHeight) * 100;
}
return this._scaleY;
};
v2.__set__scaleY = function (ys) {
this.setScale(this.__get__scaleX(), ys);
return this.__get__scaleY();
};
v2.__get__scrubbing = function () {
var v2 = this.__get__seekBar();
if (v2 == undefined || v2.isDragging == undefined) {
return false;
}
return v2.isDragging;
};
v2.__get__seekBar = function () {
if (this._uiMgr != null) {
this._seekBar = this._uiMgr.getControl(mx.video.UIManager.SEEK_BAR);
}
return this._seekBar;
};
v2.__set__seekBar = function (s) {
this._seekBar = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.SEEK_BAR, s);
}
return this.__get__seekBar();
};
v2.__get__seekBarInterval = function () {
if (this._uiMgr != null) {
this._seekBarInterval = this._uiMgr.seekBarInterval;
}
return this._seekBarInterval;
};
v2.__set__seekBarInterval = function (s) {
this._seekBarInterval = s;
if (this._uiMgr != null) {
this._uiMgr.__set__seekBarInterval(this._seekBarInterval);
}
return this.__get__seekBarInterval();
};
v2.__get__seekBarScrubTolerance = function () {
if (this._uiMgr != null) {
this._seekBarScrubTolerance = this._uiMgr.seekBarScrubTolerance;
}
return this._seekBarScrubTolerance;
};
v2.__set__seekBarScrubTolerance = function (s) {
this._seekBarScrubTolerance = s;
if (this._uiMgr != null) {
this._uiMgr.__set__seekBarScrubTolerance(this._seekBarScrubTolerance);
}
return this.__get__seekBarScrubTolerance();
};
v2.__get__seekToPrevOffset = function () {
return this._seekToPrevOffset;
};
v2.__set__seekToPrevOffset = function (s) {
this._seekToPrevOffset = s;
return this.__get__seekToPrevOffset();
};
v2.__get__skin = function () {
if (this._uiMgr != null) {
this._skin = this._uiMgr.skin;
}
return this._skin;
};
v2.__set__skin = function (s) {
this._skin = s;
if (this._uiMgr != null) {
this._uiMgr.__set__skin(s);
}
return this.__get__skin();
};
v2.__get__skinAutoHide = function () {
if (this._uiMgr != null) {
this._skinAutoHide = this._uiMgr.skinAutoHide;
}
return this._skinAutoHide;
};
v2.__set__skinAutoHide = function (b) {
if (_global.isLivePreview) {
return undefined;
}
this._skinAutoHide = b;
if (this._uiMgr != null) {
this._uiMgr.__set__skinAutoHide(b);
}
return this.__get__skinAutoHide();
};
v2.__get__transform = function () {
return this._transform;
};
v2.__set__transform = function (s) {
this._transform = s;
if (this._vp[this._activeVP] != undefined) {
this._vp[this._activeVP].transform = this._transform;
}
return this.__get__transform();
};
v2.__get__state = function () {
if (_global.isLivePreview) {
return mx.video.FLVPlayback.STOPPED;
}
if (this._vp[this._activeVP] == undefined) {
return mx.video.FLVPlayback.DISCONNECTED;
}
if (this._activeVP == this._visibleVP && this.__get__scrubbing()) {
return mx.video.FLVPlayback.SEEKING;
}
var v3 = this._vp[this._activeVP].state;
if (v3 == mx.video.VideoPlayer.RESIZING) {
return mx.video.FLVPlayback.LOADING;
}
if (this._vpState[this._activeVP].prevState == mx.video.FLVPlayback.LOADING && this._vpState[this._activeVP].autoPlay && v3 == mx.video.FLVPlayback.STOPPED) {
return mx.video.FLVPlayback.LOADING;
}
return v3;
};
v2.__get__stateResponsive = function () {
if (this._vp[this._activeVP] == undefined) {
return false;
}
return this._vp[this._activeVP].stateResponsive;
};
v2.__get__stopButton = function () {
if (this._uiMgr != null) {
this._stopButton = this._uiMgr.getControl(mx.video.UIManager.STOP_BUTTON);
}
return this._stopButton;
};
v2.__set__stopButton = function (s) {
this._stopButton = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, s);
}
return this.__get__stopButton();
};
v2.__get__stopped = function () {
if (this._vp[this._activeVP] == undefined) {
return false;
}
return this._vp[this._activeVP].state == mx.video.FLVPlayback.STOPPED;
};
v2.__get__totalTime = function () {
if (_global.isLivePreview) {
return 1;
}
if (this._vp[this._activeVP] == undefined) {
return this._totalTime;
} else {
if (this._vpState[this._activeVP].totalTimeSet) {
return this._vpState[this._activeVP].totalTime;
} else {
return this._vp[this._activeVP].totalTime;
}
}
};
v2.__set__totalTime = function (aTime) {
if (this._activeVP == 0 || this._activeVP == undefined) {
this._totalTime = aTime;
}
this._vpState[this._activeVP].totalTime = aTime;
this._vpState[this._activeVP].totalTimeSet = true;
return this.__get__totalTime();
};
v2.__get__version_1_0_2 = function () {
return '';
};
v2.__set__version_1_0_2 = function (v) {
return this.__get__version_1_0_2();
};
v2.__get__visible = function () {
return this._visible;
};
v2.__set__visible = function (v) {
this._visible = v;
return this.__get__visible();
};
v2.__get__visibleVideoPlayerIndex = function () {
return this._visibleVP;
};
v2.__set__visibleVideoPlayerIndex = function (i) {
if (this._visibleVP == i) {
return undefined;
}
var v3 = this._visibleVP;
if (this._vp[i] == undefined) {
this.createVideoPlayer(i);
}
var v5 = this._vp[i].height != this._vp[this._visibleVP].height || this._vp[i].width != this._vp[this._visibleVP].width;
this._vp[this._visibleVP].visible = false;
this._vp[this._visibleVP].volume = 0;
this._visibleVP = i;
if (this._firstStreamShown) {
this._uiMgr.setupSkinAutoHide();
this._vp[this._visibleVP].visible = true;
if (!this.__get__scrubbing()) {
this._vp[this._visibleVP].volume = this._volume;
}
} else {
if (this._vp[this._visibleVP].stateResponsive && this._vp[this._visibleVP].state != mx.video.FLVPlayback.DISCONNECTED && this._uiMgr.__get__skinReady()) {
this._uiMgr.__set__visible(true);
this._uiMgr.setupSkinAutoHide();
this._firstStreamReady = true;
this.showFirstStream();
}
}
if (this._vp[v3].height != this._vp[this._visibleVP].height || this._vp[v3].width != this._vp[this._visibleVP].width) {
this.dispatchEvent({'type': 'resize', 'x': this.__get__x(), 'y': this.__get__y(), 'width': this.__get__width(), 'height': this.__get__height(), 'auto': false, 'vp': this._visibleVP});
}
this._uiMgr.handleEvent({'type': 'stateChange', 'state': this._vp[this._visibleVP].state, 'vp': this._visibleVP});
this._uiMgr.handleEvent({'type': 'playheadUpdate', 'playheadTime': this._vp[this._visibleVP].playheadTime, 'vp': this._visibleVP});
if (this._vp[this._visibleVP].isRTMP) {
this._uiMgr.handleEvent({'type': 'ready', 'vp': this._visibleVP});
} else {
this._uiMgr.handleEvent({'type': 'progress', 'bytesLoaded': this._vp[this._visibleVP].bytesLoaded, 'bytesTotal': this._vp[this._visibleVP].bytesTotal, 'vp': this._visibleVP});
}
return this.__get__visibleVideoPlayerIndex();
};
v2.__get__volume = function () {
return this._volume;
};
v2.__set__volume = function (aVol) {
if (this._volume == aVol) {
return undefined;
}
this._volume = aVol;
if (!this.__get__scrubbing()) {
this._vp[this._visibleVP].volume = this._volume;
}
this.dispatchEvent({'type': 'volumeUpdate', 'volume': aVol});
return this.__get__volume();
};
v2.__get__volumeBar = function () {
if (this._uiMgr != null) {
this._volumeBar = this._uiMgr.getControl(mx.video.UIManager.VOLUME_BAR);
}
return this._volumeBar;
};
v2.__set__volumeBar = function (s) {
this._volumeBar = s;
if (this._uiMgr != null) {
this._uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, s);
}
return this.__get__volumeBar();
};
v2.__get__volumeBarInterval = function () {
if (this._uiMgr != null) {
this._volumeBarInterval = this._uiMgr.volumeBarInterval;
}
return this._volumeBarInterval;
};
v2.__set__volumeBarInterval = function (s) {
this._volumeBarInterval = s;
if (this._uiMgr != null) {
this._uiMgr.__set__volumeBarInterval(this._volumeBarInterval);
}
return this.__get__volumeBarInterval();
};
v2.__get__volumeBarScrubTolerance = function () {
if (this._uiMgr != null) {
this._volumeBarScrubTolerance = this._uiMgr.volumeBarScrubTolerance;
}
return this._volumeBarScrubTolerance;
};
v2.__set__volumeBarScrubTolerance = function (s) {
this._volumeBarScrubTolerance = s;
if (this._uiMgr != null) {
this._uiMgr.__set__volumeBarScrubTolerance(this._volumeBarScrubTolerance);
}
return this.__get__volumeBarScrubTolerance();
};
v2.__get__width = function () {
if (_global.isLivePreview) {
return this.__width;
}
if (this._vp[this._visibleVP] != undefined) {
this.__width = this._vp[this._visibleVP].width;
}
return this.__width;
};
v2.__set__width = function (w) {
this.setSize(w, this.__get__height());
return this.__get__width();
};
v2.__get__x = function () {
return this._x;
};
v2.__set__x = function (xpos) {
this._x = xpos;
return this.__get__x();
};
v2.__get__y = function () {
return this._y;
};
v2.__set__y = function (ypos) {
this._y = ypos;
return this.__get__y();
};
v2.createVideoPlayer = function (index) {
if (_global.isLivePreview) {
return undefined;
}
var v4 = this.__get__width();
var v5 = this.__get__height();
this._vp[index] = mx.video.VideoPlayer(this.attachMovie('VideoPlayer', String(index), mx.video.FLVPlayback.VP_DEPTH_OFFSET + index));
this._vp[index].setSize(v4, v5);
this._topVP = index;
this._vp[index].autoRewind = this._autoRewind;
this._vp[index].autoSize = this._autoSize;
this._vp[index].bufferTime = this._bufferTime;
this._vp[index].idleTimeout = this._idleTimeout;
this._vp[index].maintainAspectRatio = this._aspectRatio;
this._vp[index].playheadUpdateInterval = this._playheadUpdateInterval;
this._vp[index].progressInterval = this._progressInterval;
this._vp[index].transform = this._transform;
this._vp[index].volume = this._volume;
if (index == 0) {
this._vpState[index] = {'id': index, 'isLive': this._isLive, 'isLiveSet': true, 'totalTime': this._totalTime, 'totalTimeSet': true, 'autoPlay': this._autoPlay};
if (this._contentPath != null && this._contentPath != undefined && this._contentPath != '') {
this._vp[index].onEnterFrame = mx.utils.Delegate.create(this, this.doContentPathConnect);
}
} else {
this._vpState[index] = {'id': index, 'isLive': false, 'isLiveSet': true, 'totalTime': 0, 'totalTimeSet': true, 'autoPlay': false};
}
this._vp[index].addEventListener('resize', this);
this._vp[index].addEventListener('close', this);
this._vp[index].addEventListener('complete', this);
this._vp[index].addEventListener('cuePoint', this);
this._vp[index].addEventListener('playheadUpdate', this);
this._vp[index].addEventListener('progress', this);
this._vp[index].addEventListener('metadataReceived', this);
this._vp[index].addEventListener('stateChange', this);
this._vp[index].addEventListener('ready', this);
this._vp[index].addEventListener('rewind', this);
this._cpMgr[index] = new mx.video.CuePointManager(this, index);
this._cpMgr[index].playheadUpdateInterval = this._playheadUpdateInterval;
};
v2.createUIManager = function () {
this._uiMgr = new mx.video.UIManager(this);
this._uiMgr.__set__visible(false);
if (this._backButton != null) {
this._uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, this._backButton);
}
if (this._bufferingBar != null) {
this._uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, this._bufferingBar);
}
this._uiMgr.__set__bufferingBarHidesAndDisablesOthers(this._bufferingBarHides);
if (this._forwardButton != null) {
this._uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, this._forwardButton);
}
if (this._pauseButton != null) {
this._uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, this._pauseButton);
}
if (this._playButton != null) {
this._uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, this._playButton);
}
if (this._playPauseButton != null) {
this._uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, this._playPauseButton);
}
if (this._stopButton != null) {
this._uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, this._stopButton);
}
if (this._seekBar != null) {
this._uiMgr.setControl(mx.video.UIManager.SEEK_BAR, this._seekBar);
}
if (this._seekBarInterval != null) {
this._uiMgr.__set__seekBarInterval(this._seekBarInterval);
}
if (this._seekBarScrubTolerance != null) {
this._uiMgr.__set__seekBarScrubTolerance(this._seekBarScrubTolerance);
}
if (this._skin != null) {
this._uiMgr.__set__skin(this._skin);
}
if (this._skinAutoHide != null) {
this._uiMgr.__set__skinAutoHide(this._skinAutoHide);
}
if (this._muteButton != null) {
this._uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, this._muteButton);
}
if (this._volumeBar != null) {
this._uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, this._volumeBar);
}
if (this._volumeBarInterval != null) {
this._uiMgr.__set__volumeBarInterval(this._volumeBarInterval);
}
if (this._volumeBarScrubTolerance != null) {
this._uiMgr.__set__volumeBarScrubTolerance(this._volumeBarScrubTolerance);
}
};
v2.createLivePreviewMovieClip = function () {
this.preview_mc = this.createEmptyMovieClip('preview_mc', 10);
this.preview_mc.createEmptyMovieClip('box_mc', 10);
this.preview_mc.box_mc.beginFill(0);
this.preview_mc.box_mc.moveTo(0, 0);
this.preview_mc.box_mc.lineTo(0, 100);
this.preview_mc.box_mc.lineTo(100, 100);
this.preview_mc.box_mc.lineTo(100, 0);
this.preview_mc.box_mc.lineTo(0, 0);
this.preview_mc.box_mc.endFill();
this.preview_mc.attachMovie('Icon', 'icon_mc', 20);
};
v2.doContentPathConnect = function () {
delete this._vp[0].onEnterFrame;
this._vp[0].onEnterFrame = undefined;
if (_global.isLivePreview) {
return undefined;
}
if (this._vpState[0].autoPlay && this._firstStreamShown) {
this._vp[0].play(this._contentPath, this._isLive, this._totalTime);
} else {
this._vp[0].load(this._contentPath, this._isLive, this._totalTime);
}
this._vpState[0].isLiveSet = false;
this._vpState[0].totalTimeSet = false;
};
v2.showFirstStream = function () {
this._firstStreamShown = true;
this._vp[this._visibleVP].visible = true;
if (!this.__get__scrubbing()) {
this._vp[this._visibleVP].volume = this._volume;
}
var v2 = 0;
while (v2 < this._vp.length) {
if (this._vp[v2] != undefined && this._vp[v2].state == mx.video.FLVPlayback.STOPPED && this._vpState[v2].autoPlay) {
this._vp[v2].play();
}
++v2;
}
};
v2._scrubStart = function () {
var v2 = this.__get__playheadTime();
this._vp[this._visibleVP].volume = 0;
this.dispatchEvent({'type': 'stateChange', 'state': mx.video.FLVPlayback.SEEKING, 'playheadTime': v2, 'vp': this._visibleVP});
this.dispatchEvent({'type': 'scrubStart', 'state': mx.video.FLVPlayback.SEEKING, 'playheadTime': v2});
};
v2._scrubFinish = function () {
var v3 = this.__get__playheadTime();
var v2 = this.__get__state();
this._vp[this._visibleVP].volume = this._volume;
if (v2 != mx.video.FLVPlayback.SEEKING) {
this.dispatchEvent({'type': 'stateChange', 'state': v2, 'playheadTime': v3, 'vp': this._visibleVP});
}
this.dispatchEvent({'type': 'scrubFinish', 'state': v2, 'playheadTime': v3});
};
v2.skinError = function (message) {
if (this._firstStreamReady && !this._firstStreamShown) {
this.showFirstStream();
}
this.dispatchEvent({'type': 'skinError', 'message': message});
};
v2.skinLoaded = function () {
if (this._firstStreamReady) {
this._uiMgr.__set__visible(true);
if (!this._firstStreamShown) {
this.showFirstStream();
}
} else {
if (this._contentPath == null || this._contentPath == '') {
this._uiMgr.__set__visible(true);
}
}
this.dispatchEvent({'type': 'skinLoaded'});
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v1.DISCONNECTED = 'disconnected';
v1.STOPPED = 'stopped';
v1.PLAYING = 'playing';
v1.PAUSED = 'paused';
v1.BUFFERING = 'buffering';
v1.LOADING = 'loading';
v1.CONNECTION_ERROR = 'connectionError';
v1.REWINDING = 'rewinding';
v1.SEEKING = 'seeking';
v1.ALL = 'all';
v1.EVENT = 'event';
v1.NAVIGATION = 'navigation';
v1.FLV = 'flv';
v1.ACTIONSCRIPT = 'actionscript';
v1.VP_DEPTH_OFFSET = 100;
v1.SEEK_TO_PREV_OFFSET_DEFAULT = 1;
v2.addProperty('activeVideoPlayerIndex', v2.__get__activeVideoPlayerIndex, v2.__set__activeVideoPlayerIndex);
v2.addProperty('autoPlay', v2.__get__autoPlay, v2.__set__autoPlay);
v2.addProperty('autoRewind', v2.__get__autoRewind, v2.__set__autoRewind);
v2.addProperty('autoSize', v2.__get__autoSize, v2.__set__autoSize);
v2.addProperty('backButton', v2.__get__backButton, v2.__set__backButton);
v2.addProperty('bitrate', v2.__get__bitrate, v2.__set__bitrate);
v2.addProperty('bufferTime', v2.__get__bufferTime, v2.__set__bufferTime);
v2.addProperty('buffering', v2.__get__buffering, function () {});
v2.addProperty('bufferingBar', v2.__get__bufferingBar, v2.__set__bufferingBar);
v2.addProperty('bufferingBarHidesAndDisablesOthers', v2.__get__bufferingBarHidesAndDisablesOthers, v2.__set__bufferingBarHidesAndDisablesOthers);
v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {});
v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {});
v2.addProperty('contentPath', v2.__get__contentPath, v2.__set__contentPath);
v2.addProperty('cuePoints', function () {}, v2.__set__cuePoints);
v2.addProperty('forwardButton', v2.__get__forwardButton, v2.__set__forwardButton);
v2.addProperty('height', v2.__get__height, v2.__set__height);
v2.addProperty('idleTimeout', v2.__get__idleTimeout, v2.__set__idleTimeout);
v2.addProperty('isLive', v2.__get__isLive, v2.__set__isLive);
v2.addProperty('isRTMP', v2.__get__isRTMP, function () {});
v2.addProperty('maintainAspectRatio', v2.__get__maintainAspectRatio, v2.__set__maintainAspectRatio);
v2.addProperty('metadata', v2.__get__metadata, function () {});
v2.addProperty('metadataLoaded', v2.__get__metadataLoaded, function () {});
v2.addProperty('muteButton', v2.__get__muteButton, v2.__set__muteButton);
v2.addProperty('ncMgr', v2.__get__ncMgr, function () {});
v2.addProperty('pauseButton', v2.__get__pauseButton, v2.__set__pauseButton);
v2.addProperty('paused', v2.__get__paused, function () {});
v2.addProperty('playButton', v2.__get__playButton, v2.__set__playButton);
v2.addProperty('playPauseButton', v2.__get__playPauseButton, v2.__set__playPauseButton);
v2.addProperty('playheadPercentage', v2.__get__playheadPercentage, v2.__set__playheadPercentage);
v2.addProperty('playheadTime', v2.__get__playheadTime, v2.__set__playheadTime);
v2.addProperty('playheadUpdateInterval', v2.__get__playheadUpdateInterval, v2.__set__playheadUpdateInterval);
v2.addProperty('playing', v2.__get__playing, function () {});
v2.addProperty('preferredHeight', v2.__get__preferredHeight, function () {});
v2.addProperty('preferredWidth', v2.__get__preferredWidth, function () {});
v2.addProperty('progressInterval', v2.__get__progressInterval, v2.__set__progressInterval);
v2.addProperty('scaleX', v2.__get__scaleX, v2.__set__scaleX);
v2.addProperty('scaleY', v2.__get__scaleY, v2.__set__scaleY);
v2.addProperty('scrubbing', v2.__get__scrubbing, function () {});
v2.addProperty('seekBar', v2.__get__seekBar, v2.__set__seekBar);
v2.addProperty('seekBarInterval', v2.__get__seekBarInterval, v2.__set__seekBarInterval);
v2.addProperty('seekBarScrubTolerance', v2.__get__seekBarScrubTolerance, v2.__set__seekBarScrubTolerance);
v2.addProperty('seekToPrevOffset', v2.__get__seekToPrevOffset, v2.__set__seekToPrevOffset);
v2.addProperty('skin', v2.__get__skin, v2.__set__skin);
v2.addProperty('skinAutoHide', v2.__get__skinAutoHide, v2.__set__skinAutoHide);
v2.addProperty('state', v2.__get__state, function () {});
v2.addProperty('stateResponsive', v2.__get__stateResponsive, function () {});
v2.addProperty('stopButton', v2.__get__stopButton, v2.__set__stopButton);
v2.addProperty('stopped', v2.__get__stopped, function () {});
v2.addProperty('totalTime', v2.__get__totalTime, v2.__set__totalTime);
v2.addProperty('transform', v2.__get__transform, v2.__set__transform);
v2.addProperty('version_1_0_2', v2.__get__version_1_0_2, v2.__set__version_1_0_2);
v2.addProperty('visible', v2.__get__visible, v2.__set__visible);
v2.addProperty('visibleVideoPlayerIndex', v2.__get__visibleVideoPlayerIndex, v2.__set__visibleVideoPlayerIndex);
v2.addProperty('volume', v2.__get__volume, v2.__set__volume);
v2.addProperty('volumeBar', v2.__get__volumeBar, v2.__set__volumeBar);
v2.addProperty('volumeBarInterval', v2.__get__volumeBarInterval, v2.__set__volumeBarInterval);
v2.addProperty('volumeBarScrubTolerance', v2.__get__volumeBarScrubTolerance, v2.__set__volumeBarScrubTolerance);
v2.addProperty('width', v2.__get__width, v2.__set__width);
v2.addProperty('x', v2.__get__x, v2.__set__x);
v2.addProperty('y', v2.__get__y, v2.__set__y);
ASSetPropFlags(mx.video.FLVPlayback.prototype, null, 1);
}
#endinitclip
}
movieClip 89 __Packages.mx.video.VideoPlayer {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.VideoPlayer) {
var v1 = function () {
super();
mx.events.EventDispatcher.initialize(this);
this._state = mx.video.VideoPlayer.DISCONNECTED;
this._cachedState = this._state;
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
this._cachedPlayheadTime = 0;
this._metadata = null;
this._startingPlay = false;
this._invalidSeekTime = false;
this._invalidSeekRecovery = false;
this._currentPos = 0;
this._atEnd = false;
this._cmdQueue = new Array();
this._readyDispatched = false;
this._autoResizeDone = false;
this._lastUpdateTime = -1;
this._sawSeekNotify = false;
this._updateTimeIntervalID = 0;
this._updateTimeInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL;
this._updateProgressIntervalID = 0;
this._updateProgressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL;
this._idleTimeoutIntervalID = 0;
this._idleTimeoutInterval = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL;
this._autoResizeIntervalID = 0;
this._rtmpDoStopAtEndIntervalID = 0;
this._rtmpDoSeekIntervalID = 0;
this._httpDoSeekIntervalID = 0;
this._httpDoSeekCount = 0;
this._finishAutoResizeIntervalID = 0;
this._delayedBufferingIntervalID = 0;
this._delayedBufferingInterval = mx.video.VideoPlayer.HTTP_DELAYED_BUFFERING_INTERVAL;
if (this._isLive == undefined) {
this._isLive = false;
}
if (this._autoSize == undefined) {
this._autoSize = false;
}
if (this._aspectRatio == undefined) {
this._aspectRatio = true;
}
if (this._autoPlay == undefined) {
this._autoPlay = true;
}
if (this._autoRewind == undefined) {
this._autoRewind = true;
}
if (this._bufferTime == undefined) {
this._bufferTime = 0.1;
}
if (this._volume == undefined) {
this._volume = 100;
}
this._sound = new Sound(this);
this._sound.setVolume(this._volume);
this.__visible = true;
this._hiddenForResize = false;
this._hiddenForResizeMetadataDelay = 0;
this._contentPath = '';
};
mx.video.VideoPlayer = v1;
mx.video.VideoPlayer extends MovieClip;
var v2 = v1.prototype;
v2.setSize = function (w, h) {
if (w == this._video._width && h == this._video._height || this._autoSize) {
return undefined;
}
this._video._width = w;
this._video._height = h;
if (this._aspectRatio) {
this.startAutoResize();
}
};
v2.setScale = function (xs, ys) {
if (xs == this._video._xscale && ys == this._video._yscale || this._autoSize) {
return undefined;
}
this._video._xscale = xs;
this._video._yscale = ys;
if (this._aspectRatio) {
this.startAutoResize();
}
};
v2.play = function (url, isLive, totalTime) {
if (url != null) {
if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) {
this._state = this._cachedState;
} else {
if (!this.__get__stateResponsive() && this._state != mx.video.VideoPlayer.CONNECTION_ERROR) {
this.queueCmd(mx.video.VideoPlayer.PLAY, url, isLive, totalTime);
return undefined;
} else {
this.execQueuedCmds();
}
}
this._autoPlay = true;
this._load(url, isLive, totalTime);
return undefined;
}
if (!this.isXnOK()) {
if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr.getNetConnection() == null) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
} else {
this.flushQueuedCmds();
this.queueCmd(mx.video.VideoPlayer.PLAY);
this.setState(mx.video.VideoPlayer.LOADING);
this._cachedState = mx.video.VideoPlayer.LOADING;
this._ncMgr.reconnect();
return undefined;
}
} else {
if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) {
this._state = this._cachedState;
} else {
if (!this.__get__stateResponsive()) {
this.queueCmd(mx.video.VideoPlayer.PLAY);
return undefined;
} else {
this.execQueuedCmds();
}
}
}
if (this._ns == null) {
this._createStream();
this._video.attachVideo(this._ns);
this.attachAudio(this._ns);
}
switch (this._state) {
case mx.video.VideoPlayer.BUFFERING:
if (this._ncMgr.isRTMP()) {
this._play(0);
if (this._atEnd) {
this._atEnd = false;
this._currentPos = 0;
this.setState(mx.video.VideoPlayer.REWINDING);
} else {
if (this._currentPos > 0) {
this._seek(this._currentPos);
this._currentPos = 0;
}
}
}
case mx.video.VideoPlayer.PLAYING:
return undefined;
case mx.video.VideoPlayer.STOPPED:
if (this._ncMgr.isRTMP()) {
if (this._isLive) {
this._play(-1);
this.setState(mx.video.VideoPlayer.BUFFERING);
} else {
this._play(0);
if (this._atEnd) {
this._atEnd = false;
this._currentPos = 0;
this._state = mx.video.VideoPlayer.BUFFERING;
this.setState(mx.video.VideoPlayer.REWINDING);
} else {
if (this._currentPos > 0) {
this._seek(this._currentPos);
this._currentPos = 0;
this.setState(mx.video.VideoPlayer.BUFFERING);
} else {
this.setState(mx.video.VideoPlayer.BUFFERING);
}
}
}
} else {
this._pause(false);
if (this._atEnd) {
this._atEnd = false;
this._seek(0);
this._state = mx.video.VideoPlayer.BUFFERING;
this.setState(mx.video.VideoPlayer.REWINDING);
} else {
if (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY) {
this.setState(mx.video.VideoPlayer.BUFFERING);
} else {
this.setState(mx.video.VideoPlayer.PLAYING);
}
}
}
break;
case mx.video.VideoPlayer.PAUSED:
this._pause(false);
if (!this._ncMgr.isRTMP()) {
if (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY) {
this.setState(mx.video.VideoPlayer.BUFFERING);
} else {
this.setState(mx.video.VideoPlayer.PLAYING);
}
} else {
this.setState(mx.video.VideoPlayer.BUFFERING);
}
}
};
v2.load = function (url, isLive, totalTime) {
if (url == null) {
throw new Error('null url sent to VideoPlayer.load');
}
if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) {
this._state = this._cachedState;
} else {
if (!this.__get__stateResponsive() && this._state != mx.video.VideoPlayer.CONNECTION_ERROR) {
this.queueCmd(mx.video.VideoPlayer.LOAD, url, isLive, totalTime);
return undefined;
} else {
this.execQueuedCmds();
}
}
this._autoPlay = false;
this._load(url, isLive, totalTime);
};
v2._load = function (url, isLive, totalTime) {
this._prevVideoWidth = this.videoWidth;
if (this._prevVideoWidth == undefined) {
this._prevVideoWidth = this._video.width;
if (this._prevVideoWidth == undefined) {
this._prevVideoWidth = 0;
}
}
this._prevVideoHeight = this.videoHeight;
if (this._prevVideoHeight == undefined) {
this._prevVideoHeight = this._video.height;
if (this._prevVideoHeight == undefined) {
this._prevVideoHeight = 0;
}
}
this._autoResizeDone = false;
this._cachedPlayheadTime = 0;
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
this._metadata = null;
this._startingPlay = false;
this._invalidSeekTime = false;
this._invalidSeekRecovery = false;
this._isLive = (isLive == undefined) ? false : isLive;
this._contentPath = url;
this._currentPos = 0;
this._streamLength = totalTime;
this._atEnd = false;
this._videoWidth = undefined;
this._videoHeight = undefined;
this._readyDispatched = false;
this._lastUpdateTime = -1;
this._sawSeekNotify = false;
clearInterval(this._updateTimeIntervalID);
this._updateTimeIntervalID = 0;
clearInterval(this._updateProgressIntervalID);
this._updateProgressIntervalID = 0;
clearInterval(this._idleTimeoutIntervalID);
this._idleTimeoutIntervalID = 0;
clearInterval(this._autoResizeIntervalID);
this._autoResizeIntervalID = 0;
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
clearInterval(this._rtmpDoSeekIntervalID);
this._rtmpDoSeekIntervalID = 0;
clearInterval(this._httpDoSeekIntervalID);
this._httpDoSeekIntervalID = 0;
clearInterval(this._finishAutoResizeIntervalID);
this._finishAutoResizeIntervalID = 0;
clearInterval(this._delayedBufferingIntervalID);
this._delayedBufferingIntervalID = 0;
this.closeNS(false);
if (this._ncMgr == null) {
this.createINCManager();
}
var v2 = this._ncMgr.connectToURL(this._contentPath);
this.setState(mx.video.VideoPlayer.LOADING);
this._cachedState = mx.video.VideoPlayer.LOADING;
if (v2) {
this._createStream();
this._setUpStream();
}
if (!this._ncMgr.isRTMP()) {
clearInterval(this._updateProgressIntervalID);
this._updateProgressIntervalID = setInterval(this, 'doUpdateProgress', this._updateProgressInterval);
}
};
v2.pause = function () {
if (!this.isXnOK()) {
if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr.getNetConnection() == null) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
} else {
return undefined;
}
} else {
if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) {
this._state = this._cachedState;
} else {
if (!this.__get__stateResponsive()) {
this.queueCmd(mx.video.VideoPlayer.PAUSE);
return undefined;
} else {
this.execQueuedCmds();
}
}
}
if (this._state == mx.video.VideoPlayer.PAUSED || this._state == mx.video.VideoPlayer.STOPPED || this._ns == null) {
return undefined;
}
this._pause(true);
this.setState(mx.video.VideoPlayer.PAUSED);
};
v2.stop = function () {
if (!this.isXnOK()) {
if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr.getNetConnection() == null) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
} else {
return undefined;
}
} else {
if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) {
this._state = this._cachedState;
} else {
if (!this.__get__stateResponsive()) {
this.queueCmd(mx.video.VideoPlayer.STOP);
return undefined;
} else {
this.execQueuedCmds();
}
}
}
if (this._state == mx.video.VideoPlayer.STOPPED || this._ns == null) {
return undefined;
}
if (this._ncMgr.isRTMP()) {
if (this._autoRewind && !this._isLive) {
this._currentPos = 0;
this._play(0, 0);
this._state = mx.video.VideoPlayer.STOPPED;
this.setState(mx.video.VideoPlayer.REWINDING);
} else {
this.closeNS(true);
this.setState(mx.video.VideoPlayer.STOPPED);
}
} else {
this._pause(true);
if (this._autoRewind) {
this._seek(0);
this._state = mx.video.VideoPlayer.STOPPED;
this.setState(mx.video.VideoPlayer.REWINDING);
} else {
this.setState(mx.video.VideoPlayer.STOPPED);
}
}
};
v2.seek = function (time) {
if (this._invalidSeekTime) {
return undefined;
}
if (isNaN(time) || time < 0) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
if (!this.isXnOK()) {
if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr.getNetConnection() == null) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
} else {
this.flushQueuedCmds();
this.queueCmd(mx.video.VideoPlayer.SEEK, null, false, time);
this.setState(mx.video.VideoPlayer.LOADING);
this._cachedState = mx.video.VideoPlayer.LOADING;
this._ncMgr.reconnect();
return undefined;
}
} else {
if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) {
this._state = this._cachedState;
} else {
if (!this.__get__stateResponsive()) {
this.queueCmd(mx.video.VideoPlayer.SEEK, null, false, time);
return undefined;
} else {
this.execQueuedCmds();
}
}
}
if (this._ns == null) {
this._createStream();
this._video.attachVideo(this._ns);
this.attachAudio(this._ns);
}
if (this._atEnd && time < this.__get__playheadTime()) {
this._atEnd = false;
}
switch (this._state) {
case mx.video.VideoPlayer.PLAYING:
this._state = mx.video.VideoPlayer.BUFFERING;
case mx.video.VideoPlayer.BUFFERING:
case mx.video.VideoPlayer.PAUSED:
this._seek(time);
this.setState(mx.video.VideoPlayer.SEEKING);
break;
case mx.video.VideoPlayer.STOPPED:
if (this._ncMgr.isRTMP()) {
this._play(0);
this._pause(true);
}
this._seek(time);
this._state = mx.video.VideoPlayer.PAUSED;
this.setState(mx.video.VideoPlayer.SEEKING);
}
};
v2.close = function () {
this.closeNS(true);
if (this._ncMgr != null && this._ncMgr.isRTMP()) {
this._ncMgr.close();
}
this.setState(mx.video.VideoPlayer.DISCONNECTED);
this.dispatchEvent({'type': 'close', 'state': this._state, 'playheadTime': this.__get__playheadTime()});
};
v2.__get__x = function () {
return this._x;
};
v2.__set__x = function (xpos) {
this._x = xpos;
return this.__get__x();
};
v2.__get__y = function () {
return this._y;
};
v2.__set__y = function (ypos) {
this._y = ypos;
return this.__get__y();
};
v2.__get__scaleX = function () {
return this._video._xscale;
};
v2.__set__scaleX = function (xs) {
this.setScale(xs, this.__get__scaleY());
return this.__get__scaleX();
};
v2.__get__scaleY = function () {
return this._video._yscale;
};
v2.__set__scaleY = function (ys) {
this.setScale(this.__get__scaleX(), ys);
return this.__get__scaleY();
};
v2.__get__width = function () {
return this._video._width;
};
v2.__set__width = function (w) {
this.setSize(w, this._video._height);
return this.__get__width();
};
v2.__get__height = function () {
return this._video._height;
};
v2.__set__height = function (h) {
this.setSize(this._video._width, h);
return this.__get__height();
};
v2.__get__videoWidth = function () {
if (this._readyDispatched) {
this._videoWidth = this._video.width;
}
return this._videoWidth;
};
v2.__get__videoHeight = function () {
if (this._readyDispatched) {
this._videoHeight = this._video.height;
}
return this._videoHeight;
};
v2.__get__visible = function () {
if (!this._hiddenForResize) {
this.__visible = this._visible;
}
return this.__visible;
};
v2.__set__visible = function (v) {
this.__visible = v;
if (!this._hiddenForResize) {
this._visible = this.__visible;
}
return this.__get__visible();
};
v2.__get__autoSize = function () {
return this._autoSize;
};
v2.__set__autoSize = function (flag) {
if (this._autoSize != flag) {
this._autoSize = flag;
if (this._autoSize) {
this.startAutoResize();
}
}
return this.__get__autoSize();
};
v2.__get__maintainAspectRatio = function () {
return this._aspectRatio;
};
v2.__set__maintainAspectRatio = function (flag) {
if (this._aspectRatio != flag) {
this._aspectRatio = flag;
if (this._aspectRatio && !this._autoSize) {
this.startAutoResize();
}
}
return this.__get__maintainAspectRatio();
};
v2.__get__autoRewind = function () {
return this._autoRewind;
};
v2.__set__autoRewind = function (flag) {
this._autoRewind = flag;
return this.__get__autoRewind();
};
v2.__get__playheadTime = function () {
var v2 = (this._ns == null) ? this._currentPos : this._ns.time;
if (this._metadata.audiodelay != undefined) {
v2 -= this._metadata.audiodelay;
if (v2 < 0) {
v2 = 0;
}
}
return v2;
};
v2.__set__playheadTime = function (position) {
this.seek(position);
return this.__get__playheadTime();
};
v2.__get__url = function () {
return this._contentPath;
};
v2.__get__volume = function () {
return this._volume;
};
v2.__set__volume = function (aVol) {
this._volume = aVol;
if (!this._hiddenForResize) {
this._sound.setVolume(this._volume);
}
return this.__get__volume();
};
v2.__get__transform = function () {
return this._sound.getTransform();
};
v2.__set__transform = function (s) {
this._sound.setTransform(s);
return this.__get__transform();
};
v2.__get__isRTMP = function () {
if (this._ncMgr == null) {
return undefined;
}
return this._ncMgr.isRTMP();
};
v2.__get__isLive = function () {
return this._isLive;
};
v2.__get__state = function () {
return this._state;
};
v2.__get__stateResponsive = function () {
switch (this._state) {
return false;
case mx.video.VideoPlayer.DISCONNECTED:
case mx.video.VideoPlayer.STOPPED:
case mx.video.VideoPlayer.PLAYING:
case mx.video.VideoPlayer.PAUSED:
case mx.video.VideoPlayer.BUFFERING:
return true;
}
return false;
};
v2.__get__bytesLoaded = function () {
if (this._ns == null || this._ncMgr.isRTMP()) {
return -1;
}
return this._ns.bytesLoaded;
};
v2.__get__bytesTotal = function () {
if (this._ns == null || this._ncMgr.isRTMP()) {
return -1;
}
return this._ns.bytesTotal;
};
v2.__get__totalTime = function () {
return this._streamLength;
};
v2.__get__bufferTime = function () {
return this._bufferTime;
};
v2.__set__bufferTime = function (aTime) {
this._bufferTime = aTime;
if (this._ns != null) {
this._ns.setBufferTime(this._bufferTime);
}
return this.__get__bufferTime();
};
v2.__get__idleTimeout = function () {
return this._idleTimeoutInterval;
};
v2.__set__idleTimeout = function (aTime) {
this._idleTimeoutInterval = aTime;
if (this._idleTimeoutIntervalID > 0) {
clearInterval(this._idleTimeoutIntervalID);
this._idleTimeoutIntervalID = setInterval(this, 'doIdleTimeout', this._idleTimeoutInterval);
}
return this.__get__idleTimeout();
};
v2.__get__playheadUpdateInterval = function () {
return this._updateTimeInterval;
};
v2.__set__playheadUpdateInterval = function (aTime) {
this._updateTimeInterval = aTime;
if (this._updateTimeIntervalID > 0) {
clearInterval(this._updateTimeIntervalID);
this._updateTimeIntervalID = setInterval(this, 'doUpdateTime', this._updateTimeInterval);
}
return this.__get__playheadUpdateInterval();
};
v2.__get__progressInterval = function () {
return this._updateProgressInterval;
};
v2.__set__progressInterval = function (aTime) {
this._updateProgressInterval = aTime;
if (this._updateProgressIntervalID > 0) {
clearInterval(this._updateProgressIntervalID);
this._updateProgressIntervalID = setInterval(this, 'doUpdateProgress', this._updateProgressInterval);
}
return this.__get__progressInterval();
};
v2.__get__ncMgr = function () {
if (this._ncMgr == null) {
this.createINCManager();
}
return this._ncMgr;
};
v2.__get__metadata = function () {
return this._metadata;
};
v2.doUpdateTime = function () {
var v2 = this.__get__playheadTime();
switch (this._state) {
if (this._state !== mx.video.VideoPlayer.CONNECTION_ERROR) {
} else {
case mx.video.VideoPlayer.STOPPED:
case mx.video.VideoPlayer.PAUSED:
case mx.video.VideoPlayer.DISCONNECTED:
clearInterval(this._updateTimeIntervalID);
this._updateTimeIntervalID = 0;
}
}
if (this._lastUpdateTime != v2) {
this.dispatchEvent({'type': 'playheadUpdate', 'state': this._state, 'playheadTime': v2});
this._lastUpdateTime = v2;
}
};
v2.doUpdateProgress = function () {
if (this._ns == null) {
return undefined;
}
if (this._ns.bytesTotal >= 0) {
this.dispatchEvent({'type': 'progress', 'bytesLoaded': this._ns.bytesLoaded, 'bytesTotal': this._ns.bytesTotal});
}
if (this._state == mx.video.VideoPlayer.DISCONNECTED || this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ns.bytesLoaded == this._ns.bytesTotal) {
clearInterval(this._updateProgressIntervalID);
this._updateProgressIntervalID = 0;
}
};
v2.rtmpOnStatus = function (info) {
if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR) {
return undefined;
}
switch (info.code) {
case 'NetStream.Play.Stop':
if (this._startingPlay) {
return undefined;
}
switch (this._state) {
case mx.video.VideoPlayer.RESIZING:
if (this._hiddenForResize) {
this.finishAutoResize();
}
break;
break;
case mx.video.VideoPlayer.LOADING:
case mx.video.VideoPlayer.STOPPED:
case mx.video.VideoPlayer.PAUSED:
default:
this._sawPlayStop = true;
}
break;
case 'NetStream.Buffer.Empty':
if (this._bufferState !== mx.video.VideoPlayer.BUFFER_FULL) {
} else {
if (this._sawPlayStop) {
this.rtmpDoStopAtEnd(true);
} else {
if (this._state == mx.video.VideoPlayer.PLAYING) {
this.setState(mx.video.VideoPlayer.BUFFERING);
}
}
}
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
break;
case 'NetStream.Buffer.Flush':
if (this._sawSeekNotify && this._state == mx.video.VideoPlayer.SEEKING) {
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
this.setStateFromCachedState();
this.doUpdateTime();
}
if (this._sawPlayStop && (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY || this._bufferTime <= 0.1 && this._ns.bufferLength <= 0.1)) {
this._cachedPlayheadTime = this.playheadTime;
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = setInterval(this, 'rtmpDoStopAtEnd', mx.video.VideoPlayer.RTMP_DO_STOP_AT_END_INTERVAL);
}
switch (this._bufferState) {
case mx.video.VideoPlayer.BUFFER_EMPTY:
if (!this._hiddenForResize) {
if (this._state == mx.video.VideoPlayer.LOADING && this._cachedState == mx.video.VideoPlayer.PLAYING || this._state == mx.video.VideoPlayer.BUFFERING) {
this.setState(mx.video.VideoPlayer.PLAYING);
} else {
if (this._cachedState == mx.video.VideoPlayer.BUFFERING) {
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
}
}
this._bufferState = mx.video.VideoPlayer.BUFFER_FLUSH;
break;
default:
if (this._state == mx.video.VideoPlayer.BUFFERING) {
this.setStateFromCachedState();
}
}
break;
case 'NetStream.Buffer.Full':
if (this._sawSeekNotify && this._state == mx.video.VideoPlayer.SEEKING) {
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
this.setStateFromCachedState();
this.doUpdateTime();
}
switch (this._bufferState) {
case mx.video.VideoPlayer.BUFFER_EMPTY:
this._bufferState = mx.video.VideoPlayer.BUFFER_FULL;
if (!this._hiddenForResize) {
if (this._state == mx.video.VideoPlayer.LOADING && this._cachedState == mx.video.VideoPlayer.PLAYING || this._state == mx.video.VideoPlayer.BUFFERING) {
this.setState(mx.video.VideoPlayer.PLAYING);
} else {
if (this._cachedState == mx.video.VideoPlayer.BUFFERING) {
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
}
if (this._rtmpDoStopAtEndIntervalID != 0) {
this._sawPlayStop = true;
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
}
}
break;
case mx.video.VideoPlayer.BUFFER_FLUSH:
this._bufferState = mx.video.VideoPlayer.BUFFER_FULL;
if (this._rtmpDoStopAtEndIntervalID != 0) {
this._sawPlayStop = true;
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
}
}
if (this._state == mx.video.VideoPlayer.BUFFERING) {
this.setStateFromCachedState();
}
break;
case 'NetStream.Pause.Notify':
if (this._state == mx.video.VideoPlayer.RESIZING && this._hiddenForResize) {
this.finishAutoResize();
}
break;
case 'NetStream.Unpause.Notify':
if (this._state == mx.video.VideoPlayer.PAUSED) {
this._state = mx.video.VideoPlayer.PLAYING;
this.setState(mx.video.VideoPlayer.BUFFERING);
} else {
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
break;
case 'NetStream.Play.Start':
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
if (this._startingPlay) {
this._startingPlay = false;
this._cachedPlayheadTime = this.playheadTime;
} else {
if (this._state == mx.video.VideoPlayer.PLAYING) {
this.setState(mx.video.VideoPlayer.BUFFERING);
}
}
break;
case 'NetStream.Play.Reset':
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
if (this._state == mx.video.VideoPlayer.REWINDING) {
clearInterval(this._rtmpDoSeekIntervalID);
this._rtmpDoSeekIntervalID = 0;
if (this.__get__playheadTime() == 0 || this.__get__playheadTime() < this._cachedPlayheadTime) {
this.setStateFromCachedState();
} else {
this._cachedPlayheadTime = this.playheadTime;
this._rtmpDoSeekIntervalID = setInterval(this, 'rtmpDoSeek', mx.video.VideoPlayer.RTMP_DO_SEEK_INTERVAL);
}
}
break;
case 'NetStream.Seek.Notify':
if (this.__get__playheadTime() != this._cachedPlayheadTime) {
this.setStateFromCachedState();
this.doUpdateTime();
} else {
this._sawSeekNotify = true;
if (this._rtmpDoSeekIntervalID == 0) {
this._rtmpDoSeekIntervalID = setInterval(this, 'rtmpDoSeek', mx.video.VideoPlayer.RTMP_DO_SEEK_INTERVAL);
}
}
break;
break;
case 'Netstream.Play.UnpublishNotify':
break;
case 'Netstream.Play.PublishNotify':
case 'NetStream.Play.StreamNotFound':
this.closeNS(false);
if (!this._ncMgr.connectAgain()) {
this.setState(mx.video.VideoPlayer.CONNECTION_ERROR);
}
break;
case 'NetStream.Play.Failed':
case 'NetStream.Failed':
case 'NetStream.Play.FileStructureInvalid':
case 'NetStream.Play.NoSupportedTrackFound':
this.setState(mx.video.VideoPlayer.CONNECTION_ERROR);
}
};
v2.httpOnStatus = function (info) {
switch (info.code) {
case 'NetStream.Play.Stop':
clearInterval(this._delayedBufferingIntervalID);
this._delayedBufferingIntervalID = 0;
if (this._invalidSeekTime) {
this._invalidSeekTime = false;
this._invalidSeekRecovery = true;
this.setState(this._cachedState);
this.seek(this.__get__playheadTime());
} else {
switch (this._state) {
case mx.video.VideoPlayer.SEEKING:
this.httpDoSeek();
case mx.video.VideoPlayer.PLAYING:
case mx.video.VideoPlayer.BUFFERING:
this.httpDoStopAtEnd();
}
}
break;
case 'NetStream.Seek.InvalidTime':
if (this._invalidSeekRecovery) {
this._invalidSeekTime = false;
this._invalidSeekRecovery = false;
this.setState(this._cachedState);
this.seek(0);
} else {
this._invalidSeekTime = true;
}
break;
case 'NetStream.Buffer.Empty':
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
if (this._state == mx.video.VideoPlayer.PLAYING) {
clearInterval(this._delayedBufferingIntervalID);
this._delayedBufferingIntervalID = setInterval(this, 'doDelayedBuffering', this._delayedBufferingInterval);
}
break;
case 'NetStream.Buffer.Full':
case 'NetStream.Buffer.Flush':
clearInterval(this._delayedBufferingIntervalID);
this._delayedBufferingIntervalID = 0;
this._bufferState = mx.video.VideoPlayer.BUFFER_FULL;
if (!this._hiddenForResize) {
if (this._state == mx.video.VideoPlayer.LOADING && this._cachedState == mx.video.VideoPlayer.PLAYING || this._state == mx.video.VideoPlayer.BUFFERING) {
this.setState(mx.video.VideoPlayer.PLAYING);
} else {
if (this._cachedState == mx.video.VideoPlayer.BUFFERING) {
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
}
}
break;
case 'NetStream.Seek.Notify':
this._invalidSeekRecovery = false;
switch (this._state) {
if (this._state !== mx.video.VideoPlayer.REWINDING) {
} else {
case mx.video.VideoPlayer.SEEKING:
if (this._httpDoSeekIntervalID == 0) {
this._httpDoSeekCount = 0;
this._httpDoSeekIntervalID = setInterval(this, 'httpDoSeek', mx.video.VideoPlayer.HTTP_DO_SEEK_INTERVAL);
}
}
}
break;
case 'NetStream.Play.StreamNotFound':
case 'NetStream.Play.FileStructureInvalid':
case 'NetStream.Play.NoSupportedTrackFound':
this.setState(mx.video.VideoPlayer.CONNECTION_ERROR);
}
};
v2.ncConnected = function () {
if (this._ncMgr == null || this._ncMgr.getNetConnection() == null) {
this.setState(mx.video.VideoPlayer.CONNECTION_ERROR);
} else {
if (this._ns == null) {
this._createStream();
this._setUpStream();
}
}
};
v2.ncReconnected = function () {
if (this._ncMgr == null || this._ncMgr.getNetConnection() == null) {
this.setState(mx.video.VideoPlayer.CONNECTION_ERROR);
} else {
this._ns = null;
this._state = mx.video.VideoPlayer.STOPPED;
this.execQueuedCmds();
}
};
v2.onMetaData = function (info) {
if (this._metadata != null) {
return undefined;
}
this._metadata = info;
if (this._streamLength == null || this._streamLength <= 0) {
this._streamLength = info.duration;
}
if (isNaN(this._videoWidth) || this._videoWidth <= 0) {
this._videoWidth = info.width;
}
if (isNaN(this._videoHeight) || this._videoHeight <= 0) {
this._videoHeight = info.height;
}
this.dispatchEvent({'type': 'metadataReceived', 'info': info});
};
v2.onCuePoint = function (info) {
if (!this._hiddenForResize || !isNaN(this._hiddenRewindPlayheadTime) && this.__get__playheadTime() < this._hiddenRewindPlayheadTime) {
this.dispatchEvent({'type': 'cuePoint', 'info': info});
}
};
v2.setState = function (s) {
if (s == this._state) {
return undefined;
}
this._hiddenRewindPlayheadTime = undefined;
this._cachedState = this._state;
this._cachedPlayheadTime = this.playheadTime;
this._state = s;
var v2 = this._state;
this.dispatchEvent({'type': 'stateChange', 'state': v2, 'playheadTime': this.__get__playheadTime()});
if (!this._readyDispatched) {
switch (v2) {
if (v2 !== mx.video.VideoPlayer.BUFFERING) {
} else {
case mx.video.VideoPlayer.STOPPED:
case mx.video.VideoPlayer.PLAYING:
case mx.video.VideoPlayer.PAUSED:
this._readyDispatched = true;
this.dispatchEvent({'type': 'ready', 'state': v2, 'playheadTime': this.__get__playheadTime()});
}
}
}
if (this._cachedState !== mx.video.VideoPlayer.REWINDING) {
} else {
this.dispatchEvent({'type': 'rewind', 'state': v2, 'playheadTime': this.__get__playheadTime()});
if (this._ncMgr.isRTMP() && v2 == mx.video.VideoPlayer.STOPPED) {
this.closeNS();
}
}
switch (v2) {
case mx.video.VideoPlayer.STOPPED:
case mx.video.VideoPlayer.PAUSED:
if (this._ncMgr.isRTMP() && this._idleTimeoutIntervalID == 0) {
this._idleTimeoutIntervalID = setInterval(this, 'doIdleTimeout', this._idleTimeoutInterval);
}
break;
case mx.video.VideoPlayer.SEEKING:
case mx.video.VideoPlayer.REWINDING:
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
case mx.video.VideoPlayer.PLAYING:
case mx.video.VideoPlayer.BUFFERING:
if (this._updateTimeIntervalID == 0) {
this._updateTimeIntervalID = setInterval(this, 'doUpdateTime', this._updateTimeInterval);
}
case mx.video.VideoPlayer.LOADING:
case mx.video.VideoPlayer.RESIZING:
clearInterval(this._idleTimeoutIntervalID);
this._idleTimeoutIntervalID = 0;
}
this.execQueuedCmds();
};
v2.setStateFromCachedState = function () {
switch (this._cachedState) {
case mx.video.VideoPlayer.PLAYING:
case mx.video.VideoPlayer.PAUSED:
this.setState(this._cachedState);
break;
case mx.video.VideoPlayer.BUFFERING:
if (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY) {
this.setState(mx.video.VideoPlayer.BUFFERING);
} else {
this.setState(this._cachedState);
}
break;
default:
this.setState(mx.video.VideoPlayer.STOPPED);
}
};
v2.createINCManager = function () {
if (this.ncMgrClassName == null) {
this.ncMgrClassName = mx.video.VideoPlayer.DEFAULT_INCMANAGER;
}
var ncMgrConstructor = eval(this.ncMgrClassName);
this._ncMgr = new ncMgrConstructor();
this._ncMgr.setVideoPlayer(this);
};
v2.rtmpDoStopAtEnd = function (force) {
if (this._rtmpDoStopAtEndIntervalID > 0) {
switch (this._state) {
if (this._state !== mx.video.VideoPlayer.CONNECTION_ERROR) {
} else {
case mx.video.VideoPlayer.DISCONNECTED:
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
return undefined;
}
}
if (force || this._cachedPlayheadTime == this.__get__playheadTime()) {
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
} else {
this._cachedPlayheadTime = this.playheadTime;
return undefined;
}
}
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
this._atEnd = true;
this.setState(mx.video.VideoPlayer.STOPPED);
if (this._state != mx.video.VideoPlayer.STOPPED) {
return undefined;
}
this.doUpdateTime();
if (this._state != mx.video.VideoPlayer.STOPPED) {
return undefined;
}
this.dispatchEvent({'type': 'complete', 'state': this._state, 'playheadTime': this.__get__playheadTime()});
if (this._state != mx.video.VideoPlayer.STOPPED) {
return undefined;
}
if (this._autoRewind && !this._isLive && this.__get__playheadTime() != 0) {
this._atEnd = false;
this._currentPos = 0;
this._play(0, 0);
this.setState(mx.video.VideoPlayer.REWINDING);
} else {
this.closeNS();
}
};
v2.rtmpDoSeek = function () {
if (this._state != mx.video.VideoPlayer.REWINDING && this._state != mx.video.VideoPlayer.SEEKING) {
clearInterval(this._rtmpDoSeekIntervalID);
this._rtmpDoSeekIntervalID = 0;
this._sawSeekNotify = false;
} else {
if (this.__get__playheadTime() != this._cachedPlayheadTime) {
clearInterval(this._rtmpDoSeekIntervalID);
this._rtmpDoSeekIntervalID = 0;
this._sawSeekNotify = false;
this.setStateFromCachedState();
this.doUpdateTime();
}
}
};
v2.httpDoStopAtEnd = function () {
this._atEnd = true;
if (this._streamLength == null || this._streamLength <= 0) {
this._streamLength = this._ns.time;
}
this._pause(true);
this.setState(mx.video.VideoPlayer.STOPPED);
if (this._state != mx.video.VideoPlayer.STOPPED) {
return undefined;
}
this.doUpdateTime();
if (this._state != mx.video.VideoPlayer.STOPPED) {
return undefined;
}
this.dispatchEvent({'type': 'complete', 'state': this._state, 'playheadTime': this.__get__playheadTime()});
if (this._state != mx.video.VideoPlayer.STOPPED) {
return undefined;
}
if (this._autoRewind) {
this._atEnd = false;
this._pause(true);
this._seek(0);
this.setState(mx.video.VideoPlayer.REWINDING);
}
};
v2.httpDoSeek = function () {
var v2 = this._state == mx.video.VideoPlayer.REWINDING || this._state == mx.video.VideoPlayer.SEEKING;
if (v2 && this._httpDoSeekCount < mx.video.VideoPlayer.HTTP_DO_SEEK_MAX_COUNT && (this._cachedPlayheadTime == this.__get__playheadTime() || this._invalidSeekTime)) {
++this._httpDoSeekCount;
return undefined;
}
this._httpDoSeekCount = 0;
clearInterval(this._httpDoSeekIntervalID);
this._httpDoSeekIntervalID = 0;
if (!v2) {
return undefined;
}
this.setStateFromCachedState();
if (this._invalidSeekTime) {
this._invalidSeekTime = false;
this._invalidSeekRecovery = true;
this.seek(this.__get__playheadTime());
} else {
this.doUpdateTime();
}
};
v2.closeNS = function (updateCurrentPos) {
if (this._ns != null && this._ns != undefined) {
if (updateCurrentPos) {
clearInterval(this._updateTimeIntervalID);
this._updateTimeIntervalID = 0;
this.doUpdateTime();
this._currentPos = this._ns.time;
}
delete this._ns.onStatus;
this._ns.onStatus = null;
this._ns.close();
this._ns = null;
}
};
v2.doDelayedBuffering = function () {
switch (this._state) {
case mx.video.VideoPlayer.LOADING:
break;
case mx.video.VideoPlayer.RESIZING:
case mx.video.VideoPlayer.PLAYING:
clearInterval(this._delayedBufferingIntervalID);
this._delayedBufferingIntervalID = 0;
this.setState(mx.video.VideoPlayer.BUFFERING);
break;
default:
clearInterval(this._delayedBufferingIntervalID);
this._delayedBufferingIntervalID = 0;
}
};
v2._pause = function (doPause) {
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
this._ns.pause(doPause);
};
v2._play = function () {
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
this._startingPlay = true;
switch (arguments.length) {
case 0:
this._ns.play(this._ncMgr.getStreamName(), this._isLive ? -1 : 0, -1);
break;
case 1:
this._ns.play(this._ncMgr.getStreamName(), this._isLive ? -1 : arguments[0], -1);
break;
case 2:
this._ns.play(this._ncMgr.getStreamName(), this._isLive ? -1 : arguments[0], arguments[1]);
break;
default:
throw new Error('bad args to _play');
}
};
v2._seek = function (time) {
clearInterval(this._rtmpDoStopAtEndIntervalID);
this._rtmpDoStopAtEndIntervalID = 0;
if (this._metadata.audiodelay != undefined && time + this._metadata.audiodelay < this._streamLength) {
time += this._metadata.audiodelay;
}
this._ns.seek(time);
this._invalidSeekTime = false;
this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY;
this._sawPlayStop = false;
this._sawSeekNotify = false;
};
v2.isXnOK = function () {
if (this._state == mx.video.VideoPlayer.LOADING) {
return true;
}
if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR) {
return false;
}
if (this._state != mx.video.VideoPlayer.DISCONNECTED) {
if (this._ncMgr == null || this._ncMgr.getNetConnection() == null || !(this._ncMgr.getNetConnection()).isConnected) {
this.setState(mx.video.VideoPlayer.DISCONNECTED);
return false;
}
return true;
}
return false;
};
v2.startAutoResize = function () {
switch (this._state) {
if (this._state !== mx.video.VideoPlayer.CONNECTION_ERROR) {
} else {
case mx.video.VideoPlayer.DISCONNECTED:
return undefined;
}
}
this._autoResizeDone = false;
if (this.__get__stateResponsive() && this._videoWidth != undefined && this._videoHeight != undefined) {
this.doAutoResize();
} else {
clearInterval(this._autoResizeIntervalID);
this._autoResizeIntervalID = setInterval(this, 'doAutoResize', mx.video.VideoPlayer.AUTO_RESIZE_INTERVAL);
}
};
v2.doAutoResize = function () {
if (this._autoResizeIntervalID > 0) {
switch (this._state) {
case mx.video.VideoPlayer.RESIZING:
break;
case mx.video.VideoPlayer.LOADING:
case mx.video.VideoPlayer.DISCONNECTED:
case mx.video.VideoPlayer.CONNECTION_ERROR:
clearInterval(this._autoResizeIntervalID);
this._autoResizeIntervalID = 0;
return undefined;
default:
if (this.__get__stateResponsive()) break;
return undefined;
}
if (this._video.width != this._prevVideoWidth || this._video.height != this._prevVideoHeight || this._bufferState == mx.video.VideoPlayer.BUFFER_FULL || this._bufferState == mx.video.VideoPlayer.BUFFER_FLUSH || this._ns.time > mx.video.VideoPlayer.AUTO_RESIZE_PLAYHEAD_TIMEOUT) {
if (this._hiddenForResize && this._metadata == null && this._hiddenForResizeMetadataDelay < mx.video.VideoPlayer.AUTO_RESIZE_METADATA_DELAY_MAX) {
++this._hiddenForResizeMetadataDelay;
return undefined;
}
this._videoWidth = this._video.width;
this._videoHeight = this._video.height;
clearInterval(this._autoResizeIntervalID);
this._autoResizeIntervalID = 0;
} else {
return undefined;
}
}
if (!this._autoSize && !this._aspectRatio || this._autoResizeDone) {
this.setState(this._cachedState);
return undefined;
}
this._autoResizeDone = true;
if (this._autoSize) {
this._video._width = this._videoWidth;
this._video._height = this._videoHeight;
} else {
if (this._aspectRatio) {
var v3 = this._videoWidth * this.__get__height() / this._videoHeight;
var v2 = this._videoHeight * this.__get__width() / this._videoWidth;
if (v2 < this.__get__height()) {
this._video._height = v2;
} else {
if (v3 < this.__get__width()) {
this._video._width = v3;
}
}
}
}
if (this._hiddenForResize) {
this._hiddenRewindPlayheadTime = this.playheadTime;
if (this._state == mx.video.VideoPlayer.LOADING) {
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
if (!this._ncMgr.isRTMP()) {
this._pause(true);
this._seek(0);
clearInterval(this._finishAutoResizeIntervalID);
this._finishAutoResizeIntervalID = setInterval(this, 'finishAutoResize', mx.video.VideoPlayer.FINISH_AUTO_RESIZE_INTERVAL);
} else {
if (!this._isLive) {
this._currentPos = 0;
this._play(0, 0);
this.setState(mx.video.VideoPlayer.RESIZING);
} else {
if (this._autoPlay) {
clearInterval(this._finishAutoResizeIntervalID);
this._finishAutoResizeIntervalID = setInterval(this, 'finishAutoResize', mx.video.VideoPlayer.FINISH_AUTO_RESIZE_INTERVAL);
} else {
this.finishAutoResize();
}
}
}
} else {
this.dispatchEvent({'type': 'resize', 'x': this._x, 'y': this._y, 'width': this._width, 'height': this._height});
}
};
v2.finishAutoResize = function () {
clearInterval(this._finishAutoResizeIntervalID);
this._finishAutoResizeIntervalID = 0;
if (this.__get__stateResponsive()) {
return undefined;
}
this._visible = this.__visible;
this._sound.setVolume(this._volume);
this._hiddenForResize = false;
this.dispatchEvent({'type': 'resize', 'x': this._x, 'y': this._y, 'width': this._width, 'height': this._height});
if (this._autoPlay) {
if (this._ncMgr.isRTMP()) {
if (!this._isLive) {
this._currentPos = 0;
this._play(0);
}
if (this._state == mx.video.VideoPlayer.RESIZING) {
this.setState(mx.video.VideoPlayer.LOADING);
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
} else {
this._pause(false);
this._cachedState = mx.video.VideoPlayer.PLAYING;
}
} else {
this.setState(mx.video.VideoPlayer.STOPPED);
}
};
v2._createStream = function () {
this._ns = new NetStream(this._ncMgr.getNetConnection());
this._ns.mc = this;
if (this._ncMgr.isRTMP()) {
this._ns.onStatus = function (info) {
this.mc.rtmpOnStatus(info);
};
} else {
this._ns.onStatus = function (info) {
this.mc.httpOnStatus(info);
};
}
this._ns.onMetaData = function (info) {
this.mc.onMetaData(info);
};
this._ns.onCuePoint = function (info) {
this.mc.onCuePoint(info);
};
this._ns.setBufferTime(this._bufferTime);
};
v2._setUpStream = function () {
this._video.attachVideo(this._ns);
this.attachAudio(this._ns);
if (!isNaN(this._ncMgr.getStreamLength()) && this._ncMgr.getStreamLength() >= 0) {
this._streamLength = this._ncMgr.getStreamLength();
}
if (!isNaN(this._ncMgr.getStreamWidth()) && this._ncMgr.getStreamWidth() >= 0) {
this._videoWidth = this._ncMgr.getStreamWidth();
} else {
this._videoWidth = undefined;
}
if (!isNaN(this._ncMgr.getStreamHeight()) && this._ncMgr.getStreamHeight() >= 0) {
this._videoHeight = this._ncMgr.getStreamHeight();
} else {
this._videoHeight = undefined;
}
if ((this._autoSize || this._aspectRatio) && this._videoWidth != undefined && this._videoHeight != undefined) {
this._prevVideoWidth = undefined;
this._prevVideoHeight = undefined;
this.doAutoResize();
}
if (!this._autoSize && !this._aspectRatio || this._videoWidth != undefined && this._videoHeight != undefined) {
if (this._autoPlay) {
if (!this._ncMgr.isRTMP()) {
this._cachedState = mx.video.VideoPlayer.BUFFERING;
this._play();
} else {
if (this._isLive) {
this._cachedState = mx.video.VideoPlayer.BUFFERING;
this._play(-1);
} else {
this._cachedState = mx.video.VideoPlayer.BUFFERING;
this._play(0);
}
}
} else {
this._cachedState = mx.video.VideoPlayer.STOPPED;
if (this._ncMgr.isRTMP()) {
this._play(0, 0);
} else {
this._play();
this._pause(true);
this._seek(0);
}
}
} else {
if (!this._hiddenForResize) {
this.__visible = this._visible;
this._visible = false;
this._volume = this._sound.getVolume();
this._sound.setVolume(0);
this._hiddenForResize = true;
}
this._hiddenForResizeMetadataDelay = 0;
this._play(0);
if (this._currentPos > 0) {
this._seek(this._currentPos);
this._currentPos = 0;
}
}
clearInterval(this._autoResizeIntervalID);
this._autoResizeIntervalID = setInterval(this, 'doAutoResize', mx.video.VideoPlayer.AUTO_RESIZE_INTERVAL);
};
v2.doIdleTimeout = function () {
clearInterval(this._idleTimeoutIntervalID);
this._idleTimeoutIntervalID = 0;
this.close();
};
v2.flushQueuedCmds = function () {
while (this._cmdQueue.length > 0) {
this._cmdQueue.pop();
}
};
v2.execQueuedCmds = function () {
for (;;) {
if (!(this._cmdQueue.length > 0 && (this.__get__stateResponsive() || this._state == mx.video.VideoPlayer.CONNECTION_ERROR) && (this._cmdQueue[0].url != null || this._state != mx.video.VideoPlayer.DISCONNECTED && this._state != mx.video.VideoPlayer.CONNECTION_ERROR))) break;
var v2 = this._cmdQueue.shift();
this._cachedState = this._state;
this._state = mx.video.VideoPlayer.EXEC_QUEUED_CMD;
switch (v2.type) {
case mx.video.VideoPlayer.PLAY:
this.play(v2.url, v2.isLive, v2.time);
break;
case mx.video.VideoPlayer.LOAD:
this.load(v2.url, v2.isLive, v2.time);
break;
case mx.video.VideoPlayer.PAUSE:
this.pause();
break;
case mx.video.VideoPlayer.STOP:
this.stop();
break;
case mx.video.VideoPlayer.SEEK:
this.seek(v2.time);
continue;
}
}
};
v2.queueCmd = function (type, url, isLive, time) {
this._cmdQueue.push({'type': type, 'url': url, 'isLive': isLive, 'time': time});
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v1.DISCONNECTED = 'disconnected';
v1.STOPPED = 'stopped';
v1.PLAYING = 'playing';
v1.PAUSED = 'paused';
v1.BUFFERING = 'buffering';
v1.LOADING = 'loading';
v1.CONNECTION_ERROR = 'connectionError';
v1.REWINDING = 'rewinding';
v1.SEEKING = 'seeking';
v1.RESIZING = 'resizing';
v1.EXEC_QUEUED_CMD = 'execQueuedCmd';
v1.BUFFER_EMPTY = 'bufferEmpty';
v1.BUFFER_FULL = 'bufferFull';
v1.BUFFER_FLUSH = 'bufferFlush';
v1.DEFAULT_INCMANAGER = 'mx.video.NCManager';
v1.DEFAULT_UPDATE_TIME_INTERVAL = 250;
v1.DEFAULT_UPDATE_PROGRESS_INTERVAL = 250;
v1.DEFAULT_IDLE_TIMEOUT_INTERVAL = 300000;
v1.AUTO_RESIZE_INTERVAL = 100;
v1.AUTO_RESIZE_PLAYHEAD_TIMEOUT = 0.5;
v1.AUTO_RESIZE_METADATA_DELAY_MAX = 5;
v1.FINISH_AUTO_RESIZE_INTERVAL = 250;
v1.RTMP_DO_STOP_AT_END_INTERVAL = 500;
v1.RTMP_DO_SEEK_INTERVAL = 100;
v1.HTTP_DO_SEEK_INTERVAL = 250;
v1.HTTP_DO_SEEK_MAX_COUNT = 4;
v1.CLOSE_NS_INTERVAL = 0.25;
v1.HTTP_DELAYED_BUFFERING_INTERVAL = 100;
v1.PLAY = 0;
v1.LOAD = 1;
v1.PAUSE = 2;
v1.STOP = 3;
v1.SEEK = 4;
v2.addProperty('autoRewind', v2.__get__autoRewind, v2.__set__autoRewind);
v2.addProperty('autoSize', v2.__get__autoSize, v2.__set__autoSize);
v2.addProperty('bufferTime', v2.__get__bufferTime, v2.__set__bufferTime);
v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {});
v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {});
v2.addProperty('height', v2.__get__height, v2.__set__height);
v2.addProperty('idleTimeout', v2.__get__idleTimeout, v2.__set__idleTimeout);
v2.addProperty('isLive', v2.__get__isLive, function () {});
v2.addProperty('isRTMP', v2.__get__isRTMP, function () {});
v2.addProperty('maintainAspectRatio', v2.__get__maintainAspectRatio, v2.__set__maintainAspectRatio);
v2.addProperty('metadata', v2.__get__metadata, function () {});
v2.addProperty('ncMgr', v2.__get__ncMgr, function () {});
v2.addProperty('playheadTime', v2.__get__playheadTime, v2.__set__playheadTime);
v2.addProperty('playheadUpdateInterval', v2.__get__playheadUpdateInterval, v2.__set__playheadUpdateInterval);
v2.addProperty('progressInterval', v2.__get__progressInterval, v2.__set__progressInterval);
v2.addProperty('scaleX', v2.__get__scaleX, v2.__set__scaleX);
v2.addProperty('scaleY', v2.__get__scaleY, v2.__set__scaleY);
v2.addProperty('state', v2.__get__state, function () {});
v2.addProperty('stateResponsive', v2.__get__stateResponsive, function () {});
v2.addProperty('totalTime', v2.__get__totalTime, function () {});
v2.addProperty('transform', v2.__get__transform, v2.__set__transform);
v2.addProperty('url', v2.__get__url, function () {});
v2.addProperty('videoHeight', v2.__get__videoHeight, function () {});
v2.addProperty('videoWidth', v2.__get__videoWidth, function () {});
v2.addProperty('visible', v2.__get__visible, v2.__set__visible);
v2.addProperty('volume', v2.__get__volume, v2.__set__volume);
v2.addProperty('width', v2.__get__width, v2.__set__width);
v2.addProperty('x', v2.__get__x, v2.__set__x);
v2.addProperty('y', v2.__get__y, v2.__set__y);
ASSetPropFlags(mx.video.VideoPlayer.prototype, null, 1);
}
#endinitclip
}
movieClip 90 __Packages.mx.video.INCManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.INCManager) {
_global.mx.video.INCManager = function () {};
}
#endinitclip
}
movieClip 91 __Packages.mx.events.EventDispatcher {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.events) {
_global.mx.events = new Object();
}
if (!_global.mx.events.EventDispatcher) {
var v1 = function () {};
mx.events.EventDispatcher = v1;
var v2 = v1.prototype;
v1._removeEventListener = function (queue, event, handler) {
if (queue != undefined) {
var v4 = queue.length;
var v1;
v1 = 0;
while (v1 < v4) {
var v2 = queue[v1];
if (v2 == handler) {
queue.splice(v1, 1);
return undefined;
}
++v1;
}
}
};
v1.initialize = function (object) {
if (mx.events.EventDispatcher._fEventDispatcher == undefined) {
mx.events.EventDispatcher._fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = mx.events.EventDispatcher._fEventDispatcher.addEventListener;
object.removeEventListener = mx.events.EventDispatcher._fEventDispatcher.removeEventListener;
object.dispatchEvent = mx.events.EventDispatcher._fEventDispatcher.dispatchEvent;
object.dispatchQueue = mx.events.EventDispatcher._fEventDispatcher.dispatchQueue;
};
v2.dispatchQueue = function (queueObj, eventObj) {
var v7 = '__q_' + eventObj.type;
var v4 = queueObj[v7];
if (v4 != undefined) {
var v5;
for (v5 in v4) {
var v1 = v4[v5];
var v3 = typeof v1;
if (v3 == 'object' || v3 == 'movieclip') {
if (v1.handleEvent != undefined) {
v1.handleEvent(eventObj);
}
if (v1[eventObj.type] != undefined) {
if (mx.events.EventDispatcher.exceptions[eventObj.type] == undefined) {
v1[eventObj.type](eventObj);
}
}
} else {
v1.apply(queueObj, [eventObj]);
}
}
}
};
v2.dispatchEvent = function (eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + 'Handler'](eventObj);
this.dispatchQueue(this, eventObj);
};
v2.addEventListener = function (event, handler) {
var v3 = '__q_' + event;
if (this[v3] == undefined) {
this[v3] = new Array();
}
_global.ASSetPropFlags(this, v3, 1);
mx.events.EventDispatcher._removeEventListener(this[v3], event, handler);
this[v3].push(handler);
};
v2.removeEventListener = function (event, handler) {
var v2 = '__q_' + event;
mx.events.EventDispatcher._removeEventListener(this[v2], event, handler);
};
v1._fEventDispatcher = undefined;
v1.exceptions = {'move': 1, 'draw': 1, 'load': 1};
ASSetPropFlags(mx.events.EventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 92 __Packages.mx.video.VideoError {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.VideoError) {
var v1 = function (errCode, msg) {
super();
this._code = errCode;
this.message = '' + errCode + ': ' + mx.video.VideoError.ERROR_MSG[errCode - mx.video.VideoError.BASE_ERROR_CODE] + ((msg == undefined) ? '' : ': ' + msg);
this.name = 'VideoError';
};
mx.video.VideoError = v1;
mx.video.VideoError extends Error;
var v2 = v1.prototype;
v2.__get__code = function () {
return this._code;
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v1.BASE_ERROR_CODE = 1000;
v1.NO_CONNECTION = 1000;
v1.NO_CUE_POINT_MATCH = 1001;
v1.ILLEGAL_CUE_POINT = 1002;
v1.INVALID_SEEK = 1003;
v1.INVALID_CONTENT_PATH = 1004;
v1.INVALID_XML = 1005;
v1.NO_BITRATE_MATCH = 1006;
v1.DELETE_DEFAULT_PLAYER = 1007;
v1.ERROR_MSG = ['Unable to make connection to server or to find FLV on server', 'No matching cue point found', 'Illegal cue point', 'Invalid seek', 'Invalid contentPath', 'Invalid xml', 'No bitrate match, must be no default flv', 'Cannot delete default VideoPlayer'];
v2.addProperty('code', v2.__get__code, function () {});
ASSetPropFlags(mx.video.VideoError.prototype, null, 1);
}
#endinitclip
}
movieClip 93 __Packages.mx.video.UIManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.UIManager) {
var v1 = function (vc) {
this._vc = vc;
this._skin = undefined;
this._skinAutoHide = false;
this._skinReady = true;
this.__visible = true;
this._bufferingBarHides = false;
this._controlsEnabled = true;
this._lastScrubPos = 0;
this._lastVolumePos = 0;
this.cachedSoundLevel = this._vc.volume;
this._isMuted = false;
this.controls = new Array();
this.customClips = undefined;
this.skin_mc = undefined;
this.skinLoader = undefined;
this.layout_mc = undefined;
this.border_mc = undefined;
this._seekBarIntervalID = 0;
this._seekBarInterval = mx.video.UIManager.SEEK_BAR_INTERVAL_DEFAULT;
this._seekBarScrubTolerance = mx.video.UIManager.SEEK_BAR_SCRUB_TOLERANCE_DEFAULT;
this._volumeBarIntervalID = 0;
this._volumeBarInterval = mx.video.UIManager.VOLUME_BAR_INTERVAL_DEFAULT;
this._volumeBarScrubTolerance = mx.video.UIManager.VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT;
this._bufferingDelayIntervalID = 0;
this._bufferingDelayInterval = mx.video.UIManager.BUFFERING_DELAY_INTERVAL_DEFAULT;
this._bufferingOn = false;
this._skinAutoHideIntervalID = 0;
this._vc.addEventListener('metadataReceived', this);
this._vc.addEventListener('playheadUpdate', this);
this._vc.addEventListener('progress', this);
this._vc.addEventListener('stateChange', this);
this._vc.addEventListener('ready', this);
this._vc.addEventListener('resize', this);
this._vc.addEventListener('volumeUpdate', this);
};
mx.video.UIManager = v1;
var v2 = v1.prototype;
v2.handleEvent = function (e) {
if (e.vp != undefined && e.vp != this._vc.__get__visibleVideoPlayerIndex()) {
return undefined;
}
var v9 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
if (e.type == 'stateChange') {
if (e.state == mx.video.FLVPlayback.BUFFERING) {
if (!this._bufferingOn) {
clearInterval(this._bufferingDelayIntervalID);
this._bufferingDelayIntervalID = setInterval(this, 'doBufferingDelay', this._bufferingDelayInterval);
}
} else {
clearInterval(this._bufferingDelayIntervalID);
this._bufferingDelayIntervalID = 0;
this._bufferingOn = false;
}
if (e.state == mx.video.FLVPlayback.LOADING) {
this._progressPercent = (this._vc.getVideoPlayer(e.vp)).__get__isRTMP() ? 100 : 0;
var v2 = mx.video.UIManager.SEEK_BAR;
while (v2 <= mx.video.UIManager.VOLUME_BAR) {
var v4 = this.controls[v2];
if (v4.progress_mc != undefined) {
this.positionBar(v4, 'progress', this._progressPercent);
}
++v2;
}
}
v2 = 0;
while (v2 < mx.video.UIManager.NUM_CONTROLS) {
if (this.controls[v2] == undefined) {
} else {
this.setEnabledAndVisibleForState(v2, e.state);
if (v2 < mx.video.UIManager.NUM_BUTTONS) {
this.skinButtonControl(this.controls[v2]);
}
}
++v2;
}
} else {
if (e.type == 'ready' || e.type == 'metadataReceived') {
var v2 = 0;
while (v2 < mx.video.UIManager.NUM_CONTROLS) {
if (this.controls[v2] == undefined) {
} else {
this.setEnabledAndVisibleForState(v2, this._vc.__get__state());
if (v2 < mx.video.UIManager.NUM_BUTTONS) {
this.skinButtonControl(this.controls[v2]);
}
}
++v2;
}
if ((this._vc.getVideoPlayer(e.vp)).__get__isRTMP()) {
this._progressPercent = 100;
v2 = mx.video.UIManager.SEEK_BAR;
while (v2 <= mx.video.UIManager.VOLUME_BAR) {
var v4 = this.controls[v2];
if (v4.progress_mc != undefined) {
this.positionBar(v4, 'progress', this._progressPercent);
}
++v2;
}
}
} else {
if (e.type == 'resize') {
this.layoutSkin();
this.setupSkinAutoHide();
} else {
if (e.type == 'volumeUpdate') {
if (this._isMuted && e.volume > 0) {
this._isMuted = false;
this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING);
this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_OFF_BUTTON]);
this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING);
this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_ON_BUTTON]);
}
var v5 = this.controls[mx.video.UIManager.VOLUME_BAR];
v5.percentage = this._isMuted ? this.cachedSoundLevel : e.volume;
if (v5.percentage < 0) {
v5.percentage = 0;
} else {
if (v5.percentage > 100) {
v5.percentage = 100;
}
}
this.positionHandle(mx.video.UIManager.VOLUME_BAR);
} else {
if (e.type == 'playheadUpdate' && this.controls[mx.video.UIManager.SEEK_BAR] != undefined) {
if (!this._vc.__get__isLive() && this._vc.__get__totalTime() > 0) {
var v6 = (e.playheadTime / this._vc.__get__totalTime()) * 100;
if (v6 < 0) {
v6 = 0;
} else {
if (v6 > 100) {
v6 = 100;
}
}
var v10 = this.controls[mx.video.UIManager.SEEK_BAR];
v10.percentage = v6;
this.positionHandle(mx.video.UIManager.SEEK_BAR);
}
} else {
if (e.type == 'progress') {
this._progressPercent = e.bytesTotal <= 0 ? 100 : (e.bytesLoaded / e.bytesTotal) * 100;
var v7 = this._vc._vpState[e.vp].minProgressPercent;
if (!isNaN(v7) && v7 > this._progressPercent) {
this._progressPercent = v7;
}
if (this._vc.__get__totalTime() > 0) {
var v8 = (this._vc.__get__playheadTime() / this._vc.__get__totalTime()) * 100;
if (v8 > this._progressPercent) {
this._progressPercent = v8;
this._vc._vpState[e.vp].minProgressPercent = this._progressPercent;
}
}
var v2 = mx.video.UIManager.SEEK_BAR;
while (v2 <= mx.video.UIManager.VOLUME_BAR) {
var v4 = this.controls[v2];
if (v4.progress_mc != undefined) {
this.positionBar(v4, 'progress', this._progressPercent);
}
++v2;
}
}
}
}
}
}
}
this._vc.__set__activeVideoPlayerIndex(v9);
};
v2.__get__bufferingBarHidesAndDisablesOthers = function () {
return this._bufferingBarHides;
};
v2.__set__bufferingBarHidesAndDisablesOthers = function (b) {
this._bufferingBarHides = b;
return this.__get__bufferingBarHidesAndDisablesOthers();
};
v2.__get__controlsEnabled = function () {
return this._controlsEnabled;
};
v2.__set__controlsEnabled = function (flag) {
if (this._controlsEnabled == flag) {
return undefined;
}
this._controlsEnabled = flag;
var v2 = 0;
while (v2 < mx.video.UIManager.NUM_BUTTONS) {
if (this.controls[v2] == undefined) {
} else {
this.controls[v2].releaseCapture();
this.controls[v2].enabled = this._controlsEnabled && this.controls[v2].myEnabled;
this.skinButtonControl(this.controls[v2]);
}
++v2;
}
return this.__get__controlsEnabled();
};
v2.__get__skin = function () {
return this._skin;
};
v2.__set__skin = function (s) {
if (s == this._skin) {
return undefined;
}
if (this._skin != undefined) {
this.removeSkin();
}
this._skin = s;
this._skinReady = this._skin == null || this._skin == '';
if (!this._skinReady) {
this.downloadSkin();
}
return this.__get__skin();
};
v2.__get__skinAutoHide = function () {
return this._skinAutoHide;
};
v2.__set__skinAutoHide = function (b) {
if (b == this._skinAutoHide) {
return undefined;
}
this._skinAutoHide = b;
this.setupSkinAutoHide();
return this.__get__skinAutoHide();
};
v2.__get__skinReady = function () {
return this._skinReady;
};
v2.__get__seekBarInterval = function () {
return this._seekBarInterval;
};
v2.__set__seekBarInterval = function (s) {
if (this._seekBarInterval == s) {
return undefined;
}
this._seekBarInterval = s;
if (this._seekBarIntervalID > 0) {
clearInterval(this._seekBarIntervalID);
this._seekBarIntervalID = setInterval(this, 'seekBarListener', this._seekBarInterval, false);
}
return this.__get__seekBarInterval();
};
v2.__get__volumeBarInterval = function () {
return this._volumeBarInterval;
};
v2.__set__volumeBarInterval = function (s) {
if (this._volumeBarInterval == s) {
return undefined;
}
this._volumeBarInterval = s;
if (this._volumeBarIntervalID > 0) {
clearInterval(this._volumeBarIntervalID);
this._volumeBarIntervalID = setInterval(this, 'volumeBarListener', this._volumeBarInterval, false);
}
return this.__get__volumeBarInterval();
};
v2.__get__bufferingDelayInterval = function () {
return this._bufferingDelayInterval;
};
v2.__set__bufferingDelayInterval = function (s) {
if (this._bufferingDelayInterval == s) {
return undefined;
}
this._bufferingDelayInterval = s;
if (this._bufferingDelayIntervalID > 0) {
clearInterval(this._bufferingDelayIntervalID);
this._bufferingDelayIntervalID = setInterval(this, 'doBufferingDelay', this._bufferingDelayIntervalID);
}
return this.__get__bufferingDelayInterval();
};
v2.__get__volumeBarScrubTolerance = function () {
return this._volumeBarScrubTolerance;
};
v2.__set__volumeBarScrubTolerance = function (s) {
this._volumeBarScrubTolerance = s;
return this.__get__volumeBarScrubTolerance();
};
v2.__get__seekBarScrubTolerance = function () {
return this._seekBarScrubTolerance;
};
v2.__set__seekBarScrubTolerance = function (s) {
this._seekBarScrubTolerance = s;
return this.__get__seekBarScrubTolerance();
};
v2.__get__visible = function () {
return this.__visible;
};
v2.__set__visible = function (v) {
if (this.__visible == v) {
return undefined;
}
this.__visible = v;
if (!this.__visible) {
this.skin_mc._visible = false;
} else {
this.setupSkinAutoHide();
}
return this.__get__visible();
};
v2.getControl = function (index) {
return this.controls[index];
};
v2.setControl = function (index, s) {
if (s == null) {
s = undefined;
}
if (s == this.controls[index]) {
return undefined;
}
switch (index) {
case mx.video.UIManager.PAUSE_BUTTON:
case mx.video.UIManager.PLAY_BUTTON:
this.resetPlayPause();
break;
case mx.video.UIManager.PLAY_PAUSE_BUTTON:
if (s._parent != this.layout_mc) {
this.resetPlayPause();
this.setControl(mx.video.UIManager.PAUSE_BUTTON, s.pause_mc);
this.setControl(mx.video.UIManager.PLAY_BUTTON, s.play_mc);
}
break;
case mx.video.UIManager.MUTE_BUTTON:
if (s._parent != this.layout_mc) {
this.setControl(mx.video.UIManager.MUTE_ON_BUTTON, s.on_mc);
this.setControl(mx.video.UIManager.MUTE_OFF_BUTTON, s.off_mc);
}
}
if (index >= mx.video.UIManager.NUM_BUTTONS) {
this.controls[index] = s;
switch (index) {
case mx.video.UIManager.SEEK_BAR:
this.addBarControl(mx.video.UIManager.SEEK_BAR);
break;
case mx.video.UIManager.VOLUME_BAR:
this.addBarControl(mx.video.UIManager.VOLUME_BAR);
this.controls[mx.video.UIManager.VOLUME_BAR].percentage = this._vc.volume;
break;
case mx.video.UIManager.BUFFERING_BAR:
this.controls[mx.video.UIManager.BUFFERING_BAR].uiMgr = this;
this.controls[mx.video.UIManager.BUFFERING_BAR].controlIndex = mx.video.UIManager.BUFFERING_BAR;
if (this.controls[mx.video.UIManager.BUFFERING_BAR]._parent == this.skin_mc) {
this.finishAddBufferingBar();
} else {
this.controls[mx.video.UIManager.BUFFERING_BAR].onEnterFrame = function () {
this.uiMgr.finishAddBufferingBar();
};
}
}
this.setEnabledAndVisibleForState(index, this._vc.__get__state());
} else {
this.removeButtonControl(index);
this.controls[index] = s;
this.addButtonControl(index);
}
};
v2.resetPlayPause = function () {
if (this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] == undefined) {
return undefined;
}
var v2 = mx.video.UIManager.PAUSE_BUTTON;
while (v2 <= mx.video.UIManager.PLAY_BUTTON) {
this.removeButtonControl(v2);
++v2;
}
this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] = undefined;
};
v2.addButtonControl = function (index) {
var v3 = this.controls[index];
if (v3 == undefined) {
return undefined;
}
var v5 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
v3.id = index;
v3.state = mx.video.UIManager.UP_STATE;
v3.uiMgr = this;
this.setEnabledAndVisibleForState(index, this._vc.__get__state());
v3.onRollOver = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.skinButtonControl(this);
};
v3.onRollOut = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.skinButtonControl(this);
};
if (index == mx.video.UIManager.SEEK_BAR_HANDLE || index == mx.video.UIManager.VOLUME_BAR_HANDLE) {
v3.onPress = function () {
if (_root.focusManager) {
this._focusrect = false;
Selection.setFocus(this);
}
this.state = mx.video.UIManager.DOWN_STATE;
this.uiMgr.dispatchMessage(this);
this.uiMgr.skinButtonControl(this);
};
v3.onRelease = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.handleRelease(this.controlIndex);
this.uiMgr.skinButtonControl(this);
};
v3.onReleaseOutside = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.handleRelease(this.controlIndex);
this.uiMgr.skinButtonControl(this);
};
} else {
v3.onPress = function () {
if (_root.focusManager) {
this._focusrect = false;
Selection.setFocus(this);
}
this.state = mx.video.UIManager.DOWN_STATE;
this.uiMgr.skinButtonControl(this);
};
v3.onRelease = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.dispatchMessage(this);
this.uiMgr.skinButtonControl(this);
};
v3.onReleaseOutside = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.skinButtonControl(this);
};
}
if (v3._parent == this.skin_mc) {
this.skinButtonControl(v3);
} else {
v3.onEnterFrame = function () {
this.uiMgr.skinButtonControl(this);
};
}
this._vc.__set__activeVideoPlayerIndex(v5);
};
v2.removeButtonControl = function (index) {
if (this.controls[index] == undefined) {
return undefined;
}
this.controls[index].uiMgr = undefined;
this.controls[index].onRollOver = undefined;
this.controls[index].onRollOut = undefined;
this.controls[index].onPress = undefined;
this.controls[index].onRelease = undefined;
this.controls[index].onReleaseOutside = undefined;
this.controls[index] = undefined;
};
v2.downloadSkin = function () {
if (this.skinLoader == undefined) {
this.skinLoader = new MovieClipLoader();
this.skinLoader.addListener(this);
}
if (this.skin_mc == undefined) {
this.skin_mc = this._vc.createEmptyMovieClip('skin_mc', this._vc.getNextHighestDepth());
}
this.skin_mc._visible = false;
this.skin_mc._x = Stage.width + 100;
this.skin_mc._y = Stage.height + 100;
this.skinLoader.loadClip(this._skin, this.skin_mc);
};
v2.onLoadError = function (target_mc, errorCode) {
this._skinReady = true;
this._vc.skinError('Unable to load skin swf');
};
v2.onLoadInit = function () {
try {
this.skin_mc._visible = false;
this.skin_mc._x = 0;
this.skin_mc._y = 0;
this.layout_mc = this.skin_mc.layout_mc;
if (this.layout_mc == undefined) {
throw new Error('No layout_mc');
}
this.layout_mc._visible = false;
this.customClips = new Array();
this.setCustomClips('bg');
if (this.layout_mc.playpause_mc != undefined) {
this.setSkin(mx.video.UIManager.PLAY_PAUSE_BUTTON, this.layout_mc.playpause_mc);
} else {
this.setSkin(mx.video.UIManager.PAUSE_BUTTON, this.layout_mc.pause_mc);
this.setSkin(mx.video.UIManager.PLAY_BUTTON, this.layout_mc.play_mc);
}
this.setSkin(mx.video.UIManager.STOP_BUTTON, this.layout_mc.stop_mc);
this.setSkin(mx.video.UIManager.BACK_BUTTON, this.layout_mc.back_mc);
this.setSkin(mx.video.UIManager.FORWARD_BUTTON, this.layout_mc.forward_mc);
this.setSkin(mx.video.UIManager.MUTE_BUTTON, this.layout_mc.volumeMute_mc);
this.setSkin(mx.video.UIManager.SEEK_BAR, this.layout_mc.seekBar_mc);
this.setSkin(mx.video.UIManager.VOLUME_BAR, this.layout_mc.volumeBar_mc);
this.setSkin(mx.video.UIManager.BUFFERING_BAR, this.layout_mc.bufferingBar_mc);
this.setCustomClips('fg');
this.layoutSkin();
this.setupSkinAutoHide();
this.skin_mc._visible = this.__visible;
this._skinReady = true;
this._vc.skinLoaded();
var v4 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
var v3 = this._vc.__get__state();
var v2 = 0;
while (v2 < mx.video.UIManager.NUM_CONTROLS) {
if (this.controls[v2] == undefined) {
} else {
this.setEnabledAndVisibleForState(v2, v3);
if (v2 < mx.video.UIManager.NUM_BUTTONS) {
this.skinButtonControl(this.controls[v2]);
}
}
++v2;
}
this._vc.__set__activeVideoPlayerIndex(v4);
}
catch (v0) {
if (Error(v0) != null) {
var err = Error(v0);
this._vc.skinError(err.message);
this.removeSkin();
} else {
throw v0;
}
}
};
v2.layoutSkin = function () {
if (this.layout_mc == undefined) {
return undefined;
}
var v3 = this.layout_mc.video_mc;
if (v3 == undefined) {
throw new Error('No layout_mc.video_mc');
}
this.placeholderLeft = v3._x;
this.placeholderRight = v3._x + v3._width;
this.placeholderTop = v3._y;
this.placeholderBottom = v3._y + v3._height;
this.videoLeft = 0;
this.videoRight = this._vc.width;
this.videoTop = 0;
this.videoBottom = this._vc.height;
if (!isNaN(this.layout_mc.minWidth) && this.layout_mc.minWidth > 0 && this.layout_mc.minWidth > this.videoRight) {
this.videoLeft -= (this.layout_mc.minWidth - this.videoRight) / 2;
this.videoRight = this.layout_mc.minWidth + this.videoLeft;
}
if (!isNaN(this.layout_mc.minHeight) && this.layout_mc.minHeight > 0 && this.layout_mc.minHeight > this.videoBottom) {
this.videoTop -= (this.layout_mc.minHeight - this.videoBottom) / 2;
this.videoBottom = this.layout_mc.minHeight + this.videoTop;
}
var v2;
v2 = 0;
while (v2 < this.customClips.length) {
this.layoutControl(this.customClips[v2]);
++v2;
}
v2 = 0;
while (v2 < mx.video.UIManager.NUM_CONTROLS) {
this.layoutControl(this.controls[v2]);
++v2;
}
};
v2.layoutControl = function (ctrl) {
if (ctrl == undefined) {
return undefined;
}
if (ctrl.skin.anchorRight) {
if (ctrl.skin.anchorLeft) {
ctrl._x = ctrl.skin._x - this.placeholderLeft + this.videoLeft;
ctrl._width = ctrl.skin._x + ctrl.skin._width - this.placeholderRight + this.videoRight - ctrl._x;
if (ctrl.origWidth != undefined) {
ctrl.origWidth = undefined;
}
} else {
ctrl._x = ctrl.skin._x - this.placeholderRight + this.videoRight;
}
} else {
ctrl._x = ctrl.skin._x - this.placeholderLeft + this.videoLeft;
}
if (ctrl.skin.anchorTop) {
if (ctrl.skin.anchorBottom) {
ctrl._y = ctrl.skin._y - this.placeholderTop + this.videoTop;
ctrl._height = ctrl.skin._y + ctrl.skin._height - this.placeholderBottom + this.videoBottom - ctrl._y;
if (ctrl.origHeight != undefined) {
ctrl.origHeight = undefined;
}
} else {
ctrl._y = ctrl.skin._y - this.placeholderTop + this.videoTop;
}
} else {
ctrl._y = ctrl.skin._y - this.placeholderBottom + this.videoBottom;
}
switch (ctrl.controlIndex) {
case mx.video.UIManager.SEEK_BAR:
case mx.video.UIManager.VOLUME_BAR:
if (ctrl.progress_mc != undefined) {
if (this._progressPercent == undefined) {
this._progressPercent = this._vc.__get__isRTMP() ? 100 : 0;
}
this.positionBar(ctrl, 'progress', this._progressPercent);
}
this.positionHandle(ctrl.controlIndex);
break;
case mx.video.UIManager.BUFFERING_BAR:
if (ctrl.fill_mc != undefined) {
this.positionMaskedFill(ctrl, ctrl.fill_mc, 100);
}
}
if (ctrl.layoutSelf != undefined) {
ctrl.layoutSelf();
}
};
v2.removeSkin = function () {
if (this.skin_mc != undefined) {
var v2 = 0;
while (v2 < mx.video.UIManager.NUM_BUTTONS) {
this.removeButtonControl(v2);
++v2;
}
v2 = mx.video.UIManager.NUM_BUTTONS;
while (v2 < mx.video.UIManager.NUM_CONTROLS) {
this.controls[v2] = undefined;
++v2;
}
this.skin_mc.unloadMovie();
this.layout_mc = undefined;
this.border_mc = undefined;
}
};
v2.setCustomClips = function (prefix) {
var v4 = 1;
while (!false) {
var v2 = this.layout_mc[prefix + v4++ + '_mc'];
if (v2 == undefined) {
break;
}
var v3 = v2.mc;
if (v3 == undefined) {
v3 = v2._parent._parent[v2._name];
}
if (v3 == undefined) {
throw new Error('Bad clip in skin: ' + v2);
}
v3.skin = v2;
this.customClips.push(v3);
if (prefix == 'bg' && v4 == 2) {
this.border_mc = v3;
}
}
};
v2.setSkin = function (index, s) {
if (s == undefined) {
return undefined;
}
var v2 = s.mc;
if (v2 == undefined) {
v2 = s._parent._parent[s._name];
}
if (v2 == undefined) {
throw new Error('Bad clip in skin: ' + s);
}
v2.skin = s;
if (index < mx.video.UIManager.NUM_BUTTONS) {
this.setupSkinStates(v2);
} else {
switch (index) {
case mx.video.UIManager.PLAY_PAUSE_BUTTON:
this.setupSkinStates(v2.play_mc);
this.setupSkinStates(v2.pause_mc);
break;
case mx.video.UIManager.MUTE_BUTTON:
this.setupSkinStates(v2.on_mc);
this.setupSkinStates(v2.off_mc);
break;
case mx.video.UIManager.SEEK_BAR:
case mx.video.UIManager.VOLUME_BAR:
var v4 = (index == mx.video.UIManager.SEEK_BAR) ? 'seekBar' : 'volumeBar';
if (v2.handle_mc == undefined) {
v2.handle_mc = v2.skin.handle_mc;
if (v2.handle_mc == undefined) {
v2.handle_mc = v2.skin._parent._parent[v4 + 'Handle_mc'];
}
}
if (v2.progress_mc == undefined) {
v2.progress_mc = v2.skin.progress_mc;
if (v2.progress_mc == undefined) {
v2.progress_mc = v2.skin._parent._parent[v4 + 'Progress_mc'];
}
}
if (v2.fullness_mc == undefined) {
v2.fullness_mc = v2.skin.fullness_mc;
if (v2.fullness_mc == undefined) {
v2.fullness_mc = v2.skin._parent._parent[v4 + 'Fullness_mc'];
}
}
break;
case mx.video.UIManager.BUFFERING_BAR:
if (v2.fill_mc == undefined) {
v2.fill_mc = v2.skin.fill_mc;
if (v2.fill_mc == undefined) {
v2.fill_mc = v2.skin._parent._parent.bufferingBarFill_mc;
}
}
}
}
this.setControl(index, v2);
};
v2.setupSkinStates = function (ctrl) {
if (ctrl.up_mc == undefined) {
ctrl.up_mc = ctrl;
ctrl.over_mc = ctrl;
ctrl.down_mc = ctrl;
ctrl.disabled_mc = ctrl;
} else {
ctrl._x = 0;
ctrl._y = 0;
ctrl.up_mc._x = 0;
ctrl.up_mc._y = 0;
ctrl.up_mc._visible = true;
if (ctrl.over_mc == undefined) {
ctrl.over_mc = ctrl.up_mc;
} else {
ctrl.over_mc._x = 0;
ctrl.over_mc._y = 0;
ctrl.over_mc._visible = false;
}
if (ctrl.down_mc == undefined) {
ctrl.down_mc = ctrl.up_mc;
} else {
ctrl.down_mc._x = 0;
ctrl.down_mc._y = 0;
ctrl.down_mc._visible = false;
}
if (ctrl.disabled_mc == undefined) {
ctrl.disabled_mc_mc = ctrl.up_mc;
} else {
ctrl.disabled_mc._x = 0;
ctrl.disabled_mc._y = 0;
ctrl.disabled_mc._visible = false;
}
}
};
v2.skinButtonControl = function (ctrl) {
if (ctrl.onEnterFrame != undefined) {
delete ctrl.onEnterFrame;
ctrl.onEnterFrame = undefined;
}
if (ctrl.enabled) {
switch (ctrl.state) {
case mx.video.UIManager.UP_STATE:
if (ctrl.up_mc == undefined) {
ctrl.up_mc = ctrl.attachMovie(ctrl.upLinkageID, 'up_mc', ctrl.getNextHighestDepth());
}
this.applySkinState(ctrl, ctrl.up_mc);
break;
case mx.video.UIManager.OVER_STATE:
if (ctrl.over_mc == undefined) {
if (ctrl.overLinkageID == undefined) {
ctrl.over_mc = ctrl.up_mc;
} else {
ctrl.over_mc = ctrl.attachMovie(ctrl.overLinkageID, 'over_mc', ctrl.getNextHighestDepth());
}
}
this.applySkinState(ctrl, ctrl.over_mc);
break;
case mx.video.UIManager.DOWN_STATE:
if (ctrl.down_mc == undefined) {
if (ctrl.downLinkageID == undefined) {
ctrl.down_mc = ctrl.up_mc;
} else {
ctrl.down_mc = ctrl.attachMovie(ctrl.downLinkageID, 'down_mc', ctrl.getNextHighestDepth());
}
}
this.applySkinState(ctrl, ctrl.down_mc);
}
} else {
ctrl.state = mx.video.UIManager.UP_STATE;
if (ctrl.disabled_mc == undefined) {
if (ctrl.disabledLinkageID == undefined) {
ctrl.disabled_mc = ctrl.up_mc;
} else {
ctrl.disabled_mc = ctrl.attachMovie(ctrl.disabledLinkageID, 'disabled_mc', ctrl.getNextHighestDepth());
}
}
this.applySkinState(ctrl, ctrl.disabled_mc);
}
if (ctrl.placeholder_mc != undefined) {
ctrl.placeholder_mc.unloadMovie();
delete ctrl.placeholder_mc;
ctrl.placeholder_mc = undefined;
}
};
v2.applySkinState = function (ctrl, state) {
if (state != ctrl.currentState_mc) {
if (state != undefined) {
state._visible = true;
}
if (ctrl.currentState_mc != undefined) {
ctrl.currentState_mc._visible = false;
}
ctrl.currentState_mc = state;
}
};
v2.addBarControl = function (controlIndex) {
var v2 = this.controls[controlIndex];
v2.isDragging = false;
v2.percentage = 0;
v2.uiMgr = this;
v2.controlIndex = controlIndex;
if (v2._parent == this.skin_mc) {
this.finishAddBarControl(controlIndex);
} else {
v2.onEnterFrame = function () {
this.uiMgr.finishAddBarControl(this.controlIndex);
};
}
};
v2.finishAddBarControl = function (controlIndex) {
var v2 = this.controls[controlIndex];
delete v2.onEnterFrame;
v2.onEnterFrame = undefined;
if (v2.addBarControl != undefined) {
v2.addBarControl();
}
this.calcBarMargins(v2, 'handle', true);
this.calcBarMargins(v2, 'progress', false);
this.calcBarMargins(v2.progress_mc, 'fill', false);
this.calcBarMargins(v2.progress_mc, 'mask', false);
this.calcBarMargins(v2, 'fullness', false);
this.calcBarMargins(v2.fullness_mc, 'fill', false);
this.calcBarMargins(v2.fullness_mc, 'mask', false);
v2.origWidth = v2._width;
v2.origHeight = v2._height;
this.fixUpBar(v2, 'progress');
if (v2.progress_mc != undefined) {
this.fixUpBar(v2, 'progressBarFill');
if (this._progressPercent == undefined) {
this._progressPercent = this._vc.__get__isRTMP() ? 100 : 0;
}
this.positionBar(v2, 'progress', this._progressPercent);
}
this.fixUpBar(v2, 'fullness');
if (v2.fullness_mc != undefined) {
this.fixUpBar(v2, 'fullnessBarFill');
}
this.fixUpBar(v2, 'handle');
v2.handle_mc.controlIndex = controlIndex;
switch (controlIndex) {
case mx.video.UIManager.SEEK_BAR:
this.setControl(mx.video.UIManager.SEEK_BAR_HANDLE, v2.handle_mc);
break;
case mx.video.UIManager.VOLUME_BAR:
this.setControl(mx.video.UIManager.VOLUME_BAR_HANDLE, v2.handle_mc);
}
this.positionHandle(controlIndex);
};
v2.fixUpBar = function (ctrl, type) {
if (ctrl[type + 'LinkageID'] != undefined && ctrl[type + 'LinkageID'].length > 0) {
var v1;
if (ctrl[type + 'Below']) {
v1 = -1;
while (ctrl._parent.getInstanceAtDepth(v1) != undefined) {
--v1;
}
} else {
ctrl[type + 'Below'] = false;
v1 = ctrl._parent.getNextHighestDepth();
}
var v5 = (ctrl.controlIndex == mx.video.UIManager.SEEK_BAR) ? 'seekBar' : 'volumeBar';
var v4 = v5 + (type.substring(0, 1)).toUpperCase() + type.substring(1) + '_mc';
ctrl[type + '_mc'] = ctrl._parent.attachMovie(ctrl[type + 'LinkageID'], v4, v1);
}
};
v2.calcBarMargins = function (ctrl, type, symmetricMargins) {
var v2 = ctrl[type + '_mc'];
if (v2 == undefined) {
return undefined;
}
if (ctrl[type + 'LeftMargin'] == undefined && v2._parent == ctrl._parent) {
ctrl[type + 'LeftMargin'] = v2._x - ctrl._x;
}
if (ctrl[type + 'RightMargin'] == undefined) {
if (symmetricMargins) {
ctrl[type + 'RightMargin'] = ctrl[type + 'LeftMargin'];
} else {
if (v2._parent == ctrl._parent) {
ctrl[type + 'RightMargin'] = ctrl._width - v2._width - v2._x + ctrl._x;
}
}
}
if (ctrl[type + 'TopMargin'] == undefined && v2._parent == ctrl._parent) {
ctrl[type + 'TopMargin'] = v2._y - ctrl._y;
}
if (ctrl[type + 'BottomMargin'] == undefined) {
if (symmetricMargins) {
ctrl[type + 'BottomMargin'] = ctrl[type + 'TopMargin'];
} else {
if (v2._parent == ctrl._parent) {
ctrl[type + 'BottomMargin'] = ctrl._height - v2._height - v2._y + ctrl._y;
}
}
}
if (ctrl[type + 'X'] == undefined) {
if (v2._parent == ctrl._parent) {
ctrl[type + 'X'] = v2._x - ctrl._x;
} else {
if (v2._parent == ctrl) {
ctrl[type + 'X'] = v2._x;
}
}
}
if (ctrl[type + 'Y'] == undefined) {
if (v2._parent == ctrl._parent) {
ctrl[type + 'Y'] = v2._y - ctrl._y;
} else {
if (v2._parent == ctrl) {
ctrl[type + 'Y'] = v2._y;
}
}
}
ctrl[type + 'XScale'] = v2._xscale;
ctrl[type + 'YScale'] = v2._yscale;
ctrl[type + 'Width'] = v2._width;
ctrl[type + 'Height'] = v2._height;
};
v2.finishAddBufferingBar = function () {
var v2 = this.controls[mx.video.UIManager.BUFFERING_BAR];
delete v2.onEnterFrame;
v2.onEnterFrame = undefined;
this.calcBarMargins(v2, 'fill', true);
this.fixUpBar(v2, 'fill');
if (v2.fill_mc != undefined) {
this.positionMaskedFill(v2, v2.fill_mc, 100);
}
};
v2.positionMaskedFill = function (ctrl, fill, percent) {
var v5 = fill._parent;
var v3 = ctrl.mask_mc;
if (v3 == undefined) {
v3 = v5.createEmptyMovieClip(ctrl._name + 'Mask_mc', v5.getNextHighestDepth());
ctrl.mask_mc = v3;
v3.beginFill(16777215);
v3.lineTo(0, 0);
v3.lineTo(1, 0);
v3.lineTo(1, 1);
v3.lineTo(0, 1);
v3.lineTo(0, 0);
v3.endFill();
fill.setMask(v3);
v3._x = ctrl.fillX;
v3._y = ctrl.fillY;
v3._width = ctrl.fillWidth;
v3._height = ctrl.fillHeight;
v3._visible = false;
this.calcBarMargins(ctrl, 'mask', true);
}
if (v5 == ctrl) {
if (fill.slideReveal) {
fill._x = ctrl.maskX - ctrl.fillWidth + ctrl.fillWidth * percent / 100;
} else {
v3._width = ctrl.fillWidth * percent / 100;
}
} else {
if (v5 == ctrl._parent) {
if (fill.slideReveal) {
v3._x = ctrl._x + ctrl.maskLeftMargin;
v3._y = ctrl._y + ctrl.maskTopMargin;
v3._width = ctrl._width - ctrl.maskRightMargin - ctrl.maskLeftMargin;
v3._height = ctrl._height - ctrl.maskTopMargin - ctrl.maskBottomMargin;
fill._x = v3._x - ctrl.fillWidth + ctrl.maskWidth * percent / 100;
fill._y = ctrl._y + ctrl.fillTopMargin;
} else {
fill._x = ctrl._x + ctrl.fillLeftMargin;
fill._y = ctrl._y + ctrl.fillTopMargin;
v3._x = fill._x;
v3._y = fill._y;
v3._width = (ctrl._width - ctrl.fillRightMargin - ctrl.fillLeftMargin) * percent / 100;
v3._height = ctrl._height - ctrl.fillTopMargin - ctrl.fillBottomMargin;
}
}
}
};
v2.startHandleDrag = function (controlIndex) {
var v2 = this.controls[controlIndex];
var v5 = v2.handle_mc;
if (v2.startHandleDrag == undefined || !v2.startHandleDrag()) {
var v3 = v2._y + v2.handleY;
var v4 = (v2.origWidth == undefined) ? v2._width : v2.origWidth;
v5.startDrag(false, v2._x + v2.handleLeftMargin, v3, v2._x + v4 - v2.handleRightMargin, v3);
}
v2.isDragging = true;
};
v2.stopHandleDrag = function (controlIndex) {
var v2 = this.controls[controlIndex];
var v3 = v2.handle_mc;
if (v2.stopHandleDrag == undefined || !v2.stopHandleDrag()) {
v3.stopDrag();
}
v2.isDragging = false;
};
v2.positionHandle = function (controlIndex) {
var v2 = this.controls[controlIndex];
var v3 = v2.handle_mc;
if (v3 == undefined) {
return undefined;
}
if (v2.positionHandle != undefined && v2.positionHandle()) {
return undefined;
}
var v4 = (v2.origWidth == undefined) ? v2._width : v2.origWidth;
var v5 = v4 - v2.handleRightMargin - v2.handleLeftMargin;
v3._x = v2._x + v2.handleLeftMargin + v5 * v2.percentage / 100;
v3._y = v2._y + v2.handleY;
if (v2.fullness_mc != undefined) {
this.positionBar(v2, 'fullness', v2.percentage);
}
};
v2.positionBar = function (ctrl, type, percent) {
if (ctrl.positionBar != undefined && ctrl.positionBar(type, percent)) {
return undefined;
}
var v2 = ctrl[type + '_mc'];
if (v2._parent == ctrl) {
if (v2.fill_mc == undefined) {
v2._xscale = ctrl[type + 'XScale'] * percent / 100;
} else {
this.positionMaskedFill(v2, v2.fill_mc, percent);
}
} else {
v2._x = ctrl._x + ctrl[type + 'LeftMargin'];
v2._y = ctrl._y + ctrl[type + 'Y'];
if (v2.fill_mc == undefined) {
v2._width = (ctrl._width - ctrl[type + 'LeftMargin'] - ctrl[type + 'RightMargin']) * percent / 100;
} else {
this.positionMaskedFill(v2, v2.fill_mc, percent);
}
}
};
v2.calcPercentageFromHandle = function (controlIndex) {
var v2 = this.controls[controlIndex];
var v5 = v2.handle_mc;
if (v2.calcPercentageFromHandle == undefined || !v2.calcPercentageFromHandle()) {
var v3 = (v2.origWidth == undefined) ? v2._width : v2.origWidth;
var v6 = v3 - v2.handleRightMargin - v2.handleLeftMargin;
var v4 = v5._x - (v2._x + v2.handleLeftMargin);
v2.percentage = (v4 / v6) * 100;
if (v2.fullness_mc != undefined) {
this.positionBar(v2, 'fullness', v2.percentage);
}
}
if (v2.percentage < 0) {
v2.percentage = 0;
}
if (v2.percentage > 100) {
v2.percentage = 100;
}
};
v2.handleRelease = function (controlIndex) {
var v3 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
if (controlIndex == mx.video.UIManager.SEEK_BAR) {
this.seekBarListener(true);
} else {
if (controlIndex == mx.video.UIManager.VOLUME_BAR) {
this.volumeBarListener(true);
}
}
this.stopHandleDrag(controlIndex);
this._vc.__set__activeVideoPlayerIndex(v3);
if (controlIndex == mx.video.UIManager.SEEK_BAR) {
this._vc._scrubFinish();
}
};
v2.seekBarListener = function (finish) {
var v3 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
var v4 = this.controls[mx.video.UIManager.SEEK_BAR];
this.calcPercentageFromHandle(mx.video.UIManager.SEEK_BAR);
var v2 = v4.percentage;
if (finish) {
clearInterval(this._seekBarIntervalID);
this._seekBarIntervalID = 0;
if (v2 != this._lastScrubPos) {
this._vc.seekPercent(v2);
}
this._vc.addEventListener('playheadUpdate', this);
if (this._playAfterScrub) {
this._vc.play();
}
} else {
if ((this._vc.getVideoPlayer(this._vc.__get__visibleVideoPlayerIndex())).__get__state() == mx.video.VideoPlayer.SEEKING) {
} else {
if (this._seekBarScrubTolerance <= 0 || Math.abs(v2 - this._lastScrubPos) > this._seekBarScrubTolerance || v2 < this._seekBarScrubTolerance || v2 > 100 - this._seekBarScrubTolerance) {
if (v2 != this._lastScrubPos) {
this._lastScrubPos = v2;
this._vc.seekPercent(v2);
}
}
}
}
this._vc.__set__activeVideoPlayerIndex(v3);
};
v2.volumeBarListener = function (finish) {
var v3 = this.controls[mx.video.UIManager.VOLUME_BAR];
this.calcPercentageFromHandle(mx.video.UIManager.VOLUME_BAR);
var v2 = v3.percentage;
if (finish) {
clearInterval(this._volumeBarIntervalID);
this._volumeBarIntervalID = 0;
this._vc.addEventListener('volumeUpdate', this);
}
if (finish || this._volumeBarScrubTolerance <= 0 || Math.abs(v2 - this._lastVolumePos) > this._volumeBarScrubTolerance || v2 < this._volumeBarScrubTolerance || v2 > 100 - this._volumeBarScrubTolerance) {
if (v2 != this._lastVolumePos) {
if (this._isMuted) {
this.cachedSoundLevel = v2;
} else {
this._vc.__set__volume(v2);
}
this._lastVolumePos = v2;
}
}
};
v2.doBufferingDelay = function () {
clearInterval(this._bufferingDelayIntervalID);
this._bufferingDelayIntervalID = 0;
var v2 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
if (this._vc.__get__state() == mx.video.FLVPlayback.BUFFERING) {
this._bufferingOn = true;
this.handleEvent({'type': 'stateChange', 'state': mx.video.FLVPlayback.BUFFERING, 'vp': this._vc.__get__visibleVideoPlayerIndex()});
}
this._vc.__set__activeVideoPlayerIndex(v2);
};
v2.dispatchMessage = function (ctrl) {
if (ctrl.id == mx.video.UIManager.SEEK_BAR_HANDLE) {
this._vc._scrubStart();
}
var v2 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
switch (ctrl.id) {
case mx.video.UIManager.PAUSE_BUTTON:
this._vc.pause();
break;
case mx.video.UIManager.PLAY_BUTTON:
this._vc.play();
break;
case mx.video.UIManager.STOP_BUTTON:
this._vc.stop();
break;
case mx.video.UIManager.SEEK_BAR_HANDLE:
this.calcPercentageFromHandle(mx.video.UIManager.SEEK_BAR);
this._lastScrubPos = this.controls[mx.video.UIManager.SEEK_BAR].percentage;
this._vc.removeEventListener('playheadUpdate', this);
if (this._vc.__get__playing() || this._vc.__get__buffering()) {
this._playAfterScrub = true;
} else {
if (this._vc.__get__state() != mx.video.VideoPlayer.SEEKING) {
this._playAfterScrub = false;
}
}
this._seekBarIntervalID = setInterval(this, 'seekBarListener', this._seekBarInterval, false);
this.startHandleDrag(mx.video.UIManager.SEEK_BAR);
this._vc.pause();
break;
case mx.video.UIManager.VOLUME_BAR_HANDLE:
this.calcPercentageFromHandle(mx.video.UIManager.VOLUME_BAR);
this._lastVolumePos = this.controls[mx.video.UIManager.VOLUME_BAR].percentage;
this._vc.removeEventListener('volumeUpdate', this);
this._volumeBarIntervalID = setInterval(this, 'volumeBarListener', this._volumeBarInterval, false);
this.startHandleDrag(mx.video.UIManager.VOLUME_BAR);
break;
case mx.video.UIManager.BACK_BUTTON:
this._vc.seekToPrevNavCuePoint();
break;
case mx.video.UIManager.FORWARD_BUTTON:
this._vc.seekToNextNavCuePoint();
break;
case mx.video.UIManager.MUTE_ON_BUTTON:
case mx.video.UIManager.MUTE_OFF_BUTTON:
if (!this._isMuted) {
this._isMuted = true;
this.cachedSoundLevel = this._vc.volume;
this._vc.__set__volume(0);
} else {
this._isMuted = false;
this._vc.__set__volume(this.cachedSoundLevel);
}
this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING);
this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_OFF_BUTTON]);
this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING);
this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_ON_BUTTON]);
break;
default:
throw new Error('Unknown ButtonControl');
}
this._vc.__set__activeVideoPlayerIndex(v2);
};
v2.setEnabledAndVisibleForState = function (index, state) {
var v5 = this._vc.__get__activeVideoPlayerIndex();
this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex);
var v3 = state;
if (v3 == mx.video.FLVPlayback.BUFFERING && !this._bufferingOn) {
v3 = mx.video.FLVPlayback.PLAYING;
}
switch (index) {
case mx.video.UIManager.VOLUME_BAR:
case mx.video.UIManager.VOLUME_BAR_HANDLE:
this.controls[index].myEnabled = true;
this.controls[index].enabled = this._controlsEnabled;
break;
case mx.video.UIManager.MUTE_ON_BUTTON:
this.controls[index].myEnabled = !this._isMuted;
if (this.controls[mx.video.UIManager.MUTE_BUTTON] != undefined) {
this.controls[index]._visible = this.controls[index].myEnabled;
}
break;
case mx.video.UIManager.MUTE_OFF_BUTTON:
this.controls[index].myEnabled = this._isMuted;
if (this.controls[mx.video.UIManager.MUTE_BUTTON] != undefined) {
this.controls[index]._visible = this.controls[index].myEnabled;
}
break;
default:
switch (v3) {
case mx.video.FLVPlayback.LOADING:
case mx.video.FLVPlayback.CONNECTION_ERROR:
this.controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.DISCONNECTED:
this.controls[index].myEnabled = this._vc.__get__contentPath() != undefined;
break;
break;
case mx.video.FLVPlayback.SEEKING:
default:
this.controls[index].myEnabled = true;
}
}
switch (index) {
case mx.video.UIManager.SEEK_BAR:
switch (v3) {
case mx.video.FLVPlayback.STOPPED:
case mx.video.FLVPlayback.PLAYING:
case mx.video.FLVPlayback.PAUSED:
case mx.video.FLVPlayback.REWINDING:
case mx.video.FLVPlayback.SEEKING:
this.controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING:
this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined;
break;
default:
this.controls[index].myEnabled = false;
}
if (this.controls[index].myEnabled) {
this.controls[index].myEnabled = !isNaN(this._vc.__get__totalTime()) && this._vc.__get__totalTime() > 0;
}
this.controls[index].handle_mc.myEnabled = this.controls[index].myEnabled;
this.controls[index].handle_mc.enabled = this.controls[index].handle_mc.myEnabled;
this.controls[index].handle_mc._visible = this.controls[index].myEnabled;
var v4 = !this._bufferingBarHides || this.controls[index].myEnabled || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined || !this.controls[mx.video.UIManager.BUFFERING_BAR]._visible;
this.controls[index]._visible = v4;
this.controls[index].progress_mc._visible = v4;
this.controls[index].progress_mc.fill_mc._visible = v4;
this.controls[index].fullness_mc._visible = v4;
this.controls[index].fullness_mc.fill_mc._visible = v4;
break;
case mx.video.UIManager.BUFFERING_BAR:
switch (v3) {
case mx.video.FLVPlayback.STOPPED:
case mx.video.FLVPlayback.PLAYING:
case mx.video.FLVPlayback.PAUSED:
case mx.video.FLVPlayback.REWINDING:
case mx.video.FLVPlayback.SEEKING:
this.controls[index].myEnabled = false;
break;
default:
this.controls[index].myEnabled = true;
}
this.controls[index]._visible = this.controls[index].myEnabled;
this.controls[index].fill_mc._visible = this.controls[index].myEnabled;
break;
case mx.video.UIManager.PAUSE_BUTTON:
switch (v3) {
case mx.video.FLVPlayback.DISCONNECTED:
case mx.video.FLVPlayback.STOPPED:
case mx.video.FLVPlayback.PAUSED:
case mx.video.FLVPlayback.REWINDING:
this.controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.PLAYING:
this.controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING:
this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined;
}
if (this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] != undefined) {
this.controls[index]._visible = this.controls[index].myEnabled;
}
break;
case mx.video.UIManager.PLAY_BUTTON:
switch (v3) {
case mx.video.FLVPlayback.PLAYING:
this.controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.STOPPED:
case mx.video.FLVPlayback.PAUSED:
this.controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING:
this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined;
}
if (this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] != undefined) {
this.controls[index]._visible = !this.controls[mx.video.UIManager.PAUSE_BUTTON]._visible;
}
break;
case mx.video.UIManager.STOP_BUTTON:
switch (v3) {
case mx.video.FLVPlayback.DISCONNECTED:
case mx.video.FLVPlayback.STOPPED:
this.controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.PAUSED:
case mx.video.FLVPlayback.PLAYING:
case mx.video.FLVPlayback.BUFFERING:
this.controls[index].myEnabled = true;
}
break;
case mx.video.UIManager.BACK_BUTTON:
case mx.video.UIManager.FORWARD_BUTTON:
if (v3 !== mx.video.FLVPlayback.BUFFERING) {
} else {
this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined;
}
}
this.controls[index].enabled = this._controlsEnabled && this.controls[index].myEnabled;
this._vc.__set__activeVideoPlayerIndex(v5);
};
v2.setupSkinAutoHide = function () {
if (this._skinAutoHide && this.skin_mc != undefined) {
this.skinAutoHideHitTest();
if (this._skinAutoHideIntervalID == 0) {
this._skinAutoHideIntervalID = setInterval(this, 'skinAutoHideHitTest', mx.video.UIManager.SKIN_AUTO_HIDE_INTERVAL);
}
} else {
this.skin_mc._visible = this.__visible;
clearInterval(this._skinAutoHideIntervalID);
this._skinAutoHideIntervalID = 0;
}
};
v2.skinAutoHideHitTest = function () {
if (!this.__visible) {
this.skin_mc._visible = false;
} else {
var v4 = this._vc.getVideoPlayer(this._vc.__get__visibleVideoPlayerIndex());
var v3 = v4.hitTest(_root._xmouse, _root._ymouse, true);
if (!v3 && this.border_mc != undefined) {
v3 = this.border_mc.hitTest(_root._xmouse, _root._ymouse, true);
}
this.skin_mc._visible = v3;
}
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v1.PAUSE_BUTTON = 0;
v1.PLAY_BUTTON = 1;
v1.STOP_BUTTON = 2;
v1.SEEK_BAR_HANDLE = 3;
v1.BACK_BUTTON = 4;
v1.FORWARD_BUTTON = 5;
v1.MUTE_ON_BUTTON = 6;
v1.MUTE_OFF_BUTTON = 7;
v1.VOLUME_BAR_HANDLE = 8;
v1.NUM_BUTTONS = 9;
v1.PLAY_PAUSE_BUTTON = 9;
v1.MUTE_BUTTON = 10;
v1.BUFFERING_BAR = 11;
v1.SEEK_BAR = 12;
v1.VOLUME_BAR = 13;
v1.NUM_CONTROLS = 14;
v1.UP_STATE = 0;
v1.OVER_STATE = 1;
v1.DOWN_STATE = 2;
v1.SKIN_AUTO_HIDE_INTERVAL = 200;
v1.VOLUME_BAR_INTERVAL_DEFAULT = 250;
v1.VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT = 0;
v1.SEEK_BAR_INTERVAL_DEFAULT = 250;
v1.SEEK_BAR_SCRUB_TOLERANCE_DEFAULT = 5;
v1.BUFFERING_DELAY_INTERVAL_DEFAULT = 1000;
v2.addProperty('bufferingBarHidesAndDisablesOthers', v2.__get__bufferingBarHidesAndDisablesOthers, v2.__set__bufferingBarHidesAndDisablesOthers);
v2.addProperty('bufferingDelayInterval', v2.__get__bufferingDelayInterval, v2.__set__bufferingDelayInterval);
v2.addProperty('controlsEnabled', v2.__get__controlsEnabled, v2.__set__controlsEnabled);
v2.addProperty('seekBarInterval', v2.__get__seekBarInterval, v2.__set__seekBarInterval);
v2.addProperty('seekBarScrubTolerance', v2.__get__seekBarScrubTolerance, v2.__set__seekBarScrubTolerance);
v2.addProperty('skin', v2.__get__skin, v2.__set__skin);
v2.addProperty('skinAutoHide', v2.__get__skinAutoHide, v2.__set__skinAutoHide);
v2.addProperty('skinReady', v2.__get__skinReady, function () {});
v2.addProperty('visible', v2.__get__visible, v2.__set__visible);
v2.addProperty('volumeBarInterval', v2.__get__volumeBarInterval, v2.__set__volumeBarInterval);
v2.addProperty('volumeBarScrubTolerance', v2.__get__volumeBarScrubTolerance, v2.__set__volumeBarScrubTolerance);
ASSetPropFlags(mx.video.UIManager.prototype, null, 1);
}
#endinitclip
}
movieClip 94 __Packages.mx.utils.Delegate {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.utils) {
_global.mx.utils = new Object();
}
if (!_global.mx.utils.Delegate) {
var v1 = function (f) {
super();
this.func = f;
};
mx.utils.Delegate = v1;
mx.utils.Delegate extends Object;
var v2 = v1.prototype;
v1.create = function (obj, func) {
var v2 = function () {
var v2 = arguments.callee.target;
var v3 = arguments.callee.func;
return v3.apply(v2, arguments);
};
v2.target = obj;
v2.func = func;
return v2;
};
v2.createDelegate = function (obj) {
return mx.utils.Delegate.create(obj, this.func);
};
ASSetPropFlags(mx.utils.Delegate.prototype, null, 1);
}
#endinitclip
}
movieClip 95 __Packages.mx.video.SMILManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.SMILManager) {
var v1 = function (owner) {
this._owner = owner;
};
mx.video.SMILManager = v1;
var v2 = v1.prototype;
v2.connectXML = function (url) {
this._url = this.fixURL(url);
this.xml = new XML();
this.xml.onLoad = mx.utils.Delegate.create(this, this.xmlOnLoad);
this.xml.load(this._url);
return false;
};
v2.fixURL = function (origURL) {
if ((origURL.substr(0, 5)).toLowerCase() == 'http:' || (origURL.substr(0, 6)).toLowerCase() == 'https:') {
var v2 = origURL.indexOf('?') >= 0 ? '&' : '?';
return origURL + v2 + 'FLVPlaybackVersion=' + mx.video.SMILManager.shortVersion;
}
return origURL;
};
v2.xmlOnLoad = function (success) {
try {
if (!success) {
this._owner.helperDone(this, false);
} else {
this.baseURLAttr = new Array();
this.videoTags = new Array();
var v2 = this.xml.firstChild;
var v6 = false;
while (v2 != null) {
if (v2.nodeType == mx.video.SMILManager.ELEMENT_NODE) {
v6 = true;
if (v2.nodeName.toLowerCase() == 'smil') {
break;
}
}
v2 = v2.nextSibling;
}
if (!v6) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" No root node found; if url is for an flv it must have .flv extension and take no parameters');
} else {
if (v2 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Root node not smil');
}
}
var v5 = false;
var v4 = 0;
while (v4 < v2.childNodes.length) {
var v3 = v2.childNodes[v4];
if (v3.nodeType != mx.video.SMILManager.ELEMENT_NODE) {
} else {
if (v3.nodeName.toLowerCase() == 'head') {
this.parseHead(v3);
} else {
if (v3.nodeName.toLowerCase() == 'body') {
v5 = true;
this.parseBody(v3);
} else {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag ' + v3.nodeName + ' not supported in ' + v2.nodeName + ' tag.');
}
}
}
++v4;
}
if (!v5) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag body is required.');
}
this._owner.helperDone(this, true);
}
}
catch (v0) {
if (Error(v0) != null) {
var err = Error(v0);
this._owner.helperDone(this, false);
throw err;
} else {
throw v0;
}
}
};
v2.parseHead = function (parentNode) {
var v4 = false;
var v3 = 0;
while (v3 < parentNode.childNodes.length) {
var v2 = parentNode.childNodes[v3];
if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) {
} else {
if (v2.nodeName.toLowerCase() == 'meta') {
for (var v6 in v2.attributes) {
if (v6.toLowerCase() == 'base') {
this.baseURLAttr.push(v2.attributes[v6]);
} else {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Attribute ' + v6 + ' not supported in ' + v2.nodeName + ' tag.');
}
}
} else {
if (v2.nodeName.toLowerCase() == 'layout') {
if (!v4) {
this.parseLayout(v2);
v4 = true;
} else {}
} else {}
}
}
++v3;
}
};
v2.parseLayout = function (parentNode) {
var v3 = 0;
while (v3 < parentNode.childNodes.length) {
var v2 = parentNode.childNodes[v3];
if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) {
} else {
if (v2.nodeName.toLowerCase() == 'root-layout') {
for (var v5 in v2.attributes) {
if (v5.toLowerCase() == 'width') {
this.width = Number(v2.attributes[v5]);
} else {
if (v5.toLowerCase() == 'height') {
this.height = Number(v2.attributes[v5]);
} else {}
}
}
if (isNaN(this.width) || this.width < 0 || isNaN(this.height) || this.height < 0) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag ' + v2.nodeName + ' requires attributes id, width and height. Width and height must be numbers greater than or equal to 0.');
}
this.width = Math.round(this.width);
this.height = Math.round(this.height);
return undefined;
} else {}
}
++v3;
}
};
v2.parseBody = function (parentNode) {
var v6 = 0;
var v3 = 0;
while (v3 < parentNode.childNodes.length) {
var v2 = parentNode.childNodes[v3];
if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) {
} else {
if (++v6 > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag ' + parentNode.nodeName + ' is required to contain exactly one tag.');
}
if (v2.nodeName.toLowerCase() == 'switch') {
this.parseSwitch(v2);
} else {
if (v2.nodeName.toLowerCase() == 'video' || v2.nodeName.toLowerCase() == 'ref') {
var v5 = this.parseVideo(v2);
this.videoTags.push(v5);
} else {}
}
}
++v3;
}
if (this.videoTags.length < 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" At least one video of ref tag is required.');
}
};
v2.parseSwitch = function (parentNode) {
var v3 = 0;
while (v3 < parentNode.childNodes.length) {
var v2 = parentNode.childNodes[v3];
if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) {
} else {
if (v2.nodeName.toLowerCase() == 'video' || v2.nodeName.toLowerCase() == 'ref') {
this.videoTags.push(this.parseVideo(v2));
} else {}
}
++v3;
}
};
v2.parseVideo = function (node) {
var v3 = new Object();
for (var v4 in node.attributes) {
if (v4.toLowerCase() == 'src') {
v3.src = node.attributes[v4];
} else {
if (v4.toLowerCase() == 'system-bitrate') {
v3.bitrate = Number(node.attributes[v4]);
} else {
if (v4.toLowerCase() == 'dur') {
v3.dur = this.parseTime(node.attributes[v4]);
} else {}
}
}
}
if (v3.src == undefined) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Attribute src is required in ' + node.nodeName + ' tag.');
}
return v3;
};
v2.parseTime = function (timeStr) {
var v4 = 0;
var v3 = timeStr.split(':');
if (v3.length < 1 || v3.length > 3) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Invalid dur value: ' + timeStr);
}
var v1 = 0;
while (v1 < v3.length) {
var v2 = Number(v3[v1]);
if (isNaN(v2)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Invalid dur value: ' + timeStr);
}
v4 *= 60;
v4 += v2;
++v1;
}
return v4;
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v1.ELEMENT_NODE = 1;
ASSetPropFlags(mx.video.SMILManager.prototype, null, 1);
}
#endinitclip
}
movieClip 96 __Packages.mx.video.FPADManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.FPADManager) {
var v1 = function (owner) {
this._owner = owner;
};
mx.video.FPADManager = v1;
var v2 = v1.prototype;
v2.connectXML = function (urlPrefix, uriParam, urlSuffix, uriParamParseResults) {
this._uriParam = uriParam;
this._parseResults = uriParamParseResults;
this._url = urlPrefix + 'uri=' + this._parseResults.protocol;
if (this._parseResults.serverName != undefined) {
this._url += '/' + this._parseResults.serverName;
}
if (this._parseResults.portNumber != undefined) {
this._url += ':' + this._parseResults.portNumber;
}
if (this._parseResults.wrappedURL != undefined) {
this._url += '/?' + this._parseResults.wrappedURL;
}
this._url += '/' + this._parseResults.appName;
this._url += urlSuffix;
this.xml = new XML();
this.xml.onLoad = mx.utils.Delegate.create(this, this.xmlOnLoad);
this.xml.load(this._url);
return false;
};
v2.xmlOnLoad = function (success) {
try {
if (!success) {
this._owner.helperDone(this, false);
} else {
var v5 = this.xml.firstChild;
var v8 = false;
while (v5 != null) {
if (v5.nodeType == mx.video.FPADManager.ELEMENT_NODE) {
v8 = true;
if (v5.nodeName.toLowerCase() == 'fpad') {
break;
}
}
v5 = v5.nextSibling;
}
if (!v8) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" No root node found; if url is for an flv it must have .flv extension and take no parameters');
} else {
if (v5 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Root node not fpad');
}
}
var v7;
var v6 = 0;
while (v6 < v5.childNodes.length) {
var v3 = v5.childNodes[v6];
if (v3.nodeType != mx.video.FPADManager.ELEMENT_NODE) {
} else {
if (v3.nodeName.toLowerCase() == 'proxy') {
var v2 = 0;
while (v2 < v3.childNodes.length) {
var v4 = v3.childNodes[v2];
if (v4.nodeType == mx.video.FPADManager.TEXT_NODE) {
v7 = this.trim(v4.nodeValue);
break;
}
++v2;
}
break;
}
}
++v6;
}
if (v7 == undefined || v7 == '') {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" fpad xml requires proxy tag.');
}
this.rtmpURL = this._parseResults.protocol + '/' + v7 + '/?' + this._uriParam;
this._owner.helperDone(this, true);
}
}
catch (v0) {
if (Error(v0) != null) {
var err = Error(v0);
this._owner.helperDone(this, false);
throw err;
} else {
throw v0;
}
}
};
v2.trim = function (str) {
var v2 = 0;
while (v2 < str.length) {
var v1 = str.charAt(v2);
if (v1 != ' ' && v1 != '\t' && v1 != '\r' && v1 != '\n') {
break;
}
++v2;
}
if (v2 >= str.length) {
return '';
}
var v4 = str.length - 1;
while (v4 > v2) {
v1 = str.charAt(v4);
if (v1 != ' ' && v1 != '\t' && v1 != '\r' && v1 != '\n') {
break;
}
--v4;
}
return str.slice(v2, v4 + 1);
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v1.ELEMENT_NODE = 1;
v1.TEXT_NODE = 3;
ASSetPropFlags(mx.video.FPADManager.prototype, null, 1);
}
#endinitclip
}
movieClip 97 __Packages.mx.video.NCManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.NCManager) {
var v1 = function () {
this.initNCInfo();
this.initOtherInfo();
this._timeoutIntervalId = 0;
this._tryNCIntervalId = 0;
this._timeout = this.DEFAULT_TIMEOUT;
this._nc = undefined;
this._ncConnected = false;
};
mx.video.NCManager = v1;
var v2 = v1.prototype;
_global.mx.video.NCManager implements _global.mx.video.INCManager;
v2.initNCInfo = function () {
this._isRTMP = undefined;
this._serverName = undefined;
this._wrappedURL = undefined;
this._portNumber = undefined;
this._appName = undefined;
};
v2.initOtherInfo = function () {
this._contentPath = undefined;
this._streamName = undefined;
this._streamLength = undefined;
this._streamWidth = undefined;
this._streamHeight = undefined;
this._streams = undefined;
this._autoSenseBW = false;
this.fpadZone = undefined;
this._payload = 0;
this._connTypeCounter = 0;
this.cleanConns();
};
v2.getTimeout = function () {
return this._timeout;
};
v2.setTimeout = function (t) {
this._timeout = t;
if (this._timeoutIntervalId != 0) {
clearInterval(this._timeoutIntervalId);
this._timeoutIntervalId = setInterval(this, '_onFCSConnectTimeOut', this._timeout);
}
};
v2.getBitrate = function () {
return this._bitrate;
};
v2.setBitrate = function (b) {
if (this._isRTMP == undefined || !this._isRTMP) {
this._bitrate = b;
}
};
v2.getVideoPlayer = function () {
return this._owner;
};
v2.setVideoPlayer = function (v) {
this._owner = v;
};
v2.getNetConnection = function () {
return this._nc;
};
v2.getStreamName = function () {
return this._streamName;
};
v2.isRTMP = function () {
return this._isRTMP;
};
v2.getStreamLength = function () {
return this._streamLength;
};
v2.getStreamWidth = function () {
return this._streamWidth;
};
v2.getStreamHeight = function () {
return this._streamHeight;
};
v2.connectToURL = function (url) {
this.initOtherInfo();
this._contentPath = url;
if (this._contentPath == null || this._contentPath == '') {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH);
}
var v2 = this.parseURL(this._contentPath);
if (v2.streamName == undefined || v2.streamName == '') {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
if (v2.isRTMP) {
var v4 = this.canReuseOldConnection(v2);
this._isRTMP = true;
this._protocol = v2.protocol;
this._streamName = v2.streamName;
this._serverName = v2.serverName;
this._wrappedURL = v2.wrappedURL;
this._portNumber = v2.portNumber;
this._appName = v2.appName;
if (this._appName == undefined || this._appName == '' || this._streamName == undefined || this._streamName == '') {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
this._autoSenseBW = this._streamName.indexOf(',') >= 0;
return v4 || this.connectRTMP();
} else {
var v3 = v2.streamName;
if (v3.indexOf('?') < 0 && (v3.length < 4 || (v3.slice(-4)).toLowerCase() != '.txt') && (v3.length < 4 || (v3.slice(-4)).toLowerCase() != '.xml') && (v3.length < 5 || (v3.slice(-5)).toLowerCase() != '.smil')) {
var v4 = this.canReuseOldConnection(v2);
this._isRTMP = false;
this._streamName = v3;
return v4 || this.connectHTTP();
}
if (v3.indexOf('/fms/fpad') >= 0) {
try {
return this.connectFPAD(v3);
}
catch (v0) {
if (Error(v0) != null) {
var err = Error(v0);
this._smilMgr = new mx.video.SMILManager(this);
return this._smilMgr.connectXML(v3);
}
throw v0;
}
}
this._smilMgr = new mx.video.SMILManager(this);
return this._smilMgr.connectXML(v3);
}
};
v2.connectAgain = function () {
var v2 = this._appName.indexOf('/');
if (v2 < 0) {
v2 = this._streamName.indexOf('/');
if (v2 >= 0) {
this._appName += '/';
this._appName += this._streamName.slice(0, v2);
this._streamName = this._streamName.slice(v2 + 1);
}
return false;
}
var v3 = this._appName.slice(v2 + 1);
v3 += '/';
v3 += this._streamName;
this._streamName = v3;
this._appName = this._appName.slice(0, v2);
this.close();
this._payload = 0;
this._connTypeCounter = 0;
this.cleanConns();
this.connectRTMP();
return true;
};
v2.reconnect = function () {
if (!this._isRTMP) {
throw new Error('Cannot call reconnect on an http connection');
}
this._nc.onStatus = function (info) {
this.mc.reconnectOnStatus(this, info);
};
this._nc.onBWDone = function () {
this.mc.onReconnected();
};
this._nc.connect(this._ncUri, false);
};
v2.onReconnected = function () {
delete this._nc.onStatus;
delete this._nc.onBWDone;
this._ncConnected = true;
this._owner.ncReconnected();
};
v2.close = function () {
if (this._nc) {
this._nc.close();
this._ncConnected = false;
}
};
v2.helperDone = function (helper, success) {
if (!success) {
this._nc = undefined;
this._ncConnected = false;
this._owner.ncConnected();
this._smilMgr = undefined;
this._fpadMgr = undefined;
return undefined;
}
var v2;
var v4;
if (helper == this._fpadMgr) {
v4 = this._fpadMgr.rtmpURL;
this._fpadMgr = undefined;
v2 = this.parseURL(v4);
this._isRTMP = v2.isRTMP;
this._protocol = v2.protocol;
this._serverName = v2.serverName;
this._portNumber = v2.portNumber;
this._wrappedURL = v2.wrappedURL;
this._appName = v2.appName;
this._streamName = v2.streamName;
var v5 = this.fpadZone;
this.fpadZone = -1;
this.connectRTMP();
this.fpadZone = v5;
return undefined;
}
if (helper != this._smilMgr) {
return undefined;
}
this._streamWidth = this._smilMgr.width;
this._streamHeight = this._smilMgr.height;
v4 = this._smilMgr.baseURLAttr[0];
if (v4 != undefined && v4 != '') {
if (v4.charAt(v4.length - 1) != '/') {
v4 += '/';
}
v2 = this.parseURL(v4);
this._isRTMP = v2.isRTMP;
this._streamName = v2.streamName;
if (this._isRTMP) {
this._protocol = v2.protocol;
this._serverName = v2.serverName;
this._portNumber = v2.portNumber;
this._wrappedURL = v2.wrappedURL;
this._appName = v2.appName;
if (this._appName == undefined || this._appName == '') {
this._smilMgr = undefined;
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Base RTMP URL must include application name: ' + v4);
}
if (this._smilMgr.baseURLAttr.length > 1) {
v2 = this.parseURL(this._smilMgr.baseURLAttr[1]);
if (v2.serverName != undefined) {
this.fallbackServerName = v2.serverName;
}
}
}
}
this._streams = this._smilMgr.videoTags;
this._smilMgr = undefined;
var v3 = 0;
while (v3 < this._streams.length) {
v4 = this._streams[v3].src;
v2 = this.parseURL(v4);
if (this._isRTMP == undefined) {
this._isRTMP = v2.isRTMP;
if (this._isRTMP) {
this._protocol = v2.protocol;
if (this._streams.length > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Cannot switch between multiple absolute RTMP URLs, must use meta tag base attribute.');
}
this._serverName = v2.serverName;
this._portNumber = v2.portNumber;
this._wrappedURL = v2.wrappedURL;
this._appName = v2.appName;
if (this._appName == undefined || this._appName == '') {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Base RTMP URL must include application name: ' + v4);
}
} else {
if (v2.streamName.indexOf('/fms/fpad') >= 0 && this._streams.length > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Cannot switch between multiple absolute fpad URLs, must use meta tag base attribute.');
}
}
} else {
if (this._streamName != undefined && this._streamName != '' && !v2.isRelative && this._streams.length > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes.');
}
}
this._streams[v3].parseResults = v2;
++v3;
}
this._autoSenseBW = this._streams.length > 1;
if (!this._autoSenseBW) {
if (this._streamName != undefined) {
this._streamName += this._streams[0].parseResults.streamName;
} else {
this._streamName = this._streams[0].parseResults.streamName;
}
this._streamLength = this._streams[0].dur;
}
if (this._isRTMP) {
this.connectRTMP();
} else {
if (this._streamName != undefined && this._streamName.indexOf('/fms/fpad') >= 0) {
this.connectFPAD(this._streamName);
} else {
if (this._autoSenseBW) {
this.bitrateMatch();
}
this.connectHTTP();
this._owner.ncConnected();
}
}
};
v2.bitrateMatch = function () {
var v3;
var v4 = this._bitrate;
if (isNaN(v4)) {
v4 = 0;
}
var v2 = 0;
while (v2 < this._streams.length) {
if (isNaN(this._streams[v2].bitrate) || v4 >= this._streams[v2].bitrate) {
v3 = v2;
break;
}
++v2;
}
if (isNaN(v3)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_BITRATE_MATCH);
}
if (this._streamName != undefined) {
this._streamName += this._streams[v3].src;
} else {
this._streamName = this._streams[v3].src;
}
if (this._isRTMP && (this._streamName.slice(-4)).toLowerCase() == '.flv') {
this._streamName = this._streamName.slice(0, -4);
}
this._streamLength = this._streams[v3].dur;
};
v2.parseURL = function (url) {
var v2 = new Object();
var v3 = 0;
var v4 = url.indexOf(':/', v3);
if (v4 >= 0) {
v4 += 2;
v2.protocol = url.slice(v3, v4);
v2.isRelative = false;
} else {
v2.isRelative = true;
}
if (v2.protocol != undefined && (v2.protocol == 'rtmp:/' || v2.protocol == 'rtmpt:/' || v2.protocol == 'rtmps:/' || v2.protocol == 'rtmpe:/' || v2.protocol == 'rtmpte:/')) {
v2.isRTMP = true;
v3 = v4;
if (url.charAt(v3) == '/') {
++v3;
var v7 = url.indexOf(':', v3);
var v8 = url.indexOf('/', v3);
if (v8 < 0) {
if (v7 < 0) {
v2.serverName = url.slice(v3);
} else {
v4 = v7;
v2.portNumber = url.slice(v3, v4);
v3 = v4 + 1;
v2.serverName = url.slice(v3);
}
return v2;
}
if (v7 >= 0 && v7 < v8) {
v4 = v7;
v2.serverName = url.slice(v3, v4);
v3 = v4 + 1;
v4 = v8;
v2.portNumber = url.slice(v3, v4);
} else {
v4 = v8;
v2.serverName = url.slice(v3, v4);
}
v3 = v4 + 1;
}
if (url.charAt(v3) == '?') {
var v9 = url.slice(v3 + 1);
var v6 = this.parseURL(v9);
if (v6.protocol == undefined || !v6.isRTMP) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
v2.wrappedURL = '?';
v2.wrappedURL += v6.protocol;
if (v6.serverName != undefined) {
v2.wrappedURL += '/';
v2.wrappedURL += v6.serverName;
}
if (v6.wrappedURL != undefined) {
v2.wrappedURL += '/?';
v2.wrappedURL += v6.wrappedURL;
}
v2.appName = v6.appName;
v2.streamName = v6.streamName;
return v2;
}
v4 = url.indexOf('/', v3);
if (v4 < 0) {
v2.appName = url.slice(v3);
return v2;
}
v2.appName = url.slice(v3, v4);
v3 = v4 + 1;
v4 = url.indexOf('/', v3);
if (v4 < 0) {
v2.streamName = url.slice(v3);
if ((v2.streamName.slice(-4)).toLowerCase() == '.flv') {
v2.streamName = v2.streamName.slice(0, -4);
}
return v2;
}
v2.appName += '/';
v2.appName += url.slice(v3, v4);
v3 = v4 + 1;
v2.streamName = url.slice(v3);
if ((v2.streamName.slice(-4)).toLowerCase() == '.flv') {
v2.streamName = v2.streamName.slice(0, -4);
}
return v2;
}
v2.isRTMP = false;
v2.streamName = url;
return v2;
};
v2.canReuseOldConnection = function (parseResults) {
if (this._nc == null || !this._ncConnected) {
return false;
}
if (!parseResults.isRTMP) {
if (!this._isRTMP) {
return true;
}
this._owner.close();
this._nc = undefined;
this._ncConnected = false;
this.initNCInfo();
return false;
}
if (this._isRTMP) {
if (parseResults.serverName == this._serverName && parseResults.appName == this._appName && parseResults.protocol == this._protocol && parseResults.portNumber == this._portNumber && parseResults.wrappedURL == this._wrappedURL) {
return true;
}
this._owner.close();
this._nc = undefined;
this._ncConnected = false;
}
this.initNCInfo();
return false;
};
v2.connectHTTP = function () {
this._nc = new NetConnection();
this._nc.connect(null);
this._ncConnected = true;
return true;
};
v2.connectRTMP = function () {
clearInterval(this._timeoutIntervalId);
this._timeoutIntervalId = setInterval(this, '_onFCSConnectTimeOut', this._timeout);
this._tryNC = new Array();
var v3 = (this._protocol == 'rtmp:/' || this._protocol == 'rtmpe:/') ? 2 : 1;
var v2 = 0;
while (v2 < v3) {
this._tryNC[v2] = new NetConnection();
if (this.fpadZone != null) {
this._tryNC[v2].fpadZone = this.fpadZone;
}
this._tryNC[v2].mc = this;
this._tryNC[v2].pending = false;
this._tryNC[v2].connIndex = v2;
this._tryNC[v2].onBWDone = function (p_bw) {
this.mc.onConnected(this, p_bw);
};
this._tryNC[v2].onBWCheck = function () {
return ++this.mc._payload;
};
this._tryNC[v2].onStatus = function (info) {
this.mc.connectOnStatus(this, info);
};
++v2;
}
this.nextConnect();
return false;
};
v2.connectFPAD = function (url) {
var v7;
var v5;
var v6;
var v2 = url.indexOf('?');
while (v2 >= 0) {
++v2;
var v4 = url.indexOf('&', v2);
if ((url.substr(v2, 4)).toLowerCase() == 'uri=') {
v7 = url.slice(0, v2);
v2 += 4;
if (v4 >= 0) {
v5 = url.slice(v2, v4);
v6 = url.slice(v4);
} else {
v5 = url.slice(v2);
v6 = '';
}
break;
} else {
v2 = v4;
}
}
if (v2 < 0) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, 'fpad url must include uri parameter: ' + url);
}
var v8 = this.parseURL(v5);
if (!v8.isRTMP) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, 'fpad url uri parameter must be rtmp url: ' + url);
}
this._fpadMgr = new mx.video.FPADManager(this);
return this._fpadMgr.connectXML(v7, v5, v6, v8);
};
v2.nextConnect = function () {
clearInterval(this._tryNCIntervalId);
this._tryNCIntervalId = 0;
var v3;
var v2;
if (this._connTypeCounter == 0) {
v3 = this._protocol;
v2 = this._portNumber;
} else {
v2 = null;
if (this._protocol == 'rtmp:/') {
v3 = 'rtmpt:/';
} else {
if (this._protocol == 'rtmpe:/') {
v3 = 'rtmpte:/';
} else {
this._tryNC.pop();
return undefined;
}
}
}
var v4 = v3 + ((this._serverName == undefined) ? '' : '/' + this._serverName + ((v2 == null) ? '' : ':' + v2) + '/') + ((this._wrappedURL == undefined) ? '' : this._wrappedURL + '/') + this._appName;
this._tryNC[this._connTypeCounter].pending = true;
this._tryNC[this._connTypeCounter].connect(v4, this._autoSenseBW);
if (this._connTypeCounter < this._tryNC.length - 1) {
++this._connTypeCounter;
this._tryNCIntervalId = setInterval(this, 'nextConnect', 1500);
}
};
v2.cleanConns = function () {
clearInterval(this._tryNCIntervalId);
this._tryNCIntervalId = 0;
if (this._tryNC != undefined) {
var v2 = 0;
while (v2 < this._tryNC.length) {
if (this._tryNC[v2] != undefined) {
delete this._tryNC[v2].onStatus;
if (this._tryNC[v2].pending) {
this._tryNC[v2].onStatus = function (info) {
this.mc.disconnectOnStatus(this, info);
};
} else {
delete this._tryNC[v2].onStatus;
this._tryNC[v2].close();
}
}
delete this._tryNC[v2];
++v2;
}
delete this._tryNC;
}
};
v2.tryFallBack = function () {
if (this._serverName == this.fallbackServerName || this.fallbackServerName == undefined || this.fallbackServerName == null) {
delete this._nc;
this._nc = undefined;
this._ncConnected = false;
this._owner.ncConnected();
} else {
this._connTypeCounter = 0;
this.cleanConns();
this._serverName = this.fallbackServerName;
this.connectRTMP();
}
};
v2.onConnected = function (p_nc, p_bw) {
clearInterval(this._timeoutIntervalId);
this._timeoutIntervalId = 0;
delete p_nc.onBWDone;
delete p_nc.onBWCheck;
delete p_nc.onStatus;
this._nc = p_nc;
this._ncUri = this._nc.uri;
this._ncConnected = true;
if (this._autoSenseBW) {
this._bitrate = p_bw * 1024;
if (this._streams != undefined) {
this.bitrateMatch();
} else {
var v3 = this._streamName.split(',');
var v2 = 0;
while (v2 < v3.length) {
var v4 = mx.video.NCManager.stripFrontAndBackWhiteSpace(v3[v2]);
if (v2 + 1 < v3.length) {
if (p_bw <= Number(v3[v2 + 1])) {
this._streamName = v4;
break;
}
} else {
this._streamName = v4;
break;
}
v2 += 2;
}
if ((this._streamName.slice(-4)).toLowerCase() == '.flv') {
this._streamName = this._streamName.slice(0, -4);
}
}
}
if (!this._owner.__get__isLive() && this._streamLength == undefined) {
var v6 = new Object();
v6.mc = this;
v6.onResult = function (length) {
this.mc.getStreamLengthResult(length);
};
this._nc.call('getStreamLength', v6, this._streamName);
} else {
this._owner.ncConnected();
}
};
v2.connectOnStatus = function (target, info) {
target.pending = false;
if (info.code == 'NetConnection.Connect.Success') {
this._nc = this._tryNC[target.connIndex];
this._tryNC[target.connIndex] = undefined;
this.cleanConns();
} else {
if (info.code == 'NetConnection.Connect.Rejected' && info.ex != null && info.ex.code == 302) {
this._connTypeCounter = 0;
this.cleanConns();
var v2 = this.parseURL(info.ex.redirect);
if (v2.isRTMP) {
this._protocol = v2.protocol;
this._serverName = v2.serverName;
this._wrappedURL = v2.wrappedURL;
this._portNumber = v2.portNumber;
this._appName = v2.appName;
if (v2.streamName != null) {
this._appName += '/' + v2.streamName;
}
this.connectRTMP();
} else {
this.tryFallBack();
}
} else {
if ((info.code == 'NetConnection.Connect.Failed' || info.code == 'NetConnection.Connect.Rejected') && target.connIndex == this._tryNC.length - 1) {
if (!this.connectAgain()) {
this.tryFallBack();
}
} else {}
}
}
};
v2.reconnectOnStatus = function (target, info) {
if (info.code == 'NetConnection.Connect.Failed' || info.code == 'NetConnection.Connect.Rejected') {
delete this._nc;
this._nc = undefined;
this._ncConnected = false;
this._owner.ncReconnected();
}
};
v2.disconnectOnStatus = function (target, info) {
if (info.code == 'NetConnection.Connect.Success') {
delete target.onStatus;
target.close();
}
};
v2.getStreamLengthResult = function (length) {
if (length > 0) {
this._streamLength = length;
}
this._owner.ncConnected();
};
v2._onFCSConnectTimeOut = function () {
this.cleanConns();
this._nc = undefined;
this._ncConnected = false;
if (!this.connectAgain()) {
this._owner.ncConnected();
}
};
v1.stripFrontAndBackWhiteSpace = function (p_str) {
var v1;
var v2 = p_str.length;
var v4 = 0;
var v5 = v2;
v1 = 0;
while (v1 < v2) {
switch (p_str.charCodeAt(v1)) {
if (p_str.charCodeAt(v1) !== 32) {
} else {
break;
case 9:
case 10:
case 13:
}
default:
v4 = v1;
break;
}
++v1;
}
v1 = v2;
while (v1 >= 0) {
switch (p_str.charCodeAt(v1)) {
if (p_str.charCodeAt(v1) !== 32) {
} else {
break;
case 9:
case 10:
case 13:
}
default:
v5 = v1 + 1;
break;
}
--v1;
}
if (v5 <= v4) {
return '';
}
return p_str.slice(v4, v5);
};
v1.version = '1.0.2.8';
v1.shortVersion = '1.0.2';
v2.DEFAULT_TIMEOUT = 60000;
ASSetPropFlags(mx.video.NCManager.prototype, null, 1);
}
#endinitclip
}
movieClip 98 __Packages.mx.video.CuePointManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.video) {
_global.mx.video = new Object();
}
if (!_global.mx.video.CuePointManager) {
var v1 = function (owner, id) {
this._owner = owner;
this._id = id;
this.reset();
this._asCuePointTolerance = (this._owner.getVideoPlayer(this._id)).__get__playheadUpdateInterval() / 2000;
this._linearSearchTolerance = mx.video.CuePointManager.DEFAULT_LINEAR_SEARCH_TOLERANCE;
};
mx.video.CuePointManager = v1;
var v2 = v1.prototype;
v2.reset = function () {
this._metadataLoaded = false;
this.allCuePoints = null;
this.asCuePoints = null;
this._disabledCuePoints = null;
this.flvCuePoints = null;
this.navCuePoints = null;
this.eventCuePoints = null;
this._asCuePointIndex = 0;
};
v2.__get__metadataLoaded = function () {
return this._metadataLoaded;
};
v2.__set__playheadUpdateInterval = function (aTime) {
this._asCuePointTolerance = aTime / 2000;
return this.__get__playheadUpdateInterval();
};
v2.__get__id = function () {
return this._id;
};
v2.addASCuePoint = function (timeOrCuePoint, name, parameters) {
var v3;
if (typeof timeOrCuePoint == 'object') {
v3 = mx.video.CuePointManager.deepCopyObject(timeOrCuePoint);
} else {
v3 = {'time': timeOrCuePoint, 'name': name, 'parameters': mx.video.CuePointManager.deepCopyObject(parameters)};
}
var v7 = isNaN(v3.time) || v3.time < 0;
if (v7) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number');
}
var v6 = v3.name == null;
if (v6) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'name cannot be undefined or null');
}
var v2;
v3.type = 'actionscript';
if (this.asCuePoints == null || this.asCuePoints.length < 1) {
v2 = 0;
this.asCuePoints = new Array();
this.asCuePoints.push(v3);
} else {
v2 = this.getCuePointIndex(this.asCuePoints, true, v3.time);
v2 = this.asCuePoints[v2].time > v3.time ? 0 : v2 + 1;
this.asCuePoints.splice(v2, 0, v3);
}
if (this.allCuePoints == null || this.allCuePoints.length < 1) {
v2 = 0;
this.allCuePoints = new Array();
this.allCuePoints.push(v3);
} else {
v2 = this.getCuePointIndex(this.allCuePoints, true, v3.time);
v2 = this.allCuePoints[v2].time > v3.time ? 0 : v2 + 1;
this.allCuePoints.splice(v2, 0, v3);
}
var v5 = (this._owner.getVideoPlayer(this._id)).__get__playheadTime();
if (v5 > 0) {
if (this._asCuePointIndex == v2) {
if (v5 > this.asCuePoints[v2].time) {
++this._asCuePointIndex;
}
} else {
if (this._asCuePointIndex > v2) {
++this._asCuePointIndex;
}
}
var v4 = mx.video.CuePointManager.deepCopyObject(this.asCuePoints[v2]);
v4.array = this.asCuePoints;
v4.index = v2;
return v4;
}
this._asCuePointIndex = 0;
var v4 = mx.video.CuePointManager.deepCopyObject(this.asCuePoints[v2]);
v4.array = this.asCuePoints;
v4.index = v2;
return v4;
};
v2.removeASCuePoint = function (timeNameOrCuePoint) {
if (this.asCuePoints == null || this.asCuePoints.length < 1) {
return null;
}
var v2;
switch (typeof timeNameOrCuePoint) {
case 'string':
v2 = {'name': timeNameOrCuePoint};
break;
case 'number':
v2 = {'time': timeNameOrCuePoint};
break;
case 'object':
v2 = timeNameOrCuePoint;
}
var v3 = this.getCuePointIndex(this.asCuePoints, false, v2.time, v2.name);
if (v3 < 0) {
return null;
}
v2 = this.asCuePoints[v3];
this.asCuePoints.splice(v3, 1);
v3 = this.getCuePointIndex(this.allCuePoints, false, v2.time, v2.name);
if (v3 > 0) {
this.allCuePoints.splice(v3, 1);
}
if ((this._owner.getVideoPlayer(this._id)).__get__playheadTime() > 0) {
if (this._asCuePointIndex > v3) {
--this._asCuePointIndex;
}
return v2;
}
this._asCuePointIndex = 0;
return v2;
};
v2.setFLVCuePointEnabled = function (enabled, timeNameOrCuePoint) {
var v4;
switch (typeof timeNameOrCuePoint) {
case 'string':
v4 = {'name': timeNameOrCuePoint};
break;
case 'number':
v4 = {'time': timeNameOrCuePoint};
break;
case 'object':
v4 = timeNameOrCuePoint;
}
var v12 = isNaN(v4.time) || v4.time < 0;
var v11 = v4.name == null;
if (v12 && v11) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number and/or name must not be undefined or null');
}
var v6 = 0;
var v2;
var v5;
if (v12) {
if (!this._metadataLoaded) {
if (this._disabledCuePointsByNameOnly[v4.name] == null) {
if (!enabled) {
if (this._disabledCuePointsByNameOnly == null || this._disabledCuePointsByNameOnly.length < 0) {
this._disabledCuePointsByNameOnly = new Object();
}
this._disabledCuePointsByNameOnly[v4.name] = new Array();
}
} else {
if (enabled) {
this._disabledCuePointsByNameOnly[v4.name] = undefined;
}
return -1;
}
this.removeCuePoints(this._disabledCuePoints, v4);
return -1;
}
if (enabled) {
v6 = this.removeCuePoints(this._disabledCuePoints, v4);
} else {
var v3;
v2 = this.getCuePointIndex(this.flvCuePoints, true, -1, v4.name);
while (v2 >= 0) {
v3 = this.flvCuePoints[v2];
v5 = this.getCuePointIndex(this._disabledCuePoints, true, v3.time);
if (v5 < 0 || this._disabledCuePoints[v5].time != v3.time) {
this._disabledCuePoints = this.insertCuePoint(v5, this._disabledCuePoints, {'name': v3.name, 'time': v3.time});
v6 += 1;
}
v2 = this.getNextCuePointIndexWithName(v3.name, this.flvCuePoints, v2);
}
}
return v6;
}
v2 = this.getCuePointIndex(this._disabledCuePoints, false, v4.time, v4.name);
if (v2 < 0) {
if (enabled) {
if (!this._metadataLoaded) {
v2 = this.getCuePointIndex(this._disabledCuePoints, false, v4.time);
if (v2 < 0) {
v5 = this.getCuePointIndex(this._disabledCuePointsByNameOnly[v4.name], true, v4.time);
if (mx.video.CuePointManager.cuePointCompare(v4.time, null, this._disabledCuePointsByNameOnly[v4.name]) != 0) {
this._disabledCuePointsByNameOnly[v4.name] = this.insertCuePoint(v5, this._disabledCuePointsByNameOnly[v4.name], v4);
}
} else {
this._disabledCuePoints.splice(v2, 1);
}
}
return this._metadataLoaded ? 0 : -1;
}
} else {
if (enabled) {
this._disabledCuePoints.splice(v2, 1);
v6 = 1;
} else {
v6 = 0;
}
return this._metadataLoaded ? v6 : -1;
}
if (this._metadataLoaded) {
v2 = this.getCuePointIndex(this.flvCuePoints, false, v4.time, v4.name);
if (v2 < 0) {
return 0;
}
if (v11) {
v4.name = this.flvCuePoints[v2].name;
}
}
v5 = this.getCuePointIndex(this._disabledCuePoints, true, v4.time);
this._disabledCuePoints = this.insertCuePoint(v5, this._disabledCuePoints, v4);
v6 = 1;
return this._metadataLoaded ? v6 : -1;
};
v2.removeCuePoints = function (cuePointArray, cuePoint) {
var v2;
var v4;
var v5 = 0;
v2 = this.getCuePointIndex(cuePointArray, true, -1, cuePoint.name);
while (v2 >= 0) {
v4 = cuePointArray[v2];
cuePointArray.splice(v2, 1);
--v2;
++v5;
v2 = this.getNextCuePointIndexWithName(v4.name, cuePointArray, v2);
}
return v5;
};
v2.insertCuePoint = function (insertIndex, cuePointArray, cuePoint) {
if (insertIndex < 0) {
cuePointArray = new Array();
cuePointArray.push(cuePoint);
return cuePointArray;
}
if (cuePointArray[insertIndex].time > cuePoint.time) {
insertIndex = 0;
} else {
++insertIndex;
}
cuePointArray.splice(insertIndex, 0, cuePoint);
return cuePointArray;
};
v2.isFLVCuePointEnabled = function (timeNameOrCuePoint) {
if (!this._metadataLoaded) {
return true;
}
var v3;
switch (typeof timeNameOrCuePoint) {
case 'string':
v3 = {'name': timeNameOrCuePoint};
break;
case 'number':
v3 = {'time': timeNameOrCuePoint};
break;
case 'object':
v3 = timeNameOrCuePoint;
}
var v5 = isNaN(v3.time) || v3.time < 0;
var v6 = v3.name == null;
if (v5 && v6) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number and/or name must not be undefined or null');
}
if (v5) {
var v2 = this.getCuePointIndex(this.flvCuePoints, true, -1, v3.name);
if (v2 < 0) {
return true;
}
while (v2 >= 0) {
if (this.getCuePointIndex(this._disabledCuePoints, false, this.flvCuePoints[v2].time, this.flvCuePoints[v2].name) < 0) {
return true;
}
v2 = this.getNextCuePointIndexWithName(v3.name, this.flvCuePoints, v2);
}
return false;
}
return this.getCuePointIndex(this._disabledCuePoints, false, v3.time, v3.name) < 0;
};
v2.dispatchASCuePoints = function () {
var v5 = (this._owner.getVideoPlayer(this._id)).__get__playheadTime();
if ((this._owner.getVideoPlayer(this._id)).__get__stateResponsive() && this.asCuePoints != null) {
for (;;) {
if (!(this._asCuePointIndex < this.asCuePoints.length && this.asCuePoints[this._asCuePointIndex].time <= v5 + this._asCuePointTolerance)) break;
this._owner.dispatchEvent({'type': 'cuePoint', 'info': mx.video.CuePointManager.deepCopyObject(this.asCuePoints[this._asCuePointIndex++]), 'vp': this._id});
}
}
};
v2.resetASCuePointIndex = function (time) {
if (time <= 0 || this.asCuePoints == null) {
this._asCuePointIndex = 0;
return undefined;
}
var v2 = this.getCuePointIndex(this.asCuePoints, true, time);
this._asCuePointIndex = this.asCuePoints[v2].time < time ? v2 + 1 : v2;
};
v2.processFLVCuePoints = function (metadataCuePoints) {
this._metadataLoaded = true;
if (metadataCuePoints == null || metadataCuePoints.length < 1) {
this.flvCuePoints = null;
this.navCuePoints = null;
this.eventCuePoints = null;
return undefined;
}
this.flvCuePoints = metadataCuePoints;
this.navCuePoints = new Array();
this.eventCuePoints = new Array();
var v5;
var v6 = -1;
var v2;
var v4 = this._disabledCuePoints;
var v3 = 0;
this._disabledCuePoints = new Array();
var v9 = 0;
v2 = this.flvCuePoints[v9++];
while (v2 != null) {
if (v6 > 0 && v6 >= v2.time) {
this.flvCuePoints = null;
this.navCuePoints = null;
this.eventCuePoints = null;
this._disabledCuePoints = null;
this._disabledCuePointsByNameOnly = null;
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'Unsorted cuePoint found after time: ' + v6);
}
v6 = v2.time;
for (;;) {
if (!(v3 < v4.length && mx.video.CuePointManager.cuePointCompare(v4[v3].time, null, v2) < 0)) break;
++v3;
}
if (this._disabledCuePointsByNameOnly[v2.name] != null || v3 < v4.length && mx.video.CuePointManager.cuePointCompare(v4[v3].time, v4[v3].name, v2) == 0) {
this._disabledCuePoints.push({'time': v2.time, 'name': v2.name});
}
if (v2.type == 'navigation') {
this.navCuePoints.push(v2);
} else {
if (v2.type == 'event') {
this.eventCuePoints.push(v2);
}
}
if (this.allCuePoints == null || this.allCuePoints.length < 1) {
this.allCuePoints = new Array();
this.allCuePoints.push(v2);
} else {
v5 = this.getCuePointIndex(this.allCuePoints, true, v2.time);
v5 = this.allCuePoints[v5].time > v2.time ? 0 : v5 + 1;
this.allCuePoints.splice(v5, 0, v2);
}
}
delete this._disabledCuePointsByNameOnly;
this._disabledCuePointsByNameOnly = null;
};
v2.processCuePointsProperty = function (cuePoints) {
if (cuePoints == null || cuePoints.length == 0) {
return undefined;
}
var v4 = 0;
var v8;
var v6;
var v7;
var v5;
var v9;
var v2 = 0;
while (v2 < cuePoints.length - 1) {
switch (v4) {
case 6:
this.addOrDisable(v9, v5);
v4 = 0;
case 0:
if (cuePoints[v2++] != 't') {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format');
}
if (isNaN(cuePoints[v2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number');
}
v5 = new Object();
v5.time = cuePoints[v2] / 1000;
++v4;
break;
case 1:
if (cuePoints[v2++] != 'n') {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format');
}
if (cuePoints[v2] == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'name cannot be null or undefined');
}
v5.name = this.unescape(cuePoints[v2]);
++v4;
break;
case 2:
if (cuePoints[v2++] != 't') {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format');
}
if (isNaN(cuePoints[v2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'type must be number');
}
switch (cuePoints[v2]) {
case 0:
v5.type = 'event';
break;
case 1:
v5.type = 'navigation';
break;
case 2:
v5.type = 'actionscript';
break;
default:
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'type must be 0, 1 or 2');
}
++v4;
break;
case 3:
if (cuePoints[v2++] != 'd') {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format');
}
if (isNaN(cuePoints[v2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'disabled must be number');
}
v9 = cuePoints[v2] != 0;
++v4;
break;
case 4:
if (cuePoints[v2++] != 'p') {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format');
}
if (isNaN(cuePoints[v2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'num params must be number');
}
v8 = cuePoints[v2];
++v4;
if (v8 == 0) {
++v4;
} else {
v5.parameters = new Object();
}
break;
case 5:
v6 = cuePoints[v2++];
v7 = cuePoints[v2];
if (typeof v6 == 'string') {
v6 = this.unescape(v6);
}
if (typeof v7 == 'string') {
v7 = this.unescape(v7);
}
v5.parameters[v6] = v7;
--v8;
if (v8 == 0) {
++v4;
}
}
++v2;
}
if (v4 == 6) {
this.addOrDisable(v9, v5);
} else {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected end of cuePoint param string');
}
};
v2.addOrDisable = function (disable, cuePoint) {
if (disable) {
if (cuePoint.type == 'actionscript') {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'Cannot disable actionscript cue points');
}
this.setFLVCuePointEnabled(false, cuePoint);
} else {
if (cuePoint.type == 'actionscript') {
this.addASCuePoint(cuePoint);
}
}
};
v2.unescape = function (origStr) {
var v3 = origStr;
var v1 = 0;
while (v1 < mx.video.CuePointManager.cuePointsReplace.length) {
var v2 = v3.split(mx.video.CuePointManager.cuePointsReplace[v1++]);
if (v2.length > 1) {
v3 = v2.join(mx.video.CuePointManager.cuePointsReplace[v1]);
}
++v1;
}
return v3;
};
v2.getCuePointIndex = function (cuePointArray, closeIsOK, time, name, start, len) {
if (cuePointArray == null || cuePointArray.length < 1) {
return -1;
}
var v13 = isNaN(time) || time < 0;
var v16 = name == null;
if (v13 && v16) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number and/or name must not be undefined or null');
}
if (start == null) {
start = 0;
}
if (len == null) {
len = cuePointArray.length;
}
if (!v16 && (closeIsOK || v13)) {
var v8;
var v2;
if (v13) {
v8 = start;
} else {
v8 = this.getCuePointIndex(cuePointArray, closeIsOK, time);
}
v2 = v8;
while (v2 >= start) {
if (cuePointArray[v2].name == name) {
break;
}
--v2;
}
if (v2 >= start) {
return v2;
}
v2 = v8 + 1;
while (v2 < len) {
if (cuePointArray[v2].name == name) {
break;
}
++v2;
}
if (v2 < len) {
return v2;
}
return -1;
}
var v6;
if (len <= this._linearSearchTolerance) {
var v11 = start + len;
var v3 = start;
while (v3 < v11) {
v6 = mx.video.CuePointManager.cuePointCompare(time, name, cuePointArray[v3]);
if (v6 == 0) {
return v3;
}
if (v6 < 0) {
break;
}
++v3;
}
if (closeIsOK) {
if (v3 > 0) {
return v3 - 1;
}
return 0;
}
return -1;
}
var v12 = Math.floor(len / 2);
var v15 = start + v12;
v6 = mx.video.CuePointManager.cuePointCompare(time, name, cuePointArray[v15]);
if (v6 < 0) {
return this.getCuePointIndex(cuePointArray, closeIsOK, time, name, start, v12);
}
if (v6 > 0) {
return this.getCuePointIndex(cuePointArray, closeIsOK, time, name, v15 + 1, v12 - 1 + len % 2);
}
return v15;
};
v2.getNextCuePointIndexWithName = function (name, array, index) {
if (name == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'name cannot be undefined or null');
}
if (array == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'cuePoint.array undefined');
}
if (isNaN(index) || index < -1 || index >= array.length) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'cuePoint.index must be number between -1 and cuePoint.array.length');
}
var v1;
v1 = index + 1;
while (v1 < array.length) {
if (array[v1].name == name) {
break;
}
++v1;
}
if (v1 < array.length) {
return v1;
}
return -1;
};
v1.cuePointCompare = function (time, name, cuePoint) {
var v1 = Math.round(time * 1000);
var v2 = Math.round(cuePoint.time * 1000);
if (v1 < v2) {
return -1;
}
if (v1 > v2) {
return 1;
}
if (name != null) {
if (name == cuePoint.name) {
return 0;
}
if (name < cuePoint.name) {
return -1;
}
return 1;
}
return 0;
};
v2.getCuePoint = function (cuePointArray, closeIsOK, timeNameOrCuePoint) {
var v2;
switch (typeof timeNameOrCuePoint) {
case 'string':
v2 = {'name': timeNameOrCuePoint};
break;
case 'number':
v2 = {'time': timeNameOrCuePoint};
break;
case 'object':
v2 = timeNameOrCuePoint;
}
var v3 = this.getCuePointIndex(cuePointArray, closeIsOK, v2.time, v2.name);
if (v3 < 0) {
return null;
}
v2 = mx.video.CuePointManager.deepCopyObject(cuePointArray[v3]);
v2.array = cuePointArray;
v2.index = v3;
return v2;
};
v2.getNextCuePointWithName = function (cuePoint) {
if (cuePoint == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'cuePoint parameter undefined');
}
if (isNaN(cuePoint.time) || cuePoint.time < 0) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number');
}
var v3 = this.getNextCuePointIndexWithName(cuePoint.name, cuePoint.array, cuePoint.index);
if (v3 < 0) {
return null;
}
var v4 = mx.video.CuePointManager.deepCopyObject(cuePoint.array[v3]);
v4.array = cuePoint.array;
v4.index = v3;
return v4;
};
v1.deepCopyObject = function (obj, recurseLevel) {
if (obj == null || typeof obj != 'object') {
return obj;
}
if (recurseLevel == null) {
recurseLevel = 0;
}
var v2 = new Object();
for (var v4 in obj) {
if (recurseLevel == 0 && (v4 == 'array' || v4 == 'index')) {
} else {
if (typeof obj[v4] == 'object') {
v2[v4] = mx.video.CuePointManager.deepCopyObject(obj[v4], recurseLevel + 1);
} else {
v2[v4] = obj[v4];
}
}
}
return v2;
};
v1.DEFAULT_LINEAR_SEARCH_TOLERANCE = 50;
v1.cuePointsReplace = ['"', '"', ''', '\'', ',', ',', '&', '&'];
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('metadataLoaded', v2.__get__metadataLoaded, function () {});
v2.addProperty('playheadUpdateInterval', function () {}, v2.__set__playheadUpdateInterval);
ASSetPropFlags(mx.video.CuePointManager.prototype, null, 1);
}
#endinitclip
}
movieClip 99 __Packages.com.newgrounds.components.APIConnector {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.components) {
_global.com.newgrounds.components = new Object();
}
if (!_global.com.newgrounds.components.APIConnector) {
var v1 = function () {
super();
this._x = Math.round(this._x);
this._y = Math.round(this._y);
if (this.fake_session and com.newgrounds.API.getHost() == 'localhost') {
com.newgrounds.API.setFakeSession(true);
}
if (this.api_id && !com.newgrounds.API.isConnected()) {
this._visible = false;
this.setGotoFrame('connecting');
if (this.error_screens) {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.NEW_VERSION_AVAILABLE, this.onNewVersion, this);
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.HOST_BLOCKED, this.onBadHost, this);
}
if (this.medal_popups) {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.UNLOCK_MEDAL, this.doUnlock, this);
}
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, this.onConnected, this);
if (com.newgrounds.API.isPublishedHost()) {
this.debug = false;
}
if (this.version) {
com.newgrounds.API.setVersion(this.version);
}
if (!com.newgrounds.API.hasUserSession()) {
var v3 = com.newgrounds.API.loadLocal('api_connector_data');
if (v3) {
this.local_data = v3;
} else {
this.local_data = {'medals_unlocked': new Array()};
}
}
com.newgrounds.API.setPreload(true);
com.newgrounds.API.connect(this.api_id, this.encryption_key, this.debug);
} else {
if (this.api_id && com.newgrounds.API.isConnected()) {
this._visible = false;
this.setGotoFrame('done');
}
}
};
com.newgrounds.components.APIConnector = v1;
com.newgrounds.components.APIConnector extends MovieClip;
var v2 = v1.prototype;
v2.doUnlock = function (e) {
var v5 = _root.attachMovie('NewgroundsAPIAsset_Medal_Popup', 'medal_pop_' + e.data.medal.getID(), _root.getNextHighestDepth());
if (e.data.x != undefined) {
v5._x = e.data.x + 254;
} else {
v5._x = Stage.width;
}
if (e.data.x != undefined) {
v5._y = e.data.y + 73;
} else {
v5._y = Stage.height;
}
v5.medal = e.data.medal;
var v3 = com.newgrounds.API.getMedals();
var v2 = 0;
while (v2 < v3.length) {
if (v3[v2].getID() != e.data.medal.getID() && _root['medal_pop_' + v3[v2].getID()]) {
_root['medal_pop_' + v3[v2].getID()]._y -= 70;
}
++v2;
}
};
v2.onLoginError = function () {
var v2 = _root.attachMovie('Asset_Login_Warning', 'Asset_Login_Warning', _root.getNextHighestDepth());
};
v2.onConnectionError = function () {
var v3 = _root.attachMovie('Asset_Connection_Error', 'Asset_Connection_Error', _root.getNextHighestDepth());
this.setGotoFrame('done');
};
v2.onConnected = function (event, params) {
if (event.success) {
this.setGotoFrame('connected');
if (this.error_screens && com.newgrounds.API.isPublishedHost() && com.newgrounds.API.hasPublisher() && !com.newgrounds.API.hasUserSession()) {
this.onLoginError();
}
} else {
if (this.error_screens) {
this.onConnectionError();
}
}
};
v2.onNewVersion = function () {
var v2 = _root.attachMovie('NewgroundsAsset_New_Version_Available', 'NewgroundsAsset_New_Version_Available', _root.getNextHighestDepth());
v2.official_version_url = com.newgrounds.API.getOfficialURL();
};
v2.onBadHost = function () {
var v2 = _root.attachMovie('NewgroundsAsset_Illegal_Host', 'NewgroundsAsset_Illegal_Host', _root.getNextHighestDepth());
v2.official_version_url = com.newgrounds.API.getOfficialURL();
};
v2.setGotoFrame = function (frame) {
if (this.goto_frame == null) {
this.goto_frame = frame;
this.gotoframe_interval = setInterval(this, 'gotoFrameIfLoaded', 50);
}
};
v2.gotoFrameIfLoaded = function () {
if (this.goto_frame != null && this._framesloaded == this._totalframes) {
this._visible = true;
this.gotoAndStop(this.goto_frame);
this.goto_frame = null;
clearInterval(this.gotoframe_interval);
}
};
v2.goto_frame = null;
ASSetPropFlags(com.newgrounds.components.APIConnector.prototype, null, 1);
}
#endinitclip
}
movieClip 174 __Packages.com.newgrounds.components.FlashAd {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.components) {
_global.com.newgrounds.components = new Object();
}
if (!_global.com.newgrounds.components.FlashAd) {
var v1 = function () {
super();
this.background._visible = this.show_background;
if (this.show_background) {
this._x = Math.round(this._x);
this._y = Math.round(this._y);
this._xscale = 100;
this._yscale = 100;
}
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.ADS_APPROVED, this.loadAd, this);
};
com.newgrounds.components.FlashAd = v1;
com.newgrounds.components.FlashAd extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
com.newgrounds.API.attachFlashAd(this);
};
v2.loadAd = function (event, params) {
com.newgrounds.API.attachFlashAd(this);
};
v2.onUnload = function () {
this.clip.ad.unloadMovie();
this.clip.ad.removeMovieClip();
this.clip.removeMovieClip();
this.mask.removeMovieClip();
this.background.removeMovieClip();
com.newgrounds.API.removeEventListener(com.newgrounds.APIEvent.ADS_APPROVED, this);
};
ASSetPropFlags(com.newgrounds.components.FlashAd.prototype, null, 1);
}
#endinitclip
}
frame 2 {
for (a in _root) {
_root[a].removeMovieClip();
}
_root.nextFrame();
}
frame 3 {
music = new Sound();
music.attachSound('music2');
music.start(0, 99);
}
frame 3 {
button = new Sound();
button.attachSound('button');
rtimer = 30;
oldRecordSeconds = saveGame.data.oldRecordSeconds;
if (oldRecordSeconds == undefined) {
oldRecordSeconds = 0;
}
oldRecordMinute = saveGame.data.oldRecordMinute;
if (oldRecordMinute == undefined) {
oldRecordMinute = 0;
}
trace(_root.oldRecordMinute);
trace(_root.oldRecordSeconds);
coinTutDone = saveGame.data.coinTutDone;
hurtTutDone = saveGame.data.hurtTutDone;
fedTutDone = saveGame.data.fedTutDone;
lightTutDone = saveGame.data.lightTutDone;
if (coinTutDone == true) {
_root.SPACLOL = false;
_root.cTut.removeMovieClip();
}
if (hurtTutDone == true) {
_root.SPACLOL = false;
_root.hTut.removeMovieClip();
}
if (fedTutDone == true) {
_root.SPACLOL = false;
_root.fTut.removeMovieClip();
}
if (lightTutDone == true) {
_root.SPACLOL = false;
_root.lTut.removeMovieClip();
}
if (saveGame.data.oldRecordMinute == 0) {
wholeSeconds = saveGame.data.oldRecordSeconds;
}
if (saveGame.data.oldRecordMinute == 1) {
wholeSeconds = saveGame.data.oldRecordSeconds + 60;
}
if (saveGame.data.oldRecordMinute == 2) {
wholeSeconds = saveGame.data.oldRecordSeconds + 120;
}
if (saveGame.data.oldRecordMinute == 3) {
wholeSeconds = saveGame.data.oldRecordSeconds + 180;
}
if (saveGame.data.oldRecordMinute == 4) {
wholeSeconds = saveGame.data.oldRecordSeconds + 240;
}
if (saveGame.data.oldRecordMinute == 5) {
wholeSeconds = saveGame.data.oldRecordSeconds + 300;
}
if (saveGame.data.oldRecordMinute == 6) {
wholeSeconds = saveGame.data.oldRecordSeconds + 360;
}
if (saveGame.data.oldRecordMinute == 7) {
wholeSeconds = saveGame.data.oldRecordSeconds + 420;
}
trace(wholeSeconds);
}
frame 3 {
function makeBombOmb() {
++bombo;
_root.bombOmb.duplicateMovieClip('bombOmb' + bombo, bombo);
if (bombo >= 5999) {
bombo = 5001;
}
}
function makeMissle() {
++mis;
_root.missle.duplicateMovieClip('missle' + mis, mis);
if (mis >= 9999) {
mis = 9501;
}
}
function makeLilMissle() {
++lmis;
_root.lilMissle.duplicateMovieClip('lilMissle' + lmis, lmis);
if (lmis >= 9499) {
lmis = 9001;
}
}
function makeThunder() {
++th;
_root.lightBody.duplicateMovieClip('lightBody' + th, th);
_root['lightBody' + th]._x = _root.XX;
_root['lightBody' + th]._y = _root.YY;
if (th >= 15999) {
th = 15600;
}
}
function makeSushiShot() {
++shot;
_root.sushiShot.duplicateMovieClip('sushiShot' + shot, shot);
_root['sushiShot' + shot]._y = _root.player._y - 20;
_root['sushiShot' + shot]._x = _root.player._x;
if (_root.shot >= 15030) {
shot = 15000;
}
}
function makeCoin() {
++co;
_root.coin.duplicateMovieClip('coin' + co, co);
if (co >= 14970) {
co = 14000;
}
}
function makeBlueCoin() {
++bco;
_root.blueCoin.duplicateMovieClip('bcoin' + bco, bco);
if (bco >= 12970) {
bco = 12001;
}
}
function makeMine() {
++mi;
_root.mine.duplicateMovieClip('mine' + mi, mi);
if (mi >= 8950) {
mi = 8000;
}
}
function makeBomb() {
++bo;
_root.bomb.duplicateMovieClip('bomb' + bo, bo);
if (bo >= 7900) {
bo = 7000;
}
}
function makeSushi() {
++su;
_root.sushi.duplicateMovieClip('sushi' + su, su);
_root['sushi' + su].gotoAndStop(random(4));
if (su >= 6950) {
su = 6000;
}
}
function makeExp() {
++exp;
_root.expBar.duplicateMovieClip('exp' + exp, exp);
_root['exp' + exp]._y = -100;
_root['exp' + exp]._x = Stage.width / 2;
}
function makeBall() {
++b;
_root.ball.duplicateMovieClip('ball' + b, b);
_root['ball' + b]._x = 10 + random(750);
_root['ball' + b]._y = -30;
_root['ball' + b].yspeed = 0;
_root['ball' + b]._yscale = scaley + random(30);
_root['ball' + b]._xscale = _root['ball' + b]._yscale;
if (b > 450) {
b = 400;
}
}
function makePlayerExplosion() {
++e;
_root.playerExplosion.duplicateMovieClip('playerExplosion' + e, e);
_root['playerExplosion' + e]._x = _root.player._x;
_root['playerExplosion' + e]._y = _root.player._y;
_root['playerExplosion' + e].gotoAndPlay(1);
if (e > 4) {
e = 0;
}
}
function makeParticle() {
++p;
_root.particle.duplicateMovieClip('particle' + p, p);
_root['particle' + p]._x = _root.player._x - 10 + random(20);
_root['particle' + p]._y = _root.player._y;
_root['particle' + p]._rotation = _root.player._rotation;
pscale = random(2);
if (p > 100) {
p = 0;
}
}
function makeStripe() {
++s;
_root.stripe.duplicateMovieClip('stripe' + s, s);
_root['stripe' + s]._x = +random(766);
_root['stripe' + s]._y = -10;
if (s >= 30) {
s = 0;
}
}
function makeScreenA() {
A = true;
screenA = true;
screenAa = false;
screenB = false;
screenD = false;
screenC = false;
screenE = false;
screenF = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeMine();
_root['mine' + mi]._x = 382;
_root['mine' + mi]._y = 107.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 385;
_root['coin' + co]._y = 717.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 384;
_root['coin' + co]._y = 561.2000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 384;
_root['coin' + co]._y = 406.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 263.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenB() {
B = true;
screenA = false;
screenAa = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2;
_root['coin' + co]._y = 748.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 303.8;
_root['coin' + co]._y = 582.3 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 490.15;
_root['mine' + mi]._y = 562.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2;
_root['coin' + co]._y = 392.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 316.1;
_root['bomb' + bo]._y = 225.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 463.8;
_root['coin' + co]._y = 224.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2;
_root['coin' + co]._y = 54.3 - screenNumber;
}
function makeScreenC() {
screenA = false;
screenAa = false;
screenB = false;
screenD = false;
screenC = true;
screenF = false;
screenE = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 383.1;
_root['coin' + co]._y = 738.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383.1;
_root['coin' + co]._y = 608.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 283.1;
_root['coin' + co]._y = 498.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 213.1;
_root['coin' + co]._y = 358.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 268.1;
_root['coin' + co]._y = 198.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 378.1;
_root['coin' + co]._y = 73.34999999999999 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 236.75;
_root['bomb' + bo]._y = 737.6 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 531.75;
_root['bomb' + bo]._y = 737.6 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 127.9;
_root['bomb' + bo]._y = 76.34999999999999 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 380.95;
_root['mine' + mi]._y = 337.65 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 483.2;
_root['bcoin' + bco]._y = 498.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 553.2000000000001;
_root['bcoin' + bco]._y = 348.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 488.2;
_root['bcoin' + bco]._y = 198.25 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 122.95;
_root['sushi' + su]._y = 194.35 - screenNumber;
}
function makeScreenD() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBomb();
_root['bomb' + bo]._x = Stage.width / 2 + 80;
_root['bomb' + bo]._y = Stage.height - 50 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 - 220;
_root['coin' + co]._y = Stage.height - 50 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = Stage.width / 2 - 190;
_root['bomb' + bo]._y = Stage.height - 340 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 - 40;
_root['coin' + co]._y = Stage.height - 210 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 + 170;
_root['coin' + co]._y = Stage.height - 360 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 + 280;
_root['coin' + co]._y = Stage.height - 550 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 + 150;
_root['coin' + co]._y = Stage.height - 740 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = Stage.width / 2 - 180;
_root['sushi' + su]._y = Stage.height - 600 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = Stage.width / 2 + 60;
_root['mine' + mi]._y = Stage.height - 550 - screenNumber;
}
function makeScreenE() {
E = true;
screenA = false;
screenAa = false;
screenB = false;
screenD = false;
screenC = false;
screenF = false;
screenE = true;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 383.1;
_root['coin' + co]._y = 746.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 543.15;
_root['coin' + co]._y = 698.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 593.15;
_root['coin' + co]._y = 553.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 473.15;
_root['coin' + co]._y = 413.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 398.1;
_root['coin' + co]._y = 253.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383.1;
_root['coin' + co]._y = 73.25 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 446.85;
_root['bomb' + bo]._y = 580.5 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 560.4500000000001;
_root['mine' + mi]._y = 232.6 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 593.25;
_root['bcoin' + bco]._y = 418.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 693.25;
_root['bcoin' + bco]._y = 418.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 693.25;
_root['bcoin' + bco]._y = 318.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 192.65;
_root['bcoin' + bco]._y = 647.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 192.65;
_root['bcoin' + bco]._y = 747.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 192.65;
_root['bcoin' + bco]._y = 157.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 192.65;
_root['bcoin' + bco]._y = 62.8 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 197.3;
_root['missle' + mis]._y = 404.7 - screenNumber;
}
function makeScreenF() {
F = true;
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenG = false;
screenH = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2;
_root['coin' + co]._y = Stage.height - 190 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = Stage.width / 2;
_root['bomb' + bo]._y = Stage.height - 50 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2;
_root['coin' + co]._y = Stage.height - 330 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 + 130;
_root['coin' + co]._y = Stage.height - 330 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 - 130;
_root['coin' + co]._y = Stage.height - 330 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 + 60;
_root['coin' + co]._y = Stage.height - 440 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2 - 60;
_root['coin' + co]._y = Stage.height - 440 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = Stage.width / 2;
_root['coin' + co]._y = Stage.height - 550 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = Stage.width / 2 + 280;
_root['mine' + mi]._y = Stage.height - 410 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = Stage.width / 2 - 280;
_root['mine' + mi]._y = Stage.height - 410 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = Stage.width / 2 + 120;
_root['bomb' + bo]._y = Stage.height - 690 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = Stage.width / 2 - 120;
_root['bomb' + bo]._y = Stage.height - 690 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = Stage.width / 2;
_root['sushi' + su]._y = Stage.height - 690 - screenNumber;
}
function makeScreenG() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = true;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 529;
_root['coin' + co]._y = 727.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 243.5;
_root['coin' + co]._y = 727.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 324.05;
_root['coin' + co]._y = 458.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 442.85;
_root['coin' + co]._y = 458.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 384.5;
_root['coin' + co]._y = 322.45 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 594 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 258.8;
_root['bombOmb' + bombo]._y = 121.65 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 385;
_root['bombOmb' + bombo]._y = 740.6 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 166.35;
_root['bomb' + bo]._y = 581.1 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 604.7000000000001;
_root['bomb' + bo]._y = 581.1 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 181.15;
_root['mine' + mi]._y = 268.5 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 590.9;
_root['missle' + mis]._y = 195.05 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 383;
_root['bcoin' + bco]._y = 46.65 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 383;
_root['bcoin' + bco]._y = 180.3 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 102;
_root['sushi' + su]._y = 120.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenH() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = true;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 572.75;
_root['coin' + co]._y = 416.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 457.75;
_root['coin' + co]._y = 580.5 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 558;
_root['coin' + co]._y = 248 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 61.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 220;
_root['coin' + co]._y = 248 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 200.05;
_root['coin' + co]._y = 416.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 313.45;
_root['coin' + co]._y = 579.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 717.7000000000001 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 120;
_root['bombOmb' + bombo]._y = 696.3 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 638;
_root['bombOmb' + bombo]._y = 100 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 66.2;
_root['bomb' + bo]._y = 379.05 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 383;
_root['missle' + mis]._y = 331.6 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 713.9500000000001;
_root['bcoin' + bco]._y = 568.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 713.9500000000001;
_root['bcoin' + bco]._y = 496.65 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 566.4500000000001;
_root['bcoin' + bco]._y = 568.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1026.75;
_root['bcoin' + bco]._y = 446.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 641.4500000000001;
_root['bcoin' + bco]._y = 568.9500000000001 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 710;
_root['sushi' + su]._y = 378.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenI() {
G = true;
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = true;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 64.09999999999999;
_root['coin' + co]._y = 298.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 704.1;
_root['coin' + co]._y = 298.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 212.05;
_root['coin' + co]._y = 573.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 644.1;
_root['coin' + co]._y = 458.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 124.1;
_root['coin' + co]._y = 458.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 638.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 41 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 528.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 236.1;
_root['coin' + co]._y = 123.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 188.1;
_root['coin' + co]._y = 239.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 212.05;
_root['coin' + co]._y = 353.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 284.1;
_root['coin' + co]._y = 458.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 540.1;
_root['coin' + co]._y = 125.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 578.15;
_root['coin' + co]._y = 241.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1176.1;
_root['coin' + co]._y = 837.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 754.7000000000001 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 383;
_root['sushi' + su]._y = 365.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 383;
_root['mine' + mi]._y = 188.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 556.15;
_root['bcoin' + bco]._y = 355.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 484.15;
_root['bcoin' + bco]._y = 461.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 558.1;
_root['bomb' + bo]._y = 565.85 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 211.25;
_root['mine' + mi]._y = 702.25 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 558.25;
_root['mine' + mi]._y = 700.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenJ() {
B = true;
screenA = false;
screenAa = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = true;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 571;
_root['coin' + co]._y = 126 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 221;
_root['coin' + co]._y = 126 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 139;
_root['coin' + co]._y = 276 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 639;
_root['coin' + co]._y = 276 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 259;
_root['coin' + co]._y = 367 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 384;
_root['coin' + co]._y = 448 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 239;
_root['coin' + co]._y = 581 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 531;
_root['coin' + co]._y = 581 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 601;
_root['coin' + co]._y = 747 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 512;
_root['coin' + co]._y = 367 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 183.35;
_root['coin' + co]._y = 747 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 695.55;
_root['bombOmb' + bombo]._y = 542.4500000000001 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 90.25;
_root['bombOmb' + bombo]._y = 542.4500000000001 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 88;
_root['bomb' + bo]._y = 100.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 700.85;
_root['bomb' + bo]._y = 100.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 383;
_root['bcoin' + bco]._y = 245 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 477;
_root['bcoin' + bco]._y = 245 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 299;
_root['bcoin' + bco]._y = 245 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 383;
_root['bcoin' + bco]._y = 339 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 381;
_root['mine' + mi]._y = 693.55 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 383;
_root['mine' + mi]._y = 96 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 389;
_root['sushi' + su]._y = 551.85 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenK() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = true;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBomb();
_root['bomb' + bo]._x = 705.4;
_root['bomb' + bo]._y = 78.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 65.95;
_root['coin' + co]._y = 257.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 705.9500000000001;
_root['coin' + co]._y = 257.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 112.8;
_root['coin' + co]._y = 572.4500000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 652.8;
_root['coin' + co]._y = 572.4500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 383.9;
_root['bcoin' + bco]._y = 412.05 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 382.9;
_root['bcoin' + bco]._y = 250.05 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 715.85;
_root['bombOmb' + bombo]._y = 727.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 205.95;
_root['coin' + co]._y = 157.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 565.9500000000001;
_root['coin' + co]._y = 157.65 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 563.6;
_root['lilMissle' + lmis]._y = 385.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 705.9500000000001;
_root['coin' + co]._y = 417.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 66.15000000000001;
_root['coin' + co]._y = 417.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 488.6;
_root['coin' + co]._y = 616.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 276.1;
_root['coin' + co]._y = 616.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 165.1;
_root['coin' + co]._y = 713.15 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 214.7;
_root['lilMissle' + lmis]._y = 388.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 384.9;
_root['bcoin' + bco]._y = 330.05 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 63.4;
_root['bomb' + bo]._y = 78.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 603.1;
_root['coin' + co]._y = 703.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 50.85;
_root['bombOmb' + bombo]._y = 732.55 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 381.5;
_root['mine' + mi]._y = 98.90000000000001 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 382;
_root['sushi' + su]._y = 510.1 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382.7;
_root['coin' + co]._y = 747.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenL() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = true;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 385;
_root['lilMissle' + lmis]._y = 152.15 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 386;
_root['lilMissle' + lmis]._y = 588.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 509.85;
_root['coin' + co]._y = 175.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 603.85;
_root['coin' + co]._y = 256.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 513.85;
_root['coin' + co]._y = 67.15000000000001 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 657.2000000000001;
_root['mine' + mi]._y = 115.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 256;
_root['coin' + co]._y = 175.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 167;
_root['coin' + co]._y = 258.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 252;
_root['coin' + co]._y = 65.15000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 82;
_root['coin' + co]._y = 371.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 222;
_root['coin' + co]._y = 371.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 222;
_root['coin' + co]._y = 677.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 222;
_root['coin' + co]._y = 531.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 542;
_root['coin' + co]._y = 371.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 682;
_root['coin' + co]._y = 371.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 542;
_root['coin' + co]._y = 531.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 542;
_root['coin' + co]._y = 675.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 679.05;
_root['bombOmb' + bombo]._y = 540 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 381.9;
_root['bcoin' + bco]._y = 310.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 381.9;
_root['bcoin' + bco]._y = 386.55 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 79.05;
_root['bombOmb' + bombo]._y = 540 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 102.65;
_root['mine' + mi]._y = 122.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 751.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenM() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = true;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBomb();
_root['bomb' + bo]._x = 715.2000000000001;
_root['bomb' + bo]._y = 99.84999999999999 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 50.15;
_root['bomb' + bo]._y = 97.84999999999999 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 382;
_root['bomb' + bo]._y = 734.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 588.15;
_root['bcoin' + bco]._y = 291.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 724.15;
_root['bcoin' + bco]._y = 291.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 658.15;
_root['bcoin' + bco]._y = 371.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 658.15;
_root['bcoin' + bco]._y = 211.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 658.15;
_root['bcoin' + bco]._y = 291.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 40.15;
_root['bcoin' + bco]._y = 291.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 176.15;
_root['bcoin' + bco]._y = 291.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 110.15;
_root['bcoin' + bco]._y = 371.55 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 110.15;
_root['bcoin' + bco]._y = 211.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 228.85;
_root['coin' + co]._y = 683.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 293.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 233;
_root['coin' + co]._y = 160.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 541;
_root['coin' + co]._y = 158.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382.15;
_root['coin' + co]._y = 46.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 234.85;
_root['coin' + co]._y = 430.85 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 110.15;
_root['bcoin' + bco]._y = 291.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 538.85;
_root['coin' + co]._y = 430.85 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 276.9;
_root['bombOmb' + bombo]._y = 295.1 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 538.85;
_root['coin' + co]._y = 683.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 578.8 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 608.05;
_root['bomb' + bo]._y = 550.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 158.05;
_root['bomb' + bo]._y = 550.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 431.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 492.9;
_root['bombOmb' + bombo]._y = 295.1 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 382;
_root['sushi' + su]._y = 160.2 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenN() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 690.8;
_root['bcoin' + bco]._y = 508.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 628.8;
_root['bcoin' + bco]._y = 544.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 628.8;
_root['bcoin' + bco]._y = 478.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 132.95;
_root['bcoin' + bco]._y = 347.7 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 162.95;
_root['bcoin' + bco]._y = 277.7 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 194.95;
_root['bcoin' + bco]._y = 343.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 106.3;
_root['mine' + mi]._y = 496.45 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 271.1;
_root['coin' + co]._y = 458.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381.05;
_root['coin' + co]._y = 58.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 441.05;
_root['coin' + co]._y = 202.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381.05;
_root['coin' + co]._y = 342.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 493.1;
_root['coin' + co]._y = 458.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 243.05;
_root['coin' + co]._y = 622.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 535.05;
_root['coin' + co]._y = 626.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.05;
_root['coin' + co]._y = 726.85 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 278.95;
_root['mine' + mi]._y = 186.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 700.75;
_root['bomb' + bo]._y = 716.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 70.95;
_root['bomb' + bo]._y = 715.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 382;
_root['bomb' + bo]._y = 539.8 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 633.6;
_root['missle' + mis]._y = 249.95 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 80.05;
_root['sushi' + su]._y = 149.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenO() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = true;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 526.85;
_root['coin' + co]._y = 87.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 152.15;
_root['bcoin' + bco]._y = 347.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 718.75;
_root['coin' + co]._y = 564.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 596.1;
_root['coin' + co]._y = 728.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 231.6;
_root['coin' + co]._y = 455.65 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 644.75;
_root['sushi' + su]._y = 393.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 150.95;
_root['bcoin' + bco]._y = 48.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 183.9;
_root['bcoin' + bco]._y = 124.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 161;
_root['bcoin' + bco]._y = 209.45 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 454.4;
_root['coin' + co]._y = 207.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 87.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 533.55;
_root['coin' + co]._y = 320.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 426.45;
_root['coin' + co]._y = 432.1 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 316.8;
_root['mine' + mi]._y = 290.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 333.3;
_root['coin' + co]._y = 586.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 549.15;
_root['mine' + mi]._y = 549.4 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 658.1;
_root['lilMissle' + lmis]._y = 173.05 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 744.25 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 70.09999999999999;
_root['bomb' + bo]._y = 476.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 151.15;
_root['mine' + mi]._y = 660.75 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 67;
_root['bombOmb' + bombo]._y = 136.85 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 92.15000000000001;
_root['bcoin' + bco]._y = 267.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenP() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = true;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 487.55;
_root['coin' + co]._y = 501.5 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 646.8;
_root['coin' + co]._y = 118.05 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 198.7;
_root['bcoin' + bco]._y = 153.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 59.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 496.85;
_root['coin' + co]._y = 188.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 268.05;
_root['bcoin' + bco]._y = 208.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 200.85;
_root['bcoin' + bco]._y = 244.65 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 375.85;
_root['bombOmb' + bombo]._y = 249.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 466.55;
_root['coin' + co]._y = 349.5 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 336.7;
_root['coin' + co]._y = 460.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 182.75;
_root['coin' + co]._y = 478.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 100.2;
_root['coin' + co]._y = 604.7000000000001 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 300.95;
_root['mine' + mi]._y = 643.75 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 661.8;
_root['mine' + mi]._y = 643.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 122.2;
_root['coin' + co]._y = 746.65 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 71.95;
_root['bomb' + bo]._y = 99.09999999999999 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 481.85;
_root['mine' + mi]._y = 644.75 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 133.4;
_root['bombOmb' + bombo]._y = 354.6 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 656.65;
_root['missle' + mis]._y = 369.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 268.05;
_root['bcoin' + bco]._y = 303.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenQ() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = true;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 116.85;
_root['missle' + mis]._y = 605.35 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 235.5;
_root['bombOmb' + bombo]._y = 226.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 682.35;
_root['bomb' + bo]._y = 89.90000000000001 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 121.8;
_root['sushi' + su]._y = 227.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 688.6;
_root['coin' + co]._y = 731.85 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 309.85;
_root['bomb' + bo]._y = 668.8 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 572.8;
_root['bomb' + bo]._y = 584.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 688.6;
_root['coin' + co]._y = 579.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 524.65;
_root['coin' + co]._y = 733.4500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 302.75;
_root['bcoin' + bco]._y = 422.9 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 462.2;
_root['mine' + mi]._y = 344.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 442.9;
_root['coin' + co]._y = 623.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 371.85;
_root['coin' + co]._y = 511.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 688.6;
_root['coin' + co]._y = 431.85 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 290.75;
_root['bcoin' + bco]._y = 330.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 226.95;
_root['bcoin' + bco]._y = 372.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 371.85;
_root['coin' + co]._y = 207.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 525.4500000000001;
_root['coin' + co]._y = 144.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 649.6;
_root['coin' + co]._y = 280.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 371.85;
_root['coin' + co]._y = 60 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 159.95;
_root['bcoin' + bco]._y = 321.8 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 124;
_root['bcoin' + bco]._y = 145.05 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 124;
_root['bcoin' + bco]._y = 70.40000000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenR() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
screenR = true;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 124.95;
_root['missle' + mis]._y = 513.4 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 386.8;
_root['lilMissle' + lmis]._y = 524.25 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 587.7000000000001;
_root['sushi' + su]._y = 554.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 753.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 273.45;
_root['bcoin' + bco]._y = 673.55 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 649.4500000000001;
_root['mine' + mi]._y = 688.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 488.6;
_root['coin' + co]._y = 648.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1114.65;
_root['coin' + co]._y = 579.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 493.6;
_root['coin' + co]._y = 478.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 488.6;
_root['coin' + co]._y = 343.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 263.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 273.65;
_root['coin' + co]._y = 170.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 168.7;
_root['coin' + co]._y = 81.2 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 653.25;
_root['missle' + mis]._y = 283.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 273.45;
_root['bcoin' + bco]._y = 567.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 273.45;
_root['bcoin' + bco]._y = 467.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 273.45;
_root['bcoin' + bco]._y = 367.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 168.7;
_root['coin' + co]._y = 168.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 168.7;
_root['coin' + co]._y = 258.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 276.2;
_root['coin' + co]._y = 258.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 71.2;
_root['coin' + co]._y = 81.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 71.2;
_root['coin' + co]._y = 168.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 71.2;
_root['coin' + co]._y = 258.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 467.35;
_root['mine' + mi]._y = 122.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenS() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
screenS = true;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 487.9;
_root['mine' + mi]._y = 661.15 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 311.9;
_root['mine' + mi]._y = 661.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 274.25;
_root['sushi' + su]._y = 259.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.9500000000001;
_root['coin' + co]._y = 737.85 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 631.9;
_root['bomb' + bo]._y = 141 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 133.45;
_root['coin' + co]._y = 138.05 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 133.45;
_root['coin' + co]._y = 220 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 382.05;
_root['bcoin' + bco]._y = 531.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.9500000000001;
_root['coin' + co]._y = 617.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.9500000000001;
_root['coin' + co]._y = 497.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.9500000000001;
_root['coin' + co]._y = 377.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.9500000000001;
_root['coin' + co]._y = 257.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 509.95;
_root['coin' + co]._y = 257.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 509.95;
_root['coin' + co]._y = 145.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 45.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 509.95;
_root['coin' + co]._y = 45.85 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 382.05;
_root['bcoin' + bco]._y = 437.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 274.05;
_root['bcoin' + bco]._y = 531.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 274.05;
_root['bcoin' + bco]._y = 437.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 274.05;
_root['bcoin' + bco]._y = 351.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 480.05;
_root['bcoin' + bco]._y = 531.25 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 506.8;
_root['bomb' + bo]._y = 378.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 213.45;
_root['coin' + co]._y = 138.05 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 53.45;
_root['coin' + co]._y = 138.05 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 133.45;
_root['coin' + co]._y = 58.05 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 129.9;
_root['bomb' + bo]._y = 328.9 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1194.9;
_root['mine' + mi]._y = 657.15 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 385.65;
_root['lilMissle' + lmis]._y = 252.85 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 126.2;
_root['missle' + mis]._y = 570.9500000000001 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1206.9;
_root['mine' + mi]._y = 648.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenT() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = true;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 72.05;
_root['bcoin' + bco]._y = 565.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 75.05;
_root['bcoin' + bco]._y = 79.40000000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 75.05;
_root['bcoin' + bco]._y = 147.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 71.05;
_root['bcoin' + bco]._y = 495.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 196;
_root['coin' + co]._y = 74.59999999999999 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 428.05;
_root['bcoin' + bco]._y = 280.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 358.05;
_root['bcoin' + bco]._y = 236.45 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 375.6;
_root['bombOmb' + bombo]._y = 125.8 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 620.4;
_root['missle' + mis]._y = 206.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 945.75;
_root['coin' + co]._y = 248.55 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 244;
_root['coin' + co]._y = 196.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 225.95;
_root['coin' + co]._y = 340.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 185.95;
_root['coin' + co]._y = 486.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 221.95;
_root['coin' + co]._y = 628.6 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 383;
_root['bombOmb' + bombo]._y = 630.1 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 296.05;
_root['coin' + co]._y = 754.6 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 75.15000000000001;
_root['lilMissle' + lmis]._y = 341.6 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 380.6;
_root['mine' + mi]._y = 443.8 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 77;
_root['bombOmb' + bombo]._y = 717.1 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 618.6;
_root['missle' + mis]._y = 589.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 358.05;
_root['bcoin' + bco]._y = 316.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenU() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = true;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 382.05;
_root['bcoin' + bco]._y = 494.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 93.2;
_root['mine' + mi]._y = 558.05 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 382;
_root['lilMissle' + lmis]._y = 315.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 744.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 624.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 262;
_root['coin' + co]._y = 544.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 502;
_root['coin' + co]._y = 544.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 562;
_root['coin' + co]._y = 704.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 202;
_root['coin' + co]._y = 704.65 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 675;
_root['mine' + mi]._y = 558.05 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 382.05;
_root['bcoin' + bco]._y = 124.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 582;
_root['coin' + co]._y = 424.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 162;
_root['coin' + co]._y = 424.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 242;
_root['coin' + co]._y = 294.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 522;
_root['coin' + co]._y = 296.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 702;
_root['coin' + co]._y = 344.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 42;
_root['coin' + co]._y = 344.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 122;
_root['coin' + co]._y = 204.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 642;
_root['coin' + co]._y = 204.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 702;
_root['coin' + co]._y = 84.65000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 62;
_root['coin' + co]._y = 84.65000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 242;
_root['coin' + co]._y = 120.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 522;
_root['coin' + co]._y = 120.65 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 382.05;
_root['bcoin' + bco]._y = 42.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 296.05;
_root['bcoin' + bco]._y = 434.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 472.05;
_root['bcoin' + bco]._y = 434.35 - screenNumber;
}
function makeScreenV() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = true;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 671.2000000000001;
_root['bombOmb' + bombo]._y = 124.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 400;
_root['coin' + co]._y = 312.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 690;
_root['coin' + co]._y = 310.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 544.9;
_root['coin' + co]._y = 38.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 178.95;
_root['bcoin' + bco]._y = 63.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 618.9;
_root['coin' + co]._y = 220.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 702;
_root['coin' + co]._y = 414.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 656.85;
_root['coin' + co]._y = 514.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 481.85;
_root['coin' + co]._y = 753.7000000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 78.95;
_root['bcoin' + bco]._y = 225.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 218.95;
_root['bcoin' + bco]._y = 145.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 178.95;
_root['bcoin' + bco]._y = 225.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 278.95;
_root['bcoin' + bco]._y = 225.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 544.85;
_root['coin' + co]._y = 133 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 476.9;
_root['coin' + co]._y = 216.95 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 182.95;
_root['bomb' + bo]._y = 324.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 394;
_root['coin' + co]._y = 418.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 451.85;
_root['coin' + co]._y = 510.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 547.4500000000001;
_root['mine' + mi]._y = 357.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 552.85;
_root['coin' + co]._y = 545.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 582.85;
_root['coin' + co]._y = 661.7000000000001 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 172.15;
_root['mine' + mi]._y = 458.05 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 129.15;
_root['mine' + mi]._y = 626.05 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 431.2;
_root['bombOmb' + bombo]._y = 627.2000000000001 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 117.9;
_root['sushi' + su]._y = 142.5 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 350;
_root['bomb' + bo]._y = 125.85 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 296.15;
_root['mine' + mi]._y = 572.05 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 698.2000000000001;
_root['bombOmb' + bombo]._y = 711.2000000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenW() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = true;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 150.8;
_root['bombOmb' + bombo]._y = 140.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 257.9;
_root['coin' + co]._y = 76.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 551.9;
_root['coin' + co]._y = 734.6 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 648.85;
_root['bcoin' + bco]._y = 263.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 692;
_root['bcoin' + bco]._y = 337.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 610;
_root['bcoin' + bco]._y = 340.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 152.3;
_root['mine' + mi]._y = 291.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 378.9;
_root['coin' + co]._y = 41.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 276.95;
_root['coin' + co]._y = 194.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 918.85;
_root['bcoin' + bco]._y = 297.4 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 444.2;
_root['mine' + mi]._y = 183.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 568.85;
_root['bcoin' + bco]._y = 263.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 610.8;
_root['bcoin' + bco]._y = 192.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 333.9;
_root['coin' + co]._y = 312.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 418.9;
_root['coin' + co]._y = 406.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 456.9;
_root['coin' + co]._y = 674.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 484.9;
_root['coin' + co]._y = 512.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 552.85;
_root['coin' + co]._y = 610.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 359.9;
_root['coin' + co]._y = 745.6 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 686.75;
_root['bomb' + bo]._y = 93.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 635;
_root['mine' + mi]._y = 462 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 357.9;
_root['bombOmb' + bombo]._y = 552.15 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 156.75;
_root['missle' + mis]._y = 575.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 521;
_root['bcoin' + bco]._y = 338.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenA2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = true;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 44.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 562;
_root['bcoin' + bco]._y = 266.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 625;
_root['bcoin' + bco]._y = 371.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 626;
_root['bcoin' + bco]._y = 301.45 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 156.9;
_root['coin' + co]._y = 248.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 256.9;
_root['coin' + co]._y = 148.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 502.9;
_root['coin' + co]._y = 147.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 144.95 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 646.15;
_root['mine' + mi]._y = 133.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 157;
_root['coin' + co]._y = 348.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57;
_root['coin' + co]._y = 248.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57;
_root['coin' + co]._y = 348.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57;
_root['coin' + co]._y = 448.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 157;
_root['coin' + co]._y = 448.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 561;
_root['bcoin' + bco]._y = 340.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 501;
_root['bcoin' + bco]._y = 302.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 501;
_root['bcoin' + bco]._y = 374.45 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 481;
_root['coin' + co]._y = 562.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 257;
_root['coin' + co]._y = 448.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 281;
_root['coin' + co]._y = 562.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 642.75 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = -564.6;
_root['mine' + mi]._y = 244.1 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 338.85;
_root['mine' + mi]._y = 304.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 762.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 381.05;
_root['bomb' + bo]._y = 453.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 131.2;
_root['mine' + mi]._y = 654.05 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 113;
_root['bombOmb' + bombo]._y = 142.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 636.6;
_root['missle' + mis]._y = 605.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 689;
_root['bcoin' + bco]._y = 336.45 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenB2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = true;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeCoin();
_root['coin' + co]._x = 453;
_root['coin' + co]._y = 113.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 382;
_root['coin' + co]._y = 48.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 178.65 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 402.95;
_root['bcoin' + bco]._y = 312.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 462.95;
_root['bcoin' + bco]._y = 272.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 661;
_root['coin' + co]._y = 318.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 661;
_root['coin' + co]._y = 418.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 661;
_root['coin' + co]._y = 516.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 661;
_root['coin' + co]._y = 736.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 661;
_root['coin' + co]._y = 626.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 561;
_root['coin' + co]._y = 418.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 561;
_root['coin' + co]._y = 516.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 561;
_root['coin' + co]._y = 736.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 561;
_root['coin' + co]._y = 626.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 247;
_root['coin' + co]._y = 736.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 353;
_root['coin' + co]._y = 736.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 357;
_root['coin' + co]._y = 626.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 459;
_root['coin' + co]._y = 516.65 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 557;
_root['bombOmb' + bombo]._y = 224.2 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 197;
_root['bombOmb' + bombo]._y = 544.2000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 459;
_root['coin' + co]._y = 736.65 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 664.05;
_root['mine' + mi]._y = 97.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 459;
_root['coin' + co]._y = 626.65 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 97.09999999999999;
_root['mine' + mi]._y = 677.9500000000001 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 337;
_root['bombOmb' + bombo]._y = 424.2 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 172.7;
_root['missle' + mis]._y = 225.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 462.95;
_root['bcoin' + bco]._y = 352.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenC2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = true;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 970.75;
_root['bcoin' + bco]._y = 304.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 285.05;
_root['bcoin' + bco]._y = 188.5 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 89.15000000000001;
_root['mine' + mi]._y = 482.05 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 466.95;
_root['bomb' + bo]._y = 729.55 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 464.95;
_root['lilMissle' + lmis]._y = 203.65 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 133.8;
_root['sushi' + su]._y = 186.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 466.85;
_root['coin' + co]._y = 638.7000000000001 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 263.15;
_root['mine' + mi]._y = 482.05 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 673.15;
_root['mine' + mi]._y = 482.05 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 270.85;
_root['bomb' + bo]._y = 324.9 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 274.85;
_root['bomb' + bo]._y = 54.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 215.05;
_root['bcoin' + bco]._y = 148.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 215.05;
_root['bcoin' + bco]._y = 228.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 137.05;
_root['bcoin' + bco]._y = 268.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 137.05;
_root['bcoin' + bco]._y = 108.5 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 468.85;
_root['coin' + co]._y = 480.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 470.85;
_root['coin' + co]._y = 406.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 916.65;
_root['coin' + co]._y = 114.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 634.85;
_root['coin' + co]._y = 198.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 388.85;
_root['coin' + co]._y = 490.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 544.85;
_root['coin' + co]._y = 490.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 466.85;
_root['coin' + co]._y = 558.7000000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 363.05;
_root['bcoin' + bco]._y = 188.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 363.05;
_root['bcoin' + bco]._y = 268.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 363.05;
_root['bcoin' + bco]._y = 352.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 61.05;
_root['bcoin' + bco]._y = 228.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 61.05;
_root['bcoin' + bco]._y = 308.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 61.05;
_root['bcoin' + bco]._y = 148.5 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 61.05;
_root['bcoin' + bco]._y = 68.5 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 89.15000000000001;
_root['mine' + mi]._y = 656.05 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 714.85;
_root['coin' + co]._y = 198.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 554.85;
_root['coin' + co]._y = 198.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 682.85;
_root['coin' + co]._y = 118.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 640.9;
_root['coin' + co]._y = 40.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 602.85;
_root['coin' + co]._y = 118.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 678.85;
_root['coin' + co]._y = 278.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 598.85;
_root['coin' + co]._y = 278.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 636.9;
_root['coin' + co]._y = 354.65 - screenNumber;
}
function makeScreenAa() {
screenA = false;
screenAa = true;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 381.1;
_root['bcoin' + bco]._y = 265.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 419.1;
_root['bcoin' + bco]._y = 340.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 385;
_root['coin' + co]._y = 47.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 462;
_root['coin' + co]._y = 172.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 306;
_root['coin' + co]._y = 172.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 221;
_root['coin' + co]._y = 392.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 541;
_root['coin' + co]._y = 392.65 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 125;
_root['mine' + mi]._y = 163.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 383;
_root['coin' + co]._y = 469.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 598.65 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 597.4;
_root['bomb' + bo]._y = 595.8 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 161.4;
_root['bomb' + bo]._y = 597.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 744.65 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 646;
_root['mine' + mi]._y = 168.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 339.1;
_root['bcoin' + bco]._y = 340.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenD2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = true;
screenB2 = false;
screenC2 = false;
screenD2 = true;
screenE2 = false;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 699;
_root['bombOmb' + bombo]._y = 440.2 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 308;
_root['coin' + co]._y = 53.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 279;
_root['coin' + co]._y = 171.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 275;
_root['coin' + co]._y = 308.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 439;
_root['coin' + co]._y = 673.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 216;
_root['coin' + co]._y = 413.7 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 596.9500000000001;
_root['bcoin' + bco]._y = 78.40000000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 595.9500000000001;
_root['bcoin' + bco]._y = 162.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 668.9500000000001;
_root['bcoin' + bco]._y = 286.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 598.9500000000001;
_root['bcoin' + bco]._y = 244.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 327;
_root['coin' + co]._y = 423.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 555;
_root['coin' + co]._y = 422.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 435;
_root['coin' + co]._y = 482.7 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 437;
_root['coin' + co]._y = 577.7000000000001 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 490;
_root['coin' + co]._y = 750.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 588;
_root['coin' + co]._y = 752.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 693;
_root['coin' + co]._y = 753.65 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 702;
_root['bombOmb' + bombo]._y = 567.2000000000001 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 575;
_root['bombOmb' + bombo]._y = 568.2000000000001 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 53;
_root['bombOmb' + bombo]._y = 568.2000000000001 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 178;
_root['bombOmb' + bombo]._y = 568.2000000000001 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 701.65;
_root['sushi' + su]._y = 92.40000000000001 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 710.9;
_root['bomb' + bo]._y = 193.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 126.2;
_root['mine' + mi]._y = 225.1 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 306;
_root['bombOmb' + bombo]._y = 572.2000000000001 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 436.6;
_root['missle' + mis]._y = 223.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 598.9500000000001;
_root['bcoin' + bco]._y = 332.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 182;
_root['coin' + co]._y = 748.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 79;
_root['coin' + co]._y = 744.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 281;
_root['coin' + co]._y = 747.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 388;
_root['coin' + co]._y = 750.65 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenE2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = true;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = true;
_root.makeCoin();
_root['coin' + co]._x = 561;
_root['coin' + co]._y = 602.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 64.8;
_root['coin' + co]._y = 149.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 706.8;
_root['coin' + co]._y = 149.95 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 561;
_root['coin' + co]._y = 602.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 201;
_root['coin' + co]._y = 602.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 384;
_root['coin' + co]._y = 62 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 649.7000000000001;
_root['bcoin' + bco]._y = 249.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 575.7000000000001;
_root['bcoin' + bco]._y = 267.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 629.7000000000001;
_root['bcoin' + bco]._y = 321.35 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 143;
_root['bcoin' + bco]._y = 252.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 217;
_root['bcoin' + bco]._y = 270.4 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 537.15;
_root['mine' + mi]._y = 108.1 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 120.75;
_root['bomb' + bo]._y = 446.85 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 656.75;
_root['bomb' + bo]._y = 446.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 281;
_root['coin' + co]._y = 444.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 481;
_root['coin' + co]._y = 444.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 721;
_root['coin' + co]._y = 706.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 49;
_root['coin' + co]._y = 706.65 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 381;
_root['coin' + co]._y = 746.65 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 381;
_root['bomb' + bo]._y = 589.6 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 227.15;
_root['mine' + mi]._y = 110.1 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 385;
_root['bombOmb' + bombo]._y = 284.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 163;
_root['bcoin' + bco]._y = 324.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenF2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = true;
screenH2 = false;
screenI2 = false;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 719.9500000000001;
_root['bcoin' + bco]._y = 584.9 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 379.85;
_root['lilMissle' + lmis]._y = 246.65 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 379.85;
_root['sushi' + su]._y = 54.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 739.75 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 230.25;
_root['mine' + mi]._y = 482.35 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 627.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 527.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 379.85;
_root['coin' + co]._y = 427.25 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 530.25;
_root['mine' + mi]._y = 484.85 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 612.5;
_root['bomb' + bo]._y = 273.25 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 710;
_root['bomb' + bo]._y = 273.25 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 160;
_root['bomb' + bo]._y = 273.25 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 52.5;
_root['bomb' + bo]._y = 273.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 504.85;
_root['coin' + co]._y = 739.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 504.85;
_root['coin' + co]._y = 627.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 254.85;
_root['coin' + co]._y = 739.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 254.85;
_root['coin' + co]._y = 627.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 129.85;
_root['coin' + co]._y = 739.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.85;
_root['coin' + co]._y = 739.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 629.85;
_root['coin' + co]._y = 739.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 719.9500000000001;
_root['bcoin' + bco]._y = 484.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 719.9500000000001;
_root['bcoin' + bco]._y = 384.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 644.9500000000001;
_root['bcoin' + bco]._y = 384.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 50;
_root['bcoin' + bco]._y = 584.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 50;
_root['bcoin' + bco]._y = 484.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 50;
_root['bcoin' + bco]._y = 384.9 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 125;
_root['bcoin' + bco]._y = 384.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 479.85;
_root['coin' + co]._y = 352.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 279.85;
_root['coin' + co]._y = 352.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 279.85;
_root['coin' + co]._y = 252.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 479.85;
_root['coin' + co]._y = 252.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 479.85;
_root['coin' + co]._y = 152.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 279.85;
_root['coin' + co]._y = 152.25 - screenNumber;
}
function makeScreenG2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = true;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 688.9500000000001;
_root['bcoin' + bco]._y = 422.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 608.9500000000001;
_root['bcoin' + bco]._y = 422.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 608.9500000000001;
_root['bcoin' + bco]._y = 742.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 688.9500000000001;
_root['bcoin' + bco]._y = 742.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 423.85;
_root['coin' + co]._y = 143.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 424.85;
_root['coin' + co]._y = 246.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 423.85;
_root['coin' + co]._y = 356.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 505.85;
_root['coin' + co]._y = 48.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 505.85;
_root['coin' + co]._y = 143.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 423.85;
_root['coin' + co]._y = 47.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = -233.15;
_root['coin' + co]._y = 139.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 335.85;
_root['coin' + co]._y = 144.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 333.85;
_root['coin' + co]._y = 247.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 249;
_root['coin' + co]._y = 560.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 67;
_root['coin' + co]._y = 744.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 159;
_root['coin' + co]._y = 652.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 329;
_root['coin' + co]._y = 560.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 329;
_root['coin' + co]._y = 652.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 249;
_root['coin' + co]._y = 652.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 159;
_root['coin' + co]._y = 744.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 249;
_root['coin' + co]._y = 744.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 329;
_root['coin' + co]._y = 744.6 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 648.9500000000001;
_root['bcoin' + bco]._y = 662.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 648.9500000000001;
_root['bcoin' + bco]._y = 502.3 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 688.9500000000001;
_root['bcoin' + bco]._y = 582.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 86.95;
_root['bomb' + bo]._y = 562.8 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 720.9500000000001;
_root['bomb' + bo]._y = 291.7 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 620.9500000000001;
_root['bomb' + bo]._y = 291.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 684.1;
_root['mine' + mi]._y = 141.9 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 333.85;
_root['coin' + co]._y = 356.6 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 331;
_root['coin' + co]._y = 461.6 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 507.75;
_root['sushi' + su]._y = 424.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 530.9500000000001;
_root['bomb' + bo]._y = 291.7 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 473.05;
_root['mine' + mi]._y = 564 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 185.75;
_root['missle' + mis]._y = 313.85 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 608.9500000000001;
_root['bcoin' + bco]._y = 582.3 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 980.4500000000001;
_root['missle' + mis]._y = 547.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
function makeScreenH2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = true;
screenI2 = false;
_root.makeMissle();
_root['missle' + mis]._x = 1065.45;
_root['missle' + mis]._y = 610.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 629.9500000000001;
_root['bcoin' + bco]._y = 392.4 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 163.8;
_root['missle' + mis]._y = 193.45 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 548.6;
_root['mine' + mi]._y = 208.65 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 65.09999999999999;
_root['bomb' + bo]._y = 425.7 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 702.75;
_root['sushi' + su]._y = 146.85 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 91.5;
_root['coin' + co]._y = 549.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 379.85;
_root['bomb' + bo]._y = 532.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 538.6;
_root['bomb' + bo]._y = 589.8 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 693.6;
_root['bomb' + bo]._y = 644.8 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 91.5;
_root['coin' + co]._y = 649.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 91.5;
_root['coin' + co]._y = 749.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 216.5;
_root['coin' + co]._y = 649.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 216.5;
_root['coin' + co]._y = 749.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 341.5;
_root['coin' + co]._y = 649.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 341.5;
_root['coin' + co]._y = 749.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 466.5;
_root['coin' + co]._y = 749.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 591.5;
_root['coin' + co]._y = 749.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 216.5;
_root['coin' + co]._y = 549.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 216.5;
_root['coin' + co]._y = 449.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 316.5;
_root['coin' + co]._y = 349.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 416.5;
_root['coin' + co]._y = 399.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 516.5;
_root['coin' + co]._y = 449.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 616.5;
_root['coin' + co]._y = 499.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 716.5;
_root['coin' + co]._y = 549.75 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 704.9500000000001;
_root['bcoin' + bco]._y = 442.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 704.9500000000001;
_root['bcoin' + bco]._y = 342.4 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 704.9500000000001;
_root['bcoin' + bco]._y = 242.4 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 411.5;
_root['coin' + co]._y = 277.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 411.5;
_root['coin' + co]._y = 152.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 411.5;
_root['coin' + co]._y = 47.25 - screenNumber;
}
function makeScreenI2() {
screenA = false;
screenAa = false;
screenB = false;
screenC = false;
screenD = false;
screenE = false;
screenF = false;
screenG = false;
screenH = false;
screenI = false;
screenJ = false;
screenK = false;
screenL = false;
screenM = false;
screenN = false;
screenO = false;
screenP = false;
screenQ = false;
screenR = false;
screenS = false;
screenT = false;
screenU = false;
screenV = false;
screenW = false;
screenA2 = false;
screenB2 = false;
screenC2 = false;
screenD2 = false;
screenE2 = false;
screenF2 = false;
screenG2 = false;
screenH2 = false;
screenI2 = false;
screenI2 = true;
_root.makeCoin();
_root['coin' + co]._x = 252.35;
_root['coin' + co]._y = 49.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 487.85;
_root['coin' + co]._y = 49.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 252.35;
_root['coin' + co]._y = 156.75 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 376.6;
_root['lilMissle' + lmis]._y = 201.7 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 596.05;
_root['bomb' + bo]._y = 167.5 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 485.85;
_root['coin' + co]._y = 151.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 484.85;
_root['coin' + co]._y = 262.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 587.35;
_root['coin' + co]._y = 262.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 587.35;
_root['coin' + co]._y = 362.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 615.15;
_root['bcoin' + bco]._y = 669.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 690.15;
_root['bcoin' + bco]._y = 444.95 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 690.15;
_root['bcoin' + bco]._y = 519.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 690.15;
_root['bcoin' + bco]._y = 594.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 690.15;
_root['bcoin' + bco]._y = 669.9500000000001 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 690.15;
_root['bcoin' + bco]._y = 744.9500000000001 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 543.65;
_root['mine' + mi]._y = 531.15 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 297.35;
_root['coin' + co]._y = 349.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 250.85;
_root['coin' + co]._y = 263.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 207.35;
_root['coin' + co]._y = 364.75 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 487.6;
_root['bomb' + bo]._y = 713.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 392.6;
_root['bomb' + bo]._y = 588.3 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 307.6;
_root['bomb' + bo]._y = 463.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57.35;
_root['coin' + co]._y = 449.75 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57.35;
_root['coin' + co]._y = 542.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57.35;
_root['coin' + co]._y = 642.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57.35;
_root['coin' + co]._y = 742.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 132.35;
_root['coin' + co]._y = 742.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 132.35;
_root['coin' + co]._y = 542.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 132.35;
_root['coin' + co]._y = 642.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 207.35;
_root['coin' + co]._y = 642.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 207.35;
_root['coin' + co]._y = 742.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 282.35;
_root['coin' + co]._y = 742.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 57.35;
_root['coin' + co]._y = 372.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 132.35;
_root['coin' + co]._y = 447.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 207.35;
_root['coin' + co]._y = 547.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 282.35;
_root['coin' + co]._y = 647.25 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 357.35;
_root['coin' + co]._y = 742.25 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 691.6;
_root['lilMissle' + lmis]._y = 203.2 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 112.6;
_root['bomb' + bo]._y = 263.3 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 436.15;
_root['mine' + mi]._y = 401.15 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 615.15;
_root['bcoin' + bco]._y = 744.9500000000001 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1065.45;
_root['missle' + mis]._y = 610.25 - screenNumber;
_root.makeBlueCoin();
_root['bcoin' + bco]._x = 1174.6;
_root['bcoin' + bco]._y = 36.45 - screenNumber;
_root.makeMissle();
_root['missle' + mis]._x = 1383.35;
_root['missle' + mis]._y = 316.95 - screenNumber;
_root.makeLilMissle();
_root['lilMissle' + lmis]._x = 1555;
_root['lilMissle' + lmis]._y = 491.15 - screenNumber;
_root.makeBombOmb();
_root['bombOmb' + bombo]._x = 1690.7;
_root['bombOmb' + bombo]._y = 491.15 - screenNumber;
_root.makeSushi();
_root['sushi' + su]._x = 1220.3;
_root['sushi' + su]._y = 545.3 - screenNumber;
_root.makeCoin();
_root['coin' + co]._x = 1163.3;
_root['coin' + co]._y = 112.15 - screenNumber;
_root.makeBomb();
_root['bomb' + bo]._x = 1196.05;
_root['bomb' + bo]._y = 397.35 - screenNumber;
_root.makeMine();
_root['mine' + mi]._x = 1181.7;
_root['mine' + mi]._y = 242.95 - screenNumber;
}
Color.prototype.setTint = function (r, g, b, amount) {
var v2 = new Object();
v2.ba = 100 - amount;
v2.ga = v2.ba;
v2.ra = v2.ba;
var v3 = amount / 100;
v2.rb = r * v3;
v2.gb = g * v3;
v2.bb = b * v3;
this.setTransform(v2);
};
sNum = 5.4;
pausee = false;
coinS = 0;
lowHealth = false;
DEAD = false;
EASY = true;
MEDIUMM = false;
HARD = false;
sushii = 0;
expBooster = 0;
speedd = 11;
coinRotationSpeed = 2;
gameDownSpeed = _root.speedd;
oldGameDownSpeed = _root.speedd;
pushBack = -20;
screenFrame = (30 / gameDownSpeed) * 30 / 2;
timer = 0;
screen = 8;
exp = 1500;
expCount = 0;
expTime = 300;
score = 0;
_root.particlePercent = 0;
p = 0;
th = 15600;
e = 1001;
b = 400;
bco = 12000;
co = 14000;
mi = 8000;
lmis = 9000;
mis = 9500;
bo = 7000;
su = 6000;
shot = 15000;
bombo = 5000;
pscalex = _root.particle._xscale;
s = 0;
j = 0;
sj = 0;
screenNumber = Stage.height - 10;
newRecord = false;
screenMaker = 0;
no = 0;
_root.makeScreenA();
screenA = true;
screenVar = 0;
ballb = 0;
fixer = 1;
fix = 0;
fixedWait = 0;
skinny = 0;
gapp = 0;
aj = 0;
no = 0;
loller = 0;
backToSpeed = true;
onEnterFrame = function () {
if (!Key.isDown(32) && _root.SPACLOL == true) {
_root.SPACLOL = false;
}
if (!Key.isDown(32) && TUTD == true && TUTDSPACE) {
TUTD = false;
}
if (!Key.isDown(32) && TUTD == true && TUTDENT) {
TUTD = false;
}
if (!Key.isDown(32) && TUTD == true && TUTDESC) {
TUTD = false;
}
if (!Key.isDown(32) && TUTC == true && TUTCSPACE) {
TUTC = false;
}
if (!Key.isDown(32) && TUTC == true && TUTCENT) {
TUTC = false;
}
if (!Key.isDown(32) && TUTC == true && TUTCESC) {
TUTC = false;
}
if (!Key.isDown(32) && TUTB == true && TUTBSPACE) {
TUTB = false;
}
if (!Key.isDown(32) && TUTB == true && TUTBENT) {
TUTB = false;
}
if (!Key.isDown(32) && TUTB == true && TUTBESC) {
TUTB = false;
}
if (!Key.isDown(32) && TUTA == true && TUTASPACE) {
TUTA = false;
}
if (!Key.isDown(32) && TUTA == true && TUTAENT) {
TUTA = false;
}
if (!Key.isDown(32) && TUTA == true && TUTAESC) {
TUTA = false;
}
if (coinTutDone == true) {
saveGame.data.coinTutDone = coinTutDone;
}
if (hurtTutDone == true) {
saveGame.data.hurtTutDone = hurtTutDone;
}
if (fedTutDone == true) {
saveGame.data.fedTutDone = fedTutDone;
}
if (lightTutDone == true) {
saveGame.data.lightTutDone = lightTutDone;
}
if (_root.pausee != true) {
if (_root.sushii >= 7) {
_root.sushii = 1;
}
if (_root.fat == true) {
++skinny;
}
if (_root.skinny >= 140) {
_root.sushii = 0;
_root.blink2.play();
skinny = 0;
}
if (_root.gameDownSpeed >= 20 && _root.gameDownSpeed <= 59 && player.shutDown != true) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 4;
} else {
if (_root.gameDownSpeed >= 60) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 5;
loller = 40;
} else {
if (_root.backToSpeed == true) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty;
} else {
if (_root.gameDownSpeed < 14) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 0.5;
}
if (_root.gameDownSpeed >= 14 && _root.gameDownSpeed < 16) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 1.5;
}
if (_root.gameDownSpeed >= 16 && _root.gameDownSpeed <= 18) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 1.4;
}
if (_root.gameDownSpeed >= 18 && _root.gameDownSpeed <= 20) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 1.4;
}
if (_root.gameDownSpeed >= 20 && _root.gameDownSpeed <= 22) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 0.55;
}
if (_root.gameDownSpeed >= 22 && _root.gameDownSpeed <= 24) {
thirty = 30 - gameDownSpeed / 20;
screenFrame = (30 / gameDownSpeed) * thirty + 0.25;
}
}
}
}
++expCount;
if (expCount > expTime) {
_root.makeExp();
expCount = 0;
}
++ballb;
if (ballb >= 6) {
makeBall();
ballb = 0;
}
++screenVar;
if (screenVar >= 100) {
A = false;
B = false;
C = false;
}
if (thunder == true) {
if (gameDownSpeed <= oldGameDownSpeed + 10 && !fixed) {
if (fixer <= 1) {
fixer += 5;
}
++fix;
if (fix >= 10 && !fixed) {
fixer = 1;
fixed = true;
fix = 0;
}
}
if (fixed == true) {
++fixedWait;
}
if (fixedWait >= 150) {
oldGameDownSpeed = 0;
fixed = false;
fixedWait = 0;
}
}
screenMaker += 1;
++no;
if (_root.EASY == true) {
if (screenMaker >= screenFrame - _root.sNum) {
rs = random(screen);
_root.backToSpeed = false;
if (rs == 0 && screenA != true) {
_root.makeScreenA();
screenA = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 1 && screenAa != true) {
_root.makeScreenAa();
screenAa = false;
screenMaker = 0;
no = 0;
} else {
if (rs == 2 && screenB != true) {
_root.makeScreenB();
screenB = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 3 && screenC != true && screenE != true) {
_root.makeScreenC();
screenC = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 4 && screenD != true) {
_root.makeScreenD();
screenD = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 5 && screenE != true) {
_root.makeScreenE();
screenE = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 6 && screenF != true) {
_root.makeScreenF();
screenF = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 7 && screenG != true) {
_root.makeScreenG();
screenG = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 8 && screenH != true) {
_root.makeScreenH();
screenH = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 9 && screenI != true) {
_root.makeScreenI();
screenI = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 10 && screenJ != true) {
_root.makeScreenJ();
screenJ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 11 && screenK != true) {
_root.makeScreenK();
screenK = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 12 && screenL != true) {
_root.makeScreenL();
screenL = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 13 && screenM != true) {
_root.makeScreenM();
screenM = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 14 && screenN != true) {
_root.makeScreenN();
screenN = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 15 && screenO != true) {
_root.makeScreenO();
screenO = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 16 && screenP != true) {
_root.makeScreenP();
screenP = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 17 && screenQ != true) {
_root.makeScreenQ();
screenQ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 18 && screenR != true) {
_root.makeScreenO();
screenR = true;
screenMaker = 0;
no = 0;
} else {
rs = random(screen);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
makeScreen = true;
}
}
if (_root.MEDIUMM == true) {
if (screenMaker >= screenFrame - _root.sNum) {
_root.backToSpeed = false;
rs = random(screen);
if (rs == 0 && screenF != true && _root.harder != true) {
_root.makeScreenF();
screenF = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 1 && screenG != true && _root.harder != true) {
_root.makeScreenG();
screenG = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 2 && screenH != true) {
_root.makeScreenH();
screenH = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 3 && screenI != true) {
_root.makeScreenI();
screenI = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 4 && screenJ != true) {
_root.makeScreenJ();
screenJ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 5 && screenK != true) {
_root.makeScreenK();
screenK = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 6 && screenL != true) {
_root.makeScreenL();
screenL = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 7 && screenM != true) {
_root.makeScreenM();
screenM = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 8 && screenN != true) {
_root.makeScreenN();
screenN = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 9 && screenO != true) {
_root.makeScreenO();
screenO = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 10 && screenP != true) {
_root.makeScreenP();
screenP = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 11 && screenQ != true) {
_root.makeScreenQ();
screenQ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 12 && screenR != true) {
_root.makeScreenR();
screenR = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 13 && screenS != true) {
_root.makeScreenS();
screenS = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 14 && screenT != true) {
_root.makeScreenT();
screenT = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 15 && screenU != true) {
_root.makeScreenU();
screenU = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 16 && screenV != true) {
_root.makeScreenV();
screenV = true;
screenMaker = 0;
no = 0;
} else {
rs = random(screen);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
makeScreen = true;
}
}
if (_root.HARD == true) {
if (screenMaker >= screenFrame - _root.sNum) {
_root.backToSpeed = false;
rs = random(screen);
if (rs == 0 && screenL != true && _root.harder != true) {
_root.makeScreenL();
screenL = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 1 && screenW != true && _root.harder != true) {
_root.makeScreenW();
screenW = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 2 && screenN != true && _root.harder != true) {
_root.makeScreenN();
screenN = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 3 && screenO != true && _root.harder != true) {
_root.makeScreenO();
screenO = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 4 && screenP != true && _root.evenHarder != true) {
_root.makeScreenP();
screenP = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 5 && screenQ != true && _root.evenHarder != true) {
_root.makeScreenQ();
screenQ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 6 && screenR != true && _root.evenHarder != true) {
_root.makeScreenR();
screenR = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 7 && screenS != true && _root.evenHarder != true) {
_root.makeScreenS();
screenS = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 8 && screenT != true && _root.evenHarder != true) {
_root.makeScreenT();
screenT = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 9 && screenU != true) {
_root.makeScreenU();
screenU = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 10 && screenV != true) {
_root.makeScreenV();
screenV = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 11 && screenW != true) {
_root.makeScreenW();
screenW = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 12 && screenA2 != true) {
_root.makeScreenA2();
screenA2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 13 && screenB2 != true) {
_root.makeScreenB2();
screenB2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 14 && screenC2 != true) {
_root.makeScreenC2();
screenC2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 15 && screenD2 != true) {
_root.makeScreenD2();
screenD2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 16 && screenE2 != true) {
_root.makeScreenE2();
screenE2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 17 && screenF2 != true) {
_root.makeScreenF2();
screenF2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 18 && screenG2 != true) {
_root.makeScreenG2();
screenG2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 19 && screenH2 != true) {
_root.makeScreenH2();
screenH2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 20 && screenH2 != true) {
_root.makeScreenI2();
screenI2 = true;
screenMaker = 0;
no = 0;
} else {
rs = random(screen);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
makeScreen = true;
}
}
if (_root.evenHarder == true) {
if (screenMaker >= screenFrame - _root.sNum) {
_root.backToSpeed = false;
rs = random(screen);
if (rs == 0 && screenF != true) {
_root.makeScreenF();
screenF = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 1 && screenG != true) {
_root.makeScreenG();
screenG = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 2 && screenH != true) {
_root.makeScreenH();
screenH = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 3 && screenI != true) {
_root.makeScreenI();
screenI = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 4 && screenJ != true) {
_root.makeScreenJ();
screenJ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 5 && screenK != true) {
_root.makeScreenK();
screenK = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 6 && screenL != true) {
_root.makeScreenL();
screenL = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 7 && screenM != true) {
_root.makeScreenM();
screenM = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 8 && screenN != true) {
_root.makeScreenN();
screenN = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 9 && screenO != true) {
_root.makeScreenO();
screenO = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 10 && screenP != true) {
_root.makeScreenP();
screenP = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 11 && screenQ != true) {
_root.makeScreenQ();
screenQ = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 12 && screenR != true) {
_root.makeScreenR();
screenR = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 13 && screenS != true) {
_root.makeScreenS();
screenS = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 14 && screenT != true) {
_root.makeScreenT();
screenT = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 15 && screenU != true) {
_root.makeScreenU();
screenU = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 16 && screenV != true) {
_root.makeScreenV();
screenV = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 17 && screenW != true) {
_root.makeScreenW();
screenW = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 18 && screenA2 != true) {
_root.makeScreenA2();
screenA2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 19 && screenAa != true) {
_root.makeScreenAa();
screenAa = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 20 && screenB2 != true) {
_root.makeScreenB2();
screenB2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 21 && screenC2 != true) {
_root.makeScreenC2();
screenC2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 22 && screenD2 != true) {
_root.makeScreenD2();
screenD2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 23 && screenE2 != true) {
_root.makeScreenE2();
screenE2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 24 && screenF2 != true) {
_root.makeScreenF2();
screenF2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 25 && screenG2 != true) {
_root.makeScreenG2();
screenG2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 26 && screenH2 != true) {
_root.makeScreenH2();
screenh2 = true;
screenMaker = 0;
no = 0;
} else {
if (rs == 27 && screenI2 != true) {
_root.makeScreenI2();
screenI2 = true;
screenMaker = 0;
no = 0;
} else {
rs = random(screen);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
makeScreen = true;
}
}
++sj;
++aj;
if (sj >= 27) {
if (makeScreen == true) {
makeScreen = false;
}
_root.makeStripe();
sj = 0;
}
if (aj >= 13) {
if (makeScreen == true) {
makeScreen = false;
}
_root.makeStripe();
aj = 0;
}
++j;
if (j > 4) {
_root.makeParticle();
j = 0;
}
}
};
}
movieClip 226 {
}
movieClip 227 {
instance of movieClip 226 {
onClipEvent (load) {
h = Stage.height / 2;
}
onClipEvent (enterFrame) {
if (_y + h < -400) {
_visible = false;
} else {
_visible = true;
}
}
}
instance of movieClip 226 {
onClipEvent (load) {
h = Stage.height / 2;
}
onClipEvent (enterFrame) {
if (_y + h < -50) {
_visible = false;
} else {
_visible = true;
}
}
}
}
instance bg of movieClip 227 {
onClipEvent (enterFrame) {
if (_root.pausee == true) {
this.stop();
} else {
this.play();
}
}
}
movieClip 230 {
}
instance stripe of movieClip 230 {
onClipEvent (enterFrame) {
_y = _y + 220;
if (_y >= 1000) {
this.removeMovieClip();
}
}
}
movieClip 233 {
frame 1 {
stop();
}
frame 11 {
stop();
_root.lightningStrike._x = 10000;
_root.player.la = true;
_root.lightningStrikee = true;
_root.lightningStrike.gotoAndStop(1);
}
}
instance lightningStrike of movieClip 233 {
onClipEvent (load) {
this.swapDepths(199992);
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_currentframe == 1) {
_visible == false;
} else {
_visible = true;
}
}
}
}
movieClip 236 {
}
instance ball of movieClip 236 {
onClipEvent (load) {
yspeed = 10 + _root.expBooster;
grav = 1;
_alpha = 60 + random(40);
scaley = _yscale;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
_y = _y + yspeed;
yspeed += grav;
}
if (_y >= 900) {
this.removeMovieClip();
}
}
}
movieClip 239 {
}
movieClip 240 {
frame 1 {
stop();
}
frame 50 {
gotoAndPlay(2);
}
frame 62 {
gotoAndPlay(51);
}
}
instance thunderReady of movieClip 240 {
onClipEvent (load) {
this.swapDepths(200023);
}
}
movieClip 242 {
}
instance bar of movieClip 242 {
onClipEvent (load) {
_alpha = 0;
}
}
movieClip 244 {
}
movieClip 246 {
}
movieClip 250 {
}
movieClip 274 {
frame 23 {
stop();
}
}
movieClip 276 {
}
movieClip 278 {
frame 6 {
stop();
}
}
movieClip 279 {
frame 1 {
stop();
}
}
instance bomb of movieClip 279 {
onClipEvent (load) {
_rotation = random(360);
rot = 180;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.fat == true) {
i = 15000;
while (i <= 15030) {
if (this.hitTest(_root['sushiShot' + i].area) && dead != true && touch != true) {
_root['sushiShot' + i].removeMovieClip();
_root.XX = _x;
_root.YY = _y;
_root.makeThunder();
this.gotoAndStop(3);
dead = true;
}
++i;
}
}
_y = _y + _root.gameDownSpeed;
if (_y > 925) {
this.removeMovieClip();
}
if (_currentframe == 1) {
_rotation = _rotation + _root.coinRotationSpeed;
} else {
_rotation = rot;
}
if (_root.fat != true) {
if (this.boom.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 1 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
if (_root.fat == true) {
if (this.boom.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 3 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
}
}
}
movieClip 283 {
}
movieClip 284 {
frame 1 {
stop();
}
}
instance missle of movieClip 284 {
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.fat == true) {
i = 15000;
while (i <= 15030) {
if (this.hitTest(_root['sushiShot' + i].area) && dead != true && touch != true && _root.player._y > _y) {
_root['sushiShot' + i].removeMovieClip();
_root.XX = _x;
_root.YY = _y;
_root.makeThunder();
this.gotoAndStop(3);
dead = true;
}
++i;
}
}
_y = _y + _root.gameDownSpeed;
if (_y > 1225) {
this.removeMovieClip();
}
if (_root.fat != true) {
if (this.boom.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 1 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
if (_root.fat == true) {
if (this.boom.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 3 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
}
}
}
movieClip 287 {
}
movieClip 290 {
}
movieClip 293 {
}
movieClip 296 {
}
movieClip 297 {
}
movieClip 300 {
}
movieClip 302 {
}
movieClip 303 {
}
movieClip 318 {
}
movieClip 319 {
}
movieClip 321 {
}
movieClip 323 {
}
movieClip 325 {
}
movieClip 326 {
}
movieClip 328 {
}
movieClip 329 {
}
movieClip 331 {
}
movieClip 333 {
}
movieClip 335 {
}
movieClip 337 {
}
movieClip 338 {
}
movieClip 339 {
}
movieClip 345 {
}
movieClip 347 {
}
movieClip 348 {
}
movieClip 349 {
}
movieClip 351 {
}
movieClip 354 {
frame 6 {
_parent.gotoAndStop(3);
}
}
movieClip 355 {
frame 1 {
stop();
}
instance of movieClip 297 {
onClipEvent (enterFrame) {
if (_root.pausee == true) {
this.stop();
} else {
this.play();
}
}
}
instance of movieClip 300 {
onClipEvent (enterFrame) {
if (_root.lightningStrike._currentframe > 1) {
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 303 {
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.bgChanger._currentframe != 1) {
if (_alpha < 100 && varA != true) {
_alpha = _alpha + 15;
}
if (_alpha >= 100) {
varA = true;
}
if (varA == true) {
_alpha = _alpha - 15;
}
if (_alpha <= 0 && varA == true) {
varA = false;
}
} else {
if (_alpha > 0) {
_alpha = _alpha - 4;
}
}
}
}
instance box of movieClip 321 {
onClipEvent (load) {
rot = _rotation;
}
}
instance of movieClip 326 {
onClipEvent (enterFrame) {
if (_root.lightningStrikee == true) {
_visible = true;
} else {
_visible = false;
}
}
}
frame 2 {
if (_root.hurtTut != true) {
_root.player.hurtTut = true;
}
if (_root.health.head4._currentframe == 1 && _root.health.head3._currentframe == 1 && _root.health.head2._currentframe == 1 && _root.health.head1._currentframe == 1) {
_root.head4go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head4.gotoAndStop(2);
} else {
if (_root.health.head4._currentframe == 2 && _root.health.head3._currentframe == 1 && _root.health.head2._currentframe == 1 && _root.health.head1._currentframe == 1) {
_root.head3go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head3.gotoAndStop(2);
_root.head4go = false;
_root.health.head4.head.inv._x = _root.health.head4.head.inv.xx;
} else {
if (_root.health.head4._currentframe == 2 && _root.health.head3._currentframe == 2 && _root.health.head2._currentframe == 1 && _root.health.head1._currentframe == 1) {
_root.head2go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head2.gotoAndStop(2);
_root.lowHealth = true;
_root.head4go = false;
_root.head3go = false;
_root.health.head3.head.inv._x = _root.health.head3.head.inv.xx;
} else {
if (_root.health.head4._currentframe == 2 && _root.health.head3._currentframe == 2 && _root.health.head2._currentframe == 2 && _root.health.head1._currentframe == 1) {
_root.head1go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head1.gotoAndStop(2);
_root.DEAD = true;
_root.head2go = false;
_root.head4go = false;
_root.head3go = false;
_root.health.head2.head.inv._x = _root.health.head2.head.inv.xx;
}
}
}
}
}
frame 3 {
stop();
}
frame 4 {
if (_root.health.head4._currentframe == 1 && _root.health.head3._currentframe == 1 && _root.health.head2._currentframe == 1 && _root.health.head1._currentframe == 1) {
_root.head4go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head4.gotoAndStop(2);
} else {
if (_root.health.head4._currentframe == 2 && _root.health.head3._currentframe == 1 && _root.health.head2._currentframe == 1 && _root.health.head1._currentframe == 1) {
_root.head3go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head3.gotoAndStop(2);
_root.head4go = false;
_root.health.head4.head.inv._x = _root.health.head4.head.inv.xx;
} else {
if (_root.health.head4._currentframe == 2 && _root.health.head3._currentframe == 2 && _root.health.head2._currentframe == 1 && _root.health.head1._currentframe == 1) {
_root.head2go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head2.gotoAndStop(2);
_root.lowHealth = true;
_root.head4go = false;
_root.head3go = false;
_root.health.head3.head.inv._x = _root.health.head3.head.inv.xx;
} else {
if (_root.health.head4._currentframe == 2 && _root.health.head3._currentframe == 2 && _root.health.head2._currentframe == 2 && _root.health.head1._currentframe == 1) {
_root.head1go = true;
_root.hurter._visible = true;
_root.hurter.gotoAndPlay(1);
_root.health.head1.gotoAndStop(2);
_root.DEAD = true;
_root.head2go = false;
_root.head4go = false;
_root.head3go = false;
_root.health.head2.head.inv._x = _root.health.head2.head.inv.xx;
}
}
}
}
}
instance of movieClip 354 {
onClipEvent (enterFrame) {
if (_root.pausee == true) {
this.stop();
} else {
this.play();
}
}
}
}
instance player of movieClip 355 {
onClipEvent (load) {
speed = 32;
_rotation = 0;
_x = Stage.width / 2;
rot = _rotation;
angle = 15;
rotSpeed = 6;
hurt = false;
xspeed = 0;
h = 0;
yspeed = 0;
grav = 4;
heightt = _height / 2;
easeIn = 8.300000000000001;
aa = 0;
fatt = 0;
oldGameDownSpeed = _root.speedd;
starting = 3;
_root.newGameDownSpeed = _root.speedd;
thunderTimer = 0;
shrt = 0;
short = false;
la = false;
hurtTut = false;
fedTut = false;
spaceWaiter = 0;
spaceWait = false;
deadSound = new Sound();
deadSound.attachSound('echo');
}
onClipEvent (enterFrame) {
if (!Key.isDown(32) && _root.SPACELOL == true) {
spaceWait = true;
}
if (spaceWait == true) {
++spaceWaiter;
}
if (spaceWaiter > 5) {
_root.SPACELOL = false;
spaceWait = false;
}
if (_currentframe == 1 && _root.DEAD == true or _currentframe == 3 && _root.DEAD == true) {
deadSound.start(0, 1);
_root.nextFrame();
}
if (_root.coinTut != true && _root.coinS == 1) {
_root.coinTut = true;
}
if (_currentframe == 1 && hurtTut == true) {
_root.hurtTut = true;
}
if (_root.fat == true && fedTut == true) {
_root.fedTut = true;
}
if (_root.pausee != true) {
_x = _x + xspeed;
xspeed *= 0.62;
if (_root.DEAD != true) {
_y = _y - yspeed;
} else {
_y = _y + yspeed;
}
yspeed += grav;
if (LEET == true && thunderOn == false) {
++thunderTimer;
}
if (thunderTimer >= 15) {
LEET = false;
thunderTimer = 0;
}
if (cnSwap == true) {
++_root.coinSwap;
++_root.coinSwapC;
}
if (peak == true && mScreen != true && _root.no >= 12) {
_root.screenMaker = 100000;
_root.backToSpeed = true;
mScreen = true;
}
if (_root.gameDownSpeed > 50) {
_root.backToSpeed = false;
peak = true;
}
if (shutDown == true && thunderOn == true) {
if (_root.gameDownSpeed > oldGameDownSpeed) {
_root.gameDownSpeed -= 2.3;
}
if (_root.gameDownSpeed <= oldGameDownSpeed) {
_root.gameDownSpeed = oldGameDownSpeed;
_root.lightningStrikee = false;
_root.thunderClap = false;
_root.fat = false;
_root.skinny = 0;
peak = false;
shrt = 0;
_root.coinSwap = 170000;
_root.coinSwapC = 171000;
la = false;
mScreen = false;
ala = false;
nScreen = false;
cnSwap = false;
varCA = false;
lig = false;
hold = false;
blah = false;
once = false;
thunderOn = false;
shutDown = false;
}
}
if (Key.isDown(32) && _root.thunderClap == true && lig != true && _root.DEAD != true && _root.gameDownSpeed <= 24 && _root.SPACELOL != true) {
if (blah != true) {
oldGameDownSpeed = _root.gameDownSpeed;
blah = true;
}
cnSwap = true;
LEET = true;
_root.lightningStrikee = false;
_root.lightningStrike.gotoAndPlay(1);
_root.lightningStrike._x = _root.player._x;
lig = true;
}
if (lig == true && shutDown != true && _root.lightningStrikee == true) {
LEET = true;
if (_root.gameDownSpeed < 100) {
_root.gameDownSpeed += 10;
}
}
if (!Key.isDown(32) && _root.thunderClap == true && lig == true && varCA != true && _root.lightningStrikee == true) {
_root.fat = false;
gotoAndStop(1);
varBB = false;
thunderOn = true;
shutDown = false;
_root.thunderBar.yy = 0;
_root.thunderBar.oldBar = _root.thunderBar.startBar;
LEET = true;
_root.thunderBar._alpha = 100;
short = true;
_root.bgChanger.gotoAndStop(2);
varCA = true;
}
if (short == true && _root.lightningStrikee == true && varCA == true) {
_root.bgChanger.gotoAndStop(2);
if (_root.gameDownSpeed < 100) {
_root.gameDownSpeed += 15;
}
++shrt;
_root.thunderBar._alpha = 100;
_root.thunderBar.bar._y += 3;
if (shrt >= 15) {
la = false;
shutDown = true;
short = false;
}
}
if (Key.isDown(32) && lig == true) {
if (_root.thunderClap == true) {
if (!hold && _root.lightningStrikee == true && once != true) {
_root.fat = false;
gotoAndStop(1);
varBB = false;
thunderOn = true;
shutDown = false;
_root.thunderBar.yy = 0;
_root.thunderBar.oldBar = _root.thunderBar.startBar;
LEET = true;
once = true;
}
_root.thunderBar._alpha = 100;
}
if (_root.thunderBar.bar._y < _root.thunderBar.startBar && _root.lightningStrikee == true) {
_root.thunderBar.bar._y += 4;
}
if (_root.thunderBar.bar._y >= _root.thunderBar.startBar - 20) {
_root.stopBG = true;
hold = true;
}
}
if (hold == true) {
shutDown = true;
}
if (!Key.isDown(32) && _root.gameDownSpeed > 30 && _root.bgChanger._currentframe == 1 && shrt <= 50) {
shutDown = true;
lig = false;
}
if (!Key.isDown(32) && _root.thunderClap != true && thunderOn == true && varAA != true && _root.thunderBar.bar._y > _root.thunderBar.barA._y) {
if (shutDown != true && shrt <= 50) {
shutDown = true;
}
if (_root.lightningStrike == true) {
_root.lightningStrike = false;
}
lig = false;
varAA = true;
}
if (!Key.isDown(32) && _root.thunderClap == true && varBB != true) {
if (shutDown != true) {
shutDown = true;
}
if (_root.lightningStrike == true) {
_root.lightningStrike = false;
}
la = false;
lig = false;
varBB = true;
}
if (_root.fat == true && _root.blink2._currentframe == 1) {
++fatt;
if (fatt >= starting) {
this.gotoAndStop(5);
_root.makeSushiShot();
fatt = 0;
}
}
if (_root.bar.hitTest(_x, _y, true)) {
yspeed = 0;
while (_root.bar.hitTest(_x, _y, true)) {
_y = _y + 0.1;
}
}
if (LEET != true) {
this.swapDepths(3000);
} else {
this.swapDepths(11000);
}
if (hurt == true && _root.fat != true) {
++h;
this.gotoAndStop(2);
if (h >= 13) {
this.gotoAndStop(1);
hurt = false;
h = 0;
}
}
if (hurt == true && _root.fat == true) {
++h;
this.gotoAndStop(4);
if (h >= 13) {
this.gotoAndStop(3);
hurt = false;
h = 0;
}
}
if (_x > Stage.width - 15) {
xspeed = 0;
while (_x > Stage.width - 15) {
_x = _x - 0.1;
}
}
if (_x < 21) {
xspeed = 0;
while (_x < 21) {
_x = _x + 0.1;
}
}
if (Key.isDown(39) or Key.isDown(68)) {
xspeed += easeIn;
if (_rotation < rot + angle) {
_rotation = _rotation + rotSpeed;
}
}
if (Key.isDown(37) or Key.isDown(65)) {
xspeed -= easeIn;
if (_rotation > rot - angle) {
_rotation = _rotation - rotSpeed;
}
}
if (!Key.isDown(39) && !Key.isDown(37) && !Key.isDown(65) && !Key.isDown(68)) {
if (_rotation > rot) {
_rotation = _rotation - rotSpeed;
}
if (_rotation < rot) {
_rotation = _rotation + rotSpeed;
}
}
if (Key.isDown(39) && Key.isDown(37) or Key.isDown(65) && Key.isDown(68)) {
if (_rotation > rot) {
_rotation = _rotation - rotSpeed;
}
if (_rotation < rot) {
_rotation = _rotation + rotSpeed;
}
}
}
}
}
movieClip 359 {
}
movieClip 360 {
frame 1 {
stop();
}
}
instance mine of movieClip 360 {
onClipEvent (load) {
_rotation = random(360);
rot = 180;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.fat == true) {
i = 15000;
while (i <= 15030) {
if (this.hitTest(_root['sushiShot' + i].area) && dead != true && touch != true && _root.player._y > _y) {
_root['sushiShot' + i].removeMovieClip();
_root.XX = _x;
_root.YY = _y;
_root.makeThunder();
this.gotoAndStop(3);
dead = true;
}
++i;
}
}
_y = _y + _root.gameDownSpeed;
if (_y > 925) {
this.removeMovieClip();
}
if (_currentframe == 1) {
_rotation = _rotation + _root.coinRotationSpeed;
} else {
_rotation = rot;
}
if (_root.fat != true) {
if (this.bam.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 1 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
if (_root.fat == true) {
if (this.bam.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 3 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
}
}
}
movieClip 364 {
}
movieClip 370 {
frame 9 {
stop();
}
}
instance playerExplosion of movieClip 370 {
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.player._currentframe != 2 or _root.player._currentframe != 4) {
_visible = false;
} else {
_visible = true;
}
}
}
}
movieClip 395 {
frame 2 {
sushiA = new Sound();
sushiA.attachSound('Sushi1');
sushiB = new Sound();
sushiB.attachSound('Sushi2');
sushiC = new Sound();
sushiC.attachSound('Sushi3');
sushiD = new Sound();
sushiD.attachSound('Sushi4');
sushiE = new Sound();
sushiE.attachSound('Sushi5');
sushiF = new Sound();
sushiF.attachSound('Sushi6');
sushiR = random(6);
if (_root.player.thunderOn != true) {
if (sushiR == 0) {
sushiA.start(0, 1);
}
if (sushiR == 1) {
sushiB.start(0, 1);
}
if (sushiR == 2) {
sushiC.start(0, 1);
}
if (sushiR == 3) {
sushiD.start(0, 1);
}
if (sushiR == 4) {
sushiE.start(0, 1);
}
if (sushiR == 5) {
sushiF.start(0, 1);
}
}
}
frame 3 {
_root.rings.showRings = true;
++_root.sushii;
}
frame 23 {
stop();
}
}
movieClip 396 {
frame 1 {
stop();
}
}
movieClip 399 {
frame 1 {
stop();
}
}
movieClip 402 {
frame 1 {
stop();
}
}
movieClip 403 {
frame 1 {
stop();
}
instance sushia of movieClip 396 {
onClipEvent (load) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player.LEET != true) {
this.gotoAndStop(2);
}
}
}
instance sushib of movieClip 399 {
onClipEvent (load) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player.LEET != true) {
this.gotoAndStop(2);
}
}
}
instance sushic of movieClip 402 {
onClipEvent (load) {
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player.LEET != true) {
this.gotoAndStop(2);
}
}
}
}
instance sushi of movieClip 403 {
onClipEvent (load) {
_rotation = random(360);
rot = 180;
this.gotoAndStop(random(4));
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_y > 925) {
this.gotoAndStop(random(4));
this.removeMovieClip();
}
_y = _y + _root.gameDownSpeed;
_rotation = _rotation + _root.coinRotationSpeed;
}
}
}
movieClip 408 {
}
movieClip 411 {
}
movieClip 412 {
instance of movieClip 408 {
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.sushii >= 5) {
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 408 {
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.sushii >= 1) {
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 408 {
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.sushii >= 2) {
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 408 {
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.sushii >= 3) {
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 408 {
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.sushii >= 4) {
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 408 {
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (_root.sushii >= 6) {
_root.player.fedTut = true;
_visible = true;
} else {
_visible = false;
}
}
}
instance of movieClip 411 {
onClipEvent (enterFrame) {
if (_root.sushii >= 6) {
this._visible = true;
} else {
this._visible = false;
}
}
}
}
instance rings of movieClip 412 {
onClipEvent (load) {
_alpha = 0;
this.swapDepths(289321);
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
_x = Stage.width / 2;
_y = Stage.height / 2;
if (_alpha <= 0 or _root.thunderBar._alpha > 1) {
_visible = false;
} else {
_visible = true;
}
if (_root.fat != true) {
if (_alpha >= 120) {
showRings = false;
}
if (showRings == true) {
if (_alpha < 120) {
_alpha = _alpha + 36;
}
}
if (showRings != true && _alpha > 0) {
_alpha = _alpha - 14;
}
} else {
_alpha = 0;
}
}
}
}
movieClip 415 {
frame 1 {
stop();
}
frame 2 {
_root.player.gotoAndStop(3);
}
frame 5 {
_root.player.gotoAndStop(1);
}
frame 7 {
_root.player.gotoAndStop(3);
}
frame 9 {
_root.player.gotoAndStop(1);
}
frame 11 {
_root.player.gotoAndStop(3);
}
frame 13 {
_root.player.gotoAndStop(1);
}
frame 15 {
_root.player.gotoAndStop(3);
_root.fat = true;
}
}
instance of movieClip 415 {
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.sushii >= 6 && _root.player.hurt != true && _root.fat != true && _root.player.lig != true) {
this.play();
}
if (_root.sushii >= 6 && _root.player.hurt == true && _root.fat != true && _root.player.lig != true) {
this.gotoAndPlay(1);
}
}
}
}
movieClip 418 {
}
movieClip 421 {
frame 1 {
stop();
}
}
instance sushiShot of movieClip 421 {
onClipEvent (load) {
_rotation = random(360);
rot = 180;
this.gotoAndStop(random(4));
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_name == 'sushiShot') {
_visible = false;
} else {
_visible = true;
}
if (_y < -100) {
this.removeMovieClip();
}
_y = _y - 23;
_rotation = _rotation + _root.coinRotationSpeed;
}
}
}
movieClip 423 {
frame 1 {
stop();
}
frame 2 {
_root.player.gotoAndStop(1);
}
frame 5 {
_root.player.gotoAndStop(3);
}
frame 7 {
_root.player.gotoAndStop(1);
}
frame 9 {
_root.player.gotoAndStop(3);
}
frame 11 {
_root.player.gotoAndStop(1);
}
frame 13 {
_root.player.gotoAndStop(3);
}
frame 15 {
_root.player.gotoAndStop(1);
_root.shot = 15000;
_root.fat = false;
}
}
movieClip 426 {
}
movieClip 428 {
}
movieClip 431 {
}
instance thunderBar of movieClip 431 {
onClipEvent (load) {
_alpha = 0;
this.swapDepths(297844);
num = 0;
zi = 0;
yy = 0;
oldBar = this.bar._y;
startBar = this.bar._y;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
_x = Stage.width / 2;
_y = Stage.height / 2;
if (_alpha >= 120) {
showThunder = false;
}
if (showThunder == true) {
if (_alpha < 120) {
_alpha = _alpha + 26;
}
}
if (showThunder != true && _alpha > 0 && fade != true) {
++zi;
if (zi >= 10) {
fade = true;
}
}
if (fade == true && showThunder != true && _alpha > 0) {
_alpha = _alpha - 4;
}
if (_alpha <= 0 && fade) {
zi = 0;
fade = false;
}
if (_root.player.thunderOn != true) {
if (this.bar._y <= this.barA._y && this.bar._y > this.barC._y) {
_root.thunderReady.play();
}
if (this.bar._y <= this.barA._y && this.bar._y <= this.barC._y && varGoo != true) {
_root.thunderReady.gotoAndPlay(51);
varGoo = true;
}
}
if (this.bar._y <= this.barA._y) {
if (_root.player.LEET != true) {
_root.lightTut = true;
_root.thunderClap = true;
}
} else {
varGoo = false;
_root.thunderReady.gotoAndStop(1);
_root.thunderClap = false;
}
if (_root.player.LEET != true) {
if (this.bar._y > oldBar - yy && this.bar._y > this.barB._y) {
this.bar._y -= 2;
}
}
}
}
}
movieClip 435 {
}
movieClip 436 {
frame 1 {
stop();
}
}
instance lilMissle of movieClip 436 {
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.fat == true) {
i = 15000;
while (i <= 15030) {
if (this.hitTest(_root['sushiShot' + i].area) && dead != true && touch != true && _root.player._y > _y) {
_root['sushiShot' + i].removeMovieClip();
_root.XX = _x;
_root.YY = _y;
_root.makeThunder();
this.gotoAndStop(3);
dead = true;
}
++i;
}
}
_y = _y + _root.gameDownSpeed;
if (_y > 1225) {
this.removeMovieClip();
}
if (_root.fat != true) {
if (this.base.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 1 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
if (_root.fat == true) {
if (this.base.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 3 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
}
}
}
movieClip 438 {
frame 1 {
stop();
}
frame 2 {
myColor = new Color(_root.bg);
myColor.setTint(225, 0, 0, 55);
stop();
}
frame 3 {
myColor = new Color(_root.bg);
myColor.setTint(366, 0, 0, 0);
}
frame 5 {
myColor = new Color(_root.bg);
myColor.setTint(225, 0, 0, 55);
}
frame 7 {
myColor = new Color(_root.bg);
myColor.setTint(366, 0, 0, 0);
}
frame 9 {
myColor = new Color(_root.bg);
myColor.setTint(225, 0, 0, 55);
}
frame 11 {
myColor = new Color(_root.bg);
myColor.setTint(366, 0, 0, 0);
}
frame 13 {
gotoAndStop(1);
}
}
instance bgChanger of movieClip 438 {
onClipEvent (load) {
thunder = new Sound();
thunder.attachSound('thunder');
thunder2 = new Sound();
thunder2.attachSound('thunder2');
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (Key.isDown(32) && _root.thunderClap == true && _currentframe == 1) {
thunder.start(0, 1);
this.gotoAndStop(2);
varA = false;
}
if (_root.player.shutDown == true && _currentframe == 2 && varA != true) {
thunder.start(0, 1);
this.play();
varA = true;
} else {
if (!Key.isDown(32) && _root.player.LEET != true && _currentframe == 2 or _root.lightningStrikee == false && _currentframe == 2) {
thunder.start(0, 1);
this.play();
} else {
if (_root.stopBG == true && _currentframe == 2) {
thunder.start(0, 1);
this.play();
_root.stopBG = false;
}
}
}
}
}
}
movieClip 441 {
frame 1 {
stop();
}
}
instance bombOmb of movieClip 441 {
onClipEvent (load) {
_rotation = random(360);
rot = 180;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.fat == true) {
i = 15000;
while (i <= 15030) {
if (this.hitTest(_root['sushiShot' + i].area) && dead != true && touch != true) {
_root['sushiShot' + i].removeMovieClip();
_root.XX = _x;
_root.YY = _y;
_root.makeThunder();
this.gotoAndStop(3);
dead = true;
}
++i;
}
}
_y = _y + _root.gameDownSpeed;
if (_y > 925) {
this.removeMovieClip();
}
if (_currentframe == 1) {
_rotation = _rotation + _root.coinRotationSpeed;
} else {
_rotation = rot;
}
if (_root.fat != true) {
if (this.boom.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 1 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
if (_root.fat == true) {
if (this.boom.hitTest(_root.player.box) && _currentframe != 2 && _currentframe != 3 && _root.player._currentframe == 3 && _root.player.LEET != true) {
touch = true;
this.gotoAndStop(2);
_rotation = rot;
_root.player.yspeed = _root.pushBack;
_root.makePlayerExplosion();
_root.player.hurt = true;
}
}
}
}
}
movieClip 445 {
}
movieClip 447 {
}
movieClip 450 {
}
movieClip 452 {
}
movieClip 453 {
frame 6 {
stop();
}
}
movieClip 454 {
frame 1 {
stop();
}
frame 2 {
_root.score += 1;
_root.coinS += 1;
}
}
instance coin of movieClip 454 {
onClipEvent (load) {
_rotation = random(360);
num = 11 + random(9);
_alpha = 100;
xx = 0;
varDie = false;
dd = 500;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
dis = Math.sqrt((_root.player._x - _x) * (_root.player._x - _x));
if (_root.player.thunderOn == true && _y > 50 && _root.gameDownSpeed > 50 && dis <= 230 or _root.player.short == true && _y > 100 && _root.gameDownSpeed > 50 && dis <= 230) {
FLY = true;
} else {
if (FLY != true) {
_y = _y + _root.gameDownSpeed;
_rotation = _rotation + _root.coinRotationSpeed;
if (_y > 925) {
this.removeMovieClip();
}
if (this.hitTest(_root.player.box) && _currentframe != 2) {
this.gotoAndStop(2);
}
}
}
if (FLY == true) {
if (dis >= 130) {
num += 0.03;
_x = _x + (_root.player._x - _x) / (-8.1 + num);
_y = _y + (_root.player._y - _y) / (-8.1 + num);
}
if (dis < 130) {
num -= 0.5;
_x = _x + (_root.player._x - _x) / (-8.1 + num);
_y = _y + (_root.player._y - _y) / (-8.1 + num);
}
if (_y > _root.player._y) {
_alpha = _alpha - 10;
varRM = true;
}
if (_alpha <= 10 && varRM == true) {
this.removeMovieClip();
}
if (this.hitTest(_root.player.box) && _currentframe == 1) {
this.gotoAndStop(2);
varDie = true;
}
}
if (varDie == true) {
++xx;
}
if (xx >= 30) {
this.removeMovieClip();
}
}
}
}
movieClip 457 {
}
movieClip 459 {
}
movieClip 462 {
}
movieClip 464 {
}
movieClip 466 {
}
movieClip 467 {
frame 6 {
stop();
}
}
movieClip 468 {
frame 1 {
stop();
}
frame 2 {
_root.score += 2;
}
}
instance blueCoin of movieClip 468 {
onClipEvent (load) {
_rotation = random(360);
num = 11 + random(9);
_alpha = 100;
xx = 0;
varDie = false;
dd = 500;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
dis = Math.sqrt((_root.player._x - _x) * (_root.player._x - _x));
if (_root.player.thunderOn == true && _y > 50 && _root.gameDownSpeed > 50 && dis <= 230 or _root.player.short == true && _y > 100 && _root.gameDownSpeed > 50 && dis <= 230) {
FLY = true;
} else {
if (FLY != true) {
_y = _y + _root.gameDownSpeed;
_rotation = _rotation + _root.coinRotationSpeed;
if (_y > 925) {
this.removeMovieClip();
}
if (this.hitTest(_root.player.box) && _currentframe != 2) {
this.gotoAndStop(2);
}
}
}
if (FLY == true) {
if (dis >= 130) {
num += 0.03;
_x = _x + (_root.player._x - _x) / (-8.1 + num);
_y = _y + (_root.player._y - _y) / (-8.1 + num);
}
if (dis < 130) {
num -= 0.5;
_x = _x + (_root.player._x - _x) / (-8.1 + num);
_y = _y + (_root.player._y - _y) / (-8.1 + num);
}
if (_y > _root.player._y) {
_alpha = _alpha - 10;
varRM = true;
}
if (_alpha <= 10 && varRM == true) {
this.removeMovieClip();
}
if (this.hitTest(_root.player.box) && _currentframe == 1) {
this.gotoAndStop(2);
varDie = true;
}
}
if (varDie == true) {
++xx;
}
if (xx >= 30) {
this.removeMovieClip();
}
}
}
}
movieClip 470 {
}
movieClip 471 {
instance ball of movieClip 470 {
onClipEvent (load) {
scalex = _xscale;
scaley = _yscale;
this._xscale = scalex - random(20);
_yscale = _xscale;
}
}
}
instance particle of movieClip 471 {
onClipEvent (load) {
_alpha = 100;
speed = 5 + random(4);
}
onClipEvent (enterFrame) {
_y = _y + speed;
_alpha = _alpha - 8;
if (_alpha <= 0) {
this.removeMovieClip();
}
}
}
movieClip 473 {
}
movieClip 475 {
}
instance pauser of movieClip 475 {
onClipEvent (load) {
this.swapDepths(221422);
}
onClipEvent (press) {
if (_root.pausee != true) {
_root.pausee = true;
_visible = false;
_root.pauser2._visible = true;
}
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.TUTA != true or _root.TUTB != true or _root.TUTC != true or _root.TUTD != true) {
if (Key.isDown(27) && esc != true or Key.isDown(13) && ent != true or Key.isDown(80) && pse != true) {
_root.pausee = true;
_visible = false;
_root.pauser2._visible = true;
pse = true;
esc = true;
ent = true;
}
}
} else {
if (_root.pausee == true && _root.pauser2._visible == true) {
if (Key.isDown(27) && esc != true or Key.isDown(13) && ent != true or Key.isDown(80) && pse != true) {
_root.pausee = false;
_root.pauser2._visible = false;
esc = true;
ent = true;
pse = true;
}
}
}
if (!Key.isDown(13) && ent == true) {
ent = false;
}
if (!Key.isDown(27) && esc == true) {
esc = false;
}
if (!Key.isDown(80) && pse == true) {
pse = false;
}
}
}
movieClip 478 {
}
instance speedUp of movieClip 478 {
onClipEvent (load) {
_alpha = 0;
this.swapDepths(289323);
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
_x = Stage.width / 2;
_y = Stage.height / 2;
if (_alpha <= 0 or _root.thunderBar._alpha > 1) {
_visible = false;
} else {
_visible = true;
}
if (_root.fat != true) {
if (_alpha >= 120) {
speedUpp = false;
}
if (speedUpp == true) {
if (_alpha < 120) {
_alpha = _alpha + 36;
}
}
if (speedUpp != true && _alpha > 0) {
_alpha = _alpha - 14;
}
} else {
_alpha = 0;
}
}
}
}
movieClip 480 {
}
movieClip 482 {
}
movieClip 483 {
}
instance of movieClip 483 {
onClipEvent (load) {
_visible = false;
_x = Stage.width / 2;
this.swapDepths(181422);
}
onClipEvent (enterFrame) {
if (_root.thunderReady._currentframe != 1 && !Key.isDown(32)) {
_visible = true;
} else {
_visible = false;
}
}
}
movieClip 485 {
}
instance of movieClip 485 {
onClipEvent (load) {
this.swapDepths(34432423);
_x = Stage.width / 2;
_y = Stage.height / 2;
}
onClipEvent (enterFrame) {
if (_root.firstTime != true) {
this._visible = false;
this.removeMovieClip();
} else {
this.play();
}
if (_currentframe >= 32) {
this.removeMovieClip();
this._visible = false;
}
}
}
// unknown tag 88 length 107
movieClip 489 {
}
instance of movieClip 489 {
onClipEvent (load) {
this.swapDepths(200002);
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.score < 10 && _root.score >= 0) {
this.scoree.text = '000000' + _root.score;
}
if (_root.score < 100 && _root.score >= 10) {
this.scoree.text = '00000' + _root.score;
}
if (_root.score < 1000 && _root.score >= 100) {
this.scoree.text = '0000' + _root.score;
}
if (_root.score < 10000 && _root.score >= 1000) {
this.scoree.text = '000' + _root.score;
}
}
}
}
movieClip 493 {
}
movieClip 495 {
frame 2 {
_root.speedUp.speedUpp = true;
}
frame 11 {
stop();
}
}
movieClip 496 {
frame 1 {
stop();
}
frame 2 {
_root.particlePercent += 14;
}
}
instance expBar of movieClip 496 {
onClipEvent (enterFrame) {
if (_root.pausee != true) {
_y = _y + _root.gameDownSpeed;
if (_y > 925) {
this.removeMovieClip();
}
if (this.bar.hitTest(_root.player) && _currentframe == 1) {
trace(_root.gameDownSpeed);
if (_root.gameDownSpeed < 24) {
_root.expBooster += 0.62;
_root.sNum += 0.12;
_root.gameDownSpeed += 0.62;
if (_root.player.easeIn <= 15) {
_root.player.easeIn += 0.1;
}
}
this.gotoAndStop(2);
}
}
}
}
movieClip 501 {
}
instance of movieClip 501 {
onClipEvent (load) {
this.swapDepths(200000);
minutes = 0;
seconds = 0;
ttimer = 0;
}
onClipEvent (enterFrame) {
if (seconds == _root.wholeSeconds - 30 && _root.wholeSeconds > 30) {
_root.recordd.gotime = true;
}
if (_root.rtimer <= 0) {
_root.recordd.gotime = false;
}
if (_root.pausee != true) {
++timer;
if (timer >= 30) {
if (seconds >= _root.wholeSeconds) {
++_root.wholeSeconds;
}
if (_root.recordd.gotime == true && _root.rtimer > 0) {
--_root.rtimer;
}
++seconds;
timer = 0;
}
if (minutes < 1) {
if (seconds < 10) {
this.partPer.text = '00:0' + seconds;
}
if (seconds >= 10 && seconds < 60) {
this.partPer.text = '00:' + seconds;
}
}
if (minutes >= 1) {
if (seconds < 10) {
this.partPer.text = '0' + minutes + ':0' + seconds;
}
if (seconds >= 10 && seconds < 60) {
this.partPer.text = '0' + minutes + ':' + seconds;
}
}
if (seconds >= 60) {
minutes += 1;
seconds = 0;
}
if (minutes < 1 && seconds >= 45 && _root.EASY == true) {
_root.MEDIUMM = true;
_root.screen = 12;
_root.EASY = false;
_root.HARD = false;
}
if (minutes == 1 && seconds >= 30 && _root.MEDIUMM == true) {
_root.HARD = true;
_root.screen = 11;
_root.EASY = false;
_root.MEDIUMM = false;
}
if (minutes == 1 && seconds >= 45 && varD != true) {
_root.screen += 3;
varD = true;
}
if (minutes == 2 && varLol != true) {
_root.harder = true;
_root.screen += 3;
varLol = true;
}
if (seconds > 35 && varA != true && minutes < 1) {
_root.screen += 5;
varA = true;
}
if (seconds > 25 && varB != true && minutes < 1) {
_root.screen += 2;
varB = true;
}
if (seconds > 15 && minutes == 1 && !varC) {
_root.screen += 4;
varC = true;
}
if (minutes == 2 && seconds >= 17 && varF != true) {
_root.evenHarder = true;
_root.screen += 5;
varF = true;
}
}
if (minutes == 2 && seconds > 45 && varGG != true) {
_root.evenHarder = true;
_root.screen = 28;
_root.HARD = false;
_root.MEDIUMM = false;
varGG = true;
}
if (_root.DEAD == true) {
if (_root.firstTime == false) {
if (minutes > _root.oldRecordMinute or minutes == _root.oldRecordMinute && seconds > _root.oldRecordSeconds) {
_root.newRecord = true;
}
}
_root.minutesPlayed = minutes;
_root.secondsPlayed = seconds;
if (firstTime == true) {
_root.newRecord = true;
}
}
}
}
movieClip 504 {
}
movieClip 505 {
frame 2 {
stop();
}
}
movieClip 506 {
}
movieClip 508 {
}
movieClip 509 {
frame 5 {
stop();
_parent._parent.removeMovieClip();
}
}
movieClip 510 {
frame 1 {
stop();
}
frame 2 {
_root.thunderBar.oldBar = _root.thunderBar.bar._y;
if (_root.thunderBar.bar._y > _root.thunderBar.barA._y) {
_root.thunderBar.yy += 3;
} else {
_root.thunderBar.yy += 0.2;
}
_root.thunderBar.showThunder = true;
}
}
instance lightBody of movieClip 510 {
onClipEvent (load) {
num = 20;
xx = 0;
varDie = false;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_name == 'lightBody') {
_visible = false;
} else {
_visible = true;
}
if (_name != 'lightBody') {
dis = Math.sqrt((_root.player._x - _x) * (_root.player._x - _x) + (_root.player._y - _y) * (_root.player._y - _y));
num += 0.03;
if (dis > 130) {
_x = _x + (_root.player._x - _x) / (-8.1 + num);
_y = _y + (_root.player._y - _y) / (-8.1 + num);
}
if (dis < 130) {
if (_currentframe <= 5) {
this.light.gotoAndStop(1);
}
if (num < -4.5) {
num += 0.05;
}
_x = _x + (_root.player._x - _x) / (-8.1 + num);
_y = _y + (_root.player._y - _y) / (-8.1 + num);
}
}
if (this.hitTest(_root.player.box) && _currentframe == 1) {
this.gotoAndStop(2);
varDie = true;
}
if (varDie == true) {
++xx;
}
if (xx >= 30) {
this.removeMovieClip();
}
}
}
}
movieClip 513 {
}
movieClip 514 {
frame 1 {
stop();
}
instance of movieClip 513 {
onClipEvent (enterFrame) {
if (_root.rtimer >= 10) {
this.timerr.text = '00:' + _root.rtimer;
} else {
this.timerr.text = '00:0' + _root.rtimer;
}
}
}
}
instance recordd of movieClip 514 {
onClipEvent (load) {
_x = Stage.width / 2;
_y = Stage.height / 2;
this.swapDepths(3422347);
_alpha = 0;
newrec = new Sound();
newrec.attachSound('newrec');
}
onClipEvent (enterFrame) {
if (_root.rtimer == 0 && newre != true) {
newrec.start(0, 1);
newre = true;
}
if (_root.rtimer >= 0) {
if (gotime != true) {
if (_alpha > 0) {
_alpha = _alpha - 25;
}
}
if (gotime == true) {
if (_alpha < 60) {
_alpha = _alpha + 20;
}
}
}
}
}
movieClip 515 {
}
movieClip 516 {
}
movieClip 517 {
}
movieClip 518 {
}
movieClip 520 {
}
movieClip 521 {
}
movieClip 523 {
}
movieClip 524 {
instance inv of movieClip 521 {
onClipEvent (load) {
_root.head4go = true;
xx = _x;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.head4go != true) {
lol = false;
}
if (_root.head4go == true) {
_x = _x + 1;
if (_x > xx + 140) {
lol = true;
}
if (lol == true) {
_root.health.healthUp4.yay = true;
_x = xx;
_parent._parent.gotoAndStop(1);
}
}
}
}
}
}
movieClip 525 {
frame 1 {
stop();
}
instance of movieClip 518 {
onClipEvent (enterFrame) {
if (_root.head4go == true) {
_root.head4go = false;
}
}
}
}
movieClip 526 {
instance inv of movieClip 521 {
onClipEvent (load) {
_root.head3go = true;
xx = _x;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.head3go == true) {
_x = _x + 1;
if (_x > _parent.bar._x) {
_root.head4go = true;
_root.health.healthUp3.play();
_parent._parent.gotoAndStop(1);
}
}
}
}
}
}
movieClip 527 {
frame 1 {
stop();
}
}
movieClip 528 {
instance inv of movieClip 521 {
onClipEvent (load) {
_root.head2go = true;
xx = _x;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.head2go == true) {
_x = _x + 1;
if (_x > _parent.bar._x) {
_root.head3go = true;
_root.health.healthUp2.play();
_parent._parent.gotoAndStop(1);
}
}
}
}
}
}
movieClip 529 {
frame 1 {
stop();
}
}
movieClip 530 {
instance inv of movieClip 521 {
onClipEvent (load) {
_root.head1go = true;
xx = _x;
}
onClipEvent (enterFrame) {
if (_root.pausee != true) {
if (_root.head1go == true) {
_x = _x + 1;
if (_x > _parent.bar._x) {
_root.head2go = true;
_root.health.healthUp1.play();
_parent._parent.gotoAndStop(1);
}
}
}
}
}
}
movieClip 531 {
frame 1 {
stop();
}
}
movieClip 532 {
}
movieClip 533 {
}
movieClip 534 {
}
movieClip 535 {
}
movieClip 536 {
}
movieClip 542 {
frame 1 {
stop();
}
frame 7 {
gotoAndStop(1);
}
}
movieClip 544 {
frame 1 {
stop();
}
frame 7 {
stop();
}
}
movieClip 545 {
instance healthUp2 of movieClip 542 {
onClipEvent (enterFrame) {
if (this._currentframe >= 7 && _root.lowHealth == true) {
_root.lowHealth = false;
}
}
}
instance healthUp4 of movieClip 544 {
onClipEvent (load) {
i = 0;
this.swapDepths(324325);
gameStart = 0;
}
onClipEvent (enterFrame) {
++gameStart;
if (gameStart >= 15) {
gameStart = 25;
}
if (yay == true && _currentframe == 1 && gameStart >= 20) {
this.play();
}
if (yay == true) {
++i;
}
if (i >= 50) {
this.gotoAndStop(1);
yay = false;
i = 0;
}
}
}
}
instance health of movieClip 545 {
onClipEvent (load) {
this.swapDepths(200003);
}
}
movieClip 548 {
}
movieClip 550 {
}
instance of movieClip 550 {
onClipEvent (enterFrame) {
if (_alpha < 0) {
_visible = false;
} else {
_visible = true;
}
this.swapDepths(196978);
if (_root.lowHealth == true) {
if (_alpha < 100) {
_alpha = _alpha + 25;
}
this.play();
} else {
if (_alpha > 0) {
_alpha = _alpha - 13;
}
this.gotoAndStop(1);
}
}
}
movieClip 551 {
frame 12 {
stop();
}
}
instance hurter of movieClip 551 {
onClipEvent (load) {
_visible = false;
}
}
movieClip 554 {
}
movieClip 556 {
}
movieClip 558 {
}
movieClip 559 {
}
movieClip 560 {
}
movieClip 561 {
}
movieClip 564 {
}
movieClip 565 {
}
movieClip 571 {
}
movieClip 575 {
}
movieClip 577 {
}
movieClip 578 {
}
movieClip 579 {
}
movieClip 580 {
}
movieClip 581 {
}
movieClip 582 {
}
movieClip 583 {
}
movieClip 585 {
}
movieClip 588 {
}
movieClip 589 {
}
instance cTut of movieClip 589 {
onClipEvent (load) {
_x = Stage.width / 2;
this.swapDepths(300001);
yspeed = 6;
grav = 0;
}
onClipEvent (enterFrame) {
if (_root.coinTutDone != true) {
if (_root.coinTut == true && _y > Stage.height / 2) {
_y = _y - yspeed;
yspeed += grav;
grav = 1;
_root.pausee = true;
yspeed += 7;
}
if (_y <= Stage.height / 2) {
_y = Stage.height / 2;
varYay = true;
yspeed = 0;
}
if (varA == true) {
_root.SPACLOL = false;
this.removeMovieClip();
}
}
if (Key.isDown(32) && _root.coinTut == true && varYay == true && space != true) {
_root.coinTutDone = true;
_root.TUTASPACE = true;
_root.TUTA = true;
_root.SPACELOL = true;
coinTutDone = true;
_root.saveGame.data.coinTutDone = _root.coinTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(13) && _root.coinTut == true && varYay == true && space != true) {
_root.coinTutDone = true;
_root.TUTA = true;
_root.TUTAENT = true;
coinTutDone = true;
_root.saveGame.data.coinTutDone = _root.coinTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(27) && _root.coinTut == true && varYay == true && space != true) {
_root.TUTA = true;
_root.TUTAESC = true;
_root.coinTutDone = true;
coinTutDone = true;
_root.saveGame.data.coinTutDone = _root.coinTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
}
onClipEvent (press) {
if (_root.coinTut == true && varYay == true) {
_root.coinTutDone = true;
coinTutDone = true;
_root.saveGame.data.coinTutDone = _root.coinTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
}
}
}
movieClip 591 {
}
movieClip 593 {
}
instance pauser2 of movieClip 593 {
onClipEvent (press) {
if (_visible == true && _root.pausee == true) {
this._visible = false;
_root.pausee = false;
}
}
onClipEvent (enterFrame) {
if (_visible == true) {
_root.pauser._visible = false;
}
if (_visible == false) {
_root.pauser._visible = true;
}
}
onClipEvent (load) {
_visible = false;
this.swapDepths(1000000000);
}
}
movieClip 594 {
}
instance of movieClip 594 {
onClipEvent (load) {
this.swapDepths(1000000001);
}
onClipEvent (enterFrame) {
if (_root.pauser2._visible != true) {
_visible = false;
} else {
_visible = true;
}
}
}
movieClip 595 {
}
movieClip 596 {
}
movieClip 597 {
}
movieClip 598 {
}
movieClip 599 {
}
movieClip 600 {
}
movieClip 601 {
frame 1 {
stop();
}
}
movieClip 602 {
}
movieClip 603 {
}
movieClip 606 {
}
movieClip 609 {
}
movieClip 611 {
}
movieClip 612 {
}
movieClip 613 {
}
instance hTut of movieClip 613 {
onClipEvent (load) {
_x = Stage.width / 2;
this.swapDepths(300002);
yspeed = 6;
grav = 0;
}
onClipEvent (enterFrame) {
if (_root.hurtTutDone != true) {
if (_root.hurtTut == true && _y > Stage.height / 2) {
_y = _y - yspeed;
yspeed += grav;
grav = 1;
_root.pausee = true;
yspeed += 7;
}
if (_y <= Stage.height / 2) {
_y = Stage.height / 2;
varYay = true;
yspeed = 0;
}
if (varA == true) {
_root.SPACLOL = false;
this.removeMovieClip();
}
}
if (Key.isDown(32) && _root.hurtTut == true && varYay == true && space != true) {
_root.hurtTutDone = true;
_root.TUTBSPACE = true;
_root.TUTB = true;
_root.SPACELOL = true;
hurtTutDone = true;
_root.saveGame.data.hurtTutDone = _root.hurtTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(13) && _root.hurtTut == true && varYay == true && space != true) {
_root.hurtTutDone = true;
_root.TUTB = true;
_root.TUTBENT = true;
hurtTutDone = true;
_root.saveGame.data.hurtTutDone = _root.hurtTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(27) && _root.hurtTut == true && varYay == true && space != true) {
_root.TUTB = true;
_root.TUTBESC = true;
_root.hurtTutDone = true;
hurtTutDone = true;
_root.saveGame.data.hurtTutDone = _root.hurtTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
}
onClipEvent (press) {
if (_root.hurtTut == true && varYay == true) {
_root.hurtTutDone = true;
hurtTutDone = true;
_root.saveGame.data.hurtTutDone = _root.hurtTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
}
}
}
movieClip 615 {
}
movieClip 616 {
}
movieClip 617 {
}
movieClip 618 {
}
movieClip 619 {
}
movieClip 621 {
}
movieClip 625 {
}
movieClip 626 {
}
movieClip 627 {
}
instance fTut of movieClip 627 {
onClipEvent (load) {
_x = Stage.width / 2;
this.swapDepths(300003);
yspeed = 6;
grav = 0;
}
onClipEvent (enterFrame) {
if (_root.fedTutDone != true) {
if (_root.fedTut == true && _y > Stage.height / 2) {
_y = _y - yspeed;
yspeed += grav;
grav = 1;
_root.pausee = true;
yspeed += 7;
}
if (_y <= Stage.height / 2) {
_y = Stage.height / 2;
varYay = true;
yspeed = 0;
}
if (varA == true) {
_root.SPACLOL = false;
this.removeMovieClip();
}
}
if (Key.isDown(32) && _root.fedTut == true && varYay == true && space != true) {
_root.fedTutDone = true;
_root.TUTCSPACE = true;
_root.TUTC = true;
_root.SPACELOL = true;
fedTutDone = true;
_root.saveGame.data.fedTutDone = _root.fedTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(13) && _root.fedTut == true && varYay == true && space != true) {
_root.fedTutDone = true;
_root.TUTC = true;
_root.TUTCENT = true;
fedTutDone = true;
_root.saveGame.data.fedTutDone = _root.fedTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(27) && _root.fedTut == true && varYay == true && space != true) {
_root.TUTC = true;
_root.TUTCESC = true;
_root.fedTutDone = true;
fedTutDone = true;
_root.saveGame.data.fedTutDone = _root.fedTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
}
onClipEvent (press) {
if (_root.fedTut == true && varYay == true) {
_root.fedTutDone = true;
fedTutDone = true;
_root.saveGame.data.fedTutDone = _root.fedTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
}
}
}
movieClip 628 {
}
movieClip 629 {
}
movieClip 630 {
}
movieClip 631 {
}
movieClip 632 {
}
movieClip 635 {
}
movieClip 637 {
}
movieClip 640 {
}
movieClip 641 {
}
instance lTut of movieClip 641 {
onClipEvent (load) {
_x = Stage.width / 2;
this.swapDepths(300004);
yspeed = 6;
grav = 0;
}
onClipEvent (enterFrame) {
if (_root.lightTutDone != true) {
if (_root.lightTut == true && _y > Stage.height / 2) {
_y = _y - yspeed;
yspeed += grav;
grav = 1;
_root.pausee = true;
yspeed += 7;
}
if (_y <= Stage.height / 2) {
_y = Stage.height / 2;
varYay = true;
yspeed = 0;
}
if (varA == true) {
this.removeMovieClip();
}
}
if (Key.isDown(32) && _root.lightTut == true && varYay == true && space != true && _root.firstTime == true) {
_root.lightTutDone = true;
_root.TUTDSPACE = true;
_root.TUTD = true;
_root.SPACELOL = true;
lightTutDone = true;
_root.saveGame.data.lightTutDone = _root.lightTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(13) && _root.lightTut == true && varYay == true && space != true) {
_root.lightTutDone = true;
_root.TUTD = true;
_root.TUTDENT = true;
lightTutDone = true;
_root.saveGame.data.lightTutDone = _root.lightTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
if (Key.isDown(27) && _root.lightTut == true && varYay == true && space != true) {
_root.TUTD = true;
_root.TUTDESC = true;
_root.lightTutDone = true;
lightTutDone = true;
_root.saveGame.data.lightTutDone = _root.lightTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
space = true;
}
}
onClipEvent (press) {
if (_root.lightTut == true && varYay == true) {
_root.lightTutDone = true;
lightTutDone = true;
_root.saveGame.data.lightTutDone = _root.lightTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
}
}
}
frame 4 {
for (i in _root) {
_root[i].removeMovieClip();
}
stopAllSounds();
nextFrame();
}
instance lTut of movieClip 641 {
onClipEvent (load) {
_x = Stage.width / 2;
this.swapDepths(300004);
yspeed = 6;
grav = 0;
}
onClipEvent (enterFrame) {
if (_root.lightTutDone != true) {
if (_root.lightTut == true && _y > Stage.height / 2) {
_y = _y - yspeed;
yspeed += grav;
grav = 1;
_root.pausee = true;
yspeed += 7;
}
if (_y <= Stage.height / 2) {
_y = Stage.height / 2;
varYay = true;
yspeed = 0;
}
if (varA == true) {
this.removeMovieClip();
}
}
}
onClipEvent (press) {
if (_root.lightTut == true && varYay == true) {
_root.lightTutDone = true;
lightTutDone = true;
_root.saveGame.data.lightTutDone = _root.lightTutDone;
_root.button.start(0, 1);
_root.pausee = false;
_visible = false;
varA = true;
}
}
}
movieClip 644 {
}
movieClip 646 {
frame 47 {
_root.nextFrame();
}
}
frame 6 {
if (_root.firstTime == true) {
_root.newRecord = true;
}
saveGame.data.firstTime = false;
if (_root.newRecord == true) {
saveGame.data.wholeSeconds = _root.wholeSeconds;
saveGame.data.oldRecordMinute = _root.minutesPlayed;
saveGame.data.oldRecordSeconds = _root.secondsPlayed;
}
if (_root.secondsPlayed >= 10) {
newrecord.text = _root.minutesPlayed + ':' + _root.secondsPlayed;
} else {
newrecord.text = _root.minutesPlayed + ':0' + _root.secondsPlayed;
}
if (_root.firstTime != true) {
if (_root.newRecord != true) {
if (_root.oldRecordSeconds >= 10) {
oldRecord.text = _root.oldRecordMinute + ':' + _root.oldRecordSeconds;
} else {
oldRecord.text = _root.oldRecordMinute + ':0' + _root.oldRecordSeconds;
}
} else {
if (_root.secondsPlayed >= 10) {
oldRecord.text = _root.minutesPlayed + ':' + _root.secondsPlayed;
} else {
oldRecord.text = _root.minutesPlayed + ':0' + _root.secondsPlayed;
}
}
}
if (_root.firstTime == true) {
if (_root.secondsPlayed >= 10) {
oldRecord.text = _root.minutesPlayed + ':' + _root.secondsPlayed;
} else {
oldRecord.text = _root.minutesPlayed + ':0' + _root.secondsPlayed;
}
}
}
frame 6 {
stop();
}
movieClip 647 {
}
movieClip 648 {
}
movieClip 649 {
}
movieClip 650 {
}
movieClip 651 {
}
movieClip 659 {
}
movieClip 661 {
}
movieClip 663 {
}
movieClip 665 {
}
movieClip 667 {
}
instance of movieClip 667 {
onClipEvent (enterFrame) {
if (_root.newRecord == true) {
_alpha = 100;
} else {
_alpha = 0;
}
}
}
instance of movieClip 667 {
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.newRecord == true) {
if (_alpha < 100 && varA != true) {
_alpha = _alpha + 10;
}
if (_alpha >= 100) {
varA = true;
}
if (_alpha > 0 && varA == true) {
_alpha = _alpha - 10;
}
if (_alpha <= 0 && varA) {
varA = false;
}
} else {
_alpha = 0;
}
}
}
movieClip 671 {
}
movieClip 673 {
}
movieClip 676 {
}
movieClip 678 {
}
button 685 {
on (press) {
if (_root.fat == true) {
_root.fat = false;
}
_root.gotoAndStop(2);
}
}
button 687 {
on (press) {
getURL('http://itunes.apple.com/us/app/sushi-boy-thunder/id445672876?ls=1&mt=8', '_blank');
}
}
button 691 {
on (press) {
getURL('http://itunes.apple.com/us/app/sushi-boy-thunder/id445672876?mt=8', '_blank');
}
}
movieClip 695 {
}
button 697 {
on (press) {
getURL('http://truedarkness.newgrounds.com/flash', '_blank');
}
}
movieClip 700 {
frame 17 {
stop();
}
}