Packageorg.flintparticles.counters
Classpublic class KeyDownCounter
ImplementsCounter

The KeyDownCounter Counter modifies another counter to only emit particles when a specific key is being pressed.



Public Properties
 PropertyDefined by
  counter : Counter
The counter to use when the key is down.
KeyDownCounter
  keyCode : uint
The key code of the key that controls the counter.
KeyDownCounter
Public Methods
 MethodDefined by
  
KeyDownCounter(counter:Counter, keyCode:uint, stage:Stage)
The constructor creates a ZonedAction action for use by an emitter.
KeyDownCounter
  
startEmitter(emitter:Emitter):uint
KeyDownCounter
  
updateEmitter(emitter:Emitter, time:Number):uint
The updateEmitter method is called every frame after the emitter has started.
KeyDownCounter
Property detail
counterproperty
counter:Counter  [read-write]

The counter to use when the key is down.

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

The key code of the key that controls the counter.

Implementation
    public function get keyCode():uint
    public function set keyCode(value:uint):void
Constructor detail
KeyDownCounter()constructor
public function KeyDownCounter(counter:Counter, keyCode:uint, stage:Stage)

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

Parameters
counter:Counter — The counter to use when the key is down.
 
keyCode:uint — The key code of the key that controls the counter.
 
stage:Stage — A reference to the stage.

See also

Method detail
startEmitter()method
public function startEmitter(emitter:Emitter):uintParameters
emitter:Emitter

Returns
uint
updateEmitter()method 
public function updateEmitter(emitter:Emitter, time:Number):uint

The updateEmitter method is called every frame after the emitter has started.

Parameters
emitter:Emitter — The emitter
 
time:Number — The time, in seconds, since the previous call to this method.

Returns
uint — The number of particles the emitter should emit at this time.