AIRControl - Adobe AIR Game Controller Native Extension - API Documentation | All Packages | All Classes | Index | Frames No Frames |
AIRControlController

Package | com.alexomara.ane.AIRControl.controllers
Class | public class AIRControlController
Inheritance | AIRControlController flash.events.EventDispatcher

The class for AIRControl controllers.

This class is used for controllers objects which are created automatically and should not be instantiated manually.

See also

com.alexomara.ane.AIRControl.AIRControl

Public Properties

| Property | Defined By
--- | --- | ---
|  | axesTotal : uint [read-only] The total axes on the controller. | AIRControlController
|  | AXIS_R : int [read-only] The index of the axis with the specified letter or -1 if not available. | AIRControlController
|  | AXIS_U : int [read-only] The index of the axis with the specified letter or -1 if not available. | AIRControlController
|  | AXIS_V : int [read-only] The index of the axis with the specified letter or -1 if not available. | AIRControlController
|  | AXIS_X : int [read-only] The index of the axis with the specified letter or -1 if not available. | AIRControlController
|  | AXIS_Y : int [read-only] The index of the axis with the specified letter or -1 if not available. | AIRControlController
|  | AXIS_Z : int [read-only] The index of the axis with the specified letter or -1 if not available. | AIRControlController
|  | buttonsTotal : uint [read-only] The total buttons on the controller. | AIRControlController
|  | ID : uint [read-only] The unique identifier assigned to the controller. | AIRControlController
|  | name : String [read-only] The description of the controller. | AIRControlController
|  | povsTotal : uint [read-only] The total POV hat switches on the controller. | AIRControlController
|  | productID : uint [read-only] The unique identified of the product by the manufacturer of the controller. | AIRControlController
|  | vendorID : uint [read-only] The unique identified of the hardware manufacturer of the controller. | AIRControlController

Public Methods

| Method | Defined By
--- | --- | ---
|  | AIRControlController(ID:uint, axes:uint, povs:uint, buttons:uint, axesLetters:String, vendorID:uint, productID:uint, name:String) Creates a new AIRControlController object. | AIRControlController
|  | axis(index:uint):AIRControlControllerAxis Returns the axis at the specified index on the controller or null if out of bounds. | AIRControlController
|  | button(index:uint):AIRControlControllerButton Returns the button at the specified index on the controller or null if out of bounds. | AIRControlController
|  | pov(index:uint):AIRControlControllerPOV Returns the POV hat switch at the specified index on the controller or null if out of bounds. | AIRControlController

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | AIRControlControllerEvent.axisChange | Dispatched on axis state change. | AIRControlController
|  | AIRControlControllerEvent.buttonChange | Dispatched on button state change. | AIRControlController
|  | AIRControlControllerEvent.povChange | Dispatched on POV hat switch state change. | AIRControlController

Property Detail

axesTotal | property

`axesTotal:uint` [read-only]

The total axes on the controller.

- On Windows the maximum supported controller axes is 6.
- On Mac OS X there is no explicitly imposed limit.

Implementation
`public function get axesTotal():uint`

See also

axis()

AXIS_R | property |

`AXIS_R:int` [read-only]

The index of the axis with the specified letter or -1 if not available.

This property is only accurate on Windows and does not always reflect the axis that should logically be used for this purpose.

- On Windows the value corresponds to the axis letter Windows assigned to the axis.
- On Mac OS X the value is assigned incrementally.

Implementation
`public function get AXIS_R():int`

AXIS_U | property |

`AXIS_U:int` [read-only]

The index of the axis with the specified letter or -1 if not available.

This property is only accurate on Windows and does not always reflect the axis that should logically be used for this purpose.

- On Windows the value corresponds to the axis letter Windows assigned to the axis.
- On Mac OS X the value is assigned incrementally.

Implementation
`public function get AXIS_U():int`

AXIS_V | property |

`AXIS_V:int` [read-only]

The index of the axis with the specified letter or -1 if not available.

This property is only accurate on Windows and does not always reflect the axis that should logically be used for this purpose.

- On Windows the value corresponds to the axis letter Windows assigned to the axis.
- On Mac OS X the value is assigned incrementally.

Implementation
`public function get AXIS_V():int`

AXIS_X | property |

`AXIS_X:int` [read-only]

The index of the axis with the specified letter or -1 if not available.

This property is only accurate on Windows and does not always reflect the axis that should logically be used for this purpose.

- On Windows the value corresponds to the axis letter Windows assigned to the axis.
- On Mac OS X the value is assigned incrementally.

Implementation
`public function get AXIS_X():int`

AXIS_Y | property |

`AXIS_Y:int` [read-only]

The index of the axis with the specified letter or -1 if not available.

This property is only accurate on Windows and does not always reflect the axis that should logically be used for this purpose.

- On Windows the value corresponds to the axis letter Windows assigned to the axis.
- On Mac OS X the value is assigned incrementally.

Implementation
`public function get AXIS_Y():int`

AXIS_Z | property |

`AXIS_Z:int` [read-only]

The index of the axis with the specified letter or -1 if not available.

This property is only accurate on Windows and does not always reflect the axis that should logically be used for this purpose.

