2 Replies Latest reply on Aug 28, 2006 1:48 PM by Newsgroup_User

    goto frame in parent movie clip

    tloughlin_design
      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,
        • 1. Re: goto frame in parent movie clip
          Level 7
          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,
          >


          • 2. Re: goto frame in parent movie clip
            Level 7
            > 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."