Hi,
I have a mp3 player… without a clickable playlist. I’m having issues making the clickable playlist. Its XML powered so i have to create the playlist on load. right now im trying to create a for loop that would attach a movie clip for each song but it isn’t working very well.
any help would be apreciated.
playlist.onLoad = function(success) {
if (success) {
_global.songfile = [];
_global.songname = [];
_global.songband = [];
_global.songalbum = [];
_global.total = playlist.firstChild.childNodes.length;
for (var i = 0; i<_global.total; i++) {
_global.songfile* = playlist.firstChild.childNodes*.attributes.file;
_global.songname* = playlist.firstChild.childNodes*.attributes.name;
_global.songband* = playlist.firstChild.childNodes*.attributes.band;
_global.songalbum* = playlist.firstChild.childNodes*.attributes.album;
//trace(songname*+" "+songfile*+" "+songband*);
}
for (var q = 0; q<_global.total; q++) {
item = attachMovie('PlaylistItem', 'PlaylistItem'+q, 1);
playlistitem_txt = _global.songband[q]-_global.songname[q];
item._x = 0;
item._y = ypos;
ypos += 20;
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr], songalbum[song_nr]);
};