# Pre loader problem

**URL:** <https://forum.kirupa.com/t/pre-loader-problem/241310>\
**Category:** Uncategorized\
**Created:** [October 12, 2007, 1:44am UTC](https://forum.kirupa.com/t/pre-loader-problem/241310 "2007-10-12T01:44:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitantardero](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@Nitantardero](https://forum.kirupa.com/u/Nitantardero)\
**Post date:** [October 12, 2007, 1:44am UTC](https://forum.kirupa.com/t/pre-loader-problem/241310/1 "2007-10-12T01:44:54Z")

</div>

Hi everyone, I have a problem with my preloader.

The thing is that I want a bar to grow when the movie is loading. I already made the percent count work, but the bar doesn´t work. I will post the code here, if anyone would like the source file, ask me.

Thanks a lot.

stop();  
//  
Barra.onLoad = function() {  
this.\_xscale = 0;  
};  
//  
this.onEnterFrame = function() {  
porcentaje = Math.round((getBytesLoaded()/getBytesTotal())\*100);  
loadtext = porcentaje+" %";  
Barra.\_xscale = porcentaje;  
//  
if (porcentaje == 100) {  
gotoAndPlay(“Scene 1”,“Residencial”);  
}  
};
