Frame 1
if (this.config == undefined) {
var config = this.tomy;
}
var swfName = _root._url;
var playerIndex = swfName.indexOf("mp3player");
var swfIndex = swfName.indexOf(".swf");
swfName = unescape(swfName.substring(playerIndex, swfIndex + 4));
trace("swfName: " + swfName);
if (swfName == "mp3player.swf") {
swfName = "MYSPACE";
} else if (swfName == "mp3player_forprofile.swf") {
swfName = "SITE";
} else if (swfName == "mp3player-othersite.swf") {
swfName = "OTHERSITE";
} else if (swfName == "mp3player-standalone.swf") {
swfName = "STANDALONE";
}
System.security.allowDomain("bin.clearspring.com");
System.security.allowDomain("widgets.clearspring.com");
var mpl = (new com.jeroenwijering.players.MediaPlayer(this.player));
Symbol 61 MovieClip Frame 1
icn._accProps = new Object();
icn._accProps.silent = true;
bar._accProps = new Object();
bar._accProps.silent = true;
bck._accProps = new Object();
bck._accProps.silent = true;
Symbol 89 MovieClip Frame 1
playpause._accProps = new Object();
playpause._accProps.name = "Pause";
playpause._accProps.shortcut = "p";
stop._accProps = new Object();
stop._accProps.name = "Previous";
stop._accProps.shortcut = "r";
prev._accProps = new Object();
prev._accProps.name = "Previous";
prev._accProps.shortcut = "r";
next._accProps = new Object();
next._accProps.name = "Next";
next._accProps.shortcut = "n";
scrub._accProps = new Object();
scrub._accProps.silent = true;
fs._accProps = new Object();
fs._accProps.name = "Full Screen";
fs._accProps.shortcut = "f";
dl._accProps = new Object();
dl._accProps.name = "Download";
dl._accProps.shortcut = "d";
au._accProps = new Object();
au._accProps.name = "Audio Description";
au._accProps.shortcut = "a";
cc._accProps = new Object();
cc._accProps.name = "Captions";
cc._accProps.shortcut = "c";
vol._accProps = new Object();
vol._accProps.name = "Mute";
vol._accProps.shortcut = "m";
playpause.tabIndex = 2;
prev.tabIndex = 3;
stop.tabIndex = 3;
next.tabIndex = 4;
fs.tabIndex = 5;
vol.tabIndex = 9;
cc.tabIndex = 7;
au.tabIndex = 8;
dl.tabIndex = 6;
Symbol 107 MovieClip Frame 1
video._accProps = new Object();
video._accProps.silent = true;
back._accProps = new Object();
back._accProps.name = "Link";
back._accProps.shortcut = "l";
back.tabIndex = 1;
Symbol 123 MovieClip [__Packages.com.jeroenwijering.feeds.FeedListener] Frame 0
interface com.jeroenwijering.feeds.FeedListener
{
}
Symbol 124 MovieClip [__Packages.com.jeroenwijering.players.AbstractPlayer] Frame 0
class com.jeroenwijering.players.AbstractPlayer implements com.jeroenwijering.feeds.FeedListener
{
var config, manager, feeder, controller;
function AbstractPlayer (tgt) {
var ref = this;
config.clip = tgt;
manager = new com.jeroenwijering.utils.ConfigManager(true);
manager.onComplete = function () {
ref.fillConfig();
};
manager.loadConfig(config);
}
function fillConfig() {
((config.largecontrols == "true") ? ((config.controlbar = config.controlbar * 2)) : null);
if (config.displayheight == undefined) {
config.displayheight = config.height - config.controlbar;
} else if (Number(config.displayheight) > Number(config.height)) {
config.displayheight = config.height;
}
if (config.displaywidth == undefined) {
config.displaywidth = config.width;
}
((config.bwstreams == undefined) ? (loadFile()) : (checkStream()));
}
function checkStream() {
}
function loadFile(str) {
feeder = new com.jeroenwijering.feeds.FeedManager(true, config.enablejs, config.prefix, str);
feeder.addListener(this);
feeder.loadFile({file:config.file});
}
function onFeedUpdate(typ) {
if (controller == undefined) {
config.clip._visible = true;
config.clip._alpha = 100;
config.clip._parent.ad_txt._visible = false;
config.clip._parent.activity._visible = false;
config.clip._parent.ppl_logo._visible = false;
config.clip._parent.bgfill._visible = false;
setupMCV();
}
}
function setupMCV() {
controller = new com.jeroenwijering.players.AbstractController(config, feeder);
var _local5 = new com.jeroenwijering.players.AbstractView(controller, config, feeder);
var _local2 = new Array(_local5);
var _local3 = new com.jeroenwijering.players.AbstractModel(_local2, controller, config, feeder);
var _local4 = new Array(_local3);
controller.startMCV(_local4);
}
}
Symbol 125 MovieClip [__Packages.com.jeroenwijering.feeds.FeedManager] Frame 0
class com.jeroenwijering.feeds.FeedManager
{
var enclosures, stream, listeners, playlistConfig, playlistRC4, feed, feedXML, onlymp3s, ischapters, captions, audio;
function FeedManager (enc, jvs, pre, str) {
((enc == true) ? ((enclosures = true)) : ((enclosures = false)));
((jvs == "true") ? (enableJavascript()) : null);
((pre == undefined) ? null : ((prefix = pre)));
((str == undefined) ? null : ((stream = "_" + str)));
listeners = new Array();
playlistConfig = new com.jeroenwijering.players.Config();
playlistRC4 = new com.jeroenwijering.players.rc4();
}
function enableJavascript() {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.addCallback("loadFile", this, loadFile);
flash.external.ExternalInterface.addCallback("addItem", this, addItem);
flash.external.ExternalInterface.addCallback("removeItem", this, removeItem);
flash.external.ExternalInterface.addCallback("itemData", this, itemData);
flash.external.ExternalInterface.addCallback("getLength", this, getLength);
}
}
function loadFile(obj) {
for (var _local7 in elements) {
if ((obj[_local7] != undefined) && (obj[_local7].indexOf("asfunction") == -1)) {
_root[_local7] = obj[_local7];
} else if (feed != undefined) {
delete _root[_local7];
}
}
if (obj.file.substr(0, 4).toLowerCase() != "http") {
obj.file = playlistRC4.decrypt(obj.file, playlistConfig.myKey);
_root.file = obj.file;
trace(obj.file);
}
feed = new Array();
var _local5 = "xml";
var _local4 = filetypes.length;
while (_local4-- , _local4 >= 0) {
if (obj.file.substr(0, 4).toLowerCase() == "rtmp") {
_local5 = "rtmp";
} else if ((_root.type == filetypes[_local4]) || (obj.file.substr(-3).toLowerCase() == filetypes[_local4])) {
_local5 = filetypes[_local4];
}
}
trace(_local5);
if ((_local5 == "xml") && (obj.file.indexOf("asfunction") == -1)) {
loadXML(unescape(obj.file));
trace("load xml");
} else {
feed[0] = new Object();
feed[0].type = _local5;
for (var _local6 in elements) {
if (_root[_local6] != undefined) {
feed[0][_local6] = unescape(_root[_local6]);
}
}
feed[0].description = obj.title;
feed[0].bluewireid = obj.trackid;
feed[0].link = "http://www.playlist.com/playlist/additem/" + obj.bluewireid;
playersPostProcess();
}
}
function loadXML(url) {
var ref = this;
feedXML = new XML();
feedXML.ignoreWhite = true;
feedXML.onLoad = function (scs) {
if (scs) {
var _local4 = this.firstChild.nodeName.toLowerCase();
if (_local4 == "rss") {
} else if (_local4 == "feed") {
} else if (_local4 == "playlist") {
} else if (_local4 == "asx") {
}
if (_root.audio != undefined) {
ref.feed[0].audio = unescape(_root.audio);
}
ref.parser = new com.jeroenwijering.feeds.XSPFParser(ref.prefix);
ref.feed = ref.parser.parse(this);
ref.playersPostProcess(url);
} else if ((ref.playlistConfig.playerLocation == "MYSPACE") || (ref.playlistConfig.playerLocation == "OTHERSITE")) {
var _local4 = new TextFormat();
var _local3 = _root.createTextField("error_txt", _root.getNextHightestDepth(), Stage.width / 2, Stage.height / 2, 250, 200);
_local3.html = true;
_local3.multiline = true;
_local3.wordWrap = true;
_local4.font = "_sans";
_local4.align = "center";
_local3.htmlText = ref.playlistConfig.myspaceErrorText;
_local3.setTextFormat(_local4);
_root.activity._visible = false;
_local3._x = (Stage.width / 2) - (_local3._width / 2);
_local3._y = (_root.ppl_logo._y + _root.ppl_logo._height) + 10;
}
};
if (_root._url.indexOf("file://") > -1) {
feedXML.load(url);
} else if (url.indexOf("?") > -1) {
feedXML.load((url + "&") + random(999));
} else {
feedXML.load((url + "?") + random(999));
}
}
function playersPostProcess(url) {
onlymp3s = true;
((feed.length > 1) ? ((ischapters = true)) : ((ischapters = false)));
captions = false;
audio = false;
var _local2 = 0;
while (_local2 < feed.length) {
if (stream != undefined) {
if (feed[_local2].type == "rtmp") {
feed[_local2].id = feed[_local2].id + stream;
feed[_local2].file = prefix + feed[_local2].file;
} else if (feed[_local2].type == "flv") {
feed[_local2].file = ((prefix + feed[_local2].file.substr(0, feed[_local2].file.length - 4)) + stream) + feed[_local2].file.substr(-4);
}
}
if (feed[_local2].type != "mp3") {
onlymp3s = false;
}
if (feed[_local2].start == undefined) {
feed[_local2].start = 0;
}
if (feed[_local2].file != feed[0].file) {
ischapters = false;
}
if (feed[_local2].captions != undefined) {
captions = true;
}
if (feed[_local2].audio != undefined) {
audio = true;
}
if ((feed[_local2].duration == undefined) || (isNaN(feed[_local2].duration))) {
feed[_local2].duration = 0;
}
if (feed[_local2].fallback != undefined) {
var _local3 = System.capabilities.version.split(" ")[1].substr(0, 1);
var _local4 = System.capabilities.version.split(",")[2];
if ((_local3 < 9) || ((_local3 == 9) && (_local4 < 60))) {
feed[_local2].file = feed[_local2].fallback;
}
}
_local2++;
}
updateListeners("new");
}
function getLength() {
return(feed.length);
}
function addItem(obj, idx) {
obj.description = obj.title;
obj.bluewireid = obj.trackid;
obj.link = "http://www.playlist.com/playlist/additem/" + obj.bluewireid;
if (obj.type == undefined) {
obj.type = obj.file.substr(-3);
}
if ((arguments.length == 1) || (idx >= feed.length)) {
feed.push(obj);
} else {
var _local4 = feed.slice(0, idx);
var _local6 = feed.slice(idx);
_local4.push(obj);
feed = _local4.concat(_local6);
}
updateListeners("add");
}
function removeItem(idx) {
if (feed.length == 1) {
return(undefined);
}
if ((arguments.length == 0) || (idx >= feed.length)) {
feed.pop();
} else {
feed.splice(idx, 1);
}
updateListeners("remove");
}
function itemData(idx) {
return(feed[idx]);
}
function addListener(lst) {
listeners.push(lst);
}
function removeListener(lst) {
var _local2 = listeners.length;
while (_local2-- , _local2 >= 0) {
if (listeners[_local2] == lst) {
listeners.splice(_local2, 1);
return(undefined);
}
}
}
function updateListeners(typ) {
var _local2 = listeners.length;
while (_local2-- , _local2 >= 0) {
listeners[_local2].onFeedUpdate(typ);
}
}
var prefix = "";
var filetypes = Array("flv", "mp3", "rbs", "jpg", "gif", "png", "rtmp", "swf", "mp4", "m4v", "m4a", "mov", "3gp", "3g2");
var elements = {file:"", fallback:"", title:"", link:"", id:"", image:"", author:"", captions:"", audio:"", category:"", start:"", type:"", duration:""};
}
Symbol 126 MovieClip [__Packages.com.jeroenwijering.feeds.AbstractParser] Frame 0
class com.jeroenwijering.feeds.AbstractParser
{
var elements, mimetypes;
function AbstractParser (pre) {
setElements();
setMimes();
}
function setElements() {
elements = new Object();
}
function setMimes() {
mimetypes = new Object();
mimetypes.mp3 = "mp3";
mimetypes["audio/mpeg"] = "mp3";
mimetypes.flv = "flv";
mimetypes["video/x-flv"] = "flv";
mimetypes.jpeg = "jpg";
mimetypes.jpg = "jpg";
mimetypes["image/jpeg"] = "jpg";
mimetypes.png = "png";
mimetypes["image/png"] = "png";
mimetypes.gif = "gif";
mimetypes["image/gif"] = "gif";
mimetypes.rtmp = "rtmp";
mimetypes.swf = "swf";
mimetypes["application/x-shockwave-flash"] = "swf";
mimetypes.rtmp = "rtmp";
mimetypes["application/x-fcs"] = "rtmp";
mimetypes["audio/x-m4a"] = "m4a";
mimetypes["video/x-m4v"] = "m4v";
mimetypes["video/H264"] = "mp4";
mimetypes["video/3gpp"] = "3gp";
mimetypes["video/x-3gpp2"] = "3g2";
mimetypes["audio/x-3gpp2"] = "3g2";
mimetypes["text/html"] = "html";
mimetypes["text/html"] = "tml";
mimetypes.php = "php";
}
function parse(xml) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < xml.firstChild.childNodes.length) {
_local3.push(xml.firstChild.childNodes[_local1].nodeName);
_local1++;
}
return(_local3);
}
function rfc2Date(dat) {
if (isNaN(dat)) {
var _local2 = dat.split(" ");
((_local2[1] == "") ? (_local2.splice(1, 1)) : null);
var _local9 = MONTH_INDEXES[_local2[2]];
var _local7 = _local2[1].substring(0, 2);
var _local10 = _local2[3];
var _local4 = _local2[5];
var _local5 = _local2[4].split(":");
var _local6 = new Date(_local10, _local9, _local7, _local5[0], _local5[1], _local5[2]);
var _local3 = Math.round(_local6.valueOf() / 1000) - (_local6.getTimezoneOffset() * 60);
if (isNaN(_local4)) {
_local3 = _local3 - (3600 * timezones[_local4]);
} else {
_local3 = _local3 - ((3600 * Number(_local4.substring(0, 3))) - (60 * Number(_local4.substring(3, 2))));
}
dat = new Date(_local3 * 1000);
return(_local3);
}
return(dat);
}
function iso2Date(dat) {
if (isNaN(dat)) {
while (dat.indexOf(" ") > -1) {
var _local1 = dat.indexOf(" ");
dat = dat.substr(0, _local1) + dat.substr(_local1 + 1);
}
var _local3 = new Date(dat.substr(0, 4), dat.substr(5, 2) - 1, dat.substr(8, 2), dat.substr(11, 2), dat.substr(14, 2), dat.substr(17, 2));
var _local2 = Math.round(_local3.valueOf() / 1000) - (_local3.getTimezoneOffset() * 60);
if (dat.length > 20) {
var _local4 = Number(dat.substr(20, 2));
var _local5 = Number(dat.substr(23, 2));
if (dat.charAt(19) == "-") {
_local2 = (_local2 - (_local4 * 3600)) - (_local5 * 60);
} else {
_local2 = _local2 + ((_local4 * 3600) + (_local5 * 60));
}
dat = new Date(_local2 * 1000);
}
return(_local2);
}
return(dat);
}
var timezones = {IDLW:-12, NT:-11, AHST:-10, CAT:-10, HST:-10, YST:-9, PST:-8, MST:-7, PDT:-7, CST:-6, EST:-5, CDT:-5, EDT:-4, ADT:-3, WBT:-4, AST:-4, NT:-3.5, EBT:-3, AT:-2, WAT:-1, UTC:0, UT:0, GMT:0, WET:0, CET:1, CEST:1, EET:2, EEDT:3, MSK:3, IRT:3.5, SAMT:4, YEKT:5, TMT:5, TJT:5, OMST:6, NOVT:6, LKT:6, MMT:6.5, KRAT:7, ICT:7, WIT:7, WAST:7, IRKT:8, ULAT:8, CST:8, CIT:8, BNT:8, YAKT:9, JST:9, KST:9, EIT:9, ACST:9.5, VLAT:10, ACDT:10.5, SAKT:10, GST:10, MAGT:11, IDLE:12, PETT:12, NZST:12};
var MONTH_INDEXES = {January:0, February:1, March:2, April:3, May:4, June:5, July:6, August:7, September:8, October:9, November:10, December:11, Jan:0, Feb:1, Mar:2, Apr:3, May:4, Jun:5, Jul:6, Aug:7, Sep:8, Oct:9, Nov:10, Dec:11};
}
Symbol 127 MovieClip [__Packages.com.jeroenwijering.players.rc4] Frame 0
class com.jeroenwijering.players.rc4
{
function rc4 () {
}
function encrypt(src, key) {
var _local4 = strToChars(src);
var _local2 = strToChars(key);
var _local3 = calculate(_local4, _local2);
return(charsToHex(_local3));
}
function decrypt(src, key) {
var _local4 = hexToChars(src);
var _local2 = strToChars(key);
var _local3 = calculate(_local4, _local2);
return(charsToStr(_local3));
}
function initialize(pwd) {
var _local3 = 0;
var _local4;
var _local5 = pwd.length;
var _local2 = 0;
while (_local2 <= 255) {
mykey[_local2] = pwd[_local2 % _local5];
sbox[_local2] = _local2;
_local2++;
}
_local2 = 0;
while (_local2 <= 255) {
_local3 = ((_local3 + sbox[_local2]) + mykey[_local2]) % 256;
_local4 = sbox[_local2];
sbox[_local2] = sbox[_local3];
sbox[_local3] = _local4;
_local2++;
}
}
function calculate(plaintxt, psw) {
initialize(psw);
var _local2 = 0;
var _local3 = 0;
var _local10 = new Array();
var _local8;
var _local6;
var _local7;
var _local4 = 0;
while (_local4 < plaintxt.length) {
_local2 = (_local2 + 1) % 256;
_local3 = (_local3 + sbox[_local2]) % 256;
_local6 = sbox[_local2];
sbox[_local2] = sbox[_local3];
sbox[_local3] = _local6;
var _local5 = (sbox[_local2] + sbox[_local3]) % 256;
_local8 = sbox[_local5];
_local7 = plaintxt[_local4] ^ _local8;
_local10.push(_local7);
_local4++;
}
return(_local10);
}
function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
var sbox = new Array(255);
var mykey = new Array(255);
}
Symbol 128 MovieClip [__Packages.com.jeroenwijering.players.Config] Frame 0
class com.jeroenwijering.players.Config
{
var playerLocation;
function Config () {
playerLocation = _root.swfName;
}
var debugMode = false;
var loggingMode = true;
var baseUrl = "http://www.playlist.com";
var badSongUrl = "http://www.playlist.com";
var badSongNodeUrl = "http://www.playlist.com/error.php";
var playlistUrl = "";
var configUrl = "";
var addText = "Add this track to your playlist";
var addText2 = "(copy and paste link to your browser to add this song)";
var urlText = "Song streamed from:";
var urlText2 = "(copy and paste link to your browser to visit site)";
var badsongText = "!! This song link no longer works.";
var badsongText2 = "Please return to Project Playlist to replace the song link with one that works.";
var myspaceErrorText = "Playlist error. Please refresh this page.\nIf problem persists, please go to <font color='#61A1D9'>http://www.playlist.com/myspace_help</font>";
var blankPlaylistMessage = "This playlist has no tracks.";
var myKey = "sdf883jsdf22";
var directLinks = "true";
}
Symbol 129 MovieClip [__Packages.com.jeroenwijering.feeds.XSPFParser] Frame 0
class com.jeroenwijering.feeds.XSPFParser extends com.jeroenwijering.feeds.AbstractParser
{
var playlistRC4, playlistConfig, elements, mimetypes;
function XSPFParser () {
super();
playlistRC4 = new com.jeroenwijering.players.rc4();
playlistConfig = new com.jeroenwijering.players.Config();
}
function setElements() {
elements = new Object();
elements.title = "title";
elements.creator = "author";
elements.info = "link";
elements.image = "image";
elements.identifier = "id";
elements.album = "category";
}
function parse(xml) {
var _local9 = new Array();
var _local7 = xml.firstChild.firstChild;
while (_local7 != null) {
if (_local7.nodeName == "trackList") {
var _local6 = 0;
while (_local6 < _local7.childNodes.length) {
var _local2 = new Object();
var _local5 = 0;
while (_local5 < _local7.childNodes[_local6].childNodes.length) {
var _local3 = _local7.childNodes[_local6].childNodes[_local5];
var _local4 = _local3.nodeName.toLowerCase();
if (elements[_local4] != undefined) {
_local2[elements[_local4]] = _local3.firstChild.nodeValue;
} else if ((_local4 == "location") && (_local2.type != "flv")) {
if (_local3.firstChild.nodeValue.substr(0, 4) != "http") {
_local2.file = playlistRC4.decrypt(_local3.firstChild.nodeValue, playlistConfig.myKey);
} else {
_local2.file = _local3.firstChild.nodeValue;
if (_local2.file.substr(-8) == "takedown") {
_local2.file = ("http://playlist.com/disabled" + _local5) + ".mp3";
}
}
var _local8 = "mp3";
if (_local2.file.substr(0, 4) == "rtmp") {
_local2.type = "rtmp";
} else if (mimetypes[_local8] != undefined) {
_local2.type = mimetypes[_local8];
}
} else if ((_local4 == "originallocation") && (_local2.type != "flv")) {
_local2.originallocation = _local3.firstChild.nodeValue;
} else if (_local4 == "bluewireid") {
_local2.bluewireid = _local3.firstChild.nodeValue;
_local2.link = "http://www.playlist.com/playlist/additem/" + _local3.firstChild.nodeValue;
} else if (_local4 == "duration") {
_local2.duration1 = _local3.firstChild.nodeValue;
} else if (_local4 == "annotation") {
_local2.description = com.jeroenwijering.utils.StringMagic.stripTagsBreaks(_local3.firstChild.nodeValue);
} else if ((_local4 == "link") && (_local3.attributes.rel == "captions")) {
_local2.captions = _local3.firstChild.nodeValue;
} else if ((_local4 == "link") && (_local3.attributes.rel == "audio")) {
_local2.audio = _local3.firstChild.nodeValue;
} else if (_local4 == "meta") {
_local2[_local3.attributes.rel] = _local3.firstChild.nodeValue;
}
_local5++;
}
_local9.push(_local2);
_local6++;
}
}
_local7 = _local7.nextSibling;
}
return(_local9);
}
}
Symbol 130 MovieClip [__Packages.com.jeroenwijering.utils.StringMagic] Frame 0
class com.jeroenwijering.utils.StringMagic
{
function StringMagic () {
}
static function stripTagsBreaks(str) {
if ((str.length == 0) || (str == undefined)) {
return("");
}
var _local4 = str.split(newline);
str = _local4.join("");
_local4 = str.split("\r");
str = _local4.join("");
var _local2 = str.indexOf("<");
while (_local2 != -1) {
var _local3 = str.indexOf(">", _local2 + 1);
((_local3 == -1) ? (_local3 = str.length - 1) : null);
str = str.substr(0, _local2) + str.substr(_local3 + 1, str.length);
_local2 = str.indexOf("<", _local2);
}
return(str);
}
static function chopString(str, cap, nbr) {
var _local2 = cap;
while (_local2 < str.length) {
if (_local2 == (cap * nbr)) {
if (str.indexOf(" ", _local2 - 5) == -1) {
return(str);
}
return(str.substr(0, str.indexOf(" ", _local2 - 5)));
}
if (str.indexOf(" ", _local2) > 0) {
str = (str.substr(0, str.indexOf(" ", _local2 - 3)) + newline) + str.substr(str.indexOf(" ", _local2 - 3) + 1);
}
_local2 = _local2 + cap;
}
return(str);
}
static function addLeading(nbr) {
if (nbr < 10) {
return("0" + Math.floor(nbr));
}
return(Math.floor(nbr).toString());
}
static function toSeconds(str) {
var _local2 = str.split(":");
if (str.substr(-1) == "s") {
var _local3 = Number(str.substr(0, str.length - 2));
} else if (str.substr(-1) == "m") {
var _local3 = Number(str.substr(0, str.length - 2)) * 60;
} else if (str.substr(-1) == "h") {
var _local3 = Number(str.substr(0, str.length - 2)) * 3600;
} else if (_local2.length > 1) {
var _local3 = Number(_local2[_local2.length - 1]);
_local3 = _local3 + (Number(_local2[_local2.length - 2]) * 60);
_local3 = _local3 + (Number(_local2[_local2.length - 3]) * 3600);
} else {
var _local3 = Number(str);
}
if (isNaN(_local3)) {
return(0);
}
return(_local3);
}
}
Symbol 131 MovieClip [__Packages.com.jeroenwijering.players.AbstractController] Frame 0
class com.jeroenwijering.players.AbstractController implements com.jeroenwijering.feeds.FeedListener
{
var config, feeder, currentURL, registeredModels, currentItem, randomizer;
function AbstractController (cfg, fed) {
config = cfg;
feeder = fed;
feeder.addListener(this);
}
function startMCV(mar) {
}
function getEvent(typ, prm, urlType) {
switch (typ) {
case "playpause" :
setPlaypause();
break;
case "prev" :
setPrev();
break;
case "next" :
setNext();
break;
case "stop" :
setStop();
break;
case "scrub" :
setScrub(prm);
break;
case "volume" :
setVolume(prm);
break;
case "playitem" :
setPlayitem(prm);
break;
case "getlink" :
setGetlink(prm, urlType);
break;
case "fullscreen" :
setFullscreen();
break;
case "complete" :
setComplete();
break;
case "captions" :
setCaptions();
break;
case "audio" :
setAudio();
break;
default :
trace("controller: incompatible event received");
}
}
function setPlaypause() {
}
function setPrev() {
}
function setNext() {
}
function setStop() {
}
function setScrub(prm) {
}
function setPlayitem(itm) {
currentURL = feeder.feed[itm].file;
}
function setGetlink(idx, urlType) {
}
function setComplete() {
}
function setVolume(prm) {
}
function setFullscreen() {
}
function setCaptions() {
}
function setAudio() {
}
function sendChange(typ, prm) {
var _local2 = 0;
while (_local2 < registeredModels.length) {
registeredModels[_local2].getChange(typ, prm);
_local2++;
}
}
function onFeedUpdate(typ) {
if (typ == "new") {
setStop();
startMCV();
} else if (typ == "add") {
if (feeder.feed[currentItem + 1].file == currentURL) {
currentItem++;
sendChange("item", currentItem);
}
if (randomizer != undefined) {
randomizer = new com.jeroenwijering.utils.Randomizer(feeder.feed);
}
} else if (typ == "remove") {
if (feeder.feed[currentItem - 1].file == currentURL) {
currentItem--;
sendChange("item", currentItem);
if (randomizer != undefined) {
randomizer = new com.jeroenwijering.utils.Randomizer(feeder.feed);
}
} else if (feeder.feed[currentItem].file != currentURL) {
setStop();
startMCV();
} else if (randomizer != undefined) {
randomizer = new com.jeroenwijering.utils.Randomizer(feeder.feed);
}
}
}
}
Symbol 132 MovieClip [__Packages.com.jeroenwijering.utils.Randomizer] Frame 0
class com.jeroenwijering.utils.Randomizer
{
var originalArray, bufferArray;
function Randomizer (arr) {
originalArray = arr;
bufferArray = new Array();
}
function pick() {
if (bufferArray.length == 0) {
var _local2 = 0;
while (_local2 < originalArray.length) {
bufferArray.push(_local2);
_local2++;
}
}
var _local3 = random(bufferArray.length);
var _local4 = bufferArray[_local3];
bufferArray.splice(_local3, 1);
return(_local4);
}
}
Symbol 133 MovieClip [__Packages.com.jeroenwijering.utils.ConfigManager] Frame 0
class com.jeroenwijering.utils.ConfigManager
{
var staging, config, parser, cookie, context;
function ConfigManager (stg) {
staging = stg;
if (staging == true) {
Stage.scaleMode = "noScale";
Stage.align = "TL";
}
}
function loadConfig(def) {
config = def;
if (staging == true) {
config.width = Stage.width;
config.height = Stage.height;
config.clip._visible = false;
config.clip._parent.activity._alpha = 100;
var _local4 = config.clip._parent.bgfill;
var _local3 = config.clip._parent.ppl_logo;
var _local6 = config.clip._parent.activity;
var _local5 = config.clip._parent.ad_txt;
_local4._x = (_local4._y = 0);
_local4._width = config.width;
_local4._height = config.height;
var _local7 = new Color(_local4);
_local7.setRGB(16777215);
if (Stage.width < 200) {
_local3._xscale = (_local3._yscale = 40);
}
_local3._x = (Stage.width / 2) - (_local3._width / 2);
_local3._y = ((Stage.height / 2) - (_local3._height / 2)) - 15;
_local6._x = Stage.width / 2;
_local6._y = (_local3._y + _local3._height) + 20;
if (Stage.height < 30) {
_local6._visible = (_local3._visible = false);
}
if (_root.swfName == "MYSPACE") {
trace("MySpace");
trace(_local5.text);
_local5._x = (Stage.width / 2) - (_local5._width / 2);
_local5._y = (Stage.height - _local5._height) - 10;
}
}
((_root.config == undefined) ? (loadCookies()) : (loadFile()));
}
function loadFile() {
var ref = this;
parser = new com.jeroenwijering.utils.XMLParser();
parser.onComplete = function (obj) {
var _local3 = new Object();
var _local1 = 0;
while (_local1 < obj.childs.length) {
_local3[obj.childs[_local1].name] = obj.childs[_local1].value;
_local1++;
}
ref.checkWrite(_local3);
ref.loadCookies();
};
parser.parse(_root.config);
}
function loadCookies() {
cookie = SharedObject.getLocal("com.jeroenwijering.players", "/");
checkWrite(cookie.data);
loadVars();
}
function loadVars() {
checkWrite(_root);
((staging == true) ? (setContext()) : null);
onComplete();
}
function checkWrite(dat) {
for (var _local3 in config) {
if (dat[_local3] != undefined) {
config[_local3] = unescape(dat[_local3]);
}
}
}
function setContext() {
function goTo() {
getURL (ref.config.aboutlnk, ref.ref.config.linktarget);
}
var ref = this;
context = new ContextMenu();
context.hideBuiltInItems();
context.customItems.push(new ContextMenuItem(("About " + config.abouttxt) + "...", goTo));
config.clip._parent.menu = context;
}
function onComplete() {
}
}
Symbol 134 MovieClip [__Packages.com.jeroenwijering.utils.XMLParser] Frame 0
class com.jeroenwijering.utils.XMLParser
{
var input, output;
function XMLParser () {
}
function parse(lnk) {
var ref = this;
input = new XML();
output = new Object();
input.ignoreWhite = true;
input.onHTTPStatus = function (stt) {
ref.status = stt;
trace(stt);
};
input.onLoad = function (scs) {
if (scs) {
ref.processRoot();
} else {
ref.onError(ref.status);
}
};
if (_root._url.indexOf("file://") > -1) {
input.load(lnk);
trace("input.load 1");
} else if (lnk.indexOf("?") > -1) {
input.load((lnk + "&") + random(999));
trace("input.load 2");
} else {
input.load((lnk + "?") + random(999));
trace("input.load 3");
}
}
function processRoot() {
processNode(input.firstChild, output);
delete input;
onComplete(output);
}
function processNode(nod, obj) {
obj.name = nod.nodeName;
for (var _local7 in nod.attributes) {
obj[_local7] = nod.attributes[_local7];
}
if ((nod.childNodes.length < 2) && (nod.firstChild.nodeName == null)) {
obj.value = nod.firstChild.nodeValue;
} else {
obj.childs = new Array();
var _local2 = nod.firstChild;
var _local6 = 0;
while (_local2 != undefined) {
var _local3 = new Object();
processNode(_local2, _local3);
obj.childs.push(_local3);
_local2 = _local2.nextSibling;
_local6++;
}
}
}
function onComplete(obj) {
}
function onError(nbr) {
trace("onError: " + nbr);
}
}
Symbol 135 MovieClip [__Packages.com.jeroenwijering.players.AbstractView] Frame 0
class com.jeroenwijering.players.AbstractView
{
var controller, config, feeder;
function AbstractView (ctr, cfg, fed) {
controller = ctr;
config = cfg;
feeder = fed;
}
function getUpdate(typ, pr1, pr2) {
switch (typ) {
case "state" :
setState(pr1);
break;
case "load" :
setLoad(pr1);
break;
case "time" :
setTime(pr1, pr2);
break;
case "item" :
setItem(pr1);
break;
case "size" :
setSize(pr1, pr2);
break;
case "volume" :
setVolume(pr1);
break;
case "loaderror" :
setLoadError(pr1);
break;
default :
trace("View: incompatible update received");
}
}
function setState(pr1) {
}
function setLoad(pr1) {
}
function setTime(pr1, pr2) {
}
function setItem(pr1) {
}
function setSize(pr1, pr2) {
}
function setVolume(pr1) {
}
function setLoadError(pr1) {
}
function sendEvent(typ, prm, urlType) {
controller.getEvent(typ, prm, urlType);
}
}
Symbol 136 MovieClip [__Packages.com.jeroenwijering.players.AbstractModel] Frame 0
class com.jeroenwijering.players.AbstractModel
{
var registeredViews, controller, config, feeder, isActive, currentItem, mediatypes, currentPosition;
function AbstractModel (vws, ctr, cfg, fed) {
registeredViews = vws;
controller = ctr;
config = cfg;
feeder = fed;
}
function getChange(typ, prm) {
switch (typ) {
case "item" :
setItem(prm);
break;
case "start" :
((isActive == true) ? (setStart(prm)) : null);
break;
case "pause" :
((isActive == true) ? (setPause(prm)) : null);
break;
case "stop" :
((isActive == true) ? (setStop()) : null);
break;
case "volume" :
setVolume(prm);
break;
default :
trace("Model: incompatible change received");
}
}
function setItem(idx) {
currentItem = idx;
var _local4 = false;
var _local2 = 0;
while (_local2 < mediatypes.length) {
if (feeder.feed[idx].type == mediatypes[_local2]) {
_local4 = true;
}
_local2++;
}
if (feeder.feed[idx].start > 0) {
currentPosition = feeder.feed[idx].start;
}
if (_local4 == true) {
isActive = true;
sendUpdate("item", idx);
} else {
isActive = false;
}
}
function setStart(prm) {
}
function setPause(prm) {
}
function setStop() {
}
function setVolume(vol) {
((isActive == true) ? (sendUpdate("volume", vol)) : null);
}
function sendUpdate(typ, prm, pr2) {
var _local2 = 0;
while (_local2 < registeredViews.length) {
registeredViews[_local2].getUpdate(typ, prm, pr2);
_local2++;
}
}
function sendCompleteEvent() {
controller.getEvent("complete");
}
}
Symbol 137 MovieClip [__Packages.com.jeroenwijering.players.MediaPlayer] Frame 0
class com.jeroenwijering.players.MediaPlayer extends com.jeroenwijering.players.AbstractPlayer
{
var playlistConfig, loadFile, controller, feeder;
function MediaPlayer (tgt) {
super(tgt);
}
function fillConfig() {
playlistConfig = new com.jeroenwijering.players.Config();
config.screencolor = config.backcolor;
if (playlistConfig.debugMode) {
trace("debug");
config.file = "http://www.musiclist.us/loadplaylist.php?playlist=848";
_root.config = "http://nigma3d.s3.amazonaws.com/config_black_noautostart.xml";
}
if (_root.playlist_url != undefined) {
playlistConfig.playlistUrl = _root.playlist_url;
config.file = _root.playlist_url;
} else if (_root.file != undefined) {
playlistConfig.playlistUrl = _root.file;
config.file = _root.file;
}
if (_root.autostart != undefined) {
config.autostart = _root.autostart;
}
if (_root.directlinks != undefined) {
playlistConfig.directLinks = _root.directlinks;
}
if (_root.player_type != undefined) {
playlistConfig.directLinks = _root.player_type;
}
if (_root.skinurl != undefined) {
config.jpgfile = _root.skinurl;
}
if (_root.mywidth != undefined) {
config.width = _root.mywidth;
}
if (_root.myheight != undefined) {
config.height = _root.myheight;
}
if (_root.ppllogo != undefined) {
config.ppllogo = _root.ppllogo;
}
((config.largecontrols == "true") ? ((config.controlbar = config.controlbar * 2)) : null);
if (config.displayheight == undefined) {
config.displayheight = config.height - config.controlbar;
} else if (Number(config.displayheight) > Number(config.height)) {
config.displayheight = config.height;
}
if (config.displaywidth == undefined) {
config.displaywidth = config.width;
}
((config.bwstreams == undefined) ? (loadFile()) : (checkStream()));
}
function checkStream() {
var ref = this;
var str = config.bwstreams.split(",");
var _local3 = new com.jeroenwijering.utils.BandwidthCheck(config.bwfile);
_local3.onComplete = function (kbps) {
var _local3 = new ContextMenuItem(("Detected bandwidth: " + kbps) + " kbps");
_local3.separatorBefore = true;
ref.manager.context.customItems.push(_local3);
if ((ref.config.enablejs == "true") && (flash.external.ExternalInterface.available)) {
flash.external.ExternalInterface.call("getBandwidth", kbps);
}
var _local1 = 1;
while (_local1 < str.length) {
if (kbps < Number(str[_local1])) {
ref.loadFile(str[_local1 - 1]);
return(undefined);
}
_local1++;
}
ref.loadFile(str[str.length - 1]);
};
}
function setupMCV() {
controller = new com.jeroenwijering.players.PlayerController(config, feeder);
var _local4 = new com.jeroenwijering.players.DisplayView(controller, config, feeder);
var _local14 = new com.jeroenwijering.players.ControlbarView(controller, config, feeder);
var _local3 = new com.jeroenwijering.players.TrackTitleView(controller, config, feeder);
var _local9 = new com.jeroenwijering.players.BackgroundImageView(controller, config, feeder);
var _local2 = new Array(_local4, _local14, _local3, _local9);
if ((config.displayheight < (config.height - config.controlbar)) || (config.displaywidth < config.width)) {
var _local6 = new com.jeroenwijering.players.PlaylistView(controller, config, feeder);
_local2.push(_local6);
} else {
config.clip.playlist._visible = (config.clip.playlistmask._visible = false);
}
if (config.usekeys == "true") {
var _local10 = new com.jeroenwijering.players.InputView(controller, config, feeder);
_local2.push(_local10);
}
if (config.showeq == "true") {
var _local5 = new com.jeroenwijering.players.EqualizerView(controller, config, feeder);
_local2.push(_local5);
} else {
config.clip.equalizer._visible = false;
}
if (feeder.captions == true) {
} else {
config.clip.captions._visible = false;
}
if (config.recommendations != undefined) {
} else {
config.clip.recommendations._visible = false;
}
if (feeder.audio == true) {
var _local12 = new com.jeroenwijering.players.AudioView(controller, config, feeder, true);
_local2.push(_local12);
}
if (config.enablejs == "true") {
var _local8 = new com.jeroenwijering.players.JavascriptView(controller, config, feeder);
_local2.push(_local8);
}
if (config.callback != undefined) {
}
var _local7 = new com.jeroenwijering.players.LogoView(controller, config, feeder);
_local2.push(_local7);
var _local13 = new com.jeroenwijering.players.MP3Model(_local2, controller, config, feeder, config.clip);
var _local11 = new Array(_local13);
controller.startMCV(_local11);
}
var config = {clip:undefined, file:"", height:undefined, width:undefined, controlbar:20, displayheight:60, frontcolor:0, backcolor:16777215, lightcolor:0, screencolor:0, autoscroll:"false", displaywidth:undefined, largecontrols:"false", logo:undefined, showdigits:"true", showdownload:"false", showeq:"true", showicons:"true", showstop:"false", thumbsinplaylist:"false", usefullscreen:"false", fsbuttonlink:undefined, autostart:"false", bufferlength:3, deblocking:4, overstretch:"false", repeat:"list", rotatetime:10, shuffle:"false", smoothing:"true", volume:80, bwfile:"100k.jpg", bwstreams:undefined, callback:undefined, enablejs:"false", javascriptid:"", linkfromdisplay:"false", linktarget:undefined, prefix:undefined, recommendations:undefined, streamscript:undefined, useaudio:"true", usecaptions:"false", usemute:"false", usekeys:"true", abouttxt:"Go to www.playlist.com to create a playlist", aboutlnk:"http://playlist.com", jpgfile:undefined};
}
Symbol 138 MovieClip [__Packages.com.jeroenwijering.utils.BandwidthCheck] Frame 0
class com.jeroenwijering.utils.BandwidthCheck
{
var loader, clip, connector, startTime;
function BandwidthCheck (fil) {
var ref = this;
if (fil.indexOf("rtmp") == -1) {
loader = new MovieClipLoader();
loader.addListener(this);
clip = _root.createEmptyMovieClip("_bwchecker", 1);
loader.loadClip((fil + "?") + random(9999), clip);
} else {
connector = new NetConnection();
connector.onStatus = function (info) {
if (info.code != "NetConnection.Connect.Success") {
ref.onComplete(0);
}
};
connector.connect(fil, true);
connector.onBWDone = function (kbps, dtd, dtt, lat) {
ref.onComplete(kbps);
};
connector.onBWCheck = function () {
};
}
}
function onLoadComplete(tgt, hts) {
tgt._visible = false;
var _local4 = new Date();
var _local6 = clip.getBytesTotal();
var _local3 = (_local4.getTime() - startTime) / 1000;
var _local2 = (_local6 * 0.0078125) * 0.93;
var _local5 = Math.floor(_local2 / _local3);
onComplete(_local5);
clip.removeMovieClip();
}
function onLoadError(tgt, err, stt) {
onComplete(0);
}
function onLoadStart() {
var _local2 = new Date();
startTime = _local2.getTime();
}
function onComplete() {
}
}
Symbol 139 MovieClip [__Packages.com.jeroenwijering.players.PlayerController] Frame 0
class com.jeroenwijering.players.PlayerController extends com.jeroenwijering.players.AbstractController
{
var playerSO, playlistRC4, playlistConfig, urlLink_mc, config, registeredModels, itemsPlayed, randomizer, feeder, currentItem, sendChange, isPlaying, currentURL, muted;
function PlayerController (cfg, fed) {
super(cfg, fed);
playerSO = SharedObject.getLocal("com.jeroenwijering.players", "/");
playlistRC4 = new com.jeroenwijering.players.rc4();
playlistConfig = new com.jeroenwijering.players.Config();
var owner = this;
urlLink_mc = config.clip._parent.urlLink_mc;
urlLink_mc.startY = urlLink_mc._y;
config.clip._parent.urlLink_mc.close_mc.onRelease = function () {
owner.hideURLLinkMC();
};
if (playlistConfig.playerLocation == "MYSPACE") {
playlistConfig.directLinks = "false";
trace("directLinks = false");
} else {
playlistConfig.directLinks = "true";
}
}
function startMCV(mar) {
if (mar != undefined) {
registeredModels = mar;
}
itemsPlayed = 0;
if (config.shuffle == "true") {
randomizer = new com.jeroenwijering.utils.Randomizer(feeder.feed);
currentItem = randomizer.pick();
} else {
currentItem = 0;
}
sendChange("item", currentItem);
if (config.autostart == "muted") {
sendChange("volume", 0);
} else {
sendChange("volume", config.volume);
}
if (config.usecaptions == "false") {
config.clip.captions._visible = false;
config.clip.controlbar.cc.icn._alpha = 40;
}
if (config.useaudio == "false") {
config.clip.audio.setStop();
config.clip.controlbar.au.icn._alpha = 40;
}
if (config.autostart == "false") {
sendChange("pause", feeder.feed[currentItem].start);
isPlaying = false;
} else {
sendChange("start", feeder.feed[currentItem].start);
isPlaying = true;
}
}
function setPlaypause() {
if (isPlaying == true) {
isPlaying = false;
sendChange("pause");
bPausedCheck = true;
} else {
isPlaying = true;
sendChange("start");
bPausedCheck = false;
}
}
function setPrev() {
if (currentItem == 0) {
var _local2 = feeder.feed.length - 1;
} else {
var _local2 = currentItem - 1;
}
if (config.shuffle == "true") {
var _local2 = randomizer.pick();
}
setPlayitem(_local2);
}
function setNext() {
if (currentItem == (feeder.feed.length - 1)) {
var _local2 = 0;
} else {
var _local2 = currentItem + 1;
}
if (config.shuffle == "true") {
var _local2 = randomizer.pick();
}
setPlayitem(_local2);
}
function setStop() {
sendChange("pause", 0);
sendChange("stop");
sendChange("item", currentItem);
isPlaying = false;
}
function setScrub(prm) {
if (isPlaying == true) {
sendChange("start", prm);
} else {
sendChange("pause", prm);
}
}
function setPlayitem(itm) {
bPausedCheck = false;
if (itm != currentItem) {
((itm > (feeder.feed.length - 1)) ? (itm = feeder.feed.length - 1) : null);
if (feeder.feed[currentItem].file != feeder.feed[itm].file) {
sendChange("stop");
}
currentItem = itm;
sendChange("item", itm);
}
sendChange("start", feeder.feed[itm].start);
currentURL = feeder.feed[itm].file;
isPlaying = true;
}
function setGetlink(idx, urlType) {
var _local3;
if ((feeder.feed[idx].originallocation != "") && (feeder.feed[idx].originallocation != undefined)) {
_local3 = feeder.feed[idx].originallocation;
trace("originallocation: " + _local3);
} else {
_local3 = feeder.feed[idx].file;
trace("feeder.feed[idx]['file']: " + _local3);
}
if (feeder.feed[idx].link == undefined) {
setPlaypause();
trace("setPlaypause");
} else if (urlType == "add") {
trace("add: " + feeder.feed[idx].link);
getLocation(feeder.feed[idx].link, playlistConfig.addText, playlistConfig.addText2, "add");
} else {
trace("url: " + _local3);
getLocation(_local3, playlistConfig.urlText, playlistConfig.urlText2, "url", feeder.feed[idx].duration1, feeder.feed[idx].file);
}
}
function getLocation(location, quote, quote2, type, duration1, realhased, trackid, tracktitle) {
var _local11 = this;
trace((((("getLocation(): location = " + location) + ", quote = ") + quote) + ", type = ") + type);
if (location.substring(0, 4) != "http") {
location = playlistRC4.decrypt(location, playlistConfig.myKey);
}
if (realhased.substring(0, 4) == "http") {
realhased = playlistRC4.encrypt(realhased, playlistConfig.myKey);
}
if (playlistConfig.directLinks == "true") {
var _local4;
if (type == "url") {
if (duration1 && (duration1 != "1")) {
_local4 = (((((((playlistConfig.baseUrl + "/results.php?site=") + getURI(location)) + "&links=") + realhased) + "&originallink=") + location) + "&addedby=") + duration1;
trace(_local4);
} else {
_local4 = (((((playlistConfig.baseUrl + "/results.php?site=") + getURI(location)) + "&links=") + realhased) + "&originallink=") + location;
trace(_local4);
}
} else if (type == "add") {
if (_root.returnurl == undefined) {
_local4 = location;
} else {
_local4 = (location + "?destination2=") + _root.returnurl;
}
} else if (type == "badsong") {
_local4 = playlistConfig.badSongNodeUrl;
}
if (type == "url") {
getURL (_local4, "_blank");
} else if (type == "badsong") {
trace("owner: " + _local11);
if (playlistConfig.debugMode) {
var _local5 = config.clip._parent.createEmptyMovieClip("POST_mc", 9997);
trace("post_mc: " + _local5);
_local5.TRACK_ID = trackid;
_local5.TRACK_TITLE = tracktitle;
trace((_local5.TRACK_ID + " ") + _local5.TRACK_TITLE);
_local5.getURL("http://localhost/error_log.php", "_blank", "POST");
_local5.getURL(_local4, "_blank", "POST");
} else {
_local5.getURL(_local4, "_blank", "POST");
}
} else if (playlistConfig.playerLocation == "SITE") {
getURL (_local4, "_self");
} else {
getURL (_local4, "_blank");
}
} else {
if (duration1 && (duration1 != "1")) {
trace((((((("if: url = " + location) + ", quote = ") + quote) + ", quote2 = ") + quote2) + ", type = ") + type);
setURLLinkText(location, quote, quote2, type, "yes");
} else {
trace((((((("else: url = " + location) + ", quote = ") + quote) + ", quote2 = ") + quote2) + ", type = ") + type);
setURLLinkText(location, quote, quote2, type);
}
showURLLinkMC();
}
}
function setURLLinkText(url, quote, quote2, type, addedby) {
var _local6 = urlLink_mc;
var _local12 = _local6.background_mc;
var _local7 = _local6.close_mc;
var _local3 = _local6.title_txt;
var _local2 = _local6.url_txt;
var _local5 = _local6.instruction_txt;
var _local4 = _local6.ppl_logo;
_local2.autoSize = true;
_local3.autoSize = true;
_local5.autoSize = true;
if (type == "url") {
if (addedby) {
_local2.text = url;
} else {
_local2.text = getURI(url);
}
} else {
_local2.text = url;
}
_local3.text = quote;
_local5.text = quote2;
_local3._y = (Stage.height / 2) - 40;
_local2._y = Math.round((_local3._y + _local3.textHeight) + 8);
_local2._width = Stage.width - 40;
_local2._x = (_local5._x = 20);
_local5._width = Stage.width - 40;
_local5._y = Math.round((_local2._y + _local2.textHeight) + 8);
_local7._y = (_local5._y + _local5.textHeight) + 8;
_local3._x = (Stage.width / 2) - (_local3._width / 2);
_local7._x = (Stage.width / 2) - (_local7._width / 2);
_local4._x = (Stage.width / 2) - (_local4._width / 2);
_local4._y = (_local3._y - _local4._height) - 15;
var _local9 = new Color(_local4.logobarswhite);
var _local11 = new Color(_local4.logobarsblack);
var _local8 = new Color(_local4.logoletters);
_local9.setRGB(config.lightcolor);
_local11.setRGB(config.lightcolor);
_local8.setRGB(config.frontcolor);
Selection.setFocus("url_txt");
Selection.setSelection(0, _local2.text.length - 1);
}
function showURLLinkMC() {
var _local4 = this;
var _local2 = urlLink_mc;
var _local3 = _local2.background_mc;
var _local5 = _local2.close_mc;
var _local7 = _local2.title_txt;
var _local8 = _local2.url_txt;
var _local6 = _local2.instruction_txt;
_local2._alpha = 0;
_local2.col = new Color(_local3);
_local2.col.setRGB(_local4.config.backcolor);
_local7.textColor = _local4.config.frontcolor;
_local6.textColor = _local4.config.frontcolor;
_local2.col2 = new Color(_local5.background_mc);
_local2.col2.setRGB(_local4.config.frontcolor);
_local2.col3 = new Color(_local5.closetxt_mc);
_local2.col3.setRGB(_local4.config.backcolor);
_local2._x = (_local2._y = (_local3._x = (_local3._y = 0)));
_local3._width = _local4.config.width;
_local3._height = _local4.config.height;
_local3.onRelease = function () {
};
_local3.useHandCursor = false;
_local2._alpha = 100;
}
function hideURLLinkMC() {
var _local2 = urlLink_mc;
var _local3 = _local2.background_mc;
_local2._alpha = 0;
_local2._x = (_local2._y = -2000);
}
function getURI(value) {
var _local4 = value;
var _local3 = 0;
var _local1 = 0;
var _local2 = 0;
while (_local1 > -1) {
_local2 = _local4.indexOf("/", _local1);
if (_local2 > -1) {
_local3++;
_local1 = _local2 + 1;
if (_local3 == 3) {
return(_local4.substring(0, _local1 - 1));
}
}
}
}
function setComplete() {
itemsPlayed++;
if ((feeder.feed[currentItem].type == "rtmp") || (config.streamscript != undefined)) {
sendChange("stop");
}
if ((config.repeat == "false") || ((config.repeat == "list") && (itemsPlayed >= feeder.feed.length))) {
sendChange("pause", 0);
isPlaying = false;
itemsPlayed = 0;
} else if (bPausedCheck) {
sendChange("stop");
isPlaying = false;
bPausedCheck = false;
} else {
if (config.shuffle == "true") {
var _local2 = randomizer.pick();
} else if (currentItem == (feeder.feed.length - 1)) {
var _local2 = 0;
} else {
var _local2 = currentItem + 1;
}
setPlayitem(_local2);
}
}
function setFullscreen() {
if ((Stage.displayState == "normal") && (config.usefullscreen == "true")) {
Stage.displayState = "fullScreen";
} else if ((Stage.displayState == "fullScreen") && (config.usefullscreen == "true")) {
Stage.displayState = "normal";
} else if (config.fsbuttonlink != undefined) {
sendChange("stop");
getURL (config.fsbuttonlink, config.linktarget);
}
}
function setCaptions() {
if (config.usecaptions == "true") {
config.usecaptions = "false";
config.clip.captions._visible = false;
config.clip.controlbar.cc.icn._alpha = 40;
} else {
config.usecaptions = "true";
config.clip.captions._visible = true;
config.clip.controlbar.cc.icn._alpha = 100;
}
playerSO.data.usecaptions = config.usecaptions;
playerSO.flush();
}
function setAudio() {
if (config.useaudio == "true") {
config.useaudio = "false";
config.clip.audio.setStop();
config.clip.controlbar.au.icn._alpha = 40;
} else {
config.useaudio = "true";
config.clip.audio.setStart();
config.clip.controlbar.au.icn._alpha = 100;
}
playerSO.data.useaudio = config.useaudio;
playerSO.flush();
}
function setVolume(prm) {
if (prm < 0) {
prm = 0;
} else if (prm > 100) {
prm = 100;
}
if (prm == 0) {
if (muted == true) {
muted = false;
sendChange("volume", config.volume);
} else {
muted = true;
sendChange("volume", 0);
}
} else {
sendChange("volume", prm);
config.volume = prm;
playerSO.data.volume = config.volume;
playerSO.flush();
}
}
var bPausedCheck = false;
}
Symbol 140 MovieClip [__Packages.com.jeroenwijering.players.DisplayView] Frame 0
class com.jeroenwijering.players.DisplayView extends com.jeroenwijering.players.AbstractView
{
var playlistConfig, itemSize, config, thumbSize, imageLoader, startPos, feeder, currentItem;
function DisplayView (ctr, cfg, fed) {
super(ctr, cfg, fed);
Stage.addListener(this);
playlistConfig = new com.jeroenwijering.players.Config();
itemSize = new Array(config.displaywidth, config.displayheight);
thumbSize = new Array(config.displaywidth, config.displayheight);
var ref = this;
var tgt = config.clip;
imageLoader = new com.jeroenwijering.utils.ImageLoader(tgt.display.thumb);
imageLoader.onLoadFinished = function () {
ref.thumbSize = new Array(this.targetClip._width, this.targetClip._height);
ref.scaleClip(tgt.display.thumb, this.targetClip._width, this.targetClip._height);
};
startPos = new Array(tgt._x, tgt._y);
setColorsClicks();
setDimensions();
}
function setColorsClicks() {
var ref = this;
var _local2 = config.clip.playicon;
var tgt = config.clip.back;
tgt.col = new Color(tgt);
tgt.col.setRGB(config.backcolor);
if (config.jpgfile != undefined) {
tgt._alpha = 0;
}
var tgt = config.clip.display;
tgt.col = new Color(tgt.back);
tgt.col.setRGB(config.frontcolor);
tgt.back._alpha = 10;
tgt.thumbback._x = (tgt.thumbback._y = 4);
tgt.col5 = new Color(tgt.thumbback);
tgt.col5.setRGB(config.frontcolor);
tgt.col6 = new Color(_local2.front);
tgt.col6.setRGB(config.frontcolor);
tgt.col7 = new Color(_local2.back);
tgt.col7.setRGB(config.backcolor);
tgt.setMask(config.clip.mask);
if (config.jpgfile != undefined) {
tgt.back._alpha = 0;
}
if (config.showicons == "false") {
_local2._visible = false;
tgt.muteicon._visible = false;
}
tgt.col6 = new Color(tgt.activity);
tgt.col6.setRGB(config.frontcolor);
tgt.activity._visible = false;
tgt.back.tabEnabled = false;
if (config.autostart == "muted") {
} else if (config.autostart == "false") {
tgt.muteicon._visible = false;
_local2.onRelease = function () {
ref.sendEvent("playpause");
ref.firstClick();
};
} else {
ref.firstClick();
}
if (config.logo != undefined) {
var _local4 = new com.jeroenwijering.utils.ImageLoader(tgt.logo, "none");
_local4.onLoadFinished = function () {
tgt.logo._x = (ref.config.displaywidth - tgt.logo._width) - 10;
tgt.logo._y = 10;
};
_local4.loadImage(config.logo);
tgt.logo.onRelease = function () {
ref.sendEvent("getlink", ref.currentItem);
};
}
if (feeder.feed.length == 0) {
_local2._visible = false;
if (playlistConfig.playerLocation == "SITE") {
var _local3 = config.clip.trackTitle_mc;
_local3.title_txt.htmlText = playlistConfig.blankPlaylistMessage;
_local3.title_txt.textColor = config.frontcolor;
}
}
}
function setDimensions() {
var _local2 = config.clip.back;
var _local3 = config.clip.playicon;
var _local4 = config.clip.equalizer;
if (Stage.displayState == "fullScreen") {
config.clip._x = (config.clip._y = 0);
_local2._width = Stage.width;
_local2._height = Stage.height;
} else {
config.clip._x = startPos[0];
config.clip._y = startPos[1];
_local2._width = config.width;
_local2._height = config.height;
if ((config.displayheight >= (config.height - config.controlbar)) && (config.displaywidth == config.width)) {
_local2._height--;
}
}
_local2 = config.clip.display;
scaleClip(_local2.thumb, thumbSize[0], thumbSize[1]);
scaleClip(_local2.image, itemSize[0], itemSize[1]);
scaleClip(_local2.video, itemSize[0], itemSize[1]);
if (Stage.displayState == "fullScreen") {
config.clip.mask._width = (_local2.back._width = Stage.width);
config.clip.mask._height = (_local2.back._height = Stage.height);
} else {
config.clip.mask._width = (_local2.back._width = config.displaywidth);
config.clip.mask._height = (_local2.back._height = config.displayheight);
}
_local2.muteicon._x = Math.round((_local2.back._width / 2) + 34);
_local3._x = Stage.width / 2;
_local2.activity._x = Math.round((_local2.back._width / 2) + 28);
_local2.activity._y = (_local2.muteicon._y = Math.round((_local2.back._height / 2) - 12));
_local3._y = Stage.height / 2;
if (Stage.displayState == "fullScreen") {
_local2.muteicon._xscale = (_local2.muteicon._yscale = (_local2.activity._xscale = (_local2.activity._yscale = (_local2.logo._xscale = (_local2.logo._yscale = 200)))));
_local2.logo._x = (Stage.width - _local2.logo._width) - 20;
_local2.logo._y = 20;
} else {
_local2.muteicon._xscale = (_local2.muteicon._yscale = (_local2.activity._xscale = (_local2.activity._yscale = (_local2.logo._xscale = (_local2.logo._yscale = 100)))));
_local3._xscale = (_local3._yscale = 200);
if (_local2.logo._height > 1) {
_local2.logo._x = (config.displaywidth - _local2.logo._width) - 10;
_local2.logo._y = 10;
}
}
if (config.height == 20) {
_local3._visible = false;
}
}
function setState(stt) {
var _local2 = config.clip.display;
var _local3 = config.clip.playicon;
switch (stt) {
case 0 :
if ((config.linkfromdisplay == "false") && (config.showicons == "true")) {
}
_local2.activity._visible = false;
break;
case 1 :
_local3._visible = false;
if (config.showicons == "true") {
}
break;
case 2 :
_local3._visible = false;
_local2.activity._visible = false;
}
}
function setSize(wid, hei) {
itemSize = new Array(wid, hei);
var _local2 = config.clip.display;
scaleClip(_local2.image, itemSize[0], itemSize[1]);
scaleClip(_local2.video, itemSize[0], itemSize[1]);
}
function scaleClip(tgt, wid, hei) {
var _local9 = tgt.mc._currentframe;
tgt.mc.gotoAndStop(1);
if (Stage.displayState == "fullScreen") {
var _local6 = Stage.width;
var _local5 = Stage.height;
} else {
var _local6 = config.displaywidth;
var _local5 = config.displayheight;
}
var _local3 = _local6 / wid;
var _local4 = _local5 / hei;
if (((_local3 < _local4) && (config.overstretch == "false")) || ((_local4 < _local3) && (config.overstretch == "true"))) {
tgt._width = wid * _local3;
tgt._height = hei * _local3;
} else if (config.overstretch == "none") {
tgt._width = wid;
tgt._height = hei;
} else if (config.overstretch == "fit") {
tgt._width = _local6;
tgt._height = _local5;
} else if (tgt._name == "thumb") {
tgt._width = (tgt._height = 50);
} else {
tgt._width = wid * _local4;
tgt._height = hei * _local4;
}
if (tgt._name == "thumb") {
tgt._x = 5;
tgt._y = 5;
} else {
tgt._x = (_local6 / 2) - (tgt._width / 2);
tgt._y = (_local5 / 2) - (tgt._height / 2);
}
tgt.mc.gotoAndPlay(_local9);
}
function setItem(idx) {
currentItem = idx;
var _local2 = config.clip.display;
if (feeder.feed[idx].image == undefined) {
_local2.thumb.clear();
_local2.thumb._visible = false;
} else {
imageLoader.loadImage(feeder.feed[idx].image);
_local2.thumb._visible = true;
}
}
function onResize() {
if (config.displayheight >= config.height) {
config.height = (config.displayheight = Stage.height);
config.width = (config.displaywidth = Stage.width);
}
setDimensions();
}
function onFullScreen(fs) {
if (fs == false) {
setDimensions();
}
}
function firstClick() {
var _local4 = this;
var _local2 = config.clip.display;
var _local3 = config.clip.playicon;
_local3._visible = false;
_local2.muteicon._visible = false;
if (config.linkfromdisplay == "true") {
}
if (feeder.feed.length == 0) {
}
}
}
Symbol 141 MovieClip [__Packages.com.jeroenwijering.utils.ImageLoader] Frame 0
class com.jeroenwijering.utils.ImageLoader
{
var targetClip, targetWidth, targetHeight, mcLoader, useSmoothing, sourceURL, sourceWidth, sourceHeight, sourceLength, metaInt;
function ImageLoader (tgt, ost, wid, hei) {
targetClip = tgt;
((arguments.length > 1) ? ((overStretch = String(ost))) : null);
if (arguments.length > 2) {
targetWidth = wid;
targetHeight = hei;
}
mcLoader = new MovieClipLoader();
mcLoader.addListener(this);
}
function onLoadInit(inTarget) {
if (useSmoothing == true) {
var _local3 = new flash.display.BitmapData(targetClip.mc._width, targetClip.mc._height, true, 0);
_local3.draw(targetClip.mc);
var _local2 = targetClip.createEmptyMovieClip("smc", targetClip.getNextHighestDepth());
_local2.attachBitmap(_local3, _local2.getNextHighestDepth(), "auto", true);
targetClip.mc.unloadMovie();
targetClip.mc.removeMovieClip();
delete targetClip.mc;
scaleImage(targetClip.smc);
onLoadFinished();
} else {
targetClip.mc.forceSmoothing = true;
if (sourceURL.toLowerCase().indexOf(".swf") == -1) {
scaleImage(targetClip.mc);
}
onLoadFinished();
}
}
function scaleImage(tgt) {
targetClip._xscale = (targetClip._yscale = 100);
var _local5 = tgt._currentframe;
tgt.gotoAndStop(1);
sourceWidth = tgt._width;
sourceHeight = tgt._height;
sourceLength = tgt._totalframes / 20;
var _local3 = targetWidth / sourceWidth;
var _local4 = targetHeight / sourceHeight;
if ((overStretch == "fit") || (Math.abs(_local3 - _local4) < 0.1)) {
tgt._width = targetWidth;
tgt._height = targetHeight;
} else if (((overStretch == "true") && (_local3 > _local4)) || ((overStretch == "false") && (_local3 < _local4))) {
tgt._xscale = (tgt._yscale = _local3 * 100);
} else if (overStretch == "none") {
tgt._xscale = (tgt._yscale = 100);
} else {
tgt._xscale = (tgt._yscale = _local4 * 100);
}
if (targetWidth != undefined) {
tgt._x = (targetWidth / 2) - (tgt._width / 2);
tgt._y = (targetHeight / 2) - (tgt._height / 2);
}
tgt.gotoAndPlay(_local5);
onMetaData();
}
function loadImage(img) {
sourceURL = img;
targetClip.mc.clear();
targetClip.smc.unloadMovie();
targetClip.smc.removeMovieClip();
delete targetClip.smc;
checkSmoothing(img);
var _local3 = targetClip.createEmptyMovieClip("mc", 1);
mcLoader.loadClip(img, _local3);
if (img.toLowerCase().indexOf(".swf") > -1) {
metaInt = setInterval(this, "setSWFMeta", 200);
}
}
function checkSmoothing(img) {
var _local3 = _root._url.indexOf("/", 8);
var _local4 = _root._url.substring(0, _local3);
if ((((System.capabilities.version.indexOf("7,0,") > -1) || (img.toLowerCase().indexOf(".swf") > -1)) || (_root._url.indexOf("file://") > -1)) || ((img.indexOf(_local4) == -1) && (img.indexOf("http://") == 0))) {
useSmoothing = false;
} else {
useSmoothing = true;
}
}
function setSWFMeta() {
if (targetClip.mc._currentframe > 0) {
clearInterval(metaInt);
scaleImage(targetClip.mc);
}
}
function onLoadProgress(tgt, btl, btt) {
}
function onLoadFinished() {
}
function onMetaData() {
}
var overStretch = "none";
}
Symbol 142 MovieClip [__Packages.com.jeroenwijering.players.ControlbarView] Frame 0
class com.jeroenwijering.players.ControlbarView extends com.jeroenwijering.players.AbstractView implements com.jeroenwijering.feeds.FeedListener
{
var feeder, config, hideInt, barWidths, itemLength, currentItem;
function ControlbarView (ctr, cfg, fed) {
super(ctr, cfg, fed);
setColorsClicks();
setDimensions();
Stage.addListener(this);
feeder.addListener(this);
Mouse.addListener(this);
}
function setColorsClicks() {
var ref = this;
var _local2 = config.clip.controlbar;
_local2.col = new Color(_local2.back);
_local2.col.setRGB(config.backcolor);
_local2.playpause.col1 = new Color(_local2.playpause.ply);
_local2.playpause.col1.setRGB(config.frontcolor);
_local2.playpause.col2 = new Color(_local2.playpause.pas);
_local2.playpause.col2.setRGB(config.frontcolor);
_local2.playpause.onRollOver = function () {
this.col1.setRGB(ref.config.lightcolor);
this.col2.setRGB(ref.config.lightcolor);
};
_local2.playpause.onRollOut = function () {
this.col1.setRGB(ref.config.frontcolor);
this.col2.setRGB(ref.config.frontcolor);
};
_local2.playpause.onRelease = function () {
ref.sendEvent("playpause");
};
_local2.stop.col = new Color(_local2.stop.icn);
_local2.stop.col.setRGB(config.frontcolor);
_local2.stop.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
};
_local2.stop.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
};
_local2.stop.onRelease = function () {
ref.sendEvent("stop");
};
_local2.prev.col = new Color(_local2.prev.icn);
_local2.prev.col.setRGB(config.frontcolor);
_local2.prev.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
};
_local2.prev.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
};
_local2.prev.onRelease = function () {
ref.sendEvent("prev");
};
_local2.next.col = new Color(_local2.next.icn);
_local2.next.col.setRGB(config.frontcolor);
_local2.next.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
};
_local2.next.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
};
_local2.next.onRelease = function () {
ref.sendEvent("next");
};
_local2.scrub.elpTxt.textColor = config.frontcolor;
_local2.scrub.remTxt.textColor = config.frontcolor;
_local2.scrub.col = new Color(_local2.scrub.icn);
_local2.scrub.col.setRGB(config.frontcolor);
_local2.scrub.col2 = new Color(_local2.scrub.bar);
_local2.scrub.col2.setRGB(config.frontcolor);
_local2.scrub.col3 = new Color(_local2.scrub.bck);
_local2.scrub.col3.setRGB(config.frontcolor);
_local2.scrub.bck.onRollOver = function () {
this._parent.col.setRGB(ref.config.lightcolor);
};
_local2.scrub.bck.onRollOut = function () {
this._parent.col.setRGB(ref.config.frontcolor);
};
_local2.scrub.bck.onPress = function () {
this.onEnterFrame = function () {
var _local2 = this._parent._xmouse;
if ((_local2 < (this._parent.bck._width + this._parent.bck._x)) && (_local2 > this._parent.bck._x)) {
this._parent.icn._x = this._parent._xmouse - 1;
}
};
};
_local2.scrub.bck.onRelease = (_local2.scrub.bck.onReleaseOutside = function () {
var _local2 = ((this._parent._xmouse - this._parent.bar._x) / ref.barWidths) * ref.itemLength;
ref.sendEvent("scrub", Math.round(_local2));
delete this.onEnterFrame;
});
_local2.scrub.bck.tabEnabled = false;
_local2.fs.col1 = new Color(_local2.fs.ns);
_local2.fs.col2 = new Color(_local2.fs.fs);
_local2.fs.col.setRGB(ref.config.frontcolor);
_local2.fs.col2.setRGB(ref.config.frontcolor);
_local2.fs.onRollOver = function () {
this.col1.setRGB(ref.config.lightcolor);
this.col2.setRGB(ref.config.lightcolor);
};
_local2.fs.onRollOut = function () {
this.col1.setRGB(ref.config.frontcolor);
this.col2.setRGB(ref.config.frontcolor);
};
_local2.fs.onRelease = function () {
ref.sendEvent("fullscreen");
this.col1.setRGB(ref.config.frontcolor);
this.col2.setRGB(ref.config.frontcolor);
};
_local2.cc.col = new Color(_local2.cc.icn);
_local2.cc.col.setRGB(ref.config.frontcolor);
_local2.cc.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
};
_local2.cc.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
};
_local2.cc.onRelease = function () {
ref.sendEvent("captions");
};
_local2.au.col = new Color(_local2.au.icn);
_local2.au.col.setRGB(ref.config.frontcolor);
_local2.au.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
};
_local2.au.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
};
_local2.au.onRelease = function () {
ref.sendEvent("audio");
};
_local2.dl.col = new Color(_local2.dl.icn);
_local2.dl.col.setRGB(ref.config.frontcolor);
_local2.dl.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
};
_local2.dl.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
};
_local2.dl.onRelease = function () {
ref.sendEvent("getlink", ref.currentItem);
};
_local2.vol.col = new Color(_local2.vol.bar);
_local2.vol.col.setRGB(config.frontcolor);
_local2.vol.col2 = new Color(_local2.vol.bck);
_local2.vol.col2.setRGB(config.frontcolor);
_local2.vol.col3 = new Color(_local2.vol.icn);
_local2.vol.col3.setRGB(config.frontcolor);
_local2.vol.onRollOver = function () {
this.col.setRGB(ref.config.lightcolor);
this.col3.setRGB(ref.config.lightcolor);
};
_local2.vol.onRollOut = function () {
this.col.setRGB(ref.config.frontcolor);
this.col3.setRGB(ref.config.frontcolor);
};
_local2.vol.onRelease = function () {
this.onEnterFrame = function () {
this.msk._width = this._xmouse - 12;
};
};
_local2.vol.onRelease = (_local2.vol.onReleaseOutside = function () {
ref.sendEvent("volume", (this._xmouse - 12) * 5);
delete this.onEnterFrame;
});
}
function setDimensions() {
clearInterval(hideInt);
var _local4 = config.clip.controlbar;
if (Stage.displayState == "fullScreen") {
_local4._x = Math.round((Stage.width / 2) - 200);
var _local3 = 400;
_local4._y = Stage.height - 40;
_local4._alpha = 100;
_local4.back._alpha = 40;
_local4.fs.fs._visible = false;
_local4.fs.ns._visible = true;
} else if (config.displayheight == config.height) {
_local4._y = config.displayheight - 40;
if ((config.displaywidth > 450) && (config.displaywidth == config.width)) {
_local4._x = Math.round((Stage.width / 2) - 200);
var _local3 = 400;
} else {
_local4._x = 20;
var _local3 = config.displaywidth - 40;
}
((config.showicons == "false") ? ((_local4._visible = false)) : null);
_local4.back._alpha = 40;
_local4.fs.fs._visible = true;
_local4.fs.ns._visible = false;
} else {
_local4._x = 0;
_local4._y = config.displayheight;
var _local3 = config.width;
_local4._alpha = 100;
_local4.back._alpha = 100;
if (config.jpgfile != undefined) {
_local4.back._alpha = 0;
}
_local4.fs.fs._visible = true;
_local4.fs.ns._visible = false;
}
if (config.largecontrols == "true") {
_local4._xscale = (_local4._yscale = 200);
if (Stage.displayState == "fullScreen") {
_local4._y = Stage.height - 60;
var _local3 = 300;
_local4._x = Math.round((Stage.width / 2) - 300);
} else {
var _local3 = _local3 / 2;
}
}
_local4.back._width = _local3;
_local4.prev._visible = (_local4.next._visible = true);
_local4.scrub.shd._width = _local3 - 51;
_local4.scrub._x = 51;
if (config.showstop == "true") {
_local4.scrub.shd._width = _local4.scrub.shd._width - 17;
_local4.scrub._x = _local4.scrub._x + 17;
} else {
_local4.stop._visible = false;
_local4.prev._x = 17;
_local4.next._x = 34;
}
var _local2 = _local3;
if (_local3 > 50) {
_local2 = _local2 - 37;
_local4.scrub.shd._width = _local4.scrub.shd._width - 37;
_local4.vol._x = _local2;
} else {
_local2 = _local2 - 1;
_local4.scrub.shd._width = _local4.scrub.shd._width - 1;
_local4.vol._x = _local2;
}
if (feeder.audio == true) {
_local2 = _local2 - 17;
_local4.scrub.shd._width = _local4.scrub.shd._width - 17;
_local4.au._x = _local2;
_local4.au._visible = true;
} else {
_local4.au._visible = false;
}
if (feeder.captions == true) {
_local2 = _local2 - 17;
_local4.scrub.shd._width = _local4.scrub.shd._width - 17;
_local4.cc._x = _local2;
_local4.cc._visible = true;
} else {
_local4.cc._visible = false;
}
if (config.showdownload == "true") {
_local2 = _local2 - 17;
_local4.scrub.shd._width = _local4.scrub.shd._width - 17;
_local4.dl._x = _local2;
} else {
_local4.dl._visible = false;
}
if ((((Stage.displayState == undefined) || (config.usefullscreen == "false")) || (feeder.onlymp3s == true)) && (config.fsbuttonlink == undefined)) {
_local4.fs._visible = false;
} else {
_local2 = _local2 - 18;
_local4.scrub.shd._width = _local4.scrub.shd._width - 18;
_local4.fs._x = _local2;
}
if (((config.showdigits == "false") || (_local4.scrub.shd._width < 120)) || (System.capabilities.version.indexOf("7,0,") > -1)) {
_local4.scrub.elpTxt._visible = (_local4.scrub.remTxt._visible = false);
_local4.scrub.bar._x = (_local4.scrub.bck._x = (_local4.scrub.icn._x = 5));
barWidths = (_local4.scrub.bck._width = _local4.scrub.shd._width - 10);
} else {
_local4.scrub.elpTxt._visible = (_local4.scrub.remTxt._visible = true);
_local4.scrub.bar._x = (_local4.scrub.bck._x = (_local4.scrub.icn._x = 42));
barWidths = (_local4.scrub.bck._width = _local4.scrub.shd._width - 84);
_local4.scrub.remTxt._x = _local4.scrub.shd._width - 39;
}
_local4.scrub.bar._width = 0;
_local4 = config.clip.controlbar.playpause;
_local4.pas._visible = false;
}
function setState(stt) {
var _local2 = config.clip.controlbar.playpause;
switch (stt) {
case 0 :
_local2.ply._visible = true;
_local2.pas._visible = false;
break;
case 1 :
_local2.pas._visible = true;
_local2.ply._visible = false;
break;
case 2 :
_local2.pas._visible = true;
_local2.ply._visible = false;
}
}
function setTime(elp, rem) {
itemLength = elp + rem;
itemProgress = Math.round((rem / itemLength) * 100);
var _local2 = config.clip.controlbar.scrub;
var _local5 = Math.floor((elp / (elp + rem)) * barWidths) - 2;
(((elp == 0) || (_local5 < 2)) ? ((_local2.bar._width = 0)) : ((_local2.bar._width = _local5 - 2)));
_local2.icn._x = (_local2.bar._width + _local2.bar._x) + 1;
_local2.elpTxt.text = (com.jeroenwijering.utils.StringMagic.addLeading(elp / 60) + ":") + com.jeroenwijering.utils.StringMagic.addLeading(elp % 60);
if (_local2.bck._width == barWidths) {
if (config.showdigits == "total") {
_local2.remTxt.text = (com.jeroenwijering.utils.StringMagic.addLeading((elp + rem) / 60) + ":") + com.jeroenwijering.utils.StringMagic.addLeading((elp + rem) % 60);
} else {
_local2.remTxt.text = (com.jeroenwijering.utils.StringMagic.addLeading(rem / 60) + ":") + com.jeroenwijering.utils.StringMagic.addLeading(rem % 60);
}
}
}
function setItem(prm) {
wasLoaded = false;
currentItem = prm;
config.clip.controlbar.scrub.icn._alpha = 100;
}
function setLoad(pct) {
var _local2 = config.clip.controlbar.scrub;
if (wasLoaded == false) {
_local2.bck._width = Math.round((barWidths * pct) / 100);
}
_local2.remTxt.text = Math.round(pct) + " %";
((pct == 100) ? ((wasLoaded = true)) : null);
}
function setVolume(pr1) {
var _local2 = config.clip.controlbar.vol;
_local2.msk._width = Math.round(pr1 / 5);
if (pr1 == 0) {
_local2.icn._alpha = 40;
} else {
_local2.icn._alpha = 100;
}
}
function onResize() {
if (config.displayheight > (config.height + 10)) {
config.height = (config.displayheight = Stage.height);
config.width = (config.displaywidth = Stage.width);
}
setDimensions();
}
function onFullScreen(fs) {
if (fs == false) {
setDimensions();
com.jeroenwijering.utils.Animations.fadeIn(config.clip.controlbar);
} else {
hideInt = setInterval(this, "hideBar", 500);
}
}
function hideBar() {
com.jeroenwijering.utils.Animations.fadeOut(config.clip.controlbar);
clearInterval(hideInt);
}
function onMouseMove() {
if (((config.displayheight == config.height) || (Stage.displayState == "fullScreen")) && (config.showicons == "true")) {
com.jeroenwijering.utils.Animations.fadeIn(config.clip.controlbar);
clearInterval(hideInt);
if (!config.clip.controlbar.hitTest(_xmouse, _ymouse)) {
hideInt = setInterval(this, "hideBar", 500);
}
}
}
function onFeedUpdate(typ) {
setDimensions();
}
var itemProgress = 0;
var wasLoaded = false;
}
Symbol 143 MovieClip [__Packages.com.jeroenwijering.utils.Animations] Frame 0
class com.jeroenwijering.utils.Animations
{
function Animations () {
}
static function fadeIn(tgt, end, spd) {
((arguments.length < 3) ? ((spd = 20)) : null);
((arguments.length < 2) ? ((end = 100)) : null);
tgt._visible = true;
tgt.onEnterFrame = function () {
if (this._alpha > (end - spd)) {
delete this.onEnterFrame;
this._alpha = end;
} else {
this._alpha = this._alpha + spd;
}
};
}
static function fadeOut(tgt, end, spd, rmv) {
((arguments.length < 4) ? ((rmv = false)) : null);
((arguments.length < 3) ? ((spd = 20)) : null);
((arguments.length < 2) ? ((end = 0)) : null);
tgt.onEnterFrame = function () {
if (this._alpha < (end + spd)) {
delete this.onEnterFrame;
this._alpha = end;
((end == 0) ? ((this._visible = false)) : null);
((rmv == true) ? (this.removeMovieClip()) : null);
} else {
this._alpha = this._alpha - spd;
}
};
}
static function crossfade(tgt, alp) {
var phs = "out";
var pct = (alp / 5);
tgt.onEnterFrame = function () {
if (phs == "out") {
this._alpha = this._alpha - pct;
if (this._alpha < 1) {
phs = "in";
}
} else {
this._alpha = this._alpha + pct;
((this._alpha >= alp) ? (delete this.onEnterFrame) : null);
}
};
}
static function easeTo(tgt, xps, yps, spd) {
((arguments.length < 4) ? ((spd = 2)) : null);
tgt.onEnterFrame = function () {
this._x = xps - ((xps - this._x) / (1 + (1 / spd)));
this._y = yps - ((yps - this._y) / (1 + (1 / spd)));
if ((((this._x > (xps - 1)) && (this._x < (xps + 1))) && (this._y > (yps - 1))) && (this._y < (yps + 1))) {
this._x = Math.round(xps);
this._y = Math.round(yps);
delete this.onEnterFrame;
}
};
}
static function easeText(tgt, txt, spd) {
if (arguments.length < 2) {
tgt.str = tgt.tf.text;
tgt.hstr = tgt.tf.htmlText;
} else {
tgt.str = (tgt.hstr = txt);
}
if (arguments.length < 3) {
spd = 1.5;
}
tgt.tf.text = "";
tgt.i = 0;
tgt.onEnterFrame = function () {
this.tf.text = this.str.substr(0, this.str.length - Math.floor((this.str.length - this.tf.text.length) / spd));
if (this.tf.text == this.str) {
this.tf.htmlText = this.hstr;
delete this.onEnterFrame;
}
this.i++;
};
}
}
Symbol 144 MovieClip [__Packages.com.jeroenwijering.players.TrackTitleView] Frame 0
class com.jeroenwijering.players.TrackTitleView extends com.jeroenwijering.players.AbstractView
{
var trackTitleClip, config, currentItem, nInterval, feeder;
function TrackTitleView (ctr, cfg, fed) {
super(ctr, cfg, fed);
setupTitle();
Stage.addListener(this);
}
function setupTitle() {
trackTitleClip = config.clip.trackTitle_mc;
trackTitleClip._x = 55;
trackTitleClip._y = config.displayheight - 24;
trackTitleClip.title_txt._width = ((config.displaywidth - 60) - 98) - 20;
trackTitleClip.title_txt.textColor = config.frontcolor;
}
function setItem(idx) {
currentItem = idx;
}
function setVolume(vol) {
}
function setState(stt) {
}
function setLoad(stt) {
if (stt == 0) {
clearInterval(nInterval);
updateTitle();
}
}
function updateTitle() {
var _local2;
if (feeder.feed[currentItem].description == undefined) {
_local2 = feeder.feed[currentItem].title;
} else {
_local2 = feeder.feed[currentItem].description;
}
var _local3 = _local2.indexOf("--");
var _local4 = _local2.slice(0, _local3);
var _local5 = _local2.slice(_local3 + 3, _local2.length);
trackTitleClip.title_txt.htmlText = _local4;
trackTitleClip.title_txt.textColor = config.frontcolor;
nInterval = setInterval(this, "swapTrackArtist", 4000, _local4, _local5);
}
function swapTrackArtist(trackName, artistName) {
if (trackTitleClip.title_txt.text == trackName) {
trackTitleClip.title_txt.htmlText = artistName;
trackTitleClip.title_txt.textColor = config.frontcolor;
return(undefined);
}
if (trackTitleClip.title_txt.text == artistName) {
trackTitleClip.title_txt.htmlText = trackName;
trackTitleClip.title_txt.textColor = config.frontcolor;
return(undefined);
}
}
function onFullScreen(fs) {
}
}
Symbol 145 MovieClip [__Packages.com.jeroenwijering.players.BackgroundImageView] Frame 0
class com.jeroenwijering.players.BackgroundImageView extends com.jeroenwijering.players.AbstractView
{
var config, backgroundImage, currentItem;
function BackgroundImageView (ctr, cfg, fed) {
super(ctr, cfg, fed);
setupImage();
Stage.addListener(this);
}
function setupImage() {
var _local3 = this;
var _local2 = config.clip.playlistGlow;
_local2._x = (_local2._y = 0);
_local2._width = config.width;
_local2._height = config.height;
backgroundImage = config.clip.backgroundImage_mc;
if (config.jpgfile != undefined) {
backgroundImage.loadMovie(config.jpgfile);
}
}
function setItem(idx) {
currentItem = idx;
}
function setVolume(vol) {
}
function setState(stt) {
}
function onFullScreen(fs) {
}
}
Symbol 146 MovieClip [__Packages.com.jeroenwijering.players.PlaylistView] Frame 0
class com.jeroenwijering.players.PlaylistView extends com.jeroenwijering.players.AbstractView implements com.jeroenwijering.feeds.FeedListener
{
var config, listRight, listWidth, feeder, playlistConfig, listLength, thumbLoader, listScroller, currentItem;
function PlaylistView (ctr, cfg, fed) {
super(ctr, cfg, fed);
if (config.displaywidth < config.width) {
listRight = true;
listWidth = (config.width - config.displaywidth) - 1;
} else {
listRight = false;
listWidth = config.width;
}
setButtons();
Stage.addListener(this);
feeder.addListener(this);
playlistConfig = new com.jeroenwijering.players.Config();
}
function setButtons() {
var ref = this;
var _local3 = config.clip.playlist;
_local3.btn._visible = false;
listLength = feeder.feed.length;
var _local5 = 0;
var _local4 = 0;
while (_local4 < feeder.feed.length) {
if (((feeder.feed[_local4].category != "commercial") && (feeder.feed[_local4].category != "preroll")) && (feeder.feed[_local4].category != "postroll")) {
_local3.btn.duplicateMovieClip("btn" + _local4, _local4);
_local3["btn" + _local4].txt._width = listWidth - 20;
_local3["btn" + _local4].col = new Color(_local3["btn" + _local4].bck);
_local3["btn" + _local4].col.setRGB(config.frontcolor);
if (config.jpgfile != undefined) {
_local3["btn" + _local4].bck._alpha = 10;
}
_local3["btn" + _local4].col2 = new Color(_local3["btn" + _local4].icn);
_local3["btn" + _local4].col2.setRGB(config.frontcolor);
_local3["btn" + _local4].col3 = new Color(_local3["btn" + _local4].link);
_local3["btn" + _local4].col3.setRGB(config.frontcolor);
_local3["btn" + _local4].bck._width = listWidth;
_local3["btn" + _local4].bck.onRollOver = function () {
this._parent.txt.textColor = ref.config.backcolor;
if (ref.config.jpgfile != undefined) {
this._alpha = 20;
} else {
this._alpha = 50;
this._parent.col.setRGB(ref.config.lightcolor);
}
this._parent.col2.setRGB(ref.config.backcolor);
this._parent.col3.setRGB(ref.config.backcolor);
if (ref.currentItem != this._parent.getDepth()) {
if (ref.config.jpgfile != undefined) {
this._alpha = 50;
} else {
this._alpha = 90;
}
}
};
_local3["btn" + _local4].bck.onRollOut = function () {
if (ref.config.jpgfile != undefined) {
this._alpha = 10;
} else {
this._parent.col.setRGB(ref.config.frontcolor);
}
if (ref.currentItem != this._parent.getDepth()) {
if (this._parent.txt.textColor != 16711680) {
this._parent.txt.textColor = ref.config.frontcolor;
}
this._parent.col2.setRGB(ref.config.frontcolor);
this._parent.col3.setRGB(ref.config.frontcolor);
this._alpha = 10;
} else {
this._alpha = 50;
}
};
_local3["btn" + _local4].bck.onRelease = function () {
if (this.ERROR == "true") {
trace("ERROR working");
}
ref.sendEvent("playitem", this._parent.getDepth());
};
if (config.thumbsinplaylist == "true") {
_local3["btn" + _local4].bck._height = 40;
_local3["btn" + _local4].icn._y = _local3["btn" + _local4].icn._y + 9;
_local3["btn" + _local4]._y = _local5 * 41;
_local3["btn" + _local4].txt._height = _local3["btn" + _local4].txt._height + 20;
if (feeder.feed[_local4].author == undefined) {
_local3["btn" + _local4].txt.htmlText = (("<b>" + (_local4 + 1)) + "</b>:<br />") + feeder.feed[_local4].title;
} else {
_local3["btn" + _local4].txt.htmlText = (("<b>" + feeder.feed[_local4].author) + "</b>:<br />") + feeder.feed[_local4].title;
}
if (feeder.feed[_local4].image != undefined) {
_local3["btn" + _local4].txt._x = _local3["btn" + _local4].txt._x + 60;
_local3["btn" + _local4].txt._width = _local3["btn" + _local4].txt._width - 60;
thumbLoader = new com.jeroenwijering.utils.ImageLoader(_local3["btn" + _local4].img, "true", 60, 40);
thumbLoader.loadImage(feeder.feed[_local4].image);
_local3["btn" + _local4].img.setMask(_local3["btn" + _local4].msk);
} else {
_local3["btn" + _local4].msk._height = 10;
_local3["btn" + _local4].img._visible = false;
_local3["btn" + _local4].msk._visible = false;
}
} else {
_local3["btn" + _local4]._y = _local5 * 23;
if (feeder.feed[_local4].author == undefined) {
if (feeder.feed[_local4].description == undefined) {
_local3["btn" + _local4].txt.htmlText = feeder.feed[_local4].title;
} else {
_local3["btn" + _local4].txt.htmlText = feeder.feed[_local4].description;
}
} else {
_local3["btn" + _local4].txt.htmlText = (feeder.feed[_local4].author + " - ") + feeder.feed[_local4].title;
}
_local3["btn" + _local4].msk._height = 10;
_local3["btn" + _local4].img._visible = (_local3["btn" + _local4].msk._visible = false);
}
_local3["btn" + _local4].txt.textColor = config.frontcolor;
if (feeder.feed[_local4].link != undefined) {
if ((config.autoscroll == "true") || (_root.autoscroll == "true")) {
_local3["btn" + _local4].link._x = listWidth - 28;
} else {
_local3["btn" + _local4].link._x = listWidth - 28;
}
_local3["btn" + _local4].link.onRollOver = function () {
this._parent.col3.setRGB(ref.config.lightcolor);
};
_local3["btn" + _local4].link.onRollOut = function () {
if (ref.currentItem == this._parent.getDepth()) {
this._parent.col3.setRGB(ref.config.backcolor);
} else {
this._parent.col3.setRGB(ref.config.frontcolor);
}
};
_local3["btn" + _local4].link.onPress = function () {
ref.sendEvent("getlink", this._parent.getDepth(), "add");
};
_local3["btn" + _local4].txt._width = _local3["btn" + _local4].txt._width - 46;
_local3["btn" + _local4].icn._x = _local3["btn" + _local4].link._x - 26;
_local3["btn" + _local4].icn.onRollOver = function () {
this._parent.col2.setRGB(ref.config.lightcolor);
};
_local3["btn" + _local4].icn.onRollOut = function () {
if (ref.currentItem == this._parent.getDepth()) {
this._parent.col2.setRGB(ref.config.backcolor);
} else {
this._parent.col2.setRGB(ref.config.frontcolor);
}
};
_local3["btn" + _local4].icn.onRelease = function () {
ref.sendEvent("getlink", this._parent.getDepth(), "url");
};
} else {
_local3["btn" + _local4].icn._visible = false;
}
_local5++;
}
_local4++;
}
var _local6 = config.clip.playlistmask;
if (listRight == true) {
_local6._x = (_local3._x = Number(config.displaywidth) + 1);
_local6._y = (_local3._y = 0);
_local6._height = config.displayheight;
} else {
_local6._y = (_local3._y = (Number(config.displayheight) + Number(config.controlbar)) - 1);
_local6._height = ((Number(config.height) + 1) - Number(config.controlbar)) - Number(config.displayheight);
}
_local6._width = listWidth;
_local3.setMask(_local6);
if ((_local3._height > (_local6._height + 2)) && (feeder.feed.length > 1)) {
if (config.autoscroll == "false") {
_local6._width = _local6._width - 10;
_local4 = 0;
while (_local4 < feeder.feed.length) {
_local3["btn" + _local4].bck._width = _local3["btn" + _local4].bck._width - 10;
_local3["btn" + _local4].icn._x = _local3["btn" + _local4].icn._x - 10;
_local3["btn" + _local4].link._x = _local3["btn" + _local4].link._x - 10;
_local4++;
}
listScroller = new com.jeroenwijering.utils.Scroller(_local3, _local6, false, config.frontcolor, config.lightcolor);
} else {
listScroller = new com.jeroenwijering.utils.Scroller(_local3, _local6, true, config.frontcolor, config.lightcolor);
}
}
}
function setItem(itm) {
var _local2 = config.clip.playlist;
if (config.jpgfile != undefined) {
_local2["btn" + currentItem].bck._alpha = 0;
} else {
_local2["btn" + currentItem].col.setRGB(config.frontcolor);
}
_local2["btn" + currentItem].bck._alpha = 10;
_local2["btn" + currentItem].col2.setRGB(config.frontcolor);
_local2["btn" + currentItem].col3.setRGB(config.frontcolor);
_local2["btn" + currentItem].txt.textColor = config.frontcolor;
currentItem = itm;
_local2["btn" + currentItem].txt.textColor = config.backcolor;
_local2["btn" + currentItem].col2.setRGB(config.backcolor);
_local2["btn" + currentItem].col3.setRGB(config.backcolor);
_local2["btn" + currentItem].bck._alpha = 50;
if (config.autoscroll == "false") {
listScroller.scrollTo(_local2["btn" + currentItem]._y);
}
}
function setTime(elp, rem) {
if ((feeder.ischapters == true) && (Math.abs(elp - currentTime) > 5)) {
currentTime = elp;
var _local2 = 0;
while (_local2 < feeder.feed.length) {
if (feeder.feed[_local2].start > currentTime) {
if (_local2 != (currentItem + 1)) {
setItem(_local2 - 1);
}
break;
}
_local2++;
}
}
}
function setLoadError(itm) {
var ref = this;
var _local4 = config.clip.playlist;
var _local2 = _local4["btn" + itm];
var nDB_ID = feeder.feed[itm].bluewireid;
var tTitle = feeder.feed[itm].description;
_local2.txt.htmlText = "!! Error: " + feeder.feed[itm].description;
_local2.txt.textColor = 16711680 /* 0xFF0000 */;
_local2.bck.onRollOver = function () {
};
_local2.bck.onRollOut = function () {
};
_local2.bck.onRelease = function () {
trace("Bad Song");
ref.controller.getLocation(ref.playlistConfig.badSongUrl, ref.playlistConfig.badSongUrl, ref.playlistConfig.badsongText2, "badsong", "", "", nDB_ID, tTitle);
};
}
function onFullScreen(fs) {
if (listScroller == undefined) {
} else if (fs == true) {
config.clip.scrollbar._visible = false;
} else {
config.clip.scrollbar._visible = true;
}
}
function onFeedUpdate(typ) {
listScroller.purgeScrollbar();
delete listScroller;
var _local3 = config.clip.playlist;
var _local2 = 0;
while (_local2 < 999) {
_local3["btn" + _local2].removeMovieClip();
_local2++;
}
setButtons();
setItem(currentItem);
}
var currentTime = -10;
}
Symbol 147 MovieClip [__Packages.com.jeroenwijering.utils.Scroller] Frame 0
class com.jeroenwijering.utils.Scroller
{
var targetClip, maskClip, sizeRatio, scrollInterval, SCROLLER_CLIP, SCROLLER_FRONT_COLOR;
function Scroller (tgt, msk, asc, fcl, hcl) {
targetClip = tgt;
maskClip = msk;
((arguments.length > 2) ? ((autoScroll = asc)) : null);
((arguments.length > 3) ? ((frontColor = fcl)) : null);
((arguments.length > 4) ? ((lightColor = hcl)) : null);
sizeRatio = maskClip._height / targetClip._height;
if (autoScroll == false) {
drawScrollbar();
} else {
scrollInterval = setInterval(this, "doAutoscroll", 50);
}
if (System.capabilities.os.toLowerCase().indexOf("mac") == -1) {
Mouse.addListener(this);
}
}
function drawScrollbar() {
targetClip._parent.createEmptyMovieClip("scrollbar", targetClip._parent.getNextHighestDepth());
SCROLLER_CLIP = targetClip._parent.scrollbar;
SCROLLER_CLIP._x = (maskClip._x + maskClip._width) - 1;
SCROLLER_CLIP._y = maskClip._y + 3;
SCROLLER_CLIP.createEmptyMovieClip("back", 0);
SCROLLER_CLIP.back._alpha = 0;
SCROLLER_CLIP.back._y = -3;
drawSquare(SCROLLER_CLIP.back, 12, maskClip._height, frontColor);
SCROLLER_CLIP.createEmptyMovieClip("bar", 1);
SCROLLER_CLIP.bar._x = 4;
SCROLLER_CLIP.bar._alpha = 50;
drawSquare(SCROLLER_CLIP.bar, 4, maskClip._height - 5, frontColor);
SCROLLER_CLIP.createEmptyMovieClip("front", 2);
SCROLLER_CLIP.front._x = 3;
drawSquare(SCROLLER_CLIP.front, 6, SCROLLER_CLIP.bar._height * sizeRatio, frontColor);
SCROLLER_CLIP.front.createEmptyMovieClip("bg", 1);
SCROLLER_CLIP.front.bg._x = -3;
SCROLLER_CLIP.front.bg._alpha = 0;
drawSquare(SCROLLER_CLIP.front.bg, 12, SCROLLER_CLIP.front._height, frontColor);
SCROLLER_FRONT_COLOR = new Color(SCROLLER_CLIP.front);
setScrollbarEvents();
}
function onMouseWheel(dta) {
scrollTo(currentScroll - (dta * 20));
}
function doAutoscroll() {
if ((((maskClip._xmouse > 0) && (maskClip._xmouse < (maskClip._width / (maskClip._xscale / 100)))) && (maskClip._ymouse > 0)) && (maskClip._ymouse < (maskClip._height / (maskClip._yscale / 100)))) {
var _local2 = (maskClip._ymouse * (maskClip._yscale / 100)) - (maskClip._height / 2);
scrollTo(currentScroll + Math.floor(_local2 * AUTOSCROLL_SPEED));
}
}
function setScrollbarEvents() {
var instance = this;
SCROLLER_CLIP.front.onRollOver = (SCROLLER_CLIP.back.onRollOver = function () {
instance.SCROLLER_FRONT_COLOR.setRGB(instance.lightColor);
});
SCROLLER_CLIP.front.onRollOut = (SCROLLER_CLIP.back.onRollOut = function () {
instance.SCROLLER_FRONT_COLOR.setRGB(instance.frontColor);
});
SCROLLER_CLIP.back.onRelease = function () {
if (this._ymouse > (this._parent.front._y + this._parent.front._height)) {
instance.scrollTo(instance.currentScroll + (instance.maskClip._height / 2));
} else if (this._ymouse < this._parent.front._y) {
instance.scrollTo(instance.currentScroll - (instance.maskClip._height / 2));
}
};
SCROLLER_CLIP.front.onPress = function () {
this.startDrag(false, 3, 0, 3, instance.SCROLLER_CLIP.bar._height - this._height);
instance.scrollInterval = setInterval(instance, "scrollTo", 100);
};
SCROLLER_CLIP.front.onRelease = (SCROLLER_CLIP.front.onReleaseOutside = function () {
this.stopDrag();
clearInterval(instance.scrollInterval);
});
scrollTo(maskClip._y - targetClip._y);
}
function scrollTo(yps) {
if ((arguments.length == 0) && (autoScroll == false)) {
yps = (SCROLLER_CLIP.front._y * maskClip._height) / SCROLLER_CLIP.front._height;
}
if (yps < 5) {
yps = 0;
} else if (yps > ((targetClip._height - maskClip._height) - 5)) {
yps = targetClip._height - maskClip._height;
}
com.jeroenwijering.utils.Animations.easeTo(targetClip, targetClip._x, maskClip._y - yps);
SCROLLER_CLIP.front._y = (yps * SCROLLER_CLIP.front._height) / maskClip._height;
currentScroll = yps;
}
function purgeScrollbar() {
clearInterval(scrollInterval);
Mouse.removeListener(this);
scrollTo(0);
SCROLLER_CLIP.removeMovieClip();
}
function drawSquare(tgt, wth, hei, clr) {
tgt.clear();
tgt.beginFill(clr, 100);
tgt.moveTo(0, 0);
tgt.lineTo(wth, 0);
tgt.lineTo(wth, hei);
tgt.lineTo(0, hei);
tgt.lineTo(0, 0);
tgt.endFill();
}
var autoScroll = false;
var frontColor = 0;
var lightColor = 0;
var currentScroll = 0;
var AUTOSCROLL_SPEED = 0.5;
}
Symbol 148 MovieClip [__Packages.com.jeroenwijering.players.InputView] Frame 0
class com.jeroenwijering.players.InputView extends com.jeroenwijering.players.AbstractView
{
var currentTime, currentVolume, sendEvent, feeder;
function InputView (ctr, cfg, fed) {
super(ctr, cfg, fed);
Key.addListener(this);
}
function setTime(elp, rem) {
currentTime = elp;
}
function setVolume(vol) {
currentVolume = vol;
}
function onKeyDown() {
if (Key.getCode() == 32) {
sendEvent("playpause");
} else if (Key.getCode() == 37) {
if (feeder.feed.length == 1) {
sendEvent("scrub", currentTime - 15);
} else {
sendEvent("prev");
}
} else if (Key.getCode() == 39) {
if (feeder.feed.length == 1) {
sendEvent("scrub", currentTime + 15);
} else {
sendEvent("next");
}
} else if (Key.getCode() == 38) {
sendEvent("volume", currentVolume + 10);
} else if (Key.getCode() == 40) {
sendEvent("volume", currentVolume - 10);
} else if (Key.getCode() == 77) {
sendEvent("volume", 0);
}
}
}
Symbol 149 MovieClip [__Packages.com.jeroenwijering.players.EqualizerView] Frame 0
class com.jeroenwijering.players.EqualizerView extends com.jeroenwijering.players.AbstractView
{
var eqClip, config, eqStripes, currentVolume;
function EqualizerView (ctr, cfg, fed) {
super(ctr, cfg, fed);
setupEQ();
Stage.addListener(this);
}
function setupEQ() {
eqClip = config.clip.equalizer;
eqClip._y = config.displayheight - 66;
eqClip._x = 55;
eqStripes = Math.floor((config.displaywidth - 70) / 6);
eqClip.stripes.duplicateMovieClip("stripes2", 1);
eqClip.mask.duplicateMovieClip("mask2", 3);
eqClip.stripes._width = (eqClip.stripes2._width = config.displaywidth - 75);
eqClip.stripes.top.col = new Color(eqClip.stripes.top);
eqClip.stripes.top.col.setRGB(config.frontcolor);
eqClip.stripes.bottom.col = new Color(eqClip.stripes.bottom);
eqClip.stripes.bottom.col.setRGB(config.frontcolor);
eqClip.stripes2.top.col = new Color(eqClip.stripes2.top);
eqClip.stripes2.top.col.setRGB(config.frontcolor);
eqClip.stripes2.bottom.col = new Color(eqClip.stripes2.bottom);
eqClip.stripes2.bottom.col.setRGB(config.frontcolor);
eqClip.stripes.setMask(eqClip.mask);
eqClip.stripes2.setMask(eqClip.mask2);
eqClip.stripes._alpha = (eqClip.stripes2._alpha = 50);
setInterval(this, "drawEqualizer", 100, eqClip.mask);
setInterval(this, "drawEqualizer", 100, eqClip.mask2);
}
function drawEqualizer(tgt) {
tgt.clear();
tgt.beginFill(0, 100);
tgt.moveTo(0, 0);
var _local5 = Math.round(currentVolume / 6);
var _local2 = 0;
while (_local2 < eqStripes) {
var _local4 = (random(_local5) + (_local5 / 2)) + 2;
if (_local2 == Math.floor(eqStripes / 2)) {
_local4 = 0;
}
tgt.lineTo(_local2 * 6, -1);
tgt.lineTo(_local2 * 6, -_local4);
tgt.lineTo((_local2 * 6) + 4, -_local4);
tgt.lineTo((_local2 * 6) + 4, -1);
tgt.lineTo(_local2 * 6, -1);
_local2++;
}
tgt.lineTo(_local2 * 6, 0);
tgt.lineTo(0, 0);
tgt.endFill();
}
function setVolume(vol) {
currentVolume = vol;
}
function setState(stt) {
((stt == 2) ? ((eqClip._visible = true)) : ((eqClip._visible = false)));
}
function onFullScreen(fs) {
if (fs == true) {
eqClip._visible = false;
} else {
eqClip._visible = true;
}
}
}
Symbol 150 MovieClip [__Packages.com.jeroenwijering.players.AudioView] Frame 0
class com.jeroenwijering.players.AudioView extends com.jeroenwijering.players.AbstractView
{
var sync, audioClip, config, audioObject, currentItem, currentState, audioTime, feeder, isLoaded;
function AudioView (ctr, cfg, fed, snc) {
super(ctr, cfg, fed);
sync = snc;
var ref = this;
audioClip = config.clip.createEmptyMovieClip("audio", config.clip.getNextHighestDepth());
audioClip.setStart = function () {
if ((ref.stopTime == undefined) && (ref.sync == false)) {
ref.audioObject.loadSound(ref.feeder.feed[0].audio, true);
ref.audioObject.start(0);
} else if (ref.sync == false) {
ref.audioObject.start(ref.stopTime);
} else if (ref.currentState == 2) {
ref.audioObject.start(this.currentTime);
}
};
audioClip.setStop = function () {
ref.audioObject.stop();
ref.stopTime = ref.audioObject.position / 1000;
};
audioObject = new Sound(audioClip);
audioObject.setVolume(config.volume);
if ((config.useaudio == "true") && (sync == false)) {
audioClip.setStart();
}
if (sync == false) {
audioObject.onSoundComplete = function () {
this.start();
};
}
}
function setItem(idx) {
currentItem = idx;
}
function setState(stt) {
currentState = stt;
if (sync == false) {
return(undefined);
}
if ((stt == 2) && (config.useaudio == "true")) {
audioObject.start(currentTime);
} else {
audioObject.stop();
}
}
function setTime(elp, rem) {
if (sync == false) {
return(undefined);
}
if (Math.abs(elp - currentTime) > 1) {
currentTime = elp;
audioTime = audioObject.position / 1000;
if ((Math.abs(currentTime - audioTime) > 1) && (config.useaudio == "true")) {
audioObject.start(currentTime);
}
}
if (isLoaded != feeder.feed[currentItem].audio) {
isLoaded = feeder.feed[currentItem].audio;
audioObject.loadSound(isLoaded, true);
}
}
var currentTime = 0;
}
Symbol 151 MovieClip [__Packages.com.jeroenwijering.players.JavascriptView] Frame 0
class com.jeroenwijering.players.JavascriptView extends com.jeroenwijering.players.AbstractView
{
var sendEvent, loads, config, elaps, remain;
function JavascriptView (ctr, cfg, fed) {
super(ctr, cfg, fed);
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.addCallback("sendEvent", this, sendEvent);
}
}
function getUpdate(typ, pr1, pr2) {
if (flash.external.ExternalInterface.available) {
switch (typ) {
case "load" :
if (Math.round(pr1) != loads) {
loads = Math.round(pr1);
flash.external.ExternalInterface.call("getUpdate", typ, loads, pr2, config.javascriptid);
}
break;
case "time" :
if ((Math.round(pr1) != elaps) || (Math.round(pr2) != remain)) {
elaps = Math.round(pr1);
remain = Math.round(pr2);
flash.external.ExternalInterface.call("getUpdate", typ, elaps, remain, config.javascriptid);
}
break;
case "item" :
flash.external.ExternalInterface.call("getUpdate", typ, pr1, pr2, config.javascriptid);
break;
case "state" :
sendStatusChange(pr1);
flash.external.ExternalInterface.call("getUpdate", typ, pr1, pr2, config.javascriptid);
break;
default :
flash.external.ExternalInterface.call("getUpdate", typ, pr1, pr2, config.javascriptid);
}
}
}
function sendStatusChange(stt) {
if (!((state == 3) && (stt == 0))) {
flash.external.ExternalInterface.call("playerStatusChange", statuses[state], statuses[stt]);
}
state = stt;
}
var state = 4;
var statuses = new Array("PAUSED", "BUFFERING", "PLAYING", "COMPLETE", "NOT STARTED");
}
Symbol 152 MovieClip [__Packages.com.jeroenwijering.players.LogoView] Frame 0
class com.jeroenwijering.players.LogoView extends com.jeroenwijering.players.AbstractView
{
var pplLogo, config, eqClip, currentItem;
function LogoView (ctr, cfg, fed) {
super(ctr, cfg, fed);
setupLogo();
Stage.addListener(this);
}
function setupLogo() {
pplLogo = config.clip.ppl_logo;
eqClip = config.clip.equalizer;
pplLogo._x = ((55 + eqClip.stripes._width) - pplLogo._width) + 9;
pplLogo._y = config.displayheight - 24;
var _local3 = new Color(pplLogo.logobarswhite);
var _local4 = new Color(pplLogo.logobarsblack);
var _local2 = new Color(pplLogo.logoletters);
_local3.setRGB(config.lightcolor);
_local4.setRGB(config.lightcolor);
_local2.setRGB(config.frontcolor);
if (config.ppllogo == "off") {
pplLogo._visible = false;
}
}
function setItem(idx) {
currentItem = idx;
}
function setVolume(vol) {
}
function setState(stt) {
}
function onFullScreen(fs) {
}
}
Symbol 153 MovieClip [__Packages.com.jeroenwijering.players.MP3Model] Frame 0
class com.jeroenwijering.players.MP3Model extends com.jeroenwijering.players.AbstractModel
{
var soundClip, playlistConfig, domainLC, kernel, api, api_mcl, currentItem, feeder, positionInterval, durationInterval, currentID, currentURL, soundObject, currentVolume, sendUpdate, loadedInterval, currentPosition, currentState, sendCompleteEvent;
function MP3Model (vws, ctr, cfg, fed, scl) {
super(vws, ctr, cfg, fed);
soundClip = scl;
_level0.onLibLoad = mx.utils.Delegate.create(this, onLibLoad);
playlistConfig = new com.jeroenwijering.players.Config();
if (playlistConfig.loggingMode) {
domainLC = new LocalConnection();
var _local4 = "http://" + domainLC.domain();
trace("Domain: " + _local4);
if (playlistConfig.playerLocation == "SITE") {
kernel = "http://widgets.clearspring.com/o/4796d0a017fe72d1/-/-TRK/1/lib.as2.swf?onLoad=onLibLoad";
} else if (playlistConfig.playerLocation == "MYSPACE") {
kernel = "http://widgets.clearspring.com/o/4796d14c38f2ea41/-/-TRK/1/lib.as2.swf?onLoad=onLibLoad";
} else if (playlistConfig.playerLocation == "OTHERSITE") {
kernel = "http://widgets.clearspring.com/o/4796d27b1ba2a4ca/-/-TRK/1/lib.as2.swf?onLoad=onLibLoad";
} else if (playlistConfig.playerLocation == "STANDALONE") {
kernel = "http://widgets.clearspring.com/o/4796d32b2459466b/-/-TRK/1/lib.as2.swf?onLoad=onLibLoad";
}
trace("kernel: " + kernel);
api = _root.createEmptyMovieClip("clearspring", _root.getNextHighestDepth());
api_mcl = new MovieClipLoader();
api_mcl.loadClip(kernel, api);
var _local11 = {publisherId:"p-e059sb-sW00wM", media:"music", videoId:cfg.file, title:"playlist.com music widget", playOnly:true};
}
}
function onLibLoad(lib) {
_root.clearspring.cs.track.event("Init");
trace("kernel loaded");
}
function setStart(pos) {
if (pos < 1) {
pos = 0;
} else if (pos > (feeder.feed[currentItem].duration - 1)) {
pos = feeder.feed[currentItem].duration - 1;
}
clearInterval(positionInterval);
clearInterval(durationInterval);
trace((("URL: " + feeder.feed[currentItem].file) + " Bluewire ID: ") + feeder.feed[currentItem].bluewireid);
if (feeder.feed[currentItem].bluewireid != currentID) {
var ref = this;
currentID = feeder.feed[currentItem].bluewireid;
currentURL = feeder.feed[currentItem].file;
soundObject = new Sound(soundClip);
soundObject.onSoundComplete = function () {
ref.currentState = 3;
ref.sendUpdate("state", 3);
ref.sendCompleteEvent();
if (ref.playlistConfig.loggingMode) {
trace("reached end of track");
_root.clearspring.cs.track.event("Track Complete");
}
};
soundObject.onLoad = function (scs) {
var _local2 = ref.currentItem;
if (scs == false) {
trace("!scs for track: " + ref.currentURL);
ref.currentState = 3;
ref.sendUpdate("state", 3);
ref.sendCompleteEvent();
ref.sendUpdate("loaderror", _local2);
} else if (this.duration == 0) {
trace("duration == 0 for track: " + ref.currentURL);
ref.currentState = 3;
ref.sendUpdate("state", 3);
ref.sendCompleteEvent();
ref.sendUpdate("loaderror", _local2);
}
};
if (playlistConfig.loggingMode) {
b0Seconds = false;
b05Seconds = false;
b30Seconds = false;
b45Seconds = false;
b90Seconds = false;
}
soundObject.loadSound(currentURL, true);
soundObject.setVolume(currentVolume);
sendUpdate("load", 0);
clearInterval(loadedInterval);
loadedInterval = setInterval(this, "updateLoaded", 100, ref);
}
if (pos != undefined) {
currentPosition = pos;
if (pos == 0) {
sendUpdate("time", 0, feeder.feed[currentItem].duration);
}
}
soundObject.start(currentPosition);
updatePosition();
sendUpdate("size", 0, 0);
durationInterval = setInterval(this, "checkDuration", 15000);
positionInterval = setInterval(this, "updatePosition", 100);
}
function checkDuration() {
trace("check duration");
if ((soundObject.duration == 0) || (soundObject.duration == undefined)) {
var _local2 = currentItem;
currentState = 3;
sendUpdate("state", 3);
sendCompleteEvent();
sendUpdate("loaderror", _local2);
}
clearInterval(durationInterval);
}
function updateLoaded(ref) {
var _local2 = Math.round((soundObject.getBytesLoaded() / soundObject.getBytesTotal()) * 100);
if (isNaN(_local2)) {
currentLoaded = 0;
sendUpdate("load", 0);
} else if (_local2 != currentLoaded) {
sendUpdate("load", _local2);
currentLoaded = _local2;
} else if (_local2 >= 100) {
trace("pct: " + _local2);
clearInterval(loadedInterval);
currentLoaded = 100;
sendUpdate("load", 100);
trace("loadedInterval: " + loadedInterval);
}
}
function updatePosition() {
var _local3 = soundObject.position / 1000;
feeder.feed[currentItem].duration = soundObject.duration / (10 * currentLoaded);
if ((_local3 == currentPosition) && (currentState != 1)) {
currentState = 1;
sendUpdate("state", 1);
} else if ((_local3 != currentPosition) && (currentState != 2)) {
currentState = 2;
sendUpdate("state", 2);
}
if (_local3 != currentPosition) {
currentPosition = _local3;
sendUpdate("time", currentPosition, feeder.feed[currentItem].duration - currentPosition);
}
if (playlistConfig.loggingMode) {
if (((soundObject.position > 0) && (soundObject.position < 1000)) && (!b0Seconds)) {
trace("Song started playing");
_root.clearspring.cs.track.event("Track Start");
b0Seconds = true;
}
if (((soundObject.position > 5000) && (soundObject.position < 6000)) && (!b05Seconds)) {
trace("Song reached 5 seconds");
_root.clearspring.cs.track.event("5 Seconds");
b05Seconds = true;
}
if (((soundObject.position > 30000) && (soundObject.position < 31000)) && (!b30Seconds)) {
trace("Song reached 30 seconds");
_root.clearspring.cs.track.event("30 Seconds");
b30Seconds = true;
}
if (((soundObject.position > 45000) && (soundObject.position < 46000)) && (!b45Seconds)) {
trace("Song reached 45 seconds");
_root.clearspring.cs.track.event("45 Seconds");
b45Seconds = true;
}
if ((soundObject.position > 90000) && (!b90Seconds)) {
trace("Song reached 90 seconds");
_root.clearspring.cs.track.event("90 Seconds");
b90Seconds = true;
}
}
}
function setPause(pos) {
if (pos < 1) {
pos = 0;
} else if (pos > (feeder.feed[currentItem].duration - 1)) {
pos = feeder.feed[currentItem].duration - 1;
}
soundObject.stop();
clearInterval(positionInterval);
clearInterval(durationInterval);
currentState = 0;
sendUpdate("state", 0);
if (pos != undefined) {
currentPosition = pos;
sendUpdate("time", currentPosition, feeder.feed[currentItem].duration - currentPosition);
}
}
function setStop() {
soundObject.stop();
clearInterval(positionInterval);
clearInterval(durationInterval);
clearInterval(loadedInterval);
delete currentURL;
delete currentID;
delete soundObject;
currentLoaded = 0;
}
function setVolume(vol) {
super.setVolume(vol);
currentVolume = vol;
soundObject.setVolume(vol);
}
var mediatypes = new Array("mp3", "rbs");
var currentLoaded = 0;
var b0Seconds = false;
var b05Seconds = false;
var b30Seconds = false;
var b45Seconds = false;
var b90Seconds = false;
var badSongCount = 0;
}
Symbol 154 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));
}
}