Frame 1
function Connloaded(success) {
if (success) {
_root.appURL = this.firstChild.firstChild.nextSibling.firstChild.nodeValue;
if (_root.xmlfid.length > 0) {
xmldocurl = ((_root.siteurl + xmldocurl) + "xmlfid=") + _root.xmlfid;
XMLDoc = new XML();
XMLDoc.load(xmldocurl);
XMLDoc.onLoad = fnloaded;
} else {
loading_stat.text = "Incorrect Input File";
}
} else {
loading_stat.text = "Error on Connection";
}
}
function fnloaded(success) {
if (success) {
if (parseNodes()) {
gotoAndPlay (2);
}
} else {
loading_stat.text = "Error Loading XML Document";
}
}
function parseNodes() {
XMLDoc.ignoreWhite = true;
cldnodes = new Array();
cldnodes = XMLDoc.childNodes;
dataset = new Array();
j = 0;
while (j <= cldnodes.length) {
if (cldnodes[j].nodeName.toUpperCase() == "PROFILE") {
dataset = cldnodes[j].childNodes;
k = 0;
while (k <= dataset.length) {
switch (dataset[k].nodeName.toUpperCase()) {
case "NAME" :
artist_name = dataset[k].firstChild.nodeValue;
break;
case "PLAYSTODAY" :
plays = "Plays Today: " + dataset[k].firstChild.nodeValue;
break;
case "DOWNLOADEDTODAY" :
downloaded = "Downloads Today: " + dataset[k].firstChild.nodeValue;
break;
case "TOTALPLAYS" :
total = "Total Plays: " + dataset[k].firstChild.nodeValue;
break;
case "AUTOPLAY" :
autoplay = dataset[k].firstChild.nodeValue;
break;
case "PLAYLIST" :
parseSubnode(dataset[k]);
break;
}
k++;
}
}
j++;
}
return(true);
}
function parseSubnode(node) {
var _local2 = 0;
var _local4 = 1;
str_str = "";
trace(node.childNodes.length);
if ((node.childNodes.length > 9) && (node.childNodes.length <= 23)) {
var _local3 = 0;
while (_local3 < node.childNodes.length) {
if (node.childNodes[_local3].nodeType == 1) {
temp = node.childNodes[_local3].attributes.filename;
tempname = temp.split(".");
playlist_arr[_local2] = tempname[0];
image_arr[_local2] = node.childNodes[_local3].attributes.imagename;
image_desc[_local2] = node.childNodes[_local3].attributes.imagedesc;
song_arr[_local2] = node.childNodes[_local3].attributes.title;
if (song_arr[_local2].length > 22) {
tempname = song_arr[_local2].substr(0, 21) + "...";
song_arr[_local2] = tempname;
}
update_arr[_local2] = node.childNodes[_local3].attributes.url;
_local4 = _local2 + 1;
if (_local4 < 10) {
_local4 = "0" + _local4;
}
str_str = str_str + (((((((("<TEXTFORMAT LEADING=\"5\">" + _local4) + " <a class =\"title\" href='asfunction:nt_connect,") + _local2) + "'><FONT COLOR='#0000CC' SIZE='12'>") + song_arr[_local2]) + "</FONT></a> Plays: ") + node.childNodes[_local3].attributes.plays) + "<br>");
str_str = str_str + "</TEXTFORMAT>";
_local2++;
}
_local3++;
}
} else {
var _local3 = 0;
while (_local3 < node.childNodes.length) {
if (node.childNodes[_local3].nodeType == 1) {
temp = node.childNodes[_local3].attributes.filename;
tempname = temp.split(".");
playlist_arr[_local2] = tempname[0];
image_arr[_local2] = node.childNodes[_local3].attributes.imagename;
image_desc[_local2] = node.childNodes[_local3].attributes.imagedesc;
song_arr[_local2] = node.childNodes[_local3].attributes.title;
fcs_arr[_local2] = node.childNodes[_local3].attributes.flashcomserver;
band_song_id_arr[_local2] = node.childNodes[_local3].attributes.band_song_id;
if (song_arr[_local2].length > 24) {
tempname = song_arr[_local2].substr(0, 23) + "...";
song_arr[_local2] = tempname;
}
update_arr[_local2] = node.childNodes[_local3].attributes.url;
str_str = str_str + (((((("<TEXTFORMAT LEADING=\"5\"><a class =\"title\" href='asfunction:nt_connect," + _local2) + "'><FONT COLOR='#0000CC' SIZE='12'><U>") + song_arr[_local2]) + "</U></FONT></a> Plays: ") + node.childNodes[_local3].attributes.plays) + "<br>");
if (node.childNodes[_local3].attributes.downloadable != "") {
str_str = str_str + (("<a href='" + node.childNodes[_local3].attributes.downloadable) + "'><FONT COLOR='#000000' SIZE='12'>Download</FONT></a>");
} else {
str_str = str_str + "<FONT SIZE='12'>Download</FONT>";
}
if (node.childNodes[_local3].attributes.comments != "") {
str_str = str_str + (((("<FONT COLOR='#000000' SIZE='12'> | <a href='javascript:rate(" + node.childNodes[_local3].attributes.songid) + ");'>Rate</a> | <a href='javascript:comment(") + node.childNodes[_local3].attributes.songid) + ");'>Comments</a></FONT>");
} else {
str_str = str_str + "<FONT SIZE='12'> | Rate | Comments</FONT>";
}
if (node.childNodes[_local3].attributes.lyrics != "") {
str_str = str_str + ((" | <FONT COLOR='#000000' SIZE='12'><a href='javascript:lyrics(" + node.childNodes[_local3].attributes.lyrics) + ");'>Lyrics</a></FONT><br>");
} else {
str_str = str_str + "<FONT SIZE='12'> | Lyrics</FONT><br>";
}
if (node.childNodes[_local3 + 2].attributes) {
str_str = str_str + "<FONT FACE ='Arial Narrow' SIZE='8'>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</FONT><br>";
}
str_str = str_str + "</TEXTFORMAT>";
_local2++;
}
_local3++;
}
}
}
var playlist_arr = new Array();
var image_arr = new Array();
var image_desc = new Array();
var song_arr = new Array();
var fcs_arr = new Array();
var band_song_id_arr = new Array();
var update_arr = new Array();
_root.flager = "false";
var playsong = 0;
var buffer_time = 5;
var artist_name;
var plays;
var downloaded;
var total;
var str_str;
var ss = (new TextField.StyleSheet());
ss.load("player.css");
Stage.showMenu = false;
var xmldocurl = "bandprofile/MP3_XML.cfm?";
_root.vsDirectLink = "http://flash.vitalstream.com/flashgen.cgi?sname=test.flv&aname=myspace_vitalstream_com/_definst_";
XMLConn = new XML();
XMLConn.load(_root.vsDirectLink);
XMLConn.onLoad = Connloaded;
stop();
Instance of Symbol 10 MovieClip in Frame 1
on (press) {
if (_root.in_ns) {
clearInterval(_global.progressInt);
_root.flager = "false";
getURL (((((((("javascript:void(window.open('" + _root.siteurl) + "music/popup.cfm?num=") + _root.playsong) + "&time=") + _root.in_ns.time) + "&fid=") + _root.xmlfid) + "&uid=1','popupwin','width=450,height=345'));");
_global.haskey = "first";
_root.status.text = "stopped";
_root.first.gotoAndStop(2);
_root.third.gotoAndStop(1);
_root.in_ns.play(null);
_root.nc.close();
} else {
getURL (((((("javascript:void(window.open('" + _root.siteurl) + "music/popup.cfm?num=0&time=0&fid=") + _root.xmlfid) + "&uid=") + _root.xmluid) + "','popupwin','width=450,height=345'));");
}
}
on (release) {
if (_root.in_ns) {
_root.nc.close();
}
}
Instance of Symbol 31 MovieClip "third" in Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
if (_global.haskey == "third") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (press) {
gotoAndStop (3);
if (_root.in_ns) {
if (_global.haskey == "first") {
_root.nt_connect(_root.playsong);
}
} else {
_root.nt_connect(_root.playsong);
}
}
on (release) {
if (_global.haskey == "first") {
_root.first.gotoAndStop(1);
_global.haskey = "third";
} else if (_global.haskey == "second") {
_root.second.gotoAndStop(1);
_root.in_ns.pause();
_global.haskey = "third";
}
_global.haskey = "third";
gotoAndStop (2);
}
Instance of Symbol 38 MovieClip "second" in Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
if (_global.haskey == "second") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (press) {
gotoAndStop (3);
}
on (release) {
if (_root.in_ns) {
if (_global.haskey == "first") {
_root.first.gotoAndStop(1);
} else if (_global.haskey == "third") {
_root.third.gotoAndStop(1);
_global.haskey = "second";
_root.in_ns.pause();
} else if (_global.haskey == "second") {
_root.third.gotoAndStop(2);
_global.haskey = "third";
_root.in_ns.pause();
}
}
gotoAndStop (2);
}
Instance of Symbol 45 MovieClip "first" in Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
if (_global.haskey == "first") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
on (press) {
gotoAndStop (3);
if (_root.in_ns) {
_root.in_ns.play(null);
_root.in_ns.close();
}
}
on (release) {
if (_global.haskey == "second") {
_root.second.gotoAndStop(1);
} else if (_global.haskey == "third") {
_root.third.gotoAndStop(1);
} else if (_global.haskey == "first") {
_root.third.gotoAndStop(1);
}
_global.haskey = "first";
gotoAndStop (2);
_root.progressbar_mc.reset();
_root.flager = "false";
_root.status.text = "stopped";
_root.player_status = false;
}
Frame 2
function playlist() {
if (soundControl) {
soundControl.stop();
in_ns.close();
}
flipSlide(parseInt(playsong));
in_ns.setBufferTime(buffer_time);
speakers_mc.attachAudio(in_ns);
trace(playlist_arr[parseInt(playsong)]);
in_ns.play("mp3:" + playlist_arr[parseInt(playsong)]);
setupStream(in_ns, "mp3:" + playlist_arr[parseInt(playsong)]);
stream_mc.attachAudio(in_ns);
_root.soundControl.setVolume(volume.pos._x);
}
function flipSlide(num) {
bandtext.Text = song_arr[num];
bandtext.gotoAndPlay("start");
alb_desc.htmlText = image_desc[num];
loadVariablesNum (update_arr[num], 0, "POST");
loadMovie (image_arr[num], "slideHolder");
if (_global.haskey == "first") {
_root.first.gotoAndStop(1);
} else if (_global.haskey == "second") {
_root.second.gotoAndStop(1);
_global.haskey = "third";
}
_global.haskey = "third";
third.gotoAndStop(2);
}
function nt_connect(num_val) {
playsong = num_val;
_root.nc.close();
nc = new NetConnection();
nc.connect(_root.appURL);
in_ns = new NetStream(nc);
createEmptyMovieClip("stream_mc", 1);
soundControl = new Sound(stream_mc);
playlist();
}
function setupStream(myStream, streamName) {
myStream.onResult = function (streamLength) {
progressbar_mc.startprogress(streamLength);
};
strlength = nc.call("getStreamLength", myStream, streamName);
}
function init_values() {
alb_desc.html = true;
txt_body.styleSheet = ss;
txt_body.html = true;
band_name.text = artist_name;
plays_today.text = plays;
downloaded_today.text = downloaded;
total_plays.text = total;
txt_body.htmlText = str_str;
scrollBar.target = txt_body;
trace(_root.playlist_arr.length);
if (_root.playlist_arr.length < 12) {
scrollBar._visible = false;
}
alb_desc.htmlText = image_desc[0];
trace(autoplay);
if (autoplay == 0) {
_root.nt_connect(0);
loadMovie (image_arr[0], "slideHolder");
} else if (autoplay == 2) {
temp_rand = Math.floor(Math.random() * _root.playlist_arr.length);
_root.nt_connect(temp_rand);
} else {
loadMovie (image_arr[0], "slideHolder");
}
}
var player_status = false;
NetConnection.prototype.onStatus = function (info) {
trace("NetConnection.onStatus> " + info.code);
};
NetStream.prototype.onStatus = function (info) {
if ((info.code == "NetStream.Play.Reset") || (info.code == "NetStream.Play.Start")) {
_root.status.text = "buffering";
}
if (info.code == "NetStream.Play.Stop") {
player_status = true;
}
if (info.code == "NetStream.Buffer.Empty") {
if (player_status == true) {
_root.status.text = "stopped";
_global.haskey = "first";
_root.flager = "false";
player_status = false;
_root.third.gotoAndStop(1);
} else {
_root.status.text = "buffering";
}
}
if (info.code == "NetStream.Pause.Notify") {
_root.status.text = "paused";
}
if (info.code == "NetStream.Buffer.Full") {
_root.status.text = "playing";
_root.eq1.gotoAndPlay("start");
_root.eq2.gotoAndPlay("start");
_root.eq3.gotoAndPlay("start");
_root.eq4.gotoAndPlay("start");
_root.eq5.gotoAndPlay("start");
_root.eq6.gotoAndPlay("start");
_root.flager = "true";
}
};
init_values();
stop();
Symbol 4 MovieClip [loader] Frame 1
function checkLoad(obj) {
var _local3 = target.getBytesLoaded();
var _local1 = target.getBytesTotal();
var _local2 = Math.floor((_local3 / _local1) * 100);
bar._xscale = _local2;
percent.text = ((Math.floor(_local2) + "% of ") + Math.floor(_local1 / 1024)) + "KB loaded.";
if ((_local3 >= _local1) && (_local1 > 0)) {
if (count >= 12) {
clearInterval(checkProgress);
obj.removeMovieClip();
} else {
count++;
}
}
updateAfterEvent();
}
checkProgress = setInterval(checkLoad, 50, this);
stop();
Symbol 22 MovieClip Frame 1
if (_root.flager == "false") {
stop();
}
gotoAndPlay(f);
Symbol 22 MovieClip Frame 7
Symbol 22 MovieClip Frame 20
if (_root.flager == "false") {
stop();
} else {
f = random(20);
}
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 2
stop();
Symbol 31 MovieClip Frame 3
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 2
stop();
Symbol 38 MovieClip Frame 3
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 2
stop();
Symbol 45 MovieClip Frame 3
stop();
Symbol 52 Button
on (release) {
temp = parseInt(_root.playsong) - 1;
if (_root.playlist_arr[temp] == undefined) {
_root.playsong = playlist_arr.length - 1;
nt_connect(_root.playsong);
} else {
_root.playsong = parseInt(_root.playsong) - 1;
nt_connect(_root.playsong);
}
if (_global.haskey == "first") {
_root.first.gotoAndStop(1);
_global.haskey = "third";
} else if (_global.haskey == "second") {
_root.second.gotoAndStop(1);
_global.haskey = "third";
}
_root.third.gotoAndStop(2);
_root.flager = "false";
}
Symbol 59 Button
on (release) {
temp = parseInt(playsong) + 1;
if (playlist_arr[temp] == undefined) {
playsong = 0;
nt_connect(0);
} else {
playsong = parseInt(playsong) + 1;
nt_connect(playsong);
}
if (_global.haskey == "first") {
_root.first.gotoAndStop(1);
_global.haskey = "third";
} else if (_global.haskey == "second") {
_root.second.gotoAndStop(1);
_global.haskey = "third";
}
_root.third.gotoAndStop(2);
_root.flager = "false";
}
Symbol 64 MovieClip Frame 1
function setVolume(position) {
_root.soundControl.setVolume(parseInt(position));
}
function setProp(position, prop, target) {
var _local4 = position;
var _local3 = 138;
var _local2 = 100;
var _local1 = (_local4 / _local3) * _local2;
setVolume(_local1);
target[prop] = _local1;
}
function startSlider(active) {
if (active) {
this.onMouseMove = function () {
setProp(pos._x, currentProp, currentTarget);
updateAfterEvent();
};
} else {
this.onMouseMove = null;
}
}
pos._x = 70;
currentProp = "_xscale";
currentTarget = _parent.content;
setProp(pos._x, currentProp, currentTarget);
Instance of Symbol 63 MovieClip "pos" in Symbol 64 MovieClip Frame 1
on (press) {
_parent.startSlider(true);
this.startDrag(false, 0, 0, 138, 0);
}
on (release, releaseOutside) {
_parent.startSlider(false);
this.stopDrag();
}
Symbol 77 MovieClip Frame 1
function setProp(position, prop, target) {
var _local3 = position;
var _local2 = 200;
var _local1 = 100;
var _local4 = (_local3 / _local2) * _local1;
target[prop] = _local4;
}
function moveProgressBar() {
curr_time = _root.in_ns.time;
scale = curr_time * _global.knobscale;
scale2 = (curr_time * _global.bufferscale) + 1;
progress_knob._x = scale;
buffer_bar._xscale = scale2;
_root.timecounter.text = formattime(_root.in_ns.time);
if (_root.in_ns.bufferLength < 1) {
_root.flager = "false";
}
}
function formattime(length) {
length = parseInt(length);
hrs = Math.floor(length / 3600);
min = length - (hrs * 3600);
min = Math.floor(min / 60);
sec = (length - (hrs * 3600)) - (min * 60);
if (sec < 10) {
sec = "0" + sec;
}
if (min < 10) {
min = "0" + min;
}
format_time = (min + ":") + sec;
return(format_time);
}
function reset() {
progress_knob._x = 0;
buffer_bar._xscale = 0;
clearInterval(_global.progressInt);
_root.timecounter.text = "00:00";
}
function startprogress(streamlength) {
reset();
streamlength = Math.floor(streamlength);
_global.bufferscale = 100 / streamlength;
_global.knobscale = 180 / streamlength;
_global.length_stream = streamlength;
_global.progressInt = setInterval(moveProgressBar, 1000);
}
_global.temp = false;
var temp_time = 0;
var curr_time = 0;
var minutes = 0;
posx = 0;
currentProp = "_xscale";
currentTarget = buffer_bar;
setProp(posx, currentProp, currentTarget);
Instance of Symbol 76 MovieClip "progress_knob" in Symbol 77 MovieClip Frame 1
on (press) {
this.startDrag(false, 0, 0, 180, 0);
clearInterval(_global.progressInt);
_root.flager = "false";
}
on (release, releaseOutside) {
if (_root.in_ns) {
_root.in_ns.seek((_global.length_stream / 180) * this._x);
_parent.buffer_bar._xscale = 0.555555555555556 * this._x;
_global.progressInt = setInterval(_parent.moveProgressBar, 1000);
}
this.stopDrag();
_root.flager = "true";
}
Symbol 91 MovieClip Frame 8
stop();
Symbol 94 MovieClip Frame 19
this._alpha = 50;
Symbol 94 MovieClip Frame 56
this._alpha = 100;
Symbol 94 MovieClip Frame 57
stop();
Symbol 97 Button
on (press) {
this.startDrag(false, 0, 0, 0, 35);
_parent.startScroll(true, "mid");
}
on (release, releaseOutside) {
this.stopDrag();
_parent.startScroll(false);
}
Symbol 101 MovieClip Frame 1
function updateScroller(type) {
var _local4 = target.scroll;
var _local2 = target.maxscroll;
var _local1 = 35;
var _local3 = scroller._y;
if (type == "mid") {
target.scroll = Math.round((_local2 * (_local3 / _local1)) + 1);
} else {
scroller._y = _local1 * ((_local4 - 1) / _local2);
}
}
this.startScroll = function (active, type) {
if (active) {
this.type = type;
if (type != "mid") {
this.onEnterFrame = function () {
if (type == "up") {
this.target.scroll--;
} else if (type == "down") {
this.target.scroll++;
}
updateScroller("arrow");
};
} else {
this.onMouseMove = function () {
updateScroller("mid");
updateAfterEvent();
};
}
} else {
this.onEnterFrame = null;
this.onMouseMove = null;
}
};