Problem loading variable from external file

hi

i have this code:
var loadText = new loadVars();
loadText.onLoad = function(success) {
if (success) {
myVar = this.myVar;
trace(myVar);
loadMovie(myVar add “.swf”, _root.container_mc);
} else {
trace(“Error loading data”);
}
};
loadText.load(“data.txt”);

to load an external variable to load one movie, on the data.txt I have myVar=video1

my problem is that he is not loading video1.swf to container mc, but the trace to the cvariable name is correct

can someone give me a clue?

thanks

Well, I copied and pasted the code, and it worked fine. The instance name of the movie clip is probably wrong… ? :-\

Hi, believe me , now I put the code and it works, but I spend 2 hours trying to do it and it didn´t work, that´s why i posted this.

I really can´t belive this.

LOL! Ok, glad it worked out. :slight_smile: