# Smooth Preloader?

**URL:** <https://forum.kirupa.com/t/smooth-preloader/196379>\
**Category:** flash\
**Created:** [August 7, 2006, 11:56pm UTC](https://forum.kirupa.com/t/smooth-preloader/196379 "2006-08-07T23:56:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fenomnon64](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@fenomnon64](https://forum.kirupa.com/u/fenomnon64)\
**Post date:** [August 7, 2006, 11:56pm UTC](https://forum.kirupa.com/t/smooth-preloader/196379/1 "2006-08-07T23:56:40Z")

</div>

Yo doods,  
quick question, some sites have nice, smooth loading preloaders, now is that code or the way it is built? I am asking this because my I built it with a simple line shape tween, but the animation is all jerky and sometimes just jumps frames cause the file isnt that big. is there a way to play it out nice and smooth? this is the code I am using:

* * *

onClipEvent (load) {  
totalBytes =\_root.getBytesTotal();  
}

onClipEvent (enterFrame) {  
loadedBytes =\_root.getBytesLoaded();  
percentLoaded = Math.round (loadedBytes/totalBytes\*100);  
gotoAndStop (percentLoaded);  
percentLoaded\_txt.text = percentLoaded;  
if (loadedBytes ==totalBytes) {  
\_root.gotoAndPlay (“start”);  
}  
}

* * *

:book:
