The SWF::Button Module

A Button is an object that can be used to track user input such as mouse movements, mouse clicks, or keyboard events. When defining a button, you must supply at least a hit area, which is a Shape object that describes the area of the button that is receptive to user input.

You may also supply Shape objects that are displayed when the button is in one of its three states:

Up

Displayed when the button has not received an event.

Down

Displayed when the mouse has been clicked on the hit area.

Over

Displayed when the mouse cursor is moved over the button’s hit area.

The SWF::Button module defines three methods and four alias methods.

Get Perl Graphics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.