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

Components language reference
Table of Contents

Advertisement

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='1st Local Folders'><node
label='Inbox' data='0'/><node label='Outbox' data='1'/></node><node
label='2nd Local Folders'><node label='Inbox' data='2'/><node
label='Outbox' data='3'/></node><node label='3rd Local Folders'><node
label='Inbox' data='2'/><node label='Outbox' data='3'/></node>");
my_tr.dataProvider = trDP_xml;
// Allow multiple selections.
my_tr.multipleSelection = true;
// Select first and second node.
my_tr.selectedNodes = [my_tr.getTreeNodeAt(0), my_tr.getTreeNodeAt(1)];
See also
Tree.selectedNode

Tree.setIcon()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
treeInstance.setIcon(node, linkID [, linkID2])
Parameters
An XML node.
node
The linkage identifier of a symbol to be used as an icon beside the node. This
linkID
parameter is used for leaf nodes and for the closed state of branch nodes.
1306
Tree component (Flash Professional only)
; then
my_tr

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents