Menu Component (Flash Professional Only) - MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Menu component (Flash Professional only)

The Menu component lets a user select an item from a pop-up menu, much like the File or Edit
menu of most software applications.
A Menu component usually opens in an application when a user rolls over or clicks a button-like
menu activator. You can also script a Menu component to open when a user presses a certain key.
Menu components are always created dynamically at runtime. You must add the component to
the document from the Components panel, and delete it to add it to the library. Then, use the
following code to create a menu with ActionScript:
var myMenu = mx.controls.Menu.createMenu(parent, menuDataProvider);
Use the following code to open a menu in an application:
myMenu.show(x, y);
A
event is broadcast to all of the Menu instance's listeners immediately before the menu
menuShow
is rendered, so you can update the state of the menu items. Similarly, immediately after a Menu
instance is hidden, a
The items in a menu are described by XML. For more information, see
Menu component: view and data" on page
You cannot make the Menu component accessible to screen readers.
Interacting with the Menu component (Flash Professional only)
You can use the mouse and keyboard to interact with a Menu component.
After a Menu component is opened, it remains visible until it is closed by a script or until the user
clicks the mouse outside the menu or inside an enabled item.
Clicking selects a menu item, except with the following types of menu items:
Disabled items or separators
Anchors for a submenu
item other than those of the submenu closes the submenu.
When an item is selected, a
hidden, and the following actions occur, depending on item type:
check
The item's
radio
The item becomes the current selection of its radio group.
Moving the mouse triggers
Pressing the mouse outside the menu closes the menu and triggers a
Releasing the mouse in an enabled item affects item types in the following ways:
check
The item's
538
Chapter 6: Components Dictionary
event is broadcast.
menuHide
Rollovers and clicks have no effect (the menu remains visible).
Rollovers activate the submenu; clicks have no effect; rolling onto any
Menu.change
attribute is toggled.
selected
Menu.rollOut
attribute is toggled.
selected
Components Dictionary
540.
event is sent to all of the menu's listeners, the menu is
and
Menu.rollOver
CHAPTER 6
"Understanding the
events.
event.
Menu.menuHide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents