# XML Slideshow with pop ups

**URL:** <https://forum.kirupa.com/t/xml-slideshow-with-pop-ups/180849>\
**Category:** flash\
**Created:** [March 3, 2006, 9:02pm UTC](https://forum.kirupa.com/t/xml-slideshow-with-pop-ups/180849 "2006-03-03T21:02:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NS05](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ns05/32/2205_2.png) [@NS05](https://forum.kirupa.com/u/NS05)\
**Post date:** [March 3, 2006, 9:02pm UTC](https://forum.kirupa.com/t/xml-slideshow-with-pop-ups/180849/1 "2006-03-03T21:02:35Z")

</div>

Hi,

I am doing a picture Slideshow using Flash and XML. My slide show is working great but I want the user to be able to click on the current picture and have it load in a larger version of the picture in a popup window sized to the particular picture they clicked on. I just can’t figure out how to add this functionality without breaking what I currently have. I would really appreciate any suggestions from anyone.

–Thanks

XML CODE  
\<Slides\>  
\<slideNode jpegURL=“images/image1.jpg”\>The Beach\</slideNode\>  
\<slideNode jpegURL=“images/image2.jpg”\>The Ocean\</slideNode\>  
\<slideNode jpegURL=“images/image3.jpg”\>Rocks\</slideNode\>  
\<slideNode jpegURL=“images/image4.jpg”\>The Beach BW\</slideNode\>  
\<slideNode jpegURL=“images/image5.jpg”\>Ocean BW\</slideNode\>  
\<slideNode jpegURL=“images/image6.jpg”\>Rocks BW\</slideNode\>  
\</Slides\>

FLASH ACTIONSCRIPT  
slides\_xml = new XML();  
slides\_xml.onLoad = startSlideShow;  
slides\_xml.load(“slides.xml”);  
slides\_xml.ignoreWhite = true;  
//  
// Show the first slide and intialize variables  
function startSlideShow(success) {  
if (success == true) {  
rootNode = slides\_xml.firstChild;  
totalSlides = rootNode.childNodes.length;  
firstSlideNode = rootNode.firstChild;  
currentSlideNode = firstSlideNode;  
currentIndex = 1;  
updateSlide(firstSlideNode);

}  
}  
//  
// Updates the current slide with new image and text  
function updateSlide(newSlideNode) {  
imagePath = newSlideNode.attributes.jpegURL;  
slideText = newSlideNode.firstChild.nodeValue;  
loadMovie(imagePath, targetClip);  
}  
//  
// Event handler for ‘Next slide’ button  
next\_btn.onRelease = function() {  
nextSlideNode = currentSlideNode.nextSibling;  
if (nextSlideNode == null) {  
break;  
} else {  
currentIndex++;  
updateSlide(nextSlideNode);  
currentSlideNode = nextSlideNode;  
}  
};  
//  
// Event handler for ‘Previous slide’ button  
back\_btn.onRelease = function() {  
previousSlideNode = currentSlideNode.previousSibling;  
if (previousSlideNode == null) {  
break;  
} else {  
currentIndex–;  
currentSlideNode = previousSlideNode;  
updateSlide(previousSlideNode);  
}  
};
