I’ve created this loop to fill some data from a XML file…
I can access the data but it doesn’t work on my look.
I have several movie clip on the stage such as thumb01, thumb03…then I whant to set a dynamic field called thumb01.numero.text with the var imageNumero = myImage*.attributes.numero; attribute from my XML file but the loop doesn’t recognize it…here is my code…
Can someone give me any tips on this matter?
var xmlData=new XML();
xmlData.ignoreWhite=true;
xmlData.onLoad=processXMLData;
xmlData.load("particular_homens_aniversario.xml");
xmlData.onLoad = function(success){
if (success){
var myImage = xmlData.firstChild.childNodes;
var myDesc = xmlData.firstChild.firstChild;
for (i=0; i<myImage.length; i++) {
var imageName = myImage*.attributes.nome;
var imageNumero = myImage*.attributes.numero;
var imageDesc = myImage*.attributes.desc;
this["thumb"+imageNumero].numero.text = myImage*.attributes.numero;
this["thumb"+imageDesc].nome.text = imageDesc;
}
}
}