PDA

View Full Version : refer to main movie timeline from _level11


woodie63
09-12-2005, 02:02 PM
Hi
I have a movie(gallery2.swf) loaded into my main movie(main.swf) with:
loadMovie("gallery2.swf","_level11");

I want a nested button in gallery2.swf to give instructions to the main timeline of my main movie (main.swf) and then unload itself (the movie: gallery2.swf)
I can successfully unload itself with:
this._parent._parent._parent._parent.unloadMovie() ;

What I can't seem to do is access the main timeline of the main movie on level0 before I unload the movie.
I tried adding various extra "_parent." but it doesn't work.

Anyone have an idea that might help me please?

thanks

Peter

ultradeq
09-12-2005, 02:13 PM
try to access it with _level0, for example:


_level11.button_btn.onRelease = function() {
_level0.gotoAndPlay("frame");
}

Kazekage
09-12-2005, 02:16 PM
huh? :/ shouldn't _root. work??? :confused:

ultradeq
09-12-2005, 02:32 PM
No, because each movie has its own root.
in this case:
_level0 is the _root for main movie
_level11 is the _root for externally loaded gallery2.swf
when you call _root.gotoAndPlay("frame"); from button on _level11, you actually call _level11.gotoAndPlay("frame");

Kazekage
09-12-2005, 02:39 PM
oh ^_^ sry... didn't know that :( .. but thx now i do :)

woodie63
09-12-2005, 03:24 PM
THANKS ultradeq!
works like a charm..... :-)