How get preloader to load early?

After consulting several different pre-loader tutorials, I tried to build a very simple pre-loader. I placed the following on a movie clip in frame 1.

onClipEvent (enterFrame){
bytesloaded=Math.round (getBytesLoaded());
bytestotal=Math.round (getBytesTotal());
percent=(bytesloaded/bytesTotal);
fullpercent=(Math.round(percent100));
this.loadbar._width=(this.loadbar._width
percent);
if (bytesloaded==bytestotal){
_root.gotoAndPlay(2);
}
}

I placed the published html file on the web. Although it isn’t large (I attached a medium-sized image as a “load”), it takes forever to load and does not show the pre-loader. What is my error? Any ideas?