# Preloader help

**URL:** <https://forum.kirupa.com/t/preloader-help/265360>\
**Category:** Uncategorized\
**Created:** [July 8, 2008, 1:02am UTC](https://forum.kirupa.com/t/preloader-help/265360 "2008-07-08T01:02:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisvwebb](https://avatars.discourse-cdn.com/v4/letter/c/ea5d25/32.png) [@chrisvwebb](https://forum.kirupa.com/u/chrisvwebb)\
**Post date:** [July 8, 2008, 1:02am UTC](https://forum.kirupa.com/t/preloader-help/265360/1 "2008-07-08T01:02:56Z")

</div>

## I’ve written and rewritten this code multiple times, as well as copy and pasted some successful code. And when I simulate download it seems to always download at the same rate. Soo…It could be my default settings are wacked out or I just screwed the code up. Could use some help.

stop();

myInterval = setInterval(preload,100);

function preload() {  
var current = \_root.getBytesLoaded();  
var total = \_root.getBytesTotal();  
var pctLoaded = Math.round(current/total\*100);  
pct\_txt.text = pctLoaded;  
loaderBar\_mc.\_xscale = pctLoaded;

```
if (current &gt;= total) {
	gotoAndStop("main",1);
	clearInterval(myInterval);
}

```

}
