# How to make image gallery

**URL:** <https://forum.kirupa.com/t/how-to-make-image-gallery/149820>\
**Category:** flash\
**Created:** [June 1, 2005, 4:27pm UTC](https://forum.kirupa.com/t/how-to-make-image-gallery/149820 "2005-06-01T16:27:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jankratochvil](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jankratochvil/32/566_2.png) [@jankratochvil](https://forum.kirupa.com/u/jankratochvil)\
**Post date:** [June 1, 2005, 4:27pm UTC](https://forum.kirupa.com/t/how-to-make-image-gallery/149820/1 "2005-06-01T16:27:57Z")

</div>

I read the good tutorial here [http://www.kirupa.com/developer/mx2004/xml\_flash\_photogallery.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm) and i would like to enhance it with gallery.  
I think about it how to do it.  
I need to load the description and images and movie and than with loop create next, and next.  
I do’nt know how duplicate this movies.  
I load the XML:

```auto
// fn after loading XML load
function loadXML_gal (loaded)
{
	if (loaded)
	{
		xmlNode_gal = this.firstChild;
		image_gal = [];
		description_gal = [];
		path_gal = [];
		total = xmlNode_gal.childNodes.length;
		for (i = 0; i < total; i++)
		{
			image_gal* = xmlNode_gal.childNodes*.childNodes[0].firstChild.nodeValue;
			description_gal* = xmlNode_gal.childNodes*.childNodes[1].firstChild.nodeValue;
			path_gal* = xmlNode_gal.childNodes*.childNodes[2].firstChild.nodeValue;
			trace ("image_gal =" + image_gal*);
			trace ("description_gal =" + description_gal*);
			trace ("path_gal =" + path_gal*);
		}
	}
	else
	{
		content = "file not loaded!";
	}
}
// create XML object
xmlData_gal = new XML ();
xmlData_gal.ignoreWhite = true;
xmlData_gal.onLoad = loadXML_gal;
xmlData_gal.load ("xml/seznam_gallery.xml");
//

```

And now i need to put every loaded images in new movie.

XML what is loaded:

```auto
<?xml version="1.0" encoding="windows-1250"?>
<main_node>
   <gallery>
      <caption>Prvni galerie</caption>
      <image>gallery/img_01.jpg</image>
      <path>xml/gallery_01.xml</path>
   </gallery>
   <gallery>
      <caption>Druha galerie</caption>
      <image>gallery/img_02.jpg</image>
      <path>xml/gallery_02.xml</path>
   </gallery>
</main_node>

```

How to do it please? :\*(
