# Preloader Problems... for the umpteenth time

**URL:** <https://forum.kirupa.com/t/preloader-problems-for-the-umpteenth-time/213238>\
**Category:** Uncategorized\
**Created:** [January 18, 2007, 12:03am UTC](https://forum.kirupa.com/t/preloader-problems-for-the-umpteenth-time/213238 "2007-01-18T00:03:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vexir](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vexir](https://forum.kirupa.com/u/Vexir)\
**Post date:** [January 18, 2007, 12:03am UTC](https://forum.kirupa.com/t/preloader-problems-for-the-umpteenth-time/213238/1 "2007-01-18T00:03:14Z")

</div>

I just can’t seem to get preloaders right in flash. I wish there was a one-size-fits-all-preloader-solution… for instance when you need to play an animation while a movie is loading. Sounds simple but I guess I’m stupid.

Anyway, I have a movieclip which in and of itself has an animation, from frames 1 to 100. I then put this code on the movieclip itself:

onClipEvent(enterFrame) {  
loadedbytes=getBytesLoaded();  
totalbytes=getBytesTotal();  
percentloaded = int(loadedbytes/(totalbytes/100));  
if (loadedbytes == totalbytes) {  
nextScene();  
}  
else {  
loader\_mc.gotoAndStop(percentloaded);  
}  
}

So why does it not work and decide to look like its going to give you a seizure? (it just keeps flickering really fast and shows both the loader movieclip and the content of the next scene…) the movieclip doesnt ever go through the animation.
