# Help with modifing the Photo Slideshow Tutorial code

**URL:** <https://forum.kirupa.com/t/help-with-modifing-the-photo-slideshow-tutorial-code/232028>\
**Category:** flash\
**Created:** [July 10, 2007, 5:22pm UTC](https://forum.kirupa.com/t/help-with-modifing-the-photo-slideshow-tutorial-code/232028 "2007-07-10T17:22:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwainehead](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dwainehead](https://forum.kirupa.com/u/dwainehead)\
**Post date:** [July 10, 2007, 5:22pm UTC](https://forum.kirupa.com/t/help-with-modifing-the-photo-slideshow-tutorial-code/232028/1 "2007-07-10T17:22:57Z")

</div>

I’m sure that learning more about the action script I wouldn’t need to ask this but at this point I DKS about it…

I have the basic slideshow working in my site, but I want to add a little extra to it. My pages are in php and when I pass a link to the page like ?pg=2 I want to load a different set of pics from the xml file.

Currently the xml file is formatted:

```auto
 
<images>
    <pic>
       <image>mypic.jpg</image>
       <caption>My Pic</caption>
    </pic>
</images>

```

I would like to pass a variable through like this:

```auto
 
<images>
    <pic pg="1">
       <image>mypic.jpg</image>
       <caption>My Pic</caption>
    </pic>
    <pic id="2">
       <image>mypic.jpg</image>
       <caption>My Pic</caption>
    </pic>
</images>

```

So based on what I’ve read so far I think need to modify this section of the code to look for a variable:

```auto
 
function loadXML(loaded) { 
if (loaded) { 
xmlNode = this.firstChild; 
image = []; 
description = []; 
total = xmlNode.childNodes.length; 
for (i=0; i<total; i++) { 
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue; 
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue; 
}

```

So here’s my questions:

1. I’m not sure I put the variable in the right place?
2. how to make this code look for it?
3. how do I pass the variable info into my actionscript?

Yes I’m fumbling my way though! but I’ll learn!  
TIA
