
CHAPTER 4: User-Interface Tools Control objects 142
Control object functions
The following table shows the methods defined for each element type, and for specific control types as
indicated.
window
Window The Window object that contains this control. Read only.
windowBounds
Bounds A Bounds object that contains the bounds of this control in the
containing window’s coordinates. Compare bounds
, in which
coordinates are relative to the immediate parent container. Read only.
function_name
Function For the FlashPlayer control, a function definition for a callback from
the Flash ActionScript environment.
There are no special naming requirements, but the function must
take and return only the supported data types:
Number undefined
String Object
Boolean Array
Null
N
OTE: The ActionScript class and date objects are not supported as
parameter values.
addEventListener()
controlObj.addEventListener (eventName, handler, capturePhase);
eventName
The event name string. Predefined event names include:
change changing
move moving
resize resizing
show enterKey
focus blur
mousedown mouseup
mousemove mouseover mouseout
keyup keydown
click
(detail = 1 for single, 2 for double)
handler
The function to register for the specified event in this target. This can be the name
of a function defined in the extension, or a locally defined handler function to be
executed when the event occurs.
A handler function takes one argument, an object of the UIEvent base class
. See
“
Registering event listeners for windows or controls” on page 82.
capturePhase
Optional. When true, the handler is called only in the capturing phase of the event
propagation. Default is false, meaning that the handler is called in the bubbling
phase if this object is an ancestor of the target, or in the at-target phase if this
object is itself the target.
Registers an event handler for a particular type of event occurring in this control.
Returns
undefined.
Comentários a estes Manuais