PDA

View Full Version : Need XML Preloader



seek_nik
May 26th, 2008, 03:40 AM
Hello All,

I am using a script for downloading my xml file which contains the path for all images.



xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.load("photogallery/2008/Farewell/farewelldata.xml");
xmlData.onLoad = loadXML;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
cont = [];
type = [];

total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
type[i] = xmlNode.childNodes[i].attributes.typ;
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
cont[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
firstImage();
createThumb();
//trace(xmlNode.childNodes.length);
} else {
content = "file not loaded!";
loadtxt.text = "loading...";

}
}


Can you please tell me a solution to integrate preloader for this xml content. Also I need to integrate a preloader for the fla contents. Please advice