Tree.addtreenode() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Tree.addTreeNode()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
treeInstance.addTreeNode(label [, data])
Usage 2:
treeInstance.addTreeNode(child)
Parameters
A string that displays the node, or an object with a label field (or whatever label field
label
name is specified by the
An object of any type that is associated with the node. This parameter is optional.
data
Any XMLNode object.
child
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
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 example creates two Tree components with a node for each one,
and
Folders
2nd Local Folders
) from the second Tree to the first Tree and also adds a new node,
Folders
You must first add the component to the document library by dragging a Tree component to
the Stage and then deleting it; then add the following code to Frame 1.
First try this example without the two addTreeNode() statements at the end; then try the
full example.
property).
labelField
and
parameters (Usage 1), or from the prebuilt child node, which
data
, respectively. Then it adds the tree node (
1st Local
2nd Local
.
Inbox
Tree.addTreeNode()
1285

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents