rendered paste bodyfunction loadXML(loaded) {
if (loaded) {
xmlNode = this.childNodes[1];
image = [];
url = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
url[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
delay = this.childNodes[0].childNodes[0].firstChild.nodeValue*1000;
rewidth = this.childNodes[0].childNodes[1].childnodes[0].firstChild.nodeValue;
reheight = this.childNodes[0].childNodes[1].childnodes[1].firstChild.nodeValue;
nextImage();
timer();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("configg.xml");
//
p = 0;
//delay = 2000;
//
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function timer() {
myInterval = setInterval(ticker, delay);
function ticker() {
//clearInterval(myInterval);
fadeout();
}
}
function fadeout() {
this.onEnterFrame = function() {
if (picture._alpha>=0) {
picture._alpha -= 5;
} else {
nextImage();
delete this.onEnterFrame;
}
};
}
function nextImage() {
if (p<(total-1)) {
p++;
} else {
p = 0;
}
if (loaded == filesize) {
picture.loadMovie(image[p], 1);
picture._alpha = 100;
link.onRelease = function() {
getURL(url[p], "_self");
};
}
}
/*function fadein() {
this.onEnterFrame = function() {
if (picture._alpha<=100) {
picture._alpha += 5;
} else {
timer();
delete this.onEnterFrame;
}
};
}*/