# Preloading external swf's problem

**URL:** https://forum.kirupa.com/t/preloading-external-swfs-problem/294303
**Category:** flash
**Created:** [August 12, 2009, 8:19am UTC](https://forum.kirupa.com/t/preloading-external-swfs-problem/294303 "2009-08-12T08:19:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rosa1](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rosa1](https://forum.kirupa.com/u/Rosa1)
#### Post date: [August 12, 2009, 8:19am UTC](https://forum.kirupa.com/t/preloading-external-swfs-problem/294303/1 "2009-08-12T08:19:43Z")

</div>

I’ve been struggling with this for few days now, but can’t seem to find an answer. Tried the search- option but couldn’t find the answer I was looking for. I’ve done nothing but followed the tutorials from [Kirupa.com](http://Kirupa.com), so maybe you guys could help.

I competed the “Creating a full flash site” tutorial found here at Kirupa.  
[http://www.kirupa.com/developer/mx/full\_site.htm](http://www.kirupa.com/forum/../developer/mx/full_site.htm)

I now have an external swf file that loads into a movieclip of another swf, works fine.Then I added a preloader to each external movie clip following a tutorial also found in this site:  
[http://www.kirupa.com/developer/mx/preloader.htm](http://www.kirupa.com/forum/../developer/mx/preloader.htm)

Preloaders work fine when viewing the external .swf’s seperately, but when I load them through “Parent” .swf my preloader only shows “Loaded” text for 3-4 seconds, without any loading process, and after that the external .swf loads.

Here’s the code:

onClipEvent (enterFrame) {  
var bytes = \_root.getBytesTotal();  
var bytes\_loaded = \_root.getBytesLoaded();  
if (bytes\_loaded == bytes) {  
\_root.gotoAndPlay(2);  
this.kirupatxt = “movie loaded”;  
} else {  
\_root.gotoAndStop(1);  
this.kirupatxt = “loading (” + bytes\_loaded + “/” + bytes +")";

```
}

```

}

Can’t figure out what’s wrong. Has it got something to do with \_root and \_parent? I’m not so good with Flash yet. :emb:
