# Preloader woes

**URL:** https://forum.kirupa.com/t/preloader-woes/286743
**Category:** Uncategorized
**Created:** [April 20, 2009, 1:49pm UTC](https://forum.kirupa.com/t/preloader-woes/286743 "2009-04-20T13:49:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Raziel](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@Raziel](https://forum.kirupa.com/u/Raziel)
#### Post date: [April 20, 2009, 1:49pm UTC](https://forum.kirupa.com/t/preloader-woes/286743/1 "2009-04-20T13:49:17Z")

</div>

Hai,

I’m using this here preloader… :

```auto
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onRootLoaderProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onRootLoaderComplete);

function onRootLoaderProgress (event:ProgressEvent):void
{
	   var lb:int = event.bytesLoaded;
	   var ltl:int = event.bytesTotal;
	   var ratio:int = lb/ltl*100;
	   lpc0.text = String(ratio)+"%";
	   lbar0.scaleX = ratio/100;
	   lpc0.x = (1024/100)*ratio- 230;
	   trace(ratio);
}
function onRootLoaderComplete (event:Event):void
{
	   var lb:int = event.target.bytesLoaded;
	   var ltl:int = event.target.bytesTotal;
	   var ratio:int = lb/ltl*100;
	   lpc0.text = String(ratio)+"%";
	   lbar0.scaleX = ratio/100;
	   if(ratio>=100)
	   {
			   gotoAndStop(5);
	   }
}

```

but when i stick this online with the rest of my movie, it sometimes just hangs on 100%. I don’t see anything wrong with my code so i’m wondering if another set of eyes would be able to spot what’s wrong.
