thanks to you both for replying! :) i have tried both approaches and neither
is working as yet. i'll explaina bit more about what i've got... i have an
actions layer in the file which has the following code in it (.:}x-=V!P=-x{:. i
know you said put your code ONLY on the root level/layer but thats where all
the code is sitting now).... beally i think checkLoaded is for som ID3
functionality in the player which i aint using...
________________________________________________________________________________
_________________ var tracklist = new Array (); var mp3List = new XML ();
mp3List.ignoreWhite = true; mp3List.onLoad = createPlayList; mp3List.load
('
http://www.slaterarchitects.com.au/images/audio/playlist.xml'); function
createPlayList (success) { if (!success) {
return; } var topLevel = null; for (i = 0; i <=
this.childNodes.length; i++) { if
(this.childNodes.nodeValue == null && this.childNodes.nodeName ==
'playlist') { topLevel =
this.childNodes; break; } }
if (topLevel != null) { for (i = 0; i <=
topLevel.childNodes.length; i++) { if
(topLevel.childNodes.nodeName == 'mp3file') {
var track = topLevel.childNodes.attributes['track'];
_root.tracklist.push (track);
} } } } function randomBetween (a, b) { return
Math.min (a, b) + random (Math.abs (a - b) + 1); } function playTrack () {
var track = _root.track; if (track.getBytesLoaded () ==
track.getBytesTotal () && track.duration > 0) {
clearInterval (_root.checkLoaded); trackID3Info.text = '';
trackID3Info.text += 'Title: ' + track.id3.songname + newline;
trackID3Info.text += 'Artist: ' + track.id3.artist + newline;
trackID3Info.text += 'Album: ' + track.id3.album + newline;
trackID3Info.text += 'Year: ' + track.id3.year + newline;
trackID3Info.text += 'Comments: ' + track.id3.comment + newline; } }
randomPlayer.onPress = function () { stopAllSounds (); var
trackNo = randomBetween (0, _root.tracklist.length - 1); _root.track =
new Sound (); _root.track.loadSound (_root.tracklist[trackNo], true);
_root.checkLoaded = setInterval (playTrack, 500); }; stopPlayer.onPress
= function () { stopAllSounds (); _root.playlist = null; };
________________________________________________________________________________
_________________