# HELP slideshow -with transparent gifs/png

**URL:** <https://forum.kirupa.com/t/help-slideshow-with-transparent-gifs-png/202290>\
**Category:** flash\
**Created:** [September 29, 2006, 10:48am UTC](https://forum.kirupa.com/t/help-slideshow-with-transparent-gifs-png/202290 "2006-09-29T10:48:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaadar](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@aaadar](https://forum.kirupa.com/u/aaadar)\
**Post date:** [September 29, 2006, 10:48am UTC](https://forum.kirupa.com/t/help-slideshow-with-transparent-gifs-png/202290/1 "2006-09-29T10:48:54Z")

</div>

Could someone please assist.

Based on the tutorial on Kirupa -**[FONT=Verdana][SIZE=4][COLOR=#003366]Photo [/COLOR][/SIZE][/FONT]** [FONT=Verdana][SIZE=4][COLOR=#003366]Slideshow Using XML and Flash

[/COLOR][/SIZE][/FONT]I’ve been trying to build a slideshow able to load transparent gifs/pngs. When I changed the XML for the original tutorial to use images of any kind apart from jpegs it wouldnt load the images.

So I changed the code to the below. But it wont load the preloader or the images as well.

What am I doing wrong? I’m still a newbie at actionscript.

=============================================  
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”);  
p = 0;  
this.onEnterFrame = function() {  
var containerThree:MovieClip = createEmptyMovieClip(“containerThree”, 30);  
var mcLoaderThree:MovieClipLoader = new MovieClipLoader();  
mcLoaderThree.addListener(this);

```
filesize = containerThree.getBytesTotal();
loaded = containerThree.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
    preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
    preloader._visible = false;
    if (containerThree._alpha&lt;100) {
        containerThree._alpha += 10;
    }
}

```

};  
function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
containerThree.\_alpha = 0;  
mcLoaderThree.loadClip(image[p], containerThree);  
desc\_txt.text = description[p];  
picture\_num();  
slideshow();  
}  
}  
}  
function prevImage() {  
if (p\>0) {  
p–;  
containerThree.\_alpha = 0;  
mcLoaderThree.loadClip(image[p], containerThree);  
desc\_txt.text = description[p];  
picture\_num();  
}  
}  
function firstImage() {  
if (loaded == filesize) {  
mcLoaderThree.\_alpha = 0;  
mcLoaderThree.loadClip(image[0], containerThree);  
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(); } } }
