# XML Photosgallery

**URL:** <https://forum.kirupa.com/t/xml-photosgallery/42396>\
**Category:** flash\
**Created:** [February 8, 2004, 8:28pm UTC](https://forum.kirupa.com/t/xml-photosgallery/42396 "2004-02-08T20:28:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mucho](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mucho](https://forum.kirupa.com/u/mucho)\
**Post date:** [February 8, 2004, 8:28pm UTC](https://forum.kirupa.com/t/xml-photosgallery/42396/1 "2004-02-08T20:28:55Z")

</div>

hi All,

anyone got an idea where I could find a decent XML based photo gallery?!

thx,

m.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 8, 2004, 10:26pm UTC](https://forum.kirupa.com/t/xml-photosgallery/42396/2 "2004-02-08T22:26:14Z")

</div>

There is a photo gallery tutorial and an XML tutorial on this site… :sure:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 8, 2004, 10:44pm UTC](https://forum.kirupa.com/t/xml-photosgallery/42396/3 "2004-02-08T22:44:43Z")

</div>

Ilyas: I check that out… it works partially. I’m tying to keep the forward, backward function and a direct click function.

here’s the code:

–  
images\_xml = new XML();  
images\_xml.onLoad = startImageViewer;  
images\_xml.load(“xml/images.xml”);  
images\_xml.ignoreWhite = true;

function startImageViewer(success) {  
if (success == true) {  
rootNode = images\_xml.firstChild;  
totalImages = rootNode.childNodes.length;  
firstImageNode = rootNode.firstChild;  
currentImageNode = firstImageNode;  
currentIndex = 1;  
updateImage(firstImageNode);  
}  
}

function updateImage(newImageNode) {  
imagePath = newImageNode.attributes.imgURL;  
targetClip.loadMovie(imagePath);  
imageCount = "Viewing image " + currentIndex + " of " + totalImages;  
}

next\_btn.onRelease = function() {  
nextImageNode = currentImageNode.nextSibling;  
if (nextImageNode == null) {  
break;  
} else {  
currentIndex++;  
updateImage(nextImageNode);  
currentImageNode = nextImageNode;  
}  
};

back\_btn.onRelease = function() {  
previousImageNode = currentImageNode.previousSibling;  
if (previousImageNode == null) {  
break;  
} else {  
currentIndex–;  
currentImageNode = previousImageNode;  
updateImage(previousImageNode);  
}  
};

button01.onRelease = function() {  
previousImageNode = imageNode01;  
if (previousImageNode == null) {  
break;  
} else {  
currentIndex–;  
currentImageNode = previousImageNode;  
updateImage(previousImageNode);  
}  
};  
button02.onRelease = function() {  
nextImageNode = currentImageNode.nextSibling;  
if (nextImageNode == null) {  
break;  
} else {  
currentIndex++;  
updateImage(nextImageNode);  
currentImageNode = nextImageNode;  
}  
};

button03.onRelease = function() {  
nextImageNode = imageNode03;  
if (nextImageNode == null) {  
break;  
} else {  
currentIndex++;  
updateImage(nextImageNode);  
currentImageNode = nextImageNode;  
}  
};
