Variables from external swf

How do I call change the value of variables from an external swf. For example, in index.swf, i load the movie external.swf. External.swf has a variable ‘holder’. How do i change the value of holder from actionscript of my index.swf?

Help anybody? Thanks

If you put _root. in front of the variable, the main movie will be able to change it by putting _root. in front of the variable too. When a movieclip is loaded into another they share _root. See this thread for more information.

Coz I’m having a problem with the fake window I made. It has a close button but the problem is I dont know where to put the actionscipting for the button.
Say for example:

index.swf creates an empty movieclip ‘holder’.
in ‘holder’ mc, childswf.swf is loaded which has a close button named ‘close’, then i want to close(unload) childswf.swf.

How do I call ‘close’ button? And where should I put it, in timeline of index.swf or in timeline of childswf.swf?

So you have a fake window with a close button on it, in an external swf, right ? Place this code on the button ‘close’ in childswf:

[AS]
on(release){
_root.holder.unloadMovie();
}
[/AS]

That should work. For more info about the unloadMovie command, see this page

If holder is not on the main timeline the path to it in the actionscripting will have to change accordingly.

Thanks it worked!