MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 566

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

Advertisement

When the event is triggered, it automatically passes an event object (
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
one additional property:
pointer rolled over.
For more information, see
Example
In the following example, a handler called
myMenu.addEventListener()
handler in the
rollOver
statement is sent to the Output panel.
form = new Object();
form.rollOver = function(evt){
trace("Menu rollOver: "+evt.menuItem.attributes.label);
}
myMenu.addEventListener("rollOver", form);
Menu.setMenuItemEnabled()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myMenu.setMenuItemEnabled(item, enable)
Parameters
An XML node; the target menu item's node in the data provider.
item
A Boolean value indicating whether the item is enabled (
enable
Returns
Nothing.
Description
Method; changes the target item's
parameter. If this call results in a change of state, the item is redrawn with the new state.
Example
The following example disables the second child of
var myItem = myMenu.getMenuItemAt(1);
myMenu.setMenuItemEnabled(myItem, false);
566
Chapter 6: Components Dictionary
, which is a reference to the menu item (XML node) that the
menuItem
"EventDispatcher class" on page
form
as the second parameter. The event object is captured by the
parameter. When the
evt
attribute to the state specified in the
enabled
eventObject
Menu.rollOver
415.
is defined and passed to
event is broadcast, a
rollOver
true
:
myMenu
) to the
event's event object has
trace
) or not (
).
false
enable

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents