Preloader took sometime to appear

Hi guys ,

i seem to encounter some problems on preloader when i place it into my swf.file. It took some time before the preloader appear then it loads , anyone know what’s the problem? i place the preloader on the first frame then the rest of the information is on the 2nd frame. The preloader image is just a vector image with animation of it being loaded

this is the actionscript i place in the first frame :

onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
text = percent+"%";
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}