You must first add an instance of the Tree component to the Stage and name it
add the following code to Frame 1.
/**
Requires:
- Tree component on Stage (instance name: my_tr)
*/
var my_tr:mx.controls.Tree;
my_tr.setSize(200, 100);
var trDP_xml:XML = new XML("<node label='Inbox' data='0'/>");
my_tr.dataProvider = trDP_xml;
// Set 1st node to be branch.
my_tr.setIsBranch(my_tr.getTreeNodeAt(0), true);
Tree.setIsOpen()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
treeInstance.setIsOpen(node, open [, animate [, fireEvent]])
Parameters
An XML node.
node
A Boolean value that opens a node (
open
A Boolean value that determines whether the opening transition is animated
animate
(
) or not (
true
false
A Boolean value that determines whether the
fireEvent
are dispatched (
) or not (
true
is optional. The default value is
Returns
Nothing.
). This parameter is optional.
) when the tree node is opened or closed. This parameter
false
.
false
) or closes it (
true
false
nodeOpen
; then
my_tr
).
and
events
nodeClose
Tree.setIsOpen()
1309