User Guide
Tree.setIsOpen() 1309
You must first add an instance of the Tree component to the Stage and name it my_tr; then
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
node An XML node.
open A Boolean value that opens a node (true) or closes it (false).
animate A Boolean value that determines whether the opening transition is animated
(
true) or not (false). This parameter is optional.
fireEvent A Boolean value that determines whether the nodeOpen and nodeClose events
are dispatched (
true) or not (false) when the tree node is opened or closed. This parameter
is optional. The default value is
false.
Returns
Nothing.