8 Replies Latest reply on Feb 15, 2007 8:21 AM by SymTsb

    How do I play the next frame?

    rsnider5
      How do you play the next frame of a movie after you have stopped the previous frame.
        • 1. Re: How do I play the next frame?
          injpix Level 3
          You can use one of the following lines of code below. But it really depends on if you are executing one of those lines of code inside an object or not. So if that doesnt work post or explain more on what you are doing.
          • 2. Re: How do I play the next frame?
            Level 7
            > this.nextFrame();
            > this.gotoAndPlay(10);//goto and play frame 10
            > this.gotoAndStop(10);//goto and stop on frame 10

            Well stated, myIP. :)

            rsnider5, for additional detail on what you can do with a movie clip
            (including the main timeline), see the "MovieClip class" entry of the
            ActionScript 2.0 Language Reference. Classes define objects, and
            functionality is generaly split among three categories: properties
            (characteristics), methods (things the object can do), and events (things
            the object can react to).


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


            • 3. Re: How do I play the next frame?
              Level 7
              nextFrame()


              • 4. How do I play the next frame?
                ggshow Level 2
                How do you play the next frame of a movie after you have stopped the previous frame.

                gotoAndPlay(this._currentframe+1);
                • 5. Re: How do I play the next frame?
                  SymTsb Level 2
                  quote:

                  Originally posted by: ggshow
                  How do you play the next frame of a movie after you have stopped the previous frame.

                  gotoAndPlay(this._currentframe+1);



                  The topic simply asks "play the next frame" and therefore, nextFrame() is more correct. He never asked for the movie to play from that point. only to play the next frame.

                  • 6. Re: How do I play the next frame?
                    rsnider5 Level 1
                    Thanks for your help. I am trying to have a box fade in for 30 frames. I want it to stop and stay on the screen and then I want take to move into postion on the box. Does this make sense? I can make the box stop after fading in, but it will not advance to the next transition that I am trying to do.
                    • 7. Re: How do I play the next frame?
                      Level 7
                      rsnider5,

                      > I am trying to have a box fade in for 30 frames. I want it to stop
                      > and stay on the screen and then I want take to move into postion
                      > on the box. Does this make sense?

                      Sorry, that doesn't give me enough detail to visualize what you're
                      after.

                      > I can make the box stop after fading in, but it will not advance to
                      > the next transition that I am trying to do.

                      When you stop the playhead in its course along a timeline, it sits there
                      waiting. You've issued a stop() function or MovieClip.stop() method on a
                      given timeline. The timeline has obeyed. If you want to now issue a
                      nextFrame() or play() ... you'll need to base it on something. Maybe user
                      input, like a button click? Maybe a timer? If so, see setInterval().


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


                      • 8. Re: How do I play the next frame?
                        SymTsb Level 2
                        There's no good way to do this really. Have your animation play it's 30 frame cycle. In frame 30 where you issue the stop command, you're going to want to start a timer done using setInterval. Have the timer count down the necessary number of seconds and then simply destroy the interval and issue a play command back to the timeline. This is probably the simplest method of doing this with AS. The even easier method is to simply take out the stop method and plant empty frames in between the two different tween states (fade in / zoom in). Hope this helps somewhat.