# Preloader problem

**URL:** <https://forum.kirupa.com/t/preloader-problem/215496>\
**Category:** Uncategorized\
**Created:** [February 7, 2007, 6:47pm UTC](https://forum.kirupa.com/t/preloader-problem/215496 "2007-02-07T18:47:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![visions](https://avatars.discourse-cdn.com/v4/letter/v/74df32/32.png) [@visions](https://forum.kirupa.com/u/visions)\
**Post date:** [February 7, 2007, 6:47pm UTC](https://forum.kirupa.com/t/preloader-problem/215496/1 "2007-02-07T18:47:37Z")

</div>

hi, not sure if this is the best way to have a preloader. I put this on frame 1 and on frame 2 i have a gotoAndPlay(1);

is it best to have the thi.getBytesLoaded() so that way i can use this for any new movie?

thanks 🙂

bytes\_loaded = Math.round(this.getBytesLoaded());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_100;  
percentage\_txt.text = Math.round(getPercent_100)+"%";  
if (bytes\_loaded \>= bytes\_total)  
{  
trace(“loaded”);  
nextScene();  
}
