# Preloader Help!

**URL:** https://forum.kirupa.com/t/preloader-help/319598
**Category:** Uncategorized
**Created:** [February 25, 2011, 6:36pm UTC](https://forum.kirupa.com/t/preloader-help/319598 "2011-02-25T18:36:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![izzo101](https://avatars.discourse-cdn.com/v4/letter/i/c6cbf5/32.png) [@izzo101](https://forum.kirupa.com/u/izzo101)
#### Post date: [February 25, 2011, 6:36pm UTC](https://forum.kirupa.com/t/preloader-help/319598/1 "2011-02-25T18:36:15Z")

</div>

Two problems that I haven’t seen a clear answer yet. Trying to create a simple preloader bar and text. Everything works without errors. The problems are my loader waits until about 20% to show and my loader also starts the movieclip at about 86% therefore not completing loading and showing videos that arent yet loaded. Please help with advice. Here is the script:

import flash.display.\*;  
this.stop();  
this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, progLOADING);

function progLOADING(event:ProgressEvent):void {

```
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
lbar.scaleX=pcent/100;
lpc.text=int(pcent)+"%";

if(pcent==100){
this.gotoAndPlay(2);

```

}

}

Bare with me I’m still noob to doing my own script :).
