# A little help with the Photo Slideshow Using XML and Flash

**URL:** <https://forum.kirupa.com/t/a-little-help-with-the-photo-slideshow-using-xml-and-flash/233494>\
**Category:** flash\
**Created:** [July 24, 2007, 2:37pm UTC](https://forum.kirupa.com/t/a-little-help-with-the-photo-slideshow-using-xml-and-flash/233494 "2007-07-24T14:37:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [July 24, 2007, 2:37pm UTC](https://forum.kirupa.com/t/a-little-help-with-the-photo-slideshow-using-xml-and-flash/233494/1 "2007-07-24T14:37:44Z")

</div>

Hi I am trying to use something similar for a client showcase. Execpt I wish to make this global, so by using a variable I will be able to show all the screens for that client from the xml file.

So my xml file would look like so:-

\<clients\>

```
&lt;client&gt;
&lt;company&gt;Client One&lt;/company&gt;
 &lt;image&gt;/images/c1/1.jpg&lt;/image&gt;
 &lt;image&gt;/images/c1/2.jpg&lt;/image&gt;
 &lt;image&gt;/images/c1/3.jpg&lt;/image&gt;
&lt;/client&gt;

&lt;client&gt;
&lt;company&gt;Client Two&lt;/company&gt;
 &lt;image&gt;/images/c2/1.jpg&lt;/image&gt;
 &lt;image&gt;/images/c2/2.jpg&lt;/image&gt;
 &lt;image&gt;/images/c2/3.jpg&lt;/image&gt;
&lt;/client&gt;

```

\</clients\>

Show if say the client was client one, then

each of the images would be show for client one. But I am not sure how to approach this, what its doing at the moment is trying to loop between each client.

Does anyone know.

Its this element I think will need modification.

//Load XML  
function loadXML(loaded) {

```
if (loaded) {
	xmlNode = this.firstChild;
	
	image = [];
	
	total = xmlNode.childNodes.length;
	for (i=0; i&lt;total; i++) {
		image* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
	}
	firstImage();
} else {
	content = "file not loaded!";
}

```

}

xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load("/xml/clients.xml");

Any help would be nice.

Thanks
