Packageorg.flintparticles.twoD.actions
Classpublic class TweenToZone
InheritanceTweenToZone Inheritance ActionBase Inheritance Object
Implements Initializer

The TweenToZone action adjusts the particle's position between two locations as it ages. The start location is wherever the particle starts from, depending on the emitter and the initializers. The end position is a random point within the specified zone. The current position is relative to the particle's energy, which changes as the particle ages in accordance with the energy easing function used. This action should be used in conjunction with the Age action.

Default MXML Propertyzone



Public Properties
 PropertyDefined By
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
  zone : Zone2D
The zone for the particle's position when its energy is 0.
TweenToZone
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
The constructor creates a TweenToZone action for use by an emitter.
TweenToZone
  
addedToEmitter(emitter:Emitter):void
[override]
TweenToZone
  
initialize(emitter:Emitter, particle:Particle):void
TweenToZone
  
[override]
TweenToZone
  
update(emitter:Emitter, particle:Particle, time:Number):void
[override] Calculates the current position of the particle based on it's energy.
TweenToZone
Property Detail
zoneproperty
zone:Zone2D

The zone for the particle's position when its energy is 0.


Implementation
    public function get zone():Zone2D
    public function set zone(value:Zone2D):void
Constructor Detail
TweenToZone()Constructor
public function TweenToZone(zone:Zone2D)

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

Parameters
zone:Zone2D — The zone for the particle's position when its energy is 0.

See also

Method Detail
addedToEmitter()method
override public function addedToEmitter(emitter:Emitter):void

Parameters

emitter:Emitter

initialize()method 
public function initialize(emitter:Emitter, particle:Particle):void

Parameters

emitter:Emitter
 
particle:Particle

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

Parameters

emitter:Emitter

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

Calculates the current position of the particle based on it's energy.

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