openfl.events

Here are some selections from the OpenFL Developer's Guide to help you get started with the openfl.events package:

..
AccelerometerEvent

The Accelerometer class dispatches AccelerometerEvent objects when acceleration updates are obtained from the Accelerometer sensor installed on the device.

ActivityEvent

A Camera or Microphone object dispatches an ActivityEvent object whenever a camera or microphone reports that it has become active or inactive. There is only one type of activity event: ActivityEvent.ACTIVITY.

AsyncErrorEvent

An object dispatches an AsyncErrorEvent when an exception is thrown from native asynchronous code, which could be from, for example, LocalConnection, NetConnection, SharedObject, or NetStream. There is only one type of asynchronous error event: AsyncErrorEvent.ASYNC_ERROR.

ContextMenuEvent

An InteractiveObject dispatches a ContextMenuEvent object when the user opens or interacts with the context menu. There are two types of ContextMenuEvent objects: ContextMenuEvent.MENU_ITEM_SELECT ContextMenuEvent.MENU_SELECT

DNSResolverEvent

The DNSResolverEvent class represents the results of a Domain Name System (DNS) lookup operation.

DataEvent

An object dispatches a DataEvent object when raw data has completed loading. There are two types of data event: DataEvent.DATA: dispatched for data sent or received. DataEvent.UPLOAD_COMPLETE_DATA: dispatched when data is sent and the server has responded.

DatagramSocketDataEvent

A DatagramSocketDataEvent object is dispatched when Datagram socket has received data.

DeviceRotationEvent

The DeviceRotation class dispatches DeviceRotationEvent and returns roll, yaw, pitch and quaternion data when DeviceRotation updates are obtained from the combined readings from Accelerometer and Gyroscope sensors' readings installed on the device.

ErrorEvent

An object dispatches an ErrorEvent object when an error causes an asynchronous operation to fail.

Event

The Event class is used as the base class for the creation of Event objects, which are passed as parameters to event listeners when an event occurs.

EventDispatcher

The EventDispatcher class is the base class for all classes that dispatch events. The EventDispatcher class implements the IEventDispatcher interface and is the base class for the DisplayObject class. The EventDispatcher class allows any object on the display list to be an event target and as such, to use the methods of the IEventDispatcher interface.

EventPhase

The EventPhase class provides values for the eventPhase property of the Event class.

EventType

The EventType abstract type provides type safety when matching dispatch events with the correct type of listener

FileListEvent

A File object dispatches a FileListEvent object when a call to the getDirectoryListingAsync() method of a File object successfully enumerates a set of files and directories or when a user selects files after a call to the browseForOpenMultiple() method.

FocusEvent

An object dispatches a FocusEvent object when the user changes the focus from one object in the display list to another. There are four types of focus events:

FullScreenEvent

The Stage object dispatches a FullScreenEvent object whenever the Stage enters or leaves full-screen display mode. There is only one type of fullScreen event: FullScreenEvent.FULL_SCREEN.

GameInputEvent

The GameInputEvent class represents an event that is dispatched when a game input device has either been added or removed from the application platform. A game input device also dispatches events when it is turned on or off.

GeolocationEvent

A Geolocation object dispatches GeolocationEvent objects when it receives updates from the location sensor installed on the device.

HTTPStatusEvent

The application dispatches HTTPStatusEvent objects when a network request returns an HTTP status code.

IEventDispatcher

The IEventDispatcher interface defines methods for adding or removing event listeners, checks whether specific types of event listeners are registered, and dispatches events.

IOErrorEvent

An IOErrorEvent object is dispatched when an error causes input or output operations to fail.

InvokeEvent

The NativeApplication object of an OpenFL application dispatches an invoke event when the application is invoked.

KeyboardEvent

A KeyboardEvent object id dispatched in response to user input through a keyboard. There are two types of keyboard events: KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP

MouseEvent

A MouseEvent object is dispatched into the event flow whenever mouse events occur. A mouse event is usually generated by a user input device, such as a mouse or a trackball, that uses a pointer.

NativeProcessExitEvent

