2 Replies Latest reply on Nov 19, 2008 6:02 AM by logeye

    gotoAndPlay

    Vmlweb Level 1
      Hi,

      I've been looking at
      gotoAndPlay
      gotoAndStop
      Play();

      and I wondered if there is a way I could play my movie clip in reverse

      so the oposite of menu_dropdown.play();
        • 1. gotoAndPlay
          Ned Murphy Adobe Community Professional & MVP
          One approach is to have a 'mover' movieclip that has just two frames and gets sent to the second frame when you want to reverse the movie... the second frame has this code:

          stop();
          this.onEnterFrame = function(){
          _parent.menu_dropdown.prevFrame();
          if( _parent.menu_dropdown.._currentframe == 1){
          this.gotoAndStop(1);
          }
          }

          the first frame of this mover just has a stop();

          You may have to adjust the path reference (_parent.menu_dropdown) to agree with where you plant the mover.

          I haven't tried this exact approach (prevFrame is a recent discovery for me), but it's similar to what I have done otherwise using gotoAndStop(_currentframe-1).
          • 2. Re: gotoAndPlay
            logeye
            or try kglad's code which is similar

            btn.onPress=function(){
            mc.onEnterFrame=function(){
            this.prevFrame();
            if(this._currentframe==1){
            delete this.onEnterFrame;
            }
            }
            }