Using actionscript to call from XML file

Hi there, I’m a complete newbie when it comes to actionscript. Basically for a uni project I have to design an MP3 player in flash. I’ve modified the snow script from this site slighty, in order for it to display track names, artists and album name instead of snowflakes. The script looks like this:


[left]this.children = new Array ();

function makeFlakes ()
	snowflakes = 75;
	do {
		duplicateMovieClip(trackInfo, "trackInfo"+k, k);
		var arr = new Array ("Album", "Artist", "Track Name");
		var rand = Math.floor(Math.random()*3);
		trace(rand);
		var ref = eval ("trackInfo" + k);
		ref.trackInfo = arr[rand];
		this.children.push(ref);
		k++;
	} while (k != snowflakes);
}


function deleteChildren () {
	for (i = 0; i < this.children.length; i++){
		this.children*.removeMovieClip ();
	}
	this.children = new Array ();
}

function setInfo (artist, album, trackName) {
	this.arr = new Array (artist, album, trackName);[/left]
  

I’m not even sure that is right though. The mp3 player should look into an XML file and gather the required information, and upon changing track should delete the previous info and display the new set. So far it’s not working, and I’ve got no clue how to get it to work. The XML code looks like this:

 
[left]function selectTrack (obj) {
	currentTrack							= obj.getSelectedIndex ();						// Obtain the index of the listbox entry that was clicked
	var track								= playList[this.currentTrack].filename;			// Obtain the URL of the desired MP3 file
	var animation							= playList[this.currentTrack].animation;		// Obtain the URL of the animation that goes with the music track
	remainingTime							= playList[this.currentTrack].trackDuration;	// Obtain track duration and write it to a display field
	
	trackInfoMaster.deletChildren ();
	trackInfoMaster.setInfo (playList[this.currentTrack].artist, album, trackName);
	trackInfoMaster.makeFlakes();[/left]
 

I don’t know wether to try and work it out or just scrap the idea altogether. It would look nice, but it could leave me short on time for the project. I posted here incase anyone can give me any pointers on where I’m going wrong.

Cheers for any help
Chris