I am trying to load one of 80 text fields into a dynamic text box. I have an Array that is filled with all 80 field labels in random order. My concept is that I should be able to pop the last field out of the array, set it equal to a variable, and use that variable in the statement defining the text of the text box. But it doesn’t work. It returns undefined.
[AS]nextQuestion = myList2.pop();
myTextField_txt.text = externalData.nextQuestion;[/AS]
The second line of the statement works if I hard code the text field name.
But it does not work if I use a variable set to question37.
I think this may have to do with the data type of the variable. It is a string. Any ideas or suggestions?