Packageorg.flintparticles.actions
Classpublic class KeyDownAction
InheritanceKeyDownAction Inheritance Action

The KeyDownAction Action applies an action to the particle only if a specified key is down.



Public Properties
 PropertyDefined by
  action : Action
The action to apply when the key is down.
KeyDownAction
  keyCode : uint
The key code of the key that controls the action.
KeyDownAction
Public Methods
 MethodDefined by
  
KeyDownAction(action:Action, keyCode:uint, stage:Stage)
The constructor creates a KeyDownAction action for use by an emitter.
KeyDownAction
  
addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called by the emitter when the Action is added to it It is called within the emitter's addAction method and need not be called by the user.
KeyDownAction
  
The getDefaultPriority method is used to order the execution of actions.
KeyDownAction
  
The removedFromEmitter method is called by the emitter when the Action is removed from it It is called within the emitter's removeAction method and need not be called by the user.
KeyDownAction
  
update(emitter:Emitter, particle:Particle, time:Number):void
The update method is used by the emitter to apply the action to every particle.
KeyDownAction
Property detail
actionproperty
action:Action  [read-write]

The action to apply when the key is down.

Implementation
    public function get action():Action
    public function set action(value:Action):void
keyCodeproperty 
keyCode:uint  [read-write]

The key code of the key that controls the action.

Implementation
    public function get keyCode():uint
    public function set keyCode(value:uint):void
Constructor detail
KeyDownAction()constructor
public function KeyDownAction(action:Action, keyCode:uint, stage:Stage)

The constructor creates a KeyDownAction action for use by an emitter. To add a KeyDownAction to all particles created by an emitter, use the emitter's addAction method.

Parameters
action:Action — The action to apply when the key is down.
 
keyCode:uint — The key code of the key that controls the action.
 
stage:Stage — A reference to the stage.

See also

Method detail
addedToEmitter()method
public override function addedToEmitter(emitter:Emitter):void

The addedToEmitter method is called by the emitter when the Action is added to it It is called within the emitter's addAction method and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that the Action was added to.
getDefaultPriority()method 
public override function getDefaultPriority():Number

The getDefaultPriority method is used to order the execution of actions. It is called within the emitter's addAction method when the user doesn't manually set a priority. It need not be called directly by the user.

Returns
Number
removedFromEmitter()method 
public override function removedFromEmitter(emitter:Emitter):void

The removedFromEmitter method is called by the emitter when the Action is removed from it It is called within the emitter's removeAction method and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that the Action was removed from.
update()method 
public override function update(emitter:Emitter, particle:Particle, time:Number):void

The update method is used by the emitter to apply the action to every particle. It is called within the emitter's update loop and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that created the particle.
 
particle:Particle — The particle to be updated.
 
time:Number — The duration of the frame - used for time based updates.