[MX04] Unable to get LoadVars to use array reference to loaded variable
Hi,
I would like to display some text that I have loaded into a movie through the “”LoadVars” object. I am able to do this if I “hardwire” the name of the variable to be picked up on in the loaded .txt file, but not if I use a reference to the variable by looping through an array holding the variable names used in all the files to be loaded in.
So in other words this will work:
Code:
_root.past_txt.text = _root.varLoader_array[0].past;
But this wont:
Code:
variableName_array=["past", "present", "future"];
_root.past_txt.text = _root.varLoader_array[0].variableName_array[0];
I think the problem might be that Flash sees the “variableName_array[0]” part as a string & not a variable, I really don’t know, but I would be grateful if anyone can help me out on this.
Many thanks.