Menubar.setmenuenabledat() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Drag an instance of the MenuBar component onto the Stage, and enter the instance name
in the Property inspector. Add the following code to Frame 1 of the timeline:
my_mb
/**
Requires:
- MenuBar component on Stage (instance name: my_mb)
*/
import mx.controls.Menu;
import mx.controls.MenuBar;
var my_mb:MenuBar;
var file_menu:Menu = my_mb.addMenu("File");
file_menu.addMenuItem({label:"New", instanceName:"newInstance"});
file_menu.addMenuItem({label:"Open", instanceName:"openInstance"});
var edit_menu:Menu = my_mb.addMenu("Edit");
edit_menu.addMenuItem({label:"Cut", instanceName:"cutInstance"});
edit_menu.addMenuItem({label:"Copy", instanceName:"copyInstance"});
edit_menu.addMenuItem({label:"Paste", instanceName:"pasteInstance"});
//Delete "file" menu.
my_mb.removeMenuAt(0);

MenuBar.setMenuEnabledAt()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
menuBarInstance.setMenuEnabledAt(index, boolean)
Parameters
The index of the menu item to set in the MenuBar instance.
index
A Boolean value indicating whether the menu item at the specified index is
boolean
enabled (
) or not (
).
true
false
Returns
Nothing.
966
MenuBar component (Flash Professional only)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents