The InteractiveObject class is the abstract base class for all display objects with which the user can interact, using the mouse, keyboard, or other user input device.

The InteractiveObject class itself does not include any APIs for rendering content onscreen. To create a custom subclass of the InteractiveObject class, extend one of the subclasses that do have APIs for rendering content onscreen, such as the Sprite, SimpleButton, or TextField classes.

Inheritance
Implemented by

Constants

keyDownEvent EventStreamProvider<KeyboardEvent>

const EventStreamProvider<KeyboardEvent>(KeyboardEvent.KEY_DOWN)
keyUpEvent EventStreamProvider<KeyboardEvent>

const EventStreamProvider<KeyboardEvent>(KeyboardEvent.KEY_UP)
mouseClickEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.CLICK)
mouseContextMenu EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.CONTEXT_MENU)
mouseDoubleClickEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.DOUBLE_CLICK)
mouseDownEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MOUSE_DOWN)
mouseMiddleClickEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MIDDLE_CLICK)
mouseMiddleDownEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MIDDLE_MOUSE_DOWN)
mouseMiddleUpEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MIDDLE_MOUSE_UP)
mouseMoveEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MOUSE_MOVE)
mouseOutEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MOUSE_OUT)
mouseOverEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MOUSE_OVER)
mouseRightClickEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.RIGHT_CLICK)
mouseRightDownEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.RIGHT_MOUSE_DOWN)
mouseRightUpEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.RIGHT_MOUSE_UP)
mouseRollOutEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.ROLL_OUT)
mouseRollOverEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.ROLL_OVER)
mouseUpEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MOUSE_UP)
mouseWheelEvent EventStreamProvider<MouseEvent>

const EventStreamProvider<MouseEvent>(MouseEvent.MOUSE_WHEEL)
textInputEvent EventStreamProvider<TextEvent>

const EventStreamProvider<TextEvent>(TextEvent.TEXT_INPUT)
touchBeginEvent EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_BEGIN)
touchCancelEvent EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_CANCEL)
touchEndEvent EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_END)
touchMoveEvent EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_MOVE)
touchOutEvent EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_OUT)
touchOverEvent EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_OVER)
touchRollOut EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_ROLL_OUT)
touchRollOver EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_ROLL_OVER)
touchTap EventStreamProvider<TouchEvent>

const EventStreamProvider<TouchEvent>(TouchEvent.TOUCH_TAP)

Constructors

InteractiveObject()

Properties

alpha → num

The alpha transparency value of the object specified.

read / write, inherited
blendMode BlendMode

A value from the BlendMode class that specifies which blend mode to use.

read / write, inherited
bounds Rectangle<num>

Returns a rectangle that defines the area of this display object in this display object's local coordinates.

read-only, inherited
boundsTransformed Rectangle<num>

Returns a rectangle that defines the area of this display object in this display object's parent coordinates.

read-only, inherited
cache RenderTextureQuad

This getter gives you access to the underlying RenderTextureQuad if a cache is applied to this display object. If no cache is applied this value is ´null´.

read-only, inherited
displayObjectID → int

read-only, inherited
doubleClickEnabled → bool

Specifies whether the object receives doubleClick events.

read / write
filters → List<BitmapFilter>

The filters currently associated with this display object.

read / write, inherited
globalTransformationMatrix Matrix

The global 2D transformation matrix of this display object.

read-only, inherited
globalTransformationMatrix3D Matrix3D

The global 3D transformation matrix of this display object.

read-only, inherited
hashCode → int

Get a hash code for this object.

read-only, inherited
height → num

The height of this display object with the applied transformation.

read / write, inherited
mask Mask

The calling display object is masked by the specified mask object.

read / write, inherited
mouseCursor → String

Defines the mouse cursor that is displayed on this interactive object.

read / write
mouseEnabled → bool

Specifies whether this object receives mouse, or other user input, messages.

read / write
mousePosition Point<num>

The position of the mouse relative to the local coordinate system of the display object.

read-only, inherited
mouseX → num

The x-coordinate of the mouse relative to the local coordinate system of the display object.

read-only, inherited
mouseY → num

The y-coordinate of the mouse relative to the local coordinate system of the display object.

read-only, inherited
name → String

The instance name of this display object.

read / write, inherited
off → bool

The availability and visibility of the display object.

read / write, inherited
onAdded EventStream<Event>

Dispatched when a display object is added to the display list.

read-only, inherited
onAddedToStage EventStream<Event>

Dispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained.

read-only, inherited
onEnterFrame EventStream<EnterFrameEvent>

