# Preloader problem

**URL:** <https://forum.kirupa.com/t/preloader-problem/169218>\
**Category:** Uncategorized\
**Created:** [November 14, 2005, 3:35pm UTC](https://forum.kirupa.com/t/preloader-problem/169218 "2005-11-14T15:35:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielson](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/danielson/32/1779_2.png) [@danielson](https://forum.kirupa.com/u/danielson)\
**Post date:** [November 14, 2005, 3:35pm UTC](https://forum.kirupa.com/t/preloader-problem/169218/1 "2005-11-14T15:35:05Z")

</div>

In the first frame of my movie, I have the following code that adjusts the width of a preload bar (200px wide, hence the percent \* 2) depending on how much is loaded.

```php

var total:Number = getBytesTotal();
 
onEnterFrame = function(){
var loaded:Number = getBytesLoaded();
var percent:Number = Math.round((loaded/total)*100);
_root.preloadbar._width = percent * 2;
if(percent < 100){
	gotoAndPlay(1);
}
}

```

When the movie is 61% loaded, the preload bar jumps straight to the end but the movie keeps on loading. Any ideas why this might be? I’m still fairly new to AS so excuse me if this is a bit of a n00b question 🙂
