# Preloader for External SWFs -with fade in and out?

**URL:** <https://forum.kirupa.com/t/preloader-for-external-swfs-with-fade-in-and-out/237434>\
**Category:** Uncategorized\
**Created:** [August 30, 2007, 10:43am UTC](https://forum.kirupa.com/t/preloader-for-external-swfs-with-fade-in-and-out/237434 "2007-08-30T10:43:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpixel](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jpixel](https://forum.kirupa.com/u/jpixel)\
**Post date:** [August 30, 2007, 10:43am UTC](https://forum.kirupa.com/t/preloader-for-external-swfs-with-fade-in-and-out/237434/1 "2007-08-30T10:43:14Z")

</div>

I got this simple code (frame 1):

siteLoader.loadMovie(“[http://www.mycoolsite.com/mysite.swf](http://www.mycoolsite.com/mysite.swf)”);  
loadingBar.\_xscale = 1;  
loadingBar.onEnterFrame = function() {  
kBytesLoaded = this.\_parent.siteLoader.getBytesLoaded() / 1024;  
kBytesTotal = this.\_parent.siteLoader.getBytesTotal() / 1024;  
percentage = Math.round(kBytesLoaded / kBytesTotal \* 100);  
this.\_xscale = percentage;  
if (percentage == 99) {  
delete this.onEnterFrame;  
}  
}

What I need in addition to this cool loader bar is a way to also make the sections have a fade in/out animation so it doesn’t just pop-up…I know there is a tutorial on kirupa, but it doesn’t have a loader bar, which I need…any ideas?

Thanks in advance

Jpixels
