}
myTreeInstance.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, also
nodeClose
called a handler, that is attached to a listener object (
When the event is triggered, it automatically passes an event object (
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
has one additional property:
For more information, see
Example
In the following example, a handler called
myTree.addEventListener()
the
handler in the
nodeClose
statement is sent to the Output panel.
trace
myTreeListener = new Object();
myTreeListener.nodeClose = function(evtObject){
trace(evtObject.node + " node was closed");
}
myTree.addEventListener("nodeClose", myTreeListener);
Tree.nodeOpen
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.nodeOpen = function(eventObject){
// insert your code here
}
myTreeInstance.addEventListener("nodeOpen", listenerObject)
Description
Event; broadcast to all registered listeners when a user opens a node on a Tree component.
(the XML node that closed).
node
"EventDispatcher class" on page
myTreeListener
method as the second parameter. The event object is captured by
parameter. When the
evtObject
) that you create.
listenerObject
eventObject
Tree.nodeClose
415.
is defined and passed to the
nodeClose
Tree component (Flash Professional only)
) to the
event's event object
event is broadcast, a
781
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers