# A preload question

**URL:** <https://forum.kirupa.com/t/a-preload-question/242886>\
**Category:** Uncategorized\
**Created:** [October 31, 2007, 12:26pm UTC](https://forum.kirupa.com/t/a-preload-question/242886 "2007-10-31T12:26:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivant](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sivant](https://forum.kirupa.com/u/sivant)\
**Post date:** [October 31, 2007, 12:26pm UTC](https://forum.kirupa.com/t/a-preload-question/242886/1 "2007-10-31T12:26:42Z")

</div>

i have a 1,657 kb swf and i added a preloader with precentage bar and for some reason it takes a long time to show the bar. it first apears when the bar is already 60 precent full which means there is a blank page for too long…  
the prelodClip has a **stop** in its first frame and a clip that is called\*\* barclip\*\* which includes a squere movie clip in the shape of the bar ( its alpha is 0 )called **hiddenRectForLoc. and another clip called hiddenRect** which its width changes according to the loading progress. there is also a text box called **thePer** to show the precentage in numbers the code in this frame is:

```auto
stop ();
firstLoc =_root.preloadClip.barclip.hiddenRectForLoc._width;

```

the last clip in the preloadClip first frame is a clip that has only code in it. it has three frames. the first one is empty, the second is labled **repeat** and has this code:

```auto
_root.preloadClip.thePer = int(100*_root.getBytesLoaded()/_root.getBytesTotal());
_root.preloadClip.barclip.hiddenRect._width = _parent.firstLoc*_root.preloadClip.thePer/100;

```

and the third frame has this code:

```auto
if (_root.preloadClip.thePer == 100) {
 _root.play();
 _parent.gotoAndStop(2);
} else {
 gotoAndPlay("repeat");
}

```

so this preloader works but my problem is that it takes it too long to show. how can i solve this?
