| Package | org.flintparticles.common.actions |
| Class | public class KeyDownAction |
| Inheritance | KeyDownAction ActionBase Object |
See also
| Property | Defined 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 | ||
| priority : int [override]
Returns the default priority of the action that is applied. | KeyDownAction | ||
| stage : Stage
A reference to the stage
| KeyDownAction | ||
| Method | Defined By | ||
|---|---|---|---|
KeyDownAction(action:Action = null, keyCode:uint = 0, stage:Stage = null)
The constructor creates a KeyDownAction action for use by
an emitter. | KeyDownAction | ||
addedToEmitter(emitter:Emitter):void [override]
Calls the addedToEmitter method of the action that is applied
| KeyDownAction | ||
removedFromEmitter(emitter:Emitter):void [override]
Calls the removedFromEmitter method of the action that is applied
| KeyDownAction | ||
[override]
If the key is down, this method calls the update method of the
action that is applied. | KeyDownAction | ||
| action | property |
action:ActionThe action to apply when the key is down.
public function get action():Action public function set action(value:Action):void| keyCode | property |
keyCode:uintThe key code of the key that controls the action.
public function get keyCode():uint public function set keyCode(value:uint):void| priority | property |
priority:int[override] Returns the default priority of the action that is applied.
public function get priority():int public function set priority(value:int):voidSee also
| stage | property |
stage:StageA reference to the stage
public function get stage():Stage public function set stage(value:Stage):void| KeyDownAction | () | Constructor |
public function KeyDownAction(action:Action = null, keyCode:uint = 0, stage:Stage = null)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.
Parametersaction:Action (default = null) — The action to apply when the key is down.
| |
keyCode:uint (default = 0) — The key code of the key that controls the action.
| |
stage:Stage (default = null) — A reference to the stage.
|
See also
| addedToEmitter | () | method |
override public function addedToEmitter(emitter:Emitter):voidCalls the addedToEmitter method of the action that is applied
Parameters
emitter:Emitter — The Emitter that the Action was added to.
|
See also
| removedFromEmitter | () | method |
override public function removedFromEmitter(emitter:Emitter):voidCalls the removedFromEmitter method of the action that is applied
Parameters
emitter:Emitter — The Emitter that the Action was removed from.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidIf the key is down, this method calls the update method of the action that is applied.
This method is called by the emitter 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.
|
See also