User Guide
Creating the ActionScript class file 949
The description of each event in the Flash MX 2004 documentation lists the event properties that
are optional and required. For example, the
ScrollBar.scroll event takes a detail property in
addition to the
type and target properties. For more information, see the event descriptions in
Chapter 6, “Components Dictionary,” on page 91.
Common events
The following table lists the common events that are broadcast by various classes. Every
component should broadcast these events if they make sense for that component. This is not a
complete list of events for all components, just ones that are likely to be reused by other
components. Even though some events specify no parameters, all events have an implicit
parameter: a reference to the object broadcasting the event.
In addition, because of inheritance from the base classes, all components broadcast the
following events:
The following table describes common key events:
Event Use
click
Used by the Button component, or whenever a mouse click has no other
meaning.
change
Used by List, ComboBox, and other text-entry components.
scroll
Used by ScrollBar and other controls that cause scrolling (scroll “bumpers” on a
scrolling pop-up menu).
UIComponent
event
Description
load
The component is creating or loading its subobjects.
unload
The component is unloading its subobjects.
focusIn
The component now has the input focus. Some HTML-equivalent components
(ListBox, ComboBox, Button, Text) might also broadcast
focus, but all broadcast
DOMFocusIn.
focusOut
The component has lost the input focus.
move
The component has been moved to a new location.
resize
The component has been resized.
Key events Description
keyDown
A key is pressed. The code property contains the key code and the ascii property
contains the ASCII code of the key pressed. Do not check with the low-level Key
object, because the event might not have been generated by the Key object.
keyUp
A key is released.