method addChild

bool addChild(box child,string type);

Argumente

Zurückgegebener Wert

This method adds a box as a child of this box using the method specified by type. Available values for type are listed below:

function ReparentBox(box, newParent)
{
    if (box && newParent)
    {
        var oldParent = box.parent;
        oldParent.removeChild(box);
        newParent.addChild(box);
    }
}