PDA

View Full Version : perloader for a loading swf


alkil47
02-26-2002, 03:35 AM
I have some swf's losding into another swf . I was wondering if anyone out there knows how to put a easy percentage loading bar to show how much the swf has loaded. My site address is http://members.optusnet.com.au/~a_kilpatrick . the loading portfolio examples is what i am having trouble with .

Billy T
02-26-2002, 04:16 AM
ok say you are loading your external file into _level5

in the first frame of your external file put this

total_bytes = _level5.getBytesTotal();
loaded_bytes =_level5.getBytesLoaded();
percent_done = int((loaded_bytes/total_bytes)*100);
_level5.loadBar.gotoAndStop(percent_done);
ifFrameLoaded (3) {
gotoAndPlay (3);
}

in frame 2 put

gotoAndPlay(1);

on the stage in frame 1 and 2 of your external file you have an MC which is a 100 frame animation of your progress bar expanding or whatever. Give this an instance name of loadBar

cheers