| Package | org.flintparticles.actions |
| Class | public class KeyDownAction |
| Inheritance | KeyDownAction Action |
| 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 | ||
| Method | Defined 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 | ||
|
getDefaultPriority():Number
The getDefaultPriority method is used to order the execution of actions.
| KeyDownAction | ||
|
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.
| KeyDownAction | ||
|
The update method is used by the emitter to apply the action
to every particle.
| 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
| 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.
Parametersaction: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
| addedToEmitter | () | method |
public override function addedToEmitter(emitter:Emitter):voidThe 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.
Parametersemitter:Emitter — The Emitter that the Action was added to.
|
| getDefaultPriority | () | method |
public override function getDefaultPriority():NumberThe 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.
ReturnsNumber |
| removedFromEmitter | () | method |
public override function removedFromEmitter(emitter:Emitter):voidThe 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.
Parametersemitter:Emitter — The Emitter that the Action was removed from.
|
| update | () | method |
public override function update(emitter:Emitter, particle:Particle, time:Number):voidThe 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.
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.
|