User Guide
Menu.menuHide 917
Menu.menuHide
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
var listenerObject:Object = new Object();
listenerObject.menuHide = function(eventObject:Object) {
// Insert your code here.
};
menuInstance.addEventListener("menuHide", listenerObject);
Usage 2:
on (menuHide) {
// Insert your code here.
}
Description
Event; broadcast to all registered listeners whenever a menu closes.
Version 2 components use a dispatcher-listener event model. When a Menu component
dispatches a
menuHide event, the event is handled by a function (also called a handler) that is
attached to a listener object (
listenerObject) that you create. You call the
addEventListener() method and pass it the name of the handler and the name of the
listener object as parameters.
When the event is triggered, it automatically passes an event object (
eventObject) to the
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
Menu.menuHide event’s event
object has two additional properties:
■ menuBar A reference to the MenuBar instance that is the parent of the target menu.
When the target menu does not belong to a MenuBar instance, this value is
undefined.
■ menu A reference to the Menu instance that is hidden.
For more information, see “EventDispatcher class” on page 499.