# Xml photo gallery

**URL:** <https://forum.kirupa.com/t/xml-photo-gallery/222234>\
**Category:** Uncategorized\
**Created:** [April 11, 2007, 8:00pm UTC](https://forum.kirupa.com/t/xml-photo-gallery/222234 "2007-04-11T20:00:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![choodeepupp](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/choodeepupp/32/3507_2.png) [@choodeepupp](https://forum.kirupa.com/u/choodeepupp)\
**Post date:** [April 11, 2007, 8:00pm UTC](https://forum.kirupa.com/t/xml-photo-gallery/222234/1 "2007-04-11T20:00:52Z")

</div>

hello!!

i m trying to create a photo gallery that load external pics using xml.

\>\>\> so my xml file is this:

\<gallery\>  
\<image title=“title1 here” main=“images/pic1.jpg” thmb=“thumbnails/pic1thumb.jpg” /\>  
\<image title=“title2 here” main=“images/pic2.jpg” thmb=“thumbnails/pic2thumb.jpg” /\>  
\</gallery\>

\>\>\> my actionscript is this:

myPhoto = new XML();  
myPhoto.ignoreWhite = true;  
myPhoto.onLoad = function(success) {  
//portfolioTag = this.firstChild;  
numimages = this.firstChild.childNodes.length;  
spacing = 50;  
for (i=0; i\<numimages; i++) {  
this.picHolder = this.firstChild.childNodes\*;  
this.thumbHolder = thumbnails.createEmptyMovieClip(“thumbnail”+i, i);  
this.thumbHolder.\_y = i\*spacing;  
this.thumbLoader = this.thumbHolder.createEmptyMovieClip(“thumbnail\_image”, 0);  
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);  
this.thumbHolder.title = this.picHolder.attributes.title;  
this.thumbHolder.main = this.picHolder.attributes.main;  
this.thumbHolder.onRelease = function() {  
loader.loadMovie(this.main);  
title\_txt.text = this.title;  
};  
}  
};  
myPhoto.load(“xmlphoto.xml”);

and it s working fine! BUT:  
my goal is that when u rollover the thumbnail another thumbnail loads in the same place!!! can i do that and how!?!!

thanks for your help
