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

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

lfmPlayer.swf

This is the info page for
Flash #43819

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


Text
You need a newer version of Adobe Flash

You will need this to listen to music and watch videos on Last.fm

Click here to get it

this frame is an asset dump. app imports all classes and movieclips in this frame.
just dump stuff anywhere. go wild.

Back

subscribe to last.fm to toggle shuffle mode

Buy

ActionScript [AS1/AS2]

Frame 1
function loadApp() { this.loader.run(); } Stage.scaleMode = "noScale"; System.security.allowDomain("alpha.last.fm", "www.dev.last.fm", "www.staging.last.fm", "beta.staging.last.fm", "beta.last.fm", "static.last.fm", "cdn.last.fm", "www.last.fm", "www.lastfm.es", "www.lastfm.it", "www.lastfm.fr", "www.lastfm.co.kr", "www.lastfm.de", "www.lastfm.jp", "www.lastfm.pl", "www.lastfm.pt", "www.lastfm.ru", "www.lastfm.se", "www.lastfm.com.tr", "cn.last.fm", "https://www.last.fm", "https://beta.staging.last.fm", "http://83.142.226.211:4040", "http://83.142.226.211", "http://cdn.last.fm", "http://87.117.229.54", "87.117.229.54", "fod.dev.audioscrobbler.com", "anil.staging.last.fm", "anil.dev.last.fm", "petgru.dev.last.fm"); version = System.capabilities.version; var firstspace = version.indexOf(" "); _global.version_number = parseInt(version.substring(firstspace + 1, firstspace + 2)); _global.mainTimeline = this; mainTimeline = this; if (_global.noRestart) { stop(); } this.loader.run = function () { this.fadeIn(); this.loadApp(); }; this.loader.loadApp = function () { this.onEnterFrame = function () { var _local3 = mainTimeline.getBytesLoaded(); var _local2 = mainTimeline.getBytesTotal(); if ((_local3 < _local2) && (_local2 > 50)) { percentageOutput = Math.floor((_local3 / _local2) * 100); this.gotoAndStop(percentageOutput); } else { this.onEnterFrame = null; if ((version_number < 9) && (version_number != 1)) { mainTimeline.gotoAndStop("version"); stop(); } else { mainTimeline.gotoAndStop("app"); return(undefined); } } }; }; this.loader.fadeIn = function () { this.onEnterFrame = function () { if (this._alpha < 95) { this._alpha = this._alpha + 10; } else { this.onEnterFrame = null; return(undefined); } }; }; loadApp(); stop();
Frame 3
this.bg.onRelease = function () { getURL ("http://www.adobe.com/products/flashplayer/", "_blank"); }; stop();
Frame 4
Frame 5
var flashVars = ["radioURL", "restTitle", "albumArt", "lang", "autostart", "resourceID", "resourceType", "popup", "viral", "url", "FOD", "resourceID", "resourceType", "disabled", "resname", "expanded", "artist", "restype", "lfmMode"]; var i = 0; while (i < flashVars.length) { var flashvar = flashVars[i]; if (mainTimeline[flashvar] != undefined) { _global[flashvar] = mainTimeline[flashvar]; } i++; } _global.DEBUG_MODE = 0; DEVELOPMENT_SERVER = 0; _global.PLAYLIST_MODE = "playlist"; _global.RADIO_MODE = "radio"; _global.EMBED_RADIO_MODE = "embed_radio"; _global.EXPANDED_MODE = "expanded"; _global.SHUFFLE_MODE = "shuffle"; _global.SHUFFLE_PLAYLIST_MODE = "shuffle_playlist"; _global.DEFAULT_MODE = _global.PLAYLIST_MODE; if (!_global.lfmMode) { _global.lfmMode = _global.DEFAULT_MODE; } if (!metadata) { _global.metadata = false; } Chaining = _root.chaining; _global.ModeFeature = {shuffle:{Radio:true, Scrobble:true, StationCreation:CREATE_A_STATION, Skip:SKIP_RESTRICTION, Metadata:metadata, Viewport:true, OnDemand:false, FOD:false, Shuffle:true, Expanded:expanded}, radio:{Radio:true, Scrobble:true, StationCreation:CREATE_A_STATION, Toolbar:true, Skip:SKIP_RESTRICTION, Expanded:expanded}, playlist:{Scrobble:true, OnDemand:true, FOD:FOD, Chaining:Chaining, Viewport:true, Expanded:expanded}, embed_radio:{Radio:true, Scrobble:true, StationCreation:CREATE_A_STATION, Toolbar:true, Skip:SKIP_RESTRICTION}}; _global.Mode = {Viral:viral, Autostart:autostart, Popup:popup, Userprofile:userprofile, Lang:lfmLanguage}; _global.initResourceType = resourceType; _global.initResourceID = resourceID; _global.COLOR_INACTIVE = 13421772 /* 0xCCCCCC */; _global.COLOR_ACTIVE = 3355443 /* 0x333333 */; _global.COLOR_STATUS = 6710886 /* 0x666666 */; _global.COLOR_HOVER = 10066329 /* 0x999999 */; _global.COLOR_BUTTON = 16777215 /* 0xFFFFFF */; _global.COLOR_TOOLBAR_BUTTON = 7368816 /* 0x707070 */; COLOR_TRACK_STATUS_MSG = "#666666"; COLOR_STATUS_MSG = "#CCCCCC"; COLOR_TRACK_MSG = "#000000"; COLOR_LIGHT_MSG = "#FFFFFF"; COLOR_ACTIVE_MSG = "#333333"; _global.style.setStyle("themeColor", 16777215); String.prototype.replace = function (pattern, replacement) { return(this.split(pattern).join(replacement)); }; String.prototype.stripWhitespace = function (options) { var _local2 = this; if ((options == undefined) || (options.indexOf("t", 0) > -1)) { _local2 = _local2.split("\t").join(" "); } if ((options == undefined) || (options.indexOf("r", 0) > -1)) { _local2 = _local2.split("\r").join(" "); } if ((options == undefined) || (options.indexOf("n", 0) > -1)) { _local2 = _local2.split(newline).join(" "); } if ((options == undefined) || (options.indexOf("s", 0) > -1)) { _local2 = _local2.split(" "); for (idx in _local2) { if (_local2[idx].length == 0) { _local2.splice(idx, 1); } } _local2 = _local2.join(" "); } return(_local2); }; String.prototype.createRandomString = function (len) { var _local4 = ""; var _local2; var _local6; var _local3 = new Date().getTime().toString(); if (len == undefined) { len = _local3.length; } var _local1 = len; while (_local1 > 0) { _local2 = Math.floor(Math.random() * 36).toString(36); if (Math.random() > 0.5) { _local2 = _local2.toUpperCase(); } if (_local3.charAt(_local1) != ".") { _local4 = _local4 + (_local3.charAt(_local1) + _local2); } _local1--; } return(_local4); }; String.prototype.randomiseString = function () { var _local4; var _local5 = ""; var _local2 = this.split(""); var _local3 = _local2.length; while (_local3) { _local4 = Math.floor(Math.random() * _local2.length); _local5 = _local5 + _local2[_local4]; _local2.splice(_local4, 1); _local3--; } return(_local5); }; String.prototype.createUniqueID = function (len) { var _local2 = this.createRandomString(); if (len == undefined) { len = 16; } if (_local2.length < len) { _local2 = _local2 + this.createRandomString(); } _local2 = _local2.substr(0, len); return(_local2.randomiseString()); }; ASSetPropFlags(String, "createUniqueID", 1); ASSetPropFlags(String.prototype, "randomiseString", 1); String.prototype.trim = function () { var _local2 = this; if (_local2.indexOf(" ") >= 0) { while (_local2.indexOf(" ") != -1) { _local2 = _local2.replace(" ", " "); } } if (_local2.indexOf(" ") == 0) { while (_local2.indexOf(" ") == 0) { _local2 = _local2.substring(1, _local2.length); } } if (_local2.indexOf(" ") == (_local2.length - 1)) { while (_local2.indexOf(" ") == (_local2.length - 1)) { _local2 = _local2.substring(0, _local2.length - 1); } } return(_local2); }; String.prototype.capitalize = function () { return(this.capitalizeLetter(0)); }; String.prototype.decapitalize = function () { return(this.capitalizeLetter(0, false)); }; String.prototype.capitalizeLetter = function (pos, capitalise) { var _local2 = this.substr(pos, pos + 1); if (capitalise == false) { var _local4 = _local2.toLowerCase(); } else { var _local4 = _local2.toUpperCase(); } return(_local4 + this.substr(pos + 1)); }; String.prototype.truncate = function (offset, epsilon) { if (epsilon == undefined) { epsilon = "..."; } if (offset > this.length) { return(this); } var _local3 = this.indexOf(" ", offset); if (_local3) { return(this.substr(0, _local3) + epsilon); } var _local4 = this.substr(0, offset); return(this.substr(0, _local4.lastIndexOf(" ")) + epsilon); }; String.prototype.urldecode = function () { string = this.replace("%20", " "); string = string.replace("%23", "#"); string = string.replace("%24", "$"); string = string.replace("%25", "%"); string = string.replace("%26", "&"); string = string.replace("%27", "'"); string = string.replace("%2B", "+"); string = string.replace("%2C", ","); string = string.replace("%2D", "-"); string = string.replace("%2E", "."); string = string.replace("%2F", "/"); string = string.replace("%3A", ":"); string = string.replace("%3B", ";"); string = string.replace("%3C", "< "); string = string.replace("%3D", "="); string = string.replace("%3E", ">"); string = string.replace("%3F", "?"); string = string.replace("%40", "@"); string = string.replace("%5B", "["); string = string.replace("%5C", "\\"); string = string.replace("%5D", "]"); string = string.replace("%5E", "^"); string = string.replace("%5F", "_"); string = string.replace("%60", "`"); string = string.replace("%7B", "{"); string = string.replace("%7C", "|"); string = string.replace("%7D", "}"); string = string.replace("%7E", "~"); return(string); }; String.prototype.md5 = function () { function safe_add(x, y) { var _local1 = (x & 65535) + (y & 65535); var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16); return((_local2 << 16) | (_local1 & 65535)); } function rol(num, cnt) { return((num << cnt) | (num >>> (32 - cnt))); } function cmn(q, a, b, x, s, t) { return(safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)); } function ff(a, b, c, d, x, s, t) { return(cmn((b & c) | ((~b) & d), a, b, x, s, t)); } function gg(a, b, c, d, x, s, t) { return(cmn((b & d) | (c & (~d)), a, b, x, s, t)); } function hh(a, b, c, d, x, s, t) { return(cmn((b ^ c) ^ d, a, b, x, s, t)); } function ii(a, b, c, d, x, s, t) { return(cmn(c ^ (b | (~d)), a, b, x, s, t)); } function coreMD5(x) { var _local4 = 1732584193 /* 0x67452301 */; var _local3 = -271733879; var _local2 = -1732584194; var _local1 = 271733878 /* 0x10325476 */; var _local5 = 0; while (_local5 < x.length) { var _local10 = _local4; var _local9 = _local3; var _local8 = _local2; var _local7 = _local1; _local4 = ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936); _local1 = ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586); _local2 = ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819); _local3 = ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330); _local4 = ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897); _local1 = ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426); _local2 = ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341); _local3 = ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983); _local4 = ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416); _local1 = ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417); _local2 = ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063); _local3 = ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162); _local4 = ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682); _local1 = ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101); _local2 = ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290); _local3 = ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329); _local4 = gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510); _local1 = gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632); _local2 = gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713); _local3 = gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302); _local4 = gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691); _local1 = gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083); _local2 = gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335); _local3 = gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848); _local4 = gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438); _local1 = gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690); _local2 = gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961); _local3 = gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501); _local4 = gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467); _local1 = gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784); _local2 = gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473); _local3 = gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734); _local4 = hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558); _local1 = hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463); _local2 = hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562); _local3 = hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556); _local4 = hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060); _local1 = hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353); _local2 = hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632); _local3 = hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640); _local4 = hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174); _local1 = hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222); _local2 = hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979); _local3 = hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189); _local4 = hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487); _local1 = hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835); _local2 = hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520); _local3 = hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651); _local4 = ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844); _local1 = ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415); _local2 = ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905); _local3 = ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055); _local4 = ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571); _local1 = ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606); _local2 = ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523); _local3 = ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799); _local4 = ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359); _local1 = ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744); _local2 = ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380); _local3 = ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649); _local4 = ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070); _local1 = ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379); _local2 = ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259); _local3 = ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551); _local4 = safe_add(_local4, _local10); _local3 = safe_add(_local3, _local9); _local2 = safe_add(_local2, _local8); _local1 = safe_add(_local1, _local7); _local5 = _local5 + 16; } return([_local4, _local3, _local2, _local1]); } function binl2hex(binarray) { var _local3 = "0123456789abcdef"; var _local4 = ""; var _local1 = 0; while (_local1 < (binarray.length * 4)) { _local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15)); _local1++; } return(_local4); } function binl2b64(binarray) { var _local4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var _local3 = ""; var _local1 = 0; while (_local1 < (binarray.length * 32)) { _local3 = _local3 + _local4.charAt(((binarray[_local1 >> 5] << (_local1 % 32)) & 63) | ((binarray[_local1 >> 6] >> (32 - (_local1 % 32))) & 63)); _local1 = _local1 + 6; } return(_local3); } function str2binl(str) { var _local4 = ((str.length + 8) >> 6) + 1; var _local2 = new Array(_local4 * 16); var _local1 = 0; while (_local1 < (_local4 * 16)) { _local2[_local1] = 0; _local1++; } _local1 = 0; while (_local1 < str.length) { _local2[_local1 >> 2] = _local2[_local1 >> 2] | ((str.charCodeAt(_local1) & 255) << ((_local1 % 4) * 8)); _local1++; } _local2[_local1 >> 2] = _local2[_local1 >> 2] | (128 << ((_local1 % 4) * 8)); _local2[(_local4 * 16) - 2] = str.length * 8; return(_local2); } function strw2binl(str) { var _local4 = ((str.length + 4) >> 5) + 1; var _local2 = new Array(_local4 * 16); var _local1 = 0; while (_local1 < (_local4 * 16)) { _local2[_local1] = 0; _local1++; } _local1 = 0; while (_local1 < str.length) { _local2[_local1 >> 1] = _local2[_local1 >> 1] | (str.charCodeAt(_local1) << ((_local1 % 2) * 16)); _local1++; } _local2[_local1 >> 1] = _local2[_local1 >> 1] | (128 << ((_local1 % 2) * 16)); _local2[(_local4 * 16) - 2] = str.length * 16; return(_local2); } function hexMD5(str) { return(binl2hex(coreMD5(str2binl(str)))); } function hexMD5w(str) { return(binl2hex(coreMD5(strw2binl(str)))); } function b64MD5(str) { return(binl2b64(coreMD5(str2binl(str)))); } function b64MD5w(str) { return(binl2b64(coreMD5(strw2binl(str)))); } function calcMD5(str) { return(binl2hex(coreMD5(str2binl(str)))); } return(calcMD5(this)); }; Array.prototype.indexOf = function (needle) { var _local2 = 0; while (_local2 < this.length) { if (this[_local2] == needle) { return(_local2); } _local2++; } return(-1); }; Array.prototype.shuffle = function () { i = 0; while (i < this.length) { var _local3 = this[i]; var _local2 = random(this.length); this[i] = this[_local2]; this[_local2] = _local3; i++; } }; String.prototype.invStr = function () { var _local5 = str; var _local4 = length(_local5); var _local1; var _local3; var _local6 = ""; var _local2 = 1; while (_local2 < 255) { _local3 = chr(_local2); _local1 = 0; while ((_local1 <= _local4) && ((substring(_local5, 1 + (_local1++), 1)) != _local3)) { } if (_local1 > _local4) { _local6 = _local6 + _local3; } _local2++; } return(_local6); }; Object.RegExp = function () { if (arguments[0] == null) { return(null); } this.const = "RegExp"; this.compile(arguments[0], arguments[1], arguments[2]); }; MovieClip.prototype.RegExp = Object.RegExp; RegExp.prototype.compile = function () { this.source = arguments[0]; var _local19 = (arguments[1] + "").toLowerCase(); this.global = false; this.ignoreCase = false; this.multiline = false; var _local10 = 0; while (_local10 < length(_local19)) { if ((substring(_local19, _local10 + 1, 1)) == "g") { this.global = true; } if ((substring(_local19, _local10 + 1, 1)) == "i") { this.ignoreCase = true; } if ((substring(_local19, _local10 + 1, 1)) == "m") { this.multiline = true; } _local10++; } if (arguments[2] == null) { var _local21 = true; RegExp._xr = 1; _local10 = 0; } else { var _local21 = false; this._xr = RegExp._xr++; _local10 = arguments[2]; } this.lastIndex = 0; var _local9 = this.source; var _local22; var _local16 = length(_local9); var _local6 = []; var _local4 = 0; var _local5; var _local8 = false; var _local18; var _local17; var _local20 = false; for ( ; _local10 < _local16 ; _local10++) { var _local3 = substring(_local9, _local10 + 1, 1); if (_local3 == "\\") { _local10++; char = false; _local3 = substring(_local9, _local10 + 1, 1); } else { char = true; } var _local15 = substring(_local9, _local10 + 2, 1); _local6[_local4] = new Object(); _local6[_local4].t = 0; _local6[_local4].a = 0; _local6[_local4].b = 999; _local6[_local4].c = -10; if (char) { if (_local3 == "(") { _local22 = new RegExp(_local9, (this.ignoreCase ? "gi" : "g"), _local10 + 1); _local10 = RegExp._xi; _local6[_local4].t = 3; _local3 = _local22; _local15 = substring(_local9, _local10 + 2, 1); } else { if ((!_local21) && (_local3 == ")")) { break; } if (_local3 == "^") { if ((_local4 == 0) || (_local6[_local4 - 1].t == 7)) { _local6[_local4].t = 9; _local6[_local4].a = 1; _local6[_local4].b = 1; _local4++; } } else if (_local3 == "$") { if (_local21) { _local20 = true; } } else { if (_local3 == "[") { _local10++; if (_local15 == "^") { _local6[_local4].t = 2; _local10++; } else { _local6[_local4].t = 1; } _local3 = ""; _local8 = false; while ((_local10 < _local16) && ((_local5 = substring(_local9, 1 + (_local10++), 1)) != "]")) { if (_local8) { if (_local5 == "\\") { } _local17 = ((_local5 == "\\") ? ((_local5 == "b") ? "\b" : (substring(_local9, 1 + (_local10++), 1))) : _local5); _local18 = ord(substring(_local3, length(_local3), 1)) + 1; _local5 = chr(_local18++); while (_local17 >= _local5) { _local3 = _local3 + _local5; } _local8 = false; } else if ((_local5 == "-") && (length(_local3) > 0)) { _local8 = true; } else if (_local5 == "\\") { _local5 = substring(_local9, 1 + (_local10++), 1); var _local12 = "0123456789"; var _local14 = " \f\n\r\t\\"; var _local13 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; if (_local5 == "d") { _local3 = _local3 + _local12; } else if (_local5 == "D") { } else if (_local5 == "s") { _local3 = _local3 + _local14; } else if (_local5 == "S") { } else if (_local5 == "w") { _local3 = _local3 + _local13; } else if (_local5 == "W") { } else if (_local5 == "b") { _local3 = _local3 + "\b"; } else if (_local5 == "\\") { _local3 = _local3 + _local5; } } else { _local3 = _local3 + _local5; } } if (_local8) { _local3 = _local3 + "-"; } _local10--; _local15 = substring(_local9, _local10 + 2, 1); } else { if (_local3 == "|") { if (_local20) { _local6[_local4].t = 10; _local6[_local4].a = 1; _local6[_local4].b = 1; _local4++; _local6[_local4] = new Object(); _local20 = false; } _local6[_local4].t = 7; _local6[_local4].a = 1; _local6[_local4].b = 1; _local4++; continue; } if (_local3 == ".") { _local6[_local4].t = 2; _local3 = newline; } else if (((_local3 == "*") || (_local3 == "?")) || (_local3 == "+")) { continue; } } // unexpected jump if ((_local3 >= "1") && (_local3 <= "9")) { _local6[_local4].t = 4; } else if (_local3 == "b") { _local6[_local4].t = 1; _local3 = "--wb--"; } else if (_local3 == "B") { _local6[_local4].t = 2; _local3 = "--wb--"; } else if (_local3 == "d") { _local6[_local4].t = 1; _local3 = "0123456789"; } else if (_local3 == "D") { _local6[_local4].t = 2; _local3 = "0123456789"; } else if (_local3 == "s") { _local6[_local4].t = 1; _local3 = " \f\n\r\t\\"; } else if (_local3 == "S") { _local6[_local4].t = 2; _local3 = " \f\n\r\t\\"; } else if (_local3 == "w") { _local6[_local4].t = 1; _local3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } else if (_local3 == "W") { _local6[_local4].t = 2; _local3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } if (_local15 == "*") { _local6[_local4].s = _local3; _local4++; _local10++; } else if (_local15 == "?") { _local6[_local4].s = _local3; _local6[_local4].b = 1; _local4++; _local10++; } else if (_local15 == "+") { _local6[_local4].s = _local3; _local6[_local4].a = 1; _local4++; _local10++; } else if (_local15 == "{") { var _local11 = false; var _local7 = 0; _local8 = ""; _local10++; while (((_local10 + 1) < _local16) && ((_local5 = substring(_local9, 2 + (_local10++), 1)) != "}")) { if ((!_local11) && (_local5 == ",")) { _local11 = true; _local7 = Number(_local8); _local7 = Math.floor((isNan(_local7) ? 0 : _local7)); if (_local7 < 0) { _local7 = 0; } _local8 = ""; } else { _local8 = _local8 + _local5; } } rangeB = Number(_local8); rangeB = Math.floor((isNan(rangeB) ? 0 : rangeB)); if (rangeB < 1) { rangeB = 999; } if (rangeB < _local7) { rangeB = _local7; } _local6[_local4].s = _local3; _local6[_local4].b = rangeB; _local6[_local4].a = (_local11 ? _local7 : rangeB); _local4++; } else { _local6[_local4].s = _local3; _local6[_local4].a = 1; _local6[_local4].b = 1; _local4++; } } } } else if ((_local3 >= "1") && (_local3 <= "9")) { _local6[_local4].t = 4; } else if (_local3 == "b") { _local6[_local4].t = 1; _local3 = "--wb--"; } else if (_local3 == "B") { _local6[_local4].t = 2; _local3 = "--wb--"; } else if (_local3 == "d") { _local6[_local4].t = 1; _local3 = "0123456789"; } else if (_local3 == "D") { _local6[_local4].t = 2; _local3 = "0123456789"; } else if (_local3 == "s") { _local6[_local4].t = 1; _local3 = " \f\n\r\t\\"; } else if (_local3 == "S") { _local6[_local4].t = 2; _local3 = " \f\n\r\t\\"; } else if (_local3 == "w") { _local6[_local4].t = 1; _local3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } else if (_local3 == "W") { _local6[_local4].t = 2; _local3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } if (_local15 == "*") { _local6[_local4].s = _local3; _local4++; _local10++; } else if (_local15 == "?") { _local6[_local4].s = _local3; _local6[_local4].b = 1; _local4++; _local10++; } else if (_local15 == "+") { _local6[_local4].s = _local3; _local6[_local4].a = 1; _local4++; _local10++; } else if (_local15 == "{") { var _local11 = false; var _local7 = 0; _local8 = ""; _local10++; while (((_local10 + 1) < _local16) && ((_local5 = substring(_local9, 2 + (_local10++), 1)) != "}")) { if ((!_local11) && (_local5 == ",")) { _local11 = true; _local7 = Number(_local8); _local7 = Math.floor((isNan(_local7) ? 0 : (_local7))); if (_local7 < 0) { _local7 = 0; } _local8 = ""; } else { _local8 = _local8 + _local5; } } rangeB = Number(_local8); rangeB = Math.floor((isNan(rangeB) ? 0 : (rangeB))); if (rangeB < 1) { rangeB = 999; } if (rangeB < _local7) { rangeB = _local7; } _local6[_local4].s = _local3; _local6[_local4].b = rangeB; _local6[_local4].a = (_local11 ? (_local7) : (rangeB)); _local4++; } else { _local6[_local4].s = _local3; _local6[_local4].a = 1; _local6[_local4].b = 1; _local4++; } } if (_local21 && (_local20)) { _local6[_local4] = new Object(); _local6[_local4].t = 10; _local6[_local4].a = 1; _local6[_local4].b = 1; _local4++; } if (!_local21) { RegExp._xi = _local10; this.source = substring(_local9, arguments[2] + 1, _local10 - arguments[2]); } if (RegExp.d) { _local10 = 0; while (_local10 < _local4) { _local10++; } } this._xq = _local6; this._xqc = _local4; RegExp._xp = 0; }; RegExp.prototype.test = function () { if ((RegExp._xp++) == 0) { RegExp._xxa = []; RegExp._xxlp = 0; } var _local10 = arguments[0] + ""; var _local14; var _local4 = this._xq; var _local17 = this._xqc; var _local13; var _local7; var _local8; var _local9; var _local12; var _local11 = length(_local10); var _local5 = (this.global ? (this.lastIndex) : 0); var _local20 = _local5; var _local18 = _local10; if (this.ignoreCase) { _local10 = _local10.toLowerCase(); } var _local15 = new Object(); _local15.i = -1; var _local3 = -1; while (_local3 < (_local17 - 1)) { _local3++; if (RegExp.d) { } _local5 = _local20; _local13 = _local3; _local4[_local13].c = -10; var _local16 = RegExp._xp > 1; var _local19 = false; while ((_local3 > _local13) || (_local5 < (_local11 + 1))) { if (_local4[_local3].t == 7) { break; } if (_local4[_local3].t == 9) { _local3++; if (_local3 == (_local13 + 1)) { _local16 = true; _local13 = _local3; } _local4[_local13].c = -10; continue; } if ((_local15.i >= 0) && (_local5 >= _local15.i)) { break; } if (_local4[_local3].c == -10) { if (RegExp.d) { } var _local6 = 0; _local4[_local3].i = _local5; if (_local4[_local3].t == 0) { _local7 = (this.ignoreCase ? (_local4[_local3].s.toLowerCase()) : (_local4[_local3].s)); while ((_local6 < _local4[_local3].b) && (_local5 < _local11)) { if ((substring(_local10, 1 + _local5, 1)) == _local7) { _local6++; _local5++; } else { break; } } } else if (_local4[_local3].t == 1) { if (_local4[_local3].s == "--wb--") { _local4[_local3].a = 1; if ((_local5 > 0) && (_local5 < _local11)) { _local9 = substring(_local10, _local5, 1); if ((_local9 == " ") || (_local9 == newline)) { _local6 = 1; } if (_local6 == 0) { _local9 = substring(_local10, 1 + _local5, 1); if ((_local9 == " ") || (_local9 == newline)) { _local6 = 1; } } } else { _local6 = 1; } } else { _local7 = (this.ignoreCase ? (_local4[_local3].s.toLowerCase()) : (_local4[_local3].s)); _local8 = length(_local7); while ((_local6 < _local4[_local3].b) && (_local5 < _local11)) { _local9 = substring(_local10, 1 + _local5, 1); cs = 0; while ((cs <= _local8) && ((substring(_local7, 1 + (cs++), 1)) != _local9)) { } if (cs <= _local8) { _local6++; _local5++; } else { break; } } } } else if (_local4[_local3].t == 2) { _local7 = (this.ignoreCase ? (_local4[_local3].s.toLowerCase()) : (_local4[_local3].s)); _local8 = length(_local7); if (_local4[_local3].s == "--wb--") { _local4[_local3].a = 1; if ((_local5 > 0) && (_local5 < _local11)) { _local9 = substring(_local10, _local5, 1); _local12 = substring(_local10, 1 + _local5, 1); if ((((_local9 != " ") && (_local9 != newline)) && (_local12 != " ")) && (_local12 != newline)) { _local6 = 1; } } else { _local6 = 0; } } else { while ((_local6 < _local4[_local3].b) && (_local5 < _local11)) { _local9 = substring(_local10, 1 + _local5, 1); cs = 0; while ((cs <= _local8) && ((substring(_local7, 1 + (cs++), 1)) != _local9)) { } if (cs <= _local8) { break; } _local6++; _local5++; } } } else if (_local4[_local3].t == 10) { _local12 = substring(_local10, 1 + _local5, 1); _local6 = (((this.multiline && ((_local12 == newline) || (_local12 == "\r"))) || (_local5 == _local11)) ? 1 : 0); } else if (_local4[_local3].t == 3) { _local14 = _local4[_local3].s; _local4[_local3].ix = []; _local4[_local3].ix[_local6] = _local5; _local14.lastIndex = _local5; while ((_local6 < _local4[_local3].b) && _local14.test(_local18)) { _local8 = length(RegExp._xxlm); if (_local8 > 0) { _local5 = _local5 + _local8; _local6++; _local4[_local3].ix[_local6] = _local5; } else { _local6 = _local4[_local3].a; _local4[_local3].ix[_local6 - 1] = _local5; break; } } if (_local6 == 0) { RegExp._xxlm = ""; } if (_local14._xr > RegExp._xxlp) { RegExp._xxlp = _local14._xr; } RegExp._xxa[_local14._xr] = RegExp._xxlm; } else if (_local4[_local3].t == 4) { _local7 = Number(_local4[_local3].s); if (RegExp._xp >= _local7) { _local7 = RegExp._xxa[_local7]; _local7 = (this.ignoreCase ? _local7.toLowerCase() : _local7); _local8 = length(_local7); _local4[_local3].ix = []; _local4[_local3].ix[_local6] = _local5; if (_local8 > 0) { while ((_local6 < _local4[_local3].b) && (_local5 < _local11)) { if ((substring(_local10, 1 + _local5, _local8)) == _local7) { _local6++; _local5 = _local5 + _local8; _local4[_local3].ix[_local6] = _local5; } else { break; } } } else { _local6 = 0; _local4[_local3].a = 0; } } else { _local7 = chr(_local7); _local4[_local3].ix = []; _local4[_local3].ix[_local6] = _local5; while ((_local6 < _local4[_local3].b) && (_local5 < _local11)) { if ((substring(_local10, 1 + _local5, 1)) == _local7) { _local6++; _local5++; _local4[_local3].ix[_local6] = _local5; } else { break; } } } } _local4[_local3].c = _local6; if (RegExp.d) { } } if (_local4[_local3].c < _local4[_local3].a) { if (RegExp.d) { } if (_local3 > _local13) { _local3--; _local4[_local3].c--; if (_local4[_local3].c >= 0) { _local5 = (((_local4[_local3].t == 3) || (_local4[_local3].t == 4)) ? (_local4[_local3].ix[_local4[_local3].c]) : (_local4[_local3].i + _local4[_local3].c)); } if (RegExp.d) { } } else { if (RegExp._xp > 1) { break; } if (_local16) { if (this.multiline) { do { if (_local5 > _local11) { break; } _local12 = substring(_local10, 1 + (_local5++), 1); } while (!((_local12 == newline) || (_local12 == "\r"))); _local4[_local3].c = -10; } else { break; } } else { _local5++; _local4[_local3].c = -10; } } } else { if (RegExp.d) { } _local3++; if ((_local3 == _local17) || (_local4[_local3].t == 7)) { if (RegExp.d) { } _local15.i = _local4[_local13].i; _local15.li = _local5; break; } _local4[_local3].c = -10; } } while ((_local3 < _local17) && (_local4[_local3].t != 7)) { _local3++; } } if (_local15.i < 0) { this.lastIndex = 0; if ((RegExp._xp--) == 1) { RegExp._xxa = []; RegExp._xxlp = 0; } return(false); } _local5 = _local15.li; this._xi = _local15.i; RegExp._xxlm = substring(_local18, _local15.i + 1, _local5 - _local15.i); RegExp._xxlc = substring(_local18, 1, _local15.i); RegExp._xxrc = substring(_local18, _local5 + 1, _local11 - _local5); if (_local5 == _local15.i) { _local5++; } this.lastIndex = _local5; if ((RegExp._xp--) == 1) { RegExp.lastMatch = RegExp._xxlm; RegExp.leftContext = RegExp._xxlc; RegExp.rightContext = RegExp._xxrc; RegExp._xa = RegExp._xxa; RegExp.lastParen = RegExp._xxa[RegExp._xxlp]; _local3 = 1; while (_local3 < 10) { RegExp["$" + _local3] = RegExp._xa[_local3]; _local3++; } } return(true); }; RegExp.prototype.exec = function () { var _local5 = arguments[0] + ""; if (_local5 == "") { return(false); } var _local6 = this.test(_local5); if (_local6) { var _local7 = new Array(); _local7.index = this._xi; _local7.input = _local5; _local7[0] = RegExp.lastMatch; var _local4 = RegExp._xa.length; var _local3 = 1; while (_local3 < _local4) { _local7[_local3] = RegExp._xa[_local3]; _local3++; } } else { var _local7 = null; } return(_local7); }; String.prototype.match = function () { if (typeof(arguments[0]) != "object") { return(null); } if (arguments[0].const != "RegExp") { return(null); } var _local3 = arguments[0]; var _local5 = this; var _local6 = 0; var _local4 = 0; if (_local3.global) { _local3.lastIndex = 0; while (_local3.test(_local5)) { if (_local4 == 0) { var _local7 = new Array(); } _local7[_local4++] = RegExp.lastMatch; _local6 = _local3.lastIndex; } _local3.lastIndex = _local6; } else { var _local7 = _local3.exec(_local5); _local4++; } return(((_local4 == 0) ? null : (_local7))); }; String.prototype.replaceRegExp = function () { if (typeof(arguments[0]) != "object") { return(null); } if (arguments[0].const != "RegExp") { return(null); } var _local8 = arguments[0]; var _local7 = arguments[1] + ""; var _local11 = this; var _local12 = ""; _local8.lastIndex = 0; if (_local8.global) { var _local13 = 0; var _local10 = 0; while (_local8.test(_local11)) { var _local5 = 0; var _local9 = length(_local7); var _local3 = ""; var _local6 = ""; var _local4 = ""; while (_local5 < _local9) { _local3 = substring(_local7, 1 + (_local5++), 1); if ((_local3 == "$") && (_local6 != "\\")) { _local3 = substring(_local7, 1 + (_local5++), 1); if (isNaN(Number(_local3)) || (Number(_local3) > 9)) { _local4 = _local4 + ("$" + _local3); } else { _local4 = _local4 + RegExp._xa[Number(_local3)]; } } else { _local4 = _local4 + _local3; } _local6 = _local3; } _local12 = _local12 + ((substring(_local11, _local10 + 1, _local8._xi - _local10)) + _local4); _local10 = _local8._xi + length(RegExp.lastMatch); _local13 = _local8.lastIndex; } _local8.lastIndex = _local13; } else if (_local8.test(_local11)) { _local12 = _local12 + (RegExp.leftContext + _local7); } _local12 = _local12 + ((_local8.lastIndex == 0) ? (_local11) : (RegExp.rightContext)); return(_local12); }; String.prototype.search = function () { if (typeof(arguments[0]) != "object") { return(null); } if (arguments[0].const != "RegExp") { return(null); } var _local3 = arguments[0]; var _local5 = this; _local3.lastIndex = 0; var _local4 = _local3.test(_local5); return((_local4 ? (_local3._xi) : -1)); }; String.prototype.old_split = String.prototype.split; String.prototype.split = function () { if ((typeof(arguments[0]) == "object") && (arguments[0].const == "RegExp")) { var _local3 = arguments[0]; var _local8 = ((arguments[1] == null) ? 9999 : (Number(arguments[1]))); if (isNaN(_local8)) { _local8 = 9999; } var _local6 = this; var _local9 = new Array(); var _local5 = 0; var _local11 = _local3.global; _local3.global = true; _local3.lastIndex = 0; var _local7 = 0; var _local10 = 0; var _local4 = 0; while ((_local5 < _local8) && (_local3.test(_local6))) { if (_local3._xi != _local4) { _local9[_local5++] = substring(_local6, _local4 + 1, _local3._xi - _local4); } _local4 = _local3._xi + length(RegExp.lastMatch); _local10 = _local7; _local7 = _local3.lastIndex; } if (_local5 == _local8) { _local3.lastIndex = _local10; } else { _local3.lastIndex = _local7; } if (_local5 == 0) { _local9[_local5] = _local6; } else if ((_local5 < _local8) && (length(RegExp.rightContext) > 0)) { _local9[_local5++] = RegExp.rightContext; } _local3.global = _local11; return(_local9); } return(this.old_split(arguments[0], arguments[1])); }; _global.defaultLangCopy = "{l flashPlayerconnectingToRadio}Connecting to radio{/l}{l flashPlayerbuyTrack}Buy Track{/l}{l flashPlayerseeMore}see more{/l}{l flashPlayeronTagTrackSuccess}Your tags have been saved{/l} {l flashPlayeronRecommendTrackSuccess}Your recommendation has been sent{/l} {l flashPlayeronBanTrackSuccess}Your profile was updated{/l} {l flashPlayerbuffering}Buffering Track{/l} {l flashPlayeronLoveTrackSuccess}Your profile was updated{/l} {l flashPlayerconnectToPreviews}Click to play tracks{/l} {l flashPlayerconnect}Click to play radio{/l} {l flashPlayertuningPreviews}Tuning in to previews{/l} {l flashPlayeronRadioHandshakeFail}Couldnt connect to the radio{/l} {l flashPlayertuning}Tuning in to{/l} {l flashPlayernotListening}Not currently listening{/l} {l flashPlayeroops}Oops! Error connecting{/l} {l flashPlayerlistening}Listening to{/l} {l flashPlayerpressPlay}Press play to listen{/l} {l flashPlayercreateStationInfoMsg}To start, type your favourite artist{/l} {l flashPlayerfromTheAlbum}From the album{/l} {l flashPlayertuneErrorMsg1}Oops! No content{/l} {l flashPlayertuneErrorMsg2}This group does not have enough members for radio{/l} {l flashPlayertuneErrorMsg3}This artist does not have enough fans for radio{/l} {l flashPlayertuneErrorMsg4}This item is not available for streaming{/l} {l flashPlayertuneErrorMsg5}This feature is only available to subscribers{/l} {l flashPlayertuneErrorMsg6}Oops! No content{/l} {l flashPlayertuneErrorMsg7}The streaming system is offline{/l} {l flashPlayerconnectionError}We had an error connecting{/l} {l flashPlayerplaylist}playlist{/l} {l flashPlayerstation}station{/l} {l flashPlayernotEnoughContent}Oops! No content{/l} {l flashPlayerjoin}Join the last.fm community to receive personalised music recommendations, find out about concerts, customise your radio stations and lots more. Click join to get going.{/l} {l flashPlayerrecommendInputLoggedIn}Type a last.fm username or email address here{/l} {l flashPlayerrecommendInputAnon}Type your friends email address here{/l} {l flashPlayerdefaultRecommendationMsg}Check it out!{/l} {l flashPlayerrecommendTrack}Recommend Track{/l} {l flashPlayertagInputMsg}Type your tags in here{/l} {l flashPlayertaggingTrack}Tagging track{/l} {l flashPlayeronTagButtonRollOver2}Tag this track{/l} {l flashPlayeronBanButtonRollOver}Ban this track{/l} {l flashPlayeronLoveButtonRollOver}Love this track{/l} {l flashPlayeronRecommendButtonRollOver}Share this track{/l} {l flashPlayerlistenNowButtonBlur}Change Station{/l} {l flashPlayerlistenNowButtonFocus}Now Playing{/l} {l flashPlayertuneInSimArtists}Tune in to last.fm similar artist radio{/l} {l flashPlayerjoinSubmitButton}Join{/l} {l flashPlayerstationSubmitButton}Start{/l} {l flashPlayerrecommendSubmitButton}Send{/l} {l flashPlayertagSubmitButton}Tag this{/l}{l flashPlayercancelButton}Cancel{/l}{l flashPlayerbuy}Buy{/l}{l flashPlayerbuyAlbum}Buy Album{/l}{l flashPlayerfree}Free{/l}{l flashPlayershareButton}Share{/l}{l flashPlayerpopupButton}Pop Up{/l}{l flashPlayerlistenTo}Play{/l}{l flashPlayergetYourOwnButton}Get Your Own{/l}{l flashPlayercontinueButton}Continue{/l}{l flashPlayerskipRestrictionInfo}Due to licensing restrictions, you've reached your skip limit for this hour. If you don't want to listen to this station you can try tuning to a new station.{/l}{l flashPlayertuneButton}Retune{/l}{l flashPlayernotEnoughContentShuffle}No more tracks to play{/l}{l flashPlayerpressPlayShuffle}Press play to shuffle{/l}{l flashPlayershuffling}Shuffling playlist{/l}{l flashPlayerpowerplay}Brought to you by{/l}{l flashPlayerradioStationsTitle}Radio Stations{/l}{l flashPlayerfindOutMore}Yes please{/l}{l flashPlayernoThanks}No Thanks{/l}{l flashPlayergoBack}Back{/l}{l flashPlayercomesFrom}From{/l}"; var application = (new app.Main()); application.run(); stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
app.controller.Controller.track.stop(); app.controller.Controller.display.onPressStopButton(); stop();
Frame 10
app.controller.Controller.volume.setVolume(jsVolume); etc.Conf.INITIAL_VOLUME = jsVolume; stop();
Frame 11
lib.lfm.core.ServiceLocator.get("Logger").write("showPlayer Frame");
Frame 12
stop();
Frame 22
stop();
Symbol 4 MovieClip [rwd_button] Frame 1
stop();
Symbol 4 MovieClip [rwd_button] Frame 2
stop();
Symbol 9 MovieClip [VideoPlayer] Frame 1
#initclip 1 Object.registerClass("VideoPlayer", mx.video.VideoPlayer); #endinitclip
Symbol 13 MovieClip [FLVPlayback] Frame 1
#initclip 2 Object.registerClass("FLVPlayback", mx.video.FLVPlayback); #endinitclip stop();
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 2
stop();
Symbol 29 MovieClip Frame 100
stop();
Symbol 81 MovieClip [loadingIcon] Frame 110
this.gotoAndPlay(2);
Symbol 291 MovieClip [__Packages.lib.lfm.display.LfmUIElement] Frame 0
class lib.lfm.display.LfmUIElement extends MovieClip { var tabEnabled, tabChildren, init, bg; function LfmUIElement () { super(); mx.events.EventDispatcher.initialize(this); tabEnabled = false; tabChildren = false; addEventListener("onRollOverButton", app.controller.Controller.display); addEventListener("onRollOutButton", app.controller.Controller.display); init(); } function addEventListener() { } function removeEventListener() { } function dispatchEvent() { } function disableChildren() { for (var _local2 in this) { this[_local2].enabled = false; this[_local2].disableChildren(); } } function setBgColor(_color) { var _local2 = new Color(bg); _local2.setRGB(_color); } function enableChildren() { for (var _local2 in this) { this[_local2].enabled = true; this[_local2].enableChildren(); } } }
Symbol 16 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher { function EventDispatcher () { } static function _removeEventListener(queue, event, handler) { if (queue != undefined) { var _local4 = queue.length; var _local1; _local1 = 0; while (_local1 < _local4) { var _local2 = queue[_local1]; if (_local2 == handler) { queue.splice(_local1, 1); return(undefined); } _local1++; } } } static function initialize(object) { if (_fEventDispatcher == undefined) { _fEventDispatcher = new mx.events.EventDispatcher(); } object.addEventListener = _fEventDispatcher.addEventListener; object.removeEventListener = _fEventDispatcher.removeEventListener; object.dispatchEvent = _fEventDispatcher.dispatchEvent; object.dispatchQueue = _fEventDispatcher.dispatchQueue; } function dispatchQueue(queueObj, eventObj) { var _local7 = "__q_" + eventObj.type; var _local4 = queueObj[_local7]; if (_local4 != undefined) { var _local5; for (_local5 in _local4) { var _local1 = _local4[_local5]; var _local3 = typeof(_local1); if ((_local3 == "object") || (_local3 == "movieclip")) { if (_local1.handleEvent != undefined) { _local1.handleEvent(eventObj); } if (_local1[eventObj.type] != undefined) { if (exceptions[eventObj.type] == undefined) { _local1[eventObj.type](eventObj); } } } else { _local1.apply(queueObj, [eventObj]); } } } } function dispatchEvent(eventObj) { if (eventObj.target == undefined) { eventObj.target = this; } this[eventObj.type + "Handler"](eventObj); dispatchQueue(this, eventObj); } function addEventListener(event, handler) { var _local3 = "__q_" + event; if (this[_local3] == undefined) { this[_local3] = new Array(); } _global.ASSetPropFlags(this, _local3, 1); _removeEventListener(this[_local3], event, handler); this[_local3].push(handler); } function removeEventListener(event, handler) { var _local2 = "__q_" + event; _removeEventListener(this[_local2], event, handler); } static var _fEventDispatcher = undefined; static var exceptions = {move:1, draw:1, load:1}; }
Symbol 292 MovieClip [__Packages.app.controller.Controller] Frame 0
class app.controller.Controller { function Controller () { } }
Symbol 293 MovieClip [__Packages.lib.lfm.core.LfmController] Frame 0
class lib.lfm.core.LfmController { var target; function LfmController (mc) { mx.events.EventDispatcher.initialize(this); target = mc; init(); } function dispatchEvent() { } function addEventListener() { } function removeEventListener() { } function setTarget(mc) { target = mc; } function initListeners() { } function init() { } function isFullScreen() { if (_global.Mode.Fullscreen) { return(true); } return(Stage.displayState == "fullScreen"); } }
Symbol 294 MovieClip [__Packages.app.controller.VolumeController] Frame 0
class app.controller.VolumeController extends lib.lfm.core.LfmController { var target, volPercent, updateVolumeInterval, targetVolume; function VolumeController () { super(); } function disableButton() { target.disable(); target._visible = false; } function enableButton() { target._visible = true; target.enable(); } function setVolume(vol, stealth) { lib.lfm.core.ServiceLocator.get("Logger").write("VOL CONTROLLER > saving vol of " + volPercent); volPercent = vol; updateSlider(); app.controller.Controller.track.setVolume(volPercent); if (!stealth) { getURL (("javascript:LFM.Flash.Player.saveVolume(" + vol) + ");", "_self"); } } function getVolume() { lib.lfm.core.ServiceLocator.get("Logger").write("VOL CONTROLLER > vol is at " + volPercent); if (volPercent == undefined) { volPercent = etc.Conf.INITIAL_VOLUME; } return(volPercent); } function init() { } function initListeners() { app.controller.Controller.viewport.addEventListener("onMouseDownEvent", this); } function setTarget(mc) { target = mc; target.tabEnabled = false; target.tabChildren = false; } function updateSlider() { target.setVol(volPercent); updateIcon(volPercent); } function updateIcon(volPercent) { var _local2 = Math.ceil(volPercent / 25) + 1; if (volPercent == 0) { _local2 = 1; } if (volPercent == 100) { _local2 = 4; } target.icon.gotoAndStop(_local2); } function onMouseDownEvent() { } function onChangeVolume(event) { lib.lfm.core.LfmError.raise("onchangeVolume in vol controller triggered"); setVolume(event.volPercent); } function onDragVolumeStart(event) { lib.lfm.core.LfmError.raise("ondragvolstart triggered"); event.target.gotoAndStop("active"); updateVolumeInterval = setInterval(this, "pollSliderVolume", 60); } function pollSliderVolume() { lib.lfm.core.ServiceLocator.get("logger").write("pollslidervolume"); volPercent = target.overlay.volSlider.getVolPercent(); app.controller.Controller.track.setVolume(volPercent); updateIcon(volPercent); if (!target.overlay.volSlider.hitTest(_xmouse, _ymouse)) { onDragVolumeEnd({target:target.overlay.volSlider}); } } function onDragVolumeEnd(event) { event.target.gotoAndStop("inactive"); lib.lfm.core.LfmError.raise("ondragvolend triggered"); clearInterval(updateVolumeInterval); target.hideOverlay(); } function fadeVolume(vol, stealth) { var _local3 = _global.mainTimeline.createEmptyMovieClip("volController", _global.mainTimeline.getNextHighestDepth()); app.controller.Controller.volume.setVolume(vol, stealth); _local3.vol = getVolume(); } function fadeIn() { var _local2 = (manualInterrupt ? (targetVolume) : (etc.Conf.INITIAL_VOLUME)); lib.lfm.core.ServiceLocator.get("logger").write("fading in to " + _local2); fadeVolume(_local2, true); } function fadeOut() { } function getTrackStartVolume() { var _local3 = app.controller.Controller.playlist.getCurrentTrack(); if (etc.Conf.isMode(_global.PLAYLIST_MODE) && (_local3.duration == (etc.Conf.PREVIEW_LENGTH_SECS * 1000))) { lib.lfm.core.ServiceLocator.get("logger").warn("VOL CONTROLLER > volume starts at ZERO!!! for fade in?"); return(0); } lib.lfm.core.ServiceLocator.get("logger").warn("VOL CONTROLLER > volume starts at " + target.getVol()); return(target.getVol()); } var manualInterrupt = false; }
Symbol 295 MovieClip [__Packages.lib.lfm.core.ServiceLocator] Frame 0
class lib.lfm.core.ServiceLocator { static var instance; var services; function ServiceLocator () { services = new Array(); } static function get(service) { return(getInstance().services[service.toLowerCase()]); } static function register(serviceName, service) { getInstance().services[serviceName.toLowerCase()] = service; } static function getInstance() { if (instance == null) { instance = new lib.lfm.core.ServiceLocator(); } return(instance); } }
Symbol 296 MovieClip [__Packages.etc.Conf] Frame 0
class etc.Conf { static var DEVELOPMENT_SERVER, ANON_USER, WS_BASEHOST_URI, LFM_CLIENT_VERSION, LFM_SCROBBLER_URL, LFM_SCROBBLER_PROTOCOL_VERSION, LFM_SCROBBLER_CLIENT_ID, LFM_SCROBBLER_MAX_AUTH_ATTEMPTS, LFM_SCROBBLER_PERCENTAGE_PLAYED_THRESHOLD, LFM_SCROBBLER_SUBMIT_TIME_LIMIT_SECS, LANG_URI, LFM_SCROBBLER_MIN_SONG_LENGTH_SECS, XML_RPC_URI, RESOURCE_PLAYLIST_URI, PRIMARY_FONTS; function Conf () { } static function init() { DEVELOPMENT_SERVER = _root.DEVELOPMENT_SERVER; ANON_USER = "LFM_ANON"; WS_BASEHOST_URI = "ext.last.fm"; LFM_CLIENT_VERSION = "0.1"; LFM_SCROBBLER_URL = "http://post.audioscrobbler.com/"; LFM_SCROBBLER_PROTOCOL_VERSION = "1.2"; LFM_SCROBBLER_CLIENT_ID = "lfl"; LFM_SCROBBLER_MAX_AUTH_ATTEMPTS = 3; LFM_SCROBBLER_PERCENTAGE_PLAYED_THRESHOLD = 50; LFM_SCROBBLER_SUBMIT_TIME_LIMIT_SECS = 240; LANG_URI = ((("http://" + STATIC_URI) + "/webclient/s12n/lang/") + LANG_VERSION) + "/"; lang = ((_global.lang == undefined) ? (lang) : (_global.lang)); LFM_SCROBBLER_MIN_SONG_LENGTH_SECS = 30; PREVIEW_LENGTH_SECS = 30; XML_RPC_URI = "/1.0/webclient/xmlrpc.php"; if (_root._global.DEBUG_MODE) { LFM_SCROBBLER_PERCENTAGE_PLAYED_THRESHOLD = 30; LFM_SCROBBLER_SUBMIT_TIME_LIMIT_SECS = 240; } if (DEVELOPMENT_SERVER) { WS_BASEHOST_URI = "anil.ws.staging.last.fm:8090"; } if (DEVELOPMENT_SERVER) { WEBHOST = "www.staging.last.fm"; } RESOURCE_PLAYLIST_URI = ("http://" + WS_BASEHOST_URI) + "/1.0/webclient/getresourceplaylist.php"; PRIMARY_FONTS = ["Lucida Grande", "Arial", "Verdana", "Geneva", "Tahoma", "Trebuchet MS", "Bitstream"]; } static function isMode(mode) { return(_global.Mode[mode]); } static function setMode(mode) { lib.lfm.core.ServiceLocator.get("logger").write("setting application mode to " + mode); lib.lfm.core.ServiceLocator.get("logger").delay(2000); _global.Mode[_global.lfmMode] = false; var _local4 = _global.ModeFeature[mode]; _global.Mode[mode] = true; _global.Feature = _local4; for (var _local2 in _global.Feature) { lib.lfm.core.ServiceLocator.get("Logger").write((("Feature[" + _local2) + "] = ") + _global.Feature[_local2]); } _global.mainTimeline.lfmMode = mode; _global.lfmMode = mode; } static var MUSIC_CATALOGUE_URI = "http://www.last.fm/music"; static var NO_ALBUM_IMG_URL = "http://cdn.last.fm/webclient/no_cover.jpg"; static var WEBHOST = "www.last.fm"; static var RES_PLAYLIST = 37; static var ERROR_NO_URL = ""; static var PREVIEW_LENGTH_SECS = 30; static var INITIAL_VOLUME = 100; static var lang = "en"; static var LANG_VERSION = 14; static var LANG_DEFAULT = "en"; static var STATIC_URI = "cdn.last.fm"; static var LFM_RADIO_SERVICE_URL = "http://ws.audioscrobbler.com/radio"; static var LFM_RADIO_MAX_AUTH_ATTEMPTS = 3; static var LFM_RADIO_ERROR_NOT_ENOUGH_CONTENT = 1; static var LFM_RADIO_ERROR_FEWGROUPMEMBERS = 2; static var LFM_RADIO_ERROR_FEWFANS = 3; static var LFM_RADIO_ERROR_UNAVAILABLE = 4; static var LFM_RADIO_ERROR_SUBSCRIBE = 5; static var LFM_RADIO_ERROR_FEWNEIGHBOURS = 6; static var LFM_RADIO_ERROR_OFFLINE = 7; static var SKIP_RESTRICTION = 0; static var SOUND_BUFFER_SECS = 8; static var FONT_SIZE = 10.5; static var WS_2_URI = "http://ext.last.fm/2.0/"; }
Symbol 297 MovieClip [__Packages.lib.lfm.core.LfmError] Frame 0
class lib.lfm.core.LfmError { function LfmError () { } static function raise(msg) { lib.lfm.core.ServiceLocator.get("logger").warn(msg); } static function Log(msg) { } }
Symbol 298 MovieClip [__Packages.app.controller.TrackController] Frame 0
class app.controller.TrackController extends lib.lfm.core.LfmController { var dispatchEvent, addEventListener, track, _bufferingTime, _trackLoadedTime, pollTrackPosition, _pollPlayback; function TrackController () { super(); } function load(track) { if ((track instanceof lib.lfm.core.model.Track) && (track.hasLocation())) { track.load(); } else { if (_global.Feature.FOD) { dispatchEvent({type:"onLoadTrackFail", target:this, error:app.controller.Controller.lang.getCopy("oops")}); } lib.lfm.core.LfmError.raise("trying to load invalid track"); _playing = false; return(false); } } function initListeners() { addEventListener("onLoadTrack", app.controller.Controller.display); addEventListener("onLoadTrackFail", app.controller.Controller.menu); addEventListener("onTrackStartPlaying", app.controller.Controller.display); addEventListener("onLoadTrackFail", app.controller.Controller.display); addEventListener("onBufferingStart", app.controller.Controller.display); addEventListener("onBufferTimeout", app.controller.Controller.display); addEventListener("onTrackStartPlaying", app.controller.Controller.menu); addEventListener("onCompleteTrack", app.controller.Controller.display); addEventListener("onCompleteTrack", app.controller.Controller.menu); addEventListener("onCompleteTrack", app.controller.Controller.playlist); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onAdjustSuccess", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onTuneRadio", this); lib.lfm.core.ServiceLocator.get("Scrobbler").addEventListener("onSubmissionSuccess", this); if (_global.Feature.OnDemand) { firstPreview = true; } } function setRating(rating) { if (track instanceof lib.lfm.core.model.Track) { if ((rating == "S") && (track.getPercentagePlayed() > etc.Conf.LFM_SCROBBLER_PERCENTAGE_PLAYED_THRESHOLD)) { return(undefined); } if ((track.rating != "B") && (track.rating != "L")) { track.rating = rating; } } } function getRating() { if (track instanceof lib.lfm.core.model.Track) { return(track.rating); } return(false); } function stop() { if (track instanceof lib.lfm.core.model.Track) { _playing = false; track.stop(); } } function isPlaying() { return(_playing); } function setPlaying() { _playing = true; } function setPaused() { _playing = false; } function getPercentagePlayed() { return(track.getPercentagePlayed()); } function getDuration() { return(track.getDuration()); } function setVolume(volPercent) { if (track != undefined) { track.setVolume(volPercent); } } function getPosition() { return(track.getPosition()); } function isScrobbled() { return(_scrobbled); } function doFade() { return(etc.Conf.isMode(_global.PLAYLIST_MODE) && (app.controller.Controller.playlist.getCurrentTrack().duration == (etc.Conf.PREVIEW_LENGTH_SECS * 1000))); } function isBuffering() { return(buffering); } function pollTrackPlaying() { _bufferingTime = getTimer() - _trackLoadedTime; buffering = true; if (getPosition() > 0) { clearInterval(pollTrackPosition); pollTrackPosition = false; buffering = false; _playing = true; dispatchEvent({type:"onTrackStartPlaying", target:this}); onTrackStartPlaying(); lib.lfm.core.ServiceLocator.get("logger").write("TrackController : track started playing"); if (!_pollPlayback) { _pollPlayback = setInterval(this, "pollPlayback", 400); } } else if (_bufferingTime > _bufferingTimeout) { lib.lfm.core.ServiceLocator.get("logger").write("track buffering timeout!"); clearInterval(pollTrackPosition); pollTrackPosition = false; buffering = false; _onLoadTrackFail(false, true); track.clear(); var track = app.controller.Controller.playlist.getCurrentTrack(); track.clear(); } lib.lfm.core.ServiceLocator.get("logger").write("TrackController : track started..." + app.controller.Controller.playlist.getCurrentTrack()); } function pollPlayback() { if (doFade() && ((track.getDuration() - track.getPosition()) < 3000)) { app.controller.Controller.volume.fadeOut(); clearInterval(_pollPlayback); _pollPlayback = false; } if ((track.getPosition() > 30000) && (_global.Feature.FOD)) { if ((!hasBroadcastFODPlay()) && (track.isFOD())) { lib.lfm.core.ServiceLocator.get("logger").write("Logging FOD Playback"); getURL (((("javascript:FOD.logPlay({track:'" + app.controller.Controller.playlist.getCurrentTrack().id) + "',sk:'") + app.controller.Controller.user.getSessionKey()) + "'});"); app.controller.Controller.playlist.getCurrentTrack().FODPlay = true; } } } function hasBroadcastFODPlay() { return(app.controller.Controller.playlist.getCurrentTrack().FODPlay); } function onLoadPlaylist(event) { lib.lfm.core.ServiceLocator.get("logger").write("TrackController : playlist loaded = " + event.success); lib.lfm.core.ServiceLocator.get("logger").write((("TrackController : playlist mode = " + _global.PLAYLIST_MODE) + " access = ") + etc.Conf.isMode(_global.PLAYLIST_MODE)); if (!event.success) { if (app.controller.Controller.user.isLastFm()) { lib.lfm.core.ServiceLocator.get("Scrobbler").stop(); } return(false); } if (_global.Feature.Radio) { lib.lfm.core.ServiceLocator.get("logger").write("TrackController : Radio Requested ... "); load(app.controller.Controller.playlist.getCurrentTrack()); } else if (etc.Conf.isMode(_global.PLAYLIST_MODE)) { _playing = false; if ((!app.controller.Controller.playlist.externalPlay) || (app.controller.Controller.playlist.externalPlay && (_global.Feature.FOD))) { load(app.controller.Controller.playlist.getCurrentTrack()); } } firstPreview = false; lib.lfm.core.ServiceLocator.get("logger").write((("TrackController : to play " + app.controller.Controller.playlist.getCurrentTrack().title) + " @ volume=") + app.controller.Controller.volume.getVolume()); } function onEndPlaylist(event) { lib.lfm.core.ServiceLocator.get("logger").write("TrackController : Playlist Completed"); if (_global.Feature.OnDemand) { _playing = false; if (!_global.Feature.FOD) { firstPreview = true; } } } function onSkip(event) { lib.lfm.core.ServiceLocator.get("logger").write("onskip track load"); load(app.controller.Controller.playlist.getCurrentTrack()); firstPreview = false; } function onPressStopButton(event) { _playing = false; clearInterval(_pollPlayback); _pollPlayback = false; var _local2 = app.controller.Controller.playlist.getCurrentTrack(); lib.lfm.core.ServiceLocator.get("logger").write("trackController : onPressStopButton"); _local2.FODPlay = false; if (event.target instanceof app.view.button.PlayButton) { dispatchEvent({type:"onPressStopButton", target:this}); } dispatchEvent({type:"onStopTrack", target:this}); if (app.controller.Controller.user.isLastFm()) { lib.lfm.core.ServiceLocator.get("Scrobbler").onStopTrack({track:_local2, target:this}); } _local2.stop(); } function onAdjustSuccess(event) { stop(); } function onLoadTrack(event) { if (event.success && (event.target.isValidSound())) { track = event.target; clearInterval(_pollPlayback); _pollPlayback = false; var _local4 = app.controller.Controller.volume.getTrackStartVolume(); if (_global.isInline) { _local4 = etc.Conf.INITIAL_VOLUME; } app.controller.Controller.volume.setVolume(_local4, true); lib.lfm.core.ServiceLocator.get("logger").write(("TrackController : >>> " + event.target) + " track loaded"); dispatchEvent({type:"onLoadTrack", target:event.target, success:true}); _trackLoadedTime = getTimer(); if (!pollTrackPosition) { pollTrackPosition = setInterval(this, "pollTrackPlaying", 200); } dispatchEvent({type:"onBufferingStart", target:this}); } else { _onLoadTrackFail(false); } } function _onLoadTrackFail(force, timeout) { lib.lfm.core.ServiceLocator.get("logger").write("TrackController : >>> track FAILED TO LOAD"); var _local4 = "minor"; var _local2 = "Track Loading Fail"; var _local3 = app.controller.Controller.user.name; lib.lfm.core.ServiceLocator.get("logger").write("TrackController : >>> " + _local2); _playing = false; _consecutiveFailedRequests++; if ((_consecutiveFailedRequests < 3) && (!force)) { if (timeout) { suffix = "Buffering Timeout"; } else { suffix = "Couldnt Find Track"; } lib.lfm.core.ServiceLocator.get("logger").logToWebServer(_local2, _local4, _local3, suffix); app.controller.Controller.playlist.onSkip(); return(undefined); } _local4 = "critical"; var suffix = "Oopsed"; lib.lfm.core.ServiceLocator.get("logger").logToWebServer(_local2, _local4, _local3, suffix); dispatchEvent({type:"onLoadTrackFail", target:this, error:app.controller.Controller.lang.getCopy("oops")}); } function onCompleteTrack(event) { _playing = false; var _local4 = app.controller.Controller.playlist.getCurrentTrack(); lib.lfm.core.ServiceLocator.get("logger").write(("TrackController >> " + event.target.title) + " track complete"); dispatchEvent({type:"onCompleteTrack", target:this}); clearInterval(_pollPlayback); _pollPlayback = false; if (app.controller.Controller.user.isLastFm()) { lib.lfm.core.ServiceLocator.get("Scrobbler").onCompleteTrack({track:event.target, target:this}); } } function onTrackStartPlaying() { _scrobbled = false; var _local3 = app.controller.Controller.playlist.getCurrentTrack(); if (doFade()) { app.controller.Controller.volume.fadeIn(); } if (app.controller.Controller.user.isLastFm()) { lib.lfm.core.ServiceLocator.get("Scrobbler").onTrackStartPlaying({track:_local3, target:this}); } } function onSubmissionSuccess(event) { _scrobbled = true; } function onTuneRadio(event) { onPressStopButton(event, false); } var _playing = false; var _scrobbled = false; var _consecutiveFailedRequests = 0; var _bufferingTimeout = 10000; var firstPreview = false; var buffering = false; }
Symbol 299 MovieClip [__Packages.lib.lfm.core.model.LfmModel] Frame 0
class lib.lfm.core.model.LfmModel { function LfmModel () { } function toString() { return(false); if ("toString" != null) { var _local2 = "toString"; lib.lfm.core.ServiceLocator.get("logger").write((_local2 + ": ") + this[_local2].toString()); // unexpected jump } lib.lfm.core.ServiceLocator.get("logger").write(("**** LFM Model ---- " + typeof(this)) + " End"); return(_local3); } }
Symbol 300 MovieClip [__Packages.lib.lfm.core.model.Track] Frame 0
class lib.lfm.core.model.Track extends lib.lfm.core.model.LfmModel { var addEventListener, sound, location, dispatchEvent, title, license, fullDuration, creator, id, duration, authKey, freeTrackURL, buyTrackURL, buyAlbumURL; function Track () { super(); mx.events.EventDispatcher.initialize(this); addEventListener("onLoadTrack", app.controller.Controller.track); addEventListener("onCompleteTrack", app.controller.Controller.track); addEventListener("onLoadTrack", app.controller.Controller.menu); addEventListener("onStopTrack", app.controller.Controller.menu); } function getRating() { return(rating); } function initSound() { sound = new Sound(_global.mainTimeline.player); _global.mainTimeline.player._soundbuftime = SOUND_BUFFER_SECS; _global._soundbuftime = SOUND_BUFFER_SECS; sound.onSoundComplete = mx.utils.Delegate.create(this, onSoundComplete); sound.onLoad = mx.utils.Delegate.create(this, onLoad); } function load() { initSound(); if (!location) { lib.lfm.core.ServiceLocator.get("logger").warn("couldnt load this track - no location set"); return(false); } sound.loadSound(location, true); dispatchEvent({type:"onLoadTrack", target:this, success:true}); setVolume(app.controller.Controller.volume.getVolume()); } function play() { dispatchEvent({type:"onPlayTrack", target:this}); lib.lfm.core.ServiceLocator.get("logger").log(("playing " + title) + "..."); sound.start(); setVolume(app.controller.Controller.volume.getVolume()); } function stop() { dispatchEvent({type:"onStopTrack", target:this}); lib.lfm.core.ServiceLocator.get("logger").log("stopped " + title); sound.stop(); sound.position = 0; delete sound; } function isFLP() { var _local2 = location.indexOf("flp"); return(_local2 != -1); } function isARP() { return(license.toLowerCase() == "arp"); } function isFOD() { return(license.toLowerCase() == "fod"); } function isPreview() { return(license.toLowerCase() == "preview"); } function hasFODPlaysLeft() { return(!FODlimit); } function clear() { sound.stop(); delete sound; } function getFullDuration() { return(parseInt(fullDuration)); } function setVolume(volPercent) { sound.setVolume(volPercent); } function toJSON() { var _local2 = app.controller.Controller.playlist.isManualSkip(); return(((((((("{id:" + id) + ",type:9,name:'") + escape(title.replace("'", "\\'"))) + "',creator:'") + escape(creator.replace("'", "\\'"))) + "',manual:") + _local2) + "}"); } function getDuration() { if (duration > 0) { return(duration); } return(sound.duration); } function getPosition() { return(sound.position); } function getSize() { return(sound.getBytesTotal()); } function getPercentagePlayed() { if ((!_loaded) && (duration <= 0)) { return(1); } return(Math.floor((getPosition() / getDuration()) * 100)); } function isStreamable() { return(true); } function getAuthKey() { return(authKey); } function getCreatorURI() { return(((etc.Conf.MUSIC_CATALOGUE_URI + "") + creator) + "/"); } function hasLocation() { return(location.length > 0); } function isFreeDownload() { return(freeTrackURL.length > 1); } function getURI() { return((((etc.Conf.MUSIC_CATALOGUE_URI + "") + creator) + "/_/") + title); } function isValidSound() { return(true); } function getBuyURL() { if (freeTrackURL.length > 1) { return(freeTrackURL); } if (buyTrackURL.length > 1) { return(buyTrackURL); } if (buyAlbumURL.length > 1) { return(buyAlbumURL); } } function onLoad(success) { _loaded = true; if (!success) { dispatchEvent({type:"onLoadTrack", target:this, success:success}); } } function onSoundComplete() { lib.lfm.core.ServiceLocator.get("logger").write("on sound complete"); dispatchEvent({type:"onCompleteTrack", target:this}); } var rating = ""; var FODPlay = false; var FODlimit = false; var _loaded = false; }
Symbol 301 MovieClip [__Packages.lib.lfm.core.model.Artist] Frame 0
class lib.lfm.core.model.Artist extends lib.lfm.core.model.LfmModel { function Artist () { super(); } }
Symbol 19 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object { var func; function Delegate (f) { super(); func = f; } static function create(obj, func) { var _local2 = function () { var _local2 = arguments.callee.target; var _local3 = arguments.callee.func; return(_local3.apply(_local2, arguments)); }; _local2.target = obj; _local2.func = func; return(_local2); } function createDelegate(obj) { return(create(obj, func)); } }
Symbol 302 MovieClip [__Packages.app.view.button.PlayButton] Frame 0
class app.view.button.PlayButton extends MovieClip { var addEventListener, gotoAndStop, enabled, dispatchEvent, createMouseUpTrigger, _mouseListener; function PlayButton () { super(); mx.events.EventDispatcher.initialize(this); addEventListener("onPressStopButton", app.controller.Controller.track); addEventListener("onPressStopButton", app.controller.Controller.display); addEventListener("onPressStopButton", app.controller.Controller.menu); addEventListener("onPressPlayButton", app.controller.Controller.playlist); addEventListener("onPressPlayButton", app.controller.Controller.station); addEventListener("onPressPlayButton", app.controller.Controller.display); addEventListener("onHoverPlayButton", app.controller.Controller.display); addEventListener("onHoverStopButton", app.controller.Controller.display); addEventListener("onRollOutPlayButton", app.controller.Controller.display); if (!hasUserSeenThis) { gotoAndStop("breathing"); } } function enable() { var _local2 = (app.controller.Controller.track.isPlaying() ? "playing_active" : "active"); if (!hasUserSeenThis) { _local2 = "breathing"; } gotoAndStop(_local2); enabled = true; } function disable() { var _local2 = (app.controller.Controller.track.isPlaying() ? "playing_inactive" : "inactive"); lib.lfm.core.ServiceLocator.get("Logger").write("gotoandStop " + _local2); gotoAndStop(_local2); enabled = false; } function setPlaying() { gotoAndStop("playing_active"); enabled = true; } function setStopped() { if (enabled) { gotoAndStop("active"); } } function onRollOver() { hasUserSeenThis = true; if (!app.controller.Controller.track.isPlaying()) { dispatchEvent({type:"onHoverPlayButton", target:this}); } else { dispatchEvent({type:"onHoverStopButton", target:this}); } } function onRollOut() { var _local2 = (app.controller.Controller.track.isPlaying() ? "playing_active" : "active"); gotoAndStop(_local2); dispatchEvent({type:"onRollOutPlayButton", target:this}); } function onPress() { hasUserSeenThis = true; if (app.controller.Controller.track.isPlaying()) { gotoAndStop("playing_onclick"); } else { gotoAndStop("onclick"); } createMouseUpTrigger(); } function onMouseUpTrigger(lfmButton) { lfmButton.onRollOut(); Mouse.removeListener(_mouseListener); } function onReleaseDisplayUpdate(action) { if (app.controller.Controller.track.isPlaying()) { if (action) { dispatchEvent({type:"onPressStopButton", target:this}); } var _local2 = "active"; } else { if (action) { dispatchEvent({type:"onPressPlayButton", target:this}); } disable(); } gotoAndStop(_local2); } function onRelease() { onReleaseDisplayUpdate(true); } var hasUserSeenThis = false; }
Symbol 303 MovieClip [__Packages.app.controller.UserController] Frame 0
class app.controller.UserController extends lib.lfm.core.LfmController { var name, addEventListener, session, sessionKey, dispatchEvent; function UserController () { super(); } function init() { name = etc.Conf.ANON_USER; exists = true; } function initListeners() { addEventListener("onValidUserSession", app.controller.Controller.station); addEventListener("onValidUserSession", app.controller.Controller.display); addEventListener("onValidUserSession", app.controller.Controller.playlist); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetSessionSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetSessionFail", this); } function onGetSessionSuccess(event) { session = true; exists = true; name = event.response[0]; sessionKey = event.response[1]; dispatchEvent({type:"onValidUserSession", target:this}); } function getSessionKey() { return(sessionKey); } function onGetSessionFail(event) { name = etc.Conf.ANON_USER; session = true; exists = true; dispatchEvent({type:"onValidUserSession", target:this}); } function isLastFm() { return((name != undefined) && (name != etc.Conf.ANON_USER)); } function isAnon() { return(!isLastFm()); } var exists = false; }
Symbol 304 MovieClip [__Packages.app.controller.LanguageController] Frame 0
class app.controller.LanguageController extends lib.lfm.core.LfmController { static var instance; var _langRequest, addEventListener, _requestTime, _pollLangResponse, dispatchEvent; function LanguageController () { super(); } function init() { lib.lfm.core.ServiceLocator.get("logger").write("LanguageController : Initialise "); _langRequest = new LoadVars(); _langRequest.onData = mx.utils.Delegate.create(this, onLangResponse); } static function getInstance() { if (instance == null) { instance = new app.controller.LanguageController(); } return(instance); } function initListeners() { addEventListener("onLoadLanguage", app.controller.Controller.display); addEventListener("onLoadLanguage", app.controller.Controller.menu); } function getCopy(key) { lib.lfm.core.ServiceLocator.get("logger").write((("LanguageController : lang=" + etc.Conf.lang) + " key=") + key); var _local2 = _global.langIndex[etc.Conf.lang]; return(_local2[key]); } function getLangDomain() { if (etc.Conf.lang == etc.Conf.LANG_DEFAULT) { return(etc.Conf.WEBHOST); } switch (etc.Conf.lang) { case "zh" : return("www.lastfm.cn"); case "kr" : return("www.lastfm.co.kr"); case "sv" : return("www.lastfm.se"); case "tr" : return("www.lastfm.com.tr"); } return("www.lastfm." + etc.Conf.lang); } function loadCopy(isoCode) { lib.lfm.core.ServiceLocator.get("logger").write("LanguageController : isocode is " + isoCode); if (((isoCode.toLowerCase() == etc.Conf.LANG_DEFAULT) || (isoCode.length < 2)) || (isoCode == undefined)) { loadDefaultCopy(); } else { _langRequest.sendAndLoad((etc.Conf.LANG_URI + isoCode) + ".tpl", _langRequest, "GET"); _requestTime = getTimer(); _pollLangResponse = setInterval(this, "pollLangResponse", 400); } } function loadDefaultCopy() { lib.lfm.core.ServiceLocator.get("logger").write("LanguageController : Copy failed to load, fetching defaut=" + _global.defaultLangCopy.length); if (parse(_global.defaultLangCopy)) { loaded = true; dispatchEvent({type:"onLoadLanguage", target:this}); } } function pollLangResponse() { if (loaded) { clearInterval(_pollLangResponse); } else if ((getTimer() - _requestTime) > timeout) { clearInterval(_pollLangResponse); loadDefaultCopy(); } } function onLangResponse(response) { lib.lfm.core.LfmError.raise("LanguageController : loadlang response: " + response); if (response) { if (parse(response)) { loaded = true; dispatchEvent({type:"onLoadLanguage", target:this}); } } } function parse(langTpl) { var _local8 = langTpl.split("{/l}"); var _local9 = _global.langIndex[etc.Conf.lang]; lib.lfm.core.ServiceLocator.get("logger").write(("LanguageController : parsing " + _local8.length) + " keys for lang file"); var _local3 = 0; while (_local3 < _local8.length) { var _local5 = _local8[_local3]; var _local4 = new RegExp("\\{l ([^}]*)\\}(.*)", "i"); _local4.ignoreCase = true; _local4.exec(_local5); var _local7 = RegExp.$1.substr(keyNamespace.length).trim(); var _local6 = RegExp.$2.trim(); _local9[_local7] = _local6; _local3++; } return(_local8.length > 1); } var keyNamespace = "flashPlayer"; var loaded = false; var timeout = 8000; }
Symbol 305 MovieClip [__Packages.app.controller.ActivityController] Frame 0
class app.controller.ActivityController extends lib.lfm.core.LfmController { var addEventListener, _mouseMoved, _idleFadeOut, dispatchEvent; function ActivityController () { super(); } function initListeners() { addEventListener("onIdleTimeout", app.controller.Controller.display); app.controller.Controller.key.addEventListener("onKeyboardActivity", this); app.controller.Controller.track.addEventListener("onStopTrack", this); _initMouseListener(); } function onMouseMove() { _mouseMoved = true; _refreshActivityListener(); } function _initMouseListener() { Mouse.addListener(this); } function onActivity() { } function onKeyboardActivity() { _refreshActivityListener(); } function _refreshActivityListener() { clearInterval(_idleFadeOut); } function onStartTrack() { } function onStopTrack() { _refreshActivityListener(); } function onIdleTimeout() { if (((!app.controller.Controller.track.isPlaying()) && (!app.controller.Controller.display.isHidden())) && (app.controller.Controller.playlist.isLoaded())) { lib.lfm.core.ServiceLocator.get("logger").write("on idle timeout triggered"); dispatchEvent({type:"onIdleTimeout", target:this}); } } }
Symbol 306 MovieClip [__Packages.app.controller.DisplayController] Frame 0
class app.controller.DisplayController extends lib.lfm.core.LfmController { var tag, track, recommend, station, skip, unauthorised, display, _activePosY, _activePosX, target, durationDisplayInterval, _currentDisplay, timeDisplayInterval, _nextTrackDisplayDelay, lastStatusMsg; function DisplayController () { super(); hideTimeDisplay(); tag = new app.controller.TagDisplayController(); track = new app.controller.TrackDisplayController(); recommend = new app.controller.RecommendDisplayController(); station = new app.controller.StationDisplayController(); skip = new app.controller.SkipRestrictionDisplayController(); unauthorised = new app.controller.UnauthorisedDisplayController(); lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : Initialised"); } function initListeners() { lib.lfm.core.ServiceLocator.get("Client").addEventListener("beforeGetSession", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onAdjustSuccess", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onTuneRadio", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onAdjustFail", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onRadioHandshakeFail", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onInvalidUserSession", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onLoveTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onBanTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onRecommendTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onTagTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onLoveTrackFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onBanTrackFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onRecommendTrackFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onTagTrackFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onCreateStationFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetSessionFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetTopTagsSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetSimilarTagsSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onRPCFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onRPCFault", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onRecommendTrackSuccess", recommend); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onTagTrackSuccess", tag); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetFriendsSuccess", recommend); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onCreateStationSuccess", station); app.controller.Controller.playlist.addEventListener("onEnterShuffleMode", this); app.controller.Controller.playlist.addEventListener("onExitShuffleMode", this); app.controller.Controller.playlist.addEventListener("onLoadMetadataPlaylist", this); } function setMode(newMode) { if ((!this[newMode]) instanceof lib.lfm.core.LfmController) { lib.lfm.core.LfmError.raise("Cant switch display to non-existent mode"); return(false); } if (newMode != "track") { track.disable(); } lib.lfm.core.ServiceLocator.get("logger").write(("DisplayController : display switching to " + newMode) + " mode"); var _local3 = display[newMode + "Display"]; var _local5 = display[mode + "Display"]; var _local4 = {destX:_activePosX, destY:_activePosY}; if (newMode != "track") { _local3._x = _local4.destX; } if (newMode != "track") { _local3._y = _local4.destY; } if ((newMode == "track") || ((newMode == "station") && (mode == "skip"))) { removeOverlay(); } this[newMode].onFocus(); mode = newMode; } function removeOverlay() { this[mode].hide(); } function setTarget(mc) { target = mc; target.tabEnabled = false; target.tabChildren = true; display = target.displayFrame; display.tabEnabled = false; display.tabChildren = true; tag.setTarget(display.tagDisplay); track.setTarget(display.trackDisplay); recommend.setTarget(display.recommendDisplay); station.setTarget(display.stationDisplay); skip.setTarget(display.skipDisplay); unauthorised.setTarget(display.unauthorisedDisplay); track.disable(); _initDisplay(); } function clear() { clearInterval(durationDisplayInterval); clearTrackDisplay(); display.trackDisplay.durationDisplay.clear(); } function _initDisplay() { lib.lfm.display.LfmEffect.pixelAlign(display); target.displayMask._x = -3000; target.displayMask._y = -5; _currentDisplay = display.trackDisplay; _activePosX = _currentDisplay._x - 7; _activePosY = _currentDisplay._y - 42; } function onIdleTimeout() { if (!app.controller.Controller.track.isPlaying()) { } } function unsetStationMode() { } function clearTimeDisplay() { clearInterval(timeDisplayInterval); display.trackDisplay.statusDisplay.resetTime(); } function hideTimeDisplay() { track.hideTimeDisplay(); } function showTimeDisplay() { track.showTimeDisplay(); } function updateDurationDisplay() { track.updateDurationDisplay(); } function updatePlayingStatus() { track.updatePlayingStatus(); } function updateTimeDisplay() { if (app.controller.Controller.track.isPlaying()) { display.trackDisplay.statusDisplay.updateTime(); } } function clearTrackDisplay() { track.clear(); } function showTrack(force) { track.showTrack(app.controller.Controller.playlist.getCurrentTrack(), force); } function showPlayingStatus(msg) { display.trackDisplay.statusDisplay.showPlayingStatus(msg); } function showStatus(msg, loadingAnim) { lib.lfm.core.ServiceLocator.get("Logger").write("showstatus:" + msg); display.trackDisplay.statusDisplay.show(msg, loadingAnim); } function showServiceStatus(msg) { lib.lfm.core.ServiceLocator.get("Logger").write("showservicestatus:" + msg); display.trackDisplay.statusDisplay.showServiceStatus(msg); } function showNotPlayingStatus() { display.trackDisplay.statusDisplay.showPlayingStatus(app.controller.Controller.lang.getCopy("notListening")); } function isHidden() { return(_global.mainTimeline.player._alpha < 1); } function showNowPlaying(nowPlayingText) { track.showNowPlaying(nowPlayingText); } function showShuffleRestStatus(title) { lib.lfm.core.ServiceLocator.get("Logger").write("showing shuffle rest state " + title); track.target.statusDisplay.metadata.artistText.htmlText = "Click to play"; track.target.statusDisplay.metadata.trackText.htmlText = title.truncate(20); } function showPlaylistRestStatus(track) { lib.lfm.core.ServiceLocator.get("logger").log("showplaylistreststatus"); clearInterval(durationDisplayInterval); this.track.durationDisplay.clear(); hideTimeDisplay(); if (track) { var _local3 = track.image; _global.restDuration = false; _global.firstArtistName = track.creator; _global.firstTrackName = track.title; if (_global.Feature.OnDemand && (!_global.Mode.Viral)) { _queuedRestState = true; lib.lfm.core.ServiceLocator.get("logger").write("setting queued rest state"); } } if (_local3) { this.track.showAlbumArt(_local3); } if (_global.restDuration) { showTimeDisplay(); var _local5 = parseInt(_global.restDuration) * 1000; this.track.setDuration(_local5); } if (_global.firstArtistName && (_global.firstTrackName)) { this.track.showPlaylistRestStatus(); } else if (_global.restTitle) { showNowPlaying(_global.restTitle); } else if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { display.trackDisplay.statusDisplay.metadata.trackText.text = app.controller.Controller.lang.getCopy("pressPlayShuffle"); } else { display.trackDisplay.statusDisplay.metadata.trackText.text = app.controller.Controller.lang.getCopy("pressPlay"); } if (etc.Conf.isMode(_global.PLAYLIST_MODE)) { app.controller.Controller.menu.onStopTrack(); app.controller.Controller.menu.target.coreControlMenu.playButton.enable(); } } function showEmbedRadioRestStatus() { display.trackDisplay.statusDisplay.metadata.trackText.text = app.controller.Controller.lang.getCopy("pressPlay"); disable(); } function disable() { app.controller.Controller.volume.disableButton(); app.controller.Controller.menu.target.coreControlMenu.disable(); app.controller.Controller.menu.target.toolbar.disable(); app.controller.Controller.menu.disable(); } function isInQueuedRestState() { return(_queuedRestState); } function onSkip(event) { clearInterval(durationDisplayInterval); display.trackDisplay.durationDisplay.clear(); if (etc.Conf.isMode(_global.RADIO_MODE) && (_global.Feature.Skip)) { } track.hideAlbumArt(); track.hideBuyButton(); var track = app.controller.Controller.playlist.getCurrentTrack(); if ((_global.Feature.OnDemand && (!app.controller.Controller.playlist.externalPlay)) && (!_global.Mode.Viral)) { if ((_global.Feature.FOD && (!app.controller.Controller.track.firstPreview)) && (isInQueuedRestState())) { lib.lfm.core.ServiceLocator.get("logger").write("queued state - dont highlight"); return(undefined); } lib.lfm.core.ServiceLocator.get("logger").write("firstpreview " + app.controller.Controller.track.firstPreview); lib.lfm.core.ServiceLocator.get("logger").write("DisplayController >> onskip"); } _queuedRestState = false; if (_global.Feature.FOD) { showStatus(app.controller.Controller.lang.getCopy("buffering")); } } function onRequestPlaylist(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : requesting playlist"); if ((event.adjust && (_global.Feature.Radio)) && (!_global.Feature.Viewport)) { if (etc.Conf.isMode(_global.SHUFFLE_MODE) && (_global.Mode.Autostart)) { showStatus(app.controller.Controller.lang.getCopy("shuffling"), true); } else { showStatus(app.controller.Controller.lang.getCopy("connectingToRadio"), true); } } } function onTuneRadio() { if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { showStatus(app.controller.Controller.lang.getCopy("shuffling"), true); } else { showStatus(app.controller.Controller.lang.getCopy("connectingToRadio"), true); } app.controller.Controller.menu.target.coreControlMenu.playButton.disable(); app.controller.Controller.menu.disable(); track.onTuneRadio(); } function beforeGetSession(event) { track.onGetSession(); } function onSkipMaximumReached(event) { if (_global.SKIP_RESTRICTION) { setMode("skip"); } } function onLoadMetadataPlaylist(event) { var _local2 = app.controller.Controller.playlist.getMetadataPlaylist(); if (_local2.isShuffle()) { showShuffleRestStatus(_local2.title); } else { showPlaylistRestStatus(_local2.tracks[0]); } } function onLoadPlaylist(event) { if (event.success) { showTimeDisplay(); if (etc.Conf.isMode(_global.EMBED_RADIO_MODE)) { app.controller.Controller.volume.enableButton(); } if (event.adjust && (_global.Feature.Radio)) { if (_global.Mode.Popup) { var _local5 = app.controller.Controller.playlist.getTitle(); getURL (("javascript:setPopupTitle('" + _local5.replace("'", "\\'")) + "');", "_self"); } } else if (_global.Feature.OnDemand) { clearInterval(durationDisplayInterval); display.trackDisplay.durationDisplay.clear(); hideTimeDisplay(); track.hideAlbumArt(); } } else { var _local4 = (event.error.length ? (event.error) : (app.controller.Controller.lang.getCopy("oops"))); showStatus(_local4); app.controller.Controller.menu.target.coreControlMenu.playButton.setStopped(); } } function onLoadTrackFail(event) { showStatus(event.error); } function onBufferTimeout(event) { clearTrackDisplay(); showServiceStatus(app.controller.Controller.lang.getCopy("oops")); } function onLoadTrack(event) { clearTrackDisplay(); display.trackDisplay.durationDisplay.clear(); display.trackDisplay.statusDisplay.clear(); } function onTrackStartPlaying(event) { track.onTrackStartPlaying(event); showTrack(true); showTimeDisplay(); durationDisplayInterval = setInterval(this, "updateDurationDisplay", 200); timeDisplayInterval = setInterval(this, "updateTimeDisplay", 200); display.trackDisplay.statusDisplay.setTrackRefreshInterval(); track.onTrackStartPlaying(); _queuedRestState = false; var track = app.controller.Controller.playlist.getCurrentTrack(); var _local3 = track.creator; if (_global.Feature.Expanded) { getURL (("javascript:LFM.Flash.Player.onNextTrack(" + track.toJSON()) + ");", "_self"); } if (_global.Feature.FOD && (track.FODlimit)) { onFODLimitReached(track); } if (!track.albumArt) { track.showAlbumArt(track.image); } track.refreshBuyButton(); } function onFODLimitReached(track) { getURL (((((("javascript:FOD.createLimitDialog({artist:'" + escape(track.creator.replace("'", "\\'"))) + "',track:'") + escape(track.title.replace("'", "\\'"))) + "',id:'") + track.id) + "'});"); lib.lfm.core.ServiceLocator.get("logger").write(((((("{artist:'" + escape(track.creator.replace("'", "\\'"))) + "',track:'") + escape(track.title.replace("'", "\\'"))) + "',id:'") + track.id) + "'}"); } function onCompleteTrack(event) { lib.lfm.core.ServiceLocator.get("Logger").write("displaycontroller: ONCOMPLETETRACK"); clearTrackDisplay(); track.durationDisplay.clear(); clearInterval(durationDisplayInterval); clearTimeDisplay(); track.hideAlbumArt(); track.hideBuyButton(); track.hideTimeDisplay(); if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE)) { } if (etc.Conf.isMode(_global.PLAYLIST_MODE) && (!app.controller.Controller.playlist.getMetadataPlaylist().isShuffle())) { lib.lfm.core.ServiceLocator.get("Logger").write("next track is " + app.controller.Controller.playlist.getNextTrack().title); track.onStopTrack(event); track.onPressStopButton(event); _nextTrackDisplayDelay = setInterval(this, "showNextPlaylistTrack", 1000); } } function showNextPlaylistTrack() { clearInterval(_nextTrackDisplayDelay); track.target.statusDisplay.showTrack(app.controller.Controller.playlist.getNextTrack(), true, true); } function onPressStopButton(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : ONPRESSSTOPBUTTON"); clearInterval(durationDisplayInterval); clearTrackDisplay(); track.onStopTrack(event); if (etc.Conf.isMode(_global.PLAYLIST_MODE) && (!app.controller.Controller.playlist.getMetadataPlaylist().isShuffle())) { _nextTrackDisplayDelay = setInterval(this, "showNextPlaylistTrack", 1000); } track.onPressStopButton(event); if (_global.Feature.Expanded && (!_global.Mode.Viral)) { getURL ("javascript:LFM.Flash.Player.onStopTrack();", "_self"); } } function onPressPlayButton(event) { if (_global.Feature.Radio && (!_global.radioURL)) { app.controller.Controller.display.setMode("station"); } } function onHoverPlayButton(event) { if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { if (app.controller.Controller.station.hasTuningHistory()) { showStatus(app.controller.Controller.lang.getCopy("pressPlayShuffle")); } return(true); } if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { showStatus(app.controller.Controller.lang.getCopy("connectToShuffle")); } else if (!etc.Conf.isMode(_global.PLAYLIST_MODE)) { showStatus(app.controller.Controller.lang.getCopy("connect")); } } function onRollOutPlayButton(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : HOVER OUT play button"); } function onHoverStopButton(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : onhoverstopbutton"); showTrack(true); } function onRadioHandshakeFail(event) { showPlayingStatus(app.controller.Controller.lang.getCopy("onRadioHandshakeFail")); } function isMouseOverLCDButton() { return(_mouseOverLCDButton); } function onRollOverButton(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : display status - " + event.msg); _mouseOverLCDButton = true; if (event.msg.length > 0) { lastStatusMsg = track.target.statusDisplay.metadata.trackText.text; track.target.statusDisplay.show(event.msg); } } function onRollOutButton(event) { _mouseOverLCDButton = false; lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : onrolloutbutton"); if ((mode == "track") && (app.controller.Controller.track.isPlaying())) { showTrack(true); } } function getChannelType() { return((_global.Feature.OnDemand ? (app.controller.Controller.lang.getCopy("playlist")) : (app.controller.Controller.lang.getCopy("station")))); } function onLoadLanguage(event) { lib.lfm.core.ServiceLocator.get("logger").write("DISPLAYCONTROLLER >>> ONLOADLANGUAGE"); if (_global.disabled) { disable(); return(undefined); } if ((etc.Conf.isMode(_global.EMBED_RADIO_MODE) && (!_global.radioURL)) || (etc.Conf.isMode(_global.EXPANDED_MODE) && (!_global.Mode.Autostart))) { return(showEmbedRadioRestStatus()); } if (_global.Feature.Radio && (_global.radioURL)) { if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { showStatus(app.controller.Controller.lang.getCopy("shuffling"), true); } else { showStatus(app.controller.Controller.lang.getCopy("connectingToRadio"), true); } } if (etc.Conf.isMode(_global.PLAYLIST_MODE) || (_global.Mode.Viral && (!_global.Mode.Popup))) { } } function onLoveTrackSuccess(event) { showServiceStatus(app.controller.Controller.lang.getCopy("onLoveTrackSuccess")); } function onStationDisplayHideComplete(event) { updatePlayingStatus(); } function onBufferingStart(event) { if (!app.controller.Controller.track.isPlaying()) { showStatus(app.controller.Controller.lang.getCopy("buffering"), true); } } function onBanTrackSuccess(event) { showServiceStatus(app.controller.Controller.lang.getCopy("onBanTrackSuccess")); } function onRecommendTrackSuccess(event) { showServiceStatus(app.controller.Controller.lang.getCopy("onRecommendTrackSuccess")); } function onTagTrackSuccess(event) { showServiceStatus(app.controller.Controller.lang.getCopy("onTagTrackSuccess")); } function onLoveTrackFail(event) { onRPCFail(event); } function onEnterShuffleMode() { } function onExitShuffleMode() { } function onInvalidUserSession(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : invalid user session"); } function onBanTrackFail(event) { onRPCFail(event); } function onRecommendTrackFail(event) { onRPCFail(event); } function onTagTrackFail(event) { onRPCFail(event); } function onCreateStationFail(event) { onRPCFail(event); } function onCreateStationSuccess(event) { clear(); } function onAdjustFail(event) { showServiceStatus(event.response); if (mode != "track") { setMode("track"); } track.onAdjustFail(); } function onStationHandshakeFail(event) { showServiceStatus(event.response); if (mode != "track") { setMode("track"); } } function onValidUserSession(event) { if ((!_global.radioURL) && (etc.Conf.isMode(_global.EXPANDED_MODE))) { app.controller.Controller.menu.target.coreControlMenu.disable(); setMode("station"); } } function onPressTagButton(event) { var _local1 = app.controller.Controller.playlist.getCurrentTrack(); getURL (("javascript:LFM.Flash.Player.tag({id:" + _local1.id) + ",type:9});", "_self"); } function onPressRecommendButton(event) { var _local1 = app.controller.Controller.playlist.getCurrentTrack(); getURL (("javascript:LFM.Flash.Player.send({id:" + _local1.id) + ",type:9});", "_self"); } function onPressStationButton(event) { setMode("station"); } function onUnauthorisedAction(event) { var _local1 = app.controller.Controller.playlist.getCurrentTrack(); getURL (("javascript:LFM.Flash.Player.login({id:" + _local1.id) + ",type:9});", "_self"); } function onGetTopTagsSuccess(event) { station.onGetTopTagsSuccess(event); } function onEndPlaylist(event) { returnToRestState(); } function returnToRestState() { if (_global.Feature.Radio) { return(clear()); } if ((((_global.Feature.OnDemand || (etc.Conf.isMode(_global.SHUFFLE_MODE))) && (!_global.isInline)) && (!_global.Mode.Viral)) && (!_global.Feature.FOD)) { lib.lfm.core.ServiceLocator.get("logger").write("onflashplayerstoptrack"); getURL ("javascript:onFlashPlayerStopTrack();", "_self"); showNotPlayingStatus(); showPlaylistRestStatus(); } } function onRPCFail(event) { lib.lfm.core.ServiceLocator.get("logger").write("DisplayController : RPC FAIL! " + event.response); if (event.response.length > 1) { showServiceStatus(event.response); } else { showServiceStatus(app.controller.Controller.lang.getCopy("oops")); } if (mode != "track") { setMode("track"); } } function onRPCResponse(event) { } function onRPCFault(event) { showServiceStatus(app.controller.Controller.lang.getCopy("oops")); if (mode != "track") { setMode("track"); } } var mode = "track"; var _stationPosX = 5; var _stationPosY = -34; var _initStationPosX = 5; var _initStationPosY = 68.8; var _mouseOverLCDButton = false; var _queuedRestState = false; }
Symbol 307 MovieClip [__Packages.lib.lfm.core.LfmDisplayController] Frame 0
class lib.lfm.core.LfmDisplayController extends lib.lfm.core.LfmController { var target, track, _inputTxt, _submitButton, _cancelButton, _keyboardIndex; function LfmDisplayController () { super(); } function init() { _init(); } function setTarget(mc) { target = mc; _initView(); _initKeyboardAccessibility(); } function onFocus() { refresh(); _setupKeyboardAccessibility(); setTrack(app.controller.Controller.playlist.getCurrentTrack()); app.controller.Controller.menu.target.disable(); app.controller.Controller.menu.target.toolbar.disable(); _onFocus(); } function onBlur() { _teardownKeyboardAccessibility(); _onBlur(); } function setTrack(track) { this.track = track; } function setInputTxt(txt) { _inputTxt = txt; } function setSubmitButton(mc) { _submitButton = mc; } function setCancelButton(mc) { _cancelButton = mc; } function _setupKeyboardAccessibility() { app.controller.Controller.key.disableMenuAccess(); target.tabChildren = true; var _local2 = 0; while (_local2 < _keyboardIndex.length) { _keyboardIndex[_local2].tabEnabled = true; _keyboardIndex[_local2].focusEnabled = true; _keyboardIndex[_local2].tabIndex = _local2; _local2++; } } function refreshKeyboardAccessibility() { _setupKeyboardAccessibility(); } function _teardownKeyboardAccessibility() { app.controller.Controller.key.enableMenuAccess(); target.tabChildren = false; target.tabEnabled = false; var _local2 = 0; while (_local2 < _keyboardIndex.length) { _keyboardIndex[_local2].tabEnabled = false; _keyboardIndex[_local2].focusEnabled = false; _keyboardIndex[_local2].tabIndex = _local2; _local2++; } } function _initKeyboardAccessibility() { target.tabEnabled = false; target.tabChildren = true; } function refresh() { } function _init() { } function _initView() { } function _onFocus() { } function _onBlur() { } }
Symbol 308 MovieClip [__Packages.lib.lfm.display.LfmButton] Frame 0
class lib.lfm.display.LfmButton extends lib.lfm.display.LfmUIElement { var gotoAndStop, _langKey, txt, onRollOverMsg, dispatchEvent, icon, _pressed, hitTest, _mouseListener, enabled; function LfmButton () { super(); } function init() { lib.lfm.core.ServiceLocator.get("logger").info("------------ LFM Button Instansiated"); gotoAndStop("onRelease"); _enableDisplayButtonText(); txt.text = app.controller.Controller.lang.getCopy(_langKey); } function _disableDisplayButtonText() { _global.defaultTextFormat.color = COLOR_INACTIVE; _global.defaultTextFormat.align = "center"; txt.setTextFormat(_global.defaultTextFormat); txt.setNewTextFormat(_global.defaultTextFormat); txt.text = txt.text; _global.defaultTextFormat.color = COLOR_ACTIVE; _global.defaultTextFormat.align = "left"; } function _enableDisplayButtonText() { _global.defaultTextFormat.color = COLOR_BUTTON; _global.defaultTextFormat.align = "center"; txt.setTextFormat(_global.defaultTextFormat); txt.setNewTextFormat(_global.defaultTextFormat); txt.text = txt.text; _global.defaultTextFormat.color = COLOR_ACTIVE; _global.defaultTextFormat.align = "left"; } function onRollOver() { lib.lfm.core.ServiceLocator.get("logger").log(("> LFMButton : " + this) + "_onRollOver"); onRollOverMsg = app.controller.Controller.lang.getCopy(_langKey); dispatchEvent({type:"onRollOverButton", target:this, msg:onRollOverMsg}); } function onRollOut() { lib.lfm.core.ServiceLocator.get("logger").log(("> LFMButton : " + this) + "_onRollOut"); dispatchEvent({type:"onRollOutButton", target:this}); } function onPress() { lib.lfm.core.ServiceLocator.get("logger").log(("> LFMButton : " + this) + "_onPress"); icon.gotoAndStop("onClick"); createMouseUpTrigger(); _pressed = true; if (!_rollOutListener) { _rollOutListener = setInterval(this, "rollOutListener", 500); } } function onRelease() { lib.lfm.core.ServiceLocator.get("logger").log(("> LFMButton : " + this) + "_onRelease"); icon.gotoAndStop("onRelease"); _pressed = false; } function releaseDisplay() { _pressed = false; icon.gotoAndStop("onRelease"); } function rollOutListener() { if (!hitTest(_root._xmouse, _root._ymouse, true)) { clearInterval(_rollOutListener); _rollOutListener = false; if (_pressed) { releaseDisplay(); onRollOut(); } } } function createMouseUpTrigger() { _mouseListener = new Object(); var parent = this; _mouseListener.onMouseUp = function () { parent.onMouseUpTrigger(parent); }; Mouse.addListener(_mouseListener); } function onMouseUpTrigger(lfmButton) { lfmButton.icon.gotoAndStop("onRelease"); Mouse.removeListener(_mouseListener); } function disable() { icon.gotoAndStop("inactive"); enabled = false; } function enable() { icon._alpha = 100; icon.gotoAndStop("onRelease"); active = true; enabled = true; } var active = true; var _rollOutListener = false; }
Symbol 309 MovieClip [__Packages.app.controller.SkipRestrictionDisplayController] Frame 0
class app.controller.SkipRestrictionDisplayController extends lib.lfm.core.LfmDisplayController { var target, clear, _msgText, _inFocus, _changedField, _teardownKeyboardAccessibility; function SkipRestrictionDisplayController () { super(); } function _initView() { target.bg._alpha = 0; } function _onFocus() { clear(); lib.lfm.core.LfmError.raise("calling onfocus"); _msgText = Controller.lang.getCopy("skipRestrictionInfo"); _initMsgText(); Controller.menu.target.disable(); hideButtons(); target._visible = true; lib.lfm.display.LfmEffect.Fade(100, target.bg, 0, {target:this, method:"onFadeInComplete"}); } function _onBlur() { _inFocus = false; _changedField = false; _teardownKeyboardAccessibility(); } function _initMsgText() { _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; _global.defaultTextFormat.align = "center"; target.infoText.setTextFormat(_global.defaultTextFormat); target.infoText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = COLOR_ACTIVE; _global.defaultTextFormat.align = "left"; target.infoText.text = _msgText; } function hideButtons() { target.infoText._visible = false; target.skipRestrictionTuneButton._visible = false; target.continueButton._visible = false; } function showButtons() { target.infoText._visible = true; target.skipRestrictionTuneButton._visible = true; target.continueButton._visible = true; } function hide() { hideButtons(); lib.lfm.display.LfmEffect.Fade(0, target.bg, 0, {target:this, method:"onFadeOutComplete"}); } function onFadeOutComplete() { target._visible = false; if (Controller.display.mode == "track") { Controller.display.track.enable(); } } function onFadeInComplete() { showButtons(); target.skipRestrictionTuneButton.init(); target.continueButton.init(); } }
Symbol 310 MovieClip [__Packages.lib.lfm.display.LfmEffect] Frame 0
class lib.lfm.display.LfmEffect { function LfmEffect () { } static function Fade(opacity, mc, offset, callBack, speed) { var born = getTimer(); mc._visible = true; if (offset == undefined) { offset = 0; } if (!speed) { speed = 1; } mc.onEnterFrame = function () { var _local2 = getTimer() - born; if (_local2 > offset) { if (Math.abs(this._alpha - opacity) > 1) { this._alpha = this._alpha + ((opacity - this._alpha) / (2 / speed)); } else { this.onEnterFrame = null; if (callBack != undefined) { var _local3 = callBack.target; _local3[callBack.method](); } } } }; } static function killAnimation(mc) { delete mc.onEnterFrame; } static function startTextLoadingAnimation(txtField) { lib.lfm.core.ServiceLocator.get("logger").warn("start loading anim"); if (_global.anim.loadingAnimation) { clearInterval(_global.anim.loadingAnimation); } _global.anim = _global.mainTimeline.createEmptyMovieClip("tmpTextAnimController", _global.mainTimeline.getNextHighestDepth()); txtField.originalText = txtField.text; txtField.counter = 0; anim.textLoadingAnimation = function (txt) { var _local3 = txt.counter % 4; txt.text = txt.originalText; var _local1 = 0; while (_local1 < _local3) { txt.text = (txt.text = txt.text + "."); _local1++; } txt.counter++; }; if (!anim.loadingAnimation) { anim.loadingAnimation = setInterval(anim, "textLoadingAnimation", 200, txtField); } } static function stopTextLoadingAnimation(txtField) { lib.lfm.core.ServiceLocator.get("logger").warn("finish loading anim"); clearInterval(anim.loadingAnimation); anim.loadingAnimation = false; } static function Scale(mc, options) { mc.onEnterFrame = function () { if (mc._xscale != options._xscale) { this._xscale = this._xscale + speed; } }; } static function ResizeImage(mc, width) { var _local2 = mc._width; var _local3 = mc._height; scaleXPercent = (width / _local2) * 100; scaleYPercent = scaleXpercent; mc._xscale = scaleXPercent; mc._yscale = scaleYPercent; } static function scrollingText(target, msg, isHtml, callBack, depth) { if (depth == undefined) { depth = _global.mainTimeline.getNextHighestDepth(); } var _local3 = _global.mainTimeline.createEmptyMovieClip("tmpScrollController", depth); var n = 1; var target = target; var msg = msg; var callBack = callBack; target.html = isHtml; _local3.callBack = function () { callBack.target[callBack.method](); }; _local3.onEnterFrame = function () { if (n > msg.length) { this.onEnterFrame = null; return(this.callBack()); } if (msg.substr(n - 1, 1) == "<") { n = msg.indexOf(">", n); } target.htmlText = msg.substr(0, n); n++; }; return(_local3); } static function Spin(mc) { mc.onEnterFrame = function () { this._rotation = this._rotation + 12; }; } static function invadingText(target, msg, oldMsg) { lib.lfm.core.ServiceLocator.get("logger").warn("scrolling text"); var _local3 = _global.mainTimeline.createEmptyMovieClip("tmpScrollController", _global.mainTimeline.getNextHighestDepth()); var n = 1; var target = target; var msg = msg; var oldMsg = oldMsg; target.html = true; _local3.invaded = oldMsg.substr(n); _local3.onEnterFrame = function () { this.invaded = this.invaded.slice(0, oldMsg.length - n); if ((this.invaded.length == 0) && (n > msg.length)) { this.onEnterFrame = null; } target.htmlText = ((msg.substr(0, n) + "<font color=\"#cccccc\">") + this.invaded) + "</font>"; n++; }; } static function Move(mc, x, y, callBackMethod, customSpeed) { mc.ydone = 0; mc.xdone = 0; mc.moving = true; var speed = ((customSpeed == undefined) ? 1.3 : (customSpeed)); ((zoom != undefined) ? ((scale = zoom)) : ((scale = mc._xscale))); mc.onEnterFrame = function () { if ((Math.abs(x - this._x) > 1) && (this.xdone != 1)) { this._x = this._x + ((x - this._x) / (2 / speed)); } else { this._x = Math.ceil(this._x); this.xdone = 1; } if (Math.abs(y - this._y) > 1) { this._y = this._y + ((y - this._y) / (2 / speed)); this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (Math.abs(scale - this._xscale) > 1) { this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (this.xdone != 0) { lib.lfm.core.ServiceLocator.get("logger").log("done moving"); this.onEnterFrame = null; this.moving = false; if (callBackMethod != undefined) { this[callBackMethod](); } } }; } static function GradualSeek(mc, x, y, callBackMethod, customSpeed) { mc.ydone = 0; mc.xdone = 0; mc.moving = true; var speed = ((customSpeed == undefined) ? 2 : (customSpeed)); ((zoom != undefined) ? ((scale = zoom)) : ((scale = mc._xscale))); mc.timeStarted = getTimer(); mc.onEnterFrame = function () { if ((Math.abs(x - this._x) > 1) && (this.xdone != 1)) { this._x = this._x + ((x - this._x) / (2 / speed)); } else { this.xdone = 1; } var _local3 = (y - this._y) / Math.abs(y - this._y); var _local2 = (getTimer() - this.timeStarted) / 5; if (Math.abs(y - this._y) > (_local2 * speed)) { this._y = this._y + ((speed * _local3) * _local2); this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (Math.abs(scale - this._xscale) > 1) { this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (this.xdone != 0) { this._y = Math.ceil(y); lib.lfm.core.ServiceLocator.get("logger").log("done moving"); this.onEnterFrame = null; this.moving = false; if (callBackMethod != undefined) { this[callBackMethod](); } } }; } static function HorizontalMove(mc, x, y, offset, callBack, customSpeed) { mc.ydone = 0; mc.xdone = 0; if (!offset) { offset = 0; } mc.moving = true; var callBack = callBack; var speed = ((customSpeed == undefined) ? 1 : (customSpeed)); var born = getTimer(); ((zoom != undefined) ? ((scale = zoom)) : ((scale = mc._xscale))); mc.onEnterFrame = function () { var _local2 = getTimer() - born; if (_local2 <= offset) { return(undefined); } if ((Math.abs(x - this._x) > 1) && (this.xdone != 1)) { this._x = this._x + ((x - this._x) / (2 / speed)); } else { this._x = Math.ceil(this._x); this.xdone = 1; } if (Math.abs(y - this._y) > 1) { this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (Math.abs(scale - this._xscale) > 1) { this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (this.xdone != 0) { this._y = this._y; lib.lfm.core.ServiceLocator.get("logger").log("done moving"); this.onEnterFrame = null; this.moving = false; if (callBack != undefined) { callBack.object[callBack.method](); } } }; } static function VerticalScroll(options) { options.mc.ydone = 0; options.mc.xdone = 0; options.mc.moving = true; var speed = ((options.speed == undefined) ? 1.3 : (options.speed)); ((options.zoom != undefined) ? ((scale = options.zoom)) : ((scale = options.mc._xscale))); options.mc.onEnterFrame = function () { if ((Math.abs(x - this._x) > 1) && (this.xdone != 1)) { this._x = this._x + speed; } else { this._x = Math.ceil(this._x); this.xdone = 1; } if (Math.abs(y - this._y) > 1) { this._y = this._y + speed; this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (Math.abs(scale - this._xscale) > 1) { this._yscale = this._yscale + ((scale - this._yscale) / (2 / speed)); this._xscale = this._yscale; } else if (this.xdone != 0) { this._y = Math.ceil(this._y); lib.lfm.core.ServiceLocator.get("logger").log("done moving"); this.onEnterFrame = null; this.moving = false; if (options.callBackMethod != undefined) { this[options.callBackMethod](); } } }; } static function pixelAlign(mc) { mc._x = Math.ceil(mc._x); mc._y = Math.ceil(mc._y); } }
Symbol 311 MovieClip [__Packages.app.controller.TagDisplayController] Frame 0
class app.controller.TagDisplayController extends lib.lfm.core.LfmDisplayController { var target, _keyboardIndex, refreshKeyboardAccessibility, track; function TagDisplayController () { super(); } function _initView() { target.tagSubmitButton.addEventListener("onSubmitTags", this); _initInputField(); _initHelpText(); target.bg._alpha = 0; _keyboardIndex = [target.tagInputText, target.tagSubmitButton, target.cancelButton]; } function _onFocus() { clear(); lib.lfm.core.LfmError.raise("calling onfocus"); _initInputField(); _initHelpText(); hideButtons(); target._visible = true; lib.lfm.display.LfmEffect.pixelAlign(target); target._y = target._y - 1; _keyboardIndex = [target.tagInputText, target.tagSubmitButton, target.cancelButton]; refreshKeyboardAccessibility(); lib.lfm.display.LfmEffect.pixelAlign(target.tagSubmitButton); lib.lfm.display.LfmEffect.pixelAlign(target.cancelButton); lib.lfm.display.LfmEffect.pixelAlign(target.tagSubmitButton.txt); lib.lfm.display.LfmEffect.pixelAlign(target.cancelButton.txt); lib.lfm.display.LfmEffect.Fade(100, target.bg, 0, {target:this, method:"onFadeInComplete"}); } function clear() { _changedField = false; } function hideButtons() { target.tagInputText._visible = false; target.infoText._visible = false; target.msgText._visible = false; target.tagSubmitButton._visible = false; target.cancelButton._visible = false; } function showButtons() { target.tagInputText._visible = true; target.infoText._visible = true; target.msgText._visible = true; target.tagSubmitButton._visible = true; target.cancelButton._visible = true; } function hide() { hideButtons(); lib.lfm.display.LfmEffect.Fade(0, target.bg, 0, {target:this, method:"onFadeOutComplete"}); } function onFadeOutComplete() { target._visible = false; app.controller.Controller.display.track.enable(); } function onFadeInComplete() { showButtons(); target.tagSubmitButton.init(); target.cancelButton.init(); target.tagSubmitButton.disable(); } function _initInputField() { var _local3 = this; lib.lfm.display.LfmEffect.pixelAlign(target.tagInputText); target.tagInputText.setTextFormat(_global.defaultTextFormat); target.tagInputText.setNewTextFormat(_global.defaultTextFormat); target.tagInputText.border = false; target.tagInputText.background = false; target.tagInputText.html = true; target.tagInputText.maxChars = 300; target.tagInputText.restrict = "A-Z 0-9 a-z \\- \\,"; target.tagInputText.htmlText = ((((((("<font face=\"" + PRIMARY_FONT) + "\" size=\"") + FONT_SIZE) + "\" color=\"") + COLOR_TRACK_STATUS_MSG) + "\">") + app.controller.Controller.lang.getCopy("tagInputMsg")) + "</font>"; target.tagInputText.onSetFocus = function () { this.htmlText = ""; }; target.tagInputText.onChanged = mx.utils.Delegate.create(this, onTagInputChanged); } function onTagInputChanged() { _changedField = true; target.tagSubmitButton.enable(); _keyboardIndex = [target.tagInputText, target.tagSubmitButton, target.cancelButton]; refreshKeyboardAccessibility(); } function _initHelpText() { lib.lfm.display.LfmEffect.pixelAlign(target.infoText); target.infoText.html = true; target.infoText.setTextFormat(infoTextFormat); target.infoText.setNewTextFormat(infoTextFormat); target.infoText.htmlText = ("<a href=\"" + TAG_HELP_URI) + "\">[?]</a>"; } function setTrack(track) { this.track = track; _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; _global.defaultTextFormat.align = "center"; target.msgText.setTextFormat(_global.defaultTextFormat); target.msgText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = COLOR_ACTIVE; _global.defaultTextFormat.align = "left"; target.msgText.text = ((app.controller.Controller.lang.getCopy("taggingTrack") + ": '") + track.title) + "'"; } function submitTagTrackRequest() { var _local2 = new Object(); _local2.track = app.controller.Controller.playlist.getCurrentTrack(); _local2.tags = target.tagInputText.text.split(","); _local2.mode = "append"; lib.lfm.core.ServiceLocator.get("Client").call("tagTrack", _local2); } function onSubmitTags(event) { if ((target.tagInputText.text.length < 2) || (!_changedField)) { return(undefined); } submitTagTrackRequest(); } function onTagTrackSuccess(event) { app.controller.Controller.display.setMode("track"); } var _changedField = false; }
Symbol 312 MovieClip [__Packages.app.controller.TrackDisplayController] Frame 0
class app.controller.TrackDisplayController extends lib.lfm.core.LfmController { var target, _trackStatusPos, _serviceStatusPos, _imgOverlay, _showIdleInterval, _timeInterval, _logoInterval; function TrackDisplayController () { super(); } function setTarget(mc) { target = mc; target.tabEnabled = false; target.tabChildren = false; initTrackText(); target.attachMovie("trackTextMask", "mask", target.getNextHighestDepth(), {_x:62, _y:-120}); target.statusDisplay.setMask(target.mask); target.attachMovie("trackTextMask", "overlay", target.getNextHighestDepth(), {_x:61, _y:-120}); var _local2 = new Color(target.overlay); _local2.setRGB(526344); target.overlay._alpha = 0; _trackStatusPos = {_x:target.statusDisplay._x, _y:target.statusDisplay._y}; _serviceStatusPos = {_x:_trackStatusPos._x, _y:_trackStatusPos._y - 44}; _setTextFormats(); var _local3 = new flash.filters.BlurFilter(1, 1, 2); } function _setTextFormats() { target.statusDisplay._setMetadataTextFormat(); _global.defaultTextFormat.bold = false; _global.defaultTextFormat.color = 13421772 /* 0xCCCCCC */; target.timeText.setTextFormat(_global.defaultTextFormat); target.timeText.setNewTextFormat(_global.defaultTextFormat); target.elapsedText.setTextFormat(_global.defaultTextFormat); target.elapsedText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = 3355443 /* 0x333333 */; } function disable() { app.controller.Controller.menu.disable(); app.controller.Controller.menu.target.coreControlMenu.disable(); target.buyButton.disable(); _imgOverlay.enabled = false; } function enable() { app.controller.Controller.menu.enable(); app.controller.Controller.menu.target.coreControlMenu.enable(); _imgOverlay.enabled = true; target.buyButton.enable(); } function showPlaylistRestStatus() { _setTextFormats(); lib.lfm.core.ServiceLocator.get("logger").write("showplaylistreststatus"); target.statusDisplay.metadata.trackText.htmlText = _global.firstTrackName; target.statusDisplay.metadata.artistText.htmlText = _global.firstArtistName; showNowPlaying(_global.restTitle); } function showNowPlaying(nowPlayingText) { lib.lfm.core.ServiceLocator.get("logger").write("shownowplaying " + nowPlayingText); target.nowPlayingText.text = nowPlayingText; } function showTrack(track, force) { _setTextFormats(); if (track["lastfm:sponsored"] != undefined) { var _local3 = (" (Recommended by " + track["lastfm:sponsored"]) + ")"; } target.statusDisplay.showTrack(track, force); } function onFocus() { lib.lfm.core.LfmError.raise("onfocus track display"); app.controller.Controller.menu.enable(); app.controller.Controller.menu.target.toolbar.enable(); if (app.controller.Controller.track.isPlaying()) { app.controller.Controller.display.showTrack(); updatePlayingStatus(); return(true); } if (!app.controller.Controller.station.isTuning()) { _showIdleInterval = setInterval(this, "showIdle", 2000); } } function getDurationDisplayText(toTrackEnd) { var _local5 = ":"; var _local4; var _local3 = Math.floor(toTrackEnd / 1000); var _local1 = Math.floor(_local3 / 60); var _local2; if (_local3 < 0) { _local3 = 0; } if (_local1 < 0) { _local1 = 0; } _local4 = _local3 - (_local1 * 60); if (_local1 < 10) { _local2 = "0" + _local1.toString(); } else { _local2 = _local1.toString(); } _local2 = _local2 + _local5; if (_local4 < 10) { _local2 = _local2 + ("0" + _local4.toString()); } else { _local2 = _local2 + _local4.toString(); } return(_local2); } function focusServiceStatus(immediate) { immediate = true; if (target.statusDisplay.isScrolling()) { target.statusDisplay.stopTrackTextScroll(); } if (!immediate) { _focusingServiceStatus = true; } lib.lfm.core.ServiceLocator.get("Logger").write("focus service status"); if (immediate) { target.statusDisplay.status_._visible = true; target.statusDisplay.metadata._visible = false; target.statusDisplay.status_._alpha = 100; target.overlay.onEnterFrame = null; target.overlay._alpha = 0; onCompleteMetadataFade(true); } else { lib.lfm.display.LfmEffect.Fade(100, target.overlay, 0, {target:this, method:"onCompleteMetadataFade"}, 1.3); } } function onCompleteMetadataFade(immediate) { target.statusDisplay.status_._visible = true; target.statusDisplay.metadata._visible = false; if (immediate) { target.statusDisplay.onCompleteServiceStatusTransition(); } else { lib.lfm.display.LfmEffect.Fade(0, target.overlay, 0, {target:target.statusDisplay, method:"onCompleteServiceStatusTransition"}, 1.3); } } function focusTrackStatus() { lib.lfm.core.ServiceLocator.get("Logger").write("showing track metadata = " + target.statusDisplay.showingTrackMetadata()); if ((!target.statusDisplay.showingTrackMetadata()) || (_focusingServiceStatus)) { _metadataLock = false; lib.lfm.core.ServiceLocator.get("Logger").write("focus track status"); lib.lfm.display.LfmEffect.Fade(100, target.overlay, 0, {target:this, method:"onCompleteStatusFade"}, 1.3); } } function isFocusingStatus() { return(_focusingServiceStatus); } function onCompleteStatusFade() { target.statusDisplay.status_._visible = false; target.statusDisplay.metadata._visible = true; lib.lfm.display.LfmEffect.Fade(0, target.overlay, 0, {target:target.statusDisplay, method:"onCompleteTrackTransition"}, 1.3); } function onCompleteTransition() { _metadataLock = true; } function setDuration(trackLength) { lib.lfm.core.ServiceLocator.get("logger").write("trackdisplaycontroller restduration:::::::::" + trackLength); target.timeText.text = "-" + getDurationDisplayText(trackLength); } function showTimeDisplay() { _timeInterval = setInterval(this, "_showTimeDisplay", 1200); } function _showTimeDisplay() { clearInterval(_timeInterval); target.timeText._visible = true; target.elapsedText._visible = true; } function initTrackText() { target.statusDisplay.metadata.trackText.autoSize = "left"; target.statusDisplay._initTrackTextXPos = target.statusDisplay.metadata.trackText._x; target.statusDisplay.metadata.trackText.multiline = false; target.statusDisplay.metadata.trackText.wordWrap = false; } function onCompleteMove() { lib.lfm.display.LfmEffect.pixelAlign(target.statusDisplay.metadata.trackText); lib.lfm.display.LfmEffect.pixelAlign(target.statusDisplay.status.statusText); } function showIdle() { clearInterval(_showIdleInterval); if ((!app.controller.Controller.track.isPlaying()) && (!app.controller.Controller.station.busy())) { app.controller.Controller.display.showNotPlayingStatus(); } } function clear() { target.statusDisplay.clear(); app.controller.Controller.display.clearTimeDisplay(); hideTimeDisplay(); hideDurationDisplay(); } function hideDurationDisplay() { target.durationDisplay.clear(); } function hideBuyButton() { } function hideTimeDisplay() { target.timeText.text = ""; target.elapsedText.text = ""; target.timeText._visible = false; target.elapsedText._visible = false; } function updateDurationDisplay() { var _local2 = app.controller.Controller.playlist.getCurrentTrack(); var _local3 = _local2.getPercentagePlayed(); target.durationDisplay.gotoAndStop(_local3); } function updatePlayingStatus() { if (app.controller.Controller.track.isPlaying()) { app.controller.Controller.display.showPlayingStatus((app.controller.Controller.lang.getCopy("listening") + " ") + app.controller.Controller.playlist.getTitle()); } else { app.controller.Controller.display.showNotPlayingStatus(); } } function onTrackStartPlaying() { if (_playingTransitionLock) { _playingTransitionLock = false; target.gotoAndPlay(2); } } function onStopTrack() { hideBuyButton(); target.durationDisplay.clear(); target.gotoAndPlay(9); clear(); _playingTransitionLock = true; } function onTuneRadio() { } function onGetSession() { _logoInterval = setInterval(this, "_startLogoAnim", 100); } var _playingTransitionLock = true; var _metadataLock = true; var _focusingServiceStatus = true; }
Symbol 313 MovieClip [__Packages.app.controller.RecommendDisplayController] Frame 0
class app.controller.RecommendDisplayController extends lib.lfm.core.LfmDisplayController { var _initX, target, _initY, _keyboardIndex, _nameInputMsg, track, refreshKeyboardAccessibility, _recipient, _message, requestFriendsDelay, refreshPosInterval, friends; function RecommendDisplayController () { super(); } function _initView() { _initX = Math.ceil(target.display._x); _initY = Math.ceil(target.display._y); target.display.nameSubmitButton.onRelease = mx.utils.Delegate.create(this, onSubmitName); _keyboardIndex = [target.display.nameInputText, target.display.cancelButton]; var _local2 = new Object(); _local2.click = mx.utils.Delegate.create(this, onSubmitName); target.display.nameSubmitButton.addEventListener(_local2); target.display.bg._alpha = 0; } function _initNameInputField() { lib.lfm.display.LfmEffect.pixelAlign(target.display.nameInputText); target.display.nameInputText.setTextFormat(_global.defaultTextFormat); target.display.nameInputText.setNewTextFormat(_global.defaultTextFormat); target.display.nameInputText.border = false; target.display.nameInputText.background = false; target.display.nameInputText.html = true; target.display.nameInputText.maxChars = 100; target.display.nameInputText.htmlText = ((("<font color=\"" + COLOR_TRACK_STATUS_MSG) + "\">") + _nameInputMsg) + "</font>"; target.display.nameInputText.onSetFocus = function () { this.htmlText = ""; }; target.display.nameInputText.onChanged = mx.utils.Delegate.create(this, onChangeNameInputText); } function _initMsgInputField() { target.display.msgMsgText.setTextFormat(_global.defaultTextFormat); target.display.msgMsgText.setNewTextFormat(_global.defaultTextFormat); target.display.msgInputText.setTextFormat(_global.defaultTextFormat); target.display.msgInputText.setNewTextFormat(_global.defaultTextFormat); target.display.msgMsgText.text = app.controller.Controller.lang.getCopy("recommendInfoMsg"); var parent = this; lib.lfm.display.LfmEffect.pixelAlign(target.display.msgInputText); target.display.msgInputText.border = false; target.display.msgInputText.background = true; target.display.msgInputText.backgroundColor = 16777215 /* 0xFFFFFF */; target.display.msgInputText.html = true; target.display.msgInputText.maxChars = 100; target.display.msgInputText.htmlText = ("<font color=\"" + COLOR_TRACK_STATUS_MSG) + "\">Type a message in here</font>"; target.display.msgInputText.onSetFocus = function () { this.htmlText = ""; }; target.display.msgInputText.onChanged = function () { parent._changedField = true; }; } function setTrackMsg() { lib.lfm.display.LfmEffect.pixelAlign(target.display.msgText); _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; _global.defaultTextFormat.align = "center"; target.display.msgText.setTextFormat(_global.defaultTextFormat); target.display.msgText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = COLOR_ACTIVE; _global.defaultTextFormat.align = "left"; target.display.msgText.text = ((app.controller.Controller.lang.getCopy("recommendTrack") + ": '") + track.title) + "'"; } function _onFocus() { _nameInputMsg = (app.controller.Controller.user.isLastFm() ? (app.controller.Controller.lang.getCopy("recommendInputLoggedIn")) : (app.controller.Controller.lang.getCopy("recommendInputAnon"))); _initNameInputField(); _initMsgInputField(); lib.lfm.core.LfmError.raise("calling onfocus"); _keyboardIndex = [target.display.nameInputText, target.display.cancelButton]; refreshKeyboardAccessibility(); target.display._visible = true; hideButtons(); setTrackMsg(); lib.lfm.display.LfmEffect.pixelAlign(target); target._y = target._y - 1; lib.lfm.display.LfmEffect.pixelAlign(target.display); lib.lfm.display.LfmEffect.Fade(100, target.display.bg, 0, {target:this, method:"onFadeInComplete"}); } function hideButtons() { target.display.nameInputText._visible = false; target.display.msgText._visible = false; target.display.nameSubmitButton._visible = false; target.display.cancelButton._visible = false; } function showButtons() { target.display.nameInputText._visible = true; target.display.msgText._visible = true; target.display.nameSubmitButton._visible = true; target.display.cancelButton._visible = true; } function hide() { hideButtons(); lib.lfm.display.LfmEffect.Fade(0, target.display.bg, 0, {target:this, method:"onFadeOutComplete"}); } function onFadeInComplete() { showButtons(); target.display.nameSubmitButton.init(); target.display.cancelButton.init(); target.display.nameSubmitButton.disable(); } function onFadeOutComplete() { target.display._visible = false; app.controller.Controller.display.track.enable(); } function refresh() { _changedField = false; _recipient = ""; _message = ""; } function requestFriends() { clearInterval(requestFriendsDelay); } function refreshScreenPos() { clearInterval(refreshPosInterval); _changedField = false; target.display._x = _initX; target.display._y = _initY; } function showMsgScreen() { _changedField = false; lib.lfm.display.LfmEffect.Move(target.display, _initX - 350, _initY); } function submitRecommendRequest() { _message = app.controller.Controller.lang.getCopy("defaultRecommendationMsg"); var _local2 = {recipient:_recipient, message:_message, track:track}; lib.lfm.core.ServiceLocator.get("Client").call("recommendTrack", _local2); } function onChangeNameInputText() { _changedField = true; target.display.nameSubmitButton.enable(); focusManager.defaultPushButtonEnabled = true; focusManager.defaultPushButton = target.display.nameSubmitButton; _keyboardIndex = [target.display.nameInputText, target.display.nameSubmitButton, target.display.cancelButton]; refreshKeyboardAccessibility(); } function onCancel(event) { refreshPosInterval = setInterval(this, "refreshScreenPos", 2000); } function onGetFriendsSuccess(event) { lib.lfm.core.LfmError.raise("got friends"); friends = event.friends; _friendsRequestDone = true; } function onGetFriendsFail(event) { lib.lfm.core.LfmError.raise("failed getting friends"); } function onGetFriendsFault(event) { lib.lfm.core.LfmError.raise("fault getting friends"); } function onRecommendTrackSuccess(event) { app.controller.Controller.display.setMode("track"); } function onSubmitName(event) { target.display.nameSubmitButton.bg.gotoAndStop("onrelease"); if ((target.display.nameInputText.text.length < 2) || (!_changedField)) { return(undefined); } _recipient = target.display.nameInputText.text; submitRecommendRequest(); } function onSubmitRecommendation(event) { if ((target.display.msgInputText.text.length < 2) || (!_changedField)) { return(undefined); } _message = target.display.msgInputText.text; submitRecommendRequest(); } var _friendsRequestDone = false; var _changedField = false; }
Symbol 314 MovieClip [__Packages.app.controller.StationDisplayController] Frame 0
class app.controller.StationDisplayController extends lib.lfm.core.LfmDisplayController { var _playingStatusCallBack, addEventListener, _keyboardIndex, target, refreshKeyboardAccessibility, _teardownKeyboardAccessibility, _cloudFetchDelay, dispatchEvent, _topTags; function StationDisplayController () { super(); _playingStatusCallBack = {target:this, method:"onCompletePlayingStatusTransition"}; } function _initView() { addEventListener("onPressStationButton", app.controller.Controller.display); addEventListener("onStationDisplayHideComplete", app.controller.Controller.display); _keyboardIndex = [target.stationInputText, target.stationSubmitButton, target.cancelButton]; target.bg._alpha = 0; } function _onFocus() { lib.lfm.core.LfmError.raise("calling onfocus"); _inFocus = true; target._y = target._y - 4; target._visible = true; target.msgText.text = app.controller.Controller.lang.getCopy("tuneInSimArtists"); _initInputField(); _initTxtFields(); hideButtons(); lib.lfm.display.LfmEffect.pixelAlign(target.statusText); lib.lfm.display.LfmEffect.pixelAlign(target.listenNowButton); lib.lfm.display.LfmEffect.pixelAlign(target.inputBorder); _keyboardIndex = [target.stationInputText, target.cancelButton]; refreshKeyboardAccessibility(); target.stationSubmitButton.onRelease = mx.utils.Delegate.create(this, onSubmitStation); target.stationInputText.onChanged = mx.utils.Delegate.create(this, onChangeStationInputText); lib.lfm.display.LfmEffect.Fade(100, target.bg, 0, {target:this, method:"onFadeInComplete"}); } function _initTxtFields() { target.statusText.setTextFormat(_global.defaultTextFormat); target.statusText.setNewTextFormat(_global.defaultTextFormat); target.listenText.setTextFormat(_global.defaultTextFormat); target.listenText.setNewTextFormat(_global.defaultTextFormat); target.listenText.html = true; _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; _global.defaultTextFormat.align = "center"; target.msgText.setTextFormat(_global.defaultTextFormat); target.msgText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.align = "left"; _global.defaultTextFormat.color = COLOR_ACTIVE; } function hideButtons() { target.stationInputText._visible = false; target.msgText._visible = false; target.stationSubmitButton._visible = false; target.cancelButton._visible = false; } function showButtons() { target.stationInputText._visible = true; target.msgText._visible = true; target.stationSubmitButton._visible = true; target.cancelButton._visible = true; target.stationSubmitButton.disable(); } function hide() { hideButtons(); lib.lfm.display.LfmEffect.Fade(0, target.bg, 0, {target:this, method:"onFadeOutComplete"}); } function showPlayingStatus(msg) { lib.lfm.core.LfmError.raise("showing play status!!!"); target.statusText.setTextFormat(_global.defaultTextFormat); target.statusText.setNewTextFormat(defautTextFormat); target.statusText.html = true; if (_playingStatusDisplayLock) { target.statusTextShadow.text = ""; _currentStatusMsg = msg; var _local4 = ((("<font color=\"" + COLOR_ACTIVE_MSG) + "\">") + unescape(msg)) + "</font>"; var _local5 = ("<font color=\"#FFFFFF\">" + unescape(msg)) + "</font>"; if (target.statusText.text != msg) { lib.lfm.display.LfmEffect.scrollingText(target.statusText, _local4, true, _playingStatusCallBack); } } } function inFocus() { return(_inFocus); } function _onBlur() { _inFocus = false; _changedField = false; _teardownKeyboardAccessibility(); } function getTagCloud(tag) { clearInterval(_cloudFetchDelay); var _local2 = new Object(); _local2.tag = tag; var _local3 = ((tag == undefined) ? "getTopTags" : "getSimilarTags"); lib.lfm.core.ServiceLocator.get("Client").call(_local3, _local2); } function refresh() { _changedField = false; } function _initInputField() { var _local4 = this; var _local3 = target.stationInputText; lib.lfm.display.LfmEffect.pixelAlign(_local3); _local3.setTextFormat(_global.defaultTextFormat); _local3.setNewTextFormat(_global.defaultTextFormat); _local3.border = false; _local3.html = true; _local3.maxChars = 200; _local3.restrict = "A-Z 0-9 a-z \\- \\,"; _local3.htmlText = ((("<font color=\"" + COLOR_TRACK_STATUS_MSG) + "\">") + app.controller.Controller.lang.getCopy("createStationInfoMsg")) + "</font>"; _local3.onSetFocus = function () { this.htmlText = ""; }; target.stationInputText.onChanged = mx.utils.Delegate.create(this, onChangeStationInputText); } function _initHelpText() { target.infoText.html = true; target.infoText.htmlText = ((((("<font face=\"" + PRIMARY_FONT) + "\" size=\"") + FONT_SIZE) + "\"><a href=\"") + STATION_HELP_URI) + "\">[?]</a></font>"; } function generateTagCloud(tags, width, height, density) { lib.lfm.core.LfmError.raise(("generating tag cloud for " + tags.length) + " tags"); var _local6 = target.createEmptyMovieClip("tagCloud", 5000); _local6._x = target._x - 10; _local6._y = target._y + 70; target.attachMovie("playerMask", "cloudMask", 5001); var _local11 = target.cloudMask; _local11._width = width; _local11._height = height + 10; _local11._x = _local6._x; _local11._y = _local6._y - 10; _local6.setMask(_local11); var _local7 = _global.defaultTextFormat; _local7.color = 16777215 /* 0xFFFFFF */; _local7.font = "Arial"; var _local8 = 0; tags.shuffle(); var _local3 = 0; while (_local3 < tags.length) { _local8 = _local8 + (tag.name.length * (tag.size / density)); var _local10 = random(5); if (!(_local3 % _tagRowSize)) { _local8 = 0; } var tag = tags[_local3]; _local6.attachMovie("CloudButton", "CloudButton" + _local3, _local6.getNextHighestDepth()); var _local4 = _local6["CloudButton" + _local3]; _local4.createTextField(tag.name, _local6.getNextHighestDepth(), _local8, (Math.floor(_local3 / _tagRowSize) * _tagRowHeight) - tag.size, 200, 24); _local4._alpha = Math.floor((tag.size / _maxTagSize) * 90); _local4._visible = false; _local4.fadeIn(_local3 * 100); var _local5 = _local4[tag.name]; _local7.size = (tag.size ? (tag.size) : (FONT_SIZE)); _local5.embedFonts = true; _local5.setTextFormat(_local7); _local5.setNewTextFormat(_local7); _local5.text = tag.name; _local3++; } } function generateTopTagCloud() { } function onChangeStationInputText() { _changedField = true; target.stationSubmitButton.enable(); } function onListenNow() { if (_inFocus) { app.controller.Controller.display.unsetStationMode(); } else { dispatchEvent({type:"onPressStationButton", target:this}); } } function onSubmitStation() { if ((target.stationInputText.text.length < 2) || (!_changedField)) { return(undefined); } submitStationRequest(); } function submitStationRequest() { var _local3 = new Object(); _local3.artists = target.stationInputText.text.split(","); if (!etc.Conf.isMode(_global.EXPANDED_MODE)) { _global.mainTimeline._global.lfmMode = _global.RADIO_MODE; } _global.mainTimeline.resourceID = null; _global.mainTimeline.resourceType = null; _global.mainTimeline.radioURL = event.response; lib.lfm.core.ServiceLocator.get("Client").call("createStation", _local3); } function onCreateStationSuccess(event) { app.controller.Controller.playlist.clear(); if (!etc.Conf.isMode(_global.EXPANDED_MODE)) { setMode(_global.RADIO_MODE); } _global.mainTimeline.resourceID = null; _global.mainTimeline.resourceType = null; _global.mainTimeline.radioURL = event.response; app.controller.Controller.display.setMode("track"); if (app.controller.Controller.user.session) { app.controller.Controller.station.tune(event.response); } else { lib.lfm.core.ServiceLocator.get("Client").call("getSession", new Object()); } } function onGetTopTagsSuccess(event) { var _local4 = event.response; _topTags = new Array(); var _local2 = 0; while (_local2 < _local4.length) { var _local3 = _local4[_local2]; _topTags.push({name:_local3[0], size:parseInt(_local3[1])}); _local2++; } generateTopTagCloud(); } function onGetSimilarTagsSuccess(event) { } function onCompletePlayingStatusTransition() { _playingStatusDisplayLock = true; } function onFadeInComplete() { showButtons(); target.stationSubmitButton.onRelease = mx.utils.Delegate.create(this, onSubmitStation); target.stationInputText.onChanged = mx.utils.Delegate.create(this, onChangeStationInputText); target.stationSubmitButton.init(); target.cancelButton.init(); target.stationSubmitButton.disable(); } function onFadeOutComplete() { target._visible = false; dispatchEvent({type:"onStationDisplayHideComplete", target:this}); app.controller.Controller.display.track.enable(); app.controller.Controller.menu.enable(); app.controller.Controller.menu.target.coreControlMenu.playButton.enable(); } var _changedField = false; var _inFocus = false; var _tagRowSize = 5; var _tagRowHeight = 14; var _maxTagSize = 24; var _playingStatusDisplayLock = true; var _currentStatusMsg = ""; }
Symbol 315 MovieClip [__Packages.app.controller.UnauthorisedDisplayController] Frame 0
class app.controller.UnauthorisedDisplayController extends lib.lfm.core.LfmController { var target, _msgText; function UnauthorisedDisplayController () { super(); } function setTarget(mc) { target = mc; target.bg._x = target.bg._x + 2; target.bg._alpha = 0; } function onFocus() { lib.lfm.core.LfmError.raise("calling onfocus"); _msgText = app.controller.Controller.lang.getCopy("join"); _initMsgText(); app.controller.Controller.menu.target.disable(); hideButtons(); target._visible = true; lib.lfm.display.LfmEffect.Fade(100, target.bg, 0, {target:this, method:"onFadeInComplete"}); } function _initMsgText() { _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; _global.defaultTextFormat.align = "center"; target.infoText.setTextFormat(_global.defaultTextFormat); target.infoText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = _global.COLOR_ACTIVE; _global.defaultTextFormat.align = "left"; target.infoText.text = _msgText; } function hideButtons() { target.infoText._visible = false; target.joinSubmitButton._visible = false; target.cancelButton._visible = false; } function showButtons() { target.infoText._visible = true; target.joinSubmitButton._visible = true; target.cancelButton._visible = true; } function hide() { hideButtons(); lib.lfm.display.LfmEffect.Fade(0, target.bg, 0, {target:this, method:"onFadeOutComplete"}); } function onFadeOutComplete() { target._visible = false; app.controller.Controller.display.track.enable(); } function onFadeInComplete() { showButtons(); target.joinSubmitButton.init(); target.cancelButton.init(); } function onJoinSubmit(event) { getURL (("http://" + app.controller.Controller.lang.getLangDomain()) + "/join", "_blank"); } }
Symbol 316 MovieClip [__Packages.app.controller.KeyboardController] Frame 0
class app.controller.KeyboardController extends lib.lfm.core.LfmController { var addEventListener, _playListener, _recommendListener, _tagListener, _loveListener, _banListener, _exitSubdisplayListener, _submitListener, _genericKeyListener, dispatchEvent, submitInterval; function KeyboardController () { super(); } function init() { _global.mainTimeline.player.tabEnabled = false; _global.mainTimeline.player.tabChildren = true; } function initListeners() { addEventListener("onPressStopButton", app.controller.Controller.track); addEventListener("onPressStopButton", app.controller.Controller.display); addEventListener("onPressStopButton", app.controller.Controller.menu); addEventListener("onPressPlayButton", app.controller.Controller.playlist); addEventListener("onPressPlayButton", app.controller.Controller.display); initKeyListeners(); } function initKeyListeners() { _playListener = new Object(); _recommendListener = new Object(); _tagListener = new Object(); _loveListener = new Object(); _banListener = new Object(); _exitSubdisplayListener = new Object(); _submitListener = new Object(); _genericKeyListener = new Object(); _recommendListener.onKeyDown = mx.utils.Delegate.create(this, onRecommendKeyPress); _tagListener.onKeyDown = mx.utils.Delegate.create(this, onTagKeyPress); _loveListener.onKeyDown = mx.utils.Delegate.create(this, onLoveKeyPress); _banListener.onKeyDown = mx.utils.Delegate.create(this, onBanKeyPress); _exitSubdisplayListener.onKeyDown = mx.utils.Delegate.create(this, onExitSubdisplayKeyPress); _submitListener.onKeyDown = mx.utils.Delegate.create(this, onEnterKeyPress); _genericKeyListener.onKeyDown = mx.utils.Delegate.create(this, onKeyboardActivity); Key.addListener(_recommendListener); Key.addListener(_loveListener); Key.addListener(_tagListener); Key.addListener(_banListener); Key.addListener(_exitSubdisplayListener); Key.addListener(_submitListener); Key.addListener(_genericKeyListener); } function clearListeners() { Key.removeListener(_recommendListener); Key.removeListener(_tagListener); Key.removeListener(_loveListener); Key.removeListener(_banListener); Key.addListener(_exitSubdisplayListener); } function enableMenuAccess() { app.controller.Controller.menu.enableKeyboardAccess(); } function disableMenuAccess() { app.controller.Controller.menu.disableKeyboardAccess(); } function onBanKeyPress() { if (((Key.getCode() == BAN_KEYCODE) && (app.controller.Controller.track.isPlaying())) && (app.controller.Controller.display.mode == "track")) { if (app.controller.Controller.user.isLastFm()) { var _local2 = new Object(); _local2.track = app.controller.Controller.playlist.getCurrentTrack(); lib.lfm.core.ServiceLocator.get("Client").call("banTrack", _local2); app.controller.Controller.track.setRating("B"); } } } function onKeyboardActivity() { dispatchEvent("onKeyboardActivity", {target:this}); } function onLoveKeyPress() { if ((Key.getCode() == LOVE_KEYCODE) && (app.controller.Controller.track.isPlaying())) { if (app.controller.Controller.user.isLastFm() && (app.controller.Controller.display.mode == "track")) { var _local2 = new Object(); _local2.track = app.controller.Controller.playlist.getCurrentTrack(); lib.lfm.core.ServiceLocator.get("Client").call("loveTrack", _local2); app.controller.Controller.track.setRating("L"); } } } function onRecommendKeyPress() { if (((Key.getCode() == RECOMMEND_KEYCODE) && (app.controller.Controller.track.isPlaying())) && (app.controller.Controller.user.isLastFm())) { if (app.controller.Controller.display.mode == "track") { app.controller.Controller.display.setMode("recommend"); } } } function onTagKeyPress() { if (((Key.getCode() == TAG_KEYCODE) && (app.controller.Controller.track.isPlaying())) && (app.controller.Controller.user.isLastFm())) { if (app.controller.Controller.display.mode == "track") { app.controller.Controller.display.setMode("tag"); } } } function onExitSubdisplayKeyPress() { if (Key.getCode() == 27) { if (app.controller.Controller.display.mode != "track") { app.controller.Controller.display.setMode("track"); } } } function onEnterKeyPress() { if ((Key.getCode() == 13) && (app.controller.Controller.user.exists)) { if (cancelButtonFocus) { return(undefined); } switch (app.controller.Controller.display.mode) { case "recommend" : if (app.controller.Controller.display.recommend.target.display.nameSubmitButton.enabled) { app.controller.Controller.display.recommend.target.display.nameSubmitButton.onPress(); if (!submitInterval) { submitInterval = setInterval(this, "recommendSubmit", 400); } } break; case "tag" : if (app.controller.Controller.display.tag.target.tagSubmitButton.enabled) { app.controller.Controller.display.tag.target.tagSubmitButton.onPress(); if (!submitInterval) { submitInterval = setInterval(this, "tagSubmit", 400); } } break; case "station" : if (app.controller.Controller.display.station.target.stationSubmitButton.enabled) { app.controller.Controller.display.station.target.stationSubmitButton.onPress(); if (!submitInterval) { submitInterval = setInterval(this, "stationSubmit", 400); } } break; case "unauthorised" : if (!app.controller.Controller.display.unauthorised.target.joinSubmitButton.enabled) { break; } app.controller.Controller.display.unauthorised.target.joinSubmitButton.onPress(); if (submitInterval) { break; } submitInterval = setInterval(this, "joinSubmit", 400); } } } function onPlayKeyPress() { if (((Key.getCode() == SPACEBAR_KEYCODE) && (app.controller.Controller.user.exists)) && (app.controller.Controller.display.mode == "track")) { if (app.controller.Controller.track.isPlaying()) { dispatchEvent({type:"onPressStopButton", target:this}); app.controller.Controller.menu.target.coreControlMenu.playButton.setStopped(); } else if (app.controller.Controller.playlist.getActivePlaylist() instanceof lib.lfm.core.model.Playlist) { dispatchEvent({type:"onPressPlayButton", target:this}); } } } function tagSubmit() { clearInterval(submitInterval); submitInterval = false; app.controller.Controller.display.tag.target.tagSubmitButton.onRelease(); } function stationSubmit() { clearInterval(submitInterval); submitInterval = false; app.controller.Controller.display.station.target.stationSubmitButton.onRelease(); } function recommendSubmit() { clearInterval(submitInterval); submitInterval = false; app.controller.Controller.display.recommend.target.display.nameSubmitButton.onRelease(); } function joinSubmit() { clearInterval(submitInterval); submitInterval = false; app.controller.Controller.display.unauthorised.target.joinSubmitButton.onRelease(); } var cancelButtonFocus = false; var SPACEBAR_KEYCODE = 32; var RECOMMEND_KEYCODE = 82; var TAG_KEYCODE = 84; var LOVE_KEYCODE = 76; var BAN_KEYCODE = 66; }
Symbol 317 MovieClip [__Packages.lib.lfm.core.model.Playlist] Frame 0
class lib.lfm.core.model.Playlist extends lib.lfm.core.model.LfmModel { var created, shuffleURL, url, allFLP, expiry; function Playlist () { super(); tracks = new Array(); created = new Date(); } function addTrack(track) { return(tracks.push(track)); } function length() { return(tracks.length); } function toString() { var _local2 = 0; while (_local2 < tracks.length) { _local2++; } } function isShuffle() { return(shuffleURL.length > 1); } function getProtocolURL() { return((isShuffle() ? (shuffleURL) : (url))); } function isAllFLP() { return(parseInt(allFLP) > 0); } function prune() { if (length() > 10) { var _local2 = 0; while (_local2 < 5) { tracks.shift(); _local2++; } counter = counter - 5; } } function hasExpired() { var _local2 = new Date(); lib.lfm.core.ServiceLocator.get("logger").write((_local2.getTime() - created.getTime()) + ""); return(((_local2.getTime() - created.getTime()) / 1000) > expiry); } function merge(pl) { var _local2 = 0; while (_local2 < pl.tracks.length) { addTrack(pl.tracks[_local2]); _local2++; } } function getIndexByProp(prop, needle) { lib.lfm.core.ServiceLocator.get("logger").log((("Playlist : get index by prop " + prop) + " for value ") + needle); var _local2 = 0; while (_local2 < tracks.length) { var _local3 = tracks[_local2]; if (_local3[prop] == needle) { lib.lfm.core.ServiceLocator.get("logger").log("Playlist : found needle"); return(_local2); } _local2++; } } function getIndexByTrackTitle(needle) { return(getIndexByProp("title", needle)); } var tracks = new Array(); var counter = 0; }
Symbol 318 MovieClip [__Packages.app.controller.MenuController] Frame 0
class app.controller.MenuController extends lib.lfm.core.LfmController { var _enabled, target, _keyboardIndex, _toolbarDelay; function MenuController () { super(); } function disable() { _enabled = false; target.disable(); } function initListeners() { lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetSessionSuccess", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onAdjustFail", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onLoveTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onBanTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onRecommendTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onTagTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onCreateStationSuccess", this); app.controller.Controller.playlist.addEventListener("onEnterShuffleMode", this); app.controller.Controller.playlist.addEventListener("onExitShuffleMode", this); app.controller.Controller.playlist.addEventListener("onLoadMetadataPlaylist", this); app.controller.Controller.track.addEventListener("onPressStopButton", this); app.controller.Controller.track.addEventListener("onTrackStartPlaying", this); } function enable() { _enabled = true; target.enable(); } function isEnabled() { return(_enabled); } function setTarget(mc) { target = mc; _keyboardIndex = [target.recommendButton, target.tagButton, target.loveButton, target.banButton, target.coreControlMenu.playButton, target.coreControlMenu.fwdButton]; enableKeyboardAccess(); disable(); } function enableKeyboardAccess() { target.tabChildren = true; target.coreControlMenu.tabChildren = true; var _local2 = 0; while (_local2 < _keyboardIndex.length) { _keyboardIndex[_local2].tabEnabled = true; _keyboardIndex[_local2].focusEnabled = true; _keyboardIndex[_local2].tabIndex = _local2; _local2++; } } function disableKeyboardAccess() { target.tabChildren = false; target.coreControlMenu.tabChildren = false; var _local2 = 0; while (_local2 < _keyboardIndex.length) { _keyboardIndex[_local2].tabEnabled = false; _keyboardIndex[_local2].focusEnabled = false; _local2++; } } function onLoadPlaylist(event) { target.coreControlMenu.onLoadPlaylist(event); } function onLoadMetadataPlaylist(event) { if (app.controller.Controller.playlist.getMetadataPlaylist().isShuffle()) { target.shuffleBtn.enable(); } } function onEndPlaylist(event) { } function onLoadLanguage(event) { _enabled = true; _toolbarDelay = setInterval(this, "toolbarInit", 100); } function toolbarInit() { if (target.toolbar) { clearInterval(_toolbarDelay); target.toolbar.enable(); target.toolbar.initButtons(); } } function onTrackStartPlaying(event) { target.coreControlMenu.onLoadTrack(); enable(); } function onLoadTrackFail(event) { onStopTrack(event); target.coreControlMenu.playButton.enable(); } function onSkipMaximumReached(event) { if (_global.Feature.Skip) { target.coreControlMenu.fwdButton.enable(); } } function onAdjustFail(event) { onStopTrack(event); target.coreControlMenu.playButton.enable(); } function onStationHandshakeFail(event) { onStopTrack(event); target.coreControlMenu.playButton.enable(); } function onStopTrack(event) { target.coreControlMenu.onStopTrack(); disable(); } function onPressStopButton(event) { } function onPressSkipButton() { if (etc.Conf.isMode(_global.PLAYLIST_MODE)) { onSkip(); } } function onCompleteTrack(event) { if (etc.Conf.isMode(_global.PLAYLIST_MODE)) { } } function onEnterShuffleMode(event) { target.shuffleBtn.switchOn(); } function onExitShuffleMode(event) { target.shuffleBtn.switchOff(); } function onEnterRadioMode(event) { target.shuffleBtn.switchOff(); target.shuffleBtn.disable(); } function onExitRadioMode(event) { target.shuffleBtn.switchOff(); if (app.controller.Controller.playlist.getMetadataPlaylist().isShuffle()) { target.shuffleBtn.enable(); } } function onSwitchOnShuffleMode(event) { lib.lfm.core.ServiceLocator.get("Logger").write("menucontroller picks up enter shuffle mode"); app.controller.Controller.playlist.onSwitchOnShuffleMode(); } function onSwitchOffShuffleMode(event) { lib.lfm.core.ServiceLocator.get("Logger").write("menucontroller picks up exit shuffle mode"); app.controller.Controller.playlist.onSwitchOffShuffleMode(); } function onSkip(event) { lib.lfm.core.ServiceLocator.get("Logger").write("menucontroller>>onskip"); target.coreControlMenu.onSkip(); target.coreControlMenu.disable(); } function onGetSessionSuccess(event) { enable(); } function onButtonRelease(event) { disable(); } function onLoveTrackSuccess(event) { lib.lfm.core.ServiceLocator.get("logger").write("loved track menu listener"); enable(); } function onBanTrackSuccess(event) { enable(); } function onRecommendTrackSuccess(event) { enable(); } function onTagTrackSuccess(event) { enable(); } }
Symbol 319 MovieClip [__Packages.app.controller.PlaylistController] Frame 0
class app.controller.PlaylistController extends lib.lfm.core.LfmController { var parser, uri, _aPlaylistId, Feature, _errorMsg, _defaultErrorMsg, xspf, dispatchEvent, requestTime, _xspfRequest, mainplaylist, _shufflePlaylist, _queuedUpMode, addEventListener, _metadataPlaylist; function PlaylistController () { super(); parser = new lib.lfm.xml.xspf.XSPFParser(); uri = etc.Conf.RESOURCE_PLAYLIST_URI; _aPlaylistId = new Array(); Feature = _global.Feature; } function setURI(uri) { this.uri = uri; } function loadXSPF(uri, prefetch) { _errorMsg = app.controller.Controller.lang.getCopy("connectionError"); _defaultErrorMsg = _errorMsg; lib.lfm.core.ServiceLocator.get("logger").write("loading xspf with prefetch=" + prefetch); if (_requestPlaylistLock) { _prefetching = prefetch; _requestPlaylistLock = false; this.uri = uri; if (!prefetch) { xspf = new lib.lfm.xml.xspf.XSPF(this.uri); dispatchEvent({type:"onRequestPlaylist", target:this, adjust:_adjustingStation}); } xspf.loaded = false; requestTime = getTimer(); var _local4 = lib.lfm.core.LfmDate.GetCurrentTimestamp(); _xspfRequest = new LoadVars(); _xspfRequest.y = _local4; _xspfRequest.onData = mx.utils.Delegate.create(this, onXSPFResponse); if (_global.DEBUG_MODE) { _xspfRequest.flush = "true"; } _xspfRequest.fod = true; _xspfRequest.sk = app.controller.Controller.user.sessionKey; if (_root.lang != undefined) { _xspfRequest.lang = _root.lang; } lib.lfm.core.ServiceLocator.get("logger").write(this.uri); _xspfRequest.sendAndLoad(this.uri, _xspfRequest, "GET"); clearInterval(pollingInterval); pollingInterval = false; if (!pollingInterval) { pollingInterval = setInterval(this, "pollXSPFLoader", 800); } } } function onXSPFResponse(response, plain) { _requestPlaylistLock = true; xspf.loaded = true; if (typeof(response) == "string") { xspf.loaded = true; } else if (!plain) { xspf.loaded = false; lib.lfm.core.ServiceLocator.get("logger").logToWebServer("Load Playlist Fail", "critical", app.controller.Controller.user.name, "NO RESPONSE"); return(false); } if (_prefetching) { var _local3 = new lib.lfm.xml.xspf.XSPF(uri); _local3.parseXML(unescape(lib.ext.ascrypt.Base64.decode(response))); var _local4 = parser.parse(_local3); lib.lfm.core.ServiceLocator.get("logger").write(("parsed " + _local4.tracks.length) + " tracks in prefetch"); if (mainplaylist) { mainplaylist.merge(_local4); mainplaylist.prune(); mainplaylist.created = new Date(); lib.lfm.core.ServiceLocator.get("logger").write(("merged into a playlist with " + mainplaylist.tracks.length) + " tracks"); } } else { lib.lfm.core.ServiceLocator.get("Logger").write("parsing xml"); if (plain) { xspf.parseXML(response); } else { xspf.parseXML(unescape(lib.ext.ascrypt.Base64.decode(response))); } } } function previewTrack(trackId) { if (etc.Conf.isMode(_global.SHUFFLE_MODE) && (app.controller.Controller.station.hasTuningHistory())) { setQueuedUpMode(_global.SHUFFLE_MODE); } etc.Conf.setMode(_global.PLAYLIST_MODE); var _local3 = getMetadataPlaylist().getIndexByProp("id", trackId); playTrack(_local3); } function playTrack(trackNumber) { lib.lfm.core.ServiceLocator.get("logger").write("playTrack " + trackNumber); if (_requestPlaylistLock && (!app.controller.Controller.track.buffering)) { externalPlay = true; _global.previewTrackNumber = trackNumber; if (((_global.Feature.FOD && (counter == trackNumber)) && (app.controller.Controller.track.isPlaying())) && (!etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE))) { return(false); } if (_global.Feature.FOD) { counter = trackNumber; } if (_global.Feature.FOD) { app.controller.Controller.track.setRating("S"); } if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { var _local4 = getCurrentTrack(); if (_local4 instanceof lib.lfm.core.model.Track) { _local4.stop(); } if (!_shufflePlaylist) { getResourcePlaylist({playlistURL:"lastfm://playlist/track/" + _global.resourceID, streaming:true}); } } if (!(getActivePlaylist() instanceof lib.lfm.core.model.Playlist)) { lib.lfm.core.ServiceLocator.get("Client").call("getSession", new Object()); return(false); } var _local5 = getActivePlaylist(); if (trackNumber == undefined) { trackNumber = 1; } if ((trackNumber > _local5.length()) && (!_global.Feature.FOD)) { trackNumber = 1; } if ((((getActivePlaylist().counter == trackNumber) && (app.controller.Controller.track.isPlaying())) && (!etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE))) && (!_global.Feature.FOD)) { return(false); } var _local4 = getCurrentTrack(); if (_local4 instanceof lib.lfm.core.model.Track) { _local4.stop(); } lib.lfm.core.ServiceLocator.get("logger").write("playTrack " + trackNumber); if (!_global.Feature.FOD) { getActivePlaylist().counter = trackNumber - 1; manualSkip({externalPlay:true}); } else { onFODPlay(); } } } function switchToQueuedUpMode() { lib.lfm.core.ServiceLocator.get("Logger").write("switchtoqueuedupmode"); switch (_queuedUpMode) { case _global.SHUFFLE_MODE : switchToShuffleMode(); _global.radioURL = getMetadataPlaylist().getProtocolURL(); lib.lfm.core.ServiceLocator.get("Logger").write("switch to queued up SHUFFLE MODE"); app.controller.Controller.station.tune(_global.radioURL); break; case _global.PLAYLIST_MODE : if (_global.restype != "user") { break; } playTrack(getMetadataPlaylist().getIndexByTrackTitle(getCurrentTrack().title) + 1); } _queuedUpMode = null; } function next(event) { if (_queuedUpMode) { return(switchToQueuedUpMode()); } if ((!(getActivePlaylist() instanceof lib.lfm.core.model.Playlist)) && (_global.Feature.OnDemand)) { lib.lfm.core.ServiceLocator.get("logger").write("getresourceplaylist in NEXT"); return(false); } if (event.externalPlay == undefined) { externalPlay = false; } if (event.skipNum == undefined) { event.skipNum = 1; } var _local3 = getActivePlaylist(); lib.lfm.core.LfmError.raise((((("skipping " + event.skipNum) + "pl.counter=") + _local3.counter) + "pl.length=") + _local3.length()); _interaction = event.manual; _local3.counter = _local3.counter + event.skipNum; if (_global.Feature.OnDemand) { counter++; } if (hasExpired() && (_global.Feature.Radio)) { loadXSPF(uri); return(false); } if (_local3.counter == (_local3.length() - 2)) { if (_global.Feature.Radio) { _prefetchPlaylist(); } } if (_local3.counter >= _local3.length()) { switch (_global.lfmMode) { case _global.RADIO_MODE : _onEndPlaylist(); break; case _global.PLAYLIST_MODE : case _global.SHUFFLE_PLAYLIST_MODE : _local3.counter = 0; if (_global.Feature.FOD) { _onEndFodPlaylist(); } _onEndPlaylist(); if (!event.manual) { app.controller.Controller.track.setPaused(); } if (((!_global.isInline) && (!_global.Mode.Viral)) && (!_global.Feature.FOD)) { lib.lfm.core.ServiceLocator.get("logger").write("onflashplayerstoptrack"); } return(false); default : _onEndPlaylist(); } } return(true); } function isManualSkip() { return(_interaction); } function _onEndFodPlaylist() { onFODPlay(); } function onFODPlay() { lib.lfm.core.ServiceLocator.get("logger").write("onFODPlay external: " + externalPlay); if (counter >= _aPlaylistId.length) { counter = 0; } var _local2 = _aPlaylistId[counter]; if (_local2) { getResourcePlaylist({playlistURL:"lastfm://playlist/track/" + _local2, streaming:true}); } } function _prefetchPlaylist() { if (_global.Feature.Radio) { loadXSPF(app.controller.Controller.station.getPlaylistURL(), true); } } function previous(skipNum) { if (skipNum == undefined) { skipNum = 1; } getActivePlaylist().counter = getActivePlaylist().counter - skipNum; } function getCurrentTrack() { var _local3 = getActivePlaylist().tracks[getActivePlaylist().counter]; var _local2 = ((_local3 instanceof lib.lfm.core.model.Track) ? (_local3) : false); if (!_local2) { lib.lfm.core.LfmError.raise((((("trying to fetch non-existent track from playlist length " + getActivePlaylist().length()) + " at position ") + getActivePlaylist().counter) + " and fod counter") + counter); } return(_local2); } function getTitle() { return(getActivePlaylist().title); } function initListeners() { addEventListener("onRequestPlaylist", app.controller.Controller.display); addEventListener("onLoadPlaylist", app.controller.Controller.track); addEventListener("onLoadPlaylist", app.controller.Controller.display); addEventListener("onEndPlaylist", app.controller.Controller.display); addEventListener("onEndPlaylist", app.controller.Controller.menu); addEventListener("onEndPlaylist", app.controller.Controller.track); addEventListener("onLoadPlaylist", app.controller.Controller.menu); addEventListener("onSkip", app.controller.Controller.track); addEventListener("onSkip", app.controller.Controller.display); addEventListener("onSkip", app.controller.Controller.menu); addEventListener("onSkipMaximumReached", app.controller.Controller.menu); addEventListener("onSkipMaximumReached", app.controller.Controller.display); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onAdjustSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onBanTrackSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onBanTrackFail", this); } function isLoaded() { return(getActivePlaylist() instanceof lib.lfm.core.model.Playlist); } function _validateXSPF(xspf) { var _local2 = xspf.toString(); _local2 = _local2.trim(); _local2 = _local2.toUpperCase(); if (_local2.indexOf(_noContentError) == 0) { var _local4 = app.controller.Controller.lang.getCopy("tuneErrorMsg"); var _local3 = _local4[etc.Conf.LFM_RADIO_ERROR_NOT_ENOUGH_CONTENT]; lib.lfm.core.LfmError.raise(_local3); _errorMsg = _local3; return(false); } if (_local2.indexOf(_noPlaylistError) == 0) { _errorMsg = _defaultErrorMsg; return(false); } if (_local2.indexOf("ERROR") == 0) { lib.lfm.core.LfmError.raise("Playlist error: " + _local2); _errorMsg = _defaultErrorMsg; return(false); } if (_local2.length == 0) { lib.lfm.core.LfmError.raise("Playlist error: blank response from playlist service"); _errorMsg = _defaultErrorMsg; return(false); } return(true); } function clear() { var _local2 = getActivePlaylist(); _local2 = null; } function hasSkipsLeft() { if (_global.lfmMode == _global.PLAYLIST_MODE) { return(true); } return(getSkipsLeft() > -1); } function getPlaylistCount() { return(_playlistCounter); } function _skip(event) { var _local4 = event.target instanceof app.view.button.PlayButton; lib.lfm.core.ServiceLocator.get("logger").write("skip playbutton " + _local4); if (next(event)) { if ((_global.Feature.FOD && (!app.controller.Controller.track.firstPreview)) && (event.target instanceof app.view.button.PlayButton)) { event.manual = false; } dispatchEvent({type:"onSkip", target:this, manual:event.manual}); } } function isFirstPreview() { lib.lfm.core.ServiceLocator.get("logger").write((("firstpreview = " + counter) + " counter@") + counter); if (_global.Feature.FOD) { return((!counter) && (_playlistCounter <= 1)); } return(getActivePlaylist().counter == 0); } function getSkipsLeft() { return(getActivePlaylist().skipsLeft); } function manualSkip(event) { lib.lfm.core.ServiceLocator.get("Logger").write("playlistcontroller>>manualskip.target=" + event.target); var _local3 = getCurrentTrack(); if (etc.Conf.SKIP_RESTRICTION && (!hasSkipsLeft())) { dispatchEvent({type:"onSkipMaximumReached", target:this}); return(false); } if (app.controller.Controller.user.isLastFm() && (event.target instanceof app.view.button.FwdButton)) { lib.lfm.core.ServiceLocator.get("Scrobbler").onSkip({track:_local3, target:app.controller.Controller.track}); } if ((_local3 instanceof lib.lfm.core.model.Track) && (app.controller.Controller.track.isPlaying())) { lib.lfm.core.ServiceLocator.get("logger").write("stopping track in manualskip"); _local3.stop(); } event.manual = true; _skip(event); } function onSkip(event) { var _local3 = getCurrentTrack(); if (_global.Feature.Skip && (!hasSkipsLeft())) { dispatchEvent({type:"onSkipMaximumReached", target:this}); return(false); } if (_local3 instanceof lib.lfm.core.model.Track) { _local3.stop(); } _skip(event); } function onPressSkipButton(event) { if (_global.SKIP_RESTRICTION && (_global.lfmMode != _global.PLAYLIST_MODE)) { getActivePlaylist().skipsLeft = getActivePlaylist().skipsLeft - 1; } manualSkip(event); _carryOverSkip = true; } function _onEndPlaylist() { if (_global.Feature.Radio) { loadXSPF(app.controller.Controller.station.getPlaylistURL()); } if (_global.Feature.OnDemand && (!_global.Feature.FOD)) { onFODPlay(); return(undefined); } lib.lfm.core.ServiceLocator.get("logger").write("onendplaylist"); dispatchEvent({type:"onEndPlaylist", target:this}); } function switchToShuffleMode() { etc.Conf.setMode(_global.SHUFFLE_MODE); lib.lfm.core.ServiceLocator.get("Logger").write("radio is " + _global.Feature.Radio); _global.radioURL = getMetadataPlaylist().getProtocolURL(); lib.lfm.core.ServiceLocator.get("Logger").write("playlist controller switched to shuffle mode"); dispatchEvent({type:"onEnterShuffleMode", target:this}); } function onSwitchOnShuffleMode() { if (etc.Conf.isMode(_global.PLAYLIST_MODE) && (app.controller.Controller.track.isPlaying())) { setQueuedUpMode(_global.SHUFFLE_MODE); } else if (!app.controller.Controller.track.isPlaying()) { setQueuedUpMode(_global.SHUFFLE_MODE); } } function setQueuedUpMode(mode) { _queuedUpMode = mode; if (mode == _global.SHUFFLE_MODE) { dispatchEvent({type:"onEnterShuffleMode", target:this}); } } function onSwitchOffShuffleMode() { if (etc.Conf.isMode(_global.SHUFFLE_MODE)) { app.controller.Controller.viewport.switchToOnDemandMode(); _global.radioURL = getMetadataPlaylist().getProtocolURL(); setQueuedUpMode(_global.PLAYLIST_MODE); lib.lfm.core.ServiceLocator.get("Logger").write("playlist controller switched to playlist mode"); } } function _onLoadPlaylist() { _requestPlaylistLock = true; _playlistCounter++; var _local9 = !_validateXSPF(xspf); _local9 = _local9 || (!parse()); lib.lfm.core.ServiceLocator.get("logger").write("playlist length " + getActivePlaylist().length()); var _local10 = app.controller.Controller.display.getChannelType(); var _local3 = getActivePlaylist(); if ((!_local9) && (_local3.length() == 0)) { var _local5 = (etc.Conf.isMode(_global.SHUFFLE_MODE) ? "notEnoughContentShuffle" : "notEnoughContent"); _local9 = true; _errorMsg = app.controller.Controller.lang.getCopy(_local5); lib.lfm.core.ServiceLocator.get("logger").logToWebServer("Empty Playlist", "critical", app.controller.Controller.user.name, "NEC"); } if ((_global.Feature.Viewport && (!etc.Conf.isMode(_global.RADIO_MODE))) && (!_global.url)) { var _local4 = !(_metadataPlaylist instanceof lib.lfm.core.model.Playlist); _createMetadataPlaylist(_local3); if (_local4 && (!_global.Mode.Autostart)) { return(undefined); } if (_local4 && (_global.Mode.Autostart)) { onFODPlay(); return(undefined); } lib.lfm.core.ServiceLocator.get("logger").write(_metadataPlaylist.tracks.length + " tracks in metadata playlist"); } dispatchEvent({type:"onLoadPlaylist", target:this, success:!_local9, error:_errorMsg, adjust:_adjustingStation}); _adjustingStation = false; if (_global.Feature.OnDemand) { if (externalPlay) { return(false); } } } function _createMetadataPlaylist(playlist) { if (!(_metadataPlaylist instanceof lib.lfm.core.model.Playlist)) { _metadataPlaylist = new lib.lfm.core.model.Playlist(); _metadataPlaylist.title = playlist.title; _metadataPlaylist.shuffleURL = playlist.getProtocolURL(); lib.lfm.core.ServiceLocator.get("logger").write("creating metadata playlist"); var _local2 = 0; while (_local2 < playlist.tracks.length) { var _local3 = playlist.tracks[_local2]; if (_local3 instanceof lib.lfm.core.model.Track) { _metadataPlaylist.addTrack(_local3); _aPlaylistId[_local2] = _local3.id; } _local2++; } dispatchEvent({type:"onLoadMetadataPlaylist", target:this}); lib.lfm.core.ServiceLocator.get("logger").write(_metadataPlaylist.tracks.length + " tracks placed in metadata playlist"); } } function onCompleteTrack(event) { lib.lfm.core.ServiceLocator.get("logger").write("FOD counter @ " + counter); _carryOverSkip = false; if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE)) { return(false); } if (_global.Feature.FOD && (!_queuedUpMode)) { var _local3 = _metadataPlaylist instanceof lib.lfm.core.model.Playlist; lib.lfm.core.ServiceLocator.get("logger").write(getMetadataPlaylist().tracks[counter].title); app.controller.Controller.display.showPlaylistRestStatus(getMetadataPlaylist().tracks[counter]); return(false); } onSkip(event); } function getNextTrack() { return(getMetadataPlaylist().tracks[counter + 1]); } function getMetadataPlaylist() { return(_metadataPlaylist); } function onBanTrackSuccess(event) { onPressSkipButton(event); } function onPressPlayButton(event) { externalPlay = false; lib.lfm.core.ServiceLocator.get("logger").write("ONPRESSPLAYBUTTON"); if (getMetadataPlaylist().isShuffle() && ((!app.controller.Controller.station.hasTuningHistory()) || (!app.controller.Controller.station.isRadioURL(_global.url)))) { switchToShuffleMode(); } if (getActivePlaylist() instanceof lib.lfm.core.model.Playlist) { if ((getActivePlaylist().counter == 0) && (_global.Feature.OnDemand)) { if (app.controller.Controller.track.firstPreview) { onFODPlay(); return(undefined); } } } else if (_global.Feature.OnDemand) { lib.lfm.core.ServiceLocator.get("logger").write("FEATURE ON DMAND"); lib.lfm.core.ServiceLocator.get("Client").call("getSession", new Object()); return(undefined); } if (((!_global.Mode.Autostart) && (_global.Feature.Radio)) && (!app.controller.Controller.user.getSessionKey().length)) { lib.lfm.core.ServiceLocator.get("Client").call("getSession", new Object()); return(undefined); } if (_global.Feature.Radio && (!app.controller.Controller.station.hasTuningHistory())) { app.controller.Controller.station.tune(_global.radioURL); return(undefined); } if (!app.controller.Controller.station.lastTuningFailed()) { manualSkip(event); } } function onPressInlinePlayButton(event) { getActivePlaylist().counter = 0; lib.lfm.core.ServiceLocator.get("logger").write(getCurrentTrack()); if (getActivePlaylist() instanceof lib.lfm.core.model.Playlist) { app.controller.Controller.track.load(getCurrentTrack()); } } function onAdjustSuccess(event) { clear(); _adjustingStation = true; if (_global.Feature.Radio) { loadXSPF(app.controller.Controller.station.getPlaylistURL()); } else { lib.lfm.core.LfmError.raise((("resource is OK" + _global.resourceID) + " ") + _global.resourceType); } } function onValidUserSession(event) { if (_global.url && (!app.controller.Controller.station.isRadioURL(_global.url))) { getResourcePlaylist({playlistURL:_global.url, streaming:true}); } } function pollXSPFLoader() { if (xspf.loaded || ((getTimer() - requestTime) > timeout)) { clearInterval(pollingInterval); pollingInterval = false; if ((getTimer() - requestTime) > timeout) { lib.lfm.core.LfmError.raise("timeout exceeded when fetching playlist at " + xspf.uri); var _local4 = ((_global.Feature.Radio && (!etc.Conf.isMode(_global.SHUFFLE_MODE))) ? "radio" : "playlist"); var _local3 = _defaultErrorMsg; if (!_prefetching) { dispatchEvent({type:"onLoadPlaylist", target:this, success:false, error:_local3}); lib.lfm.core.ServiceLocator.get("logger").logToWebServer("XSPF Timeout", "critical", app.controller.Controller.user.name, "Oopsed"); } else { lib.lfm.core.ServiceLocator.get("logger").logToWebServer("XSPF Timeout", "major", app.controller.Controller.user.name); } _prefetching = false; return(undefined); } if (!_prefetching) { _onLoadPlaylist(); } _prefetching = false; } } function getResourcePlaylist(params) { if (_global.disabled) { return(false); } if (!params.playlistURL) { lib.lfm.core.LfmError.raise("Cant get resource playlist - specify resource id/type or playlist url"); return(false); } if (_requestPlaylistLock) { _prefetching = false; _requestPlaylistLock = false; xspf = new lib.lfm.xml.xspf.XSPF(params.playlistURL); dispatchEvent({type:"onRequestPlaylist", target:this, adjust:_adjustingStation}); params.fod = true; params.sk = app.controller.Controller.user.sessionKey; params.lang = etc.Conf.lang; xspf.loaded = false; requestTime = getTimer(); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onPlaylistfetchSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onPlaylistfetchFail", this); lib.lfm.core.ServiceLocator.get("WSClient").call("playlist.fetch", params); pollingInterval = setInterval(this, "pollXSPFLoader", 400); } } function onPlaylistfetchFail(event) { lib.lfm.core.ServiceLocator.get("Logger").write("playlistfetchfail"); app.controller.Controller.display.onRPCFail(); } function onPlaylistfetchSuccess(event) { onXSPFResponse(event.resp.firstChild.firstChild, true); } function hasExpired() { lib.lfm.core.ServiceLocator.get("logger").write("checking if playlist has expired."); if (getActivePlaylist().hasExpired()) { lib.lfm.core.ServiceLocator.get("logger").write("PLAYLIST EXPIRED"); } return(getActivePlaylist().hasExpired()); } function getActivePlaylist() { if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE)) { return(_shufflePlaylist); } return(mainplaylist); } function getActiveCounter() { if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE)) { return(_shufflePlaylist.counter); } return(mainplaylist.counter); } function getTrackIndex() { if (_global.Feature.OnDemand) { return(counter); } var _local3 = getCurrentTrack(); lib.lfm.core.ServiceLocator.get("logger").write("fetching track index for " + escape(_local3.title)); if (etc.Conf.isMode(_global.SHUFFLE_MODE) || (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE))) { return(getMetadataPlaylist().getIndexByTrackTitle(_local3.title)); } return(getActivePlaylist().getIndexByTrackTitle(_local3.title)); } function parse() { var _local3 = parser.parse(xspf); if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE)) { _shufflePlaylist = _local3; } else { mainplaylist = _local3; } if (_carryOverSkip) { getActivePlaylist().skipsLeft = getActivePlaylist().skipsLeft - 1; } _local3.toString(); if (getActivePlaylist() instanceof lib.lfm.core.model.Playlist) { lib.lfm.core.ServiceLocator.get("logger").log("parsed successfully"); var _local4 = getActivePlaylist().tracks; lib.lfm.core.LfmError.raise(_local4.length + " tracks in playlist"); } else { lib.lfm.core.LfmError.raise("parsing error"); return(false); } return(true); } var timeout = 20000; var pollingInterval = false; var _noPlaylistError = "ERROR=NOPLAYLIST"; var _noContentError = "ERROR=NOTENOUGHCONTENT"; var _requestPlaylistLock = true; var _adjustingStation = true; var externalPlay = false; var _playlistCounter = 0; var _carryOverSkip = false; var _prefetching = false; var counter = 0; var _interaction = false; }
Symbol 320 MovieClip [__Packages.lib.lfm.xml.xspf.XSPF] Frame 0
class lib.lfm.xml.xspf.XSPF extends XML { var uri; function XSPF (uri) { super(); this.uri = uri; } function onLoad(success) { if (success) { ServiceLocator.get("logger").log("response returned from playlist service"); loaded = true; } else { ServiceLocator.get("logger").log("failed loading"); loaded = false; } } var loaded = false; }
Symbol 321 MovieClip [__Packages.lib.lfm.xml.xspf.XSPFParser] Frame 0
class lib.lfm.xml.xspf.XSPFParser { var xspf, playlist; function XSPFParser () { } function parse(xspf) { this.xspf = xspf; var _local8 = xspf.firstChild; delete playlist; playlist = new lib.lfm.core.model.Playlist(); var _local4 = _local8.firstChild; for ( ; _local4 != null ; _local4 = _local4.nextSibling) { if (_local4.nodeName.toLowerCase() != "tracklist") { if (_local4.nodeName == "title") { var _local7 = _local4.firstChild.nodeValue.replace("+", " "); playlist.title = _local7.urldecode(); continue; } if (_local4.nodeName == "link") { var _local6 = _getLinkRel(_local4.attributes.rel); playlist[_local6] = _local4.firstChild.nodeValue; } else { if (_local4.nodeName == "lastfm:expiry") { playlist.expiry = parseInt(_local4.firstChild.nodeValue); } playlist[_local4.nodeName] = _local4.firstChild.nodeValue; if (_local4.nodeName.toLowerCase() == "tracklist") { lib.lfm.core.ServiceLocator.get("logger").log("XSPF PARSER : parsing tracklist..."); var _local5 = _local4.firstChild; while (_local5 != null) { var _local3 = new lib.lfm.core.model.Track(); var _local2 = _local5.firstChild; while (_local2 != null) { if (_local2.nodeName != null) { if (_local2.nodeName == "link") { var _local6 = _getLinkRel(_local2.attributes.rel); _local3[_local6] = _local2.firstChild.nodeValue; } else { if (_local2.nodeName == "extension") { _parseExtensions(_local3, _local2); } if (_local2.nodeName == "lastfm:trackauth") { _local3.authKey = _local2.firstChild.nodeValue; } if (_local2.nodeName == "lastfm:fodlimit") { if (_local2.firstChild.nodeValue == "true") { _local3.FODlimit = true; } } if (_local2.nodeName == "lastfm:source") { _local3.source = _local2.firstChild.nodeValue; } if (_local2.nodeName == "lastfm:rights") { _local3.rightsId = _local2.firstChild.nodeValue; } if (_local2.nodeName == "lastfm:license") { _local3.license = _local2.firstChild.nodeValue; } _local3[_local2.nodeName] = _local2.firstChild.nodeValue; } } _local2 = _local2.nextSibling; } if (_local5.nodeName.toLowerCase() == "track") { playlist.addTrack(_local3); } _local5 = _local5.nextSibling; } } } } if (_local4.nodeName.toLowerCase() == "tracklist") { lib.lfm.core.ServiceLocator.get("logger").log("XSPF PARSER : parsing tracklist..."); var _local5 = _local4.firstChild; while (_local5 != null) { var _local3 = new lib.lfm.core.model.Track(); var _local2 = _local5.firstChild; while (_local2 != null) { if (_local2.nodeName != null) { if (_local2.nodeName == "link") { var _local6 = _getLinkRel(_local2.attributes.rel); _local3[_local6] = _local2.firstChild.nodeValue; } else { if (_local2.nodeName == "extension") { _parseExtensions(_local3, _local2); } if (_local2.nodeName == "lastfm:trackauth") { _local3.authKey = _local2.firstChild.nodeValue; } if (_local2.nodeName == "lastfm:fodlimit") { if (_local2.firstChild.nodeValue == "true") { _local3.FODlimit = true; } } if (_local2.nodeName == "lastfm:source") { _local3.source = _local2.firstChild.nodeValue; } if (_local2.nodeName == "lastfm:rights") { _local3.rightsId = _local2.firstChild.nodeValue; } if (_local2.nodeName == "lastfm:license") { _local3.license = _local2.firstChild.nodeValue; } _local3[_local2.nodeName] = _local2.firstChild.nodeValue; } } _local2 = _local2.nextSibling; } if (_local5.nodeName.toLowerCase() == "track") { playlist.addTrack(_local3); } _local5 = _local5.nextSibling; } } } lib.lfm.core.ServiceLocator.get("Logger").warn("shuffleurl=" + playlist.shuffleURL); return(playlist); } function _parseExtensions(track, node) { var _local1 = node.firstChild; while (_local1 != null) { if (_local1.nodeName == "fullduration") { lib.lfm.core.ServiceLocator.get("Logger").write(_local1.firstChild.nodeValue); track.fullDuration = _local1.firstChild.nodeValue; } else if (_local1.nodeName == "fodlimit") { if (_local1.firstChild.nodeValue == "true") { track.FODlimit = true; } } else if (_local1.nodeName == "trackauth") { track.authKey = _local1.firstChild.nodeValue; } else { track[_local1.nodeName] = _local1.firstChild.nodeValue; } _local1 = _local1.nextSibling; } } function _getLinkRel(url) { var _local1 = url.split("/"); return(_local1.pop()); } var schemaURI = "http://www.stud.uni-karlsruhe.de/~uy7l/xspf-1.xsd"; }
Symbol 322 MovieClip [__Packages.lib.lfm.core.LfmDate] Frame 0
class lib.lfm.core.LfmDate { function LfmDate () { } static function getIsoStandardGMTDateString(date) { var _local4 = date.getUTCMonth() + 1; _local4 = ((_local4 < 10) ? ("0" + _local4) : (_local4)); var _local2 = ((date.getUTCDate() < 10) ? ("0" + date.getUTCDate()) : (date.getUTCDate())); var _local5 = ((date.getUTCHours() < 10) ? ("0" + date.getUTCHours()) : (date.getUTCHours())); var _local6 = ((date.getUTCMinutes() < 10) ? ("0" + date.getUTCMinutes()) : (date.getUTCMinutes())); var _local3 = ((date.getUTCSeconds() < 10) ? ("0" + date.getUTCSeconds()) : (date.getUTCSeconds())); return((((((((((date.getUTCFullYear() + "-") + _local4) + "-") + _local2) + " ") + _local5) + ":") + _local6) + ":") + _local3); } static function GetCurrentTimestamp() { var _local1 = new Date(); return(Math.floor(_local1.getTime() / 1000)); } }
Symbol 323 MovieClip [__Packages.lib.ext.ascrypt.Base64] Frame 0
class lib.ext.ascrypt.Base64 { function Base64 () { } static function encode(src) { var _local1 = 0; var _local8 = new String(""); var _local6; var _local4; var _local3; var _local10; var _local9; var _local7; var _local2; while (_local1 < src.length) { _local6 = src.charCodeAt(_local1++); _local4 = src.charCodeAt(_local1++); _local3 = src.charCodeAt(_local1++); _local10 = _local6 >> 2; _local9 = ((_local6 & 3) << 4) | (_local4 >> 4); _local7 = ((_local4 & 15) << 2) | (_local3 >> 6); _local2 = _local3 & 63; if (isNaN(_local4)) { _local2 = 64; _local7 = _local2; } else if (isNaN(_local3)) { _local2 = 64; } _local8 = _local8 + (base64chars.charAt(_local10) + base64chars.charAt(_local9)); _local8 = _local8 + (base64chars.charAt(_local7) + base64chars.charAt(_local2)); } return(_local8); } static function decode(src) { var _local2 = 0; var _local1 = new String(""); var _local7; var _local10; var _local9; var _local8; var _local6; var _local4; var _local5; while (_local2 < src.length) { _local8 = base64chars.indexOf(src.charAt(_local2++)); _local6 = base64chars.indexOf(src.charAt(_local2++)); _local4 = base64chars.indexOf(src.charAt(_local2++)); _local5 = base64chars.indexOf(src.charAt(_local2++)); _local7 = (_local8 << 2) | (_local6 >> 4); _local10 = ((_local6 & 15) << 4) | (_local4 >> 2); _local9 = ((_local4 & 3) << 6) | _local5; _local1 = _local1 + String.fromCharCode(_local7); if (_local4 != 64) { _local1 = _local1 + String.fromCharCode(_local10); } if (_local5 != 64) { _local1 = _local1 + String.fromCharCode(_local9); } } return(_local1); } static var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; }
Symbol 324 MovieClip [__Packages.app.view.button.FwdButton] Frame 0
class app.view.button.FwdButton extends lib.lfm.display.LfmButton { var addEventListener, disable, dispatchEvent, icon, createMouseUpTrigger; function FwdButton () { super(); ServiceLocator.get("logger").write("fwdbutton created"); addEventListener("onPressSkipButton", app.controller.Controller.playlist); addEventListener("onPressSkipButton", app.controller.Controller.menu); disable(); } function onRelease() { app.controller.Controller.track.setRating("S"); dispatchEvent({type:"onPressSkipButton", target:this}); icon.gotoAndStop("inactive"); } function onPress() { icon.gotoAndStop("onClick"); createMouseUpTrigger(); } }
Symbol 325 MovieClip [__Packages.app.controller.StationController] Frame 0
class app.controller.StationController extends lib.lfm.core.LfmController { function StationController () { super(); } function initListeners() { lib.lfm.core.ServiceLocator.get("Client").addEventListener("onCreateStationSuccess", this); } function onCreateStationSuccess(event) { lib.lfm.core.ServiceLocator.get("Station").onCreateStationSuccess(event); } function busy() { return(lib.lfm.core.ServiceLocator.get("Station").busy()); } function handshake() { lib.lfm.core.ServiceLocator.get("Station").handshake(); } function getPlaylistURL() { return(lib.lfm.core.ServiceLocator.get("Station").getPlaylistURL()); } function isRadioURL(protocolURL) { return(!((protocolURL.indexOf("playlist") > 0) && (!protocolURL.indexOf("shuffle")))); } function isTuning() { return(lib.lfm.core.ServiceLocator.get("Station").isTuning()); } function lastTuningFailed() { return(lib.lfm.core.ServiceLocator.get("Station").lastTuningFailed()); } function onPressPlayButton(event) { if (_global.Feature.Radio && (_global.radioURL)) { if (lastTuningFailed() && (!isTuning())) { tune(_global.radioURL); } } } function tune(lastfmURI) { if (!_global.Feature.Radio) { lib.lfm.core.LfmError.raise("cant tune - not in RADIO mode"); return(false); } lib.lfm.core.ServiceLocator.get("Station").tune(lastfmURI); } function hasTuningHistory() { return(lib.lfm.core.ServiceLocator.get("Station").hasTuningHistory()); } function onValidUserSession(event) { return(lib.lfm.core.ServiceLocator.get("Station").onValidUserSession(event)); } }
Symbol 326 MovieClip [__Packages.app.controller.ViewportController] Frame 0
class app.controller.ViewportController extends lib.lfm.core.LfmController { var Feature, target, initX, displays, dispatchEvent, playables, playlistDisplayDelay, _viewportSelection, _scrollBar, addEventListener, _scrollbarTimeout; function ViewportController () { super(); } function initListeners() { app.controller.Controller.playlist.addEventListener("onLoadMetadataPlaylist", this); app.controller.Controller.track.addEventListener("onTrackStartPlaying", this); app.controller.Controller.track.addEventListener("onStopTrack", this); app.controller.Controller.track.addEventListener("onLoadTrackFail", this); app.controller.Controller.track.addEventListener("onPressStopButton", this); app.controller.Controller.track.addEventListener("onCompleteTrack", this); app.controller.Controller.playlist.addEventListener("onLoadPlaylist", this); app.controller.Controller.user.addEventListener("onValidUserSession", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onUsergetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onArtistgetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onAlbumgetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onLabelgetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onTrackgetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onTaggetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("WSClient").addEventListener("onEventgetplayermenuSuccess", this); lib.lfm.core.ServiceLocator.get("Station").addEventListener("onAdjustFail", this); Feature = _global.Feature; } function setTarget(mc) { target = mc; initX = target._x; target.addEventListener("onScroll", this); displays = [target]; target._parent.loadingIcon.gotoAndPlay(2); } function onLoadMetadataPlaylist(event) { _initMask(); initViewport(); dispatchEvent({type:"onLoadViewportContent", target:this}); } function initViewport() { target._parent.loadingIcon._visible = false; target._parent.loadingIcon.enabled = false; if (playables.getPrimaryPlaylist()) { var _local2 = app.controller.Controller.playlist.getMetadataPlaylist().length() <= 4; if (!playables.stations.length) { _local2 = true; } target.showPlaylist(app.controller.Controller.playlist.getMetadataPlaylist(), {expand:_local2}); } target.showPlayables(playables, true); } function _initMask() { var _local2 = target._parent.attachMovie("viewportMask", "mask", target.getNextHighestDepth(), {_x:-187, _y:38}); target.setMask(_local2); } function onLoadPlaylist(event) { } function isInPlaylistMode() { return(_global.Feature.OnDemand); } function isInPlaylistDisplayMode() { return(displayMode == "playlist"); } function onTrackStartPlaying(event) { getSelector().onTrackStartPlaying(); if (target._parent.loadingIcon) { target._parent.loadingIcon._visible = false; } lib.lfm.core.ServiceLocator.get("Logger").write("viewportcontroller.onskip. shuffle=" + _global.Feature.Shuffle); getRightDisplay().onTrackStartPlaying(); if (isInPlaylistMode()) { target.highlightTrack(app.controller.Controller.playlist.getTrackIndex()); } else { target.highlightStation(); } if (_global.Feature.Shuffle) { lib.lfm.core.ServiceLocator.get("Logger").write("SCROLL TO TRACK"); var _local3 = app.controller.Controller.playlist.getTrackIndex(); if (!target.playlist0.isExpanded()) { target.playlist0.expand(); } target.selectPlayable(target.playlist0["track" + _local3], true); target.highlightTrack(_local3); } else if (_global.Feature.OnDemand) { if (!target.playlist0.isExpanded()) { target.playlist0.expand(); } } if (isInPlaylistDisplayMode() && (!playlistDisplayDelay)) { playlistDisplayDelay = setInterval(this, "showNowPlayingDisplay", 0); } _viewportSelection = false; } function isViewportSelection() { return(_viewportSelection); } function onPressBackButton() { showPlaylistDisplay(); } function getRightDisplay() { return(displays[displays.length - 1]); } function showNowPlayingDisplay(instant) { switchOffScrolling(); target.onEnterFrame = null; clearInterval(playlistDisplayDelay); playlistDisplayDelay = false; lib.lfm.core.ServiceLocator.get("Logger").write("scrolloffset " + target.getScrollOffset()); attachDisplay("nowPlayingDisplay"); getRightDisplay().init(); getRightDisplay().showAlbumArt(app.controller.Controller.playlist.getCurrentTrack().image); getRightDisplay().showAlbum(app.controller.Controller.playlist.getCurrentTrack()); displayMode = "nowPlaying"; doSlideRightTransition(instant); } function showShuffleDisplay() { attachDisplay("shuffleDisplay"); doSlideRightTransition(); displayMode = "shuffle"; } function attachDisplay(display) { var _local3 = displays.length * target.getViewportWidth(); lib.lfm.core.ServiceLocator.get("Logger").write((("attaching display " + display) + "@posX=") + _local3); target.attachMovie(display, display, target.getNextHighestDepth(), {_x:_local3}); displays.push(target[display]); displayPos++; target[display]._x = _local3; target[display]._y = Math.ceil(Math.abs(target.getScrollOffset())); } function doSlideRightTransition(instant) { var _local2 = displays[displayPos]; _setDisplayMode(_local2); switchOffScrolling(); var _local3 = -((getRightDisplay()._x + Math.abs(target.initX)) + 3); var _local4 = (instant ? 0 : 200); lib.lfm.display.LfmEffect.HorizontalMove(target, _local3, target._y, _local4); } function _setDisplayMode(display) { if (display._name == "shuffleDisplay") { displayMode = "shuffle"; } else if (display._name == "nowPlayingDisplay") { displayMode = "nowPlaying"; } else { displayMode = "playlist"; } } function doSlideLeftTransition(callback) { displayPos--; var _local3 = displays[displayPos - 1]._x; var _local2 = displays[displayPos]; _setDisplayMode(_local2); lib.lfm.display.LfmEffect.HorizontalMove(target, (target._x + target.getViewportWidth()) + 3, target._y, 0, callback); } function switchOffScrolling() { hideScrollBar(true); target.switchOffScrolling(); } function onPageUp() { target.pageUp(); } function onPageDown() { target.pageDown(); } function onPlaylistDisplayTransitionComplete() { lib.lfm.core.ServiceLocator.get("Logger").write("removing " + getRightDisplay()); getRightDisplay().removeMovieClip(); displays.pop(); target.onPlaylistDisplayTransitionComplete(); } function showPlaylistDisplay() { clearInterval(playlistDisplayDelay); playlistDisplayDelay = false; doSlideLeftTransition({object:this, method:"onPlaylistDisplayTransitionComplete"}); } function createScrollBar() { _scrollBar = target._parent.attachMovie("scrollbar", "scrollbar", target._parent.getNextHighestDepth() + 1000000, {_x:112, _y:39, _alpha:0}); _scrollBar.addEventListener("onReleaseScrollDownButton", this); _scrollBar.addEventListener("onReleaseScrollUpButton", this); _scrollBar.addEventListener("onRollOverDownButton", this); _scrollBar.addEventListener("onRollOverUpButton", this); _scrollBar.addEventListener("onRollOutDownButton", this); _scrollBar.addEventListener("onRollOutUpButton", this); _scrollBar.addEventListener("onPageUp", this); _scrollBar.addEventListener("onPageDown", this); addEventListener("onLoadViewportContent", _scrollBar); return(_scrollBar); } function getScrollBar() { if (_scrollBar == undefined) { _scrollBar = createScrollBar(); } return(_scrollBar); } function showScrollBar(immediate) { if (isInPlaylistDisplayMode() && (target.canScroll())) { getScrollBar().resize(target); refreshScrollbarHead(); getScrollBar().show(immediate); if (!_scrollbarTimeout) { _scrollbarTimeout = setScrollBarTimeout(3000); } else { refreshScrollBarTimeout(); } } } function hasScrollBar() { return((getScrollBar() && (getScrollBar()._visible)) && (getScrollBar()._alpha > 5)); } function setScrollBarTimeout(time) { return(setInterval(this, "scrollBarIdleTimeout", time)); } function isMouseOverScrollbar() { return(getScrollBar().hitTest(_root._xmouse, _root._ymouse)); } function isMouseOverViewport() { return(target.isMouseOverViewport()); } function scrollBarIdleTimeout() { if ((((!target.isMouseDown()) && (hasScrollBar())) && (!isMouseOverScrollbar())) && (isInPlaylistDisplayMode())) { } } function onReleaseScrollUpButton(event) { lib.lfm.core.ServiceLocator.get("Logger").write("ONRELEASESCROLLUP"); target.pageUp(); } function onReleaseScrollDownButton(event) { lib.lfm.core.ServiceLocator.get("Logger").write("ONRELEASESCROLLDOWN"); target.pageDown(); } function onRollOverUpButton() { target.scrollUp(); lib.lfm.core.ServiceLocator.get("Logger").write("onRollOverUpButton"); } function onRollOverDownButton() { target.scrollDown(); lib.lfm.core.ServiceLocator.get("Logger").write("onRollOverDownButton"); } function onRollOutUpButton() { target.clearScrolling(); lib.lfm.core.ServiceLocator.get("Logger").write("onRollOutUpButton"); } function onRollOutDownButton() { target.clearScrolling(); lib.lfm.core.ServiceLocator.get("Logger").write("onRollOutDownButton"); } function onMouseUpEvent() { getScrollBar().stopHandleDrag(); } function onMouseWheel() { refreshScrollBarTimeout(); } function onScroll(event) { lib.lfm.core.ServiceLocator.get("Logger").write(("scrollbar target=" + event.target) instanceof app.view.display.ScrollBar); refreshScrollbarHead(); } function onDragScrollBar(event) { target.scrollTo(Math.ceil(event.percent)); } function refreshScrollbarHead() { getScrollBar().draw({scrollPercent:target.getScrollPercent(), scrollHeight:target.getListHeight()}); } function refreshScrollBarTimeout() { clearInterval(_scrollbarTimeout); clearInterval(playlistDisplayDelay); playlistDisplayDelay = false; _scrollbarTimeout = setScrollBarTimeout(4000); } function hideScrollBar(immediate) { if (!isInPlaylistDisplayMode()) { getScrollBar()._visible = false; } else { getScrollBar().hide(immediate); } } function onStopTrack(event) { target.clearTrackHighlights(); if (!_global.Feature.Radio) { target.clearStationHighlights(); } } function onBufferTimeout(event) { target.clearTrackHighlights(); target.clearStationHighlights(); if (!isInPlaylistDisplayMode()) { createPlaylistDisplayDelay(); } } function createPlaylistDisplayDelay() { clearInterval(playlistDisplayDelay); playlistDisplayDelay = setInterval(this, "showPlaylistDisplay", 1500); } function onCompleteTrack(event) { getSelector().onCompleteTrack(); target.clearTrackHighlights(); target.clearStationHighlights(true); if (_global.Feature.FOD) { if ((!isInPlaylistDisplayMode()) && (playables.length())) { createPlaylistDisplayDelay(); } } } function onPressStopButton(event) { getSelector().onStopTrack(); target.onPressStopButton(); target.clearTrackHighlights(); target.clearStationHighlights(); if ((!isInPlaylistDisplayMode()) && (playables.length())) { createPlaylistDisplayDelay(); } } function onValidUserSession(event) { if (!_global.Feature.Radio) { if (parseInt(_global.restype) != etc.Conf.RES_PLAYLIST) { getPlayables(_global.resname, _global.restype); } } else { _initMask(); showNowPlayingDisplay(true); var _local3 = -((getRightDisplay()._x + Math.abs(target.initX)) + 3); target._x = _local3; getRightDisplay().hideMenu(); } } function onEnterShuffleMode(event) { } function onJoinSubmit() { getRightDisplay().onJoinSubmit(); } function onCancel() { getRightDisplay().onCancel(); } function switchToOnDemandMode() { if (etc.Conf.isMode(_global.RADIO_MODE)) { app.controller.Controller.menu.onExitRadioMode(); } Feature.Radio = false; Feature.FOD = true; Feature.OnDemand = true; etc.Conf.setMode(_global.PLAYLIST_MODE); } function switchToRadioMode() { Feature.Radio = true; Feature.FOD = false; Feature.OnDemand = false; etc.Conf.setMode(_global.RADIO_MODE); app.controller.Controller.menu.onEnterRadioMode(); } function onSelect(item) { _viewportSelection = true; target.clearTrackHighlights(); target.clearStationHighlights(); item.select(); hideScrollBar(true); lib.lfm.core.ServiceLocator.get("Logger").write(("trackItem " + item) instanceof app.view.menu.TrackItem); lib.lfm.core.ServiceLocator.get("Logger").write(("stationItem " + item) instanceof app.view.menu.StationItem); if (item instanceof app.view.menu.TrackItem) { getSelector().setSelectedItem(playables.getPrimaryPlaylist()); if (app.controller.Controller.playlist.getMetadataPlaylist().isShuffle()) { app.controller.Controller.playlist.setQueuedUpMode(_global.SHUFFLE_MODE); } switchToOnDemandMode(); lib.lfm.core.ServiceLocator.get("Logger").write("radio is " + _global.Feature.Radio); target.playPlaylistTrack(item); target.clearStationHighlights(); } if (item instanceof app.view.menu.StationItem) { getSelector().setSelectedItem(item); item.select(); switchToRadioMode(); lib.lfm.core.ServiceLocator.get("Logger").write("radio is " + _global.Feature.Radio); target.playStation(item); } } function getPlayables(resname, restype) { var _local3 = new Object(); if (restype == "event") { _local3[restype] = _global.resourceID; } else { _local3[restype] = resname; } if (_global.artist) { _local3.artist = _global.artist; } if (etc.Conf.lang != undefined) { _local3.lang = _root.lang; } lib.lfm.core.ServiceLocator.get("WSClient").call(restype + ".getplayermenu", _local3); } function onUsergetplayermenuSuccess(event) { _parsePlayables(event.xml); loadPrimaryPlaylist(); } function onAdjustSuccess() { target.clearStationHighlights(true); if (!playables.length()) { getSelector().setTitle(); } } function onAdjustFail(event) { target.clearTrackHighlights(); target.clearStationHighlights(true); } function onLoadTrackFail() { if (_global.Feature.FOD) { target.clearTrackHighlights(); } } function loadPrimaryPlaylist() { var _local2 = playables.getPrimaryPlaylist(); var _local3 = {playlistURL:_local2.getProtocolURL(), viewport:true}; lib.lfm.core.ServiceLocator.get("Logger").write((("getting playlist for OD mode " + _local2.getProtocolURL()) + ":") + _local2.type); if (_local2) { app.controller.Controller.playlist.getResourcePlaylist(_local3); } else { onLoadMetadataPlaylist(); } } function onMouseDownEvent() { if (!isMouseOverSelector()) { getSelector().collapse(); } dispatchEvent({type:"onMouseDownEvent", target:this}); } function isMouseOverSelector() { return(getSelector().hitTest(_root._xmouse, _root._ymouse)); } function getSelector() { return(target._parent.selector); } function _parsePlayables(xml) { playables = new lib.lfm.xml.PlaylistsParser(); playables.parse(xml); target._parent.attachMovie("selectorDisplay", "selector", target._parent.getNextHighestDepth() + 10000, {_x:-184, _y:218}); getSelector().addEventListener("onSelectItemInSelector", this); getSelector().addEventListener("onSelectorActivity", this); getSelector().addItems(playables.playlists); getSelector().addItems(playables.stations); getSelector().setSelectedItem(playables.getPrimaryPlaylist()); getSelector().draw(); } function onSelectorActivity(event) { refreshScrollBarTimeout(); hideScrollBar(true); } function onSelectItemInSelector(event) { var _local2 = event.item; var _local3 = _local2.getPlayable(); lib.lfm.core.ServiceLocator.get("Logger").write("on select " + _local3.title); target.clearTrackHighlights(); target.clearStationHighlights(true); target.selectPlayable(_local2, true, true); getSelector().collapse(); hideScrollBar(true); } function onArtistgetplayermenuSuccess(event) { _parsePlayables(event.xml); loadPrimaryPlaylist(); } function onLabelgetplayermenuSuccess(event) { _parsePlayables(event.xml); loadPrimaryPlaylist(); } function onEventgetplayermenuSuccess(event) { _parsePlayables(event.xml); loadPrimaryPlaylist(); } function onTaggetplayermenuSuccess(event) { _parsePlayables(event.xml); loadPrimaryPlaylist(); } function onAlbumgetplayermenuSuccess(event) { lib.lfm.core.ServiceLocator.get("Logger").write("playermenu: " + event.xml); _parsePlayables(event.xml); loadPrimaryPlaylist(); } function onTrackgetplayermenuSuccess(event) { _parsePlayables(event.xml); loadPrimaryPlaylist(); } var displayMode = "playlist"; var displayPos = 0; }
Symbol 327 MovieClip [__Packages.lib.lfm.xml.PlaylistsParser] Frame 0
class lib.lfm.xml.PlaylistsParser { var stations, playlists; function PlaylistsParser () { stations = new Array(); playlists = new Array(); } function parse(xml) { var _local5 = xml.firstChild; var _local4 = _local5.firstChild; while (_local4 != null) { if (_local4.nodeName.toLowerCase() == "playlists") { lib.lfm.core.ServiceLocator.get("Logger").write("parsing playlists"); var _local3 = _local4.firstChild; while (_local3 != null) { _parsePlaylist(_local3); _local3 = _local3.nextSibling; } } else if (_local4.nodeName.toLowerCase() == "stations") { lib.lfm.core.ServiceLocator.get("Logger").write("parsing stations"); var _local2 = _local4.firstChild; while (_local2 != null) { _parseStation(_local2); _local2 = _local2.nextSibling; } } _local4 = _local4.nextSibling; } } function _parsePlaylist(root_node) { var _local5 = new lib.lfm.core.model.Playlist(); var _local2 = root_node.firstChild; while (_local2 != null) { var _local4 = _local2.nodeName; var _local3 = _local2.firstChild.nodeValue; _local5[_local4] = _local3; _local2 = _local2.nextSibling; } lib.lfm.core.ServiceLocator.get("Logger").write("parsed playlist " + _local5.title); playlists.push(_local5); } function getIndex(item) { var _local2 = 0; while (_local2 < playlists.length) { if (playlists[_local2].title == item.title) { return(_local2); } _local2++; } _local2 = 0; while (_local2 < stations.length) { if (stations[_local2].title == item.title) { return(_local2); } _local2++; } return(-1); } function _parseStation(root_node) { var _local5 = new lib.lfm.core.model.Station(); var _local2 = root_node.firstChild; while (_local2 != null) { var _local4 = _local2.nodeName; var _local3 = _local2.firstChild.nodeValue; _local5[_local4] = _local3; _local2 = _local2.nextSibling; } stations.push(_local5); lib.lfm.core.ServiceLocator.get("Logger").write("parsed station " + _local5.title); } function getPrimaryPlaylist() { return(playlists[0]); } function length() { return(playlists.length + stations.length); } function getStations() { return(stations); } function getPlaylists() { return(playlists); } }
Symbol 328 MovieClip [__Packages.lib.lfm.core.model.Station] Frame 0
class lib.lfm.core.model.Station extends lib.lfm.core.model.LfmModel { function Station () { super(); } }
Symbol 329 MovieClip [__Packages.app.view.display.ScrollBar] Frame 0
class app.view.display.ScrollBar extends lib.lfm.display.LfmUIElement { var initHandleY, handle, bg, downBtn, upBtn, _visible, _alpha, _ymouse, _handleInterval; function ScrollBar () { super(); mx.events.EventDispatcher.initialize(this); initHandleY = handle._y; handle.onPress = mx.utils.Delegate.create(this, onPressHandle); handle.onRelease = mx.utils.Delegate.create(this, onReleaseHandle); bg.onRelease = mx.utils.Delegate.create(this, onReleaseBackground); downBtn.onPress = mx.utils.Delegate.create(this, onPressDownButton); downBtn.onRollOver = mx.utils.Delegate.create(this, onRollOverDownButton); downBtn.onRollOut = mx.utils.Delegate.create(this, onRollOutDownButton); upBtn.onRollOver = mx.utils.Delegate.create(this, onRollOverUpButton); upBtn.onPress = mx.utils.Delegate.create(this, onPressUpButton); upBtn.onRollOut = mx.utils.Delegate.create(this, onRollOutUpButton); lib.lfm.core.ServiceLocator.get("Logger").write("ScrollBar Class Initialised :)"); } function dispatchEvent() { } function addEventListener() { } function removeEventListener() { } function onLoadViewportContent(event) { resizeHandle(event.target); } function show(immediate) { _visible = true; if (immediate) { _alpha = 100; } else { lib.lfm.display.LfmEffect.Fade(100, this, 0, {target:this, method:"onFadeIn"}); } } function hide(immediate) { stopHandleDrag(true); if (immediate) { _alpha = 0; _visible = false; } else if (_alpha > 1) { lib.lfm.display.LfmEffect.Fade(0, this, 0, {target:this, method:"onFadeOut"}); } } function resize(viewport) { lib.lfm.core.ServiceLocator.get("Logger").write("ScrollBar Resizing... reaching for handle now"); resizeHandle(viewport); } function resizeHandle(viewport) { var _local2 = (viewport.getViewportHeight() / viewport._height) * _getMaxHandleHeight(viewport); if (_local2 < _minHandleHeight) { _local2 = _minHandleHeight; } handle.resize(_local2); } function onReleaseHandle() { stopHandleDrag(); } function onPressHandle() { startDragging(); } function onReleaseBackground() { if (_ymouse > handle._y) { lib.lfm.core.ServiceLocator.get("Logger").write("page down"); dispatchEvent({type:"onPageDown", target:this}); } else { lib.lfm.core.ServiceLocator.get("Logger").write("page up"); dispatchEvent({type:"onPageUp", target:this}); } } function onDrag() { app.controller.Controller.viewport.onDragScrollBar({target:this, percent:getScrollPercent()}); } function startDragging() { if (draggingLock) { draggingLock = false; lib.lfm.core.ServiceLocator.get("Logger").write("start dragging"); handle.startDrag(false, handle._x, initHandleY, handle._x, initHandleY + _getMaxHandlePos()); _handleInterval = setInterval(this, "onDrag", 100); } } function getScrollPercent() { return(((handle._y - initHandleY) / _getMaxHandlePos()) * 100); } function _getMaxHandleHeight(viewport) { return(viewport.getViewportHeight() - 40); } function _getMaxHandlePos() { return((bg._height - (initHandleY * 2)) - handle._height); } function onPressUpButton() { upBtn._alpha = 100; } function onPressDownButton() { downBtn._alpha = 100; } function onRollOverUpButton() { upBtn._alpha = 100; dispatchEvent({type:"onRollOverUpButton", target:this}); } function onRollOverDownButton() { downBtn._alpha = 100; dispatchEvent({type:"onRollOverDownButton", target:this}); } function onRollOutUpButton() { upBtn._alpha = 70; dispatchEvent({type:"onRollOutUpButton", target:this}); } function onRollOutDownButton() { downBtn._alpha = 70; dispatchEvent({type:"onRollOutDownButton", target:this}); } function onReleaseUpButton() { upBtn._alpha = 70; dispatchEvent({type:"onReleaseScrollUpButton", target:this}); } function onReleaseDownButton() { downBtn._alpha = 70; dispatchEvent({type:"onReleaseScrollDownButton", target:this}); } function stopHandleDrag(force) { if (!draggingLock) { lib.lfm.core.ServiceLocator.get("Logger").write("stophandledrag"); handle.stopDrag(); clearInterval(_handleInterval); _handleInterval = false; draggingLock = true; } } function onFadeOut() { _visible = false; } function onFadeIn() { } function draw(options) { var _local2 = _getMaxHandlePos(); if (options.scrollPercent > 100) { options.scrollPercent = 100; } handle._y = ((options.scrollPercent / 100) * _local2) + initHandleY; } var _minHandleHeight = 20; var draggingLock = true; }
Symbol 330 MovieClip [__Packages.app.view.display.Viewport] Frame 0
class app.view.display.Viewport extends lib.lfm.display.LfmUIElement { var setBgColor, items, mouseListener, initY, _y, initX, _x, lastY, _ymouse, _parent, loadingIcon, attachMovie, getNextHighestDepth, _height, _playingStationIndex, playlist0, stationTitle, playables, _alpha, _visible, grab, _xmouse, _lastYMouse, getURL, _dragListener, hitTest, _scrollBarRefreshInterval, _scrollEnabled, onEnterFrame, bg; function Viewport () { super(); mx.events.EventDispatcher.initialize(this); setBgColor(16777215); items = new Array(); mouseListener = new Object(); mouseListener.onMouseDown = mx.utils.Delegate.create(this, onMouseDownEvent); mouseListener.onMouseUp = mx.utils.Delegate.create(this, onMouseUpEvent); mouseListener.onMouseMove = mx.utils.Delegate.create(this, onMouseMoveEvent); Mouse.addListener(mouseListener); initY = _y; initX = _x; lastY = _ymouse; MouseWheel.addListener(this); _parent.loadingIcon.gotoAndPlay(29); loadingIcon.gotoAndPlay(2); } function dispatchEvent() { } function addEventListener() { } function removeEventListener() { } function onRollOutViewport() { } function showPlaylist(playlist, options) { var _local2 = attachMovie("playlistItem", "playlist" + _playlistIndex, getNextHighestDepth() + 10000, {index:_playlistIndex, playlist:playlist, _y:getListHeight()}); _local2.addEventListener("onPlaylistCollapse", this); _local2.addEventListener("onPlaylistExpand", this); _playlistIndex++; _local2.draw(); if (options.expand) { _local2.expand(); } if (hasScrollingContent() || (options.label)) { _local2.showLabel(); } } function onMouseWheel(delta) { app.controller.Controller.viewport.onMouseWheel(); lib.lfm.core.ServiceLocator.get("Logger").write("onmousewheel triggered with delta " + delta); if (delta > 0) { Yoffset = 2; } else { Yoffset = -2; } if (canScroll() && (hasScrollingContent())) { var _local3 = ((Math.abs(delta) > 1) ? (((Math.abs(delta) < 4) ? (Math.abs(delta)) : 2)) : 1.3); var _local5 = ((Math.abs(delta) > 1) ? (((Math.abs(delta) < 6) ? (Math.abs(delta) * 6) : 36)) : 25); var _local2 = {delta:_local5}; if (delta > 0) { if (canScrollUp(_local2)) { _scrollWheel = true; lib.lfm.display.LfmEffect.Move(this, _x, _y + _local2.delta, "onCompleteScrollWheel", _local3); } } else if (canScrollDown(_local2)) { _scrollWheel = true; lib.lfm.display.LfmEffect.Move(this, _x, _y - _local2.delta, "onCompleteScrollWheel", _local3); } } app.controller.Controller.viewport.onScroll({target:this}); } function onCompleteScrollWheel() { _scrollWheel = false; } function canScrollUp(deltaObj) { if (!deltaObj.delta) { deltaObj.delta = 0; } if ((_y + deltaObj.delta) >= getMaximumScrollUpOffset()) { deltaObj.delta = getMaximumScrollUpOffset() - _y; lib.lfm.core.ServiceLocator.get("Logger").write(("delta object changed to " + deltaObj.delta) + " onscrollup"); if (deltaObj.delta > 0) { return(true); } return(true); } return(true); } function canScrollDown(deltaObj) { if (!deltaObj.delta) { deltaObj.delta = 0; } if ((_y - deltaObj.delta) <= getMaximumScrollDownOffset()) { deltaObj.delta = _y - getMaximumScrollDownOffset(); lib.lfm.core.ServiceLocator.get("Logger").write(("delta object changed to " + deltaObj.delta) + " onscrolldown"); if (deltaObj.delta > 0) { return(true); } return(false); } return(true); } function getMaximumScrollUpOffset() { return(initY); } function getMaximumScrollDownOffset() { return(((-_height) + getViewportHeight()) + initY); } function playPlaylistTrack(trackItem) { _playingStationIndex = -1; app.controller.Controller.playlist.playTrack(trackItem.index); lib.lfm.core.ServiceLocator.get("Logger").warn("playlist TITLE " + playlist0.playlist.title); app.controller.Controller.display.showNowPlaying(playlist0.playlist.title); } function playStation(stationItem) { _playingStationIndex = stationItem.index; _global.radioURL = stationItem.station.url; lib.lfm.core.ServiceLocator.get("Logger").write("play station in viewport"); app.controller.Controller.station.tune(stationItem.station.url); app.controller.Controller.display.showNowPlaying(stationItem.station.title); } function onPlaylistCollapse(event) { lib.lfm.core.ServiceLocator.get("Logger").write("viewport.onplaylistcollapse"); _stationIndex = 0; _drawPlayables(); _refreshHighlight(); if (!hasScrollingContent()) { app.controller.Controller.viewport.hideScrollBar(true); } else { app.controller.Controller.viewport.showScrollBar(); } } function onPlaylistExpand(event) { _stationIndex = 0; _drawPlayables(); _refreshHighlight(); if (hasScrollingContent()) { app.controller.Controller.viewport.showScrollBar(); } } function _refreshHighlight() { if (app.controller.Controller.track.isPlaying()) { if (_global.Feature.OnDemand | _global.Feature.Shuffle) { var _local3 = app.controller.Controller.playlist.getTrackIndex(); highlightTrack(_local3); } else if (_global.Feature.Radio) { highlightStation(); } } } function highlightStation() { this["station" + getPlayingStationIndex()].select(); } function switchOffScrolling() { _canScroll = false; } function switchOnScrolling() { _canScroll = true; } function onPlaylistDisplayTransitionComplete() { switchOnScrolling(); if (!_global.Feature.FOD) { _refreshHighlight(); } } function getPlayingStationIndex() { return(_playingStationIndex); } function getListHeight() { var _local3 = 0; var _local2 = 0; while (_local2 < _playlistIndex) { _local3 = _local3 + this["playlist" + _local2]._height; _local2++; } _local2 = 0; while (_local2 < _stationIndex) { _local3 = _local3 + this["station" + _local2]._height; _local2++; } if (hasStations()) { if (stationTitle) { _local3 = _local3 + stationTitle._height; } } return(_local3); } function showStation(station, options) { lib.lfm.core.ServiceLocator.get("Logger").write("Showing Station " + station.title); if (this["station" + _stationIndex]) { this["station" + _stationIndex].removeMovieClip(); } var _local2 = attachMovie("stationItem", "station" + _stationIndex, getNextHighestDepth() + 10000, {index:_stationIndex, station:station, _y:getListHeight()}); _stationIndex++; if (options.expand) { _local2.expand(); } } function showPlayables(playables, fade) { this.playables = playables; _drawPlayables(fade); } function _drawPlayables(fade) { if (fade) { _alpha = 0; _visible = false; } var _local2 = 1; while (_local2 < playables.playlists.length) { showPlaylist(playables.playlists[_local2], {expand:false, label:true}); _local2++; } if (getViewportHeight() > 140) { if (hasStations()) { var _local5 = new lib.lfm.core.model.Playlist(); _local5.title = app.controller.Controller.lang.getCopy("radioStationsTitle"); if (stationTitle) { stationTitle.removeMovieClip(); } lib.lfm.core.ServiceLocator.get("Logger").write("Creating station title at height " + getListHeight()); var stationTitle = attachMovie("playlistItem", "stationTitle", getNextHighestDepth() + 10000, {index:_playlistIndex, playlist:_local5, _y:getListHeight()}); stationTitle.playBtn._visible = false; stationTitle.setTitle(_local5.title); stationTitle.hideLabel(); stationTitle.hideExpander(); } _local2 = 0; while (_local2 < 1) { if (playables.stations[_local2]) { showStation(playables.stations[_local2]); } _local2++; } } if (fade) { lib.lfm.display.LfmEffect.Fade(100, this); } } function hasStations() { return(playables.stations.length > 0); } function canScroll() { return(_canScroll); } function highlightTrack(trackIndex) { lib.lfm.core.ServiceLocator.get("Logger").write("highlighting track " + trackIndex); clearTrackHighlights(); playlist0["track" + trackIndex].select(); playlist0.select(); } function onPressStopButton() { } function clearTrackHighlights() { var _local2 = 0; while (_local2 < _playlistIndex) { this["playlist" + _local2].clearTrackHighlights(); this["playlist" + _local2].deselect(); _local2++; } } function clearStationHighlights(preserveSelection) { var _local2 = 0; for ( ; _local2 < _stationIndex ; _local2++) { if (preserveSelection) { if (playingStation(this["station" + _local2])) { continue; } } else { this["station" + _local2].deselect(); } } } function playingStation(station) { return(station.index == _playingStationIndex); } function createGrabIcon() { Mouse.hide(); if (!grab) { attachMovie("grabIcon", "grab", getNextHighestDepth(), {_x:_xmouse, _y:_ymouse}); } } function isMouseDown() { return(_mouseDown); } function onMouseDownEvent() { _mouseDown = true; _lastYMouse = _ymouse; getURL("javascript:LFM.Flash.Player.onMouseDownViewport();", _self); app.controller.Controller.viewport.onMouseDownEvent(); if ((isMouseOverViewport() && (!app.controller.Controller.viewport.isMouseOverScrollbar())) && (!_dragListener)) { _dragListener = setInterval(this, "dragListener", 100); } } function isMouseOverViewport() { var _local3 = hitTest(_root._xmouse, _root._ymouse, true); return(_local3); } function dragListener() { var _local2 = _ymouse - _lastYMouse; dragScroll(_local2); _lastYMouse = _ymouse; } function dragScroll(delta) { if (canScroll() && (Math.abs(delta) > 0)) { lib.lfm.core.ServiceLocator.get("Logger").write("on scroll start:" + delta); dispatchEvent({type:"onScrollStart", target:this}); scroll(delta); } } function scroll(delta, smooth) { var _local2 = {delta:Math.abs(delta)}; if ((delta > 0) && (!canScrollUp(_local2))) { return(undefined); } if ((delta < 0) && (!canScrollDown(_local2))) { return(undefined); } if (delta < 0) { _local2.delta = _local2.delta * -1; } if (!smooth) { _y = _y + _local2.delta; } else { lib.lfm.display.LfmEffect.Move(this, _x, _y + _local2.delta, "onScrollSmoothComplete"); if (!_scrollBarRefreshInterval) { _scrollBarRefreshInterval = setInterval(this, "refreshScrollBar", 50); } } dispatchEvent({type:"onScroll", target:this}); app.controller.Controller.viewport.onScroll({target:this}); } function onScrollSmoothComplete() { clearInterval(_scrollBarRefreshInterval); _scrollBarRefreshInterval = false; dispatchEvent({type:"onScroll", target:this}); app.controller.Controller.viewport.onScroll({target:this}); } function onMouseUpEvent() { clearInterval(_dragListener); _dragListener = false; _mouseDown = false; app.controller.Controller.viewport.onMouseUpEvent(); } function onRollOutBg() { } function selectPlayable(viewportItem, scroll, select) { var _local5 = viewportItem.getPlayable(); var _local3 = playables.getIndex(_local5); lib.lfm.core.ServiceLocator.get("Logger").write("selected item " + _local3); if (_local5 instanceof lib.lfm.core.model.Playlist) { var _local2 = this["playlist" + _local3]; _local2 = _local2.getTrackItem(0); } else if (_local5 instanceof lib.lfm.core.model.Station) { var _local2 = this["station" + _local3]; } else { var _local2 = viewportItem; } if (select) { _local2.onReleaseHitArea(true); } if (scroll && (canScroll())) { var _local4 = _local2._y; if (_local2 instanceof app.view.menu.TrackItem) { _local4 = _local4 + _local2._parent._y; } var _local6 = (-_local4) + (getViewportHeight() / 2); lib.lfm.core.ServiceLocator.get("Logger").write("scrolling to item offset=" + _local4); this.scroll(_local6 - _y, true); } } function onMouseMoveEvent() { _scrollEnabled = true; if (!hasScrollingContent()) { return(undefined); } if (isMouseOverViewport() && (hasScrollingContent())) { app.controller.Controller.viewport.refreshScrollBarTimeout(); if ((!app.controller.Controller.viewport.hasScrollBar()) && (!app.controller.Controller.viewport.isMouseOverSelector())) { app.controller.Controller.viewport.showScrollBar(); } } if (!isMouseOverViewport()) { } } function pageUp() { scroll(getViewportHeight() / 2, true); } function pageDown() { scroll(-(getViewportHeight() / 2), true); } function hasScrollingContent() { return(getListHeight() > (_parent.mask._height + 2)); } function scrollDown(speed) { if (!canScroll()) { return(undefined); } _scrolled = true; _scrolling = true; var _local2 = (speed ? (speed) : (_getScrollDownSpeed())); lib.lfm.display.LfmEffect.GradualSeek(this, _x, ((-_height) + getViewportHeight()) + initY, "onScrollDownComplete", _local2); clearInterval(_scrollBarRefreshInterval); _scrollBarRefreshInterval = setInterval(this, "refreshScrollBar", 50); } function refreshScrollBar() { app.controller.Controller.viewport.refreshScrollbarHead(); } function getScrollOffset() { return(_y - initY); } function getScrollPercent() { return((Math.abs(getScrollOffset()) / (getListHeight() - getViewportHeight())) * 100); } function getScrollOffsetByPercent(scrollPercent) { var _local2 = (scrollPercent * (getListHeight() - getViewportHeight())) / 100; var _local3 = -_local2; return(_local3 + initY); } function scrollTo(scrollPercent, smooth) { var _local2 = getScrollOffsetByPercent(scrollPercent); lib.lfm.core.ServiceLocator.get("Logger").write((((((("percent=" + scrollPercent) + " list height=") + getListHeight()) + " scroll offset=") + _local2) + " current pos=") + _y); scroll(_local2 - _y, smooth); } function scrollUp(speed) { if (canScroll()) { var _local2 = (speed ? (speed) : (_getScrollUpSpeed())); lib.lfm.display.LfmEffect.GradualSeek(this, _x, initY, "onScrollDownComplete", _local2); clearInterval(_scrollBarRefreshInterval); _scrollBarRefreshInterval = setInterval(this, "refreshScrollBar", 50); } } function onScrollDownComplete() { _scrolling = false; clearInterval(_scrollBarRefreshInterval); refreshScrollBar(); } function onScrollUpComplete() { _scrolling = false; clearInterval(_scrollBarRefreshInterval); refreshScrollBar(); } function clearScrolling() { if (!_scrollWheel) { onEnterFrame = null; } clearInterval(_scrollBarRefreshInterval); } function getViewportHeight() { return(bg._height); } function getViewportWidth() { return(bg._width); } function _getScrollDownSpeed() { return(2 / ((getViewportHeight() + initY) - _parent._ymouse)); } function _getScrollUpSpeed() { return(2 / (_parent._ymouse - initY)); } function verticalScrollAreaHeight() { return(80); } function _isMouseInScrollDownHitArea() { return((_parent._ymouse > ((initY + getViewportHeight()) - verticalScrollAreaHeight())) && (_parent._ymouse < (initY + getViewportHeight()))); } function _isMouseInScrollUpHitArea() { return((_parent._ymouse < (initY + verticalScrollAreaHeight())) && (_parent._ymouse > initY)); } var _playlistIndex = 0; var _stationIndex = 0; var _scrolled = false; var _scrolling = false; var _canScroll = true; var _scrollWheel = false; var _mouseDown = false; }
Symbol 331 MovieClip [__Packages.app.view.menu.TrackItem] Frame 0
class app.view.menu.TrackItem extends lib.lfm.display.LfmUIElement { var icon, infoBtn, defaultBgColor, index, setBgColor, hitArea, trackText, timeText, bg, _select, _mousePress, _track, _alpha; function TrackItem () { super(); icon._alpha = 0; infoBtn.onRelease = mx.utils.Delegate.create(this, onPressInfoButton); infoBtn._alpha = 0; _setTimeTextFormat(); _setTextFormat(); defaultBgColor = ((index % 2) ? 16777215 : 16777215); setBgColor(defaultBgColor); } function _setupHitArea() { hitArea.onRelease = mx.utils.Delegate.create(this, onReleaseHitArea); hitArea.onPress = mx.utils.Delegate.create(this, onPressHitArea); hitArea.onRollOver = mx.utils.Delegate.create(this, onRollOverHitArea); hitArea.onRollOut = mx.utils.Delegate.create(this, onRollOutHitArea); } function _setTextFormat(color) { var _local3 = _global.defaultTextFormat; _local3.size = 10.5; _local3.font = _global.defaultTextFormat.font; trackText.setTextFormat(_local3); trackText.setNewTextFormat(_local3); _local3.color = _global.COLOR_ACTIVE; _local3.size = 10.5; } function _setTimeTextFormat() { timeTextFormat = new TextFormat(); timeTextFormat.font = _global.defaultTextFormat.font; timeTextFormat.color = 10066329 /* 0x999999 */; timeText.setTextFormat(timeTextFormat); timeText.setNewTextFormat(timeTextFormat); } function onRollOverHitArea() { var _local3 = getTrack(); if (!isSelected()) { if (_local3.isPreview()) { _setTimeTextFormat(); timeText.text = "preview"; var _local2 = new TextFormat(); _local2.color = 16711680 /* 0xFF0000 */; _local2.size = 9; timeText.setTextFormat(_local2); } setBgColor(16711680); bg._alpha = 15; } } function onRollOutHitArea() { if (!isSelected()) { setTimeText(); setBgColor(defaultBgColor); bg._alpha = 100; var _local3 = new TextFormat(); _local3.color = 10066329 /* 0x999999 */; _local3.size = 11; _local3.font = _global.defaultTextFormat.font; timeText.setTextFormat(_local3); } } function isSelected() { return(_select); } function onPressInfoButton() { app.controller.Controller.viewport.showNowPlayingDisplay(true); } function onReleaseHitArea(force) { if (_mousePress || (force)) { app.controller.Controller.viewport.onSelect(this); } _mousePress = false; } function onScrollStart(event) { _mousePress = false; app.controller.Controller.viewport.target.removeEventListener("onScrollStart", this); } function onPressHitArea() { _mousePress = true; app.controller.Controller.viewport.target.addEventListener("onScrollStart", this); } function setText(text) { _setTextFormat(); trackText.text = unescape(text); } function setTrack(track) { if (track.isStreamable()) { _setupHitArea(track); } _track = track; } function getTrack() { return(_track); } function getPlayable() { return(getTrack()); } function getId() { return(_track.id); } function draw() { bg._alpha = 90; var _local3 = (_track.creator + " - ") + _track.title; var _local2 = _local3.truncate(35); setText(_local2); setTimeText(); } function setTimeText() { timeText.text = app.controller.Controller.display.track.getDurationDisplayText(_track.getFullDuration()); } function select() { _select = true; infoBtn._visible = true; timeText._visible = false; icon._alpha = 100; infoBtn._alpha = 100; bg._alpha = 100; setBgColor(16711680); var _local3 = new TextFormat(); _local3.color = 16777215 /* 0xFFFFFF */; _local3.font = _global.defaultTextFormat.font; trackText.setTextFormat(_local3); _local3.color = 3355443 /* 0x333333 */; } function deselect() { onRollOutHitArea(); _select = false; timeText._visible = true; _alpha = 90; icon._alpha = 0; infoBtn._alpha = 0; infoBtn._visible = false; setBgColor(defaultBgColor); var _local3 = new TextFormat(); _local3.font = _global.defaultTextFormat.font; _local3.color = _global.COLOR_ACTIVE; trackText.setTextFormat(_local3); } }
Symbol 332 MovieClip [__Packages.app.view.menu.StationItem] Frame 0
class app.view.menu.StationItem extends lib.lfm.display.LfmUIElement { var title, station, playBtn, hitArea, infoBtn, icon, items, playlist, descriptionText, defaultBgColor, index, setBgColor, _selected, getURL, _mousePress, bg, titleText, loader, createEmptyMovieClip, getNextHighestDepth, _loader; function StationItem () { super(); title = station.title; playBtn._visible = false; _setTextFormat(); hitArea.onRelease = mx.utils.Delegate.create(this, onReleaseHitArea); hitArea.onPress = mx.utils.Delegate.create(this, onPressHitArea); infoBtn.onRelease = mx.utils.Delegate.create(this, onPressInfoButton); hitArea.onRollOver = mx.utils.Delegate.create(this, onRollOverHitArea); hitArea.onRollOut = mx.utils.Delegate.create(this, onRollOutHitArea); infoBtn._visible = false; icon._visible = false; items = new Array(); playlist = pl; setTitle(title); var _local3 = station.description + ""; descriptionText.text = _local3.truncate(45); defaultBgColor = ((index % 2) ? 16316664 : 16777215); setBgColor(defaultBgColor); } function isSelected() { return(_selected); } function getPlayable() { return(station); } function onLoadInit(mc) { mc._visible = true; lib.lfm.display.LfmEffect.ResizeImage(mc, 38); mc._height = 38; ServiceLocator.get("Logger").write("onloadalbumartinit " + mc._height); } function onReleaseHitArea(force) { if (station.url.indexOf("listen") != -1) { getURL(("javascript:LFM.Flash.Player.launchStation(\"" + station.url) + "\");", "_self"); } else { getURL(station.url, "_self"); } _mousePress = false; } function onScroll(event) { _mousePress = false; app.controller.Controller.viewport.target.removeEventListener("onScroll", this); } function onRollOverHitArea() { if (!isSelected()) { setBgColor(16711680); bg._alpha = 15; } } function onRollOutHitArea() { if (!isSelected()) { setBgColor(defaultBgColor); bg._alpha = 100; } } function onPressHitArea() { _mousePress = true; app.controller.Controller.viewport.target.addEventListener("onScroll", this); } function onPressInfoButton() { app.controller.Controller.viewport.showNowPlayingDisplay(); } function _setTextFormat() { var _local3 = new TextFormat(); _local3.color = 0; _local3.font = _global.defaultTextFormat.font; titleText.setTextFormat(_local3); titleText.setNewTextFormat(_local3); titleText.html = true; titleText.autoSize = true; _local3.color = 6710886 /* 0x666666 */; descriptionText.setTextFormat(_local3); descriptionText.setNewTextFormat(_local3); } function showImage() { if (station.image) { loader = createEmptyMovieClip("loader", getNextHighestDepth(), {_x:220, _y:15}); loader._x = 238; loader._y = 13; _loader = new MovieClipLoader(); _loader.addListener(this); _loader.loadClip(station.image, loader); } } function setTitle(title) { _setTextFormat(); title = title + ""; titleText.htmlText = ("<b>" + title.truncate(40)) + "</b>"; _setTextFormat(); } function select() { playBtn.gotoAndStop("playing"); _selected = true; bg._alpha = 90; icon._visible = true; loader._visible = false; infoBtn._visible = true; setBgColor(16711680); icon.gotoAndStop("playing"); var _local3 = new TextFormat(); _local3.color = 16777215 /* 0xFFFFFF */; _local3.font = _global.defaultTextFormat.font; descriptionText.setTextFormat(_local3); } function deselect() { playBtn.gotoAndStop("stopped"); _selected = false; infoBtn._visible = false; icon._visible = false; loader._visible = true; icon.gotoAndStop("stopped"); setBgColor(defaultBgColor); var _local3 = new TextFormat(); _local3.color = 6710886 /* 0x666666 */; _local3.font = _global.defaultTextFormat.font; descriptionText.setTextFormat(_local3); } var _expanded = false; var _collapsedLength = 6; }
Symbol 333 MovieClip [__Packages.app.view.display.SelectorDisplay] Frame 0
class app.view.display.SelectorDisplay extends lib.lfm.display.LfmUIElement { var items, bg, expander, expander2, txt, _selectedIndex, attachMovie, getNextHighestDepth, hitArea, dispatchEvent, playLight; function SelectorDisplay () { super(); } function init() { items = new Array(); bg._visible = false; expander._visible = false; expander2._visible = false; } function addItem(item) { items.push(item); } function addItems(newItems) { var _local2 = 0; while (_local2 < newItems.length) { addItem(newItems[_local2]); _local2++; } } function removeItem(item) { var _local2 = getItemIndexByTitle(item.title); } function getItemIndexByTitle(needle) { var _local2 = 0; while (_local2 < items.length) { if (items[_local2].title == needle) { lib.lfm.core.ServiceLocator.get("logger").log("Selector : found needle"); return(_local2); } _local2++; } } function onReleaseSelector() { bg._alpha = 100; if (isCollapsed()) { expand(); } else { collapse(); } } function onPressSelector() { if (isCollapsed()) { bg._alpha = 50; } } function isCollapsed() { return(!expanded); } function clear() { items = new Array(); _itemIndex = 0; } function isExpanded() { return(expanded); } function expand() { expanded = true; draw(); } function setTitle(title) { var _local3 = new TextFormat(); _local3.color = 13421772 /* 0xCCCCCC */; _local3.font = _global.defaultTextFormat.font; txt.setTextFormat(_local3); txt.setNewTextFormat(_local3); txt.html = true; txt.size = 8; txt.autoSize = true; title = title + ""; txt.text = title.truncate(30); } function getWidth() { var _local4 = 0; var _local2 = 0; while (_local2 < items.length) { var _local3 = items[_local2].title.length; if (_local3 > _local4) { _local4 = _local3; } _local2++; } return((_local4 * 2.5) + minWidth); } function draw() { if (!isCollapsed()) { var _local7 = getTopOffset(); var _local3 = 0; while (_local3 < items.length) { if (_local3 == _selectedIndex) { } else { var _local4 = (_itemIndex * _itemHeight) + _local7; attachMovie("selectorItem", "item" + _itemIndex, getNextHighestDepth(), {_y:_local4, item:items[_local3], index:_itemIndex}); var _local2 = this["item" + _itemIndex]; _local2.init(); _local2.bg._width = getWidth(); _local2.addEventListener("onSelect", this); _local2.addEventListener("onRollOverItem", this); _itemIndex++; } _local3++; } } bg._width = getWidth(); hitArea._width = getWidth(); } function onRollOverItem(event) { dispatchEvent({type:"onSelectorActivity", target:this}); } function onSelect(event) { setSelectedItem(event.target.item); lib.lfm.core.ServiceLocator.get("Logger").write("selected " + event.target.index); dispatchEvent({type:"onSelectItemInSelector", target:this, item:event.target}); } function setSelectedItem(playable) { var _local2 = getIndexOfPlayable(playable); lib.lfm.core.ServiceLocator.get("Logger").write("getindexofplayable returns " + _local2); if (_local2 >= 0) { _selectedIndex = _local2; setTitle(playable.title); } } function getIndexOfPlayable(playable) { var _local2 = 0; while (_local2 < items.length) { if (items[_local2].title == playable.title) { return(_local2); } _local2++; } return(-1); } function onTrackStartPlaying() { playLight.gotoAndStop("playing"); } function onCompleteTrack() { playLight.gotoAndStop("stopped"); } function onStopTrack() { playLight.gotoAndStop("stopped"); } function getTopOffset() { return((-(items.length - 1)) * _itemHeight); } function collapse() { expanded = false; var _local2 = 0; while (_local2 < items.length) { this["item" + _local2].removeMovieClip(); _local2++; } _itemIndex = 0; } var _itemIndex = 0; var minWidth = 122; var expanded = false; var _itemHeight = 19.5; }
Symbol 334 MovieClip [__Packages.app.view.menu.CoreControlMenu] Frame 0
class app.view.menu.CoreControlMenu extends lib.lfm.display.LfmUIElement { var tabEnabled, playButton, fwdButton; function CoreControlMenu () { super(); tabEnabled = false; lib.lfm.core.ServiceLocator.get("logger").write("core control menu made"); disable(); } function onLoadPlaylist(event) { if (!event.success) { playButton.setStopped(); playButton.enable(); } } function onPlaylistPlay() { playButton.enable(); fwdButton.enable(); } function onLoadTrack() { playButton.enable(); playButton.setPlaying(); fwdButton.enable(); } function onStopTrack() { playButton.setStopped(); fwdButton.disable(); } function onSkip(event) { playButton.setPlaying(); playButton.disable(); } function disable() { fwdButton.disable(); playButton.disable(); } function enable() { if (app.controller.Controller.track.isPlaying()) { fwdButton.enable(); playButton.enable(); } } }
Symbol 335 MovieClip [__Packages.app.view.button.RecommendButton] Frame 0
class app.view.button.RecommendButton extends lib.lfm.display.LfmButton { var disable, addEventListener, dispatchEvent, icon; function RecommendButton () { super(); disable(); addEventListener("onPressRecommendButton", app.controller.Controller.display); dispatchEvent({type:"onButtonRelease", target:this}); } function onRelease() { addEventListener("onUnauthorisedAction", app.controller.Controller.display); icon.gotoAndStop("onRelease"); dispatchEvent({type:"onPressRecommendButton", target:this}); dispatchEvent({type:"onButtonRelease", target:this}); } var _langKey = "onRecommendButtonRollOver"; }
Symbol 336 MovieClip [__Packages.app.view.button.LoveButton] Frame 0
class app.view.button.LoveButton extends lib.lfm.display.LfmButton { var addEventListener, disable, icon, dispatchEvent; function LoveButton () { super(); addEventListener("onUnauthorisedAction", app.controller.Controller.display); disable(); } function onRelease() { icon.gotoAndStop("onRelease"); var _local2 = new Object(); _local2.track = app.controller.Controller.playlist.getCurrentTrack(); if (app.controller.Controller.user.isLastFm()) { lib.lfm.core.ServiceLocator.get("Client").call("loveTrack", _local2); app.controller.Controller.track.setRating("L"); } else { dispatchEvent({type:"onUnauthorisedAction", target:this}); } dispatchEvent({type:"onButtonRelease", target:this}); } var _langKey = "onLoveButtonRollOver"; }
Symbol 337 MovieClip [__Packages.app.view.button.BanButton] Frame 0
class app.view.button.BanButton extends lib.lfm.display.LfmButton { var addEventListener, disable, icon, dispatchEvent; function BanButton () { super(); addEventListener("onUnauthorisedAction", app.controller.Controller.display); disable(); } function onRelease() { icon.gotoAndStop("onRelease"); var _local2 = new Object(); _local2.track = app.controller.Controller.playlist.getCurrentTrack(); if (app.controller.Controller.user.isLastFm()) { lib.lfm.core.ServiceLocator.get("Client").call("banTrack", _local2); app.controller.Controller.track.setRating("B"); } else { dispatchEvent({type:"onUnauthorisedAction", target:this}); } dispatchEvent({type:"onButtonRelease", target:this}); } var _langKey = "onBanButtonRollOver"; }
Symbol 338 MovieClip [__Packages.app.view.display.VolDisplayHorizontal] Frame 0
class app.view.display.VolDisplayHorizontal extends lib.lfm.display.LfmUIElement { var addEventListener, enabled, _alpha, mc_bg, currentVol, onEnterFrame, _xmouse, dispatchEvent, mc_bar; function VolDisplayHorizontal () { super(); addEventListener("onChangeVolume", app.controller.Controller.volume); enable(); } function disable() { enabled = false; _alpha = 30; delete mc_bg.onPress; delete mc_bg.onRelease; delete mc_bg.onReleaseOutside; } function enable() { enabled = true; _alpha = 100; mc_bg.onPress = mx.utils.Delegate.create(this, onPressBg); mc_bg.onRelease = mx.utils.Delegate.create(this, onReleaseBg); mc_bg.onReleaseOutside = mx.utils.Delegate.create(this, onReleaseBg); } function setVol(volPercent) { _setPositionFromVolume(volPercent); currentVol = volPercent; } function getVol() { if (currentVol == undefined) { currentVol = app.controller.Controller.volume.getVolume(); } return(currentVol); } function onPressBg() { onEnterFrame = mx.utils.Delegate.create(this, onFrame); } function onFrame() { var _local2; _slideBar(_xmouse); _local2 = _getVolumeFromPosition(); volumeChange(_local2); } function onReleaseBg() { delete onEnterFrame; volumeChange(); dispatchEvent({type:"onDragVolumeEnd", target:this}); } function volumeChange(vol) { if (vol == undefined) { vol = _getVolumeFromPosition(); } if (currentVol != vol) { dispatchEvent({type:"onChangeVolume", target:this, volPercent:vol}); currentVol = vol; } } function _getVolumeFromPosition() { var _local2 = ((mc_bar._x - minExtent) / (fullExtent - minExtent)) * 100; if (_local2 > 100) { _local2 = 100; } if (_local2 < 0) { _local2 = 0; } return(Math.round(_local2)); } function _setPositionFromVolume(v) { var _local2 = ((v / 100) * (fullExtent - minExtent)) + minExtent; if (_local2 > fullExtent) { _local2 = fullExtent; } if (_local2 < minExtent) { _local2 = minExtent; } mc_bar._x = _local2; } function _slideBar(nx) { if (nx < minExtent) { nx = minExtent; } if (nx > fullExtent) { nx = fullExtent; } mc_bar._x = nx; mc_bar._y = 0; } function _getLogVolume(vol) { return(Math.round(50 * (Math.log(vol + 1) * Math.LOG10E))); } var minExtent = 12; var fullExtent = 51; }
Symbol 339 MovieClip [__Packages.app.view.button.TagButton] Frame 0
class app.view.button.TagButton extends lib.lfm.display.LfmButton { var disable, addEventListener, icon, dispatchEvent; function TagButton () { super(); disable(); addEventListener("onPressTagButton", app.controller.Controller.display); addEventListener("onUnauthorisedAction", app.controller.Controller.display); } function onRelease() { icon.gotoAndStop("onRelease"); dispatchEvent({type:"onButtonRelease", target:this}); dispatchEvent({type:"onPressTagButton", target:this}); } var _langKey = "onTagButtonRollOver2"; }
Symbol 340 MovieClip [__Packages.app.view.menu.LfmMenu] Frame 0
class app.view.menu.LfmMenu extends lib.lfm.display.LfmUIElement { var tabEnabled; function LfmMenu () { super(); disable(); } function disable() { ServiceLocator.get("logger").write("disabling lfm menu"); var _local3 = 0; while (_local3 < buttons.length) { button = buttons[_local3]; if ((button == "stationButton") && (etc.Conf.isMode(_global.RADIO_MODE))) { } else { this[button].disable(); } _local3++; } } function enable() { ServiceLocator.get("logger").write("enabling lfm menu " + app.controller.Controller.track.isPlaying()); var _local2 = 0; while (_local2 < buttons.length) { button = buttons[_local2]; if (!app.controller.Controller.track.isPlaying()) { } else { this[button].enable(); } _local2++; } tabEnabled = false; app.controller.Controller.menu.enableKeyboardAccess(); } var buttons = ["banButton", "loveButton", "recommendButton", "tagButton", "stationButton"]; }
Symbol 341 MovieClip [__Packages.app.view.display.DurationDisplay] Frame 0
class app.view.display.DurationDisplay extends MovieClip { var gotoAndStop; function DurationDisplay () { super(); ServiceLocator.get("logger").write("created duration display"); } function clear() { gotoAndStop(1); } }
Symbol 342 MovieClip [__Packages.app.view.display.StatusDisplay] Frame 0
class app.view.display.StatusDisplay extends MovieClip { var _statusCallBack, _trackCallBack, _serviceStatusCallBack, _statusMsgQueue, statusTextFormat, status_, timeTextFormat, metadata, _currentTrack, _currentMsg, _initTrackTextXPos, _trackMsgQueue, refreshInterval, _statusDisplayInterval, ticker, createEmptyMovieClip, _parent; function StatusDisplay () { super(); lib.lfm.core.ServiceLocator.get("logger").write("created status display"); _statusCallBack = {target:this, method:"onCompleteStatusDisplayTransition"}; _trackCallBack = {target:this, method:"onCompleteTrackTransition"}; _serviceStatusCallBack = {target:this, method:"onCompleteServiceStatusTransition"}; setTrackRefreshInterval(); _statusMsgQueue = new Array(); _initTextField(); } function _initTextField() { var _local3 = _global.defaultTextFormat.color; lib.lfm.display.LfmEffect.pixelAlign(app.controller.Controller.display.display.trackDisplay.timeText); _setMetadataTextFormat(); statusTextFormat = _global.defaultTextFormat; statusTextFormat.color = 13421772 /* 0xCCCCCC */; status_.statusText.setTextFormat(statusTextFormat); status_.statusText.setNewTextFormat(statusTextFormat); statusTextFormat.color = _global.COLOR_ACTIVE; timeTextFormat = _global.defaultTextFormat; timeTextFormat.size = 11; timeTextFormat.color = 13421772 /* 0xCCCCCC */; app.controller.Controller.display.track.timeText.setTextFormat(timeTextFormat); app.controller.Controller.display.track.timeText.setNewTextFormat(timeTextFormat); timeTextFormat.size = 10.5; _global.defaultTextFormat.color = _local3; } function _setMetadataTextFormat() { var _local3 = new TextFormat(); _local3.font = _global.defaultTextFormat.font; _local3.color = 16777215 /* 0xFFFFFF */; _local3.size = 10.5; metadata.artistText.setTextFormat(_local3); metadata.artistText.setNewTextFormat(_local3); metadata.trackText.setTextFormat(_local3); metadata.trackText.setNewTextFormat(_local3); } function showTrack(track, force, truncate) { lib.lfm.display.LfmEffect.stopTextLoadingAnim(status_.statusText); _setMetadataTextFormat(); if (!(track instanceof lib.lfm.core.model.Track)) { return(false); } _doScroll = false; var _local6 = track.title + ""; if (truncate) { _local6 = _local6.truncate(20); } lib.lfm.core.ServiceLocator.get("Logger").write("trackpage:" + track.trackpage); var _local5 = ((("<a href=\"" + escape(track.artistpage)) + "\" target=\"_blank\">") + track.creator) + "</a>"; var _local3 = ((("<a href=\"" + escape(track.trackpage)) + "\" target=\"_blank\">") + _local6) + "</a>"; var _local4 = new Array(); _local4.push(_local5); _local4.push(_local3); if (_trackDisplayLock && ((!app.controller.Controller.display.isMouseOverLCDButton()) || (force))) { _trackDisplayLock = false; _currentTrack = _local3; _currentMsg = _local3; lib.lfm.core.ServiceLocator.get("logger").write("showing track"); if (!showingTrackMetadata()) { metadata._visible = false; } metadata.trackText.html = true; metadata.trackText.htmlText = unescape(_local3); metadata.artistText.html = true; metadata.artistText.htmlText = unescape(_local5); if (((getTrackDisplayLength(track) > _tickerThreshold) && (!_scrolling)) && (!truncate)) { _doScroll = true; metadata.trackText._visible = false; } else if (!_scrolling) { metadata.trackText._x = _initTrackTextXPos; metadata.trackText._visible = true; _doScroll = false; } lib.lfm.core.ServiceLocator.get("Logger").write((((((("SHOWTRACK: wslock:" + _webServiceDisplayLock) + " statuslock:") + _statusDisplayLock) + " force:") + force) + "doscroll:") + _doScroll); if ((app.controller.Controller.track.isPlaying() && (_webServiceDisplayLock && (_statusDisplayLock))) || (force)) { app.controller.Controller.display.track.focusTrackStatus(); } else { _trackDisplayLock = true; } } else { _trackMsgQueue.push(_local4); } _setMetadataTextFormat(); } function show(msg, loadingAnimation) { lib.lfm.core.ServiceLocator.get("Logger").write("statusdisplaylock is false"); if (_statusDisplayLock) { _statusDisplayLock = false; var _local4 = _global.defaultTextFormat.color; _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; status_.statusText.setTextFormat(_global.defaultTextFormat); status_.statusText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = _local4; lib.lfm.display.LfmEffect.stopTextLoadingAnimation(status_.statusText); lib.lfm.core.ServiceLocator.get("logger").write("showing status. track playing:" + app.controller.Controller.track.isPlaying()); _currentMsg = msg; if (showingTrackMetadata() || (!showingStatus())) { status_._visible = false; } status_.statusText.text = unescape(msg); if (loadingAnimation) { lib.lfm.display.LfmEffect.startTextLoadingAnimation(status_.statusText); } if (showingTrackMetadata() || (!showingStatus())) { this[_statusCallBack.method](); } } else { _statusMsgQueue.push(msg); } if (showingTrackMetadata() || (!showingStatus())) { app.controller.Controller.display.track.focusServiceStatus(); } else { app.controller.Controller.display.track.focusServiceStatus(true); } } function showServiceStatus(msg) { statusTextFormat = _global.defaultTextFormat; _global.defaultTextFormat.color = 16777215 /* 0xFFFFFF */; status_.statusText.setTextFormat(_global.defaultTextFormat); status_.statusText.setNewTextFormat(_global.defaultTextFormat); _global.defaultTextFormat.color = _global.COLOR_ACTIVE; if (_webServiceDisplayLock) { lib.lfm.display.LfmEffect.stopTextLoadingAnimation(status_.statusText); _webServiceDisplayLock = false; if (showingTrackMetadata() || (!showingStatus())) { status_._visible = false; } lib.lfm.core.ServiceLocator.get("logger").write("showing status"); _currentMsg = msg; status_.statusText.text = msg; } if (showingTrackMetadata() || (!showingStatus())) { app.controller.Controller.display.track.focusServiceStatus(); } else { app.controller.Controller.display.track.focusServiceStatus(true); } } function showPlayingStatus(msg) { app.controller.Controller.display.station.showPlayingStatus(msg); } function setTrackRefreshInterval() { refreshInterval = setInterval(this, "updateTrackDisplay", _msgInterval); } function resetTime() { app.controller.Controller.display.display.trackDisplay.timeText.text = "0:00"; } function getTrackDisplayLength(track) { var _local1 = track.title; if (track["lastfm:sponsored"]) { _local1 = _local1 + (((("(" + app.controller.Controller.lang.getCopy("powerplay")) + " ") + track["lastfm:sponsored"]) + ")"); } return(_local1.length); } function updateTime() { var _local2 = app.controller.Controller.track.getDuration() - app.controller.Controller.track.getPosition(); updateDurationDisplay(app.controller.Controller.track.getPosition(), _local2); } function updateDurationDisplay(elapsed, toTrackEnd) { var _local1 = app.controller.Controller.display.track.getDurationDisplayText(toTrackEnd); if (_local1 != "NaN:NaN") { app.controller.Controller.display.track.target.timeText.text = _local1; } _local1 = app.controller.Controller.display.track.getDurationDisplayText(elapsed); if (_local1 != "NaN:NaN") { app.controller.Controller.display.track.target.elapsedText.text = _local1; } } function onCompleteDisplayClear() { stopTrackTextScroll(); metadata.trackText.text = ""; metadata.artistText.text = ""; lib.lfm.display.LfmEffect.stopTextLoadingAnim(status_.statusText); status_.statusText.text = ""; _currentMsg = ""; } function clear() { lib.lfm.display.LfmEffect.Fade(100, app.controller.Controller.display.track.target.overlay, 0, {target:this, method:"onCompleteDisplayClear"}, 1.3); clearInterval(refreshInterval); _trackDisplayLock = true; _statusDisplayLock = true; _webServiceDisplayLock = true; _statusMsgQueue = new Array(); _trackMsgQueue = new Array(); } function refreshTrackDisplay() { lib.lfm.core.ServiceLocator.get("logger").write("refreshTrackDisplay"); if (app.controller.Controller.track.isPlaying() && (!app.controller.Controller.display.isMouseOverLCDButton())) { app.controller.Controller.display.showTrack(); } } function updateTrackDisplay() { var _local2 = _trackMsgQueue.pop(); _local2 = _local2.pop(); _trackMsgQueue = new Array(); if ((_local2 != undefined) && (_local2 != _currentTrack)) { refreshTrackDisplay(); } else if (_currentTrack != _currentMsg) { refreshTrackDisplay(); } } function focusTrackStatus() { if (app.controller.Controller.track.isPlaying() && (!app.controller.Controller.display.isMouseOverLCDButton())) { _statusDisplayLock = true; clearInterval(_statusDisplayInterval); app.controller.Controller.display.showTrack(); } } function focusTrackStatusPostWebService() { _statusDisplayLock = true; if (app.controller.Controller.track.isPlaying()) { clearInterval(_statusDisplayInterval); app.controller.Controller.display.showTrack(); } } function _scrollTrackText() { if (metadata.trackText._x > ((_initTrackTextXPos - metadata.trackText._width) - 5)) { metadata.trackText._x = metadata.trackText._x - 2; } else { metadata.trackText._x = _initTrackTextXPos + 190; } } function startTrackTextScroll() { if (!_scrolling) { _scrolling = true; metadata.trackText._visible = false; metadata.trackText._x = _initTrackTextXPos + 190; metadata.trackText._visible = true; ticker = createEmptyMovieClip("tickerMC", 8000); ticker.onEnterFrame = mx.utils.Delegate.create(this, _scrollTrackText); } } function isScrolling() { return(_scrolling); } function stopTrackTextScroll() { ticker.onEnterFrame = null; _scrolling = false; } function onCompleteStatusDisplayTransition() { clearInterval(_statusDisplayInterval); app.controller.Controller.display.track._focusingServiceStatus = false; lib.lfm.core.ServiceLocator.get("logger").write("onComplete status display transition"); _trackDisplayLock = true; } function onCompleteServiceStatusTransition() { clearInterval(_statusDisplayInterval); app.controller.Controller.display.track._focusingServiceStatus = false; _webServiceDisplayLock = true; _trackDisplayLock = true; _statusDisplayLock = true; _statusDisplayInterval = setInterval(this, "focusTrackStatusPostWebService", 6000); } function onCompleteTrackTransition() { app.controller.Controller.display.track.onCompleteTransition(); app.controller.Controller.display.track._focusingServiceStatus = false; _trackDisplayLock = true; _statusDisplayLock = true; if ((!_scrolling) && (_doScroll)) { startTrackTextScroll(); } } function showingTrackMetadata() { return((metadata._visible && (metadata.trackText.length)) && (_parent.overlay._alpha < 98)); } function showingStatus() { return((status_._visible && (status_.statusText.length)) && (_parent.overlay._alpha < 98)); } var _msgInterval = 4000; var _statusDisplayLock = true; var _trackDisplayLock = true; var _webServiceDisplayLock = true; var _tickerThreshold = 22; var _scrolling = false; var _hscroll = 0; var _maxhscroll = 0; var _doScroll = false; }
Symbol 343 MovieClip [__Packages.app.view.display.TrackDisplay] Frame 0
class app.view.display.TrackDisplay extends lib.lfm.display.LfmUIElement { function TrackDisplay () { super(); lib.lfm.display.LfmEffect.pixelAlign(this); } }
Symbol 344 MovieClip [__Packages.app.view.menu.PlaylistItem] Frame 0
class app.view.menu.PlaylistItem extends lib.lfm.display.LfmUIElement { var expander, label, playBtn, title, playlist, items, _height, bg, _parent, track0, index, trackText, dispatchEvent, attachMovie, getNextHighestDepth, _track; function PlaylistItem () { super(); expander._visible = false; label._visible = false; playBtn._visible = false; title = playlist.title; _setTextFormat(); items = new Array(); _playlistTitleHeight = _height; bg.onRelease = mx.utils.Delegate.create(this, onPressExpander); playBtn.onRelease = mx.utils.Delegate.create(this, onPressPlayButton); var _local4 = new lib.lfm.core.model.Playlist(); _local4.title = playlist.title; var _local3 = 0; while (_local3 < playlist.tracks.length) { _local4.addTrack(playlist.tracks[_local3]); _local3++; } playlist = _local4; setTitle(playlist.title); setLabel(); _collapsedLength = ((playlist.tracks.length < _collapsedLength) ? (playlist.tracks.length) : (_collapsedLength)); if (app.controller.Controller.viewport.target.getViewportHeight() < 140) { _collapsedLength = _collapsedLength + 1; } } function setLabel() { if (playlist.length() > _collapsedLength) { showLabel(); var _local2 = playlist.length() - _collapsedLength; label.txt.text = app.controller.Controller.lang.getCopy("seeMore"); } } function onPressPlayButton() { if (!isSelected()) { play(); } else { stop(); } } function play() { _parent.clearTrackHighlights(); _parent.clearStationHighlights(); select(); track0.select(); _parent.selectPlayable(this, true, true); } function stop() { deselect(); _parent.clearTrackHighlights(); _parent.clearStationHighlights(); app.controller.Controller.track.onPressStopButton(); } function getPlayable() { return(playlist); } function onPressExpander() { if (isExpanded()) { collapse(); } else { expand(); } var _local2 = (isExpanded() ? "expanded" : "collapsed"); expander.gotoAndStop(_local2); } function draw() { lib.lfm.core.ServiceLocator.get("Logger").write(("Showing Playlist with " + playlist.tracks.length) + " tracks"); index = 0; if (isExpanded()) { index = _collapsedLength; var _local2 = index; while (_local2 < playlist.tracks.length) { drawTrack(playlist.tracks[_local2]); index++; _local2++; } } else { var _local2 = 0; while (_local2 < _collapsedLength) { if (playlist.tracks[_local2]) { drawTrack(playlist.tracks[_local2]); index++; } _local2++; } } } function showLabel() { label._visible = true; } function hideLabel() { label._visible = false; } function hideExpander() { expander._visible = false; } function showExpander() { expander._visible = true; } function setTitle(title) { _setTextFormat(); var _local3 = (title ? (title) : (_global.restTitle)); _local3 = _local3 + ""; trackText.text = _local3.truncate(28); _setTextFormat(); } function isExpanded() { return(_expanded); } function expand(sendEvent) { _expanded = true; expander.gotoAndStop("expanded"); draw(); hideLabel(); dispatchEvent({type:"onPlaylistExpand", target:this}); } function collapse() { _expanded = false; expander.gotoAndStop("collapsed"); var _local2 = _collapsedLength; while (_local2 < playlist.tracks.length) { removeTrack(_local2); _local2++; } setLabel(); dispatchEvent({type:"onPlaylistCollapse", target:this}); } function removeTrack(index) { this["track" + index].removeMovieClip(); } function drawTrack(track) { var _local3 = (index * _playlistItemHeight) + _playlistTitleHeight; var _local2 = attachMovie("trackItem", "track" + index, getNextHighestDepth(), {_y:_local3, _x:0, index:index}); _local2.setTrack(track); _local2.draw(); } function highlightTrack(trackIndex) { lib.lfm.core.ServiceLocator.get("Logger").write("highlighting track " + trackIndex); clearTrackHighlights(); this["track" + trackIndex].select(); } function clearTrackHighlights() { var _local2 = 0; while (_local2 < playlist.tracks.length) { this["track" + _local2].deselect(); _local2++; } } function getTrackItem(index) { return(this["track" + i]); } function _setTextFormat() { var _local3 = new TextFormat(); _local3.color = 16777215 /* 0xFFFFFF */; _local3.font = _global.defaultTextFormat.font; _local3.bold = true; _local3.size = 10.5; trackText.setTextFormat(_local3); trackText.setNewTextFormat(_local3); trackText.html = true; trackText.autoSize = true; _local3.bold = false; label.txt.setTextFormat(_local3); label.txt.setNewTextFormat(_local3); } function setText(text) { _setTextFormat(); trackText.htmlText = unescape(text); } function setTrack(track) { _track = track; } function isSelected() { return(_selected); } function select() { _selected = true; playBtn.gotoAndStop("playing"); } function deselect() { _selected = false; playBtn.gotoAndStop("stopped"); } var _playlistItemHeight = 19; var _playlistTitleHeight = 19; var _expanded = false; var _collapsedLength = 5; var _selected = false; }
Symbol 345 MovieClip [__Packages.app.view.menu.SelectorItem] Frame 0
class app.view.menu.SelectorItem extends lib.lfm.display.LfmUIElement { var txt, item, setBgColor, dispatchEvent; function SelectorItem () { super(); } function init() { txt.autoSize = true; var _local2 = item.title + ""; txt.text = _local2.truncate(35); } function onRollOver() { setBgColor(13421772); dispatchEvent({type:"onRollOverItem", target:this}); } function onRollOut() { setBgColor(8947848); } function getPlayable() { return(item); } function onRelease() { dispatchEvent({type:"onSelect", target:this}); } }
Symbol 346 MovieClip [__Packages.app.view.button.JoinSubmitButton] Frame 0
class app.view.button.JoinSubmitButton extends lib.lfm.display.LfmButton { var gotoAndStop, bg, addEventListener, createMouseUpTrigger, _pressed, _rollOutListener, enabled, _mouseListener, dispatchEvent; function JoinSubmitButton () { super(); mx.events.EventDispatcher.initialize(this); gotoAndStop("onRelease"); bg.gotoAndStop("onRelease"); addEventListener("onJoinSubmit", app.controller.Controller.viewport); } function onPress() { bg.gotoAndStop("onclick"); gotoAndStop("onclick"); createMouseUpTrigger(); _pressed = true; if (!_rollOutListener) { _rollOutListener = setInterval(this, "rollOutListener", 500); } } function onRollOver() { } function releaseDisplay() { bg.gotoAndStop("onrelease"); gotoAndStop("onrelease"); } function disable() { bg.gotoAndStop("inactive"); gotoAndStop("inactive"); enabled = false; } function enable() { bg.gotoAndStop("onRelease"); gotoAndStop("onRelease"); enabled = true; } function onMouseUpTrigger(lfmButton) { lfmButton.bg.gotoAndStop("onrelease"); lfmButton.gotoAndStop("onrelease"); Mouse.removeListener(_mouseListener); } function onRelease() { bg.gotoAndStop("onrelease"); gotoAndStop("onrelease"); dispatchEvent({type:"onJoinSubmit", target:this}); } var _langKey = "findOutMore"; }
Symbol 347 MovieClip [__Packages.app.view.button.CancelButton] Frame 0
class app.view.button.CancelButton extends lib.lfm.display.LfmButton { var gotoAndStop, bg, addEventListener, _disableDisplayButtonText, enabled, _enableDisplayButtonText, createMouseUpTrigger, _pressed, _rollOutListener, dispatchEvent; function CancelButton () { super(); mx.events.EventDispatcher.initialize(this); gotoAndStop("onRelease"); bg.gotoAndStop("onRelease"); addEventListener("onCancel", app.controller.Controller.viewport); } function disable() { _disableDisplayButtonText(); bg.gotoAndStop("inactive"); gotoAndStop("inactive"); enabled = false; } function enable() { _enableDisplayButtonText(); bg.gotoAndStop("onRelease"); gotoAndStop("onRelease"); enabled = true; } function onRollOver() { } function onPress() { bg.gotoAndStop("onclick"); gotoAndStop("onclick"); createMouseUpTrigger(); _pressed = true; if (!_rollOutListener) { _rollOutListener = setInterval(this, "rollOutListener", 500); } } function onMouseUpTrigger(lfmButton) { lfmButton.bg.gotoAndStop("onrelease"); lfmButton.gotoAndStop("onrelease"); Mouse.removeListener(lfmButton._mouseListener); } function onRelease() { releaseDisplay(); app.controller.Controller.display.setMode("track"); dispatchEvent({type:"onCancel", target:this}); } function releaseDisplay() { bg.gotoAndStop("onrelease"); gotoAndStop("onrelease"); } function onSetFocus() { _global.cancelButtonFocus = true; } function onKillFocus() { _global.cancelButtonFocus = false; } var _langKey = "noThanks"; }
Symbol 348 MovieClip [__Packages.app.view.display.ViewportMenuBar] Frame 0
class app.view.display.ViewportMenuBar extends lib.lfm.display.LfmUIElement { var onPressBackButton, backBtn; function ViewportMenuBar () { super(); backBtn.onRelease = mx.utils.Delegate.create(this, onPressBackButton); } function onRelease() { app.controller.Controller.viewport.onPressBackButton(); } }
Symbol 349 MovieClip [__Packages.app.view.display.ShuffleDisplay] Frame 0
class app.view.display.ShuffleDisplay extends lib.lfm.display.LfmUIElement { var okBtn, cancelBtn, getURL; function ShuffleDisplay () { super(); okBtn.addEventListener("onJoinSubmit", this); cancelBtn.addEventListener("onCancel", this); } function onJoinSubmit(event) { getURL(("http://" + app.controller.Controller.lang.getLangDomain()) + "/subscribe", "_blank"); } function onCancel(event) { app.controller.Controller.viewport.showPlaylistDisplay(); } }
Symbol 350 MovieClip [__Packages.app.view.display.NowPlayingDisplay] Frame 0
class app.view.display.NowPlayingDisplay extends lib.lfm.display.LfmUIElement { var initY, _y, menu, buyButton, albumText, albumart_bg, _imgHolder, _imgOverlay, albumFrame, _logoInterval, getURL, albumArt; function NowPlayingDisplay () { super(); initY = _y; _setTextFormat(); } function init() { onTrackStartPlaying(); if (_global.Feature.Radio) { hideAlbumArt(); hideText(); } var _local3 = app.controller.Controller.lang.getCopy("goBack"); if (_local3 == undefined) { _local3 = "Back"; } menu.backBtn.txt.text = _local3; if (!buyButton.initX) { buyButton.txt.initX = buyButton.txt._x; buyButton.txt.autoSize = "left"; buyButton.initX = buyButton._x; buyButton.initWidth = 39; } } function _init() { } function clear() { hideAlbumArt(); hideBuyButton(); } function hideMenu() { menu._visible = false; } function hideText() { albumText.text = ""; } function showBuyButton(mode) { lib.lfm.core.ServiceLocator.get("Logger").write("showbuybutton: " + mode); buyButton._visible = true; buyButton.enabled = true; buyButton.onRelease = mx.utils.Delegate.create(this, onClickBuyButton); buyButton.onRollOver = mx.utils.Delegate.create(this, onRollOverBuyButton); buyButton.onRollOut = mx.utils.Delegate.create(this, onRollOutBuyButton); switch (mode) { case "Track" : buyButton.txt.text = app.controller.Controller.lang.getCopy("buy"); buyButton.txt._x = buyButton.txt.initX; break; case "Album" : buyButton.txt.text = app.controller.Controller.lang.getCopy("buyAlbum"); buyButton.txt._x = buyButton.txt.initX; break; case "Free" : buyButton.txt._x = buyButton.txt.initX - 1; buyButton.txt.text = app.controller.Controller.lang.getCopy("buyFree"); } var _local2 = buyButton.initWidth + ((buyButton.txt.text.length - 3) * 5); lib.lfm.core.ServiceLocator.get("Logger").write("newwidth=" + _local2); lib.lfm.core.ServiceLocator.get("Logger").write("initwidth=" + buyButton.initWidth); buyButton.bg.mask._xscale = (_local2 / buyButton.initWidth) * 100; lib.lfm.core.ServiceLocator.get("Logger").write("buybuttonmaskwidth=" + buyButton.bg.mask._xscale); buyButton._x = buyButton.initX - (_local2 - buyButton.initWidth); } function hideBuyButton() { buyButton.onRelease = null; buyButton.enabled = false; buyButton._visible = false; } function disableBuyButtons() { buyButton._visible = false; var _local3 = new TextFormat(); _local3.color = 6710886 /* 0x666666 */; _local3.font = _global.defaultTextFormat.font; buyButton.txt.setTextFormat(_local3); } function refreshBuyButton() { var _local2 = app.controller.Controller.playlist.getCurrentTrack(); lib.lfm.core.ServiceLocator.get("Logger").write("refreshingbuybutton"); if (_local2.freeTrackURL.length > 1) { showBuyButton("Free"); } else if (_local2.buyTrackURL.length > 1) { showBuyButton("Track"); } else if (_local2.buyAlbumURL.length > 1) { showBuyButton("Album"); } else { hideBuyButton(); } } function hideAlbumArt() { albumart_bg._visible = false; } function showAlbum(track) { if (!(track instanceof lib.lfm.core.model.Track)) { return(undefined); } showAlbumImage(); lib.lfm.core.LfmError.raise("loading album art..."); var _local5 = new MovieClipLoader(); initImageHolder(); _setTextFormat(); albumText.html = true; var _local3 = app.controller.Controller.lang.getCopy("comesFrom"); if (_local3 == undefined) { _local3 = "From"; } if (track.album) { albumText.text = (_local3 + " ") + track.album; } var _local2 = track.image; lib.lfm.core.LfmError.raise("image: " + _local2); _local5.addListener(this); if (_local2) { if (_local2.indexOf("noimage") > 0) { _local2 = etc.Conf.NO_ALBUM_IMG_URL; } _local5.loadClip(_local2, _imgHolder); } } function hideAlbumImage() { lib.lfm.core.ServiceLocator.get("logger").write("hide album image"); if (_imgOverlay) { lib.lfm.display.LfmEffect.Fade(0, _imgOverlay); } _imgHolder._visible = false; } function showAlbumImage() { albumart_bg._visible = true; _imgHolder._visible = true; } function initImageHolder() { _init(); _imgHolder = albumFrame.createEmptyMovieClip("imgHolder", 6000); _imgHolder._x = 0; _imgHolder._y = 0; _imgHolder._visible = false; _imgOverlay = albumFrame.transitionOverlay; } function _setTextFormat() { var _local3 = new TextFormat(); _local3.color = 16777215 /* 0xFFFFFF */; _local3.font = _global.defaultTextFormat.font; buyButton.txt.setTextFormat(_local3); buyButton.txt.setNewTextFormat(_local3); menu.backBtn.txt.setTextFormat(_local3); menu.backBtn.txt.setNewTextFormat(_local3); _local3 = new TextFormat(); _local3.font = _global.defaultTextFormat.font; _local3.color = 16777215 /* 0xFFFFFF */; albumText.setTextFormat(_local3); albumText.setNewTextFormat(_local3); _local3.color = 6710886 /* 0x666666 */; } function _startLogoAnim() { lib.lfm.core.ServiceLocator.get("logger").write("STARTLOGOANIM"); clearInterval(_logoInterval); if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE) || (etc.Conf.isMode(_global.SHUFFLE_MODE))) { showShuffleLogo(); } else { albumFrame.bg.anim.gotoAndPlay(1); } } function _endLogoAnim() { albumFrame.bg.anim.gotoAndStop(1); } function showShuffleLogo(anim) { if (anim == undefined) { anim = true; } lib.lfm.core.ServiceLocator.get("logger").write("SHOWSHUFFLELOGO"); hideAlbumImage(); if (_imgOverlay) { lib.lfm.display.LfmEffect.Fade(0, _imgOverlay); } albumFrame.bg.anim._visible = false; if (!anim) { albumFrame.bg.shuffleAnim.anim = false; } else { albumFrame.bg.shuffleAnim.anim = true; } albumFrame.bg.shuffleAnim.gotoAndPlay(2); } function onClickAlbumArt() { var _local2 = app.controller.Controller.playlist.getCurrentTrack(); getURL(_local2.albumpage, "_blank"); } function onRollOverBuyButton() { var _local2 = app.controller.Controller.playlist.getCurrentTrack(); if (_local2.isFreeDownload()) { buyButton.bg.gotoAndStop("downloadHover"); } else { buyButton.bg.gotoAndStop("buyHover"); } } function onRollOutBuyButton() { var _local2 = app.controller.Controller.playlist.getCurrentTrack(); if (_local2.isFreeDownload()) { buyButton.bg.gotoAndStop("download"); } else { buyButton.bg.gotoAndStop("buy"); } } function onClickBuyButton(mode) { buyButton.gotoAndStop("onRelease"); var _local2 = app.controller.Controller.playlist.getCurrentTrack(); if (_local2.isFreeDownload()) { getURL(_local2.getBuyURL(), "_self"); } else { getURL(("javascript:LFM.Flash.Player.buy('" + _local2.getBuyURL()) + "');", "_self"); } } function onPressStopButton(event) { if (etc.Conf.isMode(_global.SHUFFLE_PLAYLIST_MODE) || (etc.Conf.isMode(_global.SHUFFLE_MODE))) { } } function onHoverAlbumArt() { if (app.controller.Controller.track.isPlaying()) { var _local1 = app.controller.Controller.playlist.getCurrentTrack(); } } function onLoadComplete(holder) { albumArt = true; lib.lfm.core.ServiceLocator.get("Logger").write(albumFrame._name); _imgHolder._visible = true; holder._visible = true; lib.lfm.core.LfmError.raise("album art loaded"); _imgOverlay.enabled = true; _imgHolder.onRelease = mx.utils.Delegate.create(this, onClickAlbumArt); } function onLoadInit(mc) { mc._visible = true; if (app.controller.Controller.viewport.target.getViewportHeight() > 140) { mc._width = 135; mc._height = 135; } else { mc._width = 78; mc._height = 78; } lib.lfm.core.ServiceLocator.get("Logger").write("onloadalbumartinit " + mc._height); } function onTrackStartPlaying() { var _local2 = app.controller.Controller.playlist.getCurrentTrack(); showAlbum(_local2); refreshBuyButton(); if (_local2.buyTrackURL) { buyButton._alpha = 100; _setTextFormat(); } } function onTrackComplete(event) { } function onSkip() { } function onAdjustFail() { _endLogoAnim(); } function onImageStart() { } function onImageProgress() { } function onImageComplete() { } function onAlbumArtError() { lib.lfm.core.LfmError.raise("couldnt find album art"); return(false); } }
Symbol 351 MovieClip [__Packages.app.view.display.ScrollBarHandle] Frame 0
class app.view.display.ScrollBarHandle extends MovieClip { var mc_top, mc_bg, mc_grip, mc_bot; function ScrollBarHandle () { super(); lib.lfm.core.ServiceLocator.get("Logger").write("ScrollBar Handler Initialised :)"); } function getHeight() { return(currentHeight); } function resize(h) { if (h < _minHeight) { h = _minHeight; } mc_top._y = 0; mc_bg._y = _topMargin; mc_bg._height = h - (_topMargin + _botMargin); mc_grip._y = h / 2; mc_bot._y = h; lib.lfm.core.ServiceLocator.get("Logger").write("Resizing Scroll bar Handle :)"); currentHeight = h; } var _topMargin = 4; var _botMargin = 4; var _minHeight = 10; var currentHeight = 4; }
Symbol 352 MovieClip [__Packages.app.Main] Frame 0
class app.Main { var runnerInterval, _onload; function Main () { } function run() { etc.Conf.init(); init(); runnerInterval = setInterval(this, "runner", 200); } function runner() { clearInterval(runnerInterval); app.controller.Controller.volume.setVolume(etc.Conf.INITIAL_VOLUME, true); } function init() { etc.Conf.setMode(_global.lfmMode); _global.noRestart = true; Stage.scaleMode = "noScale"; _global._soundbuftime = etc.Conf.SOUND_BUFFER_SECS; initLang(); initServices(); initFonts(); lib.lfm.core.ServiceLocator.get("logger").log("lfmMode is " + _global.lfmMode); initControllers(); initApp(); registerMovieClips(); initSession(); initContextMenu(); _onload = setInterval(this, "onLoadJSHook", 2000); _global.mainTimeline.gotoAndStop("showPlayer"); app.controller.Controller.lang.loadCopy(etc.Conf.lang); } function initLang() { _global.langIndex = new Object(); _global.langIndex[etc.Conf.lang] = new Object(); } function onLoadJSHook() { clearInterval(_onload); getURL ("javascript:LFM.Flash.Player.onLoad();void(0);", "_self"); } function initControllers() { app.controller.Controller.display = new app.controller.DisplayController(); app.controller.Controller.playlist = new app.controller.PlaylistController(); app.controller.Controller.menu = new app.controller.MenuController(); app.controller.Controller.volume = new app.controller.VolumeController(); app.controller.Controller.track = new app.controller.TrackController(); app.controller.Controller.user = new app.controller.UserController(); app.controller.Controller.station = new app.controller.StationController(); app.controller.Controller.lang = app.controller.LanguageController.getInstance(); app.controller.Controller.activity = new app.controller.ActivityController(); app.controller.Controller.viewport = new app.controller.ViewportController(); for (var _local1 in app.controller.Controller) { app.controller.Controller[_local1].initListeners(); } } function getSystemFonts() { return(TextField.getFontList()); } function initServices() { lib.lfm.core.ServiceLocator.register("Logger", new lib.lfm.core.LfmLogger()); lib.lfm.core.ServiceLocator.get("Logger").write("Initialising Last.fm API..."); lib.lfm.core.ServiceLocator.register("Client", new lib.lfm.core.LfmClient()); lib.lfm.core.ServiceLocator.register("WSClient", new lib.lfm.core.WSClient()); lib.lfm.core.ServiceLocator.register("Station", new lib.lfm.core.LfmStation()); lib.lfm.core.ServiceLocator.register("Scrobbler", new lib.lfm.core.LfmScrobbler()); } function registerMovieClips() { app.controller.Controller.display.setTarget(_global.mainTimeline.player.display); app.controller.Controller.menu.setTarget(_global.mainTimeline.player.menu); app.controller.Controller.volume.setTarget(_global.mainTimeline.player.menu.VolDisplayH); app.controller.Controller.viewport.setTarget(_global.mainTimeline.player.viewport); } function initApp() { if (app.controller.Controller.station.isRadioURL(_global.url)) { _global.radioURL = _global.url; } _global.mainTimeline.attachMovie("LfmPlayer", "player", _global.mainTimeline.getNextHighestDepth(), {_x:188, _y:28}); _global.mainTimeline.player.tabEnabled = false; } function initSession() { lib.lfm.core.ServiceLocator.get("logger").write("calling getSession"); lib.lfm.core.ServiceLocator.get("Client").call("getSession"); } function initContextMenu() { var _local4 = new ContextMenu(); _local4.hideBuiltInItems(); var _local3 = new Array(); _local3[1] = new ContextMenuItem("2007 Last.fm Ltd.", onMenuItem1, true); var _local2 = 1; while (_local2 < _local3.length) { _local4.customItems.push(_local3[_local2]); _local2++; } } function initFonts() { var _local4 = getSystemFonts(); var _local3 = 0; while (_local3 < etc.Conf.PRIMARY_FONTS.length) { if (_local4.indexOf(etc.Conf.PRIMARY_FONTS[_local3]) >= 0) { _global.PRIMARY_FONT = etc.Conf.PRIMARY_FONTS[_local3]; lib.lfm.core.ServiceLocator.get("Logger").write(("using " + _global.PRIMARY_FONT) + " font"); initStyles(); return(true); } _local3++; } lib.lfm.core.LfmError.raise("unable to find a system font, using sans"); _global.PRIMARY_FONT = "_sans"; return(false); } function initStyles() { _global.defaultTextFormat = new TextFormat(); _global.defaultTextFormat.font = _global.PRIMARY_FONT; _global.defaultTextFormat.size = etc.Conf.FONT_SIZE; _global.defaultTextFormat.align = "left"; _global.defaultTextFormat.color = _global.COLOR_ACTIVE; _global.defaultTextFormat.embedFonts = true; } function onMenuItem1(obj, item) { } }
Symbol 353 MovieClip [__Packages.lib.lfm.core.LfmLogger] Frame 0
class lib.lfm.core.LfmLogger { var live, timers, doTrace, warnBoundary, errorBoundary, prefixLog, prefixInfo, prefixDebug, prefixWarning, prefixError, prefixGroup, lastGroup, errorDepth; function LfmLogger (doTrace, warnBoundary, errorBoundary, flashVersion) { clientID = createUniqueID(12); live = isLive(); timers = new Object(); if (doTrace) { this.doTrace = true; this.warnBoundary = (warnBoundary ? (warnBoundary) : "--------------------------------------------------------------"); this.errorBoundary = (errorBoundary ? (errorBoundary) : "**************************************************************"); setPrefixes(); } else { this.doTrace = false; } } function isLive() { if ((_global.DEBUG_MODE < 1) || (_global.DEBUG_MODE == undefined)) { return(true); } return(false); } function goLive() { live = true; } function setPrefixes() { prefixLog = "LOG: "; prefixInfo = "INFO: "; prefixDebug = "DEBUG: "; prefixWarning = "WARNING: "; prefixError = "ERROR: "; prefixGroup = ""; } function available() { if (live) { return(undefined); } return(((writeOut7("console.firebug.toString") == null) ? false : true)); } function logToWebServer(msg, defcom, userID, suffix) { var _local3 = "/"; var _local2 = convertToUrl(msg); var _local4 = ""; error((((("user:" + userID) + ", severity:") + defcom) + ", error:") + msg); if (!live) { return(undefined); } if (defcom != undefined) { _local2 = (defcom + _local3) + _local2; } if (userID != undefined) { _local2 = (((escape(userID) + _local3) + clientID) + _local3) + _local2; } if (suffix != undefined) { _local2 = (_local2 + _local3) + convertToUrl(suffix); } _local4 = logBaseUrl + _local2; writeOutToApacheWebLog(_local4); writeOut7("APACHE LOG : " + _local4); } function convertToUrl(msg) { var _local1 = ""; msg = msg.trim(); _local1 = msg.split("'").join("\\'"); _local1 = msg.split(" ").join("_"); return(_local1); } function log(msg) { if (live) { return(undefined); } if (doTrace) { } writeOut7("console.log", msg); } function write(msg) { writeOut7("console.info", msg); } function debug(msg) { if (live) { return(undefined); } if (doTrace) { } writeOut7("console.debug", msg); } function warn(msg) { if (live) { return(undefined); } if (doTrace) { } writeOut7("console.warn", msg); } function error(msg) { if (live) { return(undefined); } if (doTrace) { } writeOut7("console.error", msg); } function group(msg) { if (live) { return(undefined); } lastGroup = msg; prefixGroup = " // "; if (doTrace) { } writeOut7("console.group", msg); } function groupEnd() { if (live) { return(undefined); } if (doTrace) { } writeOut7("console.groupEnd"); prefixGroup = ""; } function time(name) { if (live) { return(undefined); } timers[name] = getTimer(); writeOut7("console.time", name); } function timeEnd(name, returnTime) { if (live) { return(undefined); } var _local2 = getTimer() - timers[name]; if (returnTime) { return(_local2); } if (doTrace) { } writeOut7("console.timeEnd", name); } function assert(expression) { if (live) { return(undefined); } if (doTrace) { var _local3 = Boolean(expression); if (_local3 == false) { } } writeOut7("console.assert", expression); } function profile(name) { if (!live) { writeOut7("console.profile", name); } } function profileEnd(name) { if (!live) { writeOut7("console.profileEnd", name); } } function count(title) { if (!live) { writeOut7("console.count", title); } } function spacer() { if (live) { return(undefined); } if (doTrace) { } writeOut7("console.debug", " "); } function createRandomString(len) { var _local4 = ""; var _local2; var _local6; var _local3 = new Date().getTime().toString(); if (len == undefined) { len = _local3.length; } var _local1 = len; while (_local1 > 0) { _local2 = Math.floor(Math.random() * 36).toString(36); if (Math.random() > 0.5) { _local2 = _local2.toUpperCase(); } if (_local3.charAt(_local1) != ".") { _local4 = _local4 + (_local3.charAt(_local1) + _local2); } _local1--; } return(_local4); } function randomiseString(msg) { var _local3; var _local4 = ""; var _local1 = msg.split(""); var _local2 = _local1.length; while (_local2) { _local3 = Math.floor(Math.random() * _local1.length); _local4 = _local4 + _local1[_local3]; _local1.splice(_local3, 1); _local2--; } return(_local4); } function createUniqueID(len) { var _local2 = createRandomString(); if (len == undefined) { len = 16; } if (_local2.length < len) { _local2 = _local2 + createRandomString(); } _local2 = _local2.substr(0, len); return(randomiseString(_local2)); } function getVersion() { vers = System.capabilities.version; var _local1 = vers.indexOf(" "); vers = parseInt(vers.substring(_local1 + 1, _local1 + 2)); return(vers); } function writeOut(jsCall, msg) { if (jsCall == undefined) { jsCall = "console.log"; } if (getVersion() > 7) { writeOut7(jsCall, msg); } else { writeOut7(jsCall, msg); } } function writeOut8(jsCall, msg) { if (jsCall == undefined) { jsCall = "console.log"; } if (_global.DEBUG_MODE) { flash.external.ExternalInterface.call(jsCall, msg); } } function writeOut7(jsCall, msg) { if (jsCall == undefined) { jsCall = "log"; } msg = escape(msg); if (_global.DEBUG_MODE) { getURL ((((("javascript:" + jsCall) + "('") + msg) + "") + "');", "_self"); } } function writeOutToApacheWebLog(msg) { var _local3; if (errorDepth == undefined) { errorDepth = _root.getNextHighestDepth(); } _local3 = _root.createEmptyMovieClip("mc_errors", errorDepth); writeOut7("Apache URL: " + msg); _local3.loadVariables(msg); } var logBaseUrl = "http://www.last.fm/log/flashclient/"; var clientID = ""; }
Symbol 354 MovieClip [__Packages.lib.lfm.core.LfmClient] Frame 0
class lib.lfm.core.LfmClient { var _uri, _basehost, _callStack, username, password, dispatchEvent, _callQueue, connection, sessionKey; function LfmClient () { lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : lfmclient created"); _uri = etc.Conf.XML_RPC_URI; _basehost = etc.Conf.WS_BASEHOST_URI; lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : " + typeof(etc.Conf)); _auth = false; _callStack = new Array(); mx.events.EventDispatcher.initialize(this); } function setURL(url) { _uri = url; } function setHost(host) { _basehost = host; } function call(methodName, param) { lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : calling..." + methodName); if ((!(username && (password))) && (_auth)) { lib.lfm.core.ServiceLocator.get("logger").warn("cant use webservices without a valid user session"); dispatchEvent({type:"onLfmClientError", target:this, code:LFM_CLIENT_ERROR_NO_USER_SESSION}); return(false); } if (((username == undefined) && (_sessionRequestLock)) && (methodName != "getSession")) { _sessionRequestLock = false; _callQueue.push({method:methodName, param:param}); call("getSession", new Object()); return(undefined); } if (!connection.busy) { _initConnection(methodName); _call(methodName, param); } else { _callQueue.push({method:methodName, param:param}); lib.lfm.core.ServiceLocator.get("logger").warn("connection busy"); } } function _call(methodName, param) { if (this[methodName](param)) { _callStack.push({method:methodName, param:param}); connection.busy = true; lib.lfm.core.ServiceLocator.get("logger").warn("calling " + methodName); connection.call(methodName); } } function setUser(user) { username = user.username; password = user.password; } function _initConnection(methodName) { var _local2 = (("http://" + _basehost) + "/") + _uri; lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : connecting..." + methodName); lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client XMLRPC Call=" + _local2); connection = new lib.lfm.xml.rpc.LfmConnection(_local2); connection.setUrl(_local2); connection.addEventListener("onRPCResponse", this); connection.addEventListener("onRPCFault", this); connection.addEventListener("onRPCFail", this); if (_auth) { connection.addParam(username); } else if (username != undefined) { connection.addParam(username); } else if (methodName != "getSession") { connection.addParam("anon"); } } function toString() { connection.debug(); } function getScrobbleAuth(param) { lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : Get scrobble Auth before " + param.challenge); connection.addParam(param.challenge); return(true); } function testFunction(param) { connection.removeParams(); connection.addParam(param.testParam); return(true); } function loveTrack(param) { if (!(param.track instanceof lib.lfm.core.model.Track)) { lib.lfm.core.ServiceLocator.get("logger").warn("wrong param for loveTrack method call"); return(false); } connection.addParam(param.track.creator); connection.addParam(param.track.title); return(true); } function banTrack(param) { if (!(param.track instanceof lib.lfm.core.model.Track)) { lib.lfm.core.ServiceLocator.get("logger").warn("wrong param for banTrack method call"); return(false); } connection.addParam(param.track.creator); connection.addParam(param.track.title); return(true); } function recommendTrack(param) { if (!(param.track instanceof lib.lfm.core.model.Track)) { lib.lfm.core.ServiceLocator.get("logger").warn("wrong param for recommendTrack method call"); return(false); } connection.addParam(param.track.creator); connection.addParam(param.track.title); connection.addParam(param.recipient); connection.addParam(param.message); return(true); } function getFriends(param) { return(true); } function tagTrack(param) { if (!(param.track instanceof lib.lfm.core.model.Track)) { lib.lfm.core.ServiceLocator.get("logger").warn("wrong param for tagTrack method call"); return(false); } if (param.tags.length <= 0) { lib.lfm.core.ServiceLocator.get("logger").warn("no tags for tagTrack method call"); return(false); } connection.addParam(param.track.creator); connection.addParam(param.track.title); connection.addParam(param.tags); connection.addParam(param.mode); return(true); } function createStation(param) { if (!Controller.user.exists) { dispatchEvent({type:"onNotValidUserSession", target:this}); return(false); } connection.addParam(param.artists); return(true); } function getSession(param) { dispatchEvent({type:"beforeGetSession", target:this}); return(true); } function getTopTags(param) { return(true); } function getSimilarTags(param) { if (!param.tag) { lib.lfm.core.ServiceLocator.get("logger").warn(">>>LFM Client : wrong param for getSimilarTags method call"); return(false); } connection.addParam(param.tag); return(true); } function onRPCFail(event) { connection.busy = false; lib.lfm.core.ServiceLocator.get("logger").warn(">>>LFM Client : Oops, our service appears to be down!"); dispatchEvent({type:"onRPCFail", target:this, response:event.response}); } function onRPCResponse(event) { lib.lfm.core.ServiceLocator.get("logger").log((">>>LFM Client : Response to " + event.target.getMethodName()) + " received"); connection.busy = false; var _local4 = event.response.length; var _local3 = event.target.getMethodName(); switch (event.target.getMethodName()) { case "getSession" : _sessionRequestLock = true; if (event.response[0].indexOf("No client session exists") >= 0) { _local4 = false; } lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : getSession success! method=" + _local3); if (_local4) { username = event.response[0]; sessionKey = event.response[1]; lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : username set to " + username); if (_callQueue.length > 0) { var _local5 = _callQueue.pop(); call(_local5.method, _local5.params); } } else { username = etc.Conf.ANON_USER; } break; case "loveTrack" : lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : track loved"); break; case "banTrack" : lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : track banned"); break; case "recommendTrack" : lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : track recommended"); break; case "tagTrack" : lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : track tagged"); break; case "getFriends" : lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : friends fetched"); lib.lfm.core.ServiceLocator.get("logger").log(event.response); break; case "createStation" : lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : station created"); if (event.response.indexOf("lastfm") == -1) { _local4 = false; } lib.lfm.core.ServiceLocator.get("logger").log(event.response); } if (!_local4) { lib.lfm.core.ServiceLocator.get("logger").warn(">>>LFM Client : onFail " + _local3.capitalize()); dispatchEvent({type:("on" + _local3.capitalize()) + "Fail", target:this, response:event.response}); } else { lib.lfm.core.ServiceLocator.get("logger").log((">>>LFM Client : on" + _local3.capitalize()) + " ... triggered"); dispatchEvent({type:("on" + _local3.capitalize()) + "Success", target:this, response:event.response}); } } function onRPCFault(event) { lib.lfm.core.ServiceLocator.get("logger").log(">>>LFM Client : RPC has failed. dramatically"); lfmError.raise(Controller.lang.getCopy("oops")); dispatchEvent({type:"onRPCFault", target:this}); connection.busy = false; } var challenge = "123454321"; var _auth = false; var _sessionRequestLock = false; }
Symbol 355 MovieClip [__Packages.lib.ext.http.xmlrpc.IConnection] Frame 0
interface lib.ext.http.xmlrpc.IConnection { }
Symbol 356 MovieClip [__Packages.lib.ext.http.xmlrpc.MethodFault] Frame 0
interface lib.ext.http.xmlrpc.MethodFault { }
Symbol 357 MovieClip [__Packages.lib.ext.http.xmlrpc.Connection] Frame 0
class lib.ext.http.xmlrpc.Connection implements lib.ext.http.xmlrpc.IConnection { var _method, _parser, _response, _url; function Connection (url) { _method = new lib.ext.http.xmlrpc.MethodCall(); _parser = new lib.ext.http.xmlrpc.ParserImpl(); if (url) { setUrl(url); } } function call(method) { _call(method); } function _call(method) { if (!getUrl()) { throw Error(ERROR_NO_URL); } else { debug((("Call -> " + method) + "() -> ") + getUrl()); _response = new XML(); _response.ignoreWhite = true; _response.onLoad = mx.utils.Delegate.create(this, _onLoad); _method.setName(method); var _local2 = _method.getXml(); _local2.sendAndLoad(getUrl(), _response); } } function _onLoad(success) { if (success) { var _local2 = parseResponse(); if (_local2.faultCode) { var _local3 = new lib.ext.http.xmlrpc.MethodFaultImpl(_local2); onFault(_local3); } else { onLoad(_local2); } } else { _onFail(); } } function _onFail() { debug("onFailed()"); onFail(); } function parseResponse() { return(_parser.parse(_response)); } function getUrl(Void) { return(_url); } function setUrl(a) { _url = a; } function addParam(o, type) { _method.addParam(o, type); } function removeParams() { _method.removeParams(); } function toString() { return("<xmlrpc.Connection Object>"); } function debug(a) { } function onLoad(result) { } function onFail(error) { } function onFault(fault) { } var _VERSION = "1.0.0"; var _PRODUCT = "Connection"; var ERROR_NO_URL = "No URL was specified for XMLRPCall."; }
Symbol 358 MovieClip [__Packages.lib.ext.http.xmlrpc.IMethodCall] Frame 0
interface lib.ext.http.xmlrpc.IMethodCall { }
Symbol 359 MovieClip [__Packages.lib.ext.http.xmlrpc.MethodCall] Frame 0
class lib.ext.http.xmlrpc.MethodCall extends XML implements lib.ext.http.xmlrpc.IMethodCall { var _name, _parameters, createElement, appendChild, createTextNode, toString, parseXML; function MethodCall () { super(); removeParams(); debug(("MethodCall instance created. (v" + _VERSION) + ")"); } function setName(name) { _name = name; } function getName() { return(_name); } function addParam(param_value, param_type) { debug(("MethodCall.addParam(" + arguments) + ")"); _parameters.push({type:param_type, value:param_value}); } function removeParams(Void) { _parameters = new Array(); } function getXml(Void) { debug("getXml()"); var _local4 = new XMLNode(); var _local3 = new XMLNode(); _local4 = createElement("methodCall"); appendChild(_local4); _local3 = createElement("methodName"); _local3.appendChild(createTextNode(_name)); _local4.appendChild(_local3); _local3 = createElement("params"); _local4.appendChild(_local3); _local4 = _local3; debug("Render(): Creating the params node."); var _local2; _local2 = 0; while (_local2 < _parameters.length) { debug("PARAM: " + [_parameters[_local2].type, _parameters[_local2].value]); _local3 = createElement("param"); _local3.appendChild(createParamsNode(_parameters[_local2])); _local4.appendChild(_local3); _local2++; } debug("Render(): Resulting XML document:"); var _local5 = new XML(); _local5.xmlDecl = "<?xml version=\"1.0\"?>"; _local5.contentType = "text/xml"; _local5.parseXML(toString()); debug("Render(): " + _local5.toString()); return(_local5); } function createParamsNode(parameter) { var _local6 = createElement("value"); var _local4; if ((!parameter.value) && (parameter)) { parameter = {value:parameter}; } if (typeof(parameter) == "object") { if (!parameter.type) { var _local8 = parameter.value; if (_local8 instanceof Array) { parameter.type = lib.ext.http.xmlrpc.util.XMLRPCDataTypes.ARRAY; } else if ((_local8 instanceof Object) && (!(_local8 instanceof String))) { parameter.type = lib.ext.http.xmlrpc.util.XMLRPCDataTypes.STRUCT; } else { parameter.type = lib.ext.http.xmlrpc.util.XMLRPCDataTypes.STRING; } } if (lib.ext.http.xmlrpc.util.XMLRPCUtils.isSimpleType(parameter.type)) { parameter = fixCDATAParameter(parameter); _local4 = createElement(parameter.type); _local4.appendChild(createTextNode(parameter.value)); _local6.appendChild(_local4); return(_local6); } if (parameter.type == lib.ext.http.xmlrpc.util.XMLRPCDataTypes.ARRAY) { var _local5; _local4 = createElement("array"); _local5 = createElement("data"); var _local7; _local7 = 0; while (_local7 < parameter.value.length) { _local5.appendChild(XMLNode(createParamsNode(parameter.value[_local7]))); _local7++; } _local4.appendChild(_local5); _local6.appendChild(_local4); return(_local6); } if (parameter.type == lib.ext.http.xmlrpc.util.XMLRPCDataTypes.STRUCT) { _local4 = createElement("struct"); for (var _local7 in parameter.value) { var _local2 = createElement("member"); _local2.appendChild(createElement("name")); _local2.lastChild.appendChild(createTextNode(_local7)); _local2.appendChild(createElement("value")); _local2.lastChild.appendChild(createTextNode(parameter.value[_local7])); _local4.appendChild(_local2); } _local6.appendChild(_local4); return(_local6); } } } function fixCDATAParameter(parameter) { if (parameter.type == lib.ext.http.xmlrpc.util.XMLRPCDataTypes.CDATA) { parameter.type = lib.ext.http.xmlrpc.util.XMLRPCDataTypes.STRING; parameter.value = ("<![CDATA[" + parameter.value) + "]]>"; } return(parameter); } function cleanUp() { removeParams(); parseXML(null); } function debug(a) { } var _VERSION = "1.0"; var _PRODUCT = "MethodCallImpl"; var TRACE_LEVEL = 3; }
Symbol 360 MovieClip [__Packages.lib.ext.http.xmlrpc.util.XMLRPCDataTypes] Frame 0
class lib.ext.http.xmlrpc.util.XMLRPCDataTypes { function XMLRPCDataTypes () { } static var STRING = "string"; static var CDATA = "cdata"; static var i4 = "i4"; static var INT = "int"; static var BOOLEAN = "boolean"; static var DOUBLE = "double"; static var DATETIME = "dateTime.iso8601"; static var BASE64 = "base64"; static var STRUCT = "struct"; static var ARRAY = "array"; }
Symbol 361 MovieClip [__Packages.lib.ext.http.xmlrpc.util.XMLRPCUtils] Frame 0
class lib.ext.http.xmlrpc.util.XMLRPCUtils { function XMLRPCUtils () { } static function isSimpleType(type) { var _local1; _local1 = 0; while (_local1 < SIMPLE_TYPES.length) { if (type == SIMPLE_TYPES[_local1]) { return(true); } _local1++; } return(false); } static var SIMPLE_TYPES = [lib.ext.http.xmlrpc.util.XMLRPCDataTypes.BASE64, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.INT, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.i4, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.STRING, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.CDATA, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.DOUBLE, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.DATETIME, lib.ext.http.xmlrpc.util.XMLRPCDataTypes.BOOLEAN]; }
Symbol 362 MovieClip [__Packages.lib.ext.http.xmlrpc.Parser] Frame 0
interface lib.ext.http.xmlrpc.Parser { }
Symbol 363 MovieClip [__Packages.lib.ext.http.xmlrpc.ParserImpl] Frame 0
class lib.ext.http.xmlrpc.ParserImpl implements lib.ext.http.xmlrpc.Parser { function ParserImpl () { } function parse(xml) { if (xml.toString().toLowerCase().indexOf("<html") >= 0) { return(xml.toString()); } xml.ignoreWhite = true; return(_parse(xml.firstChild)); } function _parse(node) { var _local4; if (node.nodeType == TEXT_NODE) { return(node.nodeValue); } if (node.nodeType == ELEMENT_NODE) { if ((((((node.nodeName == METHOD_RESPONSE_NODE) || (node.nodeName == PARAMS_NODE)) || (node.nodeName == VALUE_NODE)) || (node.nodeName == PARAM_NODE)) || (node.nodeName == FAULT_NODE)) || (node.nodeName == ARRAY_NODE)) { debug("_parse(): >> " + node.nodeName); return(_parse(node.firstChild)); } if (node.nodeName == DATA_NODE) { debug("_parse(): >> Begin Array"); _local4 = new Array(); var _local5 = 0; while (_local5 < node.childNodes.length) { _local4.push(_parse(node.childNodes[_local5])); debug("_parse(): adding data to array: " + _local4[_local4.length - 1]); _local5++; } debug("_parse(): << End Array"); return(_local4); } if (node.nodeName == STRUCT_NODE) { debug("_parse(): >> Begin Struct"); _local4 = new Object(); var _local5 = 0; while (_local5 < node.childNodes.length) { var _local3 = _parse(node.childNodes[_local5]); _local4[_local3.name] = _local3.value; debug((("_parse(): Struct item " + _local3.name) + ":") + _local3.value); _local5++; } debug("_parse(): << End Stuct"); return(_local4); } if (node.nodeName == MEMBER_NODE) { var _local7; var _local6; _local4 = new Object(); _local7 = _parse(node.firstChild); _local6 = _parse(node.lastChild); _local4.name = _local7; _local4.value = _local6; return(_local4); } if (node.nodeName == "name") { return(_parse(node.firstChild)); } if (lib.ext.http.xmlrpc.util.XMLRPCUtils.isSimpleType(node.nodeName)) { return(createSimpleType(node.nodeName, node.firstChild.nodeValue)); } } debug("Received an invalid Response."); return(false); } function createSimpleType(type, value) { switch (type) { case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.i4 : case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.INT : case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.DOUBLE : return(new Number(value)); case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.STRING : return(new String(value)); case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.DATETIME : return(getDateFromIso8601(value)); case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.BASE64 : return(value); case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.CDATA : return(value); case lib.ext.http.xmlrpc.util.XMLRPCDataTypes.BOOLEAN : if ((value == "1") || (value.toLowerCase() == "true")) { return(new Boolean(true)); } if (!((value == "0") || (value.toLowerCase() == "false"))) { break; } return(new Boolean(false)); } return(value); } function getDateFromIso8601(iso) { var _local3 = iso.split("T"); var _local4 = _local3[0]; var _local5 = _local3[1]; var _local2 = _local4.split("-"); var _local1 = _local5.split(":"); return(new Date(_local2[0], _local2[1] - 1, _local2[2], _local1[0], _local1[1], _local1[2])); } function debug(a) { } var _VERSION = "1.0.0"; var _PRODUCT = "ParserImpl"; var ELEMENT_NODE = 1; var TEXT_NODE = 3; var METHOD_RESPONSE_NODE = "methodResponse"; var PARAMS_NODE = "params"; var PARAM_NODE = "param"; var VALUE_NODE = "value"; var FAULT_NODE = "fault"; var ARRAY_NODE = "array"; var DATA_NODE = "data"; var STRUCT_NODE = "struct"; var MEMBER_NODE = "member"; }
Symbol 364 MovieClip [__Packages.lib.ext.http.xmlrpc.MethodFaultImpl] Frame 0
class lib.ext.http.xmlrpc.MethodFaultImpl implements lib.ext.http.xmlrpc.MethodFault { var _fault; function MethodFaultImpl (o) { if (o) { setFaultObject(o); } } function getFaultCode() { return(Number(_fault.faultCode)); } function getFaultString() { return(String(_fault.faultString)); } function getArgs() { return(Array(_fault.args)); } function setFaultObject(o) { _fault = o; } }
Symbol 365 MovieClip [__Packages.lib.lfm.xml.rpc.LfmConnection] Frame 0
class lib.lfm.xml.rpc.LfmConnection extends lib.ext.http.xmlrpc.Connection { var addEventListener, _requestTime, _timeoutInterval, getUrl, debug, _response, _onLoad, _method, dispatchEvent; function LfmConnection () { super(); mx.events.EventDispatcher.initialize(this); addEventListener("onRPCResponse", Controller.display); addEventListener("onRPCFault", Controller.display); addEventListener("onRPCFail", Controller.display); } function _call(method) { _requestTime = getTimer(); _timeoutInterval = setInterval(this, "_pollForTimeout", 400); if (!getUrl()) { lib.lfm.core.ServiceLocator.get("logger").log("no xmlrpc url"); throw Error("no xmlrpc url"); } else { debug((("LfmConnection Call -> " + method) + "() -> ") + getUrl()); _response = new XML(); _response.ignoreWhite = true; _response.onLoad = mx.utils.Delegate.create(this, _onLoad); _method.setName(method); var _local2 = _method.getXml(); _local2.addRequestHeader("Host", etc.Conf.WS_BASEHOST_URI); _local2.sendAndLoad(getUrl(), _response, "POST"); } } function getMethodName() { return(_method.getName()); } function _pollForTimeout() { if (!busy) { clearInterval(_timeoutInterval); return(false); } if ((getTimer() - _requestTime) > _timeout) { lib.lfm.core.ServiceLocator.get("logger").log("xmlrpc call timed out"); dispatchEvent({type:"onRPCFault", target:this}); busy = false; } } function onLoad(result) { dispatchEvent({type:"onRPCResponse", target:this, response:result}); } function onFault(fault) { dispatchEvent({type:"onRPCFault", target:this}); lib.lfm.core.ServiceLocator.get("logger").log((("XMLRPC Fault (" + fault.getFaultCode()) + "):\n") + fault.getFaultString()); } function onFail(error) { dispatchEvent({type:"onRPCFail", target:this}); lib.lfm.core.ServiceLocator.get("logger").log(error); } var busy = false; var _timeout = 8000; }
Symbol 366 MovieClip [__Packages.lib.lfm.core.model.User] Frame 0
class lib.lfm.core.model.User extends lib.lfm.core.model.LfmModel { function User () { super(); } }
Symbol 367 MovieClip [__Packages.lib.lfm.core.WSClient] Frame 0
class lib.lfm.core.WSClient { var timeout, _ss, request, response, timeoutInterval, requestTime; function WSClient () { mx.events.EventDispatcher.initialize(this); timeout = defaultTimeout; } function dispatchEvent() { } function addEventListener() { } function removeEventListener() { } function call(method, params, options) { if (!params.api_key) { params.api_key = api_key; } if (!busy) { _call(method, params, options); } } function setSecret(ss) { _ss = ss; } function setTimeout(timeout) { this.timeout = timeout; } function _requiresAuth(options) { return(_isPOST(options) || (options.auth)); } function _isPOST(options) { return(options.action.toUpperCase() == "POST"); } function _call(method, params, options) { busy = true; request = new LoadVars(); _rawRequest = params.raw || (options.raw); request.method = method; for (var _local3 in params) { request[_local3] = params[_local3]; } if ((!request.y) && (!_isPOST(options))) { var _local7 = new Date(); var _local5 = Math.floor(_local7.getTime() / 1000); request.y = _local5; } lib.lfm.core.ServiceLocator.get("Logger").write(("Sending " + method) + " WS Call..."); response = new LoadVars(); response.onData = mx.utils.Delegate.create(this, onResponse); response.onHTTPStatus = mx.utils.Delegate.create(this, onHTTPStatus); var _local6 = (options.action ? (options.action) : "GET"); timeoutInterval = setInterval(this, "checkTimeout", 400); requestTime = getTimer(); if (_requiresAuth(options)) { request.api_sig = _createSignature(request); lib.lfm.core.ServiceLocator.get("Logger").write("api_sig is " + request.api_sig); } for (var _local3 in request) { lib.lfm.core.ServiceLocator.get("Logger").write((_local3 + " : ") + request[_local3]); } request.sendAndLoad(etc.Conf.WS_2_URI, response, _local6); } function onHTTPStatus(status) { if (((status == 400) || (status == 403)) || (status == 500)) { } } function _createSignature(callParams) { var _local3 = new Array(); for (var _local2 in callParams) { _local3.push({name:_local2, value:callParams[_local2]}); } _local3.sortOn("name", Array.ASCENDING); var _local4 = ""; var _local2 = 0; while (_local2 < _local3.length) { _local4 = _local4 + _local3[_local2].name; _local4 = _local4 + _local3[_local2].value; _local2++; } _local4 = _local4 + _ss; lib.lfm.core.ServiceLocator.get("Logger").write("signature string sorted is " + _local4); return(_local4.md5()); } function checkTimeout() { if ((getTimer() - requestTime) > timeout) { lib.lfm.core.ServiceLocator.get("Logger").write(("WSClient " + request.method) + " timeout"); clearInterval(timeoutInterval); onFail(); } } function onResponse(response) { lib.lfm.core.ServiceLocator.get("Logger").write((("Response for " + request.method) + " call is in: ") + response); clearInterval(timeoutInterval); var _local2 = new XML(); var _local4 = response.split(newline); _local4.shift(); var _local5 = _local4.join(""); lib.lfm.core.ServiceLocator.get("Logger").write(_local5); _local2.parseXML(_local5); var _local3 = _local2.firstChild.attributes.status; lib.lfm.core.ServiceLocator.get("Logger").write("Response Status is " + _local3); busy = false; ((_local3.toLowerCase() == failedStatus) ? (onFail(_local2)) : (onSuccess(_local2))); } function onFail(xmlResponse) { var _local2 = ("on" + request.method.replace(".", "").capitalize()) + "Failure"; dispatchEvent({type:_local2, target:this, error:""}); lib.lfm.core.ServiceLocator.get("Logger").warn(("WSClient. " + _local2) + " event"); } function onSuccess(xmlResponse) { var _local2 = ("on" + request.method.replace(".", "").capitalize()) + "Success"; dispatchEvent({type:_local2, target:this, xml:xmlResponse, resp:xmlResponse}); lib.lfm.core.ServiceLocator.get("Logger").warn(("WSClient. " + _local2) + " event"); } function onTimeout(event) { lib.lfm.core.ServiceLocator.get("Logger").warn(("WSClient.onTimeout " + request.method) + " call"); busy = false; } var busy = false; var defaultTimeout = 30000; var failedStatus = "failed"; var _rawRequest = false; var api_key = "da6ae1e99462ee22e81ac91ed39b43a4"; }
Symbol 368 MovieClip [__Packages.lib.lfm.core.LfmStation] Frame 0
class lib.lfm.core.LfmStation { var _adjustRequest, _handshakeRequest, _handshakeInterval, dispatchEvent, _playlistURL, _lastfmURI, _sessionID, _basePath, _baseURL, _tuneErrorMsg; function LfmStation () { mx.events.EventDispatcher.initialize(this); _adjustRequest = new LoadVars(); _handshakeRequest = new LoadVars(); _adjustRequest.onData = mx.utils.Delegate.create(this, onAdjustResponse); _handshakeRequest.onLoad = mx.utils.Delegate.create(this, onHandshakeResponse); } function onCreateStationSuccess(event) { _handshakeAttempts = 0; } function busy() { return(!(_handshakeLock && (_adjustLock))); } function handshake() { if (_handshakeAttempts > etc.Conf.LFM_RADIO_MAX_AUTH_ATTEMPTS) { lib.lfm.core.ServiceLocator.get("logger").warn("gave up trying to create a radio session"); clearInterval(_handshakeInterval); dispatchEvent({type:"onStationHandshakeFail", target:this, response:app.controller.Controller.lang.getCopy("onRadioHandshakeFail")}); return(false); } if (_handshakeLock) { _handshakeLock = false; delete _handshakeRequest; _handshakeRequest = new LoadVars(); _handshakeRequest.onLoad = mx.utils.Delegate.create(this, onHandshakeResponse); _handshakeInterval = setInterval(this, "_handshake", 2000); } } function _handshake() { clearInterval(_handshakeInterval); lib.lfm.core.ServiceLocator.get("logger").warn("attempting radio handshake..."); _handshakeRequest.user = app.controller.Controller.user.name; _handshakeRequest.sessionKey = app.controller.Controller.user.sessionKey; if (_global.DEBUG_MODE) { } _handshakeRequest.sendAndLoad(("http://" + etc.Conf.WS_BASEHOST_URI) + "/1.0/radio/webclient/handshake.php", _handshakeRequest, "GET"); } function getPlaylistURL() { return(_playlistURL); } function isTuning() { return(!_adjustLock); } function tune(lastfmURI) { if (_adjustLock) { _adjustLock = false; _lastfmURI = lastfmURI; if (!_session) { lib.lfm.core.ServiceLocator.get("logger").warn("Cant tune - no valid radio session."); handshake(); return(false); } lib.lfm.core.ServiceLocator.get("logger").log("tuning in to radio: " + lastfmURI); _tuneRadio(); } } function _tuneRadio() { dispatchEvent({type:"onTuneRadio", target:this}); _adjustRequest = new LoadVars(); _adjustRequest.onData = mx.utils.Delegate.create(this, onAdjustResponse); _adjustRequest.user = app.controller.Controller.user.name; _adjustRequest.url = _lastfmURI; _adjustRequest.session = _sessionID; _adjustRequest.lang = lfmLanguage; _adjustRequest.y = lib.lfm.core.LfmDate.GetCurrentTimestamp(); for (var _local2 in _adjustRequest) { lib.lfm.core.ServiceLocator.get("logger").log((_local2 + ": ") + _adjustRequest[_local2]); } lib.lfm.core.ServiceLocator.get("logger").warn((("http://" + _baseURL) + _basePath) + "adjust.php"); _adjustRequest.sendAndLoad((("http://" + _baseURL) + _basePath) + "adjust.php", _adjustRequest, "GET"); } function _getErrorMsg(response) { _tuneErrorMsg = app.controller.Controller.lang.getCopy("tuneErrorMsg"); var _local2 = response.split(newline); if (_local2[1]) { var _local3 = _adjustErrorResponse.length; var _local5 = _local2[1].trim(); var _local4 = parseInt(_local5.substr(_local3)); return(app.controller.Controller.lang.getCopy("tuneErrorMsg" + _local4)); } } function hasTuningHistory() { return(_tuneCount > 0); } function lastTuningFailed() { return(_failed); } function onAdjustResponse(response) { _adjustLock = true; lib.lfm.core.ServiceLocator.get("logger").warn("adjust :" + escape(response)); if (((response.indexOf(_errorResponse) >= 0) || (response.indexOf(_errorResponseAlternative) == 0)) || (response.indexOf("response=OK") < 0)) { _failed = true; var _local2 = _getErrorMsg(response); if (_local2 == undefined) { _local2 = app.controller.Controller.lang.getCopy("tuneErrorMsg" + LFM_RADIO_ERROR_NOT_ENOUGH_CONTENT); } dispatchEvent({type:"onAdjustFail", target:this, response:_local2}); return(lib.lfm.core.ServiceLocator.get("logger").warn("Failed tuning radio: " + _local2)); } onAdjustSuccess(response); } function onHandshakeResponse(response) { lib.lfm.core.ServiceLocator.get("logger").warn(response); lib.lfm.core.ServiceLocator.get("logger").warn(_handshakeRequest.session); _handshakeAttempts++; lib.lfm.core.ServiceLocator.get("logger").warn(("attempted " + _handshakeAttempts) + " handshake"); if ((_handshakeRequest.session == "FAILED") || (_handshakeRequest.session == undefined)) { lib.lfm.core.ServiceLocator.get("logger").warn("Failed handshaking"); _handshakeLock = true; handshake(); return(false); } onHandshakeSuccess(response); _handshakeLock = true; } function onHandshakeSuccess(response) { lib.lfm.core.ServiceLocator.get("logger").warn("Created a new radio session for playlist " + _handshakeRequest.playlist_url); _session = true; _sessionID = _handshakeRequest.session; _playlistURL = _handshakeRequest.playlist_url; _baseURL = _handshakeRequest.base_url; _basePath = _handshakeRequest.base_path.trim(); _tuneRadio(); } function onAdjustSuccess(response) { _failed = false; lib.lfm.core.ServiceLocator.get("logger").warn("adjusted radio station"); _tuneCount++; dispatchEvent({type:"onAdjustSuccess", target:this}); } function onValidUserSession(event) { if ((_global.radioURL && (_global.Feature.Radio)) && (_global.Mode.Autostart)) { tune(_global.radioURL); } } var _errorResponse = "FAILED"; var _errorResponseAlternative = "ERROR"; var _sessionErrorResponse = "session=FAILED"; var _adjustErrorResponse = "ERROR="; var _session = false; var _handshakeLock = true; var _adjustLock = true; var _handshakeAttempts = 0; var _tuneCount = 0; var _failed = false; }
Symbol 369 MovieClip [__Packages.lib.lfm.core.LfmScrobbler] Frame 0
class lib.lfm.core.LfmScrobbler { var trackQueue, _handshake, _submission, _md5, _sessionID, _submitURL, _nowPlayingURL, _handshakeTimestamp, _pollInterval, _trackStartTimestamp, _sendNowPlaying, _currentTrack, _nowPlayingSubmission, _waitForSession, _backoffInterval, dispatchEvent; function LfmScrobbler () { mx.events.EventDispatcher.initialize(this); lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler activated : Init"); trackQueue = new Array(); _handshake = new LoadVars(); _submission = new LoadVars(); _handshake.onData = mx.utils.Delegate.create(this, onHandshake); _submission.onData = mx.utils.Delegate.create(this, onSubmit); } function clearSession() { _session = false; _handshakeLock = true; _md5 = undefined; _sessionID = undefined; _submitURL = undefined; _nowPlayingURL = undefined; } function handshake() { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : handshaking... "); if (!app.controller.Controller.user.exists) { lib.lfm.core.ServiceLocator.get("logger").warn("couldnt start scrobbler session - no valid user session"); return(false); } if (!_handshakeLock) { return(false); } if (_failCount > _maxHandshakeAttempts) { return(false); } var _local2 = new Object(); _local2.v = etc.Conf.LFM_CLIENT_VERSION; _local2.c = etc.Conf.LFM_SCROBBLER_CLIENT_ID; _local2.p = etc.Conf.LFM_SCROBBLER_PROTOCOL_VERSION; _local2.hs = "true"; _local2.u = app.controller.Controller.user.name; _local2.t = _handshakeTimestamp; _local2.a = _md5; _sendHandshake(_local2); lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : sending handshake"); } function _sendHandshake(params) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : Attempting to start scrobbler session at..." + etc.Conf.LFM_SCROBBLER_URL); _handshakeLock = true; for (var _local3 in params) { _handshake[_local3] = params[_local3]; lib.lfm.core.ServiceLocator.get("logger").warn((_local3 + ": ") + params[_local3]); } _handshake.sendAndLoad(etc.Conf.LFM_SCROBBLER_URL, _handshake, "GET"); } function push(track) { trackQueue.push(track); } function pop(track) { trackQueue.pop(track); } function stop() { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : stopped scrobbling"); clearInterval(_pollInterval); } function _start() { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : started scrobbling"); if (!_session) { _initSession(); } } function _initSession() { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : If false, authenticate user..." + _session); if (!_session) { _getScrobbleAuth(); } } function submit(track) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : Checking scrobble status...session:" + _session); if (!_session) { return(false); } if (trackReadyToScrobble(track)) { _submitTrack(track); } } function _submitTrack(track) { var _local3 = new Object(); var _local6 = _trackStartTimestamp; var _local5 = (_global.Feature.FOD ? "P" : ("L" + track.getAuthKey())); _local3.s = _sessionID; _local3["a[0]"] = track.creator; _local3["t[0]"] = track.title; _local3["b[0]"] = track.album; _local3["o[0]"] = _local5; _local3["m[0]"] = ""; _local3["n[0]"] = ""; _local3["l[0]"] = Math.floor(track.getDuration() / 1000); _local3["i[0]"] = _local6; _local3["r[0]"] = track.getRating(); _sendSubmission(_local3); } function _sendSubmission(params) { lib.lfm.core.ServiceLocator.get("logger").info(("lfmScrobbler : scrobbling track " + params["t[0]"]) + "..."); for (var _local3 in params) { _submission[_local3] = params[_local3]; lib.lfm.core.ServiceLocator.get("logger").warn((_local3 + ": ") + params[_local3]); } _submission.sendAndLoad(_submitURL.replace(":80", ""), _submission, "POST"); } function _sendNowPlayingRequest() { if (!_session) { return(false); } clearInterval(_sendNowPlaying); _sendNowPlaying = false; var _local2 = new Object(); _local2.s = _sessionID; _local2.a = _currentTrack.creator; _local2.t = _currentTrack.title; _local2.b = _currentTrack.album; _local2.l = Math.floor(_currentTrack.duration / 1000); _local2.n = ""; _local2.m = ""; _submitNowPlaying(_local2); } function _submitNowPlaying(params) { lib.lfm.core.ServiceLocator.get("logger").warn((("lfmScrobbler : sending now playing info for " + params.t) + "... to url ") + _nowPlayingURL.replace(":80", "")); _nowPlayingSubmission = new LoadVars(); for (var _local3 in params) { _nowPlayingSubmission[_local3] = params[_local3]; lib.lfm.core.ServiceLocator.get("logger").warn((_local3 + ": ") + params[_local3]); } _nowPlayingSubmission.sendAndLoad(_nowPlayingURL.replace(":80", ""), _nowPlayingSubmission, "POST"); } function trackReadyToScrobble(track) { return((isPercentageThresholdExceeded(track) && (isSongDurationValid(track))) || (isPlaybackOverScrobbleLimit(track))); } function isPercentageThresholdExceeded(track) { return(true); } function isPlaybackOverScrobbleLimit(track) { var _local1 = track.getPosition() > (etc.Conf.LFM_SCROBBLER_SUBMIT_TIME_LIMIT_SECS * 1000); lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : isPlaybackOverScrobblerLimit: " + _local1); return(_local1); } function trackIsNotMuted() { return(app.controller.Controller.volume.getVolume() > 0); } function isSongDurationValid(track) { var _local1 = track.getDuration() > (etc.Conf.LFM_SCROBBLER_MIN_SONG_LENGTH_SECS * 1000); lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : isSongDurationValid: " + _local1); return(_local1); } function pollForSession() { if (_session) { clearInterval(_waitForSession); } } function _getIntervalTime(params) { return(_defaultIntervalTime); } function _getChallenge(handshakeResponseParams) { if (handshakeResponseParams[1] == undefined) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : Scrobbler couldnt find md5 in handshake response"); return(false); } return(handshakeResponseParams[1].trim()); } function _getSubmitURL(handshakeResponseParams) { if (handshakeResponseParams[3] == undefined) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : Scrobbler couldnt find submit url handshake response"); return(false); } return(handshakeResponseParams[3].trim()); } function _getNowPlayingURL(handshakeResponseParams) { if (handshakeResponseParams[2] == undefined) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : Scrobbler couldnt find submit url handshake response"); return(false); } return(handshakeResponseParams[2].trim()); } function _getFailureReason(submissionResponseParams) { var _local1 = submissionResponseParams[0].indexOf("FAILED"); if (_local1 < 0) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : Trying to get a failure reason for a non FAILED request"); return(false); } return(submissionResponseParams[0].substr(_local1).trim()); } function _getScrobbleAuth() { var _local3 = new Object(); var _local4 = new Date(); var _local2 = Math.floor(_local4.getTime() / 1000); _local3.challenge = _local2; _handshakeTimestamp = _local2; lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetScrobbleAuthSuccess", this); lib.lfm.core.ServiceLocator.get("Client").addEventListener("onGetScrobbleAuthFailure", this); lib.lfm.core.ServiceLocator.get("Client").call("getScrobbleAuth", _local3); lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : scrobbling session authenticating..."); } function onGetScrobbleAuthSuccess(event) { _md5 = event.response; lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : scrobbling session created..."); _handshakeLock = true; handshake(); } function onGetScrobbleAuthFailure(event) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : error getting scrobble auth: " + event.response); _handshakeLock = true; } function onHandshake(response) { lib.lfm.core.ServiceLocator.get("logger").warn(response); clearInterval(_backoffInterval); var _local2 = response.split(newline); var _local3 = _local2[0].trim(); lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : status: " + _local3); if (_local3.indexOf("OK") >= 0) { return(_onHandshakeSuccess(_local2)); } return(_onHandshakeFailure(_local2)); } function onSubmit(response) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : submit ok? " + response); lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : obj=" + _submission); var _local2 = response.split(newline); lib.lfm.core.ServiceLocator.get("logger").warn(("lfmScrobbler : " + _local2.length) + " vars returned in submission"); var _local3 = _local2[0].trim(); if (_local3.indexOf("OK") >= 0) { _onSubmissionSuccess(_local2); } else { _onSubmissionFailure(_local2); } } function _onHandshakeSuccess(params) { lib.lfm.core.ServiceLocator.get("logger").info("lfmScrobbler : Scrobble handshake succeeded..."); _session = true; dispatchEvent({type:"onHandshakeSuccess", target:this}); _sessionID = _getChallenge(params); _submitURL = _getSubmitURL(params); _nowPlayingURL = _getNowPlayingURL(params); } function _onHandshakeFailure(params) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : scrobbler handshake failed"); _handshakeLock = true; _session = false; _failCount++; if (params[0].indexOf("BADAUTH") >= 0) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : Scrobble session failed: invalid user for scrobbling session"); return(false); } if (params[0].indexOf("FAILED") >= 0) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : Scrobble session failed: server failure - " + params[0]); return(false); } lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : Scrobble session failed"); dispatchEvent({type:"onHandshakeFailure", target:this}); var _local4 = _getIntervalTime(params); _backoffIntervalTime = _backoffIntervalTime + _defaultIntervalTime; if (_failCount < _maxHandshakeAttempts) { clearInterval(_backoffInterval); _backoffInterval = setInterval(this, "handshake", _backoffIntervalTime); } else { clearInterval(_backoffInterval); } } function _onSubmissionSuccess(params) { dispatchEvent({type:"onSubmissionSuccess", target:this}); lib.lfm.core.ServiceLocator.get("logger").info("lfmScrobbler : Scrobbled track successfully!"); } function _onSubmissionFailure(params) { dispatchEvent({type:"onSubmissionFailure", target:this}); if (params[0].indexOf("FAILED") >= 0) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : Scrobble submit failed: " + _getFailureReason(params)); _backoffIntervalTime = _getIntervalTime(params); return(false); } if (params[0].indexOf("BADAUTH") >= 0) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : Scrobble submit failed: authentication failed"); _backoffIntervalTime = _backoffIntervalTime + _getIntervalTime(params); clearSession(); _sessionAttempts++; if (_sessionAttempts < etc.Conf.LFM_SCROBBLER_MAX_AUTH_ATTEMPTS) { _start(); } else { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : gave up trying to start scrobbling session!"); } return(false); } if (params[0].indexOf("BADSESSION") >= 0) { lib.lfm.core.ServiceLocator.get("logger").error("lfmScrobbler : Scrobble submit failed: bad session"); if (_sessionAttempts < etc.Conf.LFM_SCROBBLER_MAX_AUTH_ATTEMPTS) { _start(); } else { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : gave up trying to start scrobbling session!"); } } } function onTrackStartPlaying(event) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : ontrackstartplayingSCROB!"); _currentTrack = event.track; _trackStartTimestamp = lib.lfm.core.LfmDate.GetCurrentTimestamp(); if (!_session) { _start(); } if (!_sendNowPlaying) { _sendNowPlaying = setInterval(this, "_sendNowPlayingRequest", 1000); } } function start() { if (!_session) { _start(); } } function onCompleteTrack(event) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : ontrackcompleteSCROB!"); if (event.target.isScrobbled()) { return(false); } submit(event.track); } function onStopTrack(event) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : onstoptrackSCROB"); if (event.target.getPercentagePlayed() > etc.Conf.LFM_SCROBBLER_PERCENTAGE_PLAYED_THRESHOLD) { if (event.target.isScrobbled()) { return(false); } submit(event.track); } } function onSkip(event) { lib.lfm.core.ServiceLocator.get("logger").warn("lfmScrobbler : onskipSCROB"); if (event.target.isScrobbled()) { return(false); } submit(event.track); } var _session = false; var _backoffIntervalTime = 0; var _defaultIntervalTime = 1000; var _handshakeLock = true; var _sessionAttempts = 0; var _failCount = 0; var _maxHandshakeAttempts = 20; }
Symbol 5 MovieClip [__Packages.mx.video.FLVPlayback] Frame 0
class mx.video.FLVPlayback extends MovieClip { var _autoPlay, _autoRewind, _autoSize, _bufferTime, _contentPath, _cuePoints, _idleTimeout, _isLive, _aspectRatio, _seekToPrevOffset, _playheadUpdateInterval, _progressInterval, _totalTime, _transform, _volume, _skinAutoHide, _bufferingBarHides, _origHeight, __height, _height, _origWidth, __width, _width, _scaleX, _scaleY, _xscale, _yscale, _preSeekTime, _firstStreamReady, _firstStreamShown, _activeVP, _visibleVP, _topVP, _vp, _vpState, _cpMgr, boundingBox_mc, preview_mc, dispatchEvent, _uiMgr, _bufferingBar, _backButton, __get__cuePoints, _forwardButton, _muteButton, _pauseButton, _playButton, _playPauseButton, _seekBar, _seekBarInterval, _seekBarScrubTolerance, _skin, _stopButton, _visible, _volumeBar, _volumeBarInterval, _volumeBarScrubTolerance, _x, _y, attachMovie, createEmptyMovieClip; function FLVPlayback () { super(); mx.events.EventDispatcher.initialize(this); if (_autoPlay == undefined) { _autoPlay = true; } if (_autoRewind == undefined) { _autoRewind = true; } if (_autoSize == undefined) { _autoSize = false; } if (_bufferTime == undefined) { _bufferTime = 0.1; } if (_contentPath == undefined) { _contentPath = ""; } if (_cuePoints == undefined) { _cuePoints = null; } if (_idleTimeout == undefined) { _idleTimeout = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL; } if (_isLive == undefined) { _isLive = false; } if (_aspectRatio == undefined) { _aspectRatio = true; } if (_seekToPrevOffset == undefined) { _seekToPrevOffset = SEEK_TO_PREV_OFFSET_DEFAULT; } if (_playheadUpdateInterval == undefined) { _playheadUpdateInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL; } if (_progressInterval == undefined) { _progressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL; } if (_totalTime == undefined) { _totalTime = 0; } if (_transform == undefined) { _transform = null; } if (_volume == undefined) { _volume = 100; } if (_skinAutoHide == undefined) { _skinAutoHide = false; } if (_bufferingBarHides == undefined) { _bufferingBarHides = false; } _origHeight = (__height = _height); _origWidth = (__width = _width); _scaleX = 100; _scaleY = 100; _xscale = 100; _yscale = 100; _preSeekTime = -1; _firstStreamReady = false; _firstStreamShown = false; createUIManager(); _activeVP = 0; _visibleVP = 0; _topVP = 0; _vp = new Array(); _vpState = new Array(); _cpMgr = new Array(); createVideoPlayer(0); _vp[0].visible = false; _vp[0].volume = 0; boundingBox_mc._visible = false; boundingBox_mc.unloadMovie(); delete boundingBox_mc; if (_global.isLivePreview) { createLivePreviewMovieClip(); setSize(__width, __height); } _cpMgr[0].processCuePointsProperty(_cuePoints); delete _cuePoints; _cuePoints = null; } function setSize(w, h) { if (_global.isLivePreview) { if (preview_mc == undefined) { createLivePreviewMovieClip(); } preview_mc.box_mc._width = w; preview_mc.box_mc._height = h; if ((preview_mc.box_mc._width < preview_mc.icon_mc._width) || (preview_mc.box_mc._height < preview_mc.icon_mc._height)) { preview_mc.icon_mc._visible = false; } else { preview_mc.icon_mc._visible = true; preview_mc.icon_mc._x = (preview_mc.box_mc._width - preview_mc.icon_mc._width) / 2; preview_mc.icon_mc._y = (preview_mc.box_mc._height - preview_mc.icon_mc._height) / 2; } } if ((w == width) && (h == height)) { return(undefined); } __width = w; __height = h; var _local3 = 0; while (_local3 < _vp.length) { if (_vp[_local3] != undefined) { _vp[_local3].setSize(w, h); } _local3++; } dispatchEvent({type:"resize", x:x, y:y, width:w, height:h}); } function setScale(xs, ys) { if ((xs == scaleX) && (ys == scaleY)) { return(undefined); } _scaleX = xs; _scaleY = ys; var _local2 = 0; while (_local2 < _vp.length) { if (_vp[_local2] != undefined) { _vp[_local2].setSize((_origWidth * xs) / 100, (_origHeight * ys) / 100); } _local2++; } dispatchEvent({type:"resize", x:x, y:y, width:width, height:height}); } function handleEvent(e) { var _local3 = e.state; if (((e.state != undefined) && (e.target._name == _visibleVP)) && (scrubbing)) { _local3 = SEEKING; } if (e.type == "metadataReceived") { _cpMgr[e.target._name].processFLVCuePoints(e.info.cuePoints); dispatchEvent({type:e.type, info:e.info, vp:e.target._name}); } else if (e.type == "cuePoint") { if (_cpMgr[e.target._name].isFLVCuePointEnabled(e.info)) { dispatchEvent({type:e.type, info:e.info, vp:e.target._name}); } } else if (e.type == "rewind") { dispatchEvent({type:e.type, auto:true, state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); _cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime); } else if (e.type == "resize") { dispatchEvent({type:e.type, x:x, y:y, width:width, height:height, auto:true, vp:e.target._name}); } else if (e.type == "playheadUpdate") { dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); if ((_preSeekTime >= 0) && (e.target.state != SEEKING)) { var _local5 = _preSeekTime; _preSeekTime = -1; _cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime); dispatchEvent({type:"seek", state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); if (_local5 < e.playheadTime) { dispatchEvent({type:"fastForward", state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); } else if (_local5 > e.playheadTime) { dispatchEvent({type:"rewind", auto:false, state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); } } _cpMgr[e.target._name].dispatchASCuePoints(); } else if (e.type == "stateChange") { var _local4 = e.target._name; if ((_local4 == _visibleVP) && (scrubbing)) { return(undefined); } if (e.state == mx.video.VideoPlayer.RESIZING) { return(undefined); } if (((_vpState[_local4].prevState == LOADING) && (_vpState[_local4].autoPlay)) && (e.state == STOPPED)) { return(undefined); } _vpState[_local4].prevState = e.state; dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); if (_vp[e.target._name].state != _local3) { return(undefined); } switch (_local3) { case BUFFERING : dispatchEvent({type:"buffering", state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); break; case PAUSED : dispatchEvent({type:"paused", state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); break; case PLAYING : dispatchEvent({type:"playing", state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); break; case STOPPED : dispatchEvent({type:"stopped", state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); } } else if (e.type == "progress") { dispatchEvent({type:e.type, bytesLoaded:e.bytesLoaded, bytesTotal:e.bytesTotal, vp:e.target._name}); } else if (e.type == "ready") { var _local4 = e.target._name; if (!_firstStreamReady) { if (_local4 == _visibleVP) { _firstStreamReady = true; if (_uiMgr.__get__skinReady() && (!_firstStreamShown)) { _uiMgr.__set__visible(true); showFirstStream(); } } } else if ((_firstStreamShown && (_local3 == STOPPED)) && _vpState[_local4].autoPlay) { _vp[_local4].play(); } dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); } else if ((e.type == "close") || (e.type == "complete")) { dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name}); } } function load(contentPath, totalTime, isLive) { if (_vp[_activeVP] == undefined) { return(undefined); } if ((contentPath == null) || (contentPath == "")) { return(undefined); } autoPlay = (false); if (totalTime != undefined) { this.totalTime = (totalTime); } if (isLive != undefined) { this.isLive = (isLive); } this.contentPath = (contentPath); } function play(contentPath, totalTime, isLive) { if (_vp[_activeVP] == undefined) { return(undefined); } if (contentPath == undefined) { _vp[_activeVP].play(); } else { autoPlay = (true); if (totalTime != undefined) { this.totalTime = (totalTime); } if (isLive != undefined) { this.isLive = (isLive); } this.contentPath = (contentPath); } } function pause() { if (_vp[_activeVP] == undefined) { return(undefined); } _vp[_activeVP].pause(); } function stop() { if (_vp[_activeVP] == undefined) { return(undefined); } _vp[_activeVP].stop(); } function seek(time) { if (_vp[_activeVP] == undefined) { return(undefined); } _preSeekTime = playheadTime; _vp[_activeVP].seek(time); } function seekSeconds(time) { seek(time); } function seekPercent(percent) { if (_vp[_activeVP] == undefined) { return(undefined); } if ((((percent < 0) || (percent > 100)) || (_vp[_activeVP].totalTime == null)) || (_vp[_activeVP].totalTime <= 0)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK); } seek((_vp[_activeVP].totalTime * percent) / 100); } function get playheadPercentage() { if ((_vp[_activeVP].totalTime == null) || (_vp[_activeVP].totalTime <= 0)) { return(undefined); } return((_vp[_activeVP].playheadTime / _vp[_activeVP].totalTime) * 100); } function set playheadPercentage(percent) { seekPercent(percent); //return(playheadPercentage); } function seekToNavCuePoint(timeNameOrCuePoint) { var _local3; switch (typeof(timeNameOrCuePoint)) { case "string" : _local3 = {name:timeNameOrCuePoint}; break; case "number" : _local3 = {time:timeNameOrCuePoint}; break; case "object" : _local3 = timeNameOrCuePoint; } if ((_local3.name == null) || (typeof(_local3.name) != "string")) { seekToNextNavCuePoint(_local3.time); return(undefined); } if (isNaN(_local3.time)) { _local3.time = 0; } var _local2 = findNearestCuePoint(timeNameOrCuePoint, NAVIGATION); while ((_local2 != null) && ((_local2.time < _local3.time) || (!isFLVCuePointEnabled(_local2)))) { _local2 = findNextCuePointWithName(_local2); } if (_local2 == null) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK); } seek(_local2.time); } function seekToNextNavCuePoint(time) { if (_vp[_activeVP] == undefined) { return(undefined); } if (isNaN(time) || (time < 0)) { time = _vp[_activeVP].playheadTime + 0.001; } var _local3; _local3 = findNearestCuePoint(time, NAVIGATION); if (_local3 == null) { seek(_vp[_activeVP].totalTime); return(undefined); } var _local2 = _local3.index; if (_local3.time < time) { _local2++; } while ((_local2 < _local3.array.length) && (!isFLVCuePointEnabled(_local3.array[_local2]))) { _local2++; } if (_local2 >= _local3.array.length) { var _local5 = _vp[_activeVP].totalTime; if (_local3.array[_local3.array.length - 1].time > _local5) { _local5 = _local3.array[_local3.array.length - 1]; } seek(_local5); } else { seek(_local3.array[_local2].time); } } function seekToPrevNavCuePoint(time) { if (_vp[_activeVP] == undefined) { return(undefined); } if (isNaN(time) || (time < 0)) { time = _vp[_activeVP].playheadTime; } var _local3 = findNearestCuePoint(time, NAVIGATION); if (_local3 == null) { seek(0); return(undefined); } var _local2 = _local3.index; while ((_local2 >= 0) && ((!isFLVCuePointEnabled(_local3.array[_local2])) || (_local3.array[_local2].time >= (time - _seekToPrevOffset)))) { _local2--; } if (_local2 < 0) { seek(0); } else { seek(_local3.array[_local2].time); } } function addASCuePoint(timeOrCuePoint, name, parameters) { return(_cpMgr[_activeVP].addASCuePoint(timeOrCuePoint, name, parameters)); } function removeASCuePoint(timeNameOrCuePoint) { return(_cpMgr[_activeVP].removeASCuePoint(timeNameOrCuePoint)); } function findCuePoint(timeNameOrCuePoint, type) { switch (type) { case "event" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].eventCuePoints, false, timeNameOrCuePoint)); case "navigation" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].navCuePoints, false, timeNameOrCuePoint)); case "flv" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].flvCuePoints, false, timeNameOrCuePoint)); case "actionscript" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].asCuePoints, false, timeNameOrCuePoint)); case "all" : } return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].allCuePoints, false, timeNameOrCuePoint)); } function findNearestCuePoint(timeNameOrCuePoint, type) { switch (type) { case "event" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].eventCuePoints, true, timeNameOrCuePoint)); case "navigation" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].navCuePoints, true, timeNameOrCuePoint)); case "flv" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].flvCuePoints, true, timeNameOrCuePoint)); case "actionscript" : return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].asCuePoints, true, timeNameOrCuePoint)); case "all" : } return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].allCuePoints, true, timeNameOrCuePoint)); } function findNextCuePointWithName(cuePoint) { return(_cpMgr[_activeVP].getNextCuePointWithName(cuePoint)); } function setFLVCuePointEnabled(enabled, timeNameOrCuePoint) { return(_cpMgr[_activeVP].setFLVCuePointEnabled(enabled, timeNameOrCuePoint)); } function isFLVCuePointEnabled(timeNameOrCuePoint) { return(_cpMgr[_activeVP].isFLVCuePointEnabled(timeNameOrCuePoint)); } function getNextHighestDepth() { var _local2 = super.getNextHighestDepth(); return(((_local2 < 1000) ? 1000 : (_local2))); } function bringVideoPlayerToFront(index) { if ((index == _topVP) || (_vp[index] == undefined)) { return(undefined); } _vp[_topVP].swapDepths(_vp[index].getDepth()); _topVP = index; } function getVideoPlayer(index) { return(_vp[index]); } function closeVideoPlayer(index) { if (_vp[index] == undefined) { return(undefined); } if (index == 0) { throw new mx.video.VideoError(mx.video.VideoError.DELETE_DEFAULT_PLAYER); } if (_visibleVP == index) { visibleVideoPlayerIndex = (0); } if (_activeVP == index) { activeVideoPlayerIndex = (0); } _vp[index].close(); _vp[index].unloadMovie(); delete _vp[index]; _vp[index] = undefined; } function get activeVideoPlayerIndex() { return(_activeVP); } function set activeVideoPlayerIndex(i) { if (_activeVP == i) { return; } if (_vp[_activeVP].onEnterFrame != undefined) { doContentPathConnect(); } _activeVP = i; if (_vp[_activeVP] == undefined) { createVideoPlayer(_activeVP); _vp[_activeVP].visible = false; _vp[_activeVP].volume = 0; } //return(activeVideoPlayerIndex); } function get autoPlay() { if (_vpState[_activeVP] == undefined) { return(_autoPlay); } return(_vpState[_activeVP].autoPlay); } function set autoPlay(flag) { if ((_activeVP == 0) || (_activeVP == undefined)) { _autoPlay = flag; } _vpState[_activeVP].autoPlay = flag; //return(autoPlay); } function get autoRewind() { if (_vp[_activeVP] == undefined) { return(_autoRewind); } return(_vp[_activeVP].autoRewind); } function set autoRewind(flag) { if ((_activeVP == 0) || (_activeVP == undefined)) { _autoRewind = flag; } _vp[_activeVP].autoRewind = flag; //return(autoRewind); } function get autoSize() { if (_vp[_activeVP] == undefined) { return(_autoSize); } return(_vp[_activeVP].autoSize); } function set autoSize(flag) { if ((_activeVP == 0) || (_activeVP == undefined)) { _autoSize = flag; } _vp[_activeVP].autoSize = flag; //return(autoSize); } function get bitrate() { return(ncMgr.getBitrate()); } function set bitrate(b) { ncMgr.setBitrate(b); //return(bitrate); } function get buffering() { if (_vp[_activeVP] == undefined) { return(false); } return(_vp[_activeVP].state == BUFFERING); } function get bufferingBar() { if (_uiMgr != null) { _bufferingBar = _uiMgr.getControl(mx.video.UIManager.BUFFERING_BAR); } return(_bufferingBar); } function set bufferingBar(s) { _bufferingBar = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, s); } //return(bufferingBar); } function get bufferingBarHidesAndDisablesOthers() { if (_uiMgr != null) { _bufferingBarHides = _uiMgr.bufferingBarHidesAndDisablesOthers; } return(_bufferingBarHides); } function set bufferingBarHidesAndDisablesOthers(b) { _bufferingBarHides = b; if (_uiMgr != null) { _uiMgr.__set__bufferingBarHidesAndDisablesOthers(b); } //return(bufferingBarHidesAndDisablesOthers); } function get backButton() { if (_uiMgr != null) { _backButton = _uiMgr.getControl(mx.video.UIManager.BACK_BUTTON); } return(_backButton); } function set backButton(s) { _backButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, s); } //return(backButton); } function get bufferTime() { if (_vp[_activeVP] == undefined) { return(_bufferTime); } return(_vp[_activeVP].bufferTime); } function set bufferTime(aTime) { if ((_activeVP == 0) || (_activeVP == undefined)) { _bufferTime = aTime; } _vp[_activeVP].bufferTime = aTime; //return(bufferTime); } function get bytesLoaded() { return(_vp[_activeVP].bytesLoaded); } function get bytesTotal() { return(_vp[_activeVP].bytesTotal); } function get contentPath() { if ((_vp[_activeVP] == undefined) || (_vp[_activeVP].onEnterFrame != undefined)) { return(_contentPath); } return(_vp[_activeVP].url); } function set contentPath(url) { if (_global.isLivePreview) { return; } if (_vp[_activeVP] == undefined) { if (url == _contentPath) { return; } _contentPath = url; } else { if (_vp[_activeVP].url == url) { return; } _vpState[_activeVP].minProgressPercent = undefined; if (_vp[_activeVP].onEnterFrame != undefined) { delete _vp[_activeVP].onEnterFrame; _vp[_activeVP].onEnterFrame = undefined; } _cpMgr[_activeVP].reset(); if (_vpState[_activeVP].autoPlay && (_firstStreamShown)) { _vp[_activeVP].play(url, _vpState[_activeVP].isLive, _vpState[_activeVP].totalTime); } else { _vp[_activeVP].load(url, _vpState[_activeVP].isLive, _vpState[_activeVP].totalTime); } _vpState[_activeVP].isLiveSet = false; _vpState[_activeVP].totalTimeSet = false; } //return(contentPath); } function set cuePoints(cp) { if (_cuePoints != undefined) { return; } _cuePoints = cp; //return(__get__cuePoints()); } function get forwardButton() { if (_uiMgr != null) { _forwardButton = _uiMgr.getControl(mx.video.UIManager.FORWARD_BUTTON); } return(_forwardButton); } function set forwardButton(s) { _forwardButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, s); } //return(forwardButton); } function get height() { if (_global.isLivePreview) { return(__height); } if (_vp[_visibleVP] != undefined) { __height = _vp[_visibleVP].height; } return(__height); } function set height(h) { setSize(width, h); //return(height); } function get idleTimeout() { if (_vp[_activeVP] == undefined) { return(_idleTimeout); } return(_vp[_activeVP].idleTimeout); } function set idleTimeout(aTime) { if ((_activeVP == 0) || (_activeVP == undefined)) { _idleTimeout = aTime; } _vp[_activeVP].idleTimeout = aTime; //return(idleTimeout); } function get isRTMP() { if (_global.isLivePreview) { return(true); } if (_vp[_activeVP] == undefined) { return(undefined); } return(_vp[_activeVP].isRTMP); } function get isLive() { if (_vp[_activeVP] == undefined) { return(_isLive); } if (_vpState[_activeVP].isLiveSet) { return(_vpState[_activeVP].isLive); } return(_vp[_activeVP].isLive); } function set isLive(flag) { if ((_activeVP == 0) || (_activeVP == undefined)) { _isLive = flag; } _vpState[_activeVP].isLive = flag; _vpState[_activeVP].isLiveSet = true; //return(isLive); } function get maintainAspectRatio() { if (_vp[_activeVP] == undefined) { return(_aspectRatio); } return(_vp[_activeVP].maintainAspectRatio); } function set maintainAspectRatio(flag) { if ((_activeVP == 0) || (_activeVP == undefined)) { _aspectRatio = flag; } _vp[_activeVP].maintainAspectRatio = flag; //return(maintainAspectRatio); } function get metadata() { if (_vp[_activeVP] == undefined) { return(null); } return(_vp[_activeVP].metadata); } function get metadataLoaded() { if (_vp[_activeVP] == undefined) { return(false); } return(_cpMgr[_activeVP].metadataLoaded); } function get muteButton() { if (_uiMgr != null) { _muteButton = _uiMgr.getControl(mx.video.UIManager.MUTE_BUTTON); } return(_muteButton); } function set muteButton(s) { _muteButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, s); } //return(muteButton); } function get ncMgr() { if (_vp[_activeVP] == undefined) { return(null); } return(_vp[_activeVP].ncMgr); } function get pauseButton() { if (_uiMgr != null) { _pauseButton = _uiMgr.getControl(mx.video.UIManager.PAUSE_BUTTON); } return(_pauseButton); } function set pauseButton(s) { _pauseButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, s); } //return(pauseButton); } function get paused() { if (_vp[_activeVP] == undefined) { return(false); } return(_vp[_activeVP].state == PAUSED); } function get playButton() { if (_uiMgr != null) { _playButton = _uiMgr.getControl(mx.video.UIManager.PLAY_BUTTON); } return(_playButton); } function set playButton(s) { _playButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, s); } //return(playButton); } function get playheadTime() { if (_vp[_activeVP] == undefined) { return(0); } return(_vp[_activeVP].playheadTime); } function set playheadTime(position) { seek(position); //return(playheadTime); } function get playheadUpdateInterval() { if (_vp[_activeVP] == undefined) { return(_playheadUpdateInterval); } return(_vp[_activeVP].playheadUpdateInterval); } function set playheadUpdateInterval(aTime) { if ((_activeVP == 0) || (_activeVP == undefined)) { _playheadUpdateInterval = aTime; } _cpMgr[_activeVP].playheadUpdateInterval = aTime; _vp[_activeVP].playheadUpdateInterval = aTime; //return(playheadUpdateInterval); } function get playing() { if (_vp[_activeVP] == undefined) { return(false); } return(_vp[_activeVP].state == PLAYING); } function get playPauseButton() { if (_uiMgr != null) { _playPauseButton = _uiMgr.getControl(mx.video.UIManager.PLAY_PAUSE_BUTTON); } return(_playPauseButton); } function set playPauseButton(s) { _playPauseButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, s); } //return(playPauseButton); } function get preferredHeight() { if (_vp[_activeVP] == undefined) { return(0); } return(_vp[_activeVP].videoHeight); } function get preferredWidth() { if (_vp[_activeVP] == undefined) { return(0); } return(_vp[_activeVP].videoWidth); } function get progressInterval() { if (_vp[_activeVP] == undefined) { return(_progressInterval); } return(_vp[_activeVP].progressInterval); } function set progressInterval(aTime) { if ((_activeVP == 0) || (_activeVP == undefined)) { _progressInterval = aTime; } _vp[_activeVP].progressInterval = aTime; //return(progressInterval); } function get scaleX() { if (_vp[_visibleVP] != undefined) { _scaleX = (_vp[_visibleVP].width / _origWidth) * 100; } return(_scaleX); } function set scaleX(xs) { setScale(xs, scaleY); //return(scaleX); } function get scaleY() { if (_vp[_visibleVP] != undefined) { _scaleY = (_vp[_visibleVP].height / _origHeight) * 100; } return(_scaleY); } function set scaleY(ys) { setScale(scaleX, ys); //return(scaleY); } function get scrubbing() { var _local2 = seekBar; if ((_local2 == undefined) || (_local2.isDragging == undefined)) { return(false); } return(_local2.isDragging); } function get seekBar() { if (_uiMgr != null) { _seekBar = _uiMgr.getControl(mx.video.UIManager.SEEK_BAR); } return(_seekBar); } function set seekBar(s) { _seekBar = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.SEEK_BAR, s); } //return(seekBar); } function get seekBarInterval() { if (_uiMgr != null) { _seekBarInterval = _uiMgr.seekBarInterval; } return(_seekBarInterval); } function set seekBarInterval(s) { _seekBarInterval = s; if (_uiMgr != null) { _uiMgr.__set__seekBarInterval(_seekBarInterval); } //return(seekBarInterval); } function get seekBarScrubTolerance() { if (_uiMgr != null) { _seekBarScrubTolerance = _uiMgr.seekBarScrubTolerance; } return(_seekBarScrubTolerance); } function set seekBarScrubTolerance(s) { _seekBarScrubTolerance = s; if (_uiMgr != null) { _uiMgr.__set__seekBarScrubTolerance(_seekBarScrubTolerance); } //return(seekBarScrubTolerance); } function get seekToPrevOffset() { return(_seekToPrevOffset); } function set seekToPrevOffset(s) { _seekToPrevOffset = s; //return(seekToPrevOffset); } function get skin() { if (_uiMgr != null) { _skin = _uiMgr.skin; } return(_skin); } function set skin(s) { _skin = s; if (_uiMgr != null) { _uiMgr.__set__skin(s); } //return(skin); } function get skinAutoHide() { if (_uiMgr != null) { _skinAutoHide = _uiMgr.skinAutoHide; } return(_skinAutoHide); } function set skinAutoHide(b) { if (_global.isLivePreview) { return; } _skinAutoHide = b; if (_uiMgr != null) { _uiMgr.__set__skinAutoHide(b); } //return(skinAutoHide); } function get transform() { return(_transform); } function set transform(s) { _transform = s; if (_vp[_activeVP] != undefined) { _vp[_activeVP].transform = _transform; } //return(transform); } function get state() { if (_global.isLivePreview) { return(STOPPED); } if (_vp[_activeVP] == undefined) { return(DISCONNECTED); } if ((_activeVP == _visibleVP) && (scrubbing)) { return(SEEKING); } var _local3 = _vp[_activeVP].state; if (_local3 == mx.video.VideoPlayer.RESIZING) { return(LOADING); } if (((_vpState[_activeVP].prevState == LOADING) && (_vpState[_activeVP].autoPlay)) && (_local3 == STOPPED)) { return(LOADING); } return(_local3); } function get stateResponsive() { if (_vp[_activeVP] == undefined) { return(false); } return(_vp[_activeVP].stateResponsive); } function get stopButton() { if (_uiMgr != null) { _stopButton = _uiMgr.getControl(mx.video.UIManager.STOP_BUTTON); } return(_stopButton); } function set stopButton(s) { _stopButton = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, s); } //return(stopButton); } function get stopped() { if (_vp[_activeVP] == undefined) { return(false); } return(_vp[_activeVP].state == STOPPED); } function get totalTime() { if (_global.isLivePreview) { return(1); } if (_vp[_activeVP] == undefined) { return(_totalTime); } if (_vpState[_activeVP].totalTimeSet) { return(_vpState[_activeVP].totalTime); } return(_vp[_activeVP].totalTime); } function set totalTime(aTime) { if ((_activeVP == 0) || (_activeVP == undefined)) { _totalTime = aTime; } _vpState[_activeVP].totalTime = aTime; _vpState[_activeVP].totalTimeSet = true; //return(totalTime); } function get version_1_0_1() { return(""); } function set version_1_0_1(v) { //return(version_1_0_1); } function get visible() { return(_visible); } function set visible(v) { _visible = v; //return(visible); } function get visibleVideoPlayerIndex() { return(_visibleVP); } function set visibleVideoPlayerIndex(i) { if (_visibleVP == i) { return; } var _local3 = _visibleVP; if (_vp[i] == undefined) { createVideoPlayer(i); } var _local5 = (_vp[i].height != _vp[_visibleVP].height) || (_vp[i].width != _vp[_visibleVP].width); _vp[_visibleVP].visible = false; _vp[_visibleVP].volume = 0; _visibleVP = i; if (_firstStreamShown) { _uiMgr.setupSkinAutoHide(); _vp[_visibleVP].visible = true; if (!scrubbing) { _vp[_visibleVP].volume = _volume; } } else if ((_vp[_visibleVP].stateResponsive && (_vp[_visibleVP].state != DISCONNECTED)) && (_uiMgr.__get__skinReady())) { _uiMgr.__set__visible(true); _uiMgr.setupSkinAutoHide(); _firstStreamReady = true; showFirstStream(); } if ((_vp[_local3].height != _vp[_visibleVP].height) || (_vp[_local3].width != _vp[_visibleVP].width)) { dispatchEvent({type:"resize", x:x, y:y, width:width, height:height, auto:false, vp:_visibleVP}); } _uiMgr.handleEvent({type:"stateChange", state:_vp[_visibleVP].state, vp:_visibleVP}); _uiMgr.handleEvent({type:"playheadUpdate", playheadTime:_vp[_visibleVP].playheadTime, vp:_visibleVP}); if (_vp[_visibleVP].isRTMP) { _uiMgr.handleEvent({type:"ready", vp:_visibleVP}); } else { _uiMgr.handleEvent({type:"progress", bytesLoaded:_vp[_visibleVP].bytesLoaded, bytesTotal:_vp[_visibleVP].bytesTotal, vp:_visibleVP}); } //return(visibleVideoPlayerIndex); } function get volume() { return(_volume); } function set volume(aVol) { if (_volume == aVol) { return; } _volume = aVol; if (!scrubbing) { _vp[_visibleVP].volume = _volume; } dispatchEvent({type:"volumeUpdate", volume:aVol}); //return(volume); } function get volumeBar() { if (_uiMgr != null) { _volumeBar = _uiMgr.getControl(mx.video.UIManager.VOLUME_BAR); } return(_volumeBar); } function set volumeBar(s) { _volumeBar = s; if (_uiMgr != null) { _uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, s); } //return(volumeBar); } function get volumeBarInterval() { if (_uiMgr != null) { _volumeBarInterval = _uiMgr.volumeBarInterval; } return(_volumeBarInterval); } function set volumeBarInterval(s) { _volumeBarInterval = s; if (_uiMgr != null) { _uiMgr.__set__volumeBarInterval(_volumeBarInterval); } //return(volumeBarInterval); } function get volumeBarScrubTolerance() { if (_uiMgr != null) { _volumeBarScrubTolerance = _uiMgr.volumeBarScrubTolerance; } return(_volumeBarScrubTolerance); } function set volumeBarScrubTolerance(s) { _volumeBarScrubTolerance = s; if (_uiMgr != null) { _uiMgr.__set__volumeBarScrubTolerance(_volumeBarScrubTolerance); } //return(volumeBarScrubTolerance); } function get width() { if (_global.isLivePreview) { return(__width); } if (_vp[_visibleVP] != undefined) { __width = _vp[_visibleVP].width; } return(__width); } function set width(w) { setSize(w, height); //return(width); } function get x() { return(_x); } function set x(xpos) { _x = xpos; //return(x); } function get y() { return(_y); } function set y(ypos) { _y = ypos; //return(y); } function createVideoPlayer(index) { if (_global.isLivePreview) { return(undefined); } var _local4 = width; var _local5 = height; _vp[index] = mx.video.VideoPlayer(attachMovie("VideoPlayer", String(index), VP_DEPTH_OFFSET + index)); _vp[index].setSize(_local4, _local5); _topVP = index; _vp[index].autoRewind = _autoRewind; _vp[index].autoSize = _autoSize; _vp[index].bufferTime = _bufferTime; _vp[index].idleTimeout = _idleTimeout; _vp[index].maintainAspectRatio = _aspectRatio; _vp[index].playheadUpdateInterval = _playheadUpdateInterval; _vp[index].progressInterval = _progressInterval; _vp[index].transform = _transform; _vp[index].volume = _volume; if (index == 0) { _vpState[index] = {id:index, isLive:_isLive, isLiveSet:true, totalTime:_totalTime, totalTimeSet:true, autoPlay:_autoPlay}; if (((_contentPath != null) && (_contentPath != undefined)) && (_contentPath != "")) { _vp[index].onEnterFrame = mx.utils.Delegate.create(this, doContentPathConnect); } } else { _vpState[index] = {id:index, isLive:false, isLiveSet:true, totalTime:0, totalTimeSet:true, autoPlay:false}; } _vp[index].addEventListener("resize", this); _vp[index].addEventListener("close", this); _vp[index].addEventListener("complete", this); _vp[index].addEventListener("cuePoint", this); _vp[index].addEventListener("playheadUpdate", this); _vp[index].addEventListener("progress", this); _vp[index].addEventListener("metadataReceived", this); _vp[index].addEventListener("stateChange", this); _vp[index].addEventListener("ready", this); _vp[index].addEventListener("rewind", this); _cpMgr[index] = new mx.video.CuePointManager(this, index); _cpMgr[index].playheadUpdateInterval = _playheadUpdateInterval; } function createUIManager() { _uiMgr = new mx.video.UIManager(this); _uiMgr.__set__visible(false); if (_backButton != null) { _uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, _backButton); } if (_bufferingBar != null) { _uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, _bufferingBar); } _uiMgr.__set__bufferingBarHidesAndDisablesOthers(_bufferingBarHides); if (_forwardButton != null) { _uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, _forwardButton); } if (_pauseButton != null) { _uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, _pauseButton); } if (_playButton != null) { _uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, _playButton); } if (_playPauseButton != null) { _uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, _playPauseButton); } if (_stopButton != null) { _uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, _stopButton); } if (_seekBar != null) { _uiMgr.setControl(mx.video.UIManager.SEEK_BAR, _seekBar); } if (_seekBarInterval != null) { _uiMgr.__set__seekBarInterval(_seekBarInterval); } if (_seekBarScrubTolerance != null) { _uiMgr.__set__seekBarScrubTolerance(_seekBarScrubTolerance); } if (_skin != null) { _uiMgr.__set__skin(_skin); } if (_skinAutoHide != null) { _uiMgr.__set__skinAutoHide(_skinAutoHide); } if (_muteButton != null) { _uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, _muteButton); } if (_volumeBar != null) { _uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, _volumeBar); } if (_volumeBarInterval != null) { _uiMgr.__set__volumeBarInterval(_volumeBarInterval); } if (_volumeBarScrubTolerance != null) { _uiMgr.__set__volumeBarScrubTolerance(_volumeBarScrubTolerance); } } function createLivePreviewMovieClip() { preview_mc = createEmptyMovieClip("preview_mc", 10); preview_mc.createEmptyMovieClip("box_mc", 10); preview_mc.box_mc.beginFill(0); preview_mc.box_mc.moveTo(0, 0); preview_mc.box_mc.lineTo(0, 100); preview_mc.box_mc.lineTo(100, 100); preview_mc.box_mc.lineTo(100, 0); preview_mc.box_mc.lineTo(0, 0); preview_mc.box_mc.endFill(); preview_mc.attachMovie("Icon", "icon_mc", 20); } function doContentPathConnect() { delete _vp[0].onEnterFrame; _vp[0].onEnterFrame = undefined; if (_global.isLivePreview) { return(undefined); } if (_vpState[0].autoPlay && (_firstStreamShown)) { _vp[0].play(_contentPath, _isLive, _totalTime); } else { _vp[0].load(_contentPath, _isLive, _totalTime); } _vpState[0].isLiveSet = false; _vpState[0].totalTimeSet = false; } function showFirstStream() { _firstStreamShown = true; _vp[_visibleVP].visible = true; if (!scrubbing) { _vp[_visibleVP].volume = _volume; } var _local2 = 0; while (_local2 < _vp.length) { if (((_vp[_local2] != undefined) && (_vp[_local2].state == STOPPED)) && (_vpState[_local2].autoPlay)) { _vp[_local2].play(); } _local2++; } } function _scrubStart() { var _local2 = playheadTime; _vp[_visibleVP].volume = 0; dispatchEvent({type:"stateChange", state:SEEKING, playheadTime:_local2, vp:_visibleVP}); dispatchEvent({type:"scrubStart", state:SEEKING, playheadTime:_local2}); } function _scrubFinish() { var _local3 = playheadTime; var _local2 = state; _vp[_visibleVP].volume = _volume; if (_local2 != SEEKING) { dispatchEvent({type:"stateChange", state:_local2, playheadTime:_local3, vp:_visibleVP}); } dispatchEvent({type:"scrubFinish", state:_local2, playheadTime:_local3}); } function skinError(message) { if (_firstStreamReady && (!_firstStreamShown)) { showFirstStream(); } dispatchEvent({type:"skinError", message:message}); } function skinLoaded() { if (_firstStreamReady) { _uiMgr.__set__visible(true); if (!_firstStreamShown) { showFirstStream(); } } else if ((_contentPath == null) || (_contentPath == "")) { _uiMgr.__set__visible(true); } dispatchEvent({type:"skinLoaded"}); } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; static var DISCONNECTED = "disconnected"; static var STOPPED = "stopped"; static var PLAYING = "playing"; static var PAUSED = "paused"; static var BUFFERING = "buffering"; static var LOADING = "loading"; static var CONNECTION_ERROR = "connectionError"; static var REWINDING = "rewinding"; static var SEEKING = "seeking"; static var ALL = "all"; static var EVENT = "event"; static var NAVIGATION = "navigation"; static var FLV = "flv"; static var ACTIONSCRIPT = "actionscript"; static var VP_DEPTH_OFFSET = 100; static var SEEK_TO_PREV_OFFSET_DEFAULT = 1; }
Symbol 14 MovieClip [__Packages.mx.video.VideoPlayer] Frame 0
class mx.video.VideoPlayer extends MovieClip { var _state, _cachedState, _bufferState, _sawPlayStop, _cachedPlayheadTime, _metadata, _startingPlay, _invalidSeekTime, _invalidSeekRecovery, _currentPos, _atEnd, _cmdQueue, _readyDispatched, _autoResizeDone, _lastUpdateTime, _sawSeekNotify, _updateTimeIntervalID, _updateTimeInterval, _updateProgressIntervalID, _updateProgressInterval, _idleTimeoutIntervalID, _idleTimeoutInterval, _autoResizeIntervalID, _rtmpDoStopAtEndIntervalID, _rtmpDoSeekIntervalID, _httpDoSeekIntervalID, _httpDoSeekCount, _finishAutoResizeIntervalID, _delayedBufferingIntervalID, _delayedBufferingInterval, _isLive, _autoSize, _aspectRatio, _autoPlay, _autoRewind, _bufferTime, _volume, _sound, __visible, _hiddenForResize, _hiddenForResizeMetadataDelay, _contentPath, _video, _ncMgr, _ns, attachAudio, _prevVideoWidth, _prevVideoHeight, _streamLength, _videoWidth, _videoHeight, dispatchEvent, _x, _y, _visible, _hiddenRewindPlayheadTime, ncMgrClassName, _height, _width; function VideoPlayer () { super(); mx.events.EventDispatcher.initialize(this); _state = DISCONNECTED; _cachedState = _state; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _cachedPlayheadTime = 0; _metadata = null; _startingPlay = false; _invalidSeekTime = false; _invalidSeekRecovery = false; _currentPos = 0; _atEnd = false; _cmdQueue = new Array(); _readyDispatched = false; _autoResizeDone = false; _lastUpdateTime = -1; _sawSeekNotify = false; _updateTimeIntervalID = 0; _updateTimeInterval = DEFAULT_UPDATE_TIME_INTERVAL; _updateProgressIntervalID = 0; _updateProgressInterval = DEFAULT_UPDATE_PROGRESS_INTERVAL; _idleTimeoutIntervalID = 0; _idleTimeoutInterval = DEFAULT_IDLE_TIMEOUT_INTERVAL; _autoResizeIntervalID = 0; _rtmpDoStopAtEndIntervalID = 0; _rtmpDoSeekIntervalID = 0; _httpDoSeekIntervalID = 0; _httpDoSeekCount = 0; _finishAutoResizeIntervalID = 0; _delayedBufferingIntervalID = 0; _delayedBufferingInterval = HTTP_DELAYED_BUFFERING_INTERVAL; if (_isLive == undefined) { _isLive = false; } if (_autoSize == undefined) { _autoSize = false; } if (_aspectRatio == undefined) { _aspectRatio = true; } if (_autoPlay == undefined) { _autoPlay = true; } if (_autoRewind == undefined) { _autoRewind = true; } if (_bufferTime == undefined) { _bufferTime = 0.1; } if (_volume == undefined) { _volume = 100; } _sound = new Sound(this); _sound.setVolume(_volume); __visible = true; _hiddenForResize = false; _hiddenForResizeMetadataDelay = 0; _contentPath = ""; } function setSize(w, h) { if (((w == _video._width) && (h == _video._height)) || (_autoSize)) { return(undefined); } _video._width = w; _video._height = h; if (_aspectRatio) { startAutoResize(); } } function setScale(xs, ys) { if (((xs == _video._xscale) && (ys == _video._yscale)) || (_autoSize)) { return(undefined); } _video._xscale = xs; _video._yscale = ys; if (_aspectRatio) { startAutoResize(); } } function play(url, isLive, totalTime) { if (url != null) { if (_state == EXEC_QUEUED_CMD) { _state = _cachedState; } else { if (!stateResponsive) { queueCmd(PLAY, url, isLive, totalTime); return(undefined); } execQueuedCmds(); } _autoPlay = true; _load(url, isLive, totalTime); return(undefined); } if (!isXnOK()) { if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); // unexpected jump } flushQueuedCmds(); queueCmd(PLAY); setState(LOADING); _cachedState = LOADING; _ncMgr.reconnect(); return(undefined); } if (_state == EXEC_QUEUED_CMD) { _state = _cachedState; } else { if (!stateResponsive) { queueCmd(PLAY); return(undefined); } execQueuedCmds(); } if (_ns == null) { _createStream(); _video.attachVideo(_ns); attachAudio(_ns); } switch (_state) { case BUFFERING : if (_ncMgr.isRTMP()) { _play(0); if (_atEnd) { _atEnd = false; _currentPos = 0; setState(REWINDING); } else if (_currentPos > 0) { _seek(_currentPos); _currentPos = 0; } } case PLAYING : return(undefined); case STOPPED : if (_ncMgr.isRTMP()) { if (_isLive) { _play(-1); setState(BUFFERING); } else { _play(0); if (_atEnd) { _atEnd = false; _currentPos = 0; _state = BUFFERING; setState(REWINDING); } else if (_currentPos > 0) { _seek(_currentPos); _currentPos = 0; setState(BUFFERING); } else { setState(BUFFERING); } } } else { _pause(false); if (_atEnd) { _atEnd = false; _seek(0); _state = BUFFERING; setState(REWINDING); } else if (_bufferState == BUFFER_EMPTY) { setState(BUFFERING); } else { setState(PLAYING); } } break; case PAUSED : _pause(false); if (!_ncMgr.isRTMP()) { if (_bufferState == BUFFER_EMPTY) { setState(BUFFERING); } else { setState(PLAYING); } } else { setState(BUFFERING); } } } function load(url, isLive, totalTime) { if (url == null) { throw new Error("null url sent to VideoPlayer.load"); } if (_state == EXEC_QUEUED_CMD) { _state = _cachedState; } else { if (!stateResponsive) { queueCmd(LOAD, url, isLive, totalTime); return(undefined); } execQueuedCmds(); } _autoPlay = false; _load(url, isLive, totalTime); } function _load(url, isLive, totalTime) { _prevVideoWidth = videoWidth; if (_prevVideoWidth == undefined) { _prevVideoWidth = _video.width; if (_prevVideoWidth == undefined) { _prevVideoWidth = 0; } } _prevVideoHeight = videoHeight; if (_prevVideoHeight == undefined) { _prevVideoHeight = _video.height; if (_prevVideoHeight == undefined) { _prevVideoHeight = 0; } } _autoResizeDone = false; _cachedPlayheadTime = 0; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _metadata = null; _startingPlay = false; _invalidSeekTime = false; _invalidSeekRecovery = false; _isLive = ((isLive == undefined) ? false : (isLive)); _contentPath = url; _currentPos = 0; _streamLength = totalTime; _atEnd = false; _videoWidth = undefined; _videoHeight = undefined; _readyDispatched = false; _lastUpdateTime = -1; _sawSeekNotify = false; clearInterval(_updateTimeIntervalID); _updateTimeIntervalID = 0; clearInterval(_updateProgressIntervalID); _updateProgressIntervalID = 0; clearInterval(_idleTimeoutIntervalID); _idleTimeoutIntervalID = 0; clearInterval(_autoResizeIntervalID); _autoResizeIntervalID = 0; clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; clearInterval(_rtmpDoSeekIntervalID); _rtmpDoSeekIntervalID = 0; clearInterval(_httpDoSeekIntervalID); _httpDoSeekIntervalID = 0; clearInterval(_finishAutoResizeIntervalID); _finishAutoResizeIntervalID = 0; clearInterval(_delayedBufferingIntervalID); _delayedBufferingIntervalID = 0; closeNS(false); if (_ncMgr == null) { createINCManager(); } var _local2 = _ncMgr.connectToURL(_contentPath); setState(LOADING); _cachedState = LOADING; if (_local2) { _createStream(); _setUpStream(); } if (!_ncMgr.isRTMP()) { clearInterval(_updateProgressIntervalID); _updateProgressIntervalID = setInterval(this, "doUpdateProgress", _updateProgressInterval); } } function pause() { if (!isXnOK()) { if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); // unexpected jump } return(undefined); } if (_state == EXEC_QUEUED_CMD) { _state = _cachedState; } else { if (!stateResponsive) { queueCmd(PAUSE); return(undefined); } execQueuedCmds(); } if (((_state == PAUSED) || (_state == STOPPED)) || (_ns == null)) { return(undefined); } _pause(true); setState(PAUSED); } function stop() { if (!isXnOK()) { if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); // unexpected jump } return(undefined); } if (_state == EXEC_QUEUED_CMD) { _state = _cachedState; } else { if (!stateResponsive) { queueCmd(STOP); return(undefined); } execQueuedCmds(); } if ((_state == STOPPED) || (_ns == null)) { return(undefined); } if (_ncMgr.isRTMP()) { if (_autoRewind && (!_isLive)) { _currentPos = 0; _play(0, 0); _state = STOPPED; setState(REWINDING); } else { closeNS(true); setState(STOPPED); } } else { _pause(true); if (_autoRewind) { _seek(0); _state = STOPPED; setState(REWINDING); } else { setState(STOPPED); } } } function seek(time) { if (_invalidSeekTime) { return(undefined); } if (isNaN(time) || (time < 0)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK); } if (!isXnOK()) { if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); // unexpected jump } flushQueuedCmds(); queueCmd(SEEK, null, false, time); setState(LOADING); _cachedState = LOADING; _ncMgr.reconnect(); return(undefined); } if (_state == EXEC_QUEUED_CMD) { _state = _cachedState; } else { if (!stateResponsive) { queueCmd(SEEK, null, false, time); return(undefined); } execQueuedCmds(); } if (_ns == null) { _createStream(); _video.attachVideo(_ns); attachAudio(_ns); } if (_atEnd && (time < playheadTime)) { _atEnd = false; } switch (_state) { case PLAYING : _state = BUFFERING; case BUFFERING : case PAUSED : _seek(time); setState(SEEKING); break; case STOPPED : if (_ncMgr.isRTMP()) { _play(0); _pause(true); } _seek(time); _state = PAUSED; setState(SEEKING); } } function close() { closeNS(true); if ((_ncMgr != null) && (_ncMgr.isRTMP())) { _ncMgr.close(); } setState(DISCONNECTED); dispatchEvent({type:"close", state:_state, playheadTime:playheadTime}); } function get x() { return(_x); } function set x(xpos) { _x = xpos; //return(x); } function get y() { return(_y); } function set y(ypos) { _y = ypos; //return(y); } function get scaleX() { return(_video._xscale); } function set scaleX(xs) { setScale(xs, scaleY); //return(scaleX); } function get scaleY() { return(_video._yscale); } function set scaleY(ys) { setScale(scaleX, ys); //return(scaleY); } function get width() { return(_video._width); } function set width(w) { setSize(w, _video._height); //return(width); } function get height() { return(_video._height); } function set height(h) { setSize(_video._width, h); //return(height); } function get videoWidth() { if (_readyDispatched) { _videoWidth = _video.width; } return(_videoWidth); } function get videoHeight() { if (_readyDispatched) { _videoHeight = _video.height; } return(_videoHeight); } function get visible() { if (!_hiddenForResize) { __visible = _visible; } return(__visible); } function set visible(v) { __visible = v; if (!_hiddenForResize) { _visible = __visible; } //return(visible); } function get autoSize() { return(_autoSize); } function set autoSize(flag) { if (_autoSize != flag) { _autoSize = flag; if (_autoSize) { startAutoResize(); } } //return(autoSize); } function get maintainAspectRatio() { return(_aspectRatio); } function set maintainAspectRatio(flag) { if (_aspectRatio != flag) { _aspectRatio = flag; if (_aspectRatio && (!_autoSize)) { startAutoResize(); } } //return(maintainAspectRatio); } function get autoRewind() { return(_autoRewind); } function set autoRewind(flag) { _autoRewind = flag; //return(autoRewind); } function get playheadTime() { var _local2 = ((_ns == null) ? (_currentPos) : (_ns.time)); if (_metadata.audiodelay != undefined) { _local2 = _local2 - _metadata.audiodelay; if (_local2 < 0) { _local2 = 0; } } return(_local2); } function set playheadTime(position) { seek(position); //return(playheadTime); } function get url() { return(_contentPath); } function get volume() { return(_volume); } function set volume(aVol) { _volume = aVol; if (!_hiddenForResize) { _sound.setVolume(_volume); } //return(volume); } function get transform() { return(_sound.getTransform()); } function set transform(s) { _sound.setTransform(s); //return(transform); } function get isRTMP() { if (_ncMgr == null) { return(undefined); } return(_ncMgr.isRTMP()); } function get isLive() { return(_isLive); } function get state() { return(_state); } function get stateResponsive() { switch (_state) { case DISCONNECTED : case STOPPED : case PLAYING : case PAUSED : case BUFFERING : return(true); } return(false); } function get bytesLoaded() { if ((_ns == null) || (_ncMgr.isRTMP())) { return(-1); } return(_ns.bytesLoaded); } function get bytesTotal() { if ((_ns == null) || (_ncMgr.isRTMP())) { return(-1); } return(_ns.bytesTotal); } function get totalTime() { return(_streamLength); } function get bufferTime() { return(_bufferTime); } function set bufferTime(aTime) { _bufferTime = aTime; if (_ns != null) { _ns.setBufferTime(_bufferTime); } //return(bufferTime); } function get idleTimeout() { return(_idleTimeoutInterval); } function set idleTimeout(aTime) { _idleTimeoutInterval = aTime; if (_idleTimeoutIntervalID > 0) { clearInterval(_idleTimeoutIntervalID); _idleTimeoutIntervalID = setInterval(this, "doIdleTimeout", _idleTimeoutInterval); } //return(idleTimeout); } function get playheadUpdateInterval() { return(_updateTimeInterval); } function set playheadUpdateInterval(aTime) { _updateTimeInterval = aTime; if (_updateTimeIntervalID > 0) { clearInterval(_updateTimeIntervalID); _updateTimeIntervalID = setInterval(this, "doUpdateTime", _updateTimeInterval); } //return(playheadUpdateInterval); } function get progressInterval() { return(_updateProgressInterval); } function set progressInterval(aTime) { _updateProgressInterval = aTime; if (_updateProgressIntervalID > 0) { clearInterval(_updateProgressIntervalID); _updateProgressIntervalID = setInterval(this, "doUpdateProgress", _updateProgressInterval); } //return(progressInterval); } function get ncMgr() { if (_ncMgr == null) { createINCManager(); } return(_ncMgr); } function get metadata() { return(_metadata); } function doUpdateTime() { var _local2 = playheadTime; switch (_state) { case STOPPED : case PAUSED : case DISCONNECTED : case CONNECTION_ERROR : clearInterval(_updateTimeIntervalID); _updateTimeIntervalID = 0; } if (_lastUpdateTime != _local2) { dispatchEvent({type:"playheadUpdate", state:_state, playheadTime:_local2}); _lastUpdateTime = _local2; } } function doUpdateProgress() { if (_ns == null) { return(undefined); } if ((_ns.bytesTotal >= 0) && (_ns.bytesTotal >= 0)) { dispatchEvent({type:"progress", bytesLoaded:_ns.bytesLoaded, bytesTotal:_ns.bytesTotal}); } if (((_state == DISCONNECTED) || (_state == CONNECTION_ERROR)) || (_ns.bytesLoaded == _ns.bytesTotal)) { clearInterval(_updateProgressIntervalID); _updateProgressIntervalID = 0; } } function rtmpOnStatus(info) { if (_state == CONNECTION_ERROR) { return(undefined); } switch (info.code) { case "NetStream.Play.Stop" : if (_startingPlay) { return(undefined); } switch (_state) { case RESIZING : if (_hiddenForResize) { finishAutoResize(); } break; case LOADING : case STOPPED : case PAUSED : break; default : _sawPlayStop = true; } break; case "NetStream.Buffer.Empty" : if (!(_bufferState === BUFFER_FULL)) { } else if (_sawPlayStop) { rtmpDoStopAtEnd(true); } else if (_state == PLAYING) { setState(BUFFERING); } _bufferState = BUFFER_EMPTY; _sawPlayStop = false; break; case "NetStream.Buffer.Flush" : if (_sawSeekNotify && (_state == SEEKING)) { _bufferState = BUFFER_EMPTY; _sawPlayStop = false; setStateFromCachedState(); doUpdateTime(); } if (_sawPlayStop && ((_bufferState == BUFFER_EMPTY) || ((_bufferTime <= 0.1) && (_ns.bufferLength <= 0.1)))) { _cachedPlayheadTime = playheadTime; clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = setInterval(this, "rtmpDoStopAtEnd", RTMP_DO_STOP_AT_END_INTERVAL); } switch (_bufferState) { case BUFFER_EMPTY : if (!_hiddenForResize) { if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) { setState(PLAYING); } else if (_cachedState == BUFFERING) { _cachedState = PLAYING; } } _bufferState = BUFFER_FLUSH; break; default : if (_state != BUFFERING) { break; } setStateFromCachedState(); } break; case "NetStream.Buffer.Full" : if (_sawSeekNotify && (_state == SEEKING)) { _bufferState = BUFFER_EMPTY; _sawPlayStop = false; setStateFromCachedState(); doUpdateTime(); } switch (_bufferState) { case BUFFER_EMPTY : _bufferState = BUFFER_FULL; if (!_hiddenForResize) { if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) { setState(PLAYING); } else if (_cachedState == BUFFERING) { _cachedState = PLAYING; } if (_rtmpDoStopAtEndIntervalID != 0) { _sawPlayStop = true; clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; } } break; case BUFFER_FLUSH : _bufferState = BUFFER_FULL; if (_rtmpDoStopAtEndIntervalID == 0) { break; } _sawPlayStop = true; clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; } if (_state == BUFFERING) { setStateFromCachedState(); } break; case "NetStream.Pause.Notify" : if ((_state == RESIZING) && (_hiddenForResize)) { finishAutoResize(); } break; case "NetStream.Unpause.Notify" : if (_state == PAUSED) { _state = PLAYING; setState(BUFFERING); } else { _cachedState = PLAYING; } break; case "NetStream.Play.Start" : clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; if (_startingPlay) { _startingPlay = false; _cachedPlayheadTime = playheadTime; } else if (_state == PLAYING) { setState(BUFFERING); } break; case "NetStream.Play.Reset" : clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; if (_state == REWINDING) { clearInterval(_rtmpDoSeekIntervalID); _rtmpDoSeekIntervalID = 0; if ((playheadTime == 0) || (playheadTime < _cachedPlayheadTime)) { setStateFromCachedState(); } else { _cachedPlayheadTime = playheadTime; _rtmpDoSeekIntervalID = setInterval(this, "rtmpDoSeek", RTMP_DO_SEEK_INTERVAL); } } break; case "NetStream.Seek.Notify" : if (playheadTime != _cachedPlayheadTime) { setStateFromCachedState(); doUpdateTime(); } else { _sawSeekNotify = true; if (_rtmpDoSeekIntervalID == 0) { _rtmpDoSeekIntervalID = setInterval(this, "rtmpDoSeek", RTMP_DO_SEEK_INTERVAL); } } break; case "Netstream.Play.UnpublishNotify" : break; case "Netstream.Play.PublishNotify" : break; case "NetStream.Play.StreamNotFound" : if (!_ncMgr.connectAgain()) { setState(CONNECTION_ERROR); } break; case "NetStream.Play.Failed" : case "NetStream.Failed" : setState(CONNECTION_ERROR); } } function httpOnStatus(info) { switch (info.code) { case "NetStream.Play.Stop" : clearInterval(_delayedBufferingIntervalID); _delayedBufferingIntervalID = 0; if (_invalidSeekTime) { _invalidSeekTime = false; _invalidSeekRecovery = true; setState(_cachedState); seek(playheadTime); } else { switch (_state) { case PLAYING : case BUFFERING : case SEEKING : httpDoStopAtEnd(); } } break; case "NetStream.Seek.InvalidTime" : if (_invalidSeekRecovery) { _invalidSeekTime = false; _invalidSeekRecovery = false; setState(_cachedState); seek(0); } else { _invalidSeekTime = true; } break; case "NetStream.Buffer.Empty" : _bufferState = BUFFER_EMPTY; if (_state == PLAYING) { clearInterval(_delayedBufferingIntervalID); _delayedBufferingIntervalID = setInterval(this, "doDelayedBuffering", _delayedBufferingInterval); } break; case "NetStream.Buffer.Full" : case "NetStream.Buffer.Flush" : clearInterval(_delayedBufferingIntervalID); _delayedBufferingIntervalID = 0; _bufferState = BUFFER_FULL; if (!_hiddenForResize) { if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) { setState(PLAYING); } else if (_cachedState == BUFFERING) { _cachedState = PLAYING; } } break; case "NetStream.Seek.Notify" : _invalidSeekRecovery = false; switch (_state) { case SEEKING : case REWINDING : if (_httpDoSeekIntervalID != 0) { break; } _httpDoSeekCount = 0; _httpDoSeekIntervalID = setInterval(this, "httpDoSeek", HTTP_DO_SEEK_INTERVAL); } break; case "NetStream.Play.StreamNotFound" : setState(CONNECTION_ERROR); } } function ncConnected() { if ((_ncMgr == null) || (_ncMgr.getNetConnection() == null)) { setState(CONNECTION_ERROR); } else { _createStream(); _setUpStream(); } } function ncReconnected() { if ((_ncMgr == null) || (_ncMgr.getNetConnection() == null)) { setState(CONNECTION_ERROR); } else { _ns = null; _state = STOPPED; execQueuedCmds(); } } function onMetaData(info) { if (_metadata != null) { return(undefined); } _metadata = info; if ((_streamLength == null) || (_streamLength <= 0)) { _streamLength = info.duration; } if (isNaN(_videoWidth) || (_videoWidth <= 0)) { _videoWidth = info.width; } if (isNaN(_videoHeight) || (_videoHeight <= 0)) { _videoHeight = info.height; } dispatchEvent({type:"metadataReceived", info:info}); } function onCuePoint(info) { if ((!_hiddenForResize) || ((!isNaN(_hiddenRewindPlayheadTime)) && (playheadTime < _hiddenRewindPlayheadTime))) { dispatchEvent({type:"cuePoint", info:info}); } } function setState(s) { if (s == _state) { return(undefined); } _hiddenRewindPlayheadTime = undefined; _cachedState = _state; _cachedPlayheadTime = playheadTime; _state = s; var _local2 = _state; dispatchEvent({type:"stateChange", state:_local2, playheadTime:playheadTime}); if (!_readyDispatched) { switch (_local2) { case STOPPED : case PLAYING : case PAUSED : case BUFFERING : _readyDispatched = true; dispatchEvent({type:"ready", state:_local2, playheadTime:playheadTime}); } } if (!(_cachedState === REWINDING)) { } else { dispatchEvent({type:"rewind", state:_local2, playheadTime:playheadTime}); if (_ncMgr.isRTMP() && (_local2 == STOPPED)) { closeNS(); } } switch (_local2) { case STOPPED : case PAUSED : if (_ncMgr.isRTMP() && (_idleTimeoutIntervalID == 0)) { _idleTimeoutIntervalID = setInterval(this, "doIdleTimeout", _idleTimeoutInterval); } break; case SEEKING : case REWINDING : _bufferState = BUFFER_EMPTY; _sawPlayStop = false; case PLAYING : case BUFFERING : if (_updateTimeIntervalID == 0) { _updateTimeIntervalID = setInterval(this, "doUpdateTime", _updateTimeInterval); } case LOADING : case RESIZING : clearInterval(_idleTimeoutIntervalID); _idleTimeoutIntervalID = 0; } execQueuedCmds(); } function setStateFromCachedState() { switch (_cachedState) { case PLAYING : case PAUSED : setState(_cachedState); break; case BUFFERING : if (_bufferState == BUFFER_EMPTY) { setState(BUFFERING); } else { setState(_cachedState); } break; default : setState(STOPPED); } } function createINCManager() { if (ncMgrClassName == null) { ncMgrClassName = DEFAULT_INCMANAGER; } var ncMgrConstructor = eval (this.ncMgrClassName); _ncMgr = new ncMgrConstructor(); _ncMgr.setVideoPlayer(this); } function rtmpDoStopAtEnd(force) { if (_rtmpDoStopAtEndIntervalID > 0) { switch (_state) { case DISCONNECTED : case CONNECTION_ERROR : clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; return(undefined); } if (force || (_cachedPlayheadTime == playheadTime)) { clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; } else { _cachedPlayheadTime = playheadTime; return(undefined); } } _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _atEnd = true; setState(STOPPED); if (_state != STOPPED) { return(undefined); } doUpdateTime(); if (_state != STOPPED) { return(undefined); } dispatchEvent({type:"complete", state:_state, playheadTime:playheadTime}); if (_state != STOPPED) { return(undefined); } if ((_autoRewind && (!_isLive)) && (playheadTime != 0)) { _atEnd = false; _currentPos = 0; _play(0, 0); setState(REWINDING); } else { closeNS(); } } function rtmpDoSeek() { if ((_state != REWINDING) && (_state != SEEKING)) { clearInterval(_rtmpDoSeekIntervalID); _rtmpDoSeekIntervalID = 0; _sawSeekNotify = false; } else if (playheadTime != _cachedPlayheadTime) { clearInterval(_rtmpDoSeekIntervalID); _rtmpDoSeekIntervalID = 0; _sawSeekNotify = false; setStateFromCachedState(); doUpdateTime(); } } function httpDoStopAtEnd() { _atEnd = true; if ((_streamLength == null) || (_streamLength <= 0)) { _streamLength = _ns.time; } _pause(true); setState(STOPPED); if (_state != STOPPED) { return(undefined); } doUpdateTime(); if (_state != STOPPED) { return(undefined); } dispatchEvent({type:"complete", state:_state, playheadTime:playheadTime}); if (_state != STOPPED) { return(undefined); } if (_autoRewind) { _atEnd = false; _pause(true); _seek(0); setState(REWINDING); } } function httpDoSeek() { var _local2 = (_state == REWINDING) || (_state == SEEKING); if ((_local2 && (_httpDoSeekCount < HTTP_DO_SEEK_MAX_COUNT)) && ((_cachedPlayheadTime == playheadTime) || (_invalidSeekTime))) { _httpDoSeekCount++; return(undefined); } _httpDoSeekCount = 0; clearInterval(_httpDoSeekIntervalID); _httpDoSeekIntervalID = 0; if (!_local2) { return(undefined); } setStateFromCachedState(); if (_invalidSeekTime) { _invalidSeekTime = false; _invalidSeekRecovery = true; seek(playheadTime); } else { doUpdateTime(); } } function closeNS(updateCurrentPos) { if ((_ns != null) && (_ns != undefined)) { if (updateCurrentPos) { clearInterval(_updateTimeIntervalID); _updateTimeIntervalID = 0; doUpdateTime(); _currentPos = _ns.time; } delete _ns.onStatus; _ns.onStatus = null; _ns.close(); _ns = null; } } function doDelayedBuffering() { switch (_state) { case LOADING : case RESIZING : break; case PLAYING : clearInterval(_delayedBufferingIntervalID); _delayedBufferingIntervalID = 0; setState(BUFFERING); break; default : clearInterval(_delayedBufferingIntervalID); _delayedBufferingIntervalID = 0; } } function _pause(doPause) { clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; _ns.pause(doPause); } function _play() { clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; _startingPlay = true; switch (arguments.length) { case 0 : _ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : 0), -1); break; case 1 : _ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : (arguments[0])), -1); break; case 2 : _ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : (arguments[0])), arguments[1]); break; default : throw new Error("bad args to _play"); } } function _seek(time) { clearInterval(_rtmpDoStopAtEndIntervalID); _rtmpDoStopAtEndIntervalID = 0; if ((_metadata.audiodelay != undefined) && ((time + _metadata.audiodelay) < _streamLength)) { time = time + _metadata.audiodelay; } _ns.seek(time); _invalidSeekTime = false; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _sawSeekNotify = false; } function isXnOK() { if (_state == LOADING) { return(true); } if (_state == CONNECTION_ERROR) { return(false); } if (_state != DISCONNECTED) { if (((_ncMgr == null) || (_ncMgr.getNetConnection() == null)) || (!_ncMgr.getNetConnection().isConnected)) { setState(DISCONNECTED); return(false); } return(true); } return(false); } function startAutoResize() { switch (_state) { case DISCONNECTED : case CONNECTION_ERROR : return(undefined); } _autoResizeDone = false; if ((stateResponsive && (_videoWidth != undefined)) && (_videoHeight != undefined)) { doAutoResize(); } else { clearInterval(_autoResizeIntervalID); _autoResizeIntervalID = setInterval(this, "doAutoResize", AUTO_RESIZE_INTERVAL); } } function doAutoResize() { if (_autoResizeIntervalID > 0) { switch (_state) { case RESIZING : case LOADING : break; case DISCONNECTED : case CONNECTION_ERROR : clearInterval(_autoResizeIntervalID); _autoResizeIntervalID = 0; return(undefined); default : if (stateResponsive) { break; } return(undefined); } if (((((_video.width != _prevVideoWidth) || (_video.height != _prevVideoHeight)) || (_bufferState == BUFFER_FULL)) || (_bufferState == BUFFER_FLUSH)) || (_ns.time > AUTO_RESIZE_PLAYHEAD_TIMEOUT)) { if ((_hiddenForResize && (_metadata == null)) && (_hiddenForResizeMetadataDelay < AUTO_RESIZE_METADATA_DELAY_MAX)) { _hiddenForResizeMetadataDelay++; return(undefined); } _videoWidth = _video.width; _videoHeight = _video.height; clearInterval(_autoResizeIntervalID); _autoResizeIntervalID = 0; } else { return(undefined); } } if (((!_autoSize) && (!_aspectRatio)) || (_autoResizeDone)) { setState(_cachedState); return(undefined); } _autoResizeDone = true; if (_autoSize) { _video._width = _videoWidth; _video._height = _videoHeight; } else if (_aspectRatio) { var _local3 = (_videoWidth * height) / _videoHeight; var _local2 = (_videoHeight * width) / _videoWidth; if (_local2 < height) { _video._height = _local2; } else if (_local3 < width) { _video._width = _local3; } } if (_hiddenForResize) { _hiddenRewindPlayheadTime = playheadTime; if (_state == LOADING) { _cachedState = PLAYING; } if (!_ncMgr.isRTMP()) { _pause(true); _seek(0); clearInterval(_finishAutoResizeIntervalID); _finishAutoResizeIntervalID = setInterval(this, "finishAutoResize", FINISH_AUTO_RESIZE_INTERVAL); } else if (!_isLive) { _currentPos = 0; _play(0, 0); setState(RESIZING); } else if (_autoPlay) { clearInterval(_finishAutoResizeIntervalID); _finishAutoResizeIntervalID = setInterval(this, "finishAutoResize", FINISH_AUTO_RESIZE_INTERVAL); } else { finishAutoResize(); } } else { dispatchEvent({type:"resize", x:_x, y:_y, width:_width, height:_height}); } } function finishAutoResize() { clearInterval(_finishAutoResizeIntervalID); _finishAutoResizeIntervalID = 0; if (stateResponsive) { return(undefined); } _visible = __visible; _sound.setVolume(_volume); _hiddenForResize = false; dispatchEvent({type:"resize", x:_x, y:_y, width:_width, height:_height}); if (_autoPlay) { if (_ncMgr.isRTMP()) { if (!_isLive) { _currentPos = 0; _play(0); } if (_state == RESIZING) { setState(LOADING); _cachedState = PLAYING; } } else { _pause(false); _cachedState = PLAYING; } } else { setState(STOPPED); } } function _createStream() { _ns = new NetStream(_ncMgr.getNetConnection()); _ns.mc = this; if (_ncMgr.isRTMP()) { _ns.onStatus = function (info) { this.mc.rtmpOnStatus(info); }; } else { _ns.onStatus = function (info) { this.mc.httpOnStatus(info); }; } _ns.onMetaData = function (info) { this.mc.onMetaData(info); }; _ns.onCuePoint = function (info) { this.mc.onCuePoint(info); }; _ns.setBufferTime(_bufferTime); } function _setUpStream() { _video.attachVideo(_ns); attachAudio(_ns); if ((!isNaN(_ncMgr.getStreamLength())) && (_ncMgr.getStreamLength() >= 0)) { _streamLength = _ncMgr.getStreamLength(); } if ((!isNaN(_ncMgr.getStreamWidth())) && (_ncMgr.getStreamWidth() >= 0)) { _videoWidth = _ncMgr.getStreamWidth(); } else { _videoWidth = undefined; } if ((!isNaN(_ncMgr.getStreamHeight())) && (_ncMgr.getStreamHeight() >= 0)) { _videoHeight = _ncMgr.getStreamHeight(); } else { _videoHeight = undefined; } if (((_autoSize || (_aspectRatio)) && (_videoWidth != undefined)) && (_videoHeight != undefined)) { _prevVideoWidth = undefined; _prevVideoHeight = undefined; doAutoResize(); } if (((!_autoSize) && (!_aspectRatio)) || ((_videoWidth != undefined) && (_videoHeight != undefined))) { if (_autoPlay) { if (!_ncMgr.isRTMP()) { _cachedState = BUFFERING; _play(); } else if (_isLive) { _cachedState = BUFFERING; _play(-1); } else { _cachedState = BUFFERING; _play(0); } } else { _cachedState = STOPPED; if (_ncMgr.isRTMP()) { _play(0, 0); } else { _play(); _pause(true); _seek(0); } } } else { if (!_hiddenForResize) { __visible = _visible; _visible = false; _volume = _sound.getVolume(); _sound.setVolume(0); _hiddenForResize = true; } _hiddenForResizeMetadataDelay = 0; _play(0); if (_currentPos > 0) { _seek(_currentPos); _currentPos = 0; } } clearInterval(_autoResizeIntervalID); _autoResizeIntervalID = setInterval(this, "doAutoResize", AUTO_RESIZE_INTERVAL); } function doIdleTimeout() { clearInterval(_idleTimeoutIntervalID); _idleTimeoutIntervalID = 0; close(); } function flushQueuedCmds() { while (_cmdQueue.length > 0) { _cmdQueue.pop(); } } function execQueuedCmds() { while (((_cmdQueue.length > 0) && (stateResponsive || (_state == CONNECTION_ERROR))) && ((_cmdQueue[0].url != null) || ((_state != DISCONNECTED) && (_state != CONNECTION_ERROR)))) { var _local2 = _cmdQueue.shift(); _cachedState = _state; _state = EXEC_QUEUED_CMD; switch (_local2.type) { case PLAY : play(_local2.url, _local2.isLive, _local2.time); break; case LOAD : load(_local2.url, _local2.isLive, _local2.time); break; case PAUSE : pause(); break; case STOP : stop(); break; case SEEK : seek(_local2.time); } } } function queueCmd(type, url, isLive, time) { _cmdQueue.push({type:type, url:url, isLive:isLive, time:time}); } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; static var DISCONNECTED = "disconnected"; static var STOPPED = "stopped"; static var PLAYING = "playing"; static var PAUSED = "paused"; static var BUFFERING = "buffering"; static var LOADING = "loading"; static var CONNECTION_ERROR = "connectionError"; static var REWINDING = "rewinding"; static var SEEKING = "seeking"; static var RESIZING = "resizing"; static var EXEC_QUEUED_CMD = "execQueuedCmd"; static var BUFFER_EMPTY = "bufferEmpty"; static var BUFFER_FULL = "bufferFull"; static var BUFFER_FLUSH = "bufferFlush"; static var DEFAULT_INCMANAGER = "mx.video.NCManager"; static var DEFAULT_UPDATE_TIME_INTERVAL = 250; static var DEFAULT_UPDATE_PROGRESS_INTERVAL = 250; static var DEFAULT_IDLE_TIMEOUT_INTERVAL = 300000; static var AUTO_RESIZE_INTERVAL = 100; static var AUTO_RESIZE_PLAYHEAD_TIMEOUT = 0.5; static var AUTO_RESIZE_METADATA_DELAY_MAX = 5; static var FINISH_AUTO_RESIZE_INTERVAL = 250; static var RTMP_DO_STOP_AT_END_INTERVAL = 500; static var RTMP_DO_SEEK_INTERVAL = 100; static var HTTP_DO_SEEK_INTERVAL = 250; static var HTTP_DO_SEEK_MAX_COUNT = 4; static var CLOSE_NS_INTERVAL = 0.25; static var HTTP_DELAYED_BUFFERING_INTERVAL = 100; static var PLAY = 0; static var LOAD = 1; static var PAUSE = 2; static var STOP = 3; static var SEEK = 4; }
Symbol 15 MovieClip [__Packages.mx.video.INCManager] Frame 0
interface mx.video.INCManager { }
Symbol 17 MovieClip [__Packages.mx.video.VideoError] Frame 0
class mx.video.VideoError extends Error { var _code, message, name; function VideoError (errCode, msg) { super(); _code = errCode; message = ((("" + errCode) + ": ") + ERROR_MSG[errCode - BASE_ERROR_CODE]) + ((msg == undefined) ? "" : (": " + msg)); name = "VideoError"; } function get code() { return(_code); } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; static var BASE_ERROR_CODE = 1000; static var NO_CONNECTION = 1000; static var NO_CUE_POINT_MATCH = 1001; static var ILLEGAL_CUE_POINT = 1002; static var INVALID_SEEK = 1003; static var INVALID_CONTENT_PATH = 1004; static var INVALID_XML = 1005; static var NO_BITRATE_MATCH = 1006; static var DELETE_DEFAULT_PLAYER = 1007; static var 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"]; }
Symbol 18 MovieClip [__Packages.mx.video.UIManager] Frame 0
class mx.video.UIManager { var _vc, _skin, _skinAutoHide, _skinReady, __visible, _bufferingBarHides, _controlsEnabled, _lastScrubPos, _lastVolumePos, cachedSoundLevel, _isMuted, controls, customClips, skin_mc, skinLoader, layout_mc, border_mc, _seekBarIntervalID, _seekBarInterval, _seekBarScrubTolerance, _volumeBarIntervalID, _volumeBarInterval, _volumeBarScrubTolerance, _bufferingDelayIntervalID, _bufferingDelayInterval, _bufferingOn, _skinAutoHideIntervalID, _progressPercent, placeholderLeft, placeholderRight, placeholderTop, placeholderBottom, videoLeft, videoRight, videoTop, videoBottom, _playAfterScrub; function UIManager (vc) { _vc = vc; _skin = undefined; _skinAutoHide = false; _skinReady = true; __visible = true; _bufferingBarHides = false; _controlsEnabled = true; _lastScrubPos = 0; _lastVolumePos = 0; cachedSoundLevel = _vc.volume; _isMuted = false; controls = new Array(); customClips = undefined; skin_mc = undefined; skinLoader = undefined; layout_mc = undefined; border_mc = undefined; _seekBarIntervalID = 0; _seekBarInterval = SEEK_BAR_INTERVAL_DEFAULT; _seekBarScrubTolerance = SEEK_BAR_SCRUB_TOLERANCE_DEFAULT; _volumeBarIntervalID = 0; _volumeBarInterval = VOLUME_BAR_INTERVAL_DEFAULT; _volumeBarScrubTolerance = VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT; _bufferingDelayIntervalID = 0; _bufferingDelayInterval = BUFFERING_DELAY_INTERVAL_DEFAULT; _bufferingOn = false; _skinAutoHideIntervalID = 0; _vc.addEventListener("metadataReceived", this); _vc.addEventListener("playheadUpdate", this); _vc.addEventListener("progress", this); _vc.addEventListener("stateChange", this); _vc.addEventListener("ready", this); _vc.addEventListener("resize", this); _vc.addEventListener("volumeUpdate", this); } function handleEvent(e) { if ((e.vp != undefined) && (e.vp != _vc.__get__visibleVideoPlayerIndex())) { return(undefined); } var _local9 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); if (e.type == "stateChange") { if (e.state == mx.video.FLVPlayback.BUFFERING) { if (!_bufferingOn) { clearInterval(_bufferingDelayIntervalID); _bufferingDelayIntervalID = setInterval(this, "doBufferingDelay", _bufferingDelayInterval); } } else { clearInterval(_bufferingDelayIntervalID); _bufferingDelayIntervalID = 0; _bufferingOn = false; } if (e.state == mx.video.FLVPlayback.LOADING) { _progressPercent = (_vc.getVideoPlayer(e.vp).__get__isRTMP() ? 100 : 0); var _local2 = SEEK_BAR; while (_local2 <= VOLUME_BAR) { var _local4 = controls[_local2]; if (_local4.progress_mc != undefined) { positionBar(_local4, "progress", _progressPercent); } _local2++; } } var _local2 = 0; while (_local2 < NUM_CONTROLS) { if (controls[_local2] == undefined) { } else { setEnabledAndVisibleForState(_local2, e.state); if (_local2 < NUM_BUTTONS) { skinButtonControl(controls[_local2]); } } _local2++; } } else if ((e.type == "ready") || (e.type == "metadataReceived")) { var _local2 = 0; while (_local2 < NUM_CONTROLS) { if (controls[_local2] == undefined) { } else { setEnabledAndVisibleForState(_local2, _vc.__get__state()); if (_local2 < NUM_BUTTONS) { skinButtonControl(controls[_local2]); } } _local2++; } if (_vc.getVideoPlayer(e.vp).__get__isRTMP()) { _progressPercent = 100; _local2 = SEEK_BAR; while (_local2 <= VOLUME_BAR) { var _local4 = controls[_local2]; if (_local4.progress_mc != undefined) { positionBar(_local4, "progress", _progressPercent); } _local2++; } } } else if (e.type == "resize") { layoutSkin(); setupSkinAutoHide(); } else if (e.type == "volumeUpdate") { if (_isMuted && (e.volume > 0)) { _isMuted = false; setEnabledAndVisibleForState(MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING); skinButtonControl(controls[MUTE_OFF_BUTTON]); setEnabledAndVisibleForState(MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING); skinButtonControl(controls[MUTE_ON_BUTTON]); } var _local5 = controls[VOLUME_BAR]; _local5.percentage = (_isMuted ? (cachedSoundLevel) : (e.volume)); if (_local5.percentage < 0) { _local5.percentage = 0; } else if (_local5.percentage > 100) { _local5.percentage = 100; } positionHandle(VOLUME_BAR); } else if ((e.type == "playheadUpdate") && (controls[SEEK_BAR] != undefined)) { if ((!_vc.__get__isLive()) && (_vc.__get__totalTime() > 0)) { var _local6 = (e.playheadTime / _vc.__get__totalTime()) * 100; if (_local6 < 0) { _local6 = 0; } else if (_local6 > 100) { _local6 = 100; } var _local10 = controls[SEEK_BAR]; _local10.percentage = _local6; positionHandle(SEEK_BAR); } } else if (e.type == "progress") { _progressPercent = ((e.bytesTotal <= 0) ? 100 : ((e.bytesLoaded / e.bytesTotal) * 100)); var _local7 = _vc._vpState[e.vp].minProgressPercent; if ((!isNaN(_local7)) && (_local7 > _progressPercent)) { _progressPercent = _local7; } if (_vc.__get__totalTime() > 0) { var _local8 = (_vc.__get__playheadTime() / _vc.__get__totalTime()) * 100; if (_local8 > _progressPercent) { _progressPercent = _local8; _vc._vpState[e.vp].minProgressPercent = _progressPercent; } } var _local2 = SEEK_BAR; while (_local2 <= VOLUME_BAR) { var _local4 = controls[_local2]; if (_local4.progress_mc != undefined) { positionBar(_local4, "progress", _progressPercent); } _local2++; } } _vc.__set__activeVideoPlayerIndex(_local9); } function get bufferingBarHidesAndDisablesOthers() { return(_bufferingBarHides); } function set bufferingBarHidesAndDisablesOthers(b) { _bufferingBarHides = b; //return(bufferingBarHidesAndDisablesOthers); } function get controlsEnabled() { return(_controlsEnabled); } function set controlsEnabled(flag) { if (_controlsEnabled == flag) { return; } _controlsEnabled = flag; var _local2 = 0; while (_local2 < NUM_BUTTONS) { if (controls[_local2] == undefined) { } else { controls[_local2].releaseCapture(); controls[_local2].enabled = _controlsEnabled && (controls[_local2].myEnabled); skinButtonControl(controls[_local2]); } _local2++; } //return(controlsEnabled); } function get skin() { return(_skin); } function set skin(s) { if (s == _skin) { return; } if (_skin != undefined) { removeSkin(); } _skin = s; _skinReady = (_skin == null) || (_skin == ""); if (!_skinReady) { downloadSkin(); } //return(skin); } function get skinAutoHide() { return(_skinAutoHide); } function set skinAutoHide(b) { if (b == _skinAutoHide) { return; } _skinAutoHide = b; setupSkinAutoHide(); //return(skinAutoHide); } function get skinReady() { return(_skinReady); } function get seekBarInterval() { return(_seekBarInterval); } function set seekBarInterval(s) { if (_seekBarInterval == s) { return; } _seekBarInterval = s; if (_seekBarIntervalID > 0) { clearInterval(_seekBarIntervalID); _seekBarIntervalID = setInterval(this, "seekBarListener", _seekBarInterval, false); } //return(seekBarInterval); } function get volumeBarInterval() { return(_volumeBarInterval); } function set volumeBarInterval(s) { if (_volumeBarInterval == s) { return; } _volumeBarInterval = s; if (_volumeBarIntervalID > 0) { clearInterval(_volumeBarIntervalID); _volumeBarIntervalID = setInterval(this, "volumeBarListener", _volumeBarInterval, false); } //return(volumeBarInterval); } function get bufferingDelayInterval() { return(_bufferingDelayInterval); } function set bufferingDelayInterval(s) { if (_bufferingDelayInterval == s) { return; } _bufferingDelayInterval = s; if (_bufferingDelayIntervalID > 0) { clearInterval(_bufferingDelayIntervalID); _bufferingDelayIntervalID = setInterval(this, "doBufferingDelay", _bufferingDelayIntervalID); } //return(bufferingDelayInterval); } function get volumeBarScrubTolerance() { return(_volumeBarScrubTolerance); } function set volumeBarScrubTolerance(s) { _volumeBarScrubTolerance = s; //return(volumeBarScrubTolerance); } function get seekBarScrubTolerance() { return(_seekBarScrubTolerance); } function set seekBarScrubTolerance(s) { _seekBarScrubTolerance = s; //return(seekBarScrubTolerance); } function get visible() { return(__visible); } function set visible(v) { if (__visible == v) { return; } __visible = v; if (!__visible) { skin_mc._visible = false; } else { setupSkinAutoHide(); } //return(visible); } function getControl(index) { return(controls[index]); } function setControl(index, s) { if (s == null) { s = undefined; } if (s == controls[index]) { return(undefined); } switch (index) { case PAUSE_BUTTON : case PLAY_BUTTON : resetPlayPause(); break; case PLAY_PAUSE_BUTTON : if (s._parent != layout_mc) { resetPlayPause(); setControl(PAUSE_BUTTON, s.pause_mc); setControl(PLAY_BUTTON, s.play_mc); } break; case MUTE_BUTTON : if (s._parent == layout_mc) { break; } setControl(MUTE_ON_BUTTON, s.on_mc); setControl(MUTE_OFF_BUTTON, s.off_mc); } if (index >= NUM_BUTTONS) { controls[index] = s; switch (index) { case SEEK_BAR : addBarControl(SEEK_BAR); break; case VOLUME_BAR : addBarControl(VOLUME_BAR); controls[VOLUME_BAR].percentage = _vc.volume; break; case BUFFERING_BAR : controls[BUFFERING_BAR].uiMgr = this; controls[BUFFERING_BAR].controlIndex = BUFFERING_BAR; if (controls[BUFFERING_BAR]._parent == skin_mc) { finishAddBufferingBar(); } else { controls[BUFFERING_BAR].onEnterFrame = function () { this.uiMgr.finishAddBufferingBar(); }; } } setEnabledAndVisibleForState(index, _vc.__get__state()); } else { removeButtonControl(index); controls[index] = s; addButtonControl(index); } } function resetPlayPause() { if (controls[PLAY_PAUSE_BUTTON] == undefined) { return(undefined); } var _local2 = PAUSE_BUTTON; while (_local2 <= PLAY_BUTTON) { removeButtonControl(_local2); _local2++; } controls[PLAY_PAUSE_BUTTON] = undefined; } function addButtonControl(index) { var _local3 = controls[index]; if (_local3 == undefined) { return(undefined); } var _local5 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); _local3.id = index; _local3.state = UP_STATE; _local3.uiMgr = this; setEnabledAndVisibleForState(index, _vc.__get__state()); _local3.onRollOver = function () { this.state = mx.video.UIManager.OVER_STATE; this.uiMgr.skinButtonControl(this); }; _local3.onRollOut = function () { this.state = mx.video.UIManager.UP_STATE; this.uiMgr.skinButtonControl(this); }; if ((index == SEEK_BAR_HANDLE) || (index == VOLUME_BAR_HANDLE)) { _local3.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); }; _local3.onRelease = function () { this.state = mx.video.UIManager.OVER_STATE; this.uiMgr.handleRelease(this.controlIndex); this.uiMgr.skinButtonControl(this); }; _local3.onReleaseOutside = function () { this.state = mx.video.UIManager.UP_STATE; this.uiMgr.handleRelease(this.controlIndex); this.uiMgr.skinButtonControl(this); }; } else { _local3.onPress = function () { if (_root.focusManager) { this._focusrect = false; Selection.setFocus(this); } this.state = mx.video.UIManager.DOWN_STATE; this.uiMgr.skinButtonControl(this); }; _local3.onRelease = function () { this.state = mx.video.UIManager.OVER_STATE; this.uiMgr.dispatchMessage(this); this.uiMgr.skinButtonControl(this); }; _local3.onReleaseOutside = function () { this.state = mx.video.UIManager.UP_STATE; this.uiMgr.skinButtonControl(this); }; } if (_local3._parent == skin_mc) { skinButtonControl(_local3); } else { _local3.onEnterFrame = function () { this.uiMgr.skinButtonControl(this); }; } _vc.__set__activeVideoPlayerIndex(_local5); } function removeButtonControl(index) { if (controls[index] == undefined) { return(undefined); } controls[index].uiMgr = undefined; controls[index].onRollOver = undefined; controls[index].onRollOut = undefined; controls[index].onPress = undefined; controls[index].onRelease = undefined; controls[index].onReleaseOutside = undefined; controls[index] = undefined; } function downloadSkin() { if (skinLoader == undefined) { skinLoader = new MovieClipLoader(); skinLoader.addListener(this); } if (skin_mc == undefined) { skin_mc = _vc.createEmptyMovieClip("skin_mc", _vc.getNextHighestDepth()); } skin_mc._visible = false; skin_mc._x = Stage.width + 100; skin_mc._y = Stage.height + 100; skinLoader.loadClip(_skin, skin_mc); } function onLoadError(target_mc, errorCode) { _skinReady = true; _vc.skinError("Unable to load skin swf"); } function onLoadInit() { try { skin_mc._visible = false; skin_mc._x = 0; skin_mc._y = 0; layout_mc = skin_mc.layout_mc; if (layout_mc == undefined) { throw new Error("No layout_mc"); } layout_mc._visible = false; customClips = new Array(); setCustomClips("bg"); if (layout_mc.playpause_mc != undefined) { setSkin(PLAY_PAUSE_BUTTON, layout_mc.playpause_mc); } else { setSkin(PAUSE_BUTTON, layout_mc.pause_mc); setSkin(PLAY_BUTTON, layout_mc.play_mc); } setSkin(STOP_BUTTON, layout_mc.stop_mc); setSkin(BACK_BUTTON, layout_mc.back_mc); setSkin(FORWARD_BUTTON, layout_mc.forward_mc); setSkin(MUTE_BUTTON, layout_mc.volumeMute_mc); setSkin(SEEK_BAR, layout_mc.seekBar_mc); setSkin(VOLUME_BAR, layout_mc.volumeBar_mc); setSkin(BUFFERING_BAR, layout_mc.bufferingBar_mc); setCustomClips("fg"); layoutSkin(); setupSkinAutoHide(); skin_mc._visible = __visible; _skinReady = true; _vc.skinLoaded(); var _local4 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); var _local3 = _vc.__get__state(); var _local2 = 0; while (_local2 < NUM_CONTROLS) { if (controls[_local2] == undefined) { } else { setEnabledAndVisibleForState(_local2, _local3); if (_local2 < NUM_BUTTONS) { skinButtonControl(controls[_local2]); } } _local2++; } _vc.__set__activeVideoPlayerIndex(_local4); } catch(err:Error) { _vc.skinError(err.message); removeSkin(); } } function layoutSkin() { if (layout_mc == undefined) { return(undefined); } var _local3 = layout_mc.video_mc; if (_local3 == undefined) { throw new Error("No layout_mc.video_mc"); } placeholderLeft = _local3._x; placeholderRight = _local3._x + _local3._width; placeholderTop = _local3._y; placeholderBottom = _local3._y + _local3._height; videoLeft = 0; videoRight = _vc.width; videoTop = 0; videoBottom = _vc.height; if (((!isNaN(layout_mc.minWidth)) && (layout_mc.minWidth > 0)) && (layout_mc.minWidth > videoRight)) { videoLeft = videoLeft - ((layout_mc.minWidth - videoRight) / 2); videoRight = layout_mc.minWidth + videoLeft; } if (((!isNaN(layout_mc.minHeight)) && (layout_mc.minHeight > 0)) && (layout_mc.minHeight > videoBottom)) { videoTop = videoTop - ((layout_mc.minHeight - videoBottom) / 2); videoBottom = layout_mc.minHeight + videoTop; } var _local2; _local2 = 0; while (_local2 < customClips.length) { layoutControl(customClips[_local2]); _local2++; } _local2 = 0; while (_local2 < NUM_CONTROLS) { layoutControl(controls[_local2]); _local2++; } } function layoutControl(ctrl) { if (ctrl == undefined) { return(undefined); } if (ctrl.skin.anchorRight) { if (ctrl.skin.anchorLeft) { ctrl._x = (ctrl.skin._x - placeholderLeft) + videoLeft; ctrl._width = (((ctrl.skin._x + ctrl.skin._width) - placeholderRight) + videoRight) - ctrl._x; if (ctrl.origWidth != undefined) { ctrl.origWidth = undefined; } } else { ctrl._x = (ctrl.skin._x - placeholderRight) + videoRight; } } else { ctrl._x = (ctrl.skin._x - placeholderLeft) + videoLeft; } if (ctrl.skin.anchorTop) { if (ctrl.skin.anchorBottom) { ctrl._y = (ctrl.skin._y - placeholderTop) + videoTop; ctrl._height = (((ctrl.skin._y + ctrl.skin._height) - placeholderBottom) + videoBottom) - ctrl._y; if (ctrl.origHeight != undefined) { ctrl.origHeight = undefined; } } else { ctrl._y = (ctrl.skin._y - placeholderTop) + videoTop; } } else { ctrl._y = (ctrl.skin._y - placeholderBottom) + videoBottom; } switch (ctrl.controlIndex) { case SEEK_BAR : case VOLUME_BAR : if (ctrl.progress_mc != undefined) { if (_progressPercent == undefined) { _progressPercent = (_vc.__get__isRTMP() ? 100 : 0); } positionBar(ctrl, "progress", _progressPercent); } positionHandle(ctrl.controlIndex); break; case BUFFERING_BAR : if (ctrl.fill_mc == undefined) { break; } positionMaskedFill(ctrl, ctrl.fill_mc, 100); } if (ctrl.layoutSelf != undefined) { ctrl.layoutSelf(); } } function removeSkin() { if (skin_mc != undefined) { var _local2 = 0; while (_local2 < NUM_BUTTONS) { removeButtonControl(_local2); _local2++; } _local2 = NUM_BUTTONS; while (_local2 < NUM_CONTROLS) { controls[_local2] = undefined; _local2++; } skin_mc.unloadMovie(); layout_mc = undefined; border_mc = undefined; } } function setCustomClips(prefix) { var _local4 = 1; while (true) { var _local2 = layout_mc[(prefix + (_local4++)) + "_mc"]; if (_local2 == undefined) { break; } var _local3 = _local2.mc; if (_local3 == undefined) { _local3 = _local2._parent._parent[_local2._name]; } if (_local3 == undefined) { throw new Error("Bad clip in skin: " + _local2); } _local3.skin = _local2; customClips.push(_local3); if ((prefix == "bg") && (_local4 == 2)) { border_mc = _local3; } } } function setSkin(index, s) { if (s == undefined) { return(undefined); } var _local2 = s.mc; if (_local2 == undefined) { _local2 = s._parent._parent[s._name]; } if (_local2 == undefined) { throw new Error("Bad clip in skin: " + s); } _local2.skin = s; if (index < NUM_BUTTONS) { setupSkinStates(_local2); } else { switch (index) { case PLAY_PAUSE_BUTTON : setupSkinStates(_local2.play_mc); setupSkinStates(_local2.pause_mc); break; case MUTE_BUTTON : setupSkinStates(_local2.on_mc); setupSkinStates(_local2.off_mc); break; case SEEK_BAR : case VOLUME_BAR : var _local4 = ((index == SEEK_BAR) ? "seekBar" : "volumeBar"); if (_local2.handle_mc == undefined) { _local2.handle_mc = _local2.skin.handle_mc; if (_local2.handle_mc == undefined) { _local2.handle_mc = _local2.skin._parent._parent[_local4 + "Handle_mc"]; } } if (_local2.progress_mc == undefined) { _local2.progress_mc = _local2.skin.progress_mc; if (_local2.progress_mc == undefined) { _local2.progress_mc = _local2.skin._parent._parent[_local4 + "Progress_mc"]; } } if (_local2.fullness_mc == undefined) { _local2.fullness_mc = _local2.skin.fullness_mc; if (_local2.fullness_mc == undefined) { _local2.fullness_mc = _local2.skin._parent._parent[_local4 + "Fullness_mc"]; } } break; case BUFFERING_BAR : if (_local2.fill_mc != undefined) { break; } _local2.fill_mc = _local2.skin.fill_mc; if (_local2.fill_mc != undefined) { break; } _local2.fill_mc = _local2.skin._parent._parent.bufferingBarFill_mc; } } setControl(index, _local2); } function setupSkinStates(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; } } } function skinButtonControl(ctrl) { if (ctrl.onEnterFrame != undefined) { delete ctrl.onEnterFrame; ctrl.onEnterFrame = undefined; } if (ctrl.enabled) { switch (ctrl.state) { case UP_STATE : if (ctrl.up_mc == undefined) { ctrl.up_mc = ctrl.attachMovie(ctrl.upLinkageID, "up_mc", ctrl.getNextHighestDepth()); } applySkinState(ctrl, ctrl.up_mc); break; case 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()); } } applySkinState(ctrl, ctrl.over_mc); break; case 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()); } } applySkinState(ctrl, ctrl.down_mc); } } else { ctrl.state = 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()); } } applySkinState(ctrl, ctrl.disabled_mc); } if (ctrl.placeholder_mc != undefined) { ctrl.placeholder_mc.unloadMovie(); delete ctrl.placeholder_mc; ctrl.placeholder_mc = undefined; } } function applySkinState(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; } } function addBarControl(controlIndex) { var _local2 = controls[controlIndex]; _local2.isDragging = false; _local2.percentage = 0; _local2.uiMgr = this; _local2.controlIndex = controlIndex; if (_local2._parent == skin_mc) { finishAddBarControl(controlIndex); } else { _local2.onEnterFrame = function () { this.uiMgr.finishAddBarControl(this.controlIndex); }; } } function finishAddBarControl(controlIndex) { var _local2 = controls[controlIndex]; delete _local2.onEnterFrame; _local2.onEnterFrame = undefined; if (_local2.addBarControl != undefined) { _local2.addBarControl(); } calcBarMargins(_local2, "handle", true); calcBarMargins(_local2, "progress", false); calcBarMargins(_local2.progress_mc, "fill", false); calcBarMargins(_local2.progress_mc, "mask", false); calcBarMargins(_local2, "fullness", false); calcBarMargins(_local2.fullness_mc, "fill", false); calcBarMargins(_local2.fullness_mc, "mask", false); _local2.origWidth = _local2._width; _local2.origHeight = _local2._height; fixUpBar(_local2, "progress"); if (_local2.progress_mc != undefined) { fixUpBar(_local2, "progressBarFill"); if (_progressPercent == undefined) { _progressPercent = (_vc.__get__isRTMP() ? 100 : 0); } positionBar(_local2, "progress", _progressPercent); } fixUpBar(_local2, "fullness"); if (_local2.fullness_mc != undefined) { fixUpBar(_local2, "fullnessBarFill"); } fixUpBar(_local2, "handle"); _local2.handle_mc.controlIndex = controlIndex; switch (controlIndex) { case SEEK_BAR : setControl(SEEK_BAR_HANDLE, _local2.handle_mc); break; case VOLUME_BAR : setControl(VOLUME_BAR_HANDLE, _local2.handle_mc); } positionHandle(controlIndex); } function fixUpBar(ctrl, type) { if ((ctrl[type + "LinkageID"] != undefined) && (ctrl[type + "LinkageID"].length > 0)) { var _local1; if (ctrl[type + "Below"]) { _local1 = -1; while (ctrl._parent.getInstanceAtDepth(_local1) != undefined) { _local1--; } } else { ctrl[type + "Below"] = false; _local1 = ctrl._parent.getNextHighestDepth(); } var _local5 = ((ctrl.controlIndex == SEEK_BAR) ? "seekBar" : "volumeBar"); var _local4 = ((_local5 + type.substring(0, 1).toUpperCase()) + type.substring(1)) + "_mc"; ctrl[type + "_mc"] = ctrl._parent.attachMovie(ctrl[type + "LinkageID"], _local4, _local1); } } function calcBarMargins(ctrl, type, symmetricMargins) { var _local2 = ctrl[type + "_mc"]; if (_local2 == undefined) { return(undefined); } if ((ctrl[type + "LeftMargin"] == undefined) && (_local2._parent == ctrl._parent)) { ctrl[type + "LeftMargin"] = _local2._x - ctrl._x; } if (ctrl[type + "RightMargin"] == undefined) { if (symmetricMargins) { ctrl[type + "RightMargin"] = ctrl[type + "LeftMargin"]; } else if (_local2._parent == ctrl._parent) { ctrl[type + "RightMargin"] = ((ctrl._width - _local2._width) - _local2._x) + ctrl._x; } } if ((ctrl[type + "TopMargin"] == undefined) && (_local2._parent == ctrl._parent)) { ctrl[type + "TopMargin"] = _local2._y - ctrl._y; } if (ctrl[type + "BottomMargin"] == undefined) { if (symmetricMargins) { ctrl[type + "BottomMargin"] = ctrl[type + "TopMargin"]; } else if (_local2._parent == ctrl._parent) { ctrl[type + "BottomMargin"] = ((ctrl._height - _local2._height) - _local2._y) + ctrl._y; } } if (ctrl[type + "X"] == undefined) { if (_local2._parent == ctrl._parent) { ctrl[type + "X"] = _local2._x - ctrl._x; } else if (_local2._parent == ctrl) { ctrl[type + "X"] = _local2._x; } } if (ctrl[type + "Y"] == undefined) { if (_local2._parent == ctrl._parent) { ctrl[type + "Y"] = _local2._y - ctrl._y; } else if (_local2._parent == ctrl) { ctrl[type + "Y"] = _local2._y; } } ctrl[type + "XScale"] = _local2._xscale; ctrl[type + "YScale"] = _local2._yscale; ctrl[type + "Width"] = _local2._width; ctrl[type + "Height"] = _local2._height; } function finishAddBufferingBar() { var _local2 = controls[BUFFERING_BAR]; delete _local2.onEnterFrame; _local2.onEnterFrame = undefined; calcBarMargins(_local2, "fill", true); fixUpBar(_local2, "fill"); if (_local2.fill_mc != undefined) { positionMaskedFill(_local2, _local2.fill_mc, 100); } } function positionMaskedFill(ctrl, fill, percent) { var _local5 = fill._parent; var _local3 = ctrl.mask_mc; if (_local3 == undefined) { _local3 = _local5.createEmptyMovieClip(ctrl._name + "Mask_mc", _local5.getNextHighestDepth()); ctrl.mask_mc = _local3; _local3.beginFill(16777215); _local3.lineTo(0, 0); _local3.lineTo(1, 0); _local3.lineTo(1, 1); _local3.lineTo(0, 1); _local3.lineTo(0, 0); _local3.endFill(); fill.setMask(_local3); _local3._x = ctrl.fillX; _local3._y = ctrl.fillY; _local3._width = ctrl.fillWidth; _local3._height = ctrl.fillHeight; _local3._visible = false; calcBarMargins(ctrl, "mask", true); } if (_local5 == ctrl) { if (fill.slideReveal) { fill._x = (ctrl.maskX - ctrl.fillWidth) + ((ctrl.fillWidth * percent) / 100); } else { _local3._width = (ctrl.fillWidth * percent) / 100; } } else if (_local5 == ctrl._parent) { if (fill.slideReveal) { _local3._x = ctrl._x + ctrl.maskLeftMargin; _local3._y = ctrl._y + ctrl.maskTopMargin; _local3._width = (ctrl._width - ctrl.maskRightMargin) - ctrl.maskLeftMargin; _local3._height = (ctrl._height - ctrl.maskTopMargin) - ctrl.maskBottomMargin; fill._x = (_local3._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; _local3._x = fill._x; _local3._y = fill._y; _local3._width = (((ctrl._width - ctrl.fillRightMargin) - ctrl.fillLeftMargin) * percent) / 100; _local3._height = (ctrl._height - ctrl.fillTopMargin) - ctrl.fillBottomMargin; } } } function startHandleDrag(controlIndex) { var _local2 = controls[controlIndex]; var _local5 = _local2.handle_mc; if ((_local2.startHandleDrag == undefined) || (!_local2.startHandleDrag())) { var _local3 = _local2._y + _local2.handleY; var _local4 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth)); _local5.startDrag(false, _local2._x + _local2.handleLeftMargin, _local3, (_local2._x + _local4) - _local2.handleRightMargin, _local3); } _local2.isDragging = true; } function stopHandleDrag(controlIndex) { var _local2 = controls[controlIndex]; var _local3 = _local2.handle_mc; if ((_local2.stopHandleDrag == undefined) || (!_local2.stopHandleDrag())) { _local3.stopDrag(); } _local2.isDragging = false; } function positionHandle(controlIndex) { var _local2 = controls[controlIndex]; var _local3 = _local2.handle_mc; if (_local3 == undefined) { return(undefined); } if ((_local2.positionHandle != undefined) && (_local2.positionHandle())) { return(undefined); } var _local4 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth)); var _local5 = (_local4 - _local2.handleRightMargin) - _local2.handleLeftMargin; _local3._x = (_local2._x + _local2.handleLeftMargin) + ((_local5 * _local2.percentage) / 100); _local3._y = _local2._y + _local2.handleY; if (_local2.fullness_mc != undefined) { positionBar(_local2, "fullness", _local2.percentage); } } function positionBar(ctrl, type, percent) { if ((ctrl.positionBar != undefined) && (ctrl.positionBar(type, percent))) { return(undefined); } var _local2 = ctrl[type + "_mc"]; if (_local2._parent == ctrl) { if (_local2.fill_mc == undefined) { _local2._xscale = (ctrl[type + "XScale"] * percent) / 100; } else { positionMaskedFill(_local2, _local2.fill_mc, percent); } } else { _local2._x = ctrl._x + ctrl[type + "LeftMargin"]; _local2._y = ctrl._y + ctrl[type + "Y"]; if (_local2.fill_mc == undefined) { _local2._width = (((ctrl._width - ctrl[type + "LeftMargin"]) - ctrl[type + "RightMargin"]) * percent) / 100; } else { positionMaskedFill(_local2, _local2.fill_mc, percent); } } } function calcPercentageFromHandle(controlIndex) { var _local2 = controls[controlIndex]; var _local5 = _local2.handle_mc; if ((_local2.calcPercentageFromHandle == undefined) || (!_local2.calcPercentageFromHandle())) { var _local3 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth)); var _local6 = (_local3 - _local2.handleRightMargin) - _local2.handleLeftMargin; var _local4 = _local5._x - (_local2._x + _local2.handleLeftMargin); _local2.percentage = (_local4 / _local6) * 100; if (_local2.fullness_mc != undefined) { positionBar(_local2, "fullness", _local2.percentage); } } if (_local2.percentage < 0) { _local2.percentage = 0; } if (_local2.percentage > 100) { _local2.percentage = 100; } } function handleRelease(controlIndex) { var _local3 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); if (controlIndex == SEEK_BAR) { seekBarListener(true); } else if (controlIndex == VOLUME_BAR) { volumeBarListener(true); } stopHandleDrag(controlIndex); _vc.__set__activeVideoPlayerIndex(_local3); if (controlIndex == SEEK_BAR) { _vc._scrubFinish(); } } function seekBarListener(finish) { var _local3 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); var _local4 = controls[SEEK_BAR]; calcPercentageFromHandle(SEEK_BAR); var _local2 = _local4.percentage; if (finish) { clearInterval(_seekBarIntervalID); _seekBarIntervalID = 0; if (_local2 != _lastScrubPos) { _vc.seekPercent(_local2); } _vc.addEventListener("playheadUpdate", this); if (_playAfterScrub) { _vc.play(); } } else if (_vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex()).__get__state() == mx.video.VideoPlayer.SEEKING) { } else if ((((_seekBarScrubTolerance <= 0) || (Math.abs(_local2 - _lastScrubPos) > _seekBarScrubTolerance)) || (_local2 < _seekBarScrubTolerance)) || (_local2 > (100 - _seekBarScrubTolerance))) { if (_local2 != _lastScrubPos) { _lastScrubPos = _local2; _vc.seekPercent(_local2); } } _vc.__set__activeVideoPlayerIndex(_local3); } function volumeBarListener(finish) { var _local3 = controls[VOLUME_BAR]; calcPercentageFromHandle(VOLUME_BAR); var _local2 = _local3.percentage; if (finish) { clearInterval(_volumeBarIntervalID); _volumeBarIntervalID = 0; _vc.addEventListener("volumeUpdate", this); } if ((((finish || (_volumeBarScrubTolerance <= 0)) || (Math.abs(_local2 - _lastVolumePos) > _volumeBarScrubTolerance)) || (_local2 < _volumeBarScrubTolerance)) || (_local2 > (100 - _volumeBarScrubTolerance))) { if (_local2 != _lastVolumePos) { if (_isMuted) { cachedSoundLevel = _local2; } else { _vc.__set__volume(_local2); } _lastVolumePos = _local2; } } } function doBufferingDelay() { clearInterval(_bufferingDelayIntervalID); _bufferingDelayIntervalID = 0; var _local2 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); if (_vc.__get__state() == mx.video.FLVPlayback.BUFFERING) { _bufferingOn = true; handleEvent({type:"stateChange", state:mx.video.FLVPlayback.BUFFERING, vp:_vc.__get__visibleVideoPlayerIndex()}); } _vc.__set__activeVideoPlayerIndex(_local2); } function dispatchMessage(ctrl) { if (ctrl.id == SEEK_BAR_HANDLE) { _vc._scrubStart(); } var _local2 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); switch (ctrl.id) { case PAUSE_BUTTON : _vc.pause(); break; case PLAY_BUTTON : _vc.play(); break; case STOP_BUTTON : _vc.stop(); break; case SEEK_BAR_HANDLE : calcPercentageFromHandle(SEEK_BAR); _lastScrubPos = controls[SEEK_BAR].percentage; _vc.removeEventListener("playheadUpdate", this); if (_vc.__get__playing() || (_vc.__get__buffering())) { _playAfterScrub = true; } else if (_vc.__get__state() != mx.video.VideoPlayer.SEEKING) { _playAfterScrub = false; } _seekBarIntervalID = setInterval(this, "seekBarListener", _seekBarInterval, false); startHandleDrag(SEEK_BAR); _vc.pause(); break; case VOLUME_BAR_HANDLE : calcPercentageFromHandle(VOLUME_BAR); _lastVolumePos = controls[VOLUME_BAR].percentage; _vc.removeEventListener("volumeUpdate", this); _volumeBarIntervalID = setInterval(this, "volumeBarListener", _volumeBarInterval, false); startHandleDrag(VOLUME_BAR); break; case BACK_BUTTON : _vc.seekToPrevNavCuePoint(); break; case FORWARD_BUTTON : _vc.seekToNextNavCuePoint(); break; case MUTE_ON_BUTTON : case MUTE_OFF_BUTTON : if (!_isMuted) { _isMuted = true; cachedSoundLevel = _vc.volume; _vc.__set__volume(0); } else { _isMuted = false; _vc.__set__volume(cachedSoundLevel); } setEnabledAndVisibleForState(MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING); skinButtonControl(controls[MUTE_OFF_BUTTON]); setEnabledAndVisibleForState(MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING); skinButtonControl(controls[MUTE_ON_BUTTON]); break; default : throw new Error("Unknown ButtonControl"); } _vc.__set__activeVideoPlayerIndex(_local2); } function setEnabledAndVisibleForState(index, state) { var _local5 = _vc.__get__activeVideoPlayerIndex(); _vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex); var _local3 = state; if ((_local3 == mx.video.FLVPlayback.BUFFERING) && (!_bufferingOn)) { _local3 = mx.video.FLVPlayback.PLAYING; } switch (index) { case VOLUME_BAR : case VOLUME_BAR_HANDLE : controls[index].myEnabled = true; controls[index].enabled = _controlsEnabled; break; case MUTE_ON_BUTTON : controls[index].myEnabled = !_isMuted; if (controls[MUTE_BUTTON] != undefined) { controls[index]._visible = controls[index].myEnabled; } break; case MUTE_OFF_BUTTON : controls[index].myEnabled = _isMuted; if (controls[MUTE_BUTTON] != undefined) { controls[index]._visible = controls[index].myEnabled; } break; default : switch (_local3) { case mx.video.FLVPlayback.LOADING : case mx.video.FLVPlayback.CONNECTION_ERROR : controls[index].myEnabled = false; break; case mx.video.FLVPlayback.DISCONNECTED : controls[index].myEnabled = _vc.__get__contentPath() != undefined; break; case mx.video.FLVPlayback.SEEKING : break; default : controls[index].myEnabled = true; } } switch (index) { case SEEK_BAR : switch (_local3) { 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 : controls[index].myEnabled = true; break; case mx.video.FLVPlayback.BUFFERING : controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined); break; default : controls[index].myEnabled = false; } if (controls[index].myEnabled) { controls[index].myEnabled = (!isNaN(_vc.__get__totalTime())) && (_vc.__get__totalTime() > 0); } controls[index].handle_mc.myEnabled = controls[index].myEnabled; controls[index].handle_mc.enabled = controls[index].handle_mc.myEnabled; controls[index].handle_mc._visible = controls[index].myEnabled; var _local4 = (((!_bufferingBarHides) || (controls[index].myEnabled)) || (controls[BUFFERING_BAR] == undefined)) || (!controls[BUFFERING_BAR]._visible); controls[index]._visible = _local4; controls[index].progress_mc._visible = _local4; controls[index].progress_mc.fill_mc._visible = _local4; controls[index].fullness_mc._visible = _local4; controls[index].fullness_mc.fill_mc._visible = _local4; break; case BUFFERING_BAR : switch (_local3) { 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 : controls[index].myEnabled = false; break; default : controls[index].myEnabled = true; } controls[index]._visible = controls[index].myEnabled; controls[index].fill_mc._visible = controls[index].myEnabled; break; case PAUSE_BUTTON : switch (_local3) { case mx.video.FLVPlayback.DISCONNECTED : case mx.video.FLVPlayback.STOPPED : case mx.video.FLVPlayback.PAUSED : case mx.video.FLVPlayback.REWINDING : controls[index].myEnabled = false; break; case mx.video.FLVPlayback.PLAYING : controls[index].myEnabled = true; break; case mx.video.FLVPlayback.BUFFERING : controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined); } if (controls[PLAY_PAUSE_BUTTON] != undefined) { controls[index]._visible = controls[index].myEnabled; } break; case PLAY_BUTTON : switch (_local3) { case mx.video.FLVPlayback.PLAYING : controls[index].myEnabled = false; break; case mx.video.FLVPlayback.STOPPED : case mx.video.FLVPlayback.PAUSED : controls[index].myEnabled = true; break; case mx.video.FLVPlayback.BUFFERING : controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined); } if (controls[PLAY_PAUSE_BUTTON] != undefined) { controls[index]._visible = !controls[PAUSE_BUTTON]._visible; } break; case STOP_BUTTON : switch (_local3) { case mx.video.FLVPlayback.DISCONNECTED : case mx.video.FLVPlayback.STOPPED : controls[index].myEnabled = false; break; case mx.video.FLVPlayback.PAUSED : case mx.video.FLVPlayback.PLAYING : case mx.video.FLVPlayback.BUFFERING : controls[index].myEnabled = true; } break; case BACK_BUTTON : case FORWARD_BUTTON : if (!(_local3 === mx.video.FLVPlayback.BUFFERING)) { } else { controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined); } } controls[index].enabled = _controlsEnabled && (controls[index].myEnabled); _vc.__set__activeVideoPlayerIndex(_local5); } function setupSkinAutoHide() { if (_skinAutoHide && (skin_mc != undefined)) { skinAutoHideHitTest(); if (_skinAutoHideIntervalID == 0) { _skinAutoHideIntervalID = setInterval(this, "skinAutoHideHitTest", SKIN_AUTO_HIDE_INTERVAL); } } else { skin_mc._visible = __visible; clearInterval(_skinAutoHideIntervalID); _skinAutoHideIntervalID = 0; } } function skinAutoHideHitTest() { if (!__visible) { skin_mc._visible = false; } else { var _local4 = _vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex()); var _local3 = _local4.hitTest(_root._xmouse, _root._ymouse, true); if ((!_local3) && (border_mc != undefined)) { _local3 = border_mc.hitTest(_root._xmouse, _root._ymouse, true); } skin_mc._visible = _local3; } } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; static var PAUSE_BUTTON = 0; static var PLAY_BUTTON = 1; static var STOP_BUTTON = 2; static var SEEK_BAR_HANDLE = 3; static var BACK_BUTTON = 4; static var FORWARD_BUTTON = 5; static var MUTE_ON_BUTTON = 6; static var MUTE_OFF_BUTTON = 7; static var VOLUME_BAR_HANDLE = 8; static var NUM_BUTTONS = 9; static var PLAY_PAUSE_BUTTON = 9; static var MUTE_BUTTON = 10; static var BUFFERING_BAR = 11; static var SEEK_BAR = 12; static var VOLUME_BAR = 13; static var NUM_CONTROLS = 14; static var UP_STATE = 0; static var OVER_STATE = 1; static var DOWN_STATE = 2; static var SKIN_AUTO_HIDE_INTERVAL = 200; static var VOLUME_BAR_INTERVAL_DEFAULT = 250; static var VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT = 0; static var SEEK_BAR_INTERVAL_DEFAULT = 250; static var SEEK_BAR_SCRUB_TOLERANCE_DEFAULT = 5; static var BUFFERING_DELAY_INTERVAL_DEFAULT = 1000; }
Symbol 20 MovieClip [__Packages.mx.video.SMILManager] Frame 0
class mx.video.SMILManager { var _owner, _url, xml, baseURLAttr, videoTags, width, height; function SMILManager (owner) { _owner = owner; } function connectXML(url) { _url = fixURL(url); xml = new XML(); xml.onLoad = mx.utils.Delegate.create(this, xmlOnLoad); xml.load(_url); return(false); } function fixURL(origURL) { if ((origURL.substr(0, 5).toLowerCase() == "http:") || (origURL.substr(0, 6).toLowerCase() == "https:")) { var _local2 = ((origURL.indexOf("?") >= 0) ? "&" : "?"); return(((origURL + _local2) + "FLVPlaybackVersion=") + shortVersion); } return(origURL); } function xmlOnLoad(success) { try { if (!success) { _owner.helperDone(this, false); } else { baseURLAttr = new Array(); videoTags = new Array(); var _local2 = xml.firstChild; var _local6 = false; while (_local2 != null) { if (_local2.nodeType == ELEMENT_NODE) { _local6 = true; if (_local2.nodeName.toLowerCase() == "smil") { break; } } _local2 = _local2.nextSibling; } if (!_local6) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" No root node found; if url is for an flv it must have .flv extension and take no parameters"); } else if (_local2 == null) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Root node not smil"); } var _local5 = false; var _local4 = 0; while (_local4 < _local2.childNodes.length) { var _local3 = _local2.childNodes[_local4]; if (_local3.nodeType != ELEMENT_NODE) { } else if (_local3.nodeName.toLowerCase() == "head") { parseHead(_local3); } else if (_local3.nodeName.toLowerCase() == "body") { _local5 = true; parseBody(_local3); } else { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((((("URL: \"" + _url) + "\" Tag ") + _local3.nodeName) + " not supported in ") + _local2.nodeName) + " tag."); } _local4++; } if (!_local5) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Tag body is required."); } _owner.helperDone(this, true); } } catch(err:Error) { _owner.helperDone(this, false); throw err; } } function parseHead(parentNode) { var _local4 = false; var _local3 = 0; while (_local3 < parentNode.childNodes.length) { var _local2 = parentNode.childNodes[_local3]; if (_local2.nodeType != ELEMENT_NODE) { } else if (_local2.nodeName.toLowerCase() == "meta") { for (var _local6 in _local2.attributes) { if (_local6.toLowerCase() == "base") { baseURLAttr.push(_local2.attributes[_local6]); } else { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((((("URL: \"" + _url) + "\" Attribute ") + _local6) + " not supported in ") + _local2.nodeName) + " tag."); } } } else if (_local2.nodeName.toLowerCase() == "layout") { if (!_local4) { parseLayout(_local2); _local4 = true; } } _local3++; } } function parseLayout(parentNode) { var _local3 = 0; while (_local3 < parentNode.childNodes.length) { var _local2 = parentNode.childNodes[_local3]; if (_local2.nodeType != ELEMENT_NODE) { } else if (_local2.nodeName.toLowerCase() == "root-layout") { for (var _local5 in _local2.attributes) { if (_local5.toLowerCase() == "width") { width = Number(_local2.attributes[_local5]); } else if (_local5.toLowerCase() == "height") { height = Number(_local2.attributes[_local5]); } } if (((isNaN(width) || (width < 0)) || (isNaN(height))) || (height < 0)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Tag ") + _local2.nodeName) + " requires attributes id, width and height. Width and height must be numbers greater than or equal to 0."); } width = Math.round(width); height = Math.round(height); return(undefined); } _local3++; } } function parseBody(parentNode) { var _local6 = 0; var _local3 = 0; while (_local3 < parentNode.childNodes.length) { var _local2 = parentNode.childNodes[_local3]; if (_local2.nodeType != ELEMENT_NODE) { } else { _local6++; if (_local6 > 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Tag ") + parentNode.nodeName) + " is required to contain exactly one tag."); } if (_local2.nodeName.toLowerCase() == "switch") { parseSwitch(_local2); } else if ((_local2.nodeName.toLowerCase() == "video") || (_local2.nodeName.toLowerCase() == "ref")) { var _local5 = parseVideo(_local2); videoTags.push(_local5); } } _local3++; } if (videoTags.length < 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" At least one video of ref tag is required."); } } function parseSwitch(parentNode) { var _local3 = 0; while (_local3 < parentNode.childNodes.length) { var _local2 = parentNode.childNodes[_local3]; if (_local2.nodeType != ELEMENT_NODE) { } else if ((_local2.nodeName.toLowerCase() == "video") || (_local2.nodeName.toLowerCase() == "ref")) { videoTags.push(parseVideo(_local2)); } _local3++; } } function parseVideo(node) { var _local3 = new Object(); for (var _local4 in node.attributes) { if (_local4.toLowerCase() == "src") { _local3.src = node.attributes[_local4]; } else if (_local4.toLowerCase() == "system-bitrate") { _local3.bitrate = Number(node.attributes[_local4]); } else if (_local4.toLowerCase() == "dur") { _local3.dur = parseTime(node.attributes[_local4]); } } if (_local3.src == undefined) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Attribute src is required in ") + node.nodeName) + " tag."); } return(_local3); } function parseTime(timeStr) { var _local4 = 0; var _local3 = timeStr.split(":"); if ((_local3.length < 1) || (_local3.length > 3)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Invalid dur value: " + timeStr); } var _local1 = 0; while (_local1 < _local3.length) { var _local2 = Number(_local3[_local1]); if (isNaN(_local2)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Invalid dur value: " + timeStr); } _local4 = _local4 * 60; _local4 = _local4 + _local2; _local1++; } return(_local4); } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; static var ELEMENT_NODE = 1; }
Symbol 21 MovieClip [__Packages.mx.video.FPADManager] Frame 0
class mx.video.FPADManager { var _owner, _uriParam, _parseResults, _url, xml, rtmpURL; function FPADManager (owner) { _owner = owner; } function connectXML(urlPrefix, uriParam, urlSuffix, uriParamParseResults) { _uriParam = uriParam; _parseResults = uriParamParseResults; _url = (urlPrefix + "uri=") + _parseResults.protocol; if (_parseResults.serverName != undefined) { _url = _url + ("/" + _parseResults.serverName); } if (_parseResults.portNumber != undefined) { _url = _url + (":" + _parseResults.portNumber); } if (_parseResults.wrappedURL != undefined) { _url = _url + ("/?" + _parseResults.wrappedURL); } _url = _url + ("/" + _parseResults.appName); _url = _url + urlSuffix; xml = new XML(); xml.onLoad = mx.utils.Delegate.create(this, xmlOnLoad); xml.load(_url); return(false); } function xmlOnLoad(success) { try { if (!success) { _owner.helperDone(this, false); } else { var _local5 = xml.firstChild; var _local8 = false; while (_local5 != null) { if (_local5.nodeType == ELEMENT_NODE) { _local8 = true; if (_local5.nodeName.toLowerCase() == "fpad") { break; } } _local5 = _local5.nextSibling; } if (!_local8) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" No root node found; if url is for an flv it must have .flv extension and take no parameters"); } else if (_local5 == null) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Root node not fpad"); } var _local7; var _local6 = 0; while (_local6 < _local5.childNodes.length) { var _local3 = _local5.childNodes[_local6]; if (_local3.nodeType != ELEMENT_NODE) { } else if (_local3.nodeName.toLowerCase() == "proxy") { var _local2 = 0; while (_local2 < _local3.childNodes.length) { var _local4 = _local3.childNodes[_local2]; if (_local4.nodeType == TEXT_NODE) { _local7 = trim(_local4.nodeValue); break; } _local2++; } break; } _local6++; } if ((_local7 == undefined) || (_local7 == "")) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" fpad xml requires proxy tag."); } rtmpURL = (((_parseResults.protocol + "/") + _local7) + "/?") + _uriParam; _owner.helperDone(this, true); } } catch(err:Error) { _owner.helperDone(this, false); throw err; } } function trim(str) { var _local2 = 0; while (_local2 < str.length) { var _local1 = str.charAt(_local2); if ((((_local1 != " ") && (_local1 != "\t")) && (_local1 != "\r")) && (_local1 != newline)) { break; } _local2++; } if (_local2 >= str.length) { return(""); } var _local4 = str.length - 1; while (_local4 > _local2) { var _local1 = str.charAt(_local4); if ((((_local1 != " ") && (_local1 != "\t")) && (_local1 != "\r")) && (_local1 != newline)) { break; } _local4--; } return(str.slice(_local2, _local4 + 1)); } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; static var ELEMENT_NODE = 1; static var TEXT_NODE = 3; }
Symbol 22 MovieClip [__Packages.mx.video.NCManager] Frame 0
class mx.video.NCManager implements mx.video.INCManager { var _timeoutIntervalId, _tryNCIntervalId, _timeout, _nc, _ncConnected, _isRTMP, _serverName, _wrappedURL, _portNumber, _appName, _contentPath, _streamName, _streamLength, _streamWidth, _streamHeight, _streams, _autoSenseBW, fpadZone, _payload, _connTypeCounter, _bitrate, _owner, _protocol, _smilMgr, _ncUri, _fpadMgr, fallbackServerName, _tryNC; function NCManager () { initNCInfo(); initOtherInfo(); _timeoutIntervalId = 0; _tryNCIntervalId = 0; _timeout = DEFAULT_TIMEOUT; _nc = undefined; _ncConnected = false; } function initNCInfo() { _isRTMP = undefined; _serverName = undefined; _wrappedURL = undefined; _portNumber = undefined; _appName = undefined; } function initOtherInfo() { _contentPath = undefined; _streamName = undefined; _streamLength = undefined; _streamWidth = undefined; _streamHeight = undefined; _streams = undefined; _autoSenseBW = false; fpadZone = undefined; _payload = 0; _connTypeCounter = 0; cleanConns(); } function getTimeout() { return(_timeout); } function setTimeout(t) { _timeout = t; if (_timeoutIntervalId != 0) { clearInterval(_timeoutIntervalId); _timeoutIntervalId = setInterval(this, "_onFCSConnectTimeOut", _timeout); } } function getBitrate() { return(_bitrate); } function setBitrate(b) { if ((_isRTMP == undefined) || (!_isRTMP)) { _bitrate = b; } } function getVideoPlayer() { return(_owner); } function setVideoPlayer(v) { _owner = v; } function getNetConnection() { return(_nc); } function getStreamName() { return(_streamName); } function isRTMP() { return(_isRTMP); } function getStreamLength() { return(_streamLength); } function getStreamWidth() { return(_streamWidth); } function getStreamHeight() { return(_streamHeight); } function connectToURL(url) { initOtherInfo(); _contentPath = url; if ((_contentPath == null) || (_contentPath == "")) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH); } var _local2 = parseURL(_contentPath); if ((_local2.streamName == undefined) || (_local2.streamName == "")) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url); } if (_local2.isRTMP) { var _local3 = canReuseOldConnection(_local2); _isRTMP = true; _protocol = _local2.protocol; _streamName = _local2.streamName; _serverName = _local2.serverName; _wrappedURL = _local2.wrappedURL; _portNumber = _local2.portNumber; _appName = _local2.appName; if ((((_appName == undefined) || (_appName == "")) || (_streamName == undefined)) || (_streamName == "")) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url); } _autoSenseBW = _streamName.indexOf(",") >= 0; return(_local3 || (connectRTMP())); } if ((_local2.streamName.indexOf("?") < 0) && (_local2.streamName.slice(-4).toLowerCase() == ".flv")) { var _local3 = canReuseOldConnection(_local2); _isRTMP = false; _streamName = _local2.streamName; return(_local3 || (connectHTTP())); } if (_local2.streamName.indexOf("/fms/fpad") >= 0) { try { return(connectFPAD(_local2.streamName)); } catch(err:Error) { } } _smilMgr = new mx.video.SMILManager(this); return(_smilMgr.connectXML(_local2.streamName)); } function connectAgain() { var _local2 = _appName.indexOf("/"); if (_local2 < 0) { _local2 = _streamName.indexOf("/"); if (_local2 >= 0) { _appName = _appName + "/"; _appName = _appName + _streamName.slice(0, _local2); _streamName = _streamName.slice(_local2 + 1); } return(false); } var _local3 = _appName.slice(_local2 + 1); _local3 = _local3 + "/"; _local3 = _local3 + _streamName; _streamName = _local3; _appName = _appName.slice(0, _local2); close(); _payload = 0; _connTypeCounter = 0; cleanConns(); connectRTMP(); return(true); } function reconnect() { if (!_isRTMP) { throw new Error("Cannot call reconnect on an http connection"); } _nc.onStatus = function (info) { this.mc.reconnectOnStatus(this, info); }; _nc.onBWDone = function () { this.mc.onReconnected(); }; _nc.connect(_ncUri, false); } function onReconnected() { delete _nc.onStatus; delete _nc.onBWDone; _ncConnected = true; _owner.ncReconnected(); } function close() { if (_nc) { _nc.close(); _ncConnected = false; } } function helperDone(helper, success) { if (!success) { _nc = undefined; _ncConnected = false; _owner.ncConnected(); _smilMgr = undefined; _fpadMgr = undefined; return(undefined); } var _local2; var _local4; if (helper == _fpadMgr) { _local4 = _fpadMgr.rtmpURL; _fpadMgr = undefined; _local2 = parseURL(_local4); _isRTMP = _local2.isRTMP; _protocol = _local2.protocol; _serverName = _local2.serverName; _portNumber = _local2.portNumber; _wrappedURL = _local2.wrappedURL; _appName = _local2.appName; _streamName = _local2.streamName; var _local5 = fpadZone; fpadZone = -1; connectRTMP(); fpadZone = _local5; return(undefined); } if (helper != _smilMgr) { return(undefined); } _streamWidth = _smilMgr.width; _streamHeight = _smilMgr.height; _local4 = _smilMgr.baseURLAttr[0]; if ((_local4 != undefined) && (_local4 != "")) { if (_local4.charAt(_local4.length - 1) != "/") { _local4 = _local4 + "/"; } _local2 = parseURL(_local4); _isRTMP = _local2.isRTMP; _streamName = _local2.streamName; if (_isRTMP) { _protocol = _local2.protocol; _serverName = _local2.serverName; _portNumber = _local2.portNumber; _wrappedURL = _local2.wrappedURL; _appName = _local2.appName; if ((_appName == undefined) || (_appName == "")) { _smilMgr = undefined; throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Base RTMP URL must include application name: " + _local4); } if (_smilMgr.baseURLAttr.length > 1) { _local2 = parseURL(_smilMgr.baseURLAttr[1]); if (_local2.serverName != undefined) { fallbackServerName = _local2.serverName; } } } } _streams = _smilMgr.videoTags; _smilMgr = undefined; var _local3 = 0; while (_local3 < _streams.length) { _local4 = _streams[_local3].src; _local2 = parseURL(_local4); if (_isRTMP == undefined) { _isRTMP = _local2.isRTMP; if (_isRTMP) { _protocol = _local2.protocol; if (_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."); } _serverName = _local2.serverName; _portNumber = _local2.portNumber; _wrappedURL = _local2.wrappedURL; _appName = _local2.appName; if ((_appName == undefined) || (_appName == "")) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Base RTMP URL must include application name: " + _local4); } } else if ((_local2.streamName.indexOf("/fms/fpad") >= 0) && (_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 ((((_streamName != undefined) && (_streamName != "")) && (!_local2.isRelative)) && (_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."); } _streams[_local3].parseResults = _local2; _local3++; } _autoSenseBW = _streams.length > 1; if (!_autoSenseBW) { if (_streamName != undefined) { _streamName = _streamName + _streams[0].parseResults.streamName; } else { _streamName = _streams[0].parseResults.streamName; } _streamLength = _streams[0].dur; } if (_isRTMP) { connectRTMP(); } else if ((_streamName != undefined) && (_streamName.indexOf("/fms/fpad") >= 0)) { connectFPAD(_streamName); } else { if (_autoSenseBW) { bitrateMatch(); } connectHTTP(); _owner.ncConnected(); } } function bitrateMatch() { var _local3; var _local4 = _bitrate; if (isNaN(_local4)) { _local4 = 0; } var _local2 = 0; while (_local2 < _streams.length) { if (isNaN(_streams[_local2].bitrate) || (_local4 >= _streams[_local2].bitrate)) { _local3 = _local2; break; } _local2++; } if (isNaN(_local3)) { throw new mx.video.VideoError(mx.video.VideoError.NO_BITRATE_MATCH); } if (_streamName != undefined) { _streamName = _streamName + _streams[_local3].src; } else { _streamName = _streams[_local3].src; } _streamLength = _streams[_local3].dur; } function parseURL(url) { var _local2 = new Object(); var _local3 = 0; var _local4 = url.indexOf(":/", _local3); if (_local4 >= 0) { _local4 = _local4 + 2; _local2.protocol = url.slice(_local3, _local4); _local2.isRelative = false; } else { _local2.isRelative = true; } if ((_local2.protocol != undefined) && (((_local2.protocol == "rtmp:/") || (_local2.protocol == "rtmpt:/")) || (_local2.protocol == "rtmps:/"))) { _local2.isRTMP = true; _local3 = _local4; if (url.charAt(_local3) == "/") { _local3++; var _local7 = url.indexOf(":", _local3); var _local8 = url.indexOf("/", _local3); if (_local8 < 0) { if (_local7 < 0) { _local2.serverName = url.slice(_local3); } else { _local4 = _local7; _local2.portNumber = url.slice(_local3, _local4); _local3 = _local4 + 1; _local2.serverName = url.slice(_local3); } return(_local2); } if ((_local7 >= 0) && (_local7 < _local8)) { _local4 = _local7; _local2.serverName = url.slice(_local3, _local4); _local3 = _local4 + 1; _local4 = _local8; _local2.portNumber = url.slice(_local3, _local4); } else { _local4 = _local8; _local2.serverName = url.slice(_local3, _local4); } _local3 = _local4 + 1; } if (url.charAt(_local3) == "?") { var _local9 = url.slice(_local3 + 1); var _local6 = parseURL(_local9); if ((_local6.protocol == undefined) || (!_local6.isRTMP)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url); } _local2.wrappedURL = "?"; _local2.wrappedURL = _local2.wrappedURL + _local6.protocol; if (_local6.serverName != undefined) { _local2.wrappedURL = _local2.wrappedURL + "/"; _local2.wrappedURL = _local2.wrappedURL + _local6.serverName; } if (_local6.wrappedURL != undefined) { _local2.wrappedURL = _local2.wrappedURL + "/?"; _local2.wrappedURL = _local2.wrappedURL + _local6.wrappedURL; } _local2.appName = _local6.appName; _local2.streamName = _local6.streamName; return(_local2); } _local4 = url.indexOf("/", _local3); if (_local4 < 0) { _local2.appName = url.slice(_local3); return(_local2); } _local2.appName = url.slice(_local3, _local4); _local3 = _local4 + 1; _local4 = url.indexOf("/", _local3); if (_local4 < 0) { _local2.streamName = url.slice(_local3); if (_local2.streamName.slice(-4).toLowerCase() == ".flv") { _local2.streamName = _local2.streamName.slice(0, -4); } return(_local2); } _local2.appName = _local2.appName + "/"; _local2.appName = _local2.appName + url.slice(_local3, _local4); _local3 = _local4 + 1; _local2.streamName = url.slice(_local3); if (_local2.streamName.slice(-4).toLowerCase() == ".flv") { _local2.streamName = _local2.streamName.slice(0, -4); } } else { _local2.isRTMP = false; _local2.streamName = url; } return(_local2); } function canReuseOldConnection(parseResults) { if ((_nc == null) || (!_ncConnected)) { return(false); } if (!parseResults.isRTMP) { if (!_isRTMP) { return(true); } _owner.close(); _nc = undefined; _ncConnected = false; initNCInfo(); return(false); } if (_isRTMP) { if (((((parseResults.serverName == _serverName) && (parseResults.appName == _appName)) && (parseResults.protocol == _protocol)) && (parseResults.portNumber == _portNumber)) && (parseResults.wrappedURL == _wrappedURL)) { return(true); } _owner.close(); _nc = undefined; _ncConnected = false; } initNCInfo(); return(false); } function connectHTTP() { _nc = new NetConnection(); _nc.connect(null); _ncConnected = true; return(true); } function connectRTMP() { clearInterval(_timeoutIntervalId); _timeoutIntervalId = setInterval(this, "_onFCSConnectTimeOut", _timeout); _tryNC = new Array(); var _local2 = 0; while (_local2 < RTMP_CONN.length) { _tryNC[_local2] = new NetConnection(); if (fpadZone != null) { _tryNC[_local2].fpadZone = fpadZone; } _tryNC[_local2].mc = this; _tryNC[_local2].pending = false; _tryNC[_local2].connIndex = _local2; _tryNC[_local2].onBWDone = function (p_bw) { this.mc.onConnected(this, p_bw); }; _tryNC[_local2].onBWCheck = function () { return(++this.mc._payload); }; _tryNC[_local2].onStatus = function (info) { this.mc.connectOnStatus(this, info); }; _local2++; } nextConnect(); return(false); } function connectFPAD(url) { var _local7; var _local5; var _local6; var _local2 = url.indexOf("?"); while (_local2 >= 0) { _local2++; var _local4 = url.indexOf("&", _local2); if (url.substr(_local2, 4).toLowerCase() == "uri=") { _local7 = url.slice(0, _local2); _local2 = _local2 + 4; if (_local4 >= 0) { _local5 = url.slice(_local2, _local4); _local6 = url.slice(_local4); } else { _local5 = url.slice(_local2); _local6 = ""; } break; } _local2 = _local4; } if (_local2 < 0) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, "fpad url must include uri parameter: " + url); } var _local8 = parseURL(_local5); if (!_local8.isRTMP) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, "fpad url uri parameter must be rtmp url: " + url); } _fpadMgr = new mx.video.FPADManager(this); return(_fpadMgr.connectXML(_local7, _local5, _local6, _local8)); } function nextConnect() { clearInterval(_tryNCIntervalId); _tryNCIntervalId = 0; var _local4; var _local3; if (_connTypeCounter == 0) { _local4 = _protocol; if (_portNumber != undefined) { _local3 = _portNumber; } else { var _local2 = 0; while (_local2 < RTMP_CONN.length) { if (_local4 == RTMP_CONN[_local2].protocol) { _local3 = RTMP_CONN[_local2].port; break; } _local2++; } } } else { _local4 = RTMP_CONN[_connTypeCounter].protocol; _local3 = RTMP_CONN[_connTypeCounter].port; } var _local5 = ((_local4 + ((_serverName == undefined) ? "" : (((("/" + _serverName) + ":") + _local3) + "/"))) + ((_wrappedURL == undefined) ? "" : (_wrappedURL + "/"))) + _appName; _tryNC[_connTypeCounter].pending = true; _tryNC[_connTypeCounter].connect(_local5, _autoSenseBW); if (_connTypeCounter < (RTMP_CONN.length - 1)) { _connTypeCounter++; _tryNCIntervalId = setInterval(this, "nextConnect", 1500); } } function cleanConns() { clearInterval(_tryNCIntervalId); _tryNCIntervalId = 0; if (_tryNC != undefined) { var _local2 = 0; while (_local2 < _tryNC.length) { if (_tryNC[_local2] != undefined) { delete _tryNC[_local2].onStatus; if (_tryNC[_local2].pending) { _tryNC[_local2].onStatus = function (info) { this.mc.disconnectOnStatus(this, info); }; } else { delete _tryNC[_local2].onStatus; _tryNC[_local2].close(); } } delete _tryNC[_local2]; _local2++; } delete _tryNC; } } function tryFallBack() { if (((_serverName == fallbackServerName) || (fallbackServerName == undefined)) || (fallbackServerName == null)) { delete _nc; _nc = undefined; _ncConnected = false; _owner.ncConnected(); } else { _connTypeCounter = 0; cleanConns(); _serverName = fallbackServerName; connectRTMP(); } } function onConnected(p_nc, p_bw) { clearInterval(_timeoutIntervalId); _timeoutIntervalId = 0; delete p_nc.onBWDone; delete p_nc.onBWCheck; delete p_nc.onStatus; _nc = p_nc; _ncUri = _nc.uri; _ncConnected = true; if (_autoSenseBW) { _bitrate = p_bw * 1024; if (_streams != undefined) { bitrateMatch(); } else { var _local3 = _streamName.split(","); var _local2 = 0; while (_local2 < _local3.length) { var _local4 = stripFrontAndBackWhiteSpace(_local3[_local2]); if ((_local2 + 1) < _local3.length) { if (p_bw <= Number(_local3[_local2 + 1])) { _streamName = _local4; break; } } else { _streamName = _local4; break; } _local2 = _local2 + 2; } if (_streamName.slice(-4).toLowerCase() == ".flv") { _streamName = _streamName.slice(0, -4); } } } if ((!_owner.__get__isLive()) && (_streamLength == undefined)) { var _local6 = new Object(); _local6.mc = this; _local6.onResult = function (length) { this.mc.getStreamLengthResult(length); }; _nc.call("getStreamLength", _local6, _streamName); } else { _owner.ncConnected(); } } function connectOnStatus(target, info) { target.pending = false; if (info.code == "NetConnection.Connect.Success") { _nc = _tryNC[target.connIndex]; _tryNC[target.connIndex] = undefined; cleanConns(); } else if (((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) && (target.connIndex == (RTMP_CONN.length - 1))) { if (!connectAgain()) { tryFallBack(); } } } function reconnectOnStatus(target, info) { if ((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) { delete _nc; _nc = undefined; _ncConnected = false; _owner.ncReconnected(); } } function disconnectOnStatus(target, info) { if (info.code == "NetConnection.Connect.Success") { delete target.onStatus; target.close(); } } function getStreamLengthResult(length) { if (length > 0) { _streamLength = length; } _owner.ncConnected(); } function _onFCSConnectTimeOut() { cleanConns(); _nc = undefined; _ncConnected = false; if (!connectAgain()) { _owner.ncConnected(); } } static function stripFrontAndBackWhiteSpace(p_str) { var _local1; var _local2 = p_str.length; var _local4 = 0; var _local5 = _local2; _local1 = 0; while (_local1 < _local2) { switch (p_str.charCodeAt(_local1)) { case 9 : case 10 : case 13 : case 32 : break; default : _local4 = _local1; break;!//outer level } _local1++; } _local1 = _local2; while (_local1 >= 0) { switch (p_str.charCodeAt(_local1)) { case 9 : case 10 : case 13 : case 32 : break; default : _local5 = _local1 + 1; break;!//outer level } _local1--; } if (_local5 <= _local4) { return(""); } return(p_str.slice(_local4, _local5)); } static var version = "1.0.1.10"; static var shortVersion = "1.0.1"; var DEFAULT_TIMEOUT = 60000; static var RTMP_CONN = [{protocol:"rtmp:/", port:"1935"}, {protocol:"rtmp:/", port:"443"}, {protocol:"rtmpt:/", port:"80"}, {protocol:"rtmps:/", port:"443"}]; }
Symbol 23 MovieClip [__Packages.mx.video.CuePointManager] Frame 0
class mx.video.CuePointManager { var _owner, _id, _asCuePointTolerance, _linearSearchTolerance, _metadataLoaded, allCuePoints, asCuePoints, _disabledCuePoints, flvCuePoints, navCuePoints, eventCuePoints, _asCuePointIndex, __get__playheadUpdateInterval, _disabledCuePointsByNameOnly; function CuePointManager (owner, id) { _owner = owner; _id = id; reset(); _asCuePointTolerance = _owner.getVideoPlayer(_id).__get__playheadUpdateInterval() / 2000; _linearSearchTolerance = DEFAULT_LINEAR_SEARCH_TOLERANCE; } function reset() { _metadataLoaded = false; allCuePoints = null; asCuePoints = null; _disabledCuePoints = null; flvCuePoints = null; navCuePoints = null; eventCuePoints = null; _asCuePointIndex = 0; } function get metadataLoaded() { return(_metadataLoaded); } function set playheadUpdateInterval(aTime) { _asCuePointTolerance = aTime / 2000; //return(__get__playheadUpdateInterval()); } function get id() { return(_id); } function addASCuePoint(timeOrCuePoint, name, parameters) { var _local3; if (typeof(timeOrCuePoint) == "object") { _local3 = deepCopyObject(timeOrCuePoint); } else { _local3 = {time:timeOrCuePoint, name:name, parameters:deepCopyObject(parameters)}; } var _local7 = isNaN(_local3.time) || (_local3.time < 0); if (_local7) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number"); } var _local6 = _local3.name == null; if (_local6) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null"); } var _local2; _local3.type = "actionscript"; if ((asCuePoints == null) || (asCuePoints.length < 1)) { _local2 = 0; asCuePoints = new Array(); asCuePoints.push(_local3); } else { _local2 = getCuePointIndex(asCuePoints, true, _local3.time); _local2 = ((asCuePoints[_local2].time > _local3.time) ? 0 : (_local2 + 1)); asCuePoints.splice(_local2, 0, _local3); } if ((allCuePoints == null) || (allCuePoints.length < 1)) { _local2 = 0; allCuePoints = new Array(); allCuePoints.push(_local3); } else { _local2 = getCuePointIndex(allCuePoints, true, _local3.time); _local2 = ((allCuePoints[_local2].time > _local3.time) ? 0 : (_local2 + 1)); allCuePoints.splice(_local2, 0, _local3); } var _local5 = _owner.getVideoPlayer(_id).__get__playheadTime(); if (_local5 > 0) { if (_asCuePointIndex == _local2) { if (_local5 > asCuePoints[_local2].time) { _asCuePointIndex++; } } else if (_asCuePointIndex > _local2) { _asCuePointIndex++; } } else { _asCuePointIndex = 0; } var _local4 = deepCopyObject(asCuePoints[_local2]); _local4.array = asCuePoints; _local4.index = _local2; return(_local4); } function removeASCuePoint(timeNameOrCuePoint) { if ((asCuePoints == null) || (asCuePoints.length < 1)) { return(null); } var _local2; switch (typeof(timeNameOrCuePoint)) { case "string" : _local2 = {name:timeNameOrCuePoint}; break; case "number" : _local2 = {time:timeNameOrCuePoint}; break; case "object" : _local2 = timeNameOrCuePoint; } var _local3 = getCuePointIndex(asCuePoints, false, _local2.time, _local2.name); if (_local3 < 0) { return(null); } _local2 = asCuePoints[_local3]; asCuePoints.splice(_local3, 1); _local3 = getCuePointIndex(allCuePoints, false, _local2.time, _local2.name); if (_local3 > 0) { allCuePoints.splice(_local3, 1); } if (_owner.getVideoPlayer(_id).__get__playheadTime() > 0) { if (_asCuePointIndex > _local3) { _asCuePointIndex--; } } else { _asCuePointIndex = 0; } return(_local2); } function setFLVCuePointEnabled(enabled, timeNameOrCuePoint) { var _local4; switch (typeof(timeNameOrCuePoint)) { case "string" : _local4 = {name:timeNameOrCuePoint}; break; case "number" : _local4 = {time:timeNameOrCuePoint}; break; case "object" : _local4 = timeNameOrCuePoint; } var _local12 = isNaN(_local4.time) || (_local4.time < 0); var _local11 = _local4.name == null; if (_local12 && (_local11)) { 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 _local6 = 0; var _local2; var _local5; if (_local12) { if (!_metadataLoaded) { if (_disabledCuePointsByNameOnly[_local4.name] == null) { if (!enabled) { if ((_disabledCuePointsByNameOnly == null) || (_disabledCuePointsByNameOnly.length < 0)) { _disabledCuePointsByNameOnly = new Object(); } _disabledCuePointsByNameOnly[_local4.name] = new Array(); } } else { if (enabled) { _disabledCuePointsByNameOnly[_local4.name] = undefined; } return(-1); } removeCuePoints(_disabledCuePoints, _local4); return(-1); } if (enabled) { _local6 = removeCuePoints(_disabledCuePoints, _local4); } else { var _local3; _local2 = getCuePointIndex(flvCuePoints, true, -1, _local4.name); while (_local2 >= 0) { _local3 = flvCuePoints[_local2]; _local5 = getCuePointIndex(_disabledCuePoints, true, _local3.time); if ((_local5 < 0) || (_disabledCuePoints[_local5].time != _local3.time)) { _disabledCuePoints = insertCuePoint(_local5, _disabledCuePoints, {name:_local3.name, time:_local3.time}); _local6 = _local6 + 1; } _local2 = getNextCuePointIndexWithName(_local3.name, flvCuePoints, _local2); } } return(_local6); } _local2 = getCuePointIndex(_disabledCuePoints, false, _local4.time, _local4.name); if (_local2 < 0) { if (enabled) { if (!_metadataLoaded) { _local2 = getCuePointIndex(_disabledCuePoints, false, _local4.time); if (_local2 < 0) { _local5 = getCuePointIndex(_disabledCuePointsByNameOnly[_local4.name], true, _local4.time); if (cuePointCompare(_local4.time, null, _disabledCuePointsByNameOnly[_local4.name]) != 0) { _disabledCuePointsByNameOnly[_local4.name] = insertCuePoint(_local5, _disabledCuePointsByNameOnly[_local4.name], _local4); } } else { _disabledCuePoints.splice(_local2, 1); } } return((_metadataLoaded ? 0 : -1)); } } else { if (enabled) { _disabledCuePoints.splice(_local2, 1); _local6 = 1; } else { _local6 = 0; } return((_metadataLoaded ? (_local6) : -1)); } if (_metadataLoaded) { _local2 = getCuePointIndex(flvCuePoints, false, _local4.time, _local4.name); if (_local2 < 0) { return(0); } if (_local11) { _local4.name = flvCuePoints[_local2].name; } } _local5 = getCuePointIndex(_disabledCuePoints, true, _local4.time); _disabledCuePoints = insertCuePoint(_local5, _disabledCuePoints, _local4); _local6 = 1; return((_metadataLoaded ? (_local6) : -1)); } function removeCuePoints(cuePointArray, cuePoint) { var _local2; var _local4; var _local5 = 0; _local2 = getCuePointIndex(cuePointArray, true, -1, cuePoint.name); while (_local2 >= 0) { _local4 = cuePointArray[_local2]; cuePointArray.splice(_local2, 1); _local2--; _local5++; _local2 = getNextCuePointIndexWithName(_local4.name, cuePointArray, _local2); } return(_local5); } function insertCuePoint(insertIndex, cuePointArray, cuePoint) { if (insertIndex < 0) { cuePointArray = new Array(); cuePointArray.push(cuePoint); } else { if (cuePointArray[insertIndex].time > cuePoint.time) { insertIndex = 0; } else { insertIndex++; } cuePointArray.splice(insertIndex, 0, cuePoint); } return(cuePointArray); } function isFLVCuePointEnabled(timeNameOrCuePoint) { if (!_metadataLoaded) { return(true); } var _local3; switch (typeof(timeNameOrCuePoint)) { case "string" : _local3 = {name:timeNameOrCuePoint}; break; case "number" : _local3 = {time:timeNameOrCuePoint}; break; case "object" : _local3 = timeNameOrCuePoint; } var _local5 = isNaN(_local3.time) || (_local3.time < 0); var _local6 = _local3.name == null; if (_local5 && (_local6)) { 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 (_local5) { var _local2 = getCuePointIndex(flvCuePoints, true, -1, _local3.name); if (_local2 < 0) { return(true); } while (_local2 >= 0) { if (getCuePointIndex(_disabledCuePoints, false, flvCuePoints[_local2].time, flvCuePoints[_local2].name) < 0) { return(true); } _local2 = getNextCuePointIndexWithName(_local3.name, flvCuePoints, _local2); } return(false); } return(getCuePointIndex(_disabledCuePoints, false, _local3.time, _local3.name) < 0); } function dispatchASCuePoints() { var _local5 = _owner.getVideoPlayer(_id).__get__playheadTime(); if (_owner.getVideoPlayer(_id).__get__stateResponsive() && (asCuePoints != null)) { while ((_asCuePointIndex < asCuePoints.length) && (asCuePoints[_asCuePointIndex].time <= (_local5 + _asCuePointTolerance))) { _owner.dispatchEvent({type:"cuePoint", info:deepCopyObject(asCuePoints[_asCuePointIndex++]), vp:_id}); } } } function resetASCuePointIndex(time) { if ((time <= 0) || (asCuePoints == null)) { _asCuePointIndex = 0; return(undefined); } var _local2 = getCuePointIndex(asCuePoints, true, time); _asCuePointIndex = ((asCuePoints[_local2].time < time) ? (_local2 + 1) : (_local2)); } function processFLVCuePoints(metadataCuePoints) { _metadataLoaded = true; if ((metadataCuePoints == null) || (metadataCuePoints.length < 1)) { flvCuePoints = null; navCuePoints = null; eventCuePoints = null; return(undefined); } flvCuePoints = metadataCuePoints; navCuePoints = new Array(); eventCuePoints = new Array(); var _local5; var _local6 = -1; var _local2; var _local4 = _disabledCuePoints; var _local3 = 0; _disabledCuePoints = new Array(); var _local9 = 0; while (_local2 = flvCuePoints[_local9++] , _local2 != null) { if ((_local6 > 0) && (_local6 >= _local2.time)) { flvCuePoints = null; navCuePoints = null; eventCuePoints = null; _disabledCuePoints = null; _disabledCuePointsByNameOnly = null; throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "Unsorted cuePoint found after time: " + _local6); } _local6 = _local2.time; while ((_local3 < _local4.length) && (cuePointCompare(_local4[_local3].time, null, _local2) < 0)) { _local3++; } if ((_disabledCuePointsByNameOnly[_local2.name] != null) || ((_local3 < _local4.length) && (cuePointCompare(_local4[_local3].time, _local4[_local3].name, _local2) == 0))) { _disabledCuePoints.push({time:_local2.time, name:_local2.name}); } if (_local2.type == "navigation") { navCuePoints.push(_local2); } else if (_local2.type == "event") { eventCuePoints.push(_local2); } if ((allCuePoints == null) || (allCuePoints.length < 1)) { allCuePoints = new Array(); allCuePoints.push(_local2); } else { _local5 = getCuePointIndex(allCuePoints, true, _local2.time); _local5 = ((allCuePoints[_local5].time > _local2.time) ? 0 : (_local5 + 1)); allCuePoints.splice(_local5, 0, _local2); } } delete _disabledCuePointsByNameOnly; _disabledCuePointsByNameOnly = null; } function processCuePointsProperty(cuePoints) { if ((cuePoints == null) || (cuePoints.length == 0)) { return(undefined); } var _local4 = 0; var _local8; var _local6; var _local7; var _local5; var _local9; var _local2 = 0; while (_local2 < (cuePoints.length - 1)) { switch (_local4) { case 6 : addOrDisable(_local9, _local5); _local4 = 0; case 0 : if (cuePoints[_local2++] != "t") { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format"); } if (isNaN(cuePoints[_local2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number"); } _local5 = new Object(); _local5.time = cuePoints[_local2] / 1000; _local4++; break; case 1 : if (cuePoints[_local2++] != "n") { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format"); } if (cuePoints[_local2] == null) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be null or undefined"); } _local5.name = unescape(cuePoints[_local2]); _local4++; break; case 2 : if (cuePoints[_local2++] != "t") { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format"); } if (isNaN(cuePoints[_local2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "type must be number"); } switch (cuePoints[_local2]) { case 0 : _local5.type = "event"; break; case 1 : _local5.type = "navigation"; break; case 2 : _local5.type = "actionscript"; break; default : throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "type must be 0, 1 or 2"); } _local4++; break; case 3 : if (cuePoints[_local2++] != "d") { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format"); } if (isNaN(cuePoints[_local2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "disabled must be number"); } _local9 = cuePoints[_local2] != 0; _local4++; break; case 4 : if (cuePoints[_local2++] != "p") { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format"); } if (isNaN(cuePoints[_local2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "num params must be number"); } _local8 = cuePoints[_local2]; _local4++; if (_local8 == 0) { _local4++; } else { _local5.parameters = new Object(); } break; case 5 : _local6 = cuePoints[_local2++]; _local7 = cuePoints[_local2]; if (typeof(_local6) == "string") { _local6 = unescape(_local6); } if (typeof(_local7) == "string") { _local7 = unescape(_local7); } _local5.parameters[_local6] = _local7; _local8--; if (_local8 != 0) { break; } _local4++; } _local2++; } if (_local4 == 6) { addOrDisable(_local9, _local5); } else { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected end of cuePoint param string"); } } function addOrDisable(disable, cuePoint) { if (disable) { if (cuePoint.type == "actionscript") { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "Cannot disable actionscript cue points"); } setFLVCuePointEnabled(false, cuePoint); } else if (cuePoint.type == "actionscript") { addASCuePoint(cuePoint); } } function unescape(origStr) { var _local3 = origStr; var _local1 = 0; while (_local1 < cuePointsReplace.length) { var _local2 = _local3.split(cuePointsReplace[_local1++]); if (_local2.length > 1) { _local3 = _local2.join(cuePointsReplace[_local1]); } _local1++; } return(_local3); } function getCuePointIndex(cuePointArray, closeIsOK, time, name, start, len) { if ((cuePointArray == null) || (cuePointArray.length < 1)) { return(-1); } var _local13 = isNaN(time) || (time < 0); var _local16 = name == null; if (_local13 && (_local16)) { 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 ((!_local16) && (closeIsOK || (_local13))) { var _local8; var _local2; if (_local13) { _local8 = start; } else { _local8 = getCuePointIndex(cuePointArray, closeIsOK, time); } _local2 = _local8; while (_local2 >= start) { if (cuePointArray[_local2].name == name) { break; } _local2--; } if (_local2 >= start) { return(_local2); } _local2 = _local8 + 1; while (_local2 < len) { if (cuePointArray[_local2].name == name) { break; } _local2++; } if (_local2 < len) { return(_local2); } return(-1); } var _local6; if (len <= _linearSearchTolerance) { var _local11 = start + len; var _local3 = start; while (_local3 < _local11) { _local6 = cuePointCompare(time, name, cuePointArray[_local3]); if (_local6 == 0) { return(_local3); } if (_local6 < 0) { break; } _local3++; } if (closeIsOK) { if (_local3 > 0) { return(_local3 - 1); } return(0); } return(-1); } var _local12 = Math.floor(len / 2); var _local15 = start + _local12; _local6 = cuePointCompare(time, name, cuePointArray[_local15]); if (_local6 < 0) { return(getCuePointIndex(cuePointArray, closeIsOK, time, name, start, _local12)); } if (_local6 > 0) { return(getCuePointIndex(cuePointArray, closeIsOK, time, name, _local15 + 1, (_local12 - 1) + (len % 2))); } return(_local15); } function getNextCuePointIndexWithName(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 _local1; _local1 = index + 1; while (_local1 < array.length) { if (array[_local1].name == name) { break; } _local1++; } if (_local1 < array.length) { return(_local1); } return(-1); } static function cuePointCompare(time, name, cuePoint) { var _local1 = Math.round(time * 1000); var _local2 = Math.round(cuePoint.time * 1000); if (_local1 < _local2) { return(-1); } if (_local1 > _local2) { return(1); } if (name != null) { if (name == cuePoint.name) { return(0); } if (name < cuePoint.name) { return(-1); } return(1); } return(0); } function getCuePoint(cuePointArray, closeIsOK, timeNameOrCuePoint) { var _local2; switch (typeof(timeNameOrCuePoint)) { case "string" : _local2 = {name:timeNameOrCuePoint}; break; case "number" : _local2 = {time:timeNameOrCuePoint}; break; case "object" : _local2 = timeNameOrCuePoint; } var _local3 = getCuePointIndex(cuePointArray, closeIsOK, _local2.time, _local2.name); if (_local3 < 0) { return(null); } _local2 = deepCopyObject(cuePointArray[_local3]); _local2.array = cuePointArray; _local2.index = _local3; return(_local2); } function getNextCuePointWithName(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 _local3 = getNextCuePointIndexWithName(cuePoint.name, cuePoint.array, cuePoint.index); if (_local3 < 0) { return(null); } var _local4 = deepCopyObject(cuePoint.array[_local3]); _local4.array = cuePoint.array; _local4.index = _local3; return(_local4); } static function deepCopyObject(obj, recurseLevel) { if ((obj == null) || (typeof(obj) != "object")) { return(obj); } if (recurseLevel == null) { recurseLevel = 0; } var _local2 = new Object(); for (var _local4 in obj) { if ((recurseLevel == 0) && ((_local4 == "array") || (_local4 == "index"))) { } else if (typeof(obj[_local4]) == "object") { _local2[_local4] = deepCopyObject(obj[_local4], recurseLevel + 1); } else { _local2[_local4] = obj[_local4]; } } return(_local2); } static var DEFAULT_LINEAR_SEARCH_TOLERANCE = 50; static var cuePointsReplace = ["&quot;", "\"", "&#39;", "'", "&#44;", ",", "&amp;", "&"]; }
Symbol 98 MovieClip [viewport] Frame 1
#initclip 117 Object.registerClass("viewport", app.view.display.Viewport); #endinitclip
Symbol 106 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 110 MovieClip [selectorDisplay] Frame 1
#initclip 93 Object.registerClass("selectorDisplay", app.view.display.SelectorDisplay); #endinitclip
Symbol 116 MovieClip Frame 2
stop();
Symbol 116 MovieClip Frame 3
stop();
Symbol 117 MovieClip [FwdButton] Frame 1
#initclip 94 Object.registerClass("FwdButton", app.view.button.FwdButton); #endinitclip stop();
Symbol 133 MovieClip [PlayButton] Frame 1
#initclip 95 Object.registerClass("PlayButton", app.view.button.PlayButton); #endinitclip stop();
Symbol 133 MovieClip [PlayButton] Frame 2
stop();
Symbol 133 MovieClip [PlayButton] Frame 3
stop();
Symbol 133 MovieClip [PlayButton] Frame 4
stop();
Symbol 133 MovieClip [PlayButton] Frame 5
stop();
Symbol 133 MovieClip [PlayButton] Frame 6
stop();
Symbol 133 MovieClip [PlayButton] Frame 25
stop();
Symbol 134 MovieClip [coreControlMenu] Frame 1
#initclip 96 Object.registerClass("coreControlMenu", app.view.menu.CoreControlMenu); #endinitclip
Symbol 141 MovieClip [RecommendButton] Frame 1
#initclip 97 Object.registerClass("RecommendButton", app.view.button.RecommendButton); #endinitclip
Symbol 146 MovieClip [loveButton] Frame 1
#initclip 98 Object.registerClass("loveButton", app.view.button.LoveButton); #endinitclip
Symbol 150 MovieClip Frame 1
stop();
Symbol 151 MovieClip [BanButton] Frame 1
#initclip 99 Object.registerClass("BanButton", app.view.button.BanButton); #endinitclip
Symbol 158 MovieClip [Volume] Frame 1
#initclip 100 Object.registerClass("Volume", app.view.display.VolDisplayHorizontal); #endinitclip
Symbol 163 MovieClip [TagButton] Frame 1
#initclip 101 Object.registerClass("TagButton", app.view.button.TagButton); #endinitclip
Symbol 164 MovieClip [LfmMenu] Frame 1
#initclip 102 Object.registerClass("LfmMenu", app.view.menu.LfmMenu); #endinitclip
Symbol 167 MovieClip [DurationDisplay] Frame 1
#initclip 103 Object.registerClass("DurationDisplay", app.view.display.DurationDisplay); #endinitclip stop();
Symbol 167 MovieClip [DurationDisplay] Frame 2
stop();
Symbol 167 MovieClip [DurationDisplay] Frame 100
stop();
Symbol 179 MovieClip [StatusDisplay] Frame 1
#initclip 104 Object.registerClass("StatusDisplay", app.view.display.StatusDisplay); #endinitclip
Symbol 180 MovieClip [TrackDisplay] Frame 1
#initclip 105 Object.registerClass("TrackDisplay", app.view.display.TrackDisplay); #endinitclip stop();
Symbol 180 MovieClip [TrackDisplay] Frame 8
stop();
Symbol 180 MovieClip [TrackDisplay] Frame 16
gotoAndStop (1);
Symbol 183 MovieClip [LfmPlayer] Frame 1
this.loadingIcon.gotoAndPlay(29);
Symbol 200 MovieClip Frame 1
stop();
Symbol 203 MovieClip [stationItem] Frame 1
#initclip 106 Object.registerClass("stationItem", app.view.menu.StationItem); #endinitclip
Symbol 213 MovieClip [trackItem] Frame 1
#initclip 107 Object.registerClass("trackItem", app.view.menu.TrackItem); #endinitclip
Symbol 221 MovieClip Frame 1
stop();
Symbol 225 MovieClip [playlistItem] Frame 1
#initclip 108 Object.registerClass("playlistItem", app.view.menu.PlaylistItem); #endinitclip
Symbol 232 MovieClip [selectorItem] Frame 1
#initclip 109 Object.registerClass("selectorItem", app.view.menu.SelectorItem); #endinitclip
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 243 MovieClip [joinSubmitButton] Frame 1
#initclip 110 Object.registerClass("joinSubmitButton", app.view.button.JoinSubmitButton); #endinitclip
Symbol 245 MovieClip [cancelButton] Frame 1
#initclip 111 Object.registerClass("cancelButton", app.view.button.CancelButton); #endinitclip
Symbol 250 MovieClip [ViewportMenuBar] Frame 1
#initclip 112 Object.registerClass("ViewportMenuBar", app.view.display.ViewportMenuBar); #endinitclip
Symbol 252 MovieClip [shuffleDisplay] Frame 1
#initclip 113 Object.registerClass("shuffleDisplay", app.view.display.ShuffleDisplay); #endinitclip
Symbol 270 MovieClip Frame 1
stop();
Symbol 275 MovieClip [nowplayingdisplay] Frame 1
#initclip 114 Object.registerClass("nowplayingdisplay", app.view.display.NowPlayingDisplay); #endinitclip
Symbol 286 MovieClip [handle] Frame 1
#initclip 115 Object.registerClass("handle", app.view.display.ScrollBarHandle); #endinitclip
Symbol 289 MovieClip Frame 1
stop();
Symbol 290 MovieClip [scrollbar] Frame 1
#initclip 116 Object.registerClass("scrollbar", app.view.display.ScrollBar); #endinitclip

Library Items

Symbol 1 GraphicUsed by:4
Symbol 2 GraphicUsed by:4
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClip [rwd_button]Uses:1 2 3
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:6Used by:13
Symbol 8 VideoUsed by:9
Symbol 9 MovieClip [VideoPlayer]Uses:8Used by:13
Symbol 10 BitmapUsed by:11
Symbol 11 GraphicUses:10Used by:12
Symbol 12 MovieClip [Icon]Uses:11Used by:13
Symbol 13 MovieClip [FLVPlayback]Uses:7 9 12
Symbol 24 GraphicUsed by:29
Symbol 25 GraphicUsed by:29 167
Symbol 26 GraphicUsed by:29
Symbol 27 ShapeTweeningUsed by:29
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClipUses:24 25 26 27 28Used by:Timeline
Symbol 30 GraphicUsed by:81
Symbol 31 GraphicUsed by:81
Symbol 32 GraphicUsed by:81
Symbol 33 GraphicUsed by:81
Symbol 34 GraphicUsed by:81
Symbol 35 GraphicUsed by:81
Symbol 36 GraphicUsed by:81
Symbol 37 GraphicUsed by:81
Symbol 38 GraphicUsed by:81
Symbol 39 GraphicUsed by:81
Symbol 40 GraphicUsed by:81
Symbol 41 GraphicUsed by:81
Symbol 42 GraphicUsed by:81
Symbol 43 GraphicUsed by:81
Symbol 44 GraphicUsed by:81
Symbol 45 GraphicUsed by:81
Symbol 46 GraphicUsed by:81
Symbol 47 GraphicUsed by:81
Symbol 48 GraphicUsed by:81
Symbol 49 GraphicUsed by:81
Symbol 50 GraphicUsed by:81
Symbol 51 GraphicUsed by:81
Symbol 52 GraphicUsed by:81
Symbol 53 GraphicUsed by:81
Symbol 54 GraphicUsed by:81
Symbol 55 GraphicUsed by:81
Symbol 56 GraphicUsed by:81
Symbol 57 GraphicUsed by:81
Symbol 58 GraphicUsed by:81
Symbol 59 GraphicUsed by:81
Symbol 60 GraphicUsed by:81
Symbol 61 GraphicUsed by:81
Symbol 62 GraphicUsed by:81
Symbol 63 GraphicUsed by:81
Symbol 64 GraphicUsed by:81
Symbol 65 GraphicUsed by:81
Symbol 66 GraphicUsed by:81
Symbol 67 GraphicUsed by:81
Symbol 68 GraphicUsed by:81
Symbol 69 GraphicUsed by:81
Symbol 70 GraphicUsed by:81
Symbol 71 GraphicUsed by:81
Symbol 72 GraphicUsed by:81
Symbol 73 GraphicUsed by:81
Symbol 74 GraphicUsed by:81
Symbol 75 GraphicUsed by:81
Symbol 76 GraphicUsed by:81
Symbol 77 GraphicUsed by:81
Symbol 78 GraphicUsed by:81
Symbol 79 GraphicUsed by:81
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClip [loadingIcon]Uses:30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80Used by:183  Timeline
Symbol 82 BitmapUsed by:83
Symbol 83 GraphicUses:82Used by:Timeline
Symbol 84 GraphicUsed by:89
Symbol 85 FontUsed by:86 87 88 101 190 244
Symbol 86 EditableTextUses:85Used by:89
Symbol 87 EditableTextUses:85Used by:89
Symbol 88 EditableTextUses:85Used by:89
Symbol 89 MovieClipUses:84 86 87 88Used by:Timeline
Symbol 291 MovieClip [__Packages.lib.lfm.display.LfmUIElement]
Symbol 16 MovieClip [__Packages.mx.events.EventDispatcher]
Symbol 292 MovieClip [__Packages.app.controller.Controller]
Symbol 293 MovieClip [__Packages.lib.lfm.core.LfmController]
Symbol 294 MovieClip [__Packages.app.controller.VolumeController]
Symbol 295 MovieClip [__Packages.lib.lfm.core.ServiceLocator]
Symbol 296 MovieClip [__Packages.etc.Conf]
Symbol 297 MovieClip [__Packages.lib.lfm.core.LfmError]
Symbol 298 MovieClip [__Packages.app.controller.TrackController]
Symbol 299 MovieClip [__Packages.lib.lfm.core.model.LfmModel]
Symbol 300 MovieClip [__Packages.lib.lfm.core.model.Track]
Symbol 301 MovieClip [__Packages.lib.lfm.core.model.Artist]
Symbol 19 MovieClip [__Packages.mx.utils.Delegate]
Symbol 302 MovieClip [__Packages.app.view.button.PlayButton]
Symbol 303 MovieClip [__Packages.app.controller.UserController]
Symbol 304 MovieClip [__Packages.app.controller.LanguageController]
Symbol 305 MovieClip [__Packages.app.controller.ActivityController]
Symbol 306 MovieClip [__Packages.app.controller.DisplayController]
Symbol 307 MovieClip [__Packages.lib.lfm.core.LfmDisplayController]
Symbol 308 MovieClip [__Packages.lib.lfm.display.LfmButton]
Symbol 309 MovieClip [__Packages.app.controller.SkipRestrictionDisplayController]
Symbol 310 MovieClip [__Packages.lib.lfm.display.LfmEffect]
Symbol 311 MovieClip [__Packages.app.controller.TagDisplayController]
Symbol 312 MovieClip [__Packages.app.controller.TrackDisplayController]
Symbol 313 MovieClip [__Packages.app.controller.RecommendDisplayController]
Symbol 314 MovieClip [__Packages.app.controller.StationDisplayController]
Symbol 315 MovieClip [__Packages.app.controller.UnauthorisedDisplayController]
Symbol 316 MovieClip [__Packages.app.controller.KeyboardController]
Symbol 317 MovieClip [__Packages.lib.lfm.core.model.Playlist]
Symbol 318 MovieClip [__Packages.app.controller.MenuController]
Symbol 319 MovieClip [__Packages.app.controller.PlaylistController]
Symbol 320 MovieClip [__Packages.lib.lfm.xml.xspf.XSPF]
Symbol 321 MovieClip [__Packages.lib.lfm.xml.xspf.XSPFParser]
Symbol 322 MovieClip [__Packages.lib.lfm.core.LfmDate]
Symbol 323 MovieClip [__Packages.lib.ext.ascrypt.Base64]
Symbol 324 MovieClip [__Packages.app.view.button.FwdButton]
Symbol 325 MovieClip [__Packages.app.controller.StationController]
Symbol 326 MovieClip [__Packages.app.controller.ViewportController]
Symbol 327 MovieClip [__Packages.lib.lfm.xml.PlaylistsParser]
Symbol 328 MovieClip [__Packages.lib.lfm.core.model.Station]
Symbol 329 MovieClip [__Packages.app.view.display.ScrollBar]
Symbol 330 MovieClip [__Packages.app.view.display.Viewport]
Symbol 331 MovieClip [__Packages.app.view.menu.TrackItem]
Symbol 332 MovieClip [__Packages.app.view.menu.StationItem]
Symbol 333 MovieClip [__Packages.app.view.display.SelectorDisplay]
Symbol 334 MovieClip [__Packages.app.view.menu.CoreControlMenu]
Symbol 335 MovieClip [__Packages.app.view.button.RecommendButton]
Symbol 336 MovieClip [__Packages.app.view.button.LoveButton]
Symbol 337 MovieClip [__Packages.app.view.button.BanButton]
Symbol 338 MovieClip [__Packages.app.view.display.VolDisplayHorizontal]
Symbol 339 MovieClip [__Packages.app.view.button.TagButton]
Symbol 340 MovieClip [__Packages.app.view.menu.LfmMenu]
Symbol 341 MovieClip [__Packages.app.view.display.DurationDisplay]
Symbol 342 MovieClip [__Packages.app.view.display.StatusDisplay]
Symbol 343 MovieClip [__Packages.app.view.display.TrackDisplay]
Symbol 344 MovieClip [__Packages.app.view.menu.PlaylistItem]
Symbol 345 MovieClip [__Packages.app.view.menu.SelectorItem]
Symbol 346 MovieClip [__Packages.app.view.button.JoinSubmitButton]
Symbol 347 MovieClip [__Packages.app.view.button.CancelButton]
Symbol 348 MovieClip [__Packages.app.view.display.ViewportMenuBar]
Symbol 349 MovieClip [__Packages.app.view.display.ShuffleDisplay]
Symbol 350 MovieClip [__Packages.app.view.display.NowPlayingDisplay]
Symbol 351 MovieClip [__Packages.app.view.display.ScrollBarHandle]
Symbol 352 MovieClip [__Packages.app.Main]
Symbol 353 MovieClip [__Packages.lib.lfm.core.LfmLogger]
Symbol 354 MovieClip [__Packages.lib.lfm.core.LfmClient]
Symbol 355 MovieClip [__Packages.lib.ext.http.xmlrpc.IConnection]
Symbol 356 MovieClip [__Packages.lib.ext.http.xmlrpc.MethodFault]
Symbol 357 MovieClip [__Packages.lib.ext.http.xmlrpc.Connection]
Symbol 358 MovieClip [__Packages.lib.ext.http.xmlrpc.IMethodCall]
Symbol 359 MovieClip [__Packages.lib.ext.http.xmlrpc.MethodCall]
Symbol 360 MovieClip [__Packages.lib.ext.http.xmlrpc.util.XMLRPCDataTypes]
Symbol 361 MovieClip [__Packages.lib.ext.http.xmlrpc.util.XMLRPCUtils]
Symbol 362 MovieClip [__Packages.lib.ext.http.xmlrpc.Parser]
Symbol 363 MovieClip [__Packages.lib.ext.http.xmlrpc.ParserImpl]
Symbol 364 MovieClip [__Packages.lib.ext.http.xmlrpc.MethodFaultImpl]
Symbol 365 MovieClip [__Packages.lib.lfm.xml.rpc.LfmConnection]
Symbol 366 MovieClip [__Packages.lib.lfm.core.model.User]
Symbol 367 MovieClip [__Packages.lib.lfm.core.WSClient]
Symbol 368 MovieClip [__Packages.lib.lfm.core.LfmStation]
Symbol 369 MovieClip [__Packages.lib.lfm.core.LfmScrobbler]
Symbol 5 MovieClip [__Packages.mx.video.FLVPlayback]
Symbol 14 MovieClip [__Packages.mx.video.VideoPlayer]
Symbol 15 MovieClip [__Packages.mx.video.INCManager]
Symbol 17 MovieClip [__Packages.mx.video.VideoError]
Symbol 18 MovieClip [__Packages.mx.video.UIManager]
Symbol 20 MovieClip [__Packages.mx.video.SMILManager]
Symbol 21 MovieClip [__Packages.mx.video.FPADManager]
Symbol 22 MovieClip [__Packages.mx.video.NCManager]
Symbol 23 MovieClip [__Packages.mx.video.CuePointManager]
Symbol 90 FontUsed by:91
Symbol 91 TextUses:90Used by:Timeline
Symbol 92 BitmapUsed by:93
Symbol 93 GraphicUses:92Used by:94
Symbol 94 MovieClipUses:93Used by:183
Symbol 95 GraphicUsed by:183 278 285
Symbol 96 GraphicUsed by:97 233
Symbol 97 MovieClipUses:96Used by:98 252
Symbol 98 MovieClip [viewport]Uses:97Used by:183
Symbol 99 GraphicUsed by:100
Symbol 100 MovieClipUses:99Used by:110
Symbol 101 EditableTextUses:85Used by:110
Symbol 102 BitmapUsed by:103
Symbol 103 GraphicUses:102Used by:106
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:106
Symbol 106 MovieClipUses:103 105Used by:110
Symbol 107 GraphicUsed by:109 289
Symbol 108 GraphicUsed by:109 289
Symbol 109 MovieClipUses:107 108Used by:110
Symbol 110 MovieClip [selectorDisplay]Uses:100 101 106 109Used by:183  Timeline
Symbol 111 BitmapUsed by:112
Symbol 112 GraphicUses:111Used by:115 116
Symbol 113 BitmapUsed by:114
Symbol 114 GraphicUses:113Used by:116
Symbol 115 MovieClipUses:112Used by:116
Symbol 116 MovieClipUses:112 114 115Used by:117
Symbol 117 MovieClip [FwdButton]Uses:116Used by:134
Symbol 118 BitmapUsed by:119
Symbol 119 GraphicUses:118Used by:122 132 133
Symbol 120 BitmapUsed by:121
Symbol 121 GraphicUses:120Used by:133
Symbol 122 MovieClipUses:119Used by:133
Symbol 123 BitmapUsed by:124
Symbol 124 GraphicUses:123Used by:133
Symbol 125 BitmapUsed by:126
Symbol 126 GraphicUses:125Used by:133
Symbol 127 BitmapUsed by:128
Symbol 128 GraphicUses:127Used by:129
Symbol 129 MovieClipUses:128Used by:133
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:132
Symbol 132 MovieClipUses:119 131Used by:133
Symbol 133 MovieClip [PlayButton]Uses:119 121 122 124 126 129 132Used by:134
Symbol 134 MovieClip [coreControlMenu]Uses:117 133Used by:164
Symbol 135 GraphicUsed by:141 146 163 221
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:139 140
Symbol 138 MovieClipUsed by:140
Symbol 139 MovieClipUses:137Used by:140
Symbol 140 MovieClipUses:137 138 139Used by:141
Symbol 141 MovieClip [RecommendButton]Uses:135 140Used by:164
Symbol 142 BitmapUsed by:143
Symbol 143 GraphicUses:142Used by:144 145
Symbol 144 MovieClipUses:143Used by:145
Symbol 145 MovieClipUses:143 144Used by:146
Symbol 146 MovieClip [loveButton]Uses:135 145Used by:164
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:149 150
Symbol 149 MovieClipUses:148Used by:150
Symbol 150 MovieClipUses:148 149Used by:151
Symbol 151 MovieClip [BanButton]Uses:150Used by:164
Symbol 152 BitmapUsed by:153
Symbol 153 GraphicUses:152Used by:154
Symbol 154 MovieClipUses:153Used by:158
Symbol 155 BitmapUsed by:156
Symbol 156 GraphicUses:155Used by:157
Symbol 157 MovieClipUses:156Used by:158
Symbol 158 MovieClip [Volume]Uses:154 157Used by:164
Symbol 159 BitmapUsed by:160
Symbol 160 GraphicUses:159Used by:161 162
Symbol 161 MovieClipUses:160Used by:162
Symbol 162 MovieClipUses:160 161Used by:163
Symbol 163 MovieClip [TagButton]Uses:135 162Used by:164
Symbol 164 MovieClip [LfmMenu]Uses:134 141 146 151 158 163Used by:183
Symbol 165 GraphicUsed by:167
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClip [DurationDisplay]Uses:165 25 166Used by:180
Symbol 168 FontUsed by:169 170 177 205 206 222 223 227 231 242 251 271
Symbol 169 EditableTextUses:168Used by:180
Symbol 170 EditableTextUses:168Used by:180
Symbol 171 GraphicUsed by:172 226
Symbol 172 MovieClip [trackTextMask]Uses:171Used by:179  Timeline
Symbol 173 FontUsed by:174 175 248 259
Symbol 174 EditableTextUses:173Used by:176
Symbol 175 EditableTextUses:173Used by:176
Symbol 176 MovieClipUses:174 175Used by:179
Symbol 177 EditableTextUses:168Used by:178
Symbol 178 MovieClipUses:177Used by:179
Symbol 179 MovieClip [StatusDisplay]Uses:172 176 178Used by:180
Symbol 180 MovieClip [TrackDisplay]Uses:167 169 170 179Used by:181
Symbol 181 MovieClipUses:180Used by:182
Symbol 182 MovieClipUses:181Used by:183
Symbol 183 MovieClip [LfmPlayer]Uses:94 95 98 81 110 164 182Used by:Timeline
Symbol 184 GraphicUsed by:185
Symbol 185 MovieClip [playerMask]Uses:184Used by:Timeline
Symbol 186 GraphicUsed by:187
Symbol 187 MovieClipUses:186Used by:203
Symbol 188 FontUsed by:189
Symbol 189 EditableTextUses:188Used by:203
Symbol 190 EditableTextUses:85Used by:203
Symbol 191 GraphicUsed by:192 204
Symbol 192 MovieClipUses:191Used by:203 213
Symbol 193 BitmapUsed by:194
Symbol 194 GraphicUses:193Used by:195
Symbol 195 MovieClipUses:194Used by:203
Symbol 196 BitmapUsed by:197
Symbol 197 GraphicUses:196Used by:200
Symbol 198 BitmapUsed by:199
Symbol 199 GraphicUses:198Used by:200
Symbol 200 MovieClipUses:197 199Used by:203
Symbol 201 BitmapUsed by:202
Symbol 202 GraphicUses:201Used by:203
Symbol 203 MovieClip [stationItem]Uses:187 189 190 192 195 200 202Used by:Timeline
Symbol 204 MovieClipUses:191Used by:213
Symbol 205 EditableTextUses:168Used by:213
Symbol 206 EditableTextUses:168Used by:213
Symbol 207 BitmapUsed by:208
Symbol 208 GraphicUses:207Used by:209
Symbol 209 MovieClipUses:208Used by:213
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:212
Symbol 212 MovieClipUses:211Used by:213
Symbol 213 MovieClip [trackItem]Uses:204 205 206 192 209 212Used by:Timeline
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214Used by:216
Symbol 216 MovieClipUses:215Used by:225 228
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:221
Symbol 219 BitmapUsed by:220
Symbol 220 GraphicUses:219Used by:221
Symbol 221 MovieClipUses:135 218 220Used by:225
Symbol 222 EditableTextUses:168Used by:225
Symbol 223 EditableTextUses:168Used by:224
Symbol 224 MovieClipUses:223Used by:225
Symbol 225 MovieClip [playlistItem]Uses:216 221 222 224Used by:Timeline
Symbol 226 MovieClip [albumFrame_]Uses:171Used by:Timeline
Symbol 227 EditableTextUses:168Used by:228
Symbol 228 MovieClip [stationTitleItem]Uses:216 227Used by:Timeline
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:229Used by:232
Symbol 231 EditableTextUses:168Used by:232
Symbol 232 MovieClip [selectorItem]Uses:230 231Used by:Timeline
Symbol 233 MovieClip [viewportMask]Uses:96Used by:Timeline
Symbol 234 GraphicUsed by:241
Symbol 235 GraphicUsed by:241
Symbol 236 GraphicUsed by:241
Symbol 237 GraphicUsed by:241
Symbol 238 GraphicUsed by:241
Symbol 239 GraphicUsed by:241
Symbol 240 GraphicUsed by:241
Symbol 241 MovieClipUses:234 235 236 237 238 239 240Used by:243 245
Symbol 242 EditableTextUses:168Used by:243
Symbol 243 MovieClip [joinSubmitButton]Uses:241 242Used by:252
Symbol 244 EditableTextUses:85Used by:245
Symbol 245 MovieClip [cancelButton]Uses:241 244Used by:252
Symbol 246 BitmapUsed by:247
Symbol 247 GraphicUses:246Used by:249
Symbol 248 EditableTextUses:173Used by:249
Symbol 249 MovieClipUses:247 248Used by:250
Symbol 250 MovieClip [ViewportMenuBar]Uses:249Used by:252 275
Symbol 251 EditableTextUses:168Used by:252
Symbol 252 MovieClip [shuffleDisplay]Uses:97 243 245 250 251Used by:Timeline
Symbol 253 GraphicUsed by:275
Symbol 254 GraphicUsed by:275
Symbol 255 MovieClipUsed by:275
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:258
Symbol 258 MovieClipUses:257Used by:275
Symbol 259 EditableTextUses:173Used by:275
Symbol 260 GraphicUsed by:261
Symbol 261 MovieClipUses:260Used by:270
Symbol 262 BitmapUsed by:263
Symbol 263 GraphicUses:262Used by:270
Symbol 264 BitmapUsed by:265
Symbol 265 GraphicUses:264Used by:270
Symbol 266 BitmapUsed by:267
Symbol 267 GraphicUses:266Used by:270
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:270
Symbol 270 MovieClipUses:261 263 265 267 269Used by:274
Symbol 271 EditableTextUses:168Used by:274
Symbol 272 GraphicUsed by:273
Symbol 273 MovieClipUses:272Used by:274
Symbol 274 MovieClip [buyButton]Uses:270 271 273Used by:275
Symbol 275 MovieClip [nowplayingdisplay]Uses:253 254 255 258 259 250 274Used by:Timeline
Symbol 276 GraphicUsed by:277
Symbol 277 MovieClipUses:276Used by:290
Symbol 278 MovieClipUses:95Used by:286
Symbol 279 BitmapUsed by:280
Symbol 280 GraphicUses:279Used by:281
Symbol 281 MovieClipUses:280Used by:286
Symbol 282 BitmapUsed by:283
Symbol 283 GraphicUses:282Used by:284
Symbol 284 MovieClipUses:283Used by:286
Symbol 285 MovieClipUses:95Used by:286
Symbol 286 MovieClip [handle]Uses:278 281 284 285Used by:290
Symbol 287 GraphicUsed by:288
Symbol 288 MovieClipUses:287Used by:289
Symbol 289 MovieClipUses:288 107 108Used by:290
Symbol 290 MovieClip [scrollbar]Uses:277 286 289Used by:Timeline

Instance Names

"loader"Frame 1Symbol 29 MovieClip
"anim"Frame 1Symbol 81 MovieClip [loadingIcon]
"bg"Frame 3Symbol 89 MovieClip
"shuffleDisplay"Frame 4Symbol 252 MovieClip [shuffleDisplay]
"nowPlayingDisplay"Frame 4Symbol 275 MovieClip [nowplayingdisplay]
"_video"Symbol 9 MovieClip [VideoPlayer] Frame 1Symbol 8 Video
"boundingBox_mc"Symbol 13 MovieClip [FLVPlayback] Frame 1Symbol 7 MovieClip
"bg"Symbol 98 MovieClip [viewport] Frame 1Symbol 97 MovieClip
"bg"Symbol 110 MovieClip [selectorDisplay] Frame 1Symbol 100 MovieClip
"txt"Symbol 110 MovieClip [selectorDisplay] Frame 1Symbol 101 EditableText
"playLight"Symbol 110 MovieClip [selectorDisplay] Frame 1Symbol 106 MovieClip
"expander"Symbol 110 MovieClip [selectorDisplay] Frame 1Symbol 109 MovieClip
"expander2"Symbol 110 MovieClip [selectorDisplay] Frame 1Symbol 109 MovieClip
"hitArea"Symbol 110 MovieClip [selectorDisplay] Frame 1Symbol 100 MovieClip
"icon"Symbol 117 MovieClip [FwdButton] Frame 1Symbol 116 MovieClip
"fwdButton"Symbol 134 MovieClip [coreControlMenu] Frame 1Symbol 117 MovieClip [FwdButton]
"playButton"Symbol 134 MovieClip [coreControlMenu] Frame 1Symbol 133 MovieClip [PlayButton]
"icon"Symbol 141 MovieClip [RecommendButton] Frame 1Symbol 140 MovieClip
"icon"Symbol 146 MovieClip [loveButton] Frame 1Symbol 145 MovieClip
"icon"Symbol 151 MovieClip [BanButton] Frame 1Symbol 150 MovieClip
"mc_bg"Symbol 158 MovieClip [Volume] Frame 1Symbol 154 MovieClip
"mc_bar"Symbol 158 MovieClip [Volume] Frame 1Symbol 157 MovieClip
"icon"Symbol 163 MovieClip [TagButton] Frame 1Symbol 162 MovieClip
"coreControlMenu"Symbol 164 MovieClip [LfmMenu] Frame 1Symbol 134 MovieClip [coreControlMenu]
"recommendButton"Symbol 164 MovieClip [LfmMenu] Frame 1Symbol 141 MovieClip [RecommendButton]
"loveButton"Symbol 164 MovieClip [LfmMenu] Frame 1Symbol 146 MovieClip [loveButton]
"banButton"Symbol 164 MovieClip [LfmMenu] Frame 1Symbol 151 MovieClip [BanButton]
"VolDisplayH"Symbol 164 MovieClip [LfmMenu] Frame 1Symbol 158 MovieClip [Volume]
"tagButton"Symbol 164 MovieClip [LfmMenu] Frame 1Symbol 163 MovieClip [TagButton]
"trackText"Symbol 176 MovieClip Frame 1Symbol 174 EditableText
"artistText"Symbol 176 MovieClip Frame 1Symbol 175 EditableText
"statusText"Symbol 178 MovieClip Frame 1Symbol 177 EditableText
"metadata"Symbol 179 MovieClip [StatusDisplay] Frame 1Symbol 176 MovieClip
"status_"Symbol 179 MovieClip [StatusDisplay] Frame 1Symbol 178 MovieClip
"durationDisplay"Symbol 180 MovieClip [TrackDisplay] Frame 1Symbol 167 MovieClip [DurationDisplay]
"elapsedText"Symbol 180 MovieClip [TrackDisplay] Frame 1Symbol 169 EditableText
"timeText"Symbol 180 MovieClip [TrackDisplay] Frame 1Symbol 170 EditableText
"statusDisplay"Symbol 180 MovieClip [TrackDisplay] Frame 1Symbol 179 MovieClip [StatusDisplay]
"trackDisplay"Symbol 181 MovieClip Frame 1Symbol 180 MovieClip [TrackDisplay]
"displayFrame"Symbol 182 MovieClip Frame 1Symbol 181 MovieClip
"bg"Symbol 183 MovieClip [LfmPlayer] Frame 1Symbol 94 MovieClip
"viewport"Symbol 183 MovieClip [LfmPlayer] Frame 1Symbol 98 MovieClip [viewport]
"loadingIcon"Symbol 183 MovieClip [LfmPlayer] Frame 1Symbol 81 MovieClip [loadingIcon]
"menu"Symbol 183 MovieClip [LfmPlayer] Frame 1Symbol 164 MovieClip [LfmMenu]
"display"Symbol 183 MovieClip [LfmPlayer] Frame 1Symbol 182 MovieClip
"bg"Symbol 203 MovieClip [stationItem] Frame 1Symbol 187 MovieClip
"titleText"Symbol 203 MovieClip [stationItem] Frame 1Symbol 189 EditableText
"descriptionText"Symbol 203 MovieClip [stationItem] Frame 1Symbol 190 EditableText
"hitArea"Symbol 203 MovieClip [stationItem] Frame 1Symbol 192 MovieClip
"infoBtn"Symbol 203 MovieClip [stationItem] Frame 1Symbol 195 MovieClip
"icon"Symbol 203 MovieClip [stationItem] Frame 1Symbol 200 MovieClip
"bg"Symbol 213 MovieClip [trackItem] Frame 1Symbol 204 MovieClip
"trackText"Symbol 213 MovieClip [trackItem] Frame 1Symbol 205 EditableText
"timeText"Symbol 213 MovieClip [trackItem] Frame 1Symbol 206 EditableText
"hitArea"Symbol 213 MovieClip [trackItem] Frame 1Symbol 192 MovieClip
"icon"Symbol 213 MovieClip [trackItem] Frame 1Symbol 209 MovieClip
"infoBtn"Symbol 213 MovieClip [trackItem] Frame 1Symbol 212 MovieClip
"txt"Symbol 224 MovieClip Frame 1Symbol 223 EditableText
"bg"Symbol 225 MovieClip [playlistItem] Frame 1Symbol 216 MovieClip
"playBtn"Symbol 225 MovieClip [playlistItem] Frame 1Symbol 221 MovieClip
"trackText"Symbol 225 MovieClip [playlistItem] Frame 1Symbol 222 EditableText
"label"Symbol 225 MovieClip [playlistItem] Frame 1Symbol 224 MovieClip
"bg"Symbol 228 MovieClip [stationTitleItem] Frame 1Symbol 216 MovieClip
"trackText"Symbol 228 MovieClip [stationTitleItem] Frame 1Symbol 227 EditableText
"bg"Symbol 232 MovieClip [selectorItem] Frame 1Symbol 230 MovieClip
"txt"Symbol 232 MovieClip [selectorItem] Frame 1Symbol 231 EditableText
"bg"Symbol 243 MovieClip [joinSubmitButton] Frame 1Symbol 241 MovieClip
"txt"Symbol 243 MovieClip [joinSubmitButton] Frame 1Symbol 242 EditableText
"bg"Symbol 245 MovieClip [cancelButton] Frame 1Symbol 241 MovieClip
"txt"Symbol 245 MovieClip [cancelButton] Frame 1Symbol 244 EditableText
"txt"Symbol 249 MovieClip Frame 1Symbol 248 EditableText
"backBtn"Symbol 250 MovieClip [ViewportMenuBar] Frame 1Symbol 249 MovieClip
"bg"Symbol 252 MovieClip [shuffleDisplay] Frame 1Symbol 97 MovieClip
"okBtn"Symbol 252 MovieClip [shuffleDisplay] Frame 1Symbol 243 MovieClip [joinSubmitButton]
"cancelBtn"Symbol 252 MovieClip [shuffleDisplay] Frame 1Symbol 245 MovieClip [cancelButton]
"menu"Symbol 252 MovieClip [shuffleDisplay] Frame 1Symbol 250 MovieClip [ViewportMenuBar]
"mask"Symbol 270 MovieClip Frame 1Symbol 261 MovieClip
"bg"Symbol 274 MovieClip [buyButton] Frame 1Symbol 270 MovieClip
"txt"Symbol 274 MovieClip [buyButton] Frame 1Symbol 271 EditableText
"albumFrame"Symbol 275 MovieClip [nowplayingdisplay] Frame 1Symbol 255 MovieClip
"albumart_bg"Symbol 275 MovieClip [nowplayingdisplay] Frame 1Symbol 258 MovieClip
"albumText"Symbol 275 MovieClip [nowplayingdisplay] Frame 1Symbol 259 EditableText
"menu"Symbol 275 MovieClip [nowplayingdisplay] Frame 1Symbol 250 MovieClip [ViewportMenuBar]
"buyButton"Symbol 275 MovieClip [nowplayingdisplay] Frame 1Symbol 274 MovieClip [buyButton]
"mc_bg"Symbol 286 MovieClip [handle] Frame 1Symbol 278 MovieClip
"mc_bot"Symbol 286 MovieClip [handle] Frame 1Symbol 281 MovieClip
"mc_top"Symbol 286 MovieClip [handle] Frame 1Symbol 284 MovieClip
"mc_grip"Symbol 286 MovieClip [handle] Frame 1Symbol 285 MovieClip
"bg"Symbol 290 MovieClip [scrollbar] Frame 1Symbol 277 MovieClip
"handle"Symbol 290 MovieClip [scrollbar] Frame 1Symbol 286 MovieClip [handle]
"upBtn"Symbol 290 MovieClip [scrollbar] Frame 1Symbol 289 MovieClip
"downBtn"Symbol 290 MovieClip [scrollbar] Frame 1Symbol 289 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 4 as "rwd_button"
ExportAssets (56)Timeline Frame 1Symbol 9 as "VideoPlayer"
ExportAssets (56)Timeline Frame 1Symbol 12 as "Icon"
ExportAssets (56)Timeline Frame 1Symbol 13 as "FLVPlayback"
ExportAssets (56)Timeline Frame 1Symbol 81 as "loadingIcon"
ExportAssets (56)Timeline Frame 3Symbol 291 as "__Packages.lib.lfm.display.LfmUIElement"
ExportAssets (56)Timeline Frame 3Symbol 16 as "__Packages.mx.events.EventDispatcher"
ExportAssets (56)Timeline Frame 3Symbol 292 as "__Packages.app.controller.Controller"
ExportAssets (56)Timeline Frame 3Symbol 293 as "__Packages.lib.lfm.core.LfmController"
ExportAssets (56)Timeline Frame 3Symbol 294 as "__Packages.app.controller.VolumeController"
ExportAssets (56)Timeline Frame 3Symbol 295 as "__Packages.lib.lfm.core.ServiceLocator"
ExportAssets (56)Timeline Frame 3Symbol 296 as "__Packages.etc.Conf"
ExportAssets (56)Timeline Frame 3Symbol 297 as "__Packages.lib.lfm.core.LfmError"
ExportAssets (56)Timeline Frame 3Symbol 298 as "__Packages.app.controller.TrackController"
ExportAssets (56)Timeline Frame 3Symbol 299 as "__Packages.lib.lfm.core.model.LfmModel"
ExportAssets (56)Timeline Frame 3Symbol 300 as "__Packages.lib.lfm.core.model.Track"
ExportAssets (56)Timeline Frame 3Symbol 301 as "__Packages.lib.lfm.core.model.Artist"
ExportAssets (56)Timeline Frame 3Symbol 19 as "__Packages.mx.utils.Delegate"
ExportAssets (56)Timeline Frame 3Symbol 302 as "__Packages.app.view.button.PlayButton"
ExportAssets (56)Timeline Frame 3Symbol 303 as "__Packages.app.controller.UserController"
ExportAssets (56)Timeline Frame 3Symbol 304 as "__Packages.app.controller.LanguageController"
ExportAssets (56)Timeline Frame 3Symbol 305 as "__Packages.app.controller.ActivityController"
ExportAssets (56)Timeline Frame 3Symbol 306 as "__Packages.app.controller.DisplayController"
ExportAssets (56)Timeline Frame 3Symbol 307 as "__Packages.lib.lfm.core.LfmDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 308 as "__Packages.lib.lfm.display.LfmButton"
ExportAssets (56)Timeline Frame 3Symbol 309 as "__Packages.app.controller.SkipRestrictionDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 310 as "__Packages.lib.lfm.display.LfmEffect"
ExportAssets (56)Timeline Frame 3Symbol 311 as "__Packages.app.controller.TagDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 312 as "__Packages.app.controller.TrackDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 313 as "__Packages.app.controller.RecommendDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 314 as "__Packages.app.controller.StationDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 315 as "__Packages.app.controller.UnauthorisedDisplayController"
ExportAssets (56)Timeline Frame 3Symbol 316 as "__Packages.app.controller.KeyboardController"
ExportAssets (56)Timeline Frame 3Symbol 317 as "__Packages.lib.lfm.core.model.Playlist"
ExportAssets (56)Timeline Frame 3Symbol 318 as "__Packages.app.controller.MenuController"
ExportAssets (56)Timeline Frame 3Symbol 319 as "__Packages.app.controller.PlaylistController"
ExportAssets (56)Timeline Frame 3Symbol 320 as "__Packages.lib.lfm.xml.xspf.XSPF"
ExportAssets (56)Timeline Frame 3Symbol 321 as "__Packages.lib.lfm.xml.xspf.XSPFParser"
ExportAssets (56)Timeline Frame 3Symbol 322 as "__Packages.lib.lfm.core.LfmDate"
ExportAssets (56)Timeline Frame 3Symbol 323 as "__Packages.lib.ext.ascrypt.Base64"
ExportAssets (56)Timeline Frame 3Symbol 324 as "__Packages.app.view.button.FwdButton"
ExportAssets (56)Timeline Frame 3Symbol 325 as "__Packages.app.controller.StationController"
ExportAssets (56)Timeline Frame 3Symbol 326 as "__Packages.app.controller.ViewportController"
ExportAssets (56)Timeline Frame 3Symbol 327 as "__Packages.lib.lfm.xml.PlaylistsParser"
ExportAssets (56)Timeline Frame 3Symbol 328 as "__Packages.lib.lfm.core.model.Station"
ExportAssets (56)Timeline Frame 3Symbol 329 as "__Packages.app.view.display.ScrollBar"
ExportAssets (56)Timeline Frame 3Symbol 330 as "__Packages.app.view.display.Viewport"
ExportAssets (56)Timeline Frame 3Symbol 331 as "__Packages.app.view.menu.TrackItem"
ExportAssets (56)Timeline Frame 3Symbol 332 as "__Packages.app.view.menu.StationItem"
ExportAssets (56)Timeline Frame 3Symbol 333 as "__Packages.app.view.display.SelectorDisplay"
ExportAssets (56)Timeline Frame 3Symbol 334 as "__Packages.app.view.menu.CoreControlMenu"
ExportAssets (56)Timeline Frame 3Symbol 335 as "__Packages.app.view.button.RecommendButton"
ExportAssets (56)Timeline Frame 3Symbol 336 as "__Packages.app.view.button.LoveButton"
ExportAssets (56)Timeline Frame 3Symbol 337 as "__Packages.app.view.button.BanButton"
ExportAssets (56)Timeline Frame 3Symbol 338 as "__Packages.app.view.display.VolDisplayHorizontal"
ExportAssets (56)Timeline Frame 3Symbol 339 as "__Packages.app.view.button.TagButton"
ExportAssets (56)Timeline Frame 3Symbol 340 as "__Packages.app.view.menu.LfmMenu"
ExportAssets (56)Timeline Frame 3Symbol 341 as "__Packages.app.view.display.DurationDisplay"
ExportAssets (56)Timeline Frame 3Symbol 342 as "__Packages.app.view.display.StatusDisplay"
ExportAssets (56)Timeline Frame 3Symbol 343 as "__Packages.app.view.display.TrackDisplay"
ExportAssets (56)Timeline Frame 3Symbol 344 as "__Packages.app.view.menu.PlaylistItem"
ExportAssets (56)Timeline Frame 3Symbol 345 as "__Packages.app.view.menu.SelectorItem"
ExportAssets (56)Timeline Frame 3Symbol 346 as "__Packages.app.view.button.JoinSubmitButton"
ExportAssets (56)Timeline Frame 3Symbol 347 as "__Packages.app.view.button.CancelButton"
ExportAssets (56)Timeline Frame 3Symbol 348 as "__Packages.app.view.display.ViewportMenuBar"
ExportAssets (56)Timeline Frame 3Symbol 349 as "__Packages.app.view.display.ShuffleDisplay"
ExportAssets (56)Timeline Frame 3Symbol 350 as "__Packages.app.view.display.NowPlayingDisplay"
ExportAssets (56)Timeline Frame 3Symbol 351 as "__Packages.app.view.display.ScrollBarHandle"
ExportAssets (56)Timeline Frame 3Symbol 352 as "__Packages.app.Main"
ExportAssets (56)Timeline Frame 3Symbol 353 as "__Packages.lib.lfm.core.LfmLogger"
ExportAssets (56)Timeline Frame 3Symbol 354 as "__Packages.lib.lfm.core.LfmClient"
ExportAssets (56)Timeline Frame 3Symbol 355 as "__Packages.lib.ext.http.xmlrpc.IConnection"
ExportAssets (56)Timeline Frame 3Symbol 356 as "__Packages.lib.ext.http.xmlrpc.MethodFault"
ExportAssets (56)Timeline Frame 3Symbol 357 as "__Packages.lib.ext.http.xmlrpc.Connection"
ExportAssets (56)Timeline Frame 3Symbol 358 as "__Packages.lib.ext.http.xmlrpc.IMethodCall"
ExportAssets (56)Timeline Frame 3Symbol 359 as "__Packages.lib.ext.http.xmlrpc.MethodCall"
ExportAssets (56)Timeline Frame 3Symbol 360 as "__Packages.lib.ext.http.xmlrpc.util.XMLRPCDataTypes"
ExportAssets (56)Timeline Frame 3Symbol 361 as "__Packages.lib.ext.http.xmlrpc.util.XMLRPCUtils"
ExportAssets (56)Timeline Frame 3Symbol 362 as "__Packages.lib.ext.http.xmlrpc.Parser"
ExportAssets (56)Timeline Frame 3Symbol 363 as "__Packages.lib.ext.http.xmlrpc.ParserImpl"
ExportAssets (56)Timeline Frame 3Symbol 364 as "__Packages.lib.ext.http.xmlrpc.MethodFaultImpl"
ExportAssets (56)Timeline Frame 3Symbol 365 as "__Packages.lib.lfm.xml.rpc.LfmConnection"
ExportAssets (56)Timeline Frame 3Symbol 366 as "__Packages.lib.lfm.core.model.User"
ExportAssets (56)Timeline Frame 3Symbol 367 as "__Packages.lib.lfm.core.WSClient"
ExportAssets (56)Timeline Frame 3Symbol 368 as "__Packages.lib.lfm.core.LfmStation"
ExportAssets (56)Timeline Frame 3Symbol 369 as "__Packages.lib.lfm.core.LfmScrobbler"
ExportAssets (56)Timeline Frame 3Symbol 5 as "__Packages.mx.video.FLVPlayback"
ExportAssets (56)Timeline Frame 3Symbol 14 as "__Packages.mx.video.VideoPlayer"
ExportAssets (56)Timeline Frame 3Symbol 15 as "__Packages.mx.video.INCManager"
ExportAssets (56)Timeline Frame 3Symbol 17 as "__Packages.mx.video.VideoError"
ExportAssets (56)Timeline Frame 3Symbol 18 as "__Packages.mx.video.UIManager"
ExportAssets (56)Timeline Frame 3Symbol 20 as "__Packages.mx.video.SMILManager"
ExportAssets (56)Timeline Frame 3Symbol 21 as "__Packages.mx.video.FPADManager"
ExportAssets (56)Timeline Frame 3Symbol 22 as "__Packages.mx.video.NCManager"
ExportAssets (56)Timeline Frame 3Symbol 23 as "__Packages.mx.video.CuePointManager"
ExportAssets (56)Timeline Frame 4Symbol 98 as "viewport"
ExportAssets (56)Timeline Frame 4Symbol 110 as "selectorDisplay"
ExportAssets (56)Timeline Frame 4Symbol 117 as "FwdButton"
ExportAssets (56)Timeline Frame 4Symbol 133 as "PlayButton"
ExportAssets (56)Timeline Frame 4Symbol 134 as "coreControlMenu"
ExportAssets (56)Timeline Frame 4Symbol 141 as "RecommendButton"
ExportAssets (56)Timeline Frame 4Symbol 146 as "loveButton"
ExportAssets (56)Timeline Frame 4Symbol 151 as "BanButton"
ExportAssets (56)Timeline Frame 4Symbol 158 as "Volume"
ExportAssets (56)Timeline Frame 4Symbol 163 as "TagButton"
ExportAssets (56)Timeline Frame 4Symbol 164 as "LfmMenu"
ExportAssets (56)Timeline Frame 4Symbol 167 as "DurationDisplay"
ExportAssets (56)Timeline Frame 4Symbol 172 as "trackTextMask"
ExportAssets (56)Timeline Frame 4Symbol 179 as "StatusDisplay"
ExportAssets (56)Timeline Frame 4Symbol 180 as "TrackDisplay"
ExportAssets (56)Timeline Frame 4Symbol 183 as "LfmPlayer"
ExportAssets (56)Timeline Frame 4Symbol 185 as "playerMask"
ExportAssets (56)Timeline Frame 4Symbol 203 as "stationItem"
ExportAssets (56)Timeline Frame 4Symbol 213 as "trackItem"
ExportAssets (56)Timeline Frame 4Symbol 225 as "playlistItem"
ExportAssets (56)Timeline Frame 4Symbol 226 as "albumFrame_"
ExportAssets (56)Timeline Frame 4Symbol 228 as "stationTitleItem"
ExportAssets (56)Timeline Frame 4Symbol 232 as "selectorItem"
ExportAssets (56)Timeline Frame 4Symbol 233 as "viewportMask"
ExportAssets (56)Timeline Frame 4Symbol 243 as "joinSubmitButton"
ExportAssets (56)Timeline Frame 4Symbol 245 as "cancelButton"
ExportAssets (56)Timeline Frame 4Symbol 250 as "ViewportMenuBar"
ExportAssets (56)Timeline Frame 4Symbol 252 as "shuffleDisplay"
ExportAssets (56)Timeline Frame 4Symbol 274 as "buyButton"
ExportAssets (56)Timeline Frame 4Symbol 275 as "nowplayingdisplay"
ExportAssets (56)Timeline Frame 4Symbol 286 as "handle"
ExportAssets (56)Timeline Frame 4Symbol 290 as "scrollbar"

Labels

"license"Frame 1
"loading"Frame 1
"loading_"Frame 2
"version"Frame 3
"version_"Frame 4
"assets"Frame 4
"assets_"Frame 5
"app"Frame 5
"app_"Frame 6
"handleJSTuning"Frame 7
"handleJSPreviewSkip"Frame 8
"handleJSStopPlayback"Frame 9
"handleJSVolume"Frame 10
"showPlayer"Frame 11
"hidePlayer"Frame 12
"stopped"Symbol 106 MovieClip Frame 1
"playing"Symbol 106 MovieClip Frame 2
"collapsed"Symbol 109 MovieClip Frame 1
"expanded"Symbol 109 MovieClip Frame 2
"onRelease"Symbol 116 MovieClip Frame 1
"onclick"Symbol 116 MovieClip Frame 2
"inactive"Symbol 116 MovieClip Frame 3
"active"Symbol 117 MovieClip [FwdButton] Frame 1
"active"Symbol 133 MovieClip [PlayButton] Frame 1
"onclick"Symbol 133 MovieClip [PlayButton] Frame 2
"inactive"Symbol 133 MovieClip [PlayButton] Frame 3
"playing_active"Symbol 133 MovieClip [PlayButton] Frame 4
"playing_onclick"Symbol 133 MovieClip [PlayButton] Frame 5
"playing_inactive"Symbol 133 MovieClip [PlayButton] Frame 6
"breathing"Symbol 133 MovieClip [PlayButton] Frame 25
"loading"Symbol 133 MovieClip [PlayButton] Frame 50
"onRelease"Symbol 140 MovieClip Frame 1
"onClick"Symbol 140 MovieClip Frame 2
"inactive"Symbol 140 MovieClip Frame 3
"onRelease"Symbol 145 MovieClip Frame 1
"onClick"Symbol 145 MovieClip Frame 2
"inactive"Symbol 145 MovieClip Frame 3
"onRelease"Symbol 150 MovieClip Frame 1
"onClick"Symbol 150 MovieClip Frame 2
"inactive"Symbol 150 MovieClip Frame 3
"onRelease"Symbol 162 MovieClip Frame 1
"onClick"Symbol 162 MovieClip Frame 2
"inactive"Symbol 162 MovieClip Frame 3
"stopped"Symbol 180 MovieClip [TrackDisplay] Frame 1
"playing"Symbol 180 MovieClip [TrackDisplay] Frame 8
"stopped"Symbol 221 MovieClip Frame 1
"playing"Symbol 221 MovieClip Frame 2
"onrelease"Symbol 241 MovieClip Frame 1
"onclick"Symbol 241 MovieClip Frame 2
"inactive"Symbol 241 MovieClip Frame 3
"onRelease"Symbol 243 MovieClip [joinSubmitButton] Frame 1
"onClick"Symbol 243 MovieClip [joinSubmitButton] Frame 2
"inactive"Symbol 243 MovieClip [joinSubmitButton] Frame 3
"onRelease"Symbol 245 MovieClip [cancelButton] Frame 1
"onClick"Symbol 245 MovieClip [cancelButton] Frame 2
"inactive"Symbol 245 MovieClip [cancelButton] Frame 3
"buy"Symbol 270 MovieClip Frame 1
"buyHover"Symbol 270 MovieClip Frame 2
"download"Symbol 270 MovieClip Frame 3
"downloadHover"Symbol 270 MovieClip Frame 4
"onRelease"Symbol 274 MovieClip [buyButton] Frame 1
"onClick"Symbol 274 MovieClip [buyButton] Frame 2
"inactive"Symbol 274 MovieClip [buyButton] Frame 3
"collapsed"Symbol 289 MovieClip Frame 1
"expanded"Symbol 289 MovieClip Frame 2




http://swfchan.com/9/43819/info.shtml
Created: 9/5 -2019 00:13:57 Last modified: 9/5 -2019 00:13:57 Server time: 22/12 -2024 03:57:52