contextMenu:NativeMenu [read-write]
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Specifies the context menu associated with this object.
For content running in Flash Player, this property is a ContextMenu object. In the AIR runtime,
the ContextMenu class extends the NativeMenu class, however Flash Player only supports the
ContextMenu class, not the NativeMenu class.
Implementation public function get contextMenu():NativeMenu public function set contextMenu(value:NativeMenu):voiddoubleClickEnabled:Boolean [read-write]
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Specifies whether the object receives
doubleClick
events. The default value
is
false
, which means that by default an InteractiveObject instance does not receive
doubleClick
events. If the
doubleClickEnabled
property is set to
true
, the instance receives
doubleClick
events within its bounds.
The
mouseEnabled
property of the InteractiveObject instance must also be
set to
true
for the object to receive
doubleClick
events.
No event is dispatched by setting this property. You must use the
addEventListener()
method to add an event listener
for the
doubleClick
event.
Implementation public function get doubleClickEnabled():Boolean public function set doubleClickEnabled(value:Boolean):voidSee also
focusRect:Object [read-write]
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Specifies whether this object displays a focus rectangle. It can take one of three
values:
true
,
false
, or
null
. Values of
true
and
false
work as expected, specifying whether or not the focus rectangle
appears. A value of
null
indicates that this object obeys the
stageFocusRect
property of the Stage.
Implementation public function get focusRect():Object public function set focusRect(value:Object):voidmouseEnabled:Boolean [read-write]
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Specifies whether this object receives mouse messages. The default value is
true
,
which means that by default any InteractiveObject instance that is on the display list
receives mouse events.
If
mouseEnabled
is set to
false
, the instance does not receive any
mouse events. Any children of this instance on the display list are not affected. To change
the
mouseEnabled
behavior for all children of an object on the display list, use
flash.display.DisplayObjectContainer.mouseChildren
.
No event is dispatched by setting this property. You must use the
addEventListener()
method to create interactive functionality.
Implementation public function get mouseEnabled():Boolean public function set mouseEnabled(value:Boolean):voidSee also
tabEnabled:Boolean [read-write]
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Specifies whether this object is in the tab order. If this object is in the tab order,
the value is
true
; otherwise, the value is
false
. By default,
the value is
false
, except for the following:
-
For a SimpleButton object, the value is
true
.
-
For a TextField object with
type = "input"
, the value is
true
.
-
For a Sprite object or MovieClip object with
buttonMode = true
, the value is
true
.
Implementation public function get tabEnabled():Boolean public function set tabEnabled(value:Boolean):voidtabIndex:int [read-write]
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Specifies the tab ordering of objects in a SWF file. The
tabIndex
property is -1 by default, meaning no tab index is set for the object.
If any currently displayed object in the SWF file contains a
tabIndex
property, automatic
tab ordering is disabled, and the tab ordering is calculated from the
tabIndex
properties of
objects in the SWF file. The custom tab ordering includes only objects that have
tabIndex
properties.
The
tabIndex
property can be a non-negative integer. The objects are ordered according to
their
tabIndex
properties, in ascending order. An object with a
tabIndex
value of 1 precedes an object with a
tabIndex
value of 2. Do not use the same
tabIndex
value for multiple objects.
The custom tab ordering that the
tabIndex
property defines is
flat
.
This means that no attention is paid to the hierarchical relationships of objects in the SWF file.
All objects in the SWF file with
tabIndex
properties are placed in the tab order, and the
tab order is determined by the order of the
tabIndex
values.
Implementation public function get tabIndex():int public function set tabIndex(value:int):voidpublic function InteractiveObject()| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Calling the
new InteractiveObject()
constructor
throws an
ArgumentError
exception.
You can, however, call constructors for the following subclasses of InteractiveObject:
-
new SimpleButton()
-
new TextField()
-
new Loader()
-
new Sprite()
-
new MovieClip()
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.CLEAR| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu.
This event is dispatched to the object that currently has focus.
If the object that currently has focus is a TextField, the default behavior of this event is to cause
any currently selected text in the text field to be deleted.
The
Event.CLEAR
constant efines the value of the
type
property
of a
clear
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
Any InteractiveObject instance with a listener registered for the
clear
event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.CLICK| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when a user presses and releases the main button of the user's
pointing device over the same InteractiveObject. For a click event to occur, it must always follow this series of
events in the order of occurrence: mouseDown event, then mouseUp. The target object
must be identical for both of these events; otherwise the
click
event does not
occur. Any number of other mouse events can occur at any time between the
mouseDown
or
mouseUp
events; the
click
event
still occurs.
Defines the value of the
type
property of a
click
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; there is no default behavior to cancel.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.CONTEXT_MENU| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user gesture triggers the context menu associated with this interactive
object in an AIR application.
The
MouseEvent.CONTEXT_MENU
constant defines the value of the
type
property of a
contextMenu
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the right mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
See also
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.COPY| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the user activates the platform specific accelerator key combination for a copy operation
or selects 'Copy' from the text context menu.
This event is dispatched to the object that currently has focus.
If the object that currently has focus is a TextField, the default behavior of this event is to cause
any currently selected text in the text field to be copied to the clipboard.
Defines the value of the
type
property of a
copy
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
Any InteractiveObject instance with a listener registered for the
copy
event.
|
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.CUT| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the user activates the platform specific accelerator key combination for a cut operation
or selects 'Cut' from the text context menu.
This event is dispatched to the object that currently has focus.
If the object that currently has focus is a TextField, the default behavior of this event is to cause
any currently selected text in the text field to be cut to the clipboard.
Defines the value of the
type
property of a
cut
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
Any InteractiveObject instance with a listener registered for the
cut
event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.DOUBLE_CLICK| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when a user presses and releases the main button of a pointing device twice in
rapid succession over the same InteractiveObject when that object's
doubleClickEnabled
flag is set to
true
.
For a
doubleClick
event to occur, it must immediately follow the following
series of events:
mouseDown
,
mouseUp
,
click
,
mouseDown
,
mouseUp
. All of these events must share the same
target as the
doubleClick
event. The second click, represented by
the second
mouseDown
and
mouseUp
events, must occur within
a specific period of time after the
click
event. The allowable length of
this period varies by operating system and can often be configured by the user.
If the target is a selectable text field, the word under the pointer is selected as the
default behavior. If the target InteractiveObject does not have its
doubleClickEnabled
flag set to
true
it receives two
click
events.
The
doubleClickEnabled
property defaults
to
false
.
The double-click text selection behavior of a TextField object
is not related to the
doubleClick
event. Use
TextField.doubleClickEnabled
to control TextField selections.
Defines the value of the
type
property of a
doubleClick
event object. The
doubleClickEnabled
property
must be
true
for an object to generate the
doubleClick
event.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; there is no default behavior to cancel.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
See also
Event Object Type: flash.events.FocusEventproperty FocusEvent.type = flash.events.FocusEvent.FOCUS_IN| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched
after
a display object gains focus.
This situation happens when a user highlights the object with a pointing device or keyboard navigation.
The recipient of such focus is called the target object of this event,
while the corresponding InteractiveObject instance that lost focus because of this change is called the related object.
A reference to the related object is stored in the receiving object's
relatedObject
property.
The
shiftKey
property is not used.
This event follows the dispatch of the previous object's
focusOut
event.
Defines the value of the
type
property of a
focusIn
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
keyCode
|
0; applies only to
keyFocusChange
events.
|
relatedObject
| The complementary InteractiveObject instance that is affected by the change in focus. |
shiftKey
|
false
; applies only to
keyFocusChange
events.
|
target
|
The InteractiveObject instance that has just received focus.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
direction
|
The direction from which focus was assigned. This property reports
the value of the
direction
parameter of the
assignFocus()
method of the stage.
If the focus changed through some other means, the value will always be
FocusDirection.NONE
.
Applies only to
focusIn
events. For all other focus events the value will be
FocusDirection.NONE
.
|
Event Object Type: flash.events.FocusEventproperty FocusEvent.type = flash.events.FocusEvent.FOCUS_OUT| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched
after
a display object loses focus.
This happens when a user highlights a different object with a pointing device or keyboard navigation.
The object that loses focus is called the target object of this event, while the corresponding InteractiveObject
instance that receives focus is called the related object. A reference to the related object is stored in the target object's
relatedObject
property. The
shiftKey
property is not used. This event precedes the dispatch
of the
focusIn
event by the related object.
Defines the value of the
type
property of a
focusOut
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
keyCode
|
0; applies only to
keyFocusChange
events.
|
relatedObject
| The complementary InteractiveObject instance that is affected by the change in focus. |
shiftKey
|
false
; applies only to
keyFocusChange
events.
|
target
|
The InteractiveObject instance that has just lost focus.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.KeyboardEventproperty KeyboardEvent.type = flash.events.KeyboardEvent.KEY_DOWN| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user presses a key. Mappings between keys and specific characters
vary by device and operating system. This event type is generated after such a mapping
occurs but before the processing of an input method
editor (IME). IMEs are used to enter characters, such as Chinese ideographs, that the standard QWERTY keyboard is ill-equipped
to produce. This event occurs before the
keyUp
event.
Defines the value of the
type
property of a
keyDown
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
charCode
| The character code value of the key pressed or released. |
commandKey
|
true
on Mac if the Command key is active. Otherwise,
false
|
controlKey
|
true
on Windows and Linux if the Ctrl key is active.
true
on Mac if either the Control key is active. Otherwise,
false
|
ctrlKey
|
true
on Windows and Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
keyCode
| The key code value of the key pressed or released. |
keyLocation
| The location of the key on the keyboard. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
target
|
The InteractiveObject instance with focus.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.FocusEventproperty FocusEvent.type = flash.events.FocusEvent.KEY_FOCUS_CHANGE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user attempts to change focus by using keyboard navigation.
The default behavior of this event is to change the focus and dispatch the
corresponding
focusIn
and
focusOut
events.
This event is dispatched to the object that currently has focus.
The related object for this event is the InteractiveObject instance that receives focus
if you do not prevent the default behavior.
You can prevent the change in focus by calling the
preventDefault()
method
in an event listener that is properly registered with the target object.
Focus changes and
focusIn
and
focusOut
events are dispatched by default.
Defines the value of the
type
property of a
keyFocusChange
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
true
; call the
preventDefault()
method
to cancel default behavior.
|
currentTarget
| The object that is actively processing
the Event
object with an event listener. |
keyCode
|
The key code value of the key pressed to trigger a
keyFocusChange
event.
|
relatedObject
| The complementary InteractiveObject instance that is affected by the change in focus. |
shiftKey
|
true
if the Shift key modifier is activated;
false
otherwise.
|
target
|
The InteractiveObject instance that currently has focus.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.KeyboardEventproperty KeyboardEvent.type = flash.events.KeyboardEvent.KEY_UP| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user releases a key. Mappings between keys and specific characters vary
by device and operating system. This event type is generated after such a mapping occurs
but before the processing of an input method editor (IME). IMEs are used to enter
characters, such as Chinese ideographs, that the standard QWERTY keyboard is
ill-equipped to produce. This event occurs after a
keyDown
event and has
the following characteristics:
Defines the value of the
type
property of a
keyUp
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
charCode
| Contains the character code value of the key pressed or released. |
commandKey
|
true
on Mac if the Command key is active. Otherwise,
false
|
controlKey
|
true
on Windows and Linux if the Ctrl key is active.
true
on Mac if either the Control key is active. Otherwise,
false
|
ctrlKey
|
true
on Windows if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
keyCode
| The key code value of the key pressed or released. |
keyLocation
| The location of the key on the keyboard. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
target
|
The InteractiveObject instance with focus.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MIDDLE_CLICK| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user presses and releases the middle button of the user's
pointing device over the same InteractiveObject. For a
middleClick
event to occur, it must always follow this series of
events in the order of occurrence:
middleMouseDown
event, then
middleMouseUp
. The target object
must be identical for both of these events; otherwise the
middleClick
event does not
occur. Any number of other mouse events can occur at any time between the
middleMouseDown
or
middleMouseUp
events; the
middleClick
event
still occurs.
Defines the value of the
type
property of a
middleClick
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the middle mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; there is no default behavior to cancel.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MIDDLE_MOUSE_DOWN| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user presses the middle pointing device button over an InteractiveObject instance.
Defines the value of the
type
property of a
middleMouseDown
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the middle mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MIDDLE_MOUSE_UP| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user releases the pointing device button over an
InteractiveObject instance.
Defines the value of the
type
property of a
middleMouseUp
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the middle mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MOUSE_DOWN| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when a user presses the pointing device button over an InteractiveObject instance.
If the target is a SimpleButton instance, the SimpleButton instance displays the
downState
display object as the default behavior. If the target is a
selectable text field, the text field begins selection as the default behavior.
Defines the value of the
type
property of a
mouseDown
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows and Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.FocusEventproperty FocusEvent.type = flash.events.FocusEvent.MOUSE_FOCUS_CHANGE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user attempts to change focus by using a pointer device.
The default behavior of this event is to change the focus and dispatch the corresponding
focusIn
and
focusOut
events.
This event is dispatched to the object that currently has focus. The related object for this event is the
InteractiveObject instance that receives focus if you do not prevent the default behavior. You can prevent the change in
focus by calling
preventDefault()
in an event listener that is properly registered with the target object.
The
shiftKey
property is not used. Focus changes and
focusIn
and
focusOut
events are dispatched by default.
Defines the value of the
type
property of a
mouseFocusChange
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
true
; call the
preventDefault()
method
to cancel default behavior.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
keyCode
|
0; applies only to
keyFocusChange
events.
|
relatedObject
| The complementary InteractiveObject instance that is affected by the change in focus. |
shiftKey
|
false
; applies only to
keyFocusChange
events.
|
target
|
The InteractiveObject instance that currently has focus.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MOUSE_MOVE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when a user moves the pointing device while it is over an InteractiveObject.
If the target is a text field that the user is selecting, the selection is updated as the default behavior.
Defines the value of the
type
property of a
mouseMove
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MOUSE_OUT| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user moves a pointing device away from an InteractiveObject instance.
The event target is the object previously under the pointing device. The
relatedObject
is the object the pointing device has moved to.
If the target is a SimpleButton instance, the button displays the
upState
display object as the default behavior.
The
mouseOut
event is dispatched each time the mouse leaves the
area of any child object of the display object container, even if the mouse remains over another
child object of the display object container. This is different behavior than the purpose of the
rollOut
event, which is to simplify the
coding of rollover behaviors for display object containers with children. When the mouse leaves
the area of a display object or the area of any of its children to go to an object that is not
one of its children, the display object dispatches the
rollOut
event.The
rollOut
events are dispatched consecutively
up the parent chain of the object, starting with the object and ending with the highest parent that is neither the root nor an
ancestor of the
relatedObject
.
Defines the value of the
type
property of a
mouseOut
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
relatedObject
| The display list object to which the pointing device now points. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MOUSE_OVER| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user moves a pointing device over an InteractiveObject instance.
The
relatedObject
is the object that was previously under
the pointing device.
If the target is a SimpleButton instance, the object displays the
overState
or
upState
display object, depending on whether the mouse button is down, as the default behavior.
The
mouseOver
event is dispatched each time the mouse enters the area of any child object of the display object container,
even if the mouse was already over another child object of the display object container.
This is different behavior than the purpose of the
rollOver
event, which is to simplify the coding of rollout behaviors for
display object containers with children. When the mouse enters the area of a display object or the area of any of its children from an object
that is not one of its children, the display object dispatches the
rollOver
event.
The
rollOver
events are dispatched consecutively down the parent chain of the object,
starting with the highest parent that is neither the root nor an ancestor of the
relatedObject
and ending with the object.
Defines the value of the
type
property of a
mouseOver
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
relatedObject
| The display list object to which the pointing device was pointing. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MOUSE_UP| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when a user releases the pointing device button over an
InteractiveObject instance.
If the target is a SimpleButton instance, the object displays the
upState
display object.
If the target is a selectable text field, the text field ends selection as the default
behavior.
Defines the value of the
type
property of a
mouseUp
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.MOUSE_WHEEL| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when a mouse wheel is spun over an InteractiveObject instance.
If the target is a text field, the text scrolls as the default behavior.
Defines the value of the
type
property of a
mouseWheel
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
delta
| The number of lines that that each notch on the mouse wheel represents. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_COMPLETE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture.
The event's dropAction property indicates the action set
by the drag target object; a value of "none" (
DragActions.NONE
)
indicates that the drop was canceled or was not accepted.
The
nativeDragComplete
event handler is a convenient place
to update the state of the initiating display object, for example, by removing
an item from a list (on an drag action of "move"), or by changing the visual
properties.
NativeDragEvent.NATIVE_DRAG_COMPLETE defines the value of the
type
property of a
nativeDragComplete
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
clipboard
| The Clipboard object containing the dragged data. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_DROP| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched by the target InteractiveObject when a dragged object is
dropped on it and the drop has been accepted with a call to
DragManager.acceptDragDrop().
Access the dropped data using the event object
clipboard
property.
The handler for this event should set the
DragManager.dropAction
property to provide feedback to the initiator object about which drag action
was taken. If no value is set, the DragManager will select a default value
from the list of allowed actions.
NativeDragEvent.NATIVE_DRAG_DROP defines the value of the
type
property of a
nativeDragDrop
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
true
; canceling this event cancels the drag operation.
|
clipboard
| The Clipboard object containing the dragged data. The clipboard can be read even if the object dispatching this event is not in the same security domain as the initiator. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_ENTER| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched by an InteractiveObject when a drag gesture enters its boundary.
Handle either the
nativeDragEnter
or
nativeDragOver
events to allow the display object to become the drop target.
To determine whether the dispatching display object can accept the drop,
check the suitability of the data in
clipboard
property of
the event object, and the allowed drag actions in the
allowedActions
property.
NativeDragEvent.NATIVE_DRAG_ENTER defines the value of the
type
property of a
nativeDragEnter
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
clipboard
| The Clipboard object containing the dragged data. The clipboard can be read only if the object dispatching this event is in the same security domain as the initiator. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_EXIT| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched by an InteractiveObject when a drag gesture leaves its boundary.
NativeDragEvent.NATIVE_DRAG_EXIT defines the value of the
type
property of a
nativeDragExit
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
clipboard
| The Clipboard object containing the dragged data. The clipboard can be read only if the object dispatching this event is in the same security domain as the initiator. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_OVER| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched by an InteractiveObject continually while a drag gesture remains within its
boundary.
nativeDragOver
events are dispatched whenever the mouse is moved. On Windows and
Mac, they are also dispatched on a short timer interval even when the mouse has not moved.
Handle either the
nativeDragOver
or
nativeDragEnter
events to allow the display object to become the drop target.
To determine whether the dispatching display object can accept the drop,
check the suitability of the data in
clipboard
property of
the event object, and the allowed drag actions in the
allowedActions
property.
NativeDragEvent.NATIVE_DRAG_OVER defines the value of the
type
property of a
nativeDragOver
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
true
; canceling this event cancels the drag operation.
|
clipboard
| The Clipboard object containing the dragged data. The clipboard can be read only if the object dispatching this event is in the same security domain as the initiator. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_START| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched at the beginning of a drag operation by the InteractiveObject that is
specified as the drag initiator in the DragManager.doDrag() call.
NativeDragEvent.NATIVE_DRAG_START defines the value of the
type
property of a
nativeDragStart
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
true
; canceling this event cancels the drag operation.
|
clipboard
| The Clipboard object containing the dragged data. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.NativeDragEventproperty NativeDragEvent.type = flash.events.NativeDragEvent.NATIVE_DRAG_UPDATE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched during a drag operation by the InteractiveObject that is
specified as the drag initiator in the DragManager.doDrag() call.
nativeDragUpdate
events are not dispatched on Linux.
NativeDragEvent.NATIVE_DRAG_UPDATE defines the value of the
type
property of a
nativeDragUpdate
event object.
This event has the following properties:
| Property | Value |
|---|
allowedActions
| The NativeDragOptions object specifying the actions relevant to this drag operation. |
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
clipboard
| The Clipboard object containing the dragged data. |
dropAction
|
The action chosen by the drop target (or
none
if no action was set).
|
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.PASTE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the user activates the platform specific accelerator key combination for a paste operation
or selects 'Paste' from the text context menu.
This event is dispatched to the object that currently has focus.
If the object that currently has focus is a TextField, the default behavior of this event is to cause
the contents of the clipboard to be pasted into the text field at the current insertion point
replacing any currently selected text in the text field.
The
Event.PASTE
constant defines the value of the
type
property of a
paste
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
Any InteractiveObject instance with a listener registered for the
paste
event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.RIGHT_CLICK| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user presses and releases the right button of the user's
pointing device over the same InteractiveObject. For a
rightClick
event to occur, it must always follow this series of
events in the order of occurrence:
rightMouseDown
event, then
rightMouseUp
. The target object
must be identical for both of these events; otherwise the
rightClick
event does not
occur. Any number of other mouse events can occur at any time between the
rightMouseDown
or
rightMouseUp
events; the
rightClick
event
still occurs.
Defines the value of the
type
property of a
rightClick
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the right mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; there is no default behavior to cancel.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.RIGHT_MOUSE_DOWN| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user presses the pointing device button over an InteractiveObject instance.
Defines the value of the
type
property of a
rightMouseDown
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the right mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.RIGHT_MOUSE_UP| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 |
Dispatched when a user releases the pointing device button over an
InteractiveObject instance.
Defines the value of the
type
property of a
rightMouseUp
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
true
|
buttonDown
|
true
if the right mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; the default behavior cannot be canceled.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl key is active;
false
if it is inactive.
|
clickCount
| Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence. |
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.ROLL_OUT| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user moves a pointing device away from an InteractiveObject
instance. The event target is the object previously under the pointing device or a parent of
that object. The
relatedObject
is the object that the pointing device has moved to.
The
rollOut
events are dispatched consecutively up the parent chain of the object,
starting with the object and ending with the highest parent that is neither the root nor an
ancestor of the
relatedObject
.
The purpose of the
rollOut
event is to simplify the
coding of rollover behaviors for display object containers with children. When the mouse leaves
the area of a display object or the area of any of its children to go to an object that is not
one of its children, the display object dispatches the
rollOut
event. This is different behavior
than that of the
mouseOut
event, which is dispatched each time the mouse leaves the
area of any child object of the display object container, even if the mouse remains over another
child object of the display object container.
Defines the value of the
type
property of a
rollOut
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
false
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; there is no default behavior to cancel.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
relatedObject
| The display list object to which the pointing device now points. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.MouseEventproperty MouseEvent.type = flash.events.MouseEvent.ROLL_OVER| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the user moves a pointing device over an InteractiveObject instance.
The event target is the object under the pointing device or a parent of that object.
The
relatedObject
is the object that was previously under the pointing
device. The
rollOver
events are dispatched consecutively down the parent
chain of the object, starting with the highest parent that is neither the root
nor an ancestor of the
relatedObject
and ending with the object.
The purpose of the
rollOver
event is to simplify the coding of rollout behaviors for
display object containers with children. When the mouse enters the area of a display
object or the area of any of its children from an object that is not one of its
children, the display object dispatches the
rollOver
event. This is different behavior
than that of the
mouseOver
event, which is dispatched each time the mouse
enters the area of any child object of the display object container, even if the mouse
was already over another child object of the display object container.
Defines the value of the
type
property of a
rollOver
event object.
This event has the following properties:
| Property | Value |
|---|
altKey
|
true
if the Alt key is active (Windows or Linux).
|
bubbles
|
false
|
buttonDown
|
true
if the primary mouse button is pressed;
false
otherwise.
|
cancelable
|
false
; there is no default behavior to cancel.
|
commandKey
|
true
on the Mac if the Command key is active;
false
if it is inactive. Always
false
on Windows.
|
controlKey
|
true
if the Ctrl or Control key is active;
false
if it is inactive.
|
ctrlKey
|
true
on Windows or Linux if the Ctrl key is active.
true
on Mac if either the Ctrl key or the Command key is active. Otherwise,
false
.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
relatedObject
| The display list object to which the pointing device was pointing. |
localX
| The horizontal coordinate at which the event occurred relative to the containing sprite. |
localY
| The vertical coordinate at which the event occurred relative to the containing sprite. |
shiftKey
|
true
if the Shift key is active;
false
if it is inactive.
|
stageX
| The horizontal coordinate at which the event occurred in global stage coordinates. |
stageY
| The vertical coordinate at which the event occurred in global stage coordinates. |
target
|
The InteractiveObject instance under the pointing device.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.SELECT_ALL| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the user activates the platform specific accelerator key combination for a select all operation
or selects 'Select All' from the text context menu.
This event is dispatched to the object that currently has focus.
If the object that currently has focus is a TextField, the default behavior of this event is to cause
all the contents of the text field to be selected.
The
Event.SELECT_ALL
constant defines the value of the
type
property of a
selectAll
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
false
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
Any InteractiveObject instance with a listener registered for the
selectAll
event.
|
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.TAB_CHILDREN_CHANGE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the value of the object's
tabChildren
flag changes.
The
Event.TAB_CHILDREN_CHANGE
constant defines the value of the
type
property of a
tabChildrenChange
event object.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
The object whose tabChildren flag has changed.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.TAB_ENABLED_CHANGE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the object's
tabEnabled
flag changes.
The
Event.TAB_ENABLED_CHANGE
constant defines the value of the
type
property of a
tabEnabledChange
event object.
The
tabEnabledChange
event applies to the ActionScript 3.0 display list
and is not relevant to JavaScript code.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
The InteractiveObject whose tabEnabled flag has changed.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
Event Object Type: flash.events.Eventproperty Event.type = flash.events.Event.TAB_INDEX_CHANGE| Language Version: | ActionScript 3.0 |
| Runtime Versions: | AIR 1.0 Flash Player 9 |
Dispatched when the value of the object's
tabIndex
property changes.
The
Event.TAB_INDEX_CHANGE
constant defines the value of the
type
property of a
tabIndexChange
event object.
The
tabIndexChange
event applies to the ActionScript 3.0 display list
and is not relevant to JavaScript code.
This event has the following properties:
| Property | Value |
|---|
bubbles
|
true
|
cancelable
|
false
; there is no default behavior to cancel.
|
currentTarget
| The object that is actively processing the Event
object with an event listener. |
target
|
The object whose tabIndex has changed.
The
target
is not always the object in the display list
that registered the event listener. Use the
currentTarget
property to access the object in the display list that is currently processing the event.
|
The following example uses the
InteractiveObjectExample
class, which in
turn uses the
ChildSprite
class to draw a rectangle and then manipulate that rectangle
based on various mouse events. This task is accomplished by performing the following steps:
-
In the
InteractiveObjectExample
constructor, a new ChildSprite object of type Sprite
called
child
is created, which calls the ChildSprite constructor method to draw the shape
and add mouse events for the shape (as explained in the following steps). The
child
object is added to the top of the display list at coordinates
x = 0, y = 0
.
-
In the
ChildSprite
class, declare the
size
and
overSize
properties that are used later in the
draw()
method and
MouseEvent methods.
- Declare properties that set the background color to orange, the mouse-over color to
dark yellow, and the mouse-down color to light blue.
-
In the
ChildSprite
constructor, an orange square is drawn by using methods from
the Graphics class and the
draw()
method.
-
The constructor adds four MouseEvent event listener methods:
-
mouseOverHandler
: redraws a larger 60 x 60 pixel square with a dark-yellow color
at the original coordinates.
-
mouseOutHandler
: returns the square to its original size and color.
-
mouseDownHandler
: redraws a larger 60 x 60 pixel square with a light-blue color
at the original coordinates.
-
mouseUpHandler
: same as
mouseOverHandler
.
package {
import flash.display.Sprite;
public class InteractiveObjectExample extends Sprite {
public function InteractiveObjectExample() {
var child:Sprite = new ChildSprite();
addChild(child);
}
}
}
import flash.display.Sprite;
import flash.events.MouseEvent;
class ChildSprite extends Sprite {
private var size:uint = 50;
private var overSize:uint = 60;
private var backgroundColor:uint = 0xFFCC00;
private var overColor:uint = 0xCCFF00;
private var downColor:uint = 0x00CCFF;
public function ChildSprite() {
buttonMode = true;
draw(size, size, backgroundColor);
addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
}
private function draw(w:uint, h:uint, bgColor:uint):void {
graphics.clear();
graphics.beginFill(bgColor);
graphics.drawRect(0, 0, w, h);
graphics.endFill();
}
public function mouseOverHandler(event:MouseEvent):void {
trace("mouseOverHandler");
draw(overSize, overSize, overColor);
}
public function mouseOutHandler(event:MouseEvent):void {
trace("mouseOutHandler");
draw(size, size, backgroundColor);
}
public function mouseDownHandler(event:MouseEvent):void {
trace("mouseDownHandler");
draw(overSize, overSize, downColor);
}
public function mouseUpHandler(event:MouseEvent):void {
trace("mouseUpHandler");
draw(overSize, overSize, overColor);
}
}
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Thu Nov 20 2008, 04:03 AM -08:00