Here's a problem that's probably been asked a million times, although I
haven't been able to find a good solution to my particular case yet.

I have a .swf file called Window.swf which contains an FScrollPane instance
and a TextField instance within it. In Window.swf, on the _root level, I
have defined a function called setContent, which inputs text into the
TextField and adjusts/refreshes the FScrollPane window accordingly.

For example, setContent( "hello world" ) would place "hello world" inside
the scroll pane. I have confirmed that this .swf file works exactly as it
should and appears to be totally bug-free.

Now, I want to be able to use this external .swf file with any number of
other movies, so that it will be like a generic dialog box for any data that
I wish to display.

For example, I have a file called Loader.swf, which contains the following
code in the first frame:

/***** START OF CODE *****/
var swf = "Window.swf";

this.loadMovie( swf );

this.setContent( "hello there" );
/***** END OF CODE *****/

This does not work at all, however. I thought that this would work because
my understanding is that loadMovie imports all the functions of the loaded
..swf into the target location, or something like that. I know that there are
issues that have to be considered, such as:

1. The external .swf file must be completely loaded before calling
2. I may need to create an empty movie clip and loadMovie into the empty
clip, e.g. tempClip.loadMovie(..)


However, I have tried fiddling with various preload schemes and empty clip
schemes, and even with the LocalConnection object, but I cannot get this to

Rather than supplying all the messy code that I've been trying and failing
at, I have omitted most of my code in the hope that someone will be able to
offer a cleaner, simpler solution to this.

Here are some relevant files:


Thanks to anyone who can take a crack at this!