hi All,
anyone got an idea where I could find a decent XML based photo gallery?!
thx,
m.
hi All,
anyone got an idea where I could find a decent XML based photo gallery?!
thx,
m.
There is a photo gallery tutorial and an XML tutorial on this site… :sure:
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;
}
};