Search Tutorials
Here's how:
1.create blank keyframe in the main timeline.
onClipEvent (load) {
//set the status bar width to zero;
_xscale = 0;
}
onClipEvent (enterFrame) {
//calculate the load as a percentage;
counter = math.floor(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
_parent.counterpercent = counter+"%";
//if loaded, play;
if (counter>=100) {
_parent.play();
} else {
//if not loaded, set the status bar width;
_xscale = counter;
}
}
5. place the rest of your flash file in the next scene or next frame. that's it. The use of the "_parent" target allows the file to calculate its own size whether it has been loaded into another movie or not. the use of on EnterFrame means you don't have to start looping between frames. the rest is up to your own creativity...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|