# Xml gallery into multiple movieclips?

**URL:** https://forum.kirupa.com/t/xml-gallery-into-multiple-movieclips/311685
**Category:** Uncategorized
**Created:** [July 14, 2010, 6:40am UTC](https://forum.kirupa.com/t/xml-gallery-into-multiple-movieclips/311685 "2010-07-14T06:40:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![brianharms](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@brianharms](https://forum.kirupa.com/u/brianharms)
#### Post date: [July 14, 2010, 6:40am UTC](https://forum.kirupa.com/t/xml-gallery-into-multiple-movieclips/311685/1 "2010-07-14T06:40:58Z")

</div>

Hello,  
lets suppose I have 50 thumbnails that I’m loading from an xml document. What I want to do is load them all at once but place them into different movie clips on the stage. I was thinking I could organize them based on tags in the xml file, or by number (like put thumbnails 1-12 in movieclip A, 13-20 in movieclip B, etc.)

Can anyone tell me how to do this? I’d love to see the code.

Right now I just have the thumbnails being placed in a single clip. I am confused because in the function where I addChild, I no longer have access to the thumb\_url var, so I wouldn’t know how to specify which images to put where. Evenif I could access this info, I’m not sure how to write the code to place different thumbnails into different movieClips.

function callThumbs():void{  
for (var i:Number = 0; i \< my\_total; i++){

var thumb\_url = my\_images\*.@THUMB;;  
var thumb\_loader = new Loader();  
thumb\_loader.load(new URLRequest(thumb\_url));  
thumb\_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);

thumb\_loader.name = i;  
}  
}

function thumbLoaded(e:Event):void{  
my\_thumb = Loader(e.currentTarget.loader);  
container\_mc.addChild(my\_thumb);  
}

Thanks a lot
