Tree.nodeopen - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Tree.nodeOpen

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
var listenerObject:Object = new Object();
listenerObject.nodeOpen = function(eventObject:Object) {
// Insert your code here.
};
treeInstance.addEventListener("nodeOpen", listenerObject);
Description
Event; broadcast to all registered listeners when a user opens a node on a Tree component.
Version 2 components use a dispatcher/listener event model. The Tree component dispatches
a
event when a node is clicked open by a user; the event is handled by a function,
nodeOpen
also called a handler, that is attached to a listener object (
) that you create.
listenerObject
You call the
method and pass it the name of the handler as a parameter.
addEventListener()
When the event is triggered, it automatically passes an event object (
) to the
eventObject
handler. Each event object has properties that contain information about the event. You can
use these properties to write code that handles the event. The
event's event
Tree.nodeOpen
object has one additional property:
(the XML node that was opened).
node
For more information, see
"EventDispatcher class" on page
499.
Example
The following example adds two nodes to the Tree instance
, and then creates two
my_tr
listener objects, one for
events and one for
events
When these events
nodeOpen
nodeClose
.
occur, the listener functions call trace statements to display the event and the affected node in
the Output panel.
Tree.nodeOpen
1299

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents