Name

nextFrame( ) Global Function — advance a movie or movie clip’s playhead one frame and stop it

Availability

Flash 2 and later

Synopsis

nextFrame( )

Description

The nextFrame( ) function moves the playhead of the current timeline ahead one frame and stops it there. The “current timeline” is the timeline from which the nextFrame( ) function is invoked. The nextFrame( ) function is synonymous with gotoAndStop(_currentFrame + 1);. If invoked on the last frame of a timeline, nextFrame( ) simply stops the playhead on that frame unless another scene follows the current scene, in which case nextFrame( ) moves the playhead to frame 1 of the next scene.

See Also

gotoAndStop( ), MovieClip.nextFrame( ), nextScene( ), prevFrame( )

Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.