Skip to main content
August 28, 2006
Question

goto frame in parent movie clip

  • August 28, 2006
  • 2 replies
  • 353 views
I have a movie clip nested with in another movie clip. I was wonder how i would do a on (release) gotoAndPlay command that would be able to take me to a frame in the parent movie clip. How do i jump back the parent movie clips timeline?

thanks,
This topic has been closed for replies.

2 replies

Inspiring
August 28, 2006
> myChildBtn.onRelease=function(){
> myParent.gotoAndPlay(frame);
> }

This could certainly do it, but it requires that myParent is a correct
reference to the myChildBtn instance's parent. If myChildBtn is either a
Button or MovieClip instance, yuo have merely to use the Button._parent or
MovieClip._parent property (see the respective class entry for each object
in the ActionScript 2.0 Language Reference -- that is, look up "Button
class" or "MovieClip class").

myChildBtn.onRelease=function(){
this._parent.gotoAndPlay(frame);
}

... where frame, of course, refers to a number or frame label.


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."


Inspiring
August 28, 2006
myChildBtn.onRelease=function(){
myParent.gotoAndPlay(frame);
}


--

Dan Mode
--> Adobe Community Expert
*Flash Helps* http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio* http://www.tornadostream.com
*Must Read* http://www.smithmediafusion.com/blog


"tloughlin design" <webforumsuser@macromedia.com> wrote in message
news:ecvf7u$4o0$1@forums.macromedia.com...
>I have a movie clip nested with in another movie clip. I was wonder how i
> would do a on (release) gotoAndPlay command that would be able to take me
> to a
> frame in the parent movie clip. How do i jump back the parent movie clips
> timeline?
>
> thanks,
>