MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1261

Components language reference
Table of Contents

Advertisement

CHAPTER 49
TreeDataProvider interface
(Flash Professional only)
The TreeDataProvider interface is a set of properties and methods and does not need to be
instantiated to be used. If a Tree class is packaged in a SWF file, all XML instances in the
SWF file contain the TreeDataProvider interface. All nodes in a tree are XML objects that
contain the TreeDataProvider interface.
It's best to use the TreeDataProvider methods to create XML for the
property, because only TreeDataProvider broadcasts events that refresh the tree's display.
These are events that the Tree class handles; you do not need to write functions to handle
these events. (The built-in XML class methods don't broadcast such events.)
Use the TreeDataProvider methods to control the data model and the data display. Use built-
in XML class methods for read-only tasks such as traversing through the tree hierarchy.
You can select the property that holds the text to be displayed by specifying a
property. For example, the code
labelFunction
results in the value of the property
display text.
Method summary for the TreeDataProvider interface
The following table lists the methods of the TreeDataProvider interface.
Method
TreeDataProvider.addTreeNode()
TreeDataProvider.addTreeNodeAt()
TreeDataProvider.getTreeNodeAt()
TreeDataProvider.removeTreeNode()
TreeDataProvider.removeTreeNodeAt()
myTree.labelField = "firstName";
myTreeDP.attributes.fred
Description
Adds a child node at the root of the tree.
Adds a child node at a specified location on the
parent node.
Returns the specified child of a node.
Removes a node and all the node's descendants
from the node's parent.
Removes a node and all the node's descendants
from the index position of the child node.
Tree.dataProvider
labelField
being queried for the
1257
49
or

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents