Click to See Complete Forum and Search --> : Percentage Preloader


acuddyre
07-04-2006, 05:45 AM
Hi I have a pretty complicated site created in one single scene and I would like to add a preloader to it with a percentage. I'm not sure exactly how to do it but I know I need it because the site is a pretty large file. Help!

raviganesh91221
07-04-2006, 06:39 AM
place this script in your first frame
------------------------------------------
total_bytes = this.getBytesTotal();
loaded_bytes = this.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
if (percent_done eq 100) {
gotoAndPlay("main", 1);
}
-----------------------------------------------

then give
---------------
gotoAndPlay(1);
----------------
in the 2nd frame
create a dynamic text field in the first frame

regards
Ravi