Name
MoveLayer -- move layer to a new position (V1.9)
Synopsis
MoveLayer(id, xa, ya, xb, yb[, table])
MoveLayer(id, x, y) (V9.1)
Function
This function can be used to either scroll the layer specified by id to a new position or simply move it to a new position without scrolling.

If you pass the xa, ya, xb and yb arguments, MoveLayer() will scroll the layer specified by id softly from the position specified by xa and ya to the position specified by xb and yb. Further configuration options are possible using the optional argument table. You can specify the move speed, special effect, and whether or not the move shall be asynchronous. See MoveBrush for more information on the optional table argument.

If you just pass the x and y arguments, MoveLayer() will simply move the layer to the position specified by x and y. In that case, id can also be the name of a layer group.

For all coordinates you can specify the special constant #USELAYERPOSITION. Hollywood will use the current position of the layer then.

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

Inputs
id
id or name of the layer to use
xa
source x position
ya
source y position
xb
destination x position
yb
destination y position
table
optional: further configuration for this move
Example
MoveLayer(5, #LEFTOUT, #CENTER, #RIGHTOUT, #CENTER)
Scrolls layer 5 from the outside left to the outside right of the display and centers it vertically.


MoveLayer(4, #USELAYERPOSITION, #USELAYERPOSITION, #LEFTOUT, #CENTER)
Scrolls layer 4 from its current position out of the screen.


MoveLayer(5, #CENTER, #CENTER)
Moves layer 5 to the screen center.

Show TOC