# Externaly loaded swf not preloading

**URL:** <https://forum.kirupa.com/t/externaly-loaded-swf-not-preloading/29239>\
**Category:** Uncategorized\
**Created:** [August 24, 2003, 6:52pm UTC](https://forum.kirupa.com/t/externaly-loaded-swf-not-preloading/29239 "2003-08-24T18:52:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![feral](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@feral](https://forum.kirupa.com/u/feral)\
**Post date:** [August 24, 2003, 6:52pm UTC](https://forum.kirupa.com/t/externaly-loaded-swf-not-preloading/29239/1 "2003-08-24T18:52:36Z")

</div>

Hey guys and gals,

I’m trying to load an external .swf file that is a preloader that loads another .swf. Yet the preloader just hangs when it’s loaded into the main swf and never loads up the specified .swf. Here’s my code

this is the button code:  
on (release) {  
\_root.gal1.removeMovieClip();  
createEmptyMovieClip(“mc1”, 5);  
loadMovie(“gal\_swf/cd\_rls\_pony\_3\_14\_03.swf”, mc1);  
}

and this is the preloader code

frame 1  
loadMovieNum(“cd\_rls\_pony\_3\_14\_03.swf”, 1);

frame 2  
if (\_level1.getBytesTotal() \> 0) {  
loaded = \_level1.getBytesLoaded();  
total = \_level1.getBytesTotal();  
percent = Math.round((loaded / total) \* 100);  
percentBar.gotoAndStop(percent);  
if (loaded == total) {  
\_level1.play();  
gotoAndStop(4);  
}  
}

frame 3  
gotoAndPlay(2);

I hope someone can figure this out cuz it’s driving me nuts! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2003, 1:53am UTC](https://forum.kirupa.com/t/externaly-loaded-swf-not-preloading/29239/2 "2003-08-28T01:53:29Z")

</div>

make another scene at the beginning of the whole movie you are loading and put the preloader in that first scene, and make it when the bytes loaded == bytes total gotoandplay next scene then it will preload when it is loaded in.

By making it gotoandplay next scene instead of “whatever”, 1 you can use the same frames of the preloader anywhere you want instead of writing it again…

does that help?
