| Package | com.alexomara.ane.AIRControl |
| Class | public class AIRControl |
| Inheritance | AIRControl Object |
| Implements | flash.events.IEventDispatcher |
This class cannot be instantiated and will throw an error if attempted. All properties and methods must be used statically.
| Property | Defined By | ||
|---|---|---|---|
| controllersTotal : uint [static] [read-only]
The total controllers currently connected. | AIRControl | ||
| debugOutput : Function = null [static]
Set to a function that takes a single string argument to get debug output. | AIRControl | ||
| Method | Defined By | ||
|---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void [static]
| AIRControl | ||
controller(index:uint):AIRControlController [static]
Returns the controller at a specific index. | AIRControl | ||
dispatchEvent(event:Event):Boolean [static]
| AIRControl | ||
dispose():void [static]
Detaches all the controllers and disposes of the native extension context. | AIRControl | ||
hasEventListener(type:String):Boolean [static]
| AIRControl | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [static]
| AIRControl | ||
update():void [static]
Updates the controller states. | AIRControl | ||
willTrigger(type:String):Boolean [static]
| AIRControl | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched on controller attach. | AIRControl | |||
| Dispatched on controller detach. | AIRControl | |||
| Constant | Defined By | ||
|---|---|---|---|
| REVISION : Number = 0.0 [static]
The revision and build numbers of this extension. | AIRControl | ||
| VERSION : Number = 1.1 [static]
The major and minor versions of this extension. | AIRControl | ||
| controllersTotal | property |
controllersTotal:uint [read-only] The total controllers currently connected.
public static function get controllersTotal():uintSee also
| debugOutput | property |
public static var debugOutput:Function = nullSet to a function that takes a single string argument to get debug output. Set to null to disable.
| addEventListener | () | method |
public static function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Parameters
type:String | |
listener:Function | |
useCapture:Boolean (default = false) | |
priority:int (default = 0) | |
useWeakReference:Boolean (default = false) |
See also
| controller | () | method |
public static function controller(index:uint):AIRControlControllerReturns the controller at a specific index.
Game controller index positions are dynamic and change when controllers of lower index are detached. If a controller is detached, higher indexed controllers will shift lower to fill the space. If the controller is reattached, it is appended to the end of the list.
To avoid issues with referencing disconnected controllers, it is better to match controllers with CONTROLLER_ATTACH and CONTROLLER_DETACH.
Parameters
index:uint — The index of the controller element.
|
AIRControlController — The controller at the specified index or null.
|
See also
| dispatchEvent | () | method |
public static function dispatchEvent(event:Event):Boolean
Parameters
event:Event |
Boolean |
See also
| dispose | () | method |
public static function dispose():voidDetaches all the controllers and disposes of the native extension context.
If the extensions will not be used for a period of time, this can be used to free up memory. Each currently connected controller will fire the CONTROLLER_DETACH event counting down.
See also
| hasEventListener | () | method |
public static function hasEventListener(type:String):Boolean
Parameters
type:String |
Boolean |
See also
| removeEventListener | () | method |
public static function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Parameters
type:String | |
listener:Function | |
useCapture:Boolean (default = false) |
See also
| update | () | method |
public static function update():voidUpdates the controller states.
Calls the method in the native code to get the current state of the controllers, updates all the controllers, and dispatches events. This function must be called manually every time the application should recieve updated controller information such as on ENTER_FRAME or EXIT_FRAME.
This function will also create the native extension context on first call and any first calls following the dispose method.
See also
| willTrigger | () | method |
public static function willTrigger(type:String):Boolean
Parameters
type:String |
Boolean |
See also
| AIRControlEvent.controllerAttach | Event |
com.alexomara.ane.AIRControl.events.AIRControlEventcom.alexomara.ane.AIRControl.events.AIRControlEventDispatched on controller attach.
| AIRControlEvent.controllerDetach | Event |
com.alexomara.ane.AIRControl.events.AIRControlEventcom.alexomara.ane.AIRControl.events.AIRControlEventDispatched on controller detach.
| REVISION | Constant |
public static const REVISION:Number = 0.0The revision and build numbers of this extension.
| VERSION | Constant |
public static const VERSION:Number = 1.1The major and minor versions of this extension.