Flash 8 Documentation |
|||
| Components Language Reference > MenuBar component (Flash Professional only) > 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.
The following table lists methods of the MenuBar class.
|
Method |
Description |
|---|---|
|
Adds a menu to the menu bar. |
|
|
Adds a menu at a specified location to the menu bar. |
|
|
Gets a reference to a menu at a specified location. |
|
|
Returns a Boolean value indicating whether a menu is enabled ( |
|
|
Removes a menu at a specified location from a menu bar. |
|
|
Removes all menu items from the menu bar. |
|
|
A Boolean value indicating whether a menu is can be chosen ( |
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 |
|---|---|
|
Creates an object on the specified class. |
|
|
Creates a subobject on an object. |
|
|
Destroys a component instance. |
|
|
Calls a function when parameters have been set in the Property and Component inspectors. |
|
|
Gets the style property from the style declaration or object. |
|
|
Marks the object so it is redrawn on the next frame interval. |
|
|
Moves the object to the requested position. |
|
|
Forces validation of the object so it is drawn in the current frame. |
|
|
Resizes the object to the requested size. |
|
|
Sets a skin in the object. |
|
|
Sets the style property on the style declaration or object. |
The following table lists the methods the MenuBar class inherits from the UIComponent class. When calling these methods from the MenuBar object, use the form MenuBar.methodName.
|
Method |
Description |
|---|---|
|
Returns a reference to the object that has focus. |
|
|
Sets focus to the component instance. |
The following table lists properties of the MenuBar class.
|
Property |
Description |
|---|---|
|
The data model for a menu bar. |
|
|
A string that determines which attribute of each XMLNode to use as the label text of the menu. |
|
|
A function that determines what to display in each menu's label. |
The following table lists the properties the MenuBar class inherits from the UIObject class. When calling these properties from the MenuBar object, use the form MenuBar.propertyName.
|
Property |
Description |
|---|---|
|
The position of the bottom edge of the object, relative to the bottom edge of its parent. Read-only. |
|
|
The height of the object, in pixels. Read-only. |
|
|
The left edge of the object, in pixels. Read-only. |
|
|
The position of the right edge of the object, relative to the right edge of its parent. Read-only. |
|
|
A number indicating the scaling factor in the x direction of the object, relative to its parent. |
|
|
A number indicating the scaling factor in the y direction of the object, relative to its parent. |
|
|
The position of the top edge of the object, relative to its parent. Read-only. |
|
|
A Boolean value indicating whether the object is visible ( |
|
|
The width of the object, in pixels. Read-only. |
|
|
The left edge of the object, in pixels. Read-only. |
|
|
The top edge of the object, in pixels. Read-only. |
The following table lists the properties the MenuBar class inherits from the UIComponent class. When calling these properties from the MenuBar object, use the form MenuBar.propertyName.
|
Property |
Description |
|---|---|
|
Indicates whether the component can receive focus and input. |
|
|
A number indicating the tab order for a component in a document. |
There are no events exclusive to the MenuBar class.
The following table lists the events the MenuBar class inherits from the Menu class. When calling these events from the MenuBar object, use the form MenuBar.eventName.
|
Event |
Description |
|---|---|
|
Broadcast when a user causes a change in a menu. |
|
|
Broadcast when a menu closes. |
|
|
Broadcast when a menu opens. |
|
|
Broadcast when the pointer rolls off an item. |
|
|
Broadcast when the pointer rolls over an item. |
The following table lists the events the MenuBar class inherits from the UIObject class. When calling these events from the MenuBar object, use the form MenuBar.eventName.
|
Event |
Description |
|---|---|
|
Broadcast when an object is about to draw its graphics. |
|
|
Broadcast when an object's state changes from visible to invisible. |
|
|
Broadcast when subobjects are being created. |
|
|
Broadcast when the object has moved. |
|
|
Broadcast when an object has been resized. |
|
|
Broadcast when an object's state changes from invisible to visible. |
|
|
Broadcast when the subobjects are being unloaded. |
The following table lists the events the MenuBar class inherits from the UIComponent class. When calling these events from the MenuBar object, use the form MenuBar.eventName.
|
Event |
Description |
|---|---|
|
Broadcast when an object receives focus. |
|
|
Broadcast when an object loses focus. |
|
|
Broadcast when a key is pressed. |
|
|
Broadcast when a key is released. |
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00003864.html