This event is dispatched by the NativeProcess object when the process exits. It is possible that this event will never be dispatched. For example, if the child process outlives the OpenFL application that created it, the event will not dispatch.

NativeWindowBoundsEvent

A NativeWindow object dispatches a NativeWindowBoundsEvent object when the size or location of the window changes.

NativeWindowDisplayStateEvent

A NativeWindow object dispatches events of the NativeWindowDisplayStateEvent class when the window display state changes.

NetStatusEvent

A NetConnection, NetStream, or SharedObject object dispatches NetStatusEvent objects when a it reports its status. There is only one type of status event: NetStatusEvent.NET_STATUS.

OutputProgressEvent

A FileStream object dispatches OutputProgressEvent objects as pendin asynchronous file write operations are performed. There is one type of output progress event: OutputProgressEvent.OUTPUT_PROGRESS.

PermissionEvent

This event is dispatched when permission status changes for certain operations.

ProgressEvent

A ProgressEvent object is dispatched when a load operation has begun or a socket has received data. These events are usually generated when SWF files, images or data are loaded into an application. There are two types of progress events: ProgressEvent.PROGRESS and ProgressEvent.SOCKET_DATA. Additionally, in AIR ProgressEvent objects are dispatched when a data is sent to or from a child process using the NativeProcess class.

RenderEvent

BETA**

SampleDataEvent

Dispatched when a Sound object requests new audio data or when a Microphone object has new audio data to provide. This event has two uses:

ScreenMouseEvent

The SystemTrayIcon object dispatches events of type ScreenMouseEvent in response to mouse interaction.

SecurityErrorEvent

An object dispatches a SecurityErrorEvent object to report the occurrence of a security error. Security errors reported through this class are generally from asynchronous operations, such as loading data, in which security violations may not manifest immediately. Your event listener can access the object's text property to determine what operation was attempted and any URLs that were involved. If there are no event listeners, the debugger version of Flash Player or the AIR Debug Launcher (ADL) application automatically displays an error message that contains the contents of the text property. There is one type of security error event: SecurityErrorEvent.SECURITY_ERROR.

ServerSocketConnectEvent

A ServerSocket object dispatches a ServerSocketConnectEvent object when a client attempts to connect to the server socket.

TextEvent

An object dispatches a TextEvent object when a user enters text in a text field or clicks a hyperlink in an HTML-enabled text field. There are two types of text events: TextEvent.LINK and TextEvent.TEXT_INPUT.

TimerEvent

A Timer object dispatches a TimerEvent objects whenever the Timer object reaches the interval specified by the Timer.delay property.

TouchEvent

The TouchEvent class lets you handle events on devices that detect user contact with the device (such as a finger on a touch screen). When a user interacts with a device such as a mobile phone or tablet with a touch screen, the user typically touches the screen with his or her fingers or a pointing device. You can develop applications that respond to basic touch events(such as a single finger tap) with the TouchEvent class. Create event listeners using the event types defined in this class. For user interaction with multiple points of contact (such as several fingers moving across a touch screen at the same time) use the related GestureEvent, PressAndTapGestureEvent, and TransformGestureEvent classes. And, use the properties and methods of these classes to construct event handlers that respond to the user touching the device.

UncaughtErrorEvent

An UncaughtErrorEvent object is dispatched by an instance of the UncaughtErrorEvents class when an uncaught error occurs. An uncaught error happens when an error is thrown outside of any try..catch blocks or when an ErrorEvent object is dispatched with no registered listeners. The uncaught error event functionality is often described as a "global error handler." The UncaughtErrorEvents object that dispatches the event is associated with either a LoaderInfo object or a Loader object. Use the following properties to access an UncaughtErrorEvents instance:

UncaughtErrorEvents

The UncaughtErrorEvents class provides a way to receive uncaught error events. An instance of this class dispatches an uncaughtError event when a runtime error occurs and the error isn't detected and handled in your code. Use the following properties to access an UncaughtErrorEvents instance:

VideoTextureEvent

Almost exactly StageVideoEvent.