Package | cv.orion.output |
Class | public class KeyDownOutput |
Inheritance | KeyDownOutput SteadyOutput |
Implements | IOutput |
import cv.Orion; import cv.orion.output.KeyDownOutput; import flash.ui.Keyboard; // First method var e:Orion = new Orion(linkageClass, new KeyDownOutput(Keyboard.SPACE, this.stage, 40)); // Second method var e2:Orion = new Orion(linkageClass); e2.output = new KeyDownOutput(Keyboard.SPACE, this.stage, 40)
Property | Defined by | ||
---|---|---|---|
particlesPerSecond : Number
The current rate assigned to SteadyOutput, in particles per second.
| SteadyOutput | ||
paused : Boolean
Gets or sets the paused property
| SteadyOutput | ||
target : DisplayObject
Gets or sets the target to attach the keyboard listener to.
| KeyDownOutput |
Method | Defined by | ||
---|---|---|---|
KeyDownOutput(key:uint, target:DisplayObject = null, particlesPerSecond:Number = 20)
Starts and stops outputting particles based on keyboard interaction.
| KeyDownOutput | ||
pause():void
Pauses the output class.
| SteadyOutput | ||
play():void
Resumes or plays the output class.
| SteadyOutput | ||
This is called everytime the particles are called to update and be redrawn.
| KeyDownOutput |
Method | Defined by | ||
---|---|---|---|
Checks if it's time to emit particles and how many.
| SteadyOutput | ||
keyHandler(event:KeyboardEvent):void
Determines if they correct key is down or not.
| KeyDownOutput | ||
updateTimes(emitter:Orion):void
Updates the previous and difference in times.
| SteadyOutput |
target | property |
target:DisplayObject
[read-write]Gets or sets the target to attach the keyboard listener to. As en example, you could set this to the stage.
Implementation public function get target():DisplayObject
public function set target(value:DisplayObject):void
KeyDownOutput | () | constructor |
public function KeyDownOutput(key:uint, target:DisplayObject = null, particlesPerSecond:Number = 20)
Starts and stops outputting particles based on keyboard interaction.
Parameterskey:uint — Which key to listen for.
|
|
target:DisplayObject (default = null ) — The target to attach the keyboard listener to.
|
|
particlesPerSecond:Number (default = 20 ) — The rate at which to output particles
|
keyHandler | () | method |
protected function keyHandler(event:KeyboardEvent):void
Determines if they correct key is down or not.
Parametersevent:KeyboardEvent |
update | () | method |
public override function update(emitter:Orion):void
This is called everytime the particles are called to update and be redrawn. Depending on the output class, this can determine the output of the particles.
Parametersemitter:Orion — The emitter to be used.
|