Button class

All button symbols in a SWF file are instances of the Button object. The Button class provides methods, properties, and event handlers for working with buttons.

For more information about the Button class, see the following:

Property summary

The following table lists the properties that are either partially or not supported by the Button class when using ActionScript for Flash Lite 2.x.

Property

Description

Support

menu

An object that associates a ContextMenu object with a button.

Not supported

trackAsMenu

A Boolean value that indicates whether other buttons can receive mouse release events. Supported if System.capabilities.hasMouse or System.capabilities.hasStylus are set to true.

Partially supported

useHandCursor

A Boolean value that indicates whether the pointer appears when the mouse passes over a button.

Not supported

_xmouse

Read-only; the x coordinate of the pointer, relative to a button instance. Supported if System.capabilities.hasMouse or System.capabilities.hasStylus are set to true.

Partially supported

_ymouse

Read-only; the y coordinate of the pointer, relative to a button instance. Supported if System.capabilities.hasMouse or System.capabilities.hasStylus are set to true.

Partially supported

Event summary

The following table lists the event handlers that are partially supported by the Button class when using ActionScript for Flash Lite 2.x.

Event

Description

onDragOut

Invoked when the mouse button is clicked over the button and the pointer then dragged outside of the button.

Limitations: Supported if System.capabilities.hasMouse or System.capabilities.hasStylus are set to true.

onDragOver

Invoked when the pointer is dragged over the button. Supported if System.capabilities.hasMouse or System.capabilities.hasStylus are set to true.

onReleaseOutside

Invoked when the mouse is released while the pointer is outside the button after the button is pressed while the pointer is inside the button.

Limitations: Supported if System.capabilities.hasMouse or System.capabilities.hasStylus are set to true.