# Preloader, PLEASE HELP

**URL:** <https://forum.kirupa.com/t/preloader-please-help/134>\
**Category:** Uncategorized\
**Created:** [July 6, 2002, 2:35pm UTC](https://forum.kirupa.com/t/preloader-please-help/134 "2002-07-06T14:35:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceman](https://avatars.discourse-cdn.com/v4/letter/i/46a35a/32.png) [@iceman](https://forum.kirupa.com/u/iceman)\
**Post date:** [July 6, 2002, 2:35pm UTC](https://forum.kirupa.com/t/preloader-please-help/134/1 "2002-07-06T14:35:58Z")

</div>

I can never figure out why these things don’t work, this is my code and to me in theory this should work.

onClipEvent (enterFrame) {  
totalBytes = \_root.getBytesTotal;  
loadedBytes = \_root.getBytesLoaded;  
remainingBytes = totalBytes-loadedBytes;  
if (loadedBytes \< totalBytes && loadedBytes \>=0) {  
loaded = int((loadedBytes/totalBytes)\*100);  
\_root.preloaderbar.\_xscale = loaded;  
} else if (loadedBytes == totalBytes) {  
\_root.gotoAndPlay(“begin”);  
}  
}  
Can someone please help me with this because I can’t figure it out.

preloaders are :evil:

Kyle