Dispatched when a frame is entered.

read-only, inherited
onExitFrame EventStream<ExitFrameEvent>

Dispatched when a frame is exited. All frame scripts have been run.

read-only, inherited
onKeyDown EventStream<KeyboardEvent>

Dispatched when the user presses a key.

read-only
onKeyUp EventStream<KeyboardEvent>

Dispatched when the user releases a key.

read-only
onMouseClick EventStream<MouseEvent>

Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject.

read-only
onMouseContextMenu EventStream<MouseEvent>

Dispatched when a user gesture triggers the context menu associated with this interactive object.

read-only
onMouseDoubleClick EventStream<MouseEvent>

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.

read-only
onMouseDown EventStream<MouseEvent>

Dispatched when a user presses the pointing device button over an InteractiveObject instance.

read-only
onMouseMiddleClick EventStream<MouseEvent>

Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject.

read-only
onMouseMiddleDown EventStream<MouseEvent>

Dispatched when a user presses the middle pointing device button over an InteractiveObject instance.

read-only
onMouseMiddleUp EventStream<MouseEvent>

Dispatched when a user releases the pointing device button over an InteractiveObject instance.

read-only
onMouseMove EventStream<MouseEvent>

Dispatched when a user moves the pointing device while it is over an InteractiveObject.

read-only
onMouseOut EventStream<MouseEvent>

Dispatched when the user moves a pointing device away from an InteractiveObject instance.

read-only
onMouseOver EventStream<MouseEvent>

Dispatched when the user moves a pointing device over an InteractiveObject instance.

read-only
onMouseRightClick EventStream<MouseEvent>

Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject.

read-only
onMouseRightDown EventStream<MouseEvent>

Dispatched when a user presses the right button over an InteractiveObject instance.

read-only
onMouseRightUp EventStream<MouseEvent>

Dispatched when a user releases the right button over an InteractiveObject instance.

read-only
onMouseRollOut EventStream<MouseEvent>

Dispatched when the user moves a pointing device away from an InteractiveObject instance.

read-only
onMouseRollOver EventStream<MouseEvent>

Dispatched when the user moves a pointing device over an InteractiveObject instance.

read-only
onMouseUp EventStream<MouseEvent>

Dispatched when a user releases the pointing device button over an InteractiveObject instance.

read-only
onMouseWheel EventStream<MouseEvent>

Dispatched when a mouse wheel is spun over an InteractiveObject instance.

read-only
onRemoved EventStream<Event>

Dispatched when a display object is about to be removed from the display list.

read-only, inherited
onRemovedFromStage EventStream<Event>

Dispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained.

read-only, inherited
onRender EventStream<RenderEvent>

Dispatched when the display list is about to be updated and rendered.

read-only, inherited
onTextInput EventStream<TextEvent>

Dispatched when a user enters one or more characters of text.

read-only
onTouchBegin EventStream<TouchEvent>

Dispatched when the user first contacts a touch-enabled device.

read-only
onTouchCancel EventStream<TouchEvent>

Dispatched when the touch event is canceled.

read-only
onTouchEnd EventStream<TouchEvent>

Dispatched when the user removes contact with a touch-enabled device.

read-only
onTouchMove EventStream<TouchEvent>

Dispatched when the user touches the device, and is continuously dispatched until the point of contact is removed.

read-only
onTouchOut EventStream<TouchEvent>

Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device.

read-only
onTouchOver EventStream<TouchEvent>

Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device.

read-only
onTouchRollOut EventStream<TouchEvent>

Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device.

read-only
onTouchRollOver EventStream<TouchEvent>

Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device.

read-only
onTouchTap EventStream<TouchEvent>

Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device.

read-only
parent DisplayObjectParent

The DisplayObjectContainer object that contains this display object.

read-only, inherited
pivotX → num

The x-coordinate of the pivot point of this display object.

read / write, inherited
pivotY → num

The y-coordinate of the pivot point of this display object.

read / write, inherited
root DisplayObject

The top-most display object in the portion of the display list's tree structure.

read-only, inherited
rotation → num

The rotation of this display object, in radians, from its original orientation.

read / write, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
scaleX → num

The horizontal scale (percentage) of the object as applied from the pivot point.

read / write, inherited
scaleY → num

The vertical scale (percentage) of the object as applied from the pivot point.

read / write, inherited
skewX → num

The horizontal skew of this object.

read / write, inherited
skewY → num

The vertical skew of this object.

read / write, inherited
stage Stage

The Stage of this display object.

