Hi,
I am trying to load an external movie (say movie B) into a movieclip object in movie A. Is it possible to navigate (ie loading and unloading movies) in movie A from the buttons created in movie B?
Thanks in advance.
Joe
_root wont work from a movie loaded on another level! In that case you have to use _level0, otherwise you'll target the root level of the loaded movie itself on that other level.
_root will only work from within container clips, but _level0 will work in both situations, so you should recommend using _level0 rather than _root, unless you're actually targeting the root level of a loaded movie on another level!
//Or if clip is in Library (easier)
this.attachMovie("testSymbol","clipholderB",level+ +,{controller:this})
//now you can acces clipholderB bij its controller who is his parent
trace(this.clipholderB.controller._name)
Just one more thing I need to make sure, when I use attachmovie to load a menu (a movie clip from the library) into a empty movieclip. How do I use the newly loaded menu to navigate at _level0?
Eg. Menu in the library = MovProductsMenu and the movie clip that the menu is loaded into = contents,
To attach the menu when a button (Products) is pressed, I wrote:
Products.onPress = function() {
attachMovie( MovProductsMenu, "MovProductsMenu", 2 );
contents.attachMovie("MovProductsMenu", "ProductsMenu",2);
};
Then when a button (Button1) inside the loaded menu is pressed:
_level0.contents.MovProductsMenu.Button1.onPress = function() {
loadMovie("swf/pic1.swf", "_level0.contents");
};
This doesn't seem to work. Please help.
try to get rid of those solid navigations...
and work more with small functions in the movieclips itself it makes the code alot easier. in the library only a square and a clip called button2
make sure that youve got the '' and "" right
see the fla.
// button on stage named button and a dynamic textfield named textfield