- On Windows the value corresponds to the axis letter Windows assigned to the axis.
- On Mac OS X the value is assigned incrementally.

Implementation
`public function get AXIS_Z():int`

buttonsTotal | property |

`buttonsTotal:uint` [read-only]

The total buttons on the controller.

- On Windows the maximum supported controller buttons is 32.
- On Mac OS X there is no explicitly imposed limit.

Implementation
`public function get buttonsTotal():uint`

See also

button()

ID | property |

`ID:uint` [read-only]

The unique identifier assigned to the controller.

This identifier is only necessarily unique among currently attached controllers. It cannot be used to reliably match a controller after it has been detached. This value has no direct relation to the controller index.

- On Windows the value is assigned to the controller offset from JOYSTICKID1.
- On Mac OS X the value is assigned incrementally on controller connection.

Implementation
`public function get ID():uint`

name | property |

`name:String` [read-only]

The description of the controller.

- On Windows the value is assigned from JOYCAPS.szRegKey.
- On Mac OS X the value is assigned from kIOHIDProductKey.

Implementation
`public function get name():String`

povsTotal | property |

`povsTotal:uint` [read-only]

The total POV hat switches on the controller.

- On Windows the maximum supported controller POV hat switches is 1.
- On Mac OS X there is no explicitly imposed limit.

Implementation
`public function get povsTotal():uint`

See also

pov()

productID | property |

`productID:uint` [read-only]

The unique identified of the product by the manufacturer of the controller.

This identifier can be used to determine the product by the manufacturer of the controller.

This property can be used in conjunction with ventorID to match a compatile controller after detach and attach.

- On Windows the value is assigned from JOYCAPS.wPid.
- On Mac OS X the value is assigned from kIOHIDProductIDKey.

Implementation
`public function get productID():uint`

See also

vendorID

vendorID | property |

`vendorID:uint` [read-only]

The unique identified of the hardware manufacturer of the controller.

This identifier can be used to determine the manufacturer of the controller.

This property can be used in conjunction with productID to match a compatile controller after detach and attach.

- On Windows the value is assigned from JOYCAPS.wMid.
- On Mac OS X the value is assigned from kIOHIDVendorIDKey.

Implementation
`public function get vendorID():uint`

See also

productID
Constructor Detail

AIRControlController | () | Constructor

`public function AIRControlController(ID:uint, axes:uint, povs:uint, buttons:uint, axesLetters:String, vendorID:uint, productID:uint, name:String)`

Creates a new AIRControlController object.

Parameters

| `ID:uint` — The unique identifier assigned to the controller.
| `axes:uint` — The total number of axes on the controller.
| `povs:uint` — The total number of POV hat switches on the controller.
| `buttons:uint` — The total number of buttons on the controller.
| `axesLetters:String` — The axes letters in the order they appear on the controller.
| `vendorID:uint` — The unique identified of the hardware manufacturer of the controller.
| `productID:uint` — The unique identified of the product by the manufacturer of the controller.
| `name:String` — The description of the controller.

Method Detail

axis | () | method

`public function axis(index:uint):AIRControlControllerAxis`

Returns the axis at the specified index on the controller or null if out of bounds.

- On Windows the maximum supported controller axes is 6.
- On Mac OS X there is no explicitly imposed limit.

Parameters

| `index:uint` — The index of the axis element.

Returns

| `AIRControlControllerAxis` — The axis at the specified index or null.

See also

axesTotal

button | () | method |

`public function button(index:uint):AIRControlControllerButton`

Returns the button at the specified index on the controller or null if out of bounds.

- On Windows the maximum supported controller buttons is 32.
- On Mac OS X there is no explicitly imposed limit.

Parameters

| `index:uint` — The index of the button element.

Returns

| `AIRControlControllerButton` — The button at the specified index or null.

See also

buttonsTotal

pov | () | method |

`public function pov(index:uint):AIRControlControllerPOV`

Returns the POV hat switch at the specified index on the controller or null if out of bounds.

- On Windows the maximum supported controller POV hat switches is 1.
- On Mac OS X there is no explicitly imposed limit.

Parameters

| `index:uint` — The index of the POV hat switch element.

Returns

| `AIRControlControllerPOV` — The POV hat switch at the specified index or null.

See also

povsTotal
Event Detail

AIRControlControllerEvent.axisChange | Event

Event Object Type: `com.alexomara.ane.AIRControl.events.AIRControlControllerEvent`
AIRControlControllerEvent.type property = `com.alexomara.ane.AIRControl.events.AIRControlControllerEvent`

Dispatched on axis state change.

AIRControlControllerEvent.buttonChange | Event |

Event Object Type: `com.alexomara.ane.AIRControl.events.AIRControlControllerEvent`
AIRControlControllerEvent.type property = `com.alexomara.ane.AIRControl.events.AIRControlControllerEvent`

Dispatched on button state change.

AIRControlControllerEvent.povChange | Event |

Event Object Type: `com.alexomara.ane.AIRControl.events.AIRControlControllerEvent`
AIRControlControllerEvent.type property = `com.alexomara.ane.AIRControl.events.AIRControlControllerEvent`

Dispatched on POV hat switch state change.

Mon Jul 22 2013, 09:56 PM -04:00