# Preloader... what stops it loading rest of frames?

**URL:** <https://forum.kirupa.com/t/preloader-what-stops-it-loading-rest-of-frames/207002>\
**Category:** flash\
**Created:** [November 13, 2006, 11:48pm UTC](https://forum.kirupa.com/t/preloader-what-stops-it-loading-rest-of-frames/207002 "2006-11-13T23:48:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdd](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bdd](https://forum.kirupa.com/u/bdd)\
**Post date:** [November 13, 2006, 11:48pm UTC](https://forum.kirupa.com/t/preloader-what-stops-it-loading-rest-of-frames/207002/1 "2006-11-13T23:48:03Z")

</div>

Hi everyone…

I was curious how exactly this works… See below for actionscript i use… i put it in the frames before my animation… but how does it load the first few frames ie. loading bar etc… and then load the rest of the flash almost seperately?

FRAME1:  
totalBytes = Math.round(getBytesTotal() / 1024);  
loadedBytes = Math.round(getBytesLoaded() / 1024);  
percentDone = Math.round((loadedBytes / totalBytes) \* 100);  
if (\_root.\_framesloaded\>= \_root.\_totalframes) {  
gotoAndPlay(“start”);  
}

FRAME2:  
gotoAndPlay(1);

PRELOADER BAR:  
onClipEvent (enterFrame) {  
\_xscale = \_root.percentDone;  
}
