I’ve wanted to reuse this for publishing files in version 8 but I can only get it to work in 6 or less in the past. Its a preloader code. Thanks
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;
}
}