# Problem with movie clip loops

**URL:** <https://forum.kirupa.com/t/problem-with-movie-clip-loops/287368>\
**Category:** flash\
**Created:** [April 29, 2009, 10:42pm UTC](https://forum.kirupa.com/t/problem-with-movie-clip-loops/287368 "2009-04-29T22:42:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacuia](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pacuia](https://forum.kirupa.com/u/pacuia)\
**Post date:** [April 29, 2009, 10:42pm UTC](https://forum.kirupa.com/t/problem-with-movie-clip-loops/287368/1 "2009-04-29T22:42:15Z")

</div>

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?

```auto

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;
            
            }
    }
}

```
