InsertLayer -- insert a new layer (V1.5)
InsertLayer(pos, type, id, x, y[, hidden])
This function inserts a new layer of the object type specified by type and the object id specified by id into layer position pos. All the following layers will be moved downwards and therefore they will get a new id. The new layer will also be displayed at the position specified by x and y. If you specify 0 as pos, the layer will be inserted as the last layer.

The following object types are currently supported:

Inserts the brush specified by id at x, y

Inserts the text object specified by id at x, y

Inserts the anim specified by id at x, y (V2.0)

Inserts the video specified by id at x, y (V6.0)

Starting with Hollywood 1.9 you can specify the optional argument hidden, which will insert a hidden layer which you can bring to front using ShowLayer() or ShowLayerFX().

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

desired position for the layer or 0 for last layer
type of the object to be inserted (see list above)
identifier of the object to be inserted
x-position for the new layer
y-position for the new layer
optional: True if the layer shall be hidden (defaults to False) (V1.9)
Box(0, 0, 100, 100, #RED)
Circle(#CENTER, #CENTER, 50, #BLUE)
TextOut(#RIGHT, #BOTTOM, "Hello World")
InsertLayer(1, #BRUSH, 1, #CENTER, #CENTER)
The code above inserts brush 1 as the first layer. This means that all the other layers will be re-positioned. The red rectangle will get layer position 2 now (was layer 1), the blue circle will be layer 3 (was layer 2) and the "Hello World" text will be layer 4 (was layer 3).

Show TOC