# Preloader in external swf not working

**URL:** https://forum.kirupa.com/t/preloader-in-external-swf-not-working/135731
**Category:** Uncategorized
**Created:** [January 29, 2005, 9:02pm UTC](https://forum.kirupa.com/t/preloader-in-external-swf-not-working/135731 "2005-01-29T21:02:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![banzai](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@banzai](https://forum.kirupa.com/u/banzai)
#### Post date: [January 29, 2005, 9:02pm UTC](https://forum.kirupa.com/t/preloader-in-external-swf-not-working/135731/1 "2005-01-29T21:02:51Z")

</div>

I have a preloader in an swf which runs properly when previewed directly from flash…however when I load the swf through my main movie it just stalls at frame 1. Take away the preloader and the swf loads just fine.  
I would like to keep the preloader in the external swf because my main movie is too complicated already.

This is the preloader script I’m using  
bytes\_loaded = Math.round(\_root.getBytesLoaded());  
bytes\_total = Math.round(\_root.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_200;  
\_root.loadText = "loading "+Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
\_root.gotoAndStop(3);  
}

frame 2 returns to frame 1 - frame 3 is where my movie begins

Any suggestions?
