| Package | com.rubenswieringa.utils |
| Class | public class ChildTool |
| Method | Defined by | ||
|---|---|---|---|
|
moveChild(child:DisplayObject, container:DisplayObjectContainer, index:int = -1):void
[static]
Removes a DisplayObject from its parent and adds it to a new parent at a certain index (if provided).
| ChildTool | ||
|
swapChildren(child1:DisplayObject, child2:DisplayObject):void
[static]
Moves child1 to child2 its place and the other way around.
| ChildTool | ||
| moveChild | () | method |
public static function moveChild(child:DisplayObject, container:DisplayObjectContainer, index:int = -1):voidRemoves a DisplayObject from its parent and adds it to a new parent at a certain index (if provided).
Parameterschild:DisplayObject — DisplayObject to move.
|
|
container:DisplayObjectContainer — New parent for child.
|
|
index:int (default = -1) — Index at which to add child to container.
|
| swapChildren | () | method |
public static function swapChildren(child1:DisplayObject, child2:DisplayObject):voidMoves child1 to child2 its place and the other way around.
Parameterschild1:DisplayObject — DisplayObject to move to child2's place.
|
|
child2:DisplayObject — DisplayObject to move to child1's place.
|