PDA

View Full Version : fancy percentage bar preloader in Flash 5



samsoner
February 15th, 2005, 08:23 PM
Hi,

I have created a Flash site using the modular method (external swfs loaded on top of another) and I am thinking about using a preloader for the intro page and the navigational menu. But, I currently have Flash 5 and so far on the web I've only seen preloader help for Flash MX. Does anyone have any links to sample preloader .fla's for Flash 5? Online tutorials?

The style that I am looking for similar to this website: http://www.boostmobileanthem.com/

BoostMobile uses the percentage% preloader

Sammo
February 16th, 2005, 04:23 PM
I dunno about flash 5, but this preloader works for MX, so it might be worth testing it and playing around with it a bit.


//This should be on Frame 1
done = getBytesLoaded();
total = getBytesLoaded();
percent = Math.floor(done/total*100);
// Create a movieclip with an instance name of loadBar
if (done == total) {
gotoAndPlay(3);
} else {
loadBar._width = percent*2 // this is for a 200pixel loadbar
nextFrame();
}


// This on Frame 2
prevFrame()


// Your main site/game/movie content here (frame 3)

Then give a dynamic text box the variable name "percent" w/o speech marks.


Hope that helps :)