# Last image in slideshow to fade and have the option to replay

**URL:** https://forum.kirupa.com/t/last-image-in-slideshow-to-fade-and-have-the-option-to-replay/228785
**Category:** flash
**Created:** [June 11, 2007, 3:27pm UTC](https://forum.kirupa.com/t/last-image-in-slideshow-to-fade-and-have-the-option-to-replay/228785 "2007-06-11T15:27:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![njoay](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@njoay](https://forum.kirupa.com/u/njoay)
#### Post date: [June 11, 2007, 3:27pm UTC](https://forum.kirupa.com/t/last-image-in-slideshow-to-fade-and-have-the-option-to-replay/228785/1 "2007-06-11T15:27:09Z")

</div>

Hello,

I have built a photo gallery/slideshow using the tutorials “Photo Slideshow using XML and Flash” found here:

[http://www.kirupa.com/developer/mx2004/xml\_slideshow.htm](http://www.kirupa.com/developer/mx2004/xml_slideshow.htm)

I would like the last image to stop and fade out a little and then have a button to have the slideshow replay again. So after the last image, I’d like “Replay” text to appear. Any suggestions as to how I can accomplish this?

Also I seem to get the output error message:

Error opening URL “file:///C|/Documents%20and%20Settings/My%20Documents/Folder/FILENAME/undefined”

I’m assuming this is a path/directory error, but I don’t know the reason why. My path and files are all in the appropriate location. Any help would be greatly appreciated!

Below is my AS:

\_root.holder.swapDepths(\_root.picture);  
holder.\_y = 350;  
holder.\_x = 390;

//stop();  
delay = 3000;

//-----------------------  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
}  
firstImage();  
} else {  
content = “file not loaded!”;  
//preloader.\_visible = true;  
}  
}  
xmlData = new XML(); //assign a variable to the new XML object  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML; //tell xmlData to invoke the loadXML func when loaded  
xmlData.load(“images.xml”);

function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
slideshow();  
}  
}

function firstImage() {  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
slideshow();  
}  
}

function slideshow() {  
myInterval = setInterval(pause\_slideshow, delay);  
function pause\_slideshow() {  
clearInterval(myInterval);  
if (p == (total-1)) {  
p = 0;  
} else {  
nextImage();  
}  
}  
}
