User Guide

578 Chapter 6: Components Dictionary
MenuBar class (Flash Professional only)
Inheritance MovieClip > UIObject class > UIComponent class > MenuBar
ActionScript Class Name mx.controls.MenuBar
The methods and properties of the MenuBar class let you create a horizontal menu bar with pop-
up menus and commands. These methods and properties complement those of the Menu class by
allowing you to create a clickable interface to show and hide menus that behave as a group for
mouse and keyboard interactivity.
Method summary for the MenuBar class
The following table lists methods of the MenuBar class.
Methods inherited from the UIObject class
The following table lists the methods the MenuBar class inherits from the UIObject class. When
calling these methods from the MenuBar object, use the form
MenuBar.methodName.
Method Description
MenuBar.addMenu() Adds a menu to the menu bar.
MenuBar.addMenuAt() Adds a menu at a specified location to the menu bar.
MenuBar.getMenuAt() Gets a reference to a menu at a specified location.
MenuBar.getMenuEnabledAt() Returns a Boolean value indicating whether a menu is enabled
(
true) or not (false).
MenuBar.removeMenuAt() Removes a menu at a specified location from a menu bar.
MenuBar.setMenuEnabledAt() A Boolean value indicating whether a menu is can be chosen (true)
or not (
false).
Method Description
UIObject.createClassObject() Creates an object on the specified class.
UIObject.createObject() Creates a subobject on an object.
UIObject.destroyObject() Destroys a component instance.
UIObject.doLater() Calls a function when parameters have been set in the Property and
Component inspectors.
UIObject.getStyle() Gets the style property from the style declaration or object.
UIObject.invalidate() Marks the object so it will be redrawn on the next frame interval.
UIObject.move() Moves the object to the requested position.
UIObject.redraw() Forces validation of the object so it is drawn in the current frame.
UIObject.setSize() Resizes the object to the requested size.
UIObject.setSkin() Sets a skin in the object.
UIObject.setStyle() Sets the style property on the style declaration or object.