Looping through a txt file & attachMovie()

hey out there,

just read the tutorial at http://www.kirupa.com/developer/mx/externaldata.htm and it got me thinking…

i’ve gotta load of cd track listings i need to show. all the info is in text files, and i can format it to look like:

totalTracks=2
&trackInfo1=Square One
&trackFile1=01_Square_One.mp3
&trackInfo2=What If?
&trackFile2=what_if.mp3

i’ve been trying to use this actionscript to loop through each track and attach it to the stage:

stop();

loadText = new LoadVars();
loadText.load("cd1.txt");
loadText.onLoad = function() {
	
	//count the number of tracks
	arrayLength = this.totalTracks;
		
	//each movie clip has to be offset
	vertOffset = 55;
	
	//loop through each value in the array
	for (i=0; i<arrayLength; i++) {
		
		//attach the clip
		var tClip = this.attachMovie("trackInfoMc", "track"+i, this.getNextHighestDepth());
		
		trace(tClip);
		
		//set it's y position
		tClip._y = vertOffset+(tClip._y+vertOffset)*i;
		
		//set the txt inside the new mc to the current value
		tClip.trackInfo.text = this.trackInfo*;
		tClip.trackFile.text = this.trackFile*;
	
	}
};

the final idea is to turn each loop into a click link that loads the mp3 into a media player - i need to get this working 1st!

at the moment, nothing appears on the timeline.

can anyone see what i’m doing wrong or am i approaching this the wrong way…

anything would be great!

many thanks,

jake