Packageorg.flixel.data
Classpublic class FlxGamepad
InheritanceFlxGamepad Inheritance FlxInput



Public Properties
 PropertyDefined by
  A : Boolean
FlxGamepad
  B : Boolean
FlxGamepad
  DOWN : Boolean
FlxGamepad
  L1 : Boolean
FlxGamepad
  L2 : Boolean
FlxGamepad
  LEFT : Boolean
FlxGamepad
  R1 : Boolean
FlxGamepad
  R2 : Boolean
FlxGamepad
  RIGHT : Boolean
FlxGamepad
  SELECT : Boolean
FlxGamepad
  START : Boolean
FlxGamepad
  UP : Boolean
FlxGamepad
  X : Boolean
FlxGamepad
  Y : Boolean
FlxGamepad
Public Methods
 MethodDefined by
  
FlxGamepad
 Inherited
addKey(KeyName:String, KeyCode:uint):void
An internal helper function used to build the key array.
FlxInput
  
bind(Up:String = null, Down:String = null, Left:String = null, Right:String = null, AButton:String = null, BButton:String = null, XButton:String = null, YButton:String = null, StartButton:String = null, SelectButton:String = null, L1Button:String = null, L2Button:String = null, R1Button:String = null, R2Button:String = null):void
Assign a keyboard key to a gamepad button.
FlxGamepad
 Inherited
handleKeyDown(event:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
FlxInput
 Inherited
handleKeyUp(event:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
FlxInput
 Inherited
justPressed(Key:String):Boolean
Check to see if this key was just pressed.
FlxInput
 Inherited
justReleased(Key:String):Boolean
Check to see if this key is just released.
FlxInput
 Inherited
pressed(Key:String):Boolean
Check to see if this key is pressed.
FlxInput
 Inherited
reset():void
Resets all the keys.
FlxInput
 Inherited
update():void
Updates the key states (for tracking just pressed, just released, etc).
FlxInput
Property detail
Aproperty
public var A:Boolean
Bproperty 
public var B:Boolean
DOWNproperty 
public var DOWN:Boolean
L1property 
public var L1:Boolean
L2property 
public var L2:Boolean
LEFTproperty 
public var LEFT:Boolean
R1property 
public var R1:Boolean
R2property 
public var R2:Boolean
RIGHTproperty 
public var RIGHT:Boolean
SELECTproperty 
public var SELECT:Boolean
STARTproperty 
public var START:Boolean
UPproperty 
public var UP:Boolean
Xproperty 
public var X:Boolean
Yproperty 
public var Y:Boolean
Constructor detail
FlxGamepad()constructor
public function FlxGamepad()
Method detail
bind()method
public function bind(Up:String = null, Down:String = null, Left:String = null, Right:String = null, AButton:String = null, BButton:String = null, XButton:String = null, YButton:String = null, StartButton:String = null, SelectButton:String = null, L1Button:String = null, L2Button:String = null, R1Button:String = null, R2Button:String = null):void

Assign a keyboard key to a gamepad button. For example, if you pass "X" as the AButton parameter, this gamepad's member variable A will be set to true whenever the 'x' key on the keyboard is pressed. Pretty simple! Nice for multiplayer games and utilities that can convert gamepad pressed to keyboard keys at the operating system level.

Parameters
Up:String (default = null)
 
Down:String (default = null)
 
Left:String (default = null)
 
Right:String (default = null)
 
AButton:String (default = null)
 
BButton:String (default = null)
 
XButton:String (default = null)
 
YButton:String (default = null)
 
StartButton:String (default = null)
 
SelectButton:String (default = null)
 
L1Button:String (default = null)
 
L2Button:String (default = null)
 
R1Button:String (default = null)
 
R2Button:String (default = null)