Hiya, I’m sorry if the title of this post doesn’t explain what I mean too well, here’s some more explanation:
I want to parse the data from an XML file into an array and then put each of the values in the array into a dynamic text box on the stage. The text boxes are name “number1_txt”, “number2_txt” &c.
I have managed to set up a loop to parse the XML into my array and also to generate the names of the text boxes dynamically but I can’t get the values from the array to display in the text boxes!
function parseXMLNumbers(doc:XML):Void {
temp = new Array();
for (a=0; a<doc.firstChild.childNodes.length; a++) {
temp[a] = myXML.firstChild.childNodes[a].firstChild.nodeValue;
z = a+1;
var numberBox:String = “number”+z+“_txt”; this.numberBox.text=temp[a]
}
}
If someone would point out what my glaring error is I would be really grateful as i am just getting to grips with actionscript.
Many thanks in advance everyone and thanks for reading this !