# Xml gallery navigation issue

**URL:** <https://forum.kirupa.com/t/xml-gallery-navigation-issue/89671>\
**Category:** Uncategorized\
**Created:** [May 10, 2005, 5:14pm UTC](https://forum.kirupa.com/t/xml-gallery-navigation-issue/89671 "2005-05-10T17:14:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpyGuy](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@SpyGuy](https://forum.kirupa.com/u/SpyGuy)\
**Post date:** [May 10, 2005, 5:14pm UTC](https://forum.kirupa.com/t/xml-gallery-navigation-issue/89671/1 "2005-05-10T17:14:21Z")

</div>

Hello everyone! i’m pretty new to XML with Flash, so here goes. I am currently using this tut [http://www.kirupa.com/developer/mx2004/xml\_flash\_photogallery.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm)  
to build the portfolio section of my site. This tut is great, but the problem that i am having is,instead of using previous and next buttons, I would rather have as many buttons as possible, to represent different images that are listed in the xml code. How would I tweak this code to perform this action?

Thank you all,  
SpyGuy

here is the code

```auto
p = 0;
this.onEnterFrame = function() {
	filesize = picture.getBytesTotal();
	loaded = picture.getBytesLoaded();
	preloader._visible = true;
	if (loaded != filesize) {
		preloader.preload_bar._xscale = 100*loaded/filesize;
	} else {
		preloader._visible = false;
		if (picture._alpha<100) {
			picture._alpha += 10;
		}
	}
};
function nextImage() {
	if (p<(total-1)) {
		p++;
		if (loaded == filesize) {
			picture._alpha = 0;
			picture.loadMovie(image[p], 1);
			desc_txt.text = description[p];
			picture_num();
		}
	}
}
function prevImage() {
	if (p>0) {
		p--;
		picture._alpha = 0;
		picture.loadMovie(image[p], 1);
		desc_txt.text = description[p];
		picture_num();
	}
}
function firstImage() {
	if (loaded == filesize) {
		picture._alpha = 0;
		picture.loadMovie(image[0], 1);
		desc_txt.text = description[0];
		picture_num();
	}
}

```

\*\*\*\*[U][FONT=Arial Black][SIZE=2]
