User Guide

Tree component (Flash Professional only) 775
Usage
Usage 1:
myTree.addTreeNode(label [, data])
Usage 2:
myTree.addTreeNode(child)
Parameters
label
A string that displays the node, or an object with a label field (or whatever label field
name is specified by the
labelField property).
data An object of any type that is associated with the node. This parameter is optional.
child Any XMLNode object.
Returns
The added XML node.
Description
Method; adds a child node to the tree. The node is constructed either from the information
supplied in the
label and data parameters (Usage 1), or from the prebuilt child node, which
is an XMLNode object (Usage 2). Adding a preexisting node removes the node from its
previous location.
Calling this method refreshes the view.
Example
The following code adds a new node to the root of myTree. The second line of code moves a node
from the root of
mySecondTree to the root of myTree.
myTree.addTreeNode("Inbox", 3);
myTree.addTreeNode(mySecondTree.getTreeNodeAt(3));
Tree.addTreeNodeAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
myTree.addTreeNodeAt(index, label [, data])
Usage 2:
myTree.addTreeNodeAt(index, child)