Packageorg.flintparticles.twoD.actions
Classpublic class ZonedAction
InheritanceZonedAction Inheritance ActionBase

The ZonedAction Action applies an action to the particle only if it is in the specified zone.



Public Properties
 PropertyDefined by
  action : Action
The action to apply when inside the zone.
ZonedAction
  invertZone : Boolean
If false (the default), the action is applied only to particles inside the zone.
ZonedAction
  zone : Zone2D
The zone in which to apply the acceleration.
ZonedAction
Public Methods
 MethodDefined by
  
ZonedAction(action:Action, zone:Zone2D, invertZone:Boolean = false)
The constructor creates a ZonedAction action for use by an emitter.
ZonedAction
  
addedToEmitter(emitter:Emitter):void
Calls the addedToEmitter method of the action being used.
ZonedAction
  
Returns the default priority of the action being used.
ZonedAction
  
Calls the removedFromEmitter method of the action being used.
ZonedAction
  
update(emitter:Emitter, particle:Particle, time:Number):void
Checks if the particle is in the zone and if so calls the update method of the action being used.
ZonedAction
Property detail
actionproperty
action:Action  [read-write]

The action to apply when inside the zone.

Implementation
    public function get action():Action
    public function set action(value:Action):void
invertZoneproperty 
invertZone:Boolean  [read-write]

If false (the default), the action is applied only to particles inside the zone. If true, the action is applied only to particles outside the zone.

Implementation
    public function get invertZone():Boolean
    public function set invertZone(value:Boolean):void
zoneproperty 
zone:Zone2D  [read-write]

The zone in which to apply the acceleration.

Implementation
    public function get zone():Zone2D
    public function set zone(value:Zone2D):void
Constructor detail
ZonedAction()constructor
public function ZonedAction(action:Action, zone:Zone2D, invertZone:Boolean = false)

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
action:Action — The action to apply when inside the zone.
 
zone:Zone2D — The zone in which to apply the action.
 
invertZone:Boolean (default = false) — If false (the default) the action is applied only to particles inside the zone. If true the action is applied only to particles outside the zone.

See also

org.flintparticles.emitters.Emitter.addAction()
Method detail
addedToEmitter()method
public override function addedToEmitter(emitter:Emitter):void

Calls the addedToEmitter method of the action being used.

Parameters
emitter:Emitter — The emitter this action has been added to.

See also

getDefaultPriority()method 
public override function getDefaultPriority():Number

Returns the default priority of the action being used.

Returns
Number

See also

removedFromEmitter()method 
public override function removedFromEmitter(emitter:Emitter):void

Calls the removedFromEmitter method of the action being used.

Parameters
emitter:Emitter — The emitter this action has been added to.

See also

update()method 
public override function update(emitter:Emitter, particle:Particle, time:Number):void

Checks if the particle is in the zone and if so calls the update method of the action being used.

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