Difference between revisions of "Sprite:addChildAt"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
+ | '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate><br /> | <translate><br /> |
Revision as of 09:28, 24 August 2018
Available since: Gideros 2011.6
Class: Sprite
Description
Adds a sprite as a child to this sprite. The child is
added at the index position specified. Indices start from 1.
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.
Sprite:addChildAt(child,index)
Parameters
child: (Sprite) The child sprite to add.
index: (number) The index position to which the child is added.