# Xml

**URL:** <https://forum.kirupa.com/t/xml/220929>\
**Category:** Uncategorized\
**Created:** [March 30, 2007, 2:49pm UTC](https://forum.kirupa.com/t/xml/220929 "2007-03-30T14:49:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhdc](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@jhdc](https://forum.kirupa.com/u/jhdc)\
**Post date:** [March 30, 2007, 2:49pm UTC](https://forum.kirupa.com/t/xml/220929/1 "2007-03-30T14:49:28Z")

</div>

Hi, I read the XML photo tutorial on Kirupa and applied it to my site.  
The photos are working with the arrows, but it somehow deactivated my thumbnails.  
Before when I clicked a thumbnail, it loaded the photo - now they do not load the photo, but they still rollover.  
I have this code in each thumbnail to activate the rollover and load the photos:

onClipEvent(load) {  
myNumber = 1;  
}

on(release){  
\_root.myPicLoader.contentPath = (“pics/1.jpg”);  
}

And here’s my XML code - any suggestions? Thanks!!!

function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = [];  
description = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
description\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
}  
firstImage();  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images.xml”);  
/////////////////////////////////////  
listen = new Object();  
listen.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
prevImage();  
} else if (Key.getCode() == Key.RIGHT) {  
nextImage();  
}  
};  
Key.addListener(listen);  
arrow\_lt\_mc.onRelease = function() {  
prevImage();  
};  
arrow\_rt\_mc.onRelease = function() {  
nextImage();  
};  
p = 0;  
//////////////////////////////////////////////////////////////////////  
//  
// this code will turn off the preloader using the object listener method  
picture.onLoad = function(success) {  
if (success) {  
preloader.\_visible = false;  
}  
};  
// this will set the preloader bar to the percentage of the loaded image  
picture.onProgress = function(percent) {  
preloader.preload\_bar.\_xscale = percent;  
};  
// end preloading  
//  
///////////////////////////////////////////////////////////////////////  
function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.contentPath = image[p];  
preloader.\_visible = true;  
desc\_txt.text = description[p];  
picture\_num();  
}  
}  
}  
function prevImage() {  
if (p\>0) {  
p–;  
picture.contentPath = image[p];  
preloader.\_visible = true;  
desc\_txt.text = description[p];  
picture\_num();  
}  
}  
function firstImage() {  
if (loaded == filesize) {  
picture.contentPath = image[0];  
preloader.\_visible = true;  
desc\_txt.text = description[0];  
picture\_num();  
}  
}  
function picture\_num() {  
current\_pos = p+1;  
pos\_txt.text = current\_pos+" / "+total;  
}
