import { Rectangle } from "@awayjs/core"; import { DisplayObject } from "./DisplayObject"; import { DisplayObject as AwayDisplayObject } from "@awayjs/scene"; export declare class InteractiveObject extends DisplayObject { /** these should be able to get setup: // listen on key directly * Dispatched when the user releases a key. * @eventType flash.events.KeyboardEvent.KEY_UP [Event(name="keyUp", type="flash.events.KeyboardEvent")] * Dispatched when the user presses a key. * @eventType flash.events.KeyboardEvent.KEY_DOWN [Event(name="keyDown", type="flash.events.KeyboardEvent")] // listen on awayjs adapter and translate * Dispatched when a user releases the pointing device button over an * InteractiveObject instance. * @eventType flash.events.MouseEvent.RIGHT_MOUSE_UP [Event(name="rightMouseUp", type="flash.events.MouseEvent")] * Dispatched when a user presses the pointing device button over an InteractiveObject instance. * @eventType flash.events.MouseEvent.RIGHT_MOUSE_DOWN [Event(name="rightMouseDown", type="flash.events.MouseEvent")] * Dispatched when a user presses and releases the right button of the user's * pointing device over the same InteractiveObject. * @eventType flash.events.MouseEvent.RIGHT_CLICK [Event(name="rightClick", type="flash.events.MouseEvent")] * Dispatched when a user releases the pointing device button over an * InteractiveObject instance. * @eventType flash.events.MouseEvent.MIDDLE_MOUSE_UP [Event(name="middleMouseUp", type="flash.events.MouseEvent")] * Dispatched when a user presses the middle pointing device button over an InteractiveObject instance. * @eventType flash.events.MouseEvent.MIDDLE_MOUSE_DOWN [Event(name="middleMouseDown", type="flash.events.MouseEvent")] * Dispatched when a user presses and releases the middle button of the user's * pointing device over the same InteractiveObject. * @eventType flash.events.MouseEvent.MIDDLE_CLICK [Event(name="middleClick", type="flash.events.MouseEvent")] * Dispatched when the user moves a pointing device over an InteractiveObject instance. * @eventType flash.events.MouseEvent.ROLL_OVER [Event(name="rollOver", type="flash.events.MouseEvent")] * Dispatched when the user moves a pointing device away from an InteractiveObject * instance. * @eventType flash.events.MouseEvent.ROLL_OUT [Event(name="rollOut", type="flash.events.MouseEvent")] * Dispatched when a mouse wheel is spun over an InteractiveObject instance. * @eventType flash.events.MouseEvent.MOUSE_WHEEL [Event(name="mouseWheel", type="flash.events.MouseEvent")] * Dispatched when a user releases the pointing device button over an * InteractiveObject instance. * @eventType flash.events.MouseEvent.MOUSE_UP [Event(name="mouseUp", type="flash.events.MouseEvent")] * Dispatched when the user moves a pointing device over an InteractiveObject instance. * @eventType flash.events.MouseEvent.MOUSE_OVER [Event(name="mouseOver", type="flash.events.MouseEvent")] * Dispatched when the user moves a pointing device away from an InteractiveObject instance. * @eventType flash.events.MouseEvent.MOUSE_OUT [Event(name="mouseOut", type="flash.events.MouseEvent")] * Dispatched when a user moves the pointing device while it is over an InteractiveObject. * @eventType flash.events.MouseEvent.MOUSE_MOVE [Event(name="mouseMove", type="flash.events.MouseEvent")] * Dispatched when a user presses the pointing device button over an InteractiveObject instance. * @eventType flash.events.MouseEvent.MOUSE_DOWN [Event(name="mouseDown", type="flash.events.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. * @eventType flash.events.MouseEvent.DOUBLE_CLICK [Event(name="doubleClick", type="flash.events.MouseEvent")] * Dispatched when a user presses and releases the main button of the user's * pointing device over the same InteractiveObject. * @eventType flash.events.MouseEvent.CLICK [Event(name="click", type="flash.events.MouseEvent")] */ /** * Dispatched immediately after the soft keyboard is lowered. * @eventType flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE [Event(name="softKeyboardDeactivate", type="flash.events.SoftKeyboardEvent")] * Dispatched immediately after the soft keyboard is raised. * @eventType flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE [Event(name="softKeyboardActivate", type="flash.events.SoftKeyboardEvent")] * Dispatched immediately before the soft keyboard is raised. * @eventType flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING [Event(name="softKeyboardActivating", type="flash.events.SoftKeyboardEvent")] * Dispatched when a user enters one or more * characters of text. * @eventType flash.events.TextEvent.TEXT_INPUT [Event(name="textInput", type="flash.events.TextEvent")] /// This event is dispatched to any client app that supports inline input with an IME [Event(name="imeStartComposition", type="flash.events.IMEEvent")] * Dispatched when a user gesture triggers the context menu associated with this interactive * object in an AIR application. * @eventType flash.events.MouseEvent.CONTEXT_MENU [Event(name="contextMenu", type="flash.events.MouseEvent")] * Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture. * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_COMPLETE [Event(name="nativeDragComplete", type="flash.events.NativeDragEvent")] * Dispatched during a drag operation by the InteractiveObject that is * specified as the drag initiator in the DragManager.doDrag() call. * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_UPDATE [Event(name="nativeDragUpdate", type="flash.events.NativeDragEvent")] * Dispatched at the beginning of a drag operation by the InteractiveObject that is * specified as the drag initiator in the DragManager.doDrag() call. * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_START [Event(name="nativeDragStart", type="flash.events.NativeDragEvent")] * Dispatched by an InteractiveObject when a drag gesture leaves its boundary. * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_EXIT [Event(name="nativeDragExit", type="flash.events.NativeDragEvent")] * 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(). * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_DROP [Event(name="nativeDragDrop", type="flash.events.NativeDragEvent")] * Dispatched by an InteractiveObject continually while a drag gesture remains within its * boundary. * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_OVER [Event(name="nativeDragOver", type="flash.events.NativeDragEvent")] * Dispatched by an InteractiveObject when a drag gesture enters its boundary. * @eventType flash.events.NativeDragEvent.NATIVE_DRAG_ENTER * Dispatched when the value of the object's tabIndex property changes. * @eventType flash.events.Event.TAB_INDEX_CHANGE [Event(name="tabIndexChange", type="flash.events.Event")] * Dispatched when the object's tabEnabled flag changes. * @eventType flash.events.Event.TAB_ENABLED_CHANGE [Event(name="tabEnabledChange", type="flash.events.Event")] * Dispatched when the value of the object's tabChildren flag changes. * @eventType flash.events.Event.TAB_CHILDREN_CHANGE [Event(name="tabChildrenChange", type="flash.events.Event")] * Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three * fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen). * @eventType flash.events.TransformGestureEvent.GESTURE_SWIPE [Event(name="gestureSwipe", type="flash.events.TransformGestureEvent")] * Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two * fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen). * @eventType flash.events.TransformGestureEvent.GESTURE_ZOOM [Event(name="gestureZoom", type="flash.events.TransformGestureEvent")] * Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers * and rotating them over a display object on a mobile phone or tablet with a touch screen). * @eventType flash.events.TransformGestureEvent.GESTURE_ROTATE [Event(name="gestureRotate", type="flash.events.TransformGestureEvent")] * Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps * on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item * on a mobile phone or tablet with a touch screen). * @eventType flash.events.PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP [Event(name="gesturePressAndTap", type="flash.events.PressAndTapGestureEvent")] * Dispatched when the user moves a point of contact over the InteractiveObject instance * on a touch-enabled device (such as moving a finger from left to right over a display object * on a mobile phone or tablet with a touch screen). * @eventType flash.events.TransformGestureEvent.GESTURE_PAN [Event(name="gesturePan", type="flash.events.TransformGestureEvent")] * Dispatched when the user presses two points of contact over the same InteractiveObject instance * on a touch-enabled device (such as presses and releases two fingers over a display object * on a mobile phone or tablet with a touch screen). * @eventType flash.events.GestureEvent.GESTURE_TWO_FINGER_TAP [Event(name="gestureTwoFingerTap", type="flash.events.GestureEvent")] * 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 (such as presses and releases a finger from a single point over a display object * on a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_TAP [Event(name="touchTap", type="flash.events.TouchEvent")] * Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device * (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_ROLL_OVER [Event(name="touchRollOver", type="flash.events.TouchEvent")] * Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device * (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_ROLL_OUT [Event(name="touchRollOut", type="flash.events.TouchEvent")] * Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device * (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_OVER [Event(name="touchOver", type="flash.events.TouchEvent")] * Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device * (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_OUT [Event(name="touchOut", type="flash.events.TouchEvent")] * Dispatched when the user moves the point of contact with a touch-enabled device (such as drags a finger across a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_MOVE [Event(name="touchMove", type="flash.events.TouchEvent")] * Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_END [Event(name="touchEnd", type="flash.events.TouchEvent")] * Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen). * @eventType flash.events.TouchEvent.TOUCH_BEGIN [Event(name="touchBegin", type="flash.events.TouchEvent")] * Dispatched when the user attempts to change focus by using a pointer device. * @eventType flash.events.FocusEvent.MOUSE_FOCUS_CHANGE [Event(name="mouseFocusChange", type="flash.events.FocusEvent")] * Dispatched when the user attempts to change focus by using keyboard navigation. * @eventType flash.events.FocusEvent.KEY_FOCUS_CHANGE * * Dispatched after a display object loses focus. * @eventType flash.events.FocusEvent.FOCUS_OUT [Event(name="focusOut", type="flash.events.FocusEvent")] * Dispatched after a display object gains focus. * @eventType flash.events.FocusEvent.FOCUS_IN [Event(name="focusIn", type="flash.events.FocusEvent")] * 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. * @eventType flash.events.Event.SELECT_ALL [Event(name="selectAll", type="flash.events.Event")] * Dispatched when the user activates the platform-specific accelerator key combination for a paste operation * or selects 'Paste' from the text context menu. * @eventType flash.events.Event.PASTE [Event(name="paste", type="flash.events.Event")] * Dispatched when the user activates the platform-specific accelerator key combination for a cut operation * or selects 'Cut' from the text context menu. * @eventType flash.events.Event.CUT [Event(name="cut", type="flash.events.Event")] * Dispatched when the user activates the platform-specific accelerator key combination for a copy operation * or selects 'Copy' from the text context menu. * @eventType flash.events.Event.COPY [Event(name="copy", type="flash.events.Event")] * Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. * @eventType flash.events.Event.CLEAR [Event(name="clear", type="flash.events.Event")] */ /** * 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. * *
You cannot instantiate the InteractiveObject class directly. A call to the
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, TextField, or MovieClip classes.
* * EXAMPLE: * * The following example uses the