# Adding load bar trouble

**URL:** <https://forum.kirupa.com/t/adding-load-bar-trouble/148450>\
**Category:** Uncategorized\
**Created:** [May 19, 2005, 10:42pm UTC](https://forum.kirupa.com/t/adding-load-bar-trouble/148450 "2005-05-19T22:42:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![disrupt3r](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@disrupt3r](https://forum.kirupa.com/u/disrupt3r)\
**Post date:** [May 19, 2005, 10:42pm UTC](https://forum.kirupa.com/t/adding-load-bar-trouble/148450/1 "2005-05-19T22:42:33Z")

</div>

hey guys, i think i posted this once before but i still havnt gotten a solution.  
basically what i want to achieve is a site like the “[color=black]Preloader[font=Verdana] and Transition for Dynamic Files” tutorial but where it says “loading” i want to replace with a loading bar. now i thought this would be pretty simple and straight forward but as hard as i try to make it work, it wont :([/font][/color]

this is my best guess so far in the ‘content’ actionscript

onClipEvent (enterFrame) {  
if (!loaded && this.\_url != \_root.\_url) {  
bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.transition.loadBar.\_width = getPercent_100;  
\_root.transition.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
loaded = true;  
\_root.transition.gotoAndPlay(“opening”);  
}  
}  
}

i thought that should work but it doesnt? can anyone help me out? ill really appreciate some help.

cheers, evan
