# PreLoader Help Needed

**URL:** <https://forum.kirupa.com/t/preloader-help-needed/116010>\
**Category:** Uncategorized\
**Created:** [July 13, 2004, 8:25pm UTC](https://forum.kirupa.com/t/preloader-help-needed/116010 "2004-07-13T20:25:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deland01](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@deland01](https://forum.kirupa.com/u/deland01)\
**Post date:** [July 13, 2004, 8:25pm UTC](https://forum.kirupa.com/t/preloader-help-needed/116010/1 "2004-07-13T20:25:30Z")

</div>

Im needing assistance, I have the following script for my preLoader (see below). Its a simple preLoader with a loading bar that goes from left to right with a percent read out.

What I want is the percent text box to move along the [COLOR=Magenta]\_x[/COLOR] with the load bar, so when the load bar is at 100% the percent text box is just above.

Can anyone help??

[COLOR=Navy]myInterval = setInterval(preloader, 10);  
function preloader() {  
if (\_root.getBytesLoaded()\>=\_root.getBytesTotal()) {  
gotoAndPlay(nextScene);  
clearInterval(myInterval);  
}  
\_root.loadBar.\_xscale = (\_root.getBytesLoaded()/\_root.getBytesTotal())\*100;  
\_root.percentageDisplay.text = Math.round(\_root.getBytesLoaded()/\_root.getBytesTotal()\*100)+"%";  
}[/COLOR]
