# Kirupa's XML Slide show Help PLeasee

**URL:** <https://forum.kirupa.com/t/kirupas-xml-slide-show-help-pleasee/218900>\
**Category:** flash\
**Created:** [March 12, 2007, 10:05am UTC](https://forum.kirupa.com/t/kirupas-xml-slide-show-help-pleasee/218900 "2007-03-12T10:05:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evilalien](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@evilalien](https://forum.kirupa.com/u/evilalien)\
**Post date:** [March 12, 2007, 10:05am UTC](https://forum.kirupa.com/t/kirupas-xml-slide-show-help-pleasee/218900/1 "2007-03-12T10:05:00Z")

</div>

Hello All  
I have been working on the XML slide show with cross fading with links on each picture for about a week. I need to put the button’s for Next or Previous Image on top of the fading in images. I have an idea to make the process of auto fading pause on rollover with a clear button and display the next/prev button’s themselves but when i try the button’s just stay behind the images coming in :(. any suggestions on how to better do this would be awsome. I’m a neewbie to actionscripting but I’m very excited to learn more. here is the code i have been using.

var id, current;  
var k = 0, p = 0;  
var slide = 1;  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = [];  
link = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
link\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
}  
id = setInterval(preloadPic, 100);  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images\_links.xml”);  
function preloadPic() {  
clearInterval(id);  
var con = picture.duplicateMovieClip(“con”+k, 9984+k);  
con.loadMovie(image[p]);  
preloader.\_visible = true;  
con.\_alpha = 0;  
var temp = \_root.createEmptyMovieClip(“temp”+k, 99+k);  
k++;  
temp.onEnterFrame = function() {  
var total = con.getBytesTotal();  
var loaded = con.getBytesLoaded();  
percent = Math.round(loaded/total\*100);  
preloader.preload\_bar.\_xscale = percent;  
if (con.\_width) {  
preloader.\_visible = false;  
con.onEnterFrame = fadeIn;  
if (slide) {  
id = setInterval(nextImage, 7500);  
}  
delete this.onEnterFrame;  
}  
};  
}  
MovieClip.prototype.fadeIn = function() {  
if (this.\_alpha\<100) {  
current.\_alpha -= 2;  
this.\_alpha += 2;  
} else {  
current.\_visible = 0;  
current = this;  
this.onRelease = function() {  
getURL(link[p], “\_blank”);  
};  
delete this.onEnterFrame;  
}  
picture.onRelease = function() {  
getURL(link[p], “\_blank”);  
};

};  
function nextImage() {  
p\<total-1 ? p++ : p=0;  
preloadPic();  
}  
function picture\_num() {  
current\_pos = p+1;  
}  
preloadPic();
