Events inherited from the UIComponent class
The following table lists the events the MenuBar class inherits from the UIComponent class.
When calling these events from the MenuBar object, use the form
Event
UIComponent.focusIn
UIComponent.focusOut
UIComponent.keyDown
UIComponent.keyUp
MenuBar.addMenu()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
myMenuBar.addMenu(label)
Usage 2:
myMenuBar.addMenu(label, menuDataProvider)
Parameters
A string indicating the label of the new menu.
label
menuDataProvider
the value is an XML instance, the instance's first child is used.
Returns
A reference to the new Menu object.
Description
Method; Usage 1 adds a single menu and menu activator at the end of the menu bar and uses the
specified label. Usage 2 adds a single menu and menu activator that are defined in the specified
XML
menuDataProvider
Example
Usage 1: The following example adds a File menu and then uses
menu items New and Open:
var myMenuBar:mx.controls.MenuBar;
var myMenu:mx.controls.Menu;
Description
Broadcast when an object receives focus.
Broadcast when an object loses focus.
Broadcast when a key is pressed.
Broadcast when a key is released.
An XML or XMLNode instance that describes the menu and its items. If
parameter.
MenuBar.eventName
Menu.addMenuItem()
MenuBar component (Flash Professional only)
.
to add the
581
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?