Hello!
I used the next tutorial to create something:
http://www.kirupa.com/developer/mx2004/xml_flash_photogallery2.htm
Instead of showing one photo at the time, i want two photos. when i click next i want two new photos…dont worry about this, i already got this working just fine.
however the preloading part isnt working well yet. everytime one loads fine, but the other preloader isnt working as how it should…its just like not animating.
so question is, how do i get two working preloaders (preferable both loading at the same time) for the next script (partial):
hope someone can help me out, this is driving me crazy :sen:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.firstChild.nodeValue;
}
firstTwoImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
listen = new Object();
var empty = this.createEmptyMovieClip("container", "100");
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;
}
};
function firstTwoImages() {
if (loaded == filesize) {
picture.loadMovie(image[p],"container");
picture2.loadMovie(image[p+1],"container");
}
}