[Flash8] Preloading external jpgs with progress bar

Hey all,

I’m sure you’ve all heard this question plenty of times before, but I’m having real trouble.
I’d like to create a preloader for external jpgs, but all in one go not on an image access basis.

I’ve currently got a general preloader (for embedded images and such) that works great visually but would like to convert this so that it preloads external images. Is this possible?

I’m using Flash 8 and will be passing in a comma separated list of images. The final flash will be a rotating gallery of images that fade into each other. It works great for small files but the larger the image, the more the flash jumps due to the fact that the image isn’t fully loaded. Hence the need for a preloader.

Many thanks!

Steve


stop();

var getVars = "largeimage.jpg,largeimage2.jpg,largeimage3.jpg";
//var getVars = _root.imageList;
getVars = getVars.split(",");
trace(getVars.length);

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(2);
    }
}