Package | org.wiiflash |
Class | public final class ClassicController |
Implements | flash.events.IEventDispatcher |
classicController
property of a Wiimote object.
var wiimote:Wiimote = new Wiimote(); myWiimote.addEventListener( WiimoteEvent.CONTROLLER_CONNECT, onClassicControllerConnected ); myWiimote.addEventListener( WiimoteEvent.CONTROLLER_DISCONNECT, onClassicControllerDisconnected );
myWiimote.classicController.addEventListener( ButtonEvent.HOME_PRESS, onHomePress ); myWiimote.classicController.addEventListener( ButtonEvent.HOME_RELEASE, onHomeRelease );
See also
Property | Defined by | ||
---|---|---|---|
a : Boolean [read-only]
Indicates if button A is pressed.
| ClassicController | ||
b : Boolean [read-only]
Indicates if button B is pressed.
| ClassicController | ||
down : Boolean [read-only]
Indicates if button Down is pressed.
| ClassicController | ||
home : Boolean [read-only]
Indicates if button Home is pressed.
| ClassicController | ||
l : Boolean [read-only]
Indicates if button L is pressed.
| ClassicController | ||
left : Boolean [read-only]
Indicates if button Left is pressed.
| ClassicController | ||
minus : Boolean [read-only]
Indicates if button - is pressed.
| ClassicController | ||
plus : Boolean [read-only]
Indicates if button + is pressed.
| ClassicController | ||
r : Boolean [read-only]
Indicates if button R is pressed.
| ClassicController | ||
right : Boolean [read-only]
Indicates if button Right is pressed.
| ClassicController | ||
stickXLeft : Number [read-only]
Value of the xleft stick-axis.
| ClassicController | ||
stickXRight : Number [read-only]
Value of the x right stick-axis.
| ClassicController | ||
stickYLeft : Number [read-only]
Value of the yleft stick-axis.
| ClassicController | ||
stickYRight : Number [read-only]
Value of the yright stick-axis.
| ClassicController | ||
up : Boolean [read-only]
Indicates if button Up is pressed.
| ClassicController | ||
x : Boolean [read-only]
Indicates if button X is pressed.
| ClassicController | ||
y : Boolean [read-only]
Indicates if button Y is pressed.
| ClassicController | ||
zL : Boolean [read-only]
Indicates if button zL is pressed.
| ClassicController | ||
zR : Boolean [read-only]
Indicates if button zR is pressed.
| ClassicController |
Method | Defined by | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with a ClassicController object so that the listener receives notification of an event.
| ClassicController | ||
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| ClassicController | ||
hasEventListener(type:String):Boolean
Checks whether the ClassicController object has any listeners registered for a specific type of event.
| ClassicController | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the ClassicController object.
| ClassicController | ||
toString():String
Returns the string representation of the specified object.
| ClassicController | ||
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this ClassicController object or any of its ancestors for the specified event type.
| ClassicController |
a | property |
a:Boolean
[read-only]Indicates if button A is pressed.
Implementation public function get a():Boolean
b | property |
b:Boolean
[read-only]Indicates if button B is pressed.
Implementation public function get b():Boolean
down | property |
down:Boolean
[read-only]Indicates if button Down is pressed.
Implementation public function get down():Boolean
home | property |
home:Boolean
[read-only]Indicates if button Home is pressed.
Implementation public function get home():Boolean
l | property |
l:Boolean
[read-only]Indicates if button L is pressed.
Implementation public function get l():Boolean
left | property |
left:Boolean
[read-only]Indicates if button Left is pressed.
Implementation public function get left():Boolean
minus | property |
minus:Boolean
[read-only]Indicates if button - is pressed.
Implementation public function get minus():Boolean
plus | property |
plus:Boolean
[read-only]Indicates if button + is pressed.
Implementation public function get plus():Boolean
r | property |
r:Boolean
[read-only]Indicates if button R is pressed.
Implementation public function get r():Boolean
right | property |
right:Boolean
[read-only]Indicates if button Right is pressed.
Implementation public function get right():Boolean
stickXLeft | property |
stickXLeft:Number
[read-only]Value of the xleft stick-axis. This value is scaled by the calibration data that has been read from the ClassicController.
Implementation public function get stickXLeft():Number
stickXRight | property |
stickXRight:Number
[read-only]Value of the x right stick-axis. This value is scaled by the calibration data that has been read from the ClassicController.
Implementation public function get stickXRight():Number
stickYLeft | property |
stickYLeft:Number
[read-only]Value of the yleft stick-axis. This value is scaled by the calibration data that has been read from the ClassicController.
Implementation public function get stickYLeft():Number
stickYRight | property |
stickYRight:Number
[read-only]Value of the yright stick-axis. This value is scaled by the calibration data that has been read from the ClassicController.
Implementation public function get stickYRight():Number
up | property |
up:Boolean
[read-only]Indicates if button Up is pressed.
Implementation public function get up():Boolean
x | property |
x:Boolean
[read-only]Indicates if button X is pressed.
Implementation public function get x():Boolean
y | property |
y:Boolean
[read-only]Indicates if button Y is pressed.
Implementation public function get y():Boolean
zL | property |
zL:Boolean
[read-only]Indicates if button zL is pressed.
Implementation public function get zL():Boolean
zR | property |
zR:Boolean
[read-only]Indicates if button zR is pressed.
Implementation public function get zR():Boolean
addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with a ClassicController object so that the listener receives notification of an event.
Parameterstype:String — The type of event.
|
|
listener:Function — The listener function that processes the event.
|
|
useCapture:Boolean (default = false ) — Determines whether the listener works in the capture phase or the target and bubbling phases.
|
|
priority:int (default = 0 ) — The priority level of the event listener.
|
|
useWeakReference:Boolean (default = false ) — Determines whether the reference to the listener is strong or weak.
|
See also
dispatchEvent | () | method |
public function dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
Parametersevent:Event — The Event object dispatched into the event flow.
|
Boolean |
See also
hasEventListener | () | method |
public function hasEventListener(type:String):Boolean
Checks whether the ClassicController object has any listeners registered for a specific type of event.
Parameterstype:String — The type of event.
|
Boolean — A value of true if a listener of the specified type is registered; false otherwise.
|
See also
removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the ClassicController object.
Parameterstype:String — The type of event.
|
|
listener:Function — The listener object to remove.
|
|
useCapture:Boolean (default = false ) — Specifies whether the listener was registered for the capture phase or the target and bubbling phases.
|
See also
toString | () | method |
public function toString():String
Returns the string representation of the specified object.
ReturnsString — A string representation of the object.
|
willTrigger | () | method |
public function willTrigger(type:String):Boolean
Checks whether an event listener is registered with this ClassicController object or any of its ancestors for the specified event type.
Parameterstype:String — The type of event.
|
Boolean — A value of true if a listener of the specified type will be triggered; false otherwise.
|
See also