Lingo Dictionary > O-R > rewind sprite |  |

rewind sprite

Syntax

    sprite(whichFlashOrGIFAnimSprite).rewind()
    rewind sprite whichFlashOrGIFAnimSprite

Description

Command; returns a Flash or animated GIF movie sprite to frame 1 when the sprite is stopped or when it is playing.

Example

This frame script checks whether the Flash movie sprite in the sprite the behavior was placed in is playing and, if so, continues to loop in the current frame. When the movie is finished, the sprite rewinds the movie (so the first frame of the movie appears on the Stage) and lets the playback head continue to the next frame.

    property spriteNum

    on exitFrame
    	if sprite(spriteNum).playing then
    		go the frame
    	else
    		sprite(spriteNum).rewind()
    		updateStage
    	end if
    end