Tree.nodeclose - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following example adds a node to the Tree instance
method to return the first node in the tree.
getTreeNodeAt()
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>");
my_tr.dataProvider = trDP_xml;
trace(my_tr.getTreeNodeAt(0));

Tree.nodeClose

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
var listenerObject:Object = new Object();
listenerObject.nodeClose = function(eventObject:Object) {
// Insert your code here.
};
treeInstance.addEventListener("nodeClose", listenerObject);
Description
Event; broadcast to all registered listeners when the nodes of a Tree component are closed
by a user.
Version 2 components use a dispatcher/listener event model. The Tree component broadcasts
a
event when one of its nodes is clicked closed; the event is handled by a function,
nodeClose
also called a handler, that is attached to a listener object (
, and then calls the
my_tr
) that you create.
listenerObject
Tree.nodeClose
; then
my_tr
1297

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents