# Why does my preloader freeze?

**URL:** https://forum.kirupa.com/t/why-does-my-preloader-freeze/31273
**Category:** flash
**Created:** [September 20, 2003, 2:28pm UTC](https://forum.kirupa.com/t/why-does-my-preloader-freeze/31273 "2003-09-20T14:28:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![COVERFIRE](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@COVERFIRE](https://forum.kirupa.com/u/COVERFIRE)
#### Post date: [September 20, 2003, 2:28pm UTC](https://forum.kirupa.com/t/why-does-my-preloader-freeze/31273/1 "2003-09-20T14:28:19Z")

</div>

[AS]bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadText = Math.round(getPercent\*100)+"%";  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndStop(2);  
}[/AS]

What’s wrong with my code? The percent thing works but it freezes on a random number between 1 and 100 and then it never goes to frame 2.
