Sounds like the same problem. I was hoping to find an answer here.
What I'm trying to do is to load variables from a txt file:
Code:
_root.loadVariables("playlist.txt")
Since I'm loading them to the root, I should be able to pass them on to other variables.
Like barkers said, these variables are displayed in any textfield with the same variable name, as long as it is placed on the root.
If my playlist.txt has the following variables, for example:
Quote:
song1=&mysong.mp3
song2=&mysong2.mp3
...etc
|
and then if I try to pass this value to any movie clip or to another variable, like this:
Code:
completeurl = "mp3folder/"+_root.song2;
the value of
song2 that I loaded into the root won't pass to the
completeurl value
even if i just pass it on without adding anything else:
Code:
_root.playthissong = _root.song2;
the value of _root.playthissong is unnassigned.
Also if i have a movie clip with a dynamic textfield with variable name song2 and on that same movie clip or on the root I assign
Code:
_root.movieclipname.song2 = _root.song2;
it comes out as undefined
I usually solve it by loading variables in any movie clip where I need them but I'm guessing this isn't very efficient. And most of all, if i have a playlist that switches the number of song i can't pass on the songname to another variable, like this:
Code:
playthisone = _root["song"+_root.currentnumber];
does anybody know how to pass loaded variables to other variables and other movie clips?