Packagecitrus.input
Classpublic class InputAction
InheritanceInputAction Inheritance Object

InputAction reinforces the Action object structure (and typing.) it contains static action phase constants as well as helpful comparators.



Public Properties
 PropertyDefined By
  channel : uint
[read-only] action channel id.
InputAction
  controller : InputController
[read-only] InputController that triggered this action
InputAction
  disposed : Vector.<InputAction>
[static] list of disposed InputActions.
InputAction
  itime : uint
internal utiliy to keep public time read only
InputAction
  _message : String
InputAction
  message : String
[read-only] message the action carries
InputAction
  name : String
[read-only]
InputAction
  _phase : uint
InputAction
  phase : Number
[read-only] action phase
InputAction
  time : uint
[read-only] time (in frames) the action has been 'running' in the Input system.
InputAction
  _value : Number
InputAction
  value : Number
[read-only] value the action carries
InputAction
Public Methods
 MethodDefined By
  
InputAction(name:String, controller:InputController, channel:uint = 0, value:Number = 0, message:String = null, phase:uint = 0, time:uint = 0)
InputAction
  
[static] clear the list of disposed InputActions.
InputAction
  
Clones the action and returns a new InputAction instance with the same properties.
InputAction
  
comp(action:InputAction):Boolean
comp is used to compare an action with another action without caring about which controller the actions came from.
InputAction
  
create(name:String, controller:InputController, channel:uint = 0, value:Number = 0, message:String = null, phase:uint = 0, time:uint = 0):InputAction
[static] creates an InputAction either from a disposed InputAction object or a new one.
InputAction
  
dispose():void
InputAction
  
eq(action:InputAction):Boolean
eq is almost a strict action comparator.
InputAction
  
setTo(name:String, controller:InputController, channel:uint = 0, value:Number = 0, message:String = null, phase:uint = 0, time:uint = 0):InputAction
set all InputActions's properties (internal for recycling)
InputAction
  
toString():String
InputAction
Property Detail
_messageproperty
public var _message:String

_phaseproperty 
public var _phase:uint

_valueproperty 
public var _value:Number

channelproperty 
channel:uint  [read-only]

action channel id.


Implementation
    public function get channel():uint
controllerproperty 
controller:InputController  [read-only]

InputController that triggered this action


Implementation
    public function get controller():InputController
disposedproperty 
public static var disposed:Vector.<InputAction>

list of disposed InputActions. automatically disposed when they end in Input.as

itimeproperty 
itime:uint

internal utiliy to keep public time read only


Implementation
    public function get itime():uint
    public function set itime(value:uint):void
messageproperty 
message:String  [read-only]

message the action carries


Implementation
    public function get message():String
nameproperty 
name:String  [read-only]


Implementation
    public function get name():String
phaseproperty 
phase:Number  [read-only]

action phase


Implementation
    public function get phase():Number
timeproperty 
time:uint  [read-only]

time (in frames) the action has been 'running' in the Input system.


Implementation
    public function get time():uint
valueproperty 
value:Number  [read-only]

value the action carries


Implementation
    public function get value():Number
Constructor Detail
InputAction()Constructor
public function InputAction(name:String, controller:InputController, channel:uint = 0, value:Number = 0, message:String = null, phase:uint = 0, time:uint = 0)



Parameters
name:String
 
controller:InputController
 
channel:uint (default = 0)
 
value:Number (default = 0)
 
message:String (default = null)
 
phase:uint (default = 0)
 
time:uint (default = 0)
Method Detail
clearDisposed()method
public static function clearDisposed():void

clear the list of disposed InputActions.

clone()method 
public function clone():InputAction

Clones the action and returns a new InputAction instance with the same properties.

Returns
InputAction
comp()method 
public function comp(action:InputAction):Boolean

comp is used to compare an action with another action without caring about which controller the actions came from. it is the most common form of action comparison.

Parameters

action:InputAction

Returns
Boolean
create()method 
public static function create(name:String, controller:InputController, channel:uint = 0, value:Number = 0, message:String = null, phase:uint = 0, time:uint = 0):InputAction

creates an InputAction either from a disposed InputAction object or a new one.

Parameters

name:String
 
controller:InputController
 
channel:uint (default = 0)
 
value:Number (default = 0)
 
message:String (default = null)
 
phase:uint (default = 0)
 
time:uint (default = 0)

Returns
InputAction
dispose()method 
public function dispose():void

eq()method 
public function eq(action:InputAction):Boolean

eq is almost a strict action comparator. It will not only compare names and channels but also which controller the actions came from.

Parameters

action:InputAction

Returns
Boolean
setTo()method 
public function setTo(name:String, controller:InputController, channel:uint = 0, value:Number = 0, message:String = null, phase:uint = 0, time:uint = 0):InputAction

set all InputActions's properties (internal for recycling)

Parameters

name:String
 
controller:InputController
 
channel:uint (default = 0)
 
value:Number (default = 0)
 
message:String (default = null)
 
phase:uint (default = 0)
 
time:uint (default = 0)

Returns
InputAction
toString()method 
public function toString():String

Returns
String