# Need preloader goto at 50 percent

**URL:** <https://forum.kirupa.com/t/need-preloader-goto-at-50-percent/242071>\
**Category:** Uncategorized\
**Created:** [October 22, 2007, 4:33am UTC](https://forum.kirupa.com/t/need-preloader-goto-at-50-percent/242071 "2007-10-22T04:33:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubework](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@cubework](https://forum.kirupa.com/u/cubework)\
**Post date:** [October 22, 2007, 4:33am UTC](https://forum.kirupa.com/t/need-preloader-goto-at-50-percent/242071/1 "2007-10-22T04:33:57Z")

</div>

I’m using a preloader with graphic load bar and percent text with the below script (found on this great site!). I have a large flash movie and I’d like to go to frame 3 at 50 percent bytes loaded (while the rest loads in background). I’ve tried a number of variables for 50 percent, but load bar continues to load and stops at frame 2. I’m new to flash script, any help would be greatly appreciated.

bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadBar.\_width = getPercent_200;  
this.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(3);  
}

Using Flash MX Version 6.  
Thank you very much.
