# Preloader and external SWF---not clear on how

**URL:** <https://forum.kirupa.com/t/preloader-and-external-swf-not-clear-on-how/123127>\
**Category:** Uncategorized\
**Created:** [September 20, 2004, 8:49pm UTC](https://forum.kirupa.com/t/preloader-and-external-swf-not-clear-on-how/123127 "2004-09-20T20:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameramano](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@cameramano](https://forum.kirupa.com/u/cameramano)\
**Post date:** [September 20, 2004, 8:49pm UTC](https://forum.kirupa.com/t/preloader-and-external-swf-not-clear-on-how/123127/1 "2004-09-20T20:49:46Z")

</div>

Ok… so I’ve spent the day trying to figure out how to get my preloader to work on external SWF’s. I can’t put the preloader on the SWF because I want to make a “generic” preloader that is easy for my co-workers to use. Having read several, several threads, I tried putting the SWF in a level, then refering the preloader to that level. No luck there. The preloader won’t sense it… or maybe the movie won’t go back to the preloader… I don’t know.

Frame 1:  
onClipEvent (load){  
totalwidth = getProperty(\_root.loadbar,\_width);  
widthfactor=(totalwidth/100);  
}  
onClipEvent (enterFrame){  
var total= level10.getBytesTotal();  
var loadedup= level10.getBytesLoaded();  
trace (total);  
if (loadedup==total){  
\_root.gotoAndPlay(2);  
}else{  
gotoAndStop(1);  
percent=Math.round ((loadedup/total)_100);  
\_root.loadbar.\_width=(widthfactor_percent);  
output\_txt=“loading(” + percent + “%” + “)”;  
}  
}

Frame 2:

stop();  
loadMovieNum (“GenInfoGame2.swf”,10);

The movie loads fine (just no preloader).  
The preloader works fine with the appropriate modifications for a normal image on frame 2.

I know the problem is with references… but I don’t know how to fix it. Anyone out there (Lunatic???) 😉
