# Xml slideshow blanking out

**URL:** <https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882>\
**Category:** Uncategorized\
**Created:** [March 22, 2006, 5:59am UTC](https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882 "2006-03-22T05:59:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![frez](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@frez](https://forum.kirupa.com/u/frez)\
**Post date:** [March 22, 2006, 5:59am UTC](https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882/1 "2006-03-22T05:59:01Z")

</div>

i’ve been trying out the files in kirupa’s xml photo slideshow [tutorial](http://www.kirupa.com/developer/mx2004/xml_slideshow.htm).

please try the action script below, where i’ve disabled all alpha managment and disabled the display of the preloader.

1. why is there a blanking out between display of images?
2. is this a by-product of using loadMovie?
3. how does one get a clean cut from one image to the next?

my intention is to have the preloader show up on top of the currently viewed image and after the next image is loaded, hide the preloader and cut to the new image.

original fla file from tutorial:  
[http://www.kirupa.com/developer/mx2004/code/photogallery\_2004.zip](http://www.kirupa.com/developer/mx2004/code/photogallery_2004.zip)

modified action script:

```auto
delay = 3000;
//-----------------------
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 = "file not loaded!";

}

}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {

if (Key.getCode() == Key.LEFT) {

prevImage();

} else if (Key.getCode() == Key.RIGHT) {

nextImage();

}

};
p = 0;
this.onEnterFrame = function() {

filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = false;
//preloader._visible = true;
if (loaded != filesize) {

preloader.preload_bar._xscale = 100*loaded/filesize;

} else {

    
preloader._visible = false;
//if (picture._alpha<100) {

//picture._alpha += 10;

//}

}

};
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+" / "+total;

}
function slideshow() {

myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {

clearInterval(myInterval);
if (p == (total-1)) {

p = 0;
firstImage();

} else {

nextImage();

}

}

}

```

---

<div class="post-metadata">

**Author:** ![thesainter](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@thesainter](https://forum.kirupa.com/u/thesainter)\
**Post date:** [March 29, 2006, 9:45am UTC](https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882/2 "2006-03-29T09:45:29Z")

</div>

I’m trying to achieve the exact thing. but nothing yet.

---

<div class="post-metadata">

**Author:** ![flashwillkill](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@flashwillkill](https://forum.kirupa.com/u/flashwillkill)\
**Post date:** [March 29, 2006, 10:59am UTC](https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882/3 "2006-03-29T10:59:16Z")

</div>

Maybe this will help?

> **[Photo Slideshow Using XML and Flash](https://www.kirupa.com/forum/showthread.php?t=91827&highlight=crossfade)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  

> **[XML Image Gallery w/ Crossfades?](https://www.kirupa.com/forum/showthread.php?t=212112)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

**Author:** ![frez](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@frez](https://forum.kirupa.com/u/frez)\
**Post date:** [March 30, 2006, 9:48am UTC](https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882/4 "2006-03-30T09:48:20Z")

</div>

thanks flashwillkill … what an appropriate nick!

those two solutions seem to load all images at once. i’m planning on having 50 images which will suck up memory really fast.

i’m hoping for one that works with a preloader per image.

---

<div class="post-metadata">

**Author:** ![flashwillkill](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@flashwillkill](https://forum.kirupa.com/u/flashwillkill)\
**Post date:** [March 30, 2006, 6:59pm UTC](https://forum.kirupa.com/t/xml-slideshow-blanking-out/182882/5 "2006-03-30T18:59:46Z")

</div>

Overlooked your reply, but you got really lucky :thumb2: and got an answer here:

> **[kirupaForum](https://forum.kirupa.com)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!
