User Guide

584 Chapter 6: Components Dictionary
MenuBar.getMenuAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myMenuBar.getMenuAt(index)
Parameters
index
An integer indicating the position of the menu.
Returns
A reference to the menu at the specified index. This value is undefined if there is no menu at
that position.
Description
Method; returns a reference to the menu at the specified index.
Example
Because getMenuAt() returns an instance, it is possible to add items to a menu at the specified
index. In the following example, after using the Labels authoring parameter to create the menu
activators File, Edit, and View, the following code adds New and Open items to the File menu at
runtime:
menu = myMenuBar.getMenuAt(0);
menu.addMenuItem({label:"New",instanceName:"newInst"});
menu.addMenuItem({label:"Open",instanceName:"openInst"});
MenuBar.getMenuEnabledAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myMenuBar.getMenuEnabledAt(index)
Parameters
index
The index of the menu in the menu bar.
Returns
A Boolean value that indicates whether this menu can be chosen (true) or not (false).