This is a repost from ellis001's RESOLVED thread. I didn't think anyone would open the RESOLVED thread.


I'm trying to do almost exactly the same thing as ellis001, but I'm still getting (undefined). When I trace the variable that's being split into the array, it returns: <p align="left"></p>

My text file is MEname9.txt and contains:
&MEnames=1,2,3,4

The code I have currently for this section is:
var photoNum = 0;


var NameLoader = new LoadVars();


NameLoader.onLoad = function(success){
NameArray = new Array();
if (success){
MEnames = NameLoader.MEnames;
NameArray = MEnames.split(",");
}
}
NameLoader.load("MEname9.txt");
trace(MEnames);
NameBox.text = NameArray[photoNum];

It's identical to what a_modified_dog posted, and I can't see any difference in what I'm doing vs. what ellis001 was trying to do as far as importing the text and putting it into an array. But the array just isn't working. Any advice?