read-only, inherited
tabEnabled → bool

Specifies whether this object is in the tab order.

read / write
tabIndex → int

Specifies the tab ordering of objects.

read / write
transformationMatrix Matrix

The transformation matrix of this display object relative to this display object's parent.

read-only, inherited
useHandCursor → bool

read / write
userData → dynamic

The user-defined data associated with this display object.

read / write, inherited
visible → bool

The visibility and availability of the display object.

read / write, inherited
width → num

The width of this display object with the applied transformation.

read / write, inherited
x → num

The x-coordinate of is display object relative to the local coordinates of the parent DisplayObjectContainer.

read / write, inherited
y → num

The y-coordinate of this display object relative to the local coordinates of the parent DisplayObjectContainer.

read / write, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

addEventListener(String eventType, EventListener eventListener, { bool useCapture: false, int priority: 0 }) → StreamSubscription<Event>

Adds an event listener to receive events.

inherited
addTo(DisplayObjectParent parent) → void

Add this display object to the specified parent.

inherited
alignPivot([HorizontalAlign hAlign = HorizontalAlign.Center, VerticalAlign vAlign = VerticalAlign.Center ]) → void

Aligns the display object's pivot point relative to the current bounds.

inherited
applyCache(num x, num y, num width, num height, { bool debugBorder: false, num pixelRatio: 1.0 }) → void

Draws the specified area of this display object to an internal render texture and the engine will use this texture to optimize performance.

inherited
dispatchEvent(Event event) → void

Dispatches the event to all listening subscribers.

inherited
dispatchEventRaw(Event event, EventDispatcher target, EventPhase eventPhase) → void

Do not use the dispatchEventRaw method unless you want to override the way how events are dispatched for display list object. Please use dispatchEvent instead.

inherited
getBounds(DisplayObject targetSpace) Rectangle<num>

Returns the bounds of this display object relative to the specified targetSpace.

inherited
getTransformationMatrix(DisplayObject targetSpace) Matrix

The 2D transformation matrix relative to the given targetSpace.

inherited
getTransformationMatrix3D(DisplayObject targetSpace) Matrix3D

The 3D transformation matrix relative to the given targetSpace.

inherited
globalToLocal(Point<num> globalPoint, [ Point<num> returnPoint ]) Point<num>

Converts the point object from the Stage's global coordinates to this display object's local coordinates.

inherited
hasEventListener(String eventType, { bool useCapture: false }) → bool

Returns true if the EventDispatcher has event listeners. The useCapture paramenter defines if the event listeners should be registered for the capturing event phase or not.

inherited
hitTestInput(num localX, num localY) DisplayObject

Evaluates this display object to see if the coordinates localX and localY are inside this display object.

inherited
hitTestObject(DisplayObject other) → bool

Evaluates this display object to see if it overlaps or intersects with the bounding box of the other display object.

inherited
hitTestPoint(num x, num y, [ bool shapeFlag = false ]) → bool

Evaluates this display object to see if it overlaps or intersects with the point specified by the x and y parameters.

inherited
localToGlobal(Point<num> localPoint, [ Point<num> returnPoint ]) Point<num>

Converts the point object from this display object's local coordinates to the Stage global coordinates.

inherited
localToParent(Point<num> localPoint, [ Point<num> returnPoint ]) Point<num>

Converts the point object from this display object's local coordinates to this display object's parent coordinates.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
on<T extends Event>(String eventType) EventStream<T>

Returns an event stream of type eventType.

inherited
parentToLocal(Point<num> parentPoint, [ Point<num> returnPoint ]) Point<num>

Converts the point object from this display obejct's parent coordinates to this display object's local coordinates.

inherited
refreshCache() → void

Refreshes the cached area of this display object.

inherited
removeCache() → void

Removes the previously cached area of this display object.

inherited
removeEventListener(String eventType, EventListener eventListener, { bool useCapture: false }) → void

Removes an event listener to stop receiving events.

inherited
removeEventListeners(String eventType) → void

Removes all event listeners of a given event type.

inherited
removeFromParent() → void

Removes this display object from its parent.

inherited
render(RenderState renderState) → void

Renders this display object with the given renderState. The display object is rendered without its filters.

inherited
renderFiltered(RenderState renderState) → void

Renders this display object with the given renderState. The display object is rendered with its filters.

inherited
setTransform(num x, num y, [ num scaleX, num scaleY, num rotation, num skewX, num skewY, num pivotX, num pivotY ]) → void

Sets transformation properties.

inherited
toString() → String

Returns a string representation of this object.

inherited