# Problem duplicating and positioning movieclips loaded from an xml

**URL:** <https://forum.kirupa.com/t/problem-duplicating-and-positioning-movieclips-loaded-from-an-xml/77103>\
**Category:** Uncategorized\
**Created:** [January 24, 2005, 7:01pm UTC](https://forum.kirupa.com/t/problem-duplicating-and-positioning-movieclips-loaded-from-an-xml/77103 "2005-01-24T19:01:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![azionescript](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@azionescript](https://forum.kirupa.com/u/azionescript)\
**Post date:** [January 24, 2005, 7:01pm UTC](https://forum.kirupa.com/t/problem-duplicating-and-positioning-movieclips-loaded-from-an-xml/77103/1 "2005-01-24T19:01:51Z")

</div>

Ciao a tutti  
I’m working with a script that loads from an XML some jpgs, these ones once loaded move to their positions.

```auto
Info = new XML();
Info.ignoreWhite =true;
Info.onLoad= function() { 
       picture =this.firstChild;
       count = picture.childNodes.length;        
         for(child=0; child<count; child++) {                
               currentPicture = picture.childNodes[child]; 
               currentThumb = item_1.duplicateMovieClip("thumbnail"+child, child);
                currentThumb._xscale = 15;    
                currentThumb._yscale= 15;                
                currentThumb._alpha = 1;               
                currentThumb.xDest = child*50;   
                currentThumb.yDest = child*1;       
                image = currentThumb.createEmptyMovieClip("thumbnail_image", 0);     
                imageloadMovie(currentPicture.attributes.THUMB);  
      }
};
Info.load("Info.xml");

```

the problem is that i would like put all these movies well aligned in rows and columns, i’ve seen it’s possible to do this with a nested for… loop, something like this

```auto
for(y = 1; y <= 4; y++){ 
         for (x = 1; x <= 9; x++){
                depth++;
               var item = item_1.duplicateMovieClip("item_" +x + "_ " +y, depth+2);
              item._x = item_1._x+(50 * (x-1));
              item._y = item_1._y+(50 * (y-1))
}
}

```

but don’t know how combine the two scripts  
thanks in advance
