TreeDataProvider.addTreeNodeAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
someNode.addTreeNodeAt(index, label, data)
Usage 2:
someNode.addTreeNodeAt(index, child)
Parameters
An integer that indicates the index position (among the child nodes) at which the node
index
should be added.
A string that displays the node.
label
An object of any type that is associated with the node.
data
Any XMLNode object.
child
Returns
The added XML node.
Description
Method; adds a child node at the specified location in the parent node. The node is constructed
either from the information supplied in 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 display of the tree.
Example
The following code locates the node to which you will add a node and adds a new node as the
second child of the root:
var myTreeNode = myTreeDP.firstChild.firstChild;
myTreeNode.addTreeNodeAt(1, "Inbox", 3);
The following code moves a node from one tree to become the fourth child of the root of
another tree:
myTreeNode.addTreeNodeAt(3, mySecondTree.getTreeNodeAt(3));
and
parameters (Usage 1), or from the
label
data
TreeDataProvider interface (Flash Professional only)
789
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers