# Slideshow Tutorial: Can I fade the pictures out?

**URL:** https://forum.kirupa.com/t/slideshow-tutorial-can-i-fade-the-pictures-out/85081
**Category:** flash
**Created:** [April 1, 2005, 4:59pm UTC](https://forum.kirupa.com/t/slideshow-tutorial-can-i-fade-the-pictures-out/85081 "2005-04-01T16:59:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![iAmGen3ric](https://avatars.discourse-cdn.com/v4/letter/i/96bed5/32.png) [@iAmGen3ric](https://forum.kirupa.com/u/iAmGen3ric)
#### Post date: [April 1, 2005, 4:59pm UTC](https://forum.kirupa.com/t/slideshow-tutorial-can-i-fade-the-pictures-out/85081/1 "2005-04-01T16:59:27Z")

</div>

How difficult would it be to make the images fade out the same way they fade in?

```auto

delay = 10000;
//-----------------------
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;
		}
		firstImage();
	} else {
		content = &quot;file not loaded!&quot;;
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(&quot;images.xml&quot;);
p = 0;
this.onEnterFrame = function() {
	filesize = picture.getBytesTotal();
	loaded = picture.getBytesLoaded();
	preloader._visible = true;
	if (loaded != filesize) {
		preloader.preload_bar._xscale = 100*loaded/filesize;
	} else {
		preloader._visible = false;
		if (picture._alpha<100) {
			picture._alpha += 5;
		}
	}
};
function nextImage() {
	if (p<(total-1)) {
		p++;
		if (loaded == filesize) {
			picture._alpha = 0;
			picture.loadMovie(image[p], 1);
			desc_txt.text = description[p];
			picture_num();
			slideshow();
		}
	}
}
function prevImage() {
	if (p>0) {
		p--;
		picture._alpha = 0;
		picture.loadMovie(image[p], 1);
		desc_txt.text = description[p];
		picture_num();
	}
}
function firstImage() {
	if (loaded == filesize) {
		picture._alpha = 0;
		picture.loadMovie(image[0], 1);
		desc_txt.text = description[0];
		picture_num();
		slideshow();
	}
}
function picture_num() {
	current_pos = p+1;
	pos_txt.text = current_pos+&quot; / &quot;+total;
}
function slideshow() {
	myInterval = setInterval(pause_slideshow, delay);
	function pause_slideshow() {
		clearInterval(myInterval);
		if (p == (total-1)) {
			p = 0;
			firstImage();
		} else {
			nextImage();
		}
	}
}

```

Any help is appreciated!
