playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songband[i] = playlist.firstChild.childNodes[i].attributes.band;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
attachMovie("butTemp","but"+i,i+50);
eval("but"+i).id=i;
_root["but"+i]._x = 120;
_root["but"+i]._y = 225 + (i*25);
_root["but"+i].but_txt.text = songname[i];
if (i >= 3){
_root["but"+i]._x = 300
_root["but"+i]._y = 150 + (i*25);
}
if (i >= 6){
_root["but"+i]._x = 480
_root["but"+i]._y = 75 + (i*25);
}
_root["but"+i].onRelease = function(){
clearInterval(timeInterval);
_root.timeDisplay_txt.text = "00:00/00:00";
_root.sound_mc.songStarter(songfile[this.id]);
}
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr]);
};
Bookmarks