Preloader issues

I am using this code for my preloader. It is located in the first frame of my flash file. I don’t see any progress bar display until about 90%. There are several movieClips in my flash file that are linked, do these have a bearing on the progress bar showing up?


total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded (50) {
 gotoAndPlay(5);
}