# Preloader for external swf load

**URL:** https://forum.kirupa.com/t/preloader-for-external-swf-load/288145
**Category:** flash
**Created:** [May 11, 2009, 9:52pm UTC](https://forum.kirupa.com/t/preloader-for-external-swf-load/288145 "2009-05-11T21:52:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![goalpost95](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@goalpost95](https://forum.kirupa.com/u/goalpost95)
#### Post date: [May 11, 2009, 9:52pm UTC](https://forum.kirupa.com/t/preloader-for-external-swf-load/288145/1 "2009-05-11T21:52:13Z")

</div>

I have my main swf file and two external swf files i’m trying to load into the main one. I have preloaders for each external swf file but when I have the main swf file it won’t load the preloaders it seems to be loading the entire thing and then showing the swf. How do i change that to showing the preloaders i already have?

here is my code at the beginning on each external swf, I don’t know that much about actionscript so any help would be greatly appreciated.

stop();  
myBar.\_width=0;  
preloadI=setInterval(preloadF,100);

function preloadF(){

fractionLoaded = getBytesLoaded()/getBytesTotal();  
myBar.\_width = fractionLoaded_212; // i’m not sure about that 408, but you can check that.  
myText = Math.round(fractionLoaded_100)+"%";

if (getBytesLoaded() == getBytesTotal()) {  
clearInterval(preloadI);  
gotoAndPlay(3);  
}

}

here is the code to call and load the external swf

myContainer.loadMovie(“rambovid.swf”);
