# AS Image Gallery Help ASAP!

**URL:** https://forum.kirupa.com/t/as-image-gallery-help-asap/300497
**Category:** flash
**Created:** [November 22, 2009, 4:02pm UTC](https://forum.kirupa.com/t/as-image-gallery-help-asap/300497 "2009-11-22T16:02:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![smarie77](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@smarie77](https://forum.kirupa.com/u/smarie77)
#### Post date: [November 22, 2009, 4:02pm UTC](https://forum.kirupa.com/t/as-image-gallery-help-asap/300497/1 "2009-11-22T16:02:35Z")

</div>

Please help!!!

The code I have for my image gallery linked to an xml file with the images and descriptions is below and works fine as is. However, I need to add functions to it. I need to be able to have 2 columns of thumbnails, not just a single column, specifically 2 columns of 8 thumbnails. Also, I need there to be 2 buttons on the stage, “back” and “next” buttons. I need another function which tells the source to create an unlimited number of “pages” with more thumbnails, once the number of images in the xml file is more than 16.

Can anyone help??? Thank you in advance!!!

myPhoto = new XML();  
myPhoto.ignoreWhite = true;  
myPhoto.onLoad = function(success) {  
//portfolioTag = this.firstChild;  
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.\_y = i\*spacing;  
this.thumbLoader = this.thumbHolder.createEmptyMovieClip(“thumbnail\_i mage”, 0);  
this.thumbLoader.loadMovie(this.picHolder.attribut es.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”);
