# (FMX) Please Help me with preloader code for ext. swf

**URL:** <https://forum.kirupa.com/t/fmx-please-help-me-with-preloader-code-for-ext-swf/96208>\
**Category:** Uncategorized\
**Created:** [December 6, 2003, 3:37am UTC](https://forum.kirupa.com/t/fmx-please-help-me-with-preloader-code-for-ext-swf/96208 "2003-12-06T03:37:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbeas](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dbeas](https://forum.kirupa.com/u/dbeas)\
**Post date:** [December 6, 2003, 3:37am UTC](https://forum.kirupa.com/t/fmx-please-help-me-with-preloader-code-for-ext-swf/96208/1 "2003-12-06T03:37:51Z")

</div>

I’m going to try to explain this as easy as possible, so that hopefully I get an easy answer back. I’m about to pull my hair out with this one!!

In my flash site I have one main swf that is preloaded using:

```auto

onClipEvent (enterFrame) {
        framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
        gotoAndStop (framesLoaded);
        info.text = framesLoaded + "% completed";
        if (framesLoaded >= 100) {
                _root.gotoAndPlay (2);
        }
}

```

Works great, main swf preloads, then begins to play. On frame 5 it calls my external swf using:

```auto

_root.createEmptyMovieClip("container", 1);
loadMovie("externalmovie.swf", "container");
setProperty ("container", _alpha, "45");
container._x = 64 ;
container._y = 135 ;

```

This also works fine! It calls the external swf dirctly onto level 1 of the main swf at the location and alpha specified.

THE PROBLEM: I need this external swf to preload! I want to use the exact same method as the code I used for the main preloader, but it conflicts…being that it uses \_root, \_parent??? However, being new to actionscript, I have no idea what “paths” need to be changed to make this work and not conflict. Thanks…:h:
