An object dispatches a FocusEvent object when the user changes the focus from one object in the display list to another. There are four types of focus events:
FocusEvent.FOCUS_IN
FocusEvent.FOCUS_OUT
FocusEvent.KEY_FOCUS_CHANGE
FocusEvent.MOUSE_FOCUS_CHANGE
Constructor
new (type:String, bubbles:Bool = false, cancelable:Bool = false, ?relatedObject:InteractiveObject, shiftKey:Bool = false, keyCode:Int = 0)
Creates an Event object with specific information relevant to focus events. Event objects are passed as parameters to event listeners.
Parameters:
type | The type of the event. Possible values are:
|
---|---|
bubbles | Determines whether the Event object participates in the bubbling stage of the event flow. |
cancelable | Determines whether the Event object can be canceled. |
relatedObject | Indicates the complementary InteractiveObject
instance that is affected by the change in focus. For
example, when a |
shiftKey | Indicates whether the Shift key modifier is activated. |
keyCode | Indicates the code of the key pressed to trigger a
|
Variables
relatedObject:InteractiveObject
A reference to the complementary InteractiveObject instance that is
affected by the change in focus. For example, when a focusOut
event occurs, the relatedObject
represents the
InteractiveObject instance that has gained focus.
The value of this property can be null
in two
circumstances: if there no related object, or there is a related object,
but it is in a security sandbox to which you don't have access. Use the
isRelatedObjectInaccessible()
property to determine which of
these reasons applies.
Static variables
staticinline read onlyFOCUS_IN:String = "focusIn"
Defines the value of the type
property of a
focusIn
event object.
This event has the following properties:
staticinline read onlyFOCUS_OUT:String = "focusOut"
Defines the value of the type
property of a
focusOut
event object.
This event has the following properties:
staticinline read onlyKEY_FOCUS_CHANGE:String = "keyFocusChange"
Defines the value of the type
property of a
keyFocusChange
event object.
This event has the following properties:
staticinline read onlyMOUSE_FOCUS_CHANGE:String = "mouseFocusChange"
Defines the value of the type
property of a
mouseFocusChange
event object.
This event has the following properties: