User Guide
945
31
CHAPTER 31
MenuBar component (Flash
Professional only)
The MenuBar component lets you create a horizontal menu bar with pop-up menus and
commands, just like the menu bars that contain File and Edit menus in common software
applications. The MenuBar component complements the Menu component by providing a
clickable interface to show and hide menus that behave as a group for mouse and keyboard
interactivity.
The MenuBar component lets you create an application menu in a few steps. To build a menu
bar, you can either assign an XML data provider to the menu bar that describes a series of
menus, or use the
MenuBar.addMenu() method to add menu instances one at a time.
Each menu in the menu bar is composed of two parts: the menu and the button that causes
the menu to open (called the menu activator). These clickable menu activators appear in the
menu bar as a text label with inset and outset border highlight states that react to interaction
from the mouse and keyboard.
When a menu activator is clicked, the corresponding menu opens below it. The menu stays
active until the activator is clicked again, or until a menu item is selected or a click occurs
outside the menu area.
In addition to creating menu activators that show and hide menus, the MenuBar component
creates group behavior among a series of menus. This lets a user scan a large number of
command choices by rolling over the series of activators or by using the arrow keys to move
through the lists. Mouse and keyboard interactivity work together to let the user jump from
menu to menu in the menu bar.
A user cannot scroll through menus on a menu bar. If menus exceed the width of the menu
bar, they are masked.
You cannot make the MenuBar component accessible to screen readers.
Menus are often nested within menu bars. For information about menus, see “Menu
component (Flash Professional only)” on page 883.