Hi
I am making a preloader for a large flash file (approx 3.5mb) but it only seems to be loading the first scene.
The coding is the following;
Actionscript Code:
stop();
loadingBar._xscale = 1;
var loadingCall:Number = setInterval(preloadSite, 50);
function preloadSite():Void {
var siteLoaded:Number = _root.getBytesLoaded();
var siteTotal:Number = _root.getBytesTotal();
var percentage:Number = Math.round(siteLoaded/siteTotal*100);
loadingBar._xscale = percentage;
percentClip.percentDisplay.text = percentage + "%";
percentClip._x = loadingBar._x + loadingBar._width;
bytesDisplay.text = "loaded " + siteLoaded + " of " + siteTotal + " bytes";
if (siteLoaded >= siteTotal) {
clearInterval(loadingCall);
gotoAndStop("start");
}
}
There are 15 scenes with approx 10 images in each so it is a large file size.
Should I look into loading each scene separately or do any of you know the problem with the above loader.