views:

182

answers:

2

I have a Flash project (main.swf) that opens another .swf inside it via a button press:

my_btn.onRelease = function() {
    loadMovie("otherFile.swf", "_level1");
};

How do I get otherFile.swf to alter variables within main.swf?

I'm using Flash Player 10 and ActionScript 2.0

A: 

I think you may be looking for fscommand. That may do what you need.

http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary372.html

Cruinh
+1  A: 

First off, do not use levels. Instead, load into a movieclip. If you must use levels, your main SWF is in _level0.

If you load into a movieclip you can think of the loaded SWF as just being the content of that movieclip, so if, in the loaded clip, you refer to _parent then you are talking to the parent of the container movieclip.

Branden Hall
Great idea, thanks!
Matt S