# Preloader issue

**URL:** <https://forum.kirupa.com/t/preloader-issue/258243>\
**Category:** Uncategorized\
**Created:** [April 22, 2008, 12:23pm UTC](https://forum.kirupa.com/t/preloader-issue/258243 "2008-04-22T12:23:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ne3ro0](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@ne3ro0](https://forum.kirupa.com/u/ne3ro0)\
**Post date:** [April 22, 2008, 12:23pm UTC](https://forum.kirupa.com/t/preloader-issue/258243/1 "2008-04-22T12:23:18Z")

</div>

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

```auto

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?

---

<div class="post-metadata">

**Author:** ![meshedintervals](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@meshedintervals](https://forum.kirupa.com/u/meshedintervals)\
**Post date:** [May 13, 2008, 4:18pm UTC](https://forum.kirupa.com/t/preloader-issue/258243/2 "2008-05-13T16:18:32Z")

</div>

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](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 = getPercent_200;  
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!
