# Preloader took sometime to appear

**URL:** <https://forum.kirupa.com/t/preloader-took-sometime-to-appear/284777>\
**Category:** flash\
**Created:** [March 23, 2009, 4:09pm UTC](https://forum.kirupa.com/t/preloader-took-sometime-to-appear/284777 "2009-03-23T16:09:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bahadius](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Bahadius](https://forum.kirupa.com/u/Bahadius)\
**Post date:** [March 23, 2009, 4:09pm UTC](https://forum.kirupa.com/t/preloader-took-sometime-to-appear/284777/1 "2009-03-23T16:09:54Z")

</div>

Hi guys ,

i seem to encounter some problems on preloader when i place it into my swf.file. It took some time before the preloader appear then it loads , anyone know what’s the problem? i place the preloader on the first frame then the rest of the information is on the 2nd frame. The preloader image is just a vector image with animation of it being loaded

this is the actionscript i place in the first frame :

onClipEvent (load) {  
total = \_root.getBytesTotal();  
}  
onClipEvent (enterFrame) {  
loaded = \_root.getBytesLoaded();  
percent = int(loaded/total\*100);  
text = percent+"%";  
gotoAndStop(percent);  
if (loaded == total) {  
\_root.gotoAndPlay(2);  
}  
}
