I have a movie loaded in level 1, which then loads a second movie in level 2.
My desire is that when you click a button on level 2, that movie unloads
itself and then goes to and stops at a particular frame on the level 1 movie. I
am unable to find a way to do this.
My basic attempt was to put this script in the button code:
on (release) {
unloadMovie(2);
gotoandStop(145);
}
Rob Dillon - 23 Oct 2008 00:38 GMT
When you loaded the .swf, you loaded it into a target movieClip. To unload that
same .swf, you'll need to reference the same target movieClip. So, if you want
to unload a movie from itself, you'll have to use something like:
unloadMovie(_parent.clipName);
If you want the root level movie to move its playback head, you can do that in
much the same way. You should do this first, because if you unload the movie,
it can't then tell the parent's parent to do something. The code might look
something like this:
on(release) {
_parent._parent.gotoAndStop(145);
unloadMovie(_parent.clipName);
}