FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Preloader for flashmovie





Cee_Jay
i want a preloader for flash movie on web..whoch shows the percentage loaded in numbers..like 87%...i just need the actionscript code..not design
i will be pleased if someone can help me
southy
I used to have this memorized, but then I stopped using flash.

Let me try to remember.

Before I begin, I know that Adobe has a built in preloader that comes with flash. It's in the controls gallery I think. If not, search flash help for 'preloader' or 'loading bar' .

First, create a layer called "loadText" without the quotes at the beginning of your show before any other event (so like one keyframe (lasting 2 full frames), with blank underneath then a new keyframe after it for whatever you have. If you have multiple layers, it should look like this:
loadText: ||
layer2:____||
layer3:____||
layer4:____||

Make a text area for that only one line but make it long enough to fit 4 characters at whatever size/font you set it to. Don't type anything into it. In the properties panel, make this text box dynamic, while giving it a varname "loadText".

Make a new layer. Call it "actions". Select the empty first keyframe of that layer. In the actions panel, insert:

Code:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
   this.gotoAndPlay(3);
}


Now in the second keyframe of "actions" (which should line up with the second frame of "loadText"), apply this into the actions panel:

Code:
this.gotoAndPlay(1);


The rest of your show should start on FRAME 3

Go here for more information and a full tutorial: http://www.kirupa.com/developer/mx/percentagepreloader.htm
Cee_Jay
Thanks a lot..i got the idea...it worked
Related topics
how make preloaders in flash 2004?
please provide feedback for http://sanghvitrades.frihost.net
Don't Use Flash
My new Website
my web site design !
"DESIGNER" Barra de loading no FLASH
Hall of Hero's site
Flash is for...?
How to put counter in a full flash site?
Flash help!
script (help)
Flash Preloader
Problem with Flash preloader
Flash Preloader Help
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.