# Help with pre-loader

**URL:** https://forum.kirupa.com/t/help-with-pre-loader/326820
**Category:** flash
**Created:** [January 14, 2012, 8:30pm UTC](https://forum.kirupa.com/t/help-with-pre-loader/326820 "2012-01-14T20:30:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Macca26](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Macca26](https://forum.kirupa.com/u/Macca26)
#### Post date: [January 14, 2012, 8:30pm UTC](https://forum.kirupa.com/t/help-with-pre-loader/326820/1 "2012-01-14T20:30:22Z")

</div>

Hi Guys,

I have a pre-loader swf that runs and then loads my game which is a seperate swf. (I followed a tutorial that told me to do it that way). Anyway when i load the swf file it just loads straight into the new swf and no progress bar appears. If i run it in flash i can simulate the download and it works fine. Just doesnt work if you run at is a stand alone swf file.

My code is as follows:

stop();  
siteLoader.loadMovie(“bouncing game.swf”);  
loadingBar.\_xscale = 1;  
loadingBar.onEnterFrame = function()

```
{
    kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
    kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
    percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
    this._xscale = percentage;
    
    if (percentage == 99) 
        {
            delete this.onEnterFrame;
        }
}

```

Cheers in advance.
