User Guide
1260 TreeDataProvider interface (Flash Professional only)
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
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 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));
TreeDataProvider.attributes.data
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
someNode.attributes.data
Description
Property; specifies the data to associate with the node. This adds the value as an attribute in
the XMLNode object. Setting this property does not refresh any tree displays. This property
can be of any data type.
Example
The following code locates the node to adjust and sets its data property:
var myTreeNode = myTreeDP.firstChild.firstChild;
myTreeNode.attributes.data = "hi"; // results in <node data = "hi">;
See also
TreeDataProvider.attributes.label