# Stacking thumbnails in from XML in flash?

**URL:** <https://forum.kirupa.com/t/stacking-thumbnails-in-from-xml-in-flash/207553>\
**Category:** flash\
**Created:** [November 19, 2006, 12:17am UTC](https://forum.kirupa.com/t/stacking-thumbnails-in-from-xml-in-flash/207553 "2006-11-19T00:17:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![foot01](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@foot01](https://forum.kirupa.com/u/foot01)\
**Post date:** [November 19, 2006, 12:17am UTC](https://forum.kirupa.com/t/stacking-thumbnails-in-from-xml-in-flash/207553/1 "2006-11-19T00:17:49Z")

</div>

I have this simple xml photogallery script. I have 6 thumbnails and want to stack them 2 thumbnails in each row - giving me a stack of three rows (two thumbnails in each row).

Can somebody tell me how I can do this? I’m kind of stuck…

Here is my code in the flash piece ------ //

myPhoto = new XML();  
myPhoto.ignoreWhite = true;  
myPhoto.onLoad = function(success) {

numimages = this.firstChild.childNodes.length;  
spacing = 70;  
for (i=0; i\<numimages; i++) {  
this.picHolder = this.firstChild.childNodes\*;  
this.thumbHolder = thumbnails.createEmptyMovieClip(“thumbnail”+i, i);  
this.thumbHolder.\_x = i\*spacing;  
this.thumbLoader = this.thumbHolder.createEmptyMovieClip(“thumbnail\_image”, 0);  
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);  
this.thumbHolder.title = this.picHolder.attributes.title;  
this.thumbHolder.main = this.picHolder.attributes.main;  
this.thumbHolder.onRelease = function() {  
loader.loadMovie(this.main);  
title\_txt.text = this.title;  
};  
}  
};  
myPhoto.load(“xmlphoto.xml”);

------------------------------------- //

Any guidance would be great. Thanks in advance.

\_G
