Name
NextFrame -- display a new frame of an anim layer (V2.0)
Synopsis
NextFrame(id[, x, y, frame])
Function
This function displays a new frame of an anim layer. If you omit the optional frame argument or set it to 0, NextFrame() will show the next frame of the anim layer. If you pass -1 in the frame argument, the last frame will be displayed. The x and y arguments can be used to move the layer to a new position while changing the frame. If you do not need them, pass #USELAYERPOSITION which will keep the layer where it is.

Starting with Hollywood 9.0, this function can also be used with text layers that are in list mode to show the next list items. See TextOut for details.

You need to enable layers before you can use this function. See Layers introduction for details.

Inputs
id
identifier or name of the anim layer
x
optional: new x-position for the layer (defaults to #USELAYERPOSITION)
y
optional: new y-position for the layer (defaults to #USELAYERPOSITON)
frame
optional: which frame to show (defaults to 0 which means that the next frame shall be shown)
Example
EnableLayers
InsertLayer(1, #ANIM, 1, 0, #CENTER)
For k = 0 To 400 Step 3
   NextFrame(1, k, #USELAYERPOSITION)
   Wait(5)
Next
Plays the anim number 1 while moving it from x-position 0 to 400.

Show TOC