Table of Contents

Sprite:addChild

Available since version: Gideros 2011.6

Description:

Adds a sprite as a child to this sprite. The child is
added as a last child of this Sprite instance.
Sprites can have only one parent. Therefore if you add a child
object that already has a different sprite as a parent,
the sprite is removed from the child list of the other sprite
and then added to this sprite.

Syntax:

Sprite:addChild(child)

Parameters:

  • child: (Sprite) The child sprite to add.

See Also: