| Package | org.flintparticles.common.actions |
| Class | public class KeyDownAction |
| Inheritance | KeyDownAction ActionBase |
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
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
Calls the addedToEmitter method of the action that is applied
| KeyDownAction | ||
|
removedFromEmitter(emitter:Emitter):void
Calls the removedFromEmitter method of the action that is applied
| KeyDownAction | ||
|
If the key is down, this method calls the update method of the
action that is applied.
| KeyDownAction | ||
| action | property |
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
| keyCode | property |
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
| priority | property |
priority:int [read-write]Returns the default priority of the action that is applied.
Implementation public function get priority():int
public function set priority(value:int):void
See also
| stage | property |
stage:Stage [read-write]A reference to the stage
Implementation 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 |
public override function addedToEmitter(emitter:Emitter):voidCalls the addedToEmitter method of the action that is applied
Parametersemitter:Emitter — The Emitter that the Action was added to.
|
See also
| removedFromEmitter | () | method |
public override function removedFromEmitter(emitter:Emitter):voidCalls the removedFromEmitter method of the action that is applied
Parametersemitter:Emitter — The Emitter that the Action was removed from.
|
See also
| update | () | method |
public override 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
Parametersemitter: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