User Guide

Menu class (Flash Professional only) 901
5. Open the symbols that you want to customize for editing.
For example, open the MenuCheckEnabled symbol.
6. Customize the symbol as desired.
For example, change the image to be an X instead of a check mark.
7. Repeat steps 6-7 for all symbols that you want to customize.
8. Click the Back button to return to the main timeline.
9. Drag a Menu component from the Components panel to the current document’s library.
This adds the Menu component to the library and makes it available at runtime.
10. Add ActionScript to the main timeline to create a Menu instance at runtime:
var myMenu = mx.controls.Menu.createMenu();
myMenu.addMenuItem({label: "One", type: "check", selected: true});
myMenu.addMenuItem({label: "Two", type: "check"});
myMenu.addMenuItem({label: "Three", type: "check"});
myMenu.show(0, 0);
11.
Select Control > Test Movie.
Menu class (Flash Professional only)
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView >
ScrollSelectList > Menu
ActionScript Class Name mx.controls.Menu
The methods and properties of the Menu class let you create and edit menus at runtime.
Setting a property of the menu class with ActionScript overrides the parameter of the same
name set in the Property inspector or Component inspector.
Each component class has a
version property, which is a class property. Class properties are
available only on the class itself. The
version property returns a string that indicates the
version of the component. To access this property, use the following code:
trace(mx.controls.Menu.version);
NOTE
The code trace(myMenuInstance.version); returns undefined.