Name
SetSpriteZPos -- change the z-position of a layer (V7.0)
Synopsis
SetSpriteZPos(id, zpos)
Function
This command can be used to change a sprite's z-position. The z-position of a sprite is its position in the hierarchy of sprites. The first (i.e. backmost) sprite has a z-position of 1, the last (i.e. frontmost) sprite's z-position is equal to the number of sprites currently present. You need to pass the new desired z-position for the specified sprite to this function. The sprite will then assume exactly this z-position, existing sprites that are on or after this z-position will be shifted down. To move a sprite all the way to the front (i.e. highest z-position), you can pass the special value 0 for the zpos argument. To move a sprite all the way to the back, specify 1 in the zpos argument.

Inputs
id
identifier of the sprite whose z position shall be changed
zpos
new z position for the sprite or 0 to move the sprite to the highest z position

Show TOC