I am using Flash 8.
I am creating a slideshow by using an XML file to say which images I want to use.
I am able to load the images into my slideshow and display them.
My question is how can I set it so that 80% of the pictures have loaded into my player before I allow my slideshow to start? Maybe showing the percentage of pictures that have loaded.
Can someone point me in the right direction.
Here is the code I am currently using
I am creating a slideshow by using an XML file to say which images I want to use.
I am able to load the images into my slideshow and display them.
My question is how can I set it so that 80% of the pictures have loaded into my player before I allow my slideshow to start? Maybe showing the percentage of pictures that have loaded.
Can someone point me in the right direction.
Here is the code I am currently using
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
GoToNextFrameAndDisplayLoaded();
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("XML/FeatureSlideshow.xml");
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
if (picture._width > 500) {
picture._x = 0;
} else {
picture._x = 100;
}
if (loaded == filesize) {
if (picture._alpha<100) {
picture._alpha += 5;
}
}
};