# Fade in images with XML slideshow

**URL:** https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824
**Category:** Uncategorized
**Created:** [July 30, 2004, 5:13pm UTC](https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824 "2004-07-30T17:13:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![curtisstage](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@curtisstage](https://forum.kirupa.com/u/curtisstage)
#### Post date: [July 30, 2004, 5:13pm UTC](https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824/1 "2004-07-30T17:13:56Z")

</div>

does anyone know the script to fade in each image and possibly put a preloader as well? for this slideshow

[http://www.macromedia.com/support/flash/applications/jpeg\_slideshow\_xml/index.html](http://www.macromedia.com/support/flash/applications/jpeg_slideshow_xml/index.html)

---

<div class="post-metadata">

### Author: ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)
#### Post date: [July 30, 2004, 5:21pm UTC](https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824/2 "2004-07-30T17:21:10Z")

</div>

Welcom to kirupa!

There’s another sample file in the “samples” folder in Flash  
called load\_images.fla that has fade in.

---

<div class="post-metadata">

### Author: ![curtisstage](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@curtisstage](https://forum.kirupa.com/u/curtisstage)
#### Post date: [July 30, 2004, 6:42pm UTC](https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824/3 "2004-07-30T18:42:17Z")

</div>

hey inflicted, thanks for the response- old to kirupa-new to forum-thanks

I need to put the fade into this XML script on the buttons- I couldn’t figure out how to apply the “load\_images” script-- it kind of flickered my 1st image after fading  
here is the actual script:

images\_xml = new XML();  
images\_xml.onLoad = startImageViewer;  
images\_xml.load(“xml/images.xml”);  
images\_xml.ignoreWhite = true;

//  
// Show the first image and intialize variables  
function startImageViewer(success) {  
if (success == true) {  
rootNode = images\_xml.firstChild;  
// ‘totalImages’ is the variable name set to correspond with the the dynamic text instance of 'totalImages’  
totalImages = rootNode.childNodes.length;  
// [totalImages = rootNode.childNodes.length;] gets the total number of childNodes (total number of image and text files) in your .xml document  
firstImageNode = rootNode.firstChild;  
currentImageNode = firstImageNode;  
// ‘currentIndex’ is the variable name set to correspond with the dynamic text instance of 'currentIndex’  
currentIndex = 1;  
// [currentIndex = 1;] sets the viewer to play the first childNode (first image and text file) in your .xml document  
updateImage(firstImageNode);  
}  
}  
//  
// Updates the current image with new image and text  
function updateImage(newImageNode) {  
// ‘imagePath’ is the variable name set to correspond with the .jpeg file name located in your .xml document  
imagePath = newImageNode.attributes.jpegURL;  
// ‘imageText’ is the variable name for the instance 'textArea’  
imageText = newImageNode.firstChild.nodeValue;  
// ‘targetClip’ is the instance name for the movie clip ‘imageArea’, this is where all your image files from your .xml document are loaded  
targetClip.loadMovie(imagePath);  
};

next\_btn.onRelease = function() {  
nextImageNode = currentImageNode.nextSibling;  
if (nextImageNode == null) {  
break;  
} else {  
currentIndex++;  
updateImage(nextImageNode);  
currentImageNode = nextImageNode;  
}  
};  
//  
// Event handler for ‘Previous image’ button  
back\_btn.onRelease = function() {  
previousImageNode = currentImageNode.previousSibling;  
if (previousImageNode == null) {  
break;  
} else {  
currentIndex–;  
currentImageNode = previousImageNode;  
updateImage(previousImageNode);  
}  
};  
i really appreciate any suggestions

---

<div class="post-metadata">

### Author: ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)
#### Post date: [August 1, 2004, 3:51pm UTC](https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824/4 "2004-08-01T15:51:47Z")

</div>

Fixed it:  
[slideshow](http://hlm-adh-9d2e.adsl.wanadoo.nl/~Inflicted/slideshow.fla.zip)

hope it’s what you want.

---

<div class="post-metadata">

### Author: ![curtisstage](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@curtisstage](https://forum.kirupa.com/u/curtisstage)
#### Post date: [August 2, 2004, 5:09pm UTC](https://forum.kirupa.com/t/fade-in-images-with-xml-slideshow/117824/5 "2004-08-02T17:09:44Z")

</div>

that is it exactly- thanks so much
