# Simple Preloader problem

**URL:** https://forum.kirupa.com/t/simple-preloader-problem/197213
**Category:** flash
**Created:** [August 14, 2006, 7:17pm UTC](https://forum.kirupa.com/t/simple-preloader-problem/197213 "2006-08-14T19:17:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![watery\_fart](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@watery\_fart](https://forum.kirupa.com/u/watery_fart)
#### Post date: [August 14, 2006, 7:17pm UTC](https://forum.kirupa.com/t/simple-preloader-problem/197213/1 "2006-08-14T19:17:41Z")

</div>

I am trying to do a preloader for an animation of mine for class, and instead of using the traditional loading bar, I am using a little figure that has to travel 285 pixels to the right (x) in order for it to hit the “100%” mark…

this is my actionscript in my 1st frame

```auto
var amountLoaded:Number = _root.getBytesLoaded()/_root.getBytesTotal();
penar._x = (amountLoaded*2.85)
a1.text = Math.round(amountLoaded*100)+"%";

```

and in my second just in case

```auto
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
 gotoAndPlay(3);
} else {
 gotoAndPlay(1);
}

```

My problem is, with that code in the first frame it doesn’t travel all the way, it only goes like 1/10 of the way through. I have tried various other ways but it either goes way too far or barely anywhere. It’s probably something dumb, yes I know. Any help would be awesomedizzle.
