Skip to content

setOrder()

Move an object to a different layer within the group.

group.setOrder(item, order)

Layers run from smallest to largest, where 0 is closest to the front. Does nothing if the object is not in the group.

Parameters

group.setOrder(item, order)
Parameter Type Default Description
item Drawable required The object to re-layer.
order int required The layer to move it to; 0 is closest to the front.