Preloader issue

Hi,

Why is it my preloader will only shows up when it reaches 50% of the total size of the flash site?

my code is


bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadTxt = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
    this.gotoAndPlay(3);
}

well, the preloader is just a very simple animation, it was only a cirlce symbol like small icon in mozilla firefox in the top when it loads a page with a percentage and a loading text.

i put the code in the first frame together with the preloader movie clip.

but when i test it using flash player, the player shows blank then suddenly pop ups the preloader after 2 - 3 minutes and started the counting at 49 - 50%, i open the bandwidth profiler in the flash player and yes it loads the movie and it will start and show the preloader when it reach 50%.

anyone knows how to debug this?

This is the exact problem I was having. The movie would load about 40% THEN then preloader would start to display. I am using the AS 2.0 from the kirpua tutorial.

http://www.kirupa.com/developer/mx/percentagepreloader.htm

midframe = 12;
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent200;
this.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

Poking around here and there I changed the publish settings>action script settings to Export frame for classes to 3. I’m not sure what this does, but now my preloader displays properly.

Any info on Export frame classes would be great

Thanks!