Groups | Blog | Home
all groups > macromedia flash sitedesign > january 2007 >

macromedia flash sitedesign : My site takes too long to view


Rocko16
1/31/2007 8:59:22 PM
I think my problem is that i am using a lot of images in JPEG format and i have
compressed them but it still seems to be taking longer then i think it should.
Now i think this is the problem and i am not really sure if that is even it. If
someone could view it and give me some tips that would be greatly appreciated.
www.uni-jetindustrialpipe.ca

Thanks
Newt99
2/1/2007 8:40:41 AM
Hello,

Download images on the fly, when needed, as opposed to preloading everything.
The mantra to small download time is "Download everything in chunks, and
download only when needed". You can use this method I have written for another
project:

//
//
// Image Loader
//
function loadImage(sURL:String) {
//
// Load the JPEG into the image placeholder movieclip
mc_image_placeholder.loadMovie(sURL);
//
// Make the hourglass loading animation appear
mc_loading._visible = true;
//
// Set the event handler for the loader
this.onEnterFrame = function() {
//
// Monitor the loading progress of the image
//
var bl = mc_image_placeholder.getBytesLoaded();
var bt = mc_image_placeholder.getBytesTotal();
//
if (bl>4 && bt>4 && bl>=bt) {
//
// -------------------
// Loading is complete
// -------------------
//
// Play the fade
//
// Make the hourglass loading animation disappear
mc_loading._visible = false;
//
// Reset the event handler for the loader
delete (this.onEnterFrame);
}
};
}

Best regards,
Karl Sigiscar.

AddThis Social Bookmark Button