Passing Arrays Between Movies

I have a SWF movie (“bits.swf”) with an array (“things”) variable in it.

I use loadMovie to load bits.swf into my main movie.

Q: how can I read/use/transfer the values in array “things” from my main movie?

Thanks!

Define an array in the loaded movie and populate it from from the holder movie.
If you’ve loaded into a level the syntax will be something like myNewArray=_level0.myOldArray.slice()
If you’ve loaded into a movie clip instance the syntax will be something like myNewArray=_root.myOldArray.slice()

I need to do the opposite, though: define an array in the holder movie and populate it from the loaded movie (in this case, “bits.swf”).

Is there any way of doing that?

Either:

A
Call the loaded array from the loader timeline:
myLoaderArray=_level1.myLoadedArray.slice();
myLoaderArray=instanceName.myArray.slice();

or

B
Throw the loaded array at the loader timeline when it has loaded
i.e. put this in the first frame of “bits.swf”
_level0.myLoaderArray=myLoadedArray.slice();
_root.myLoaderArray=myLoadedArray.slice();

Option B is the more reliable as the swf has definitely loaded and instantiated before the code executes. If you’re using option A check that bits.swf has fully loaded before you attempt to reference its properties

It’s working now - thanks for all your help, JSK!