object:setFrame()

Type Function
Object SpriteObject
Library display.*
Return value none
Revision 2017.3060
Keywords sprite, setFrame
See also display.newSprite()

Overview

Sets the frame in the currently loaded sequence.

Syntax

object:setFrame( frameIndex )
frameIndex (required)

Number. The frame index in the currently loaded sequence you want to be shown. In a sprite sequence, 1 indicates the first frame (not 0).