ActionScript 2.0 Components Language Reference |
|
|
|
| Menu component > Customizing the Menu component > Using skins with the Menu component | |||
The Menu component uses an instance of RectBorder for its border (see RectBorder class).
The Menu component has visual assets for the branch, check mark, radio dot, and separator graphics. These assets are not dynamically skinnable, but the assets can be copied from the Flash UI Components 2/Themes/MMDefault/Menu Assets/States folder in both themes, and can be modified as desired. The linkage identifiers cannot be changed, and all Menu instances must use the same symbols.
To create movie clip symbols for Menu assets:This file is located in the application-level configuration folder. For the exact location on your operating system, see About themes in Using ActionScript 2.0 Components.
For example, open the MenuCheckEnabled symbol.
For example, change the image to be an X instead of a check mark.
This adds the Menu component to the library and makes it available 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);
|
|
|
|