Packageorg.flintparticles.twoD.actions
Classpublic class TweenToCurrentPosition
InheritanceTweenToCurrentPosition Inheritance ActionBase Inheritance Object
Implements Initializer

The TweenToCurrentPosition action adjusts the particle's position between two locations as it ages. The start location is a random point within the specified zone, and the end location is the particle's position when it is created or added to the emitter. 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.
TweenToCurrentPosition
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
The constructor creates a TweenToCurrentPosition action for use by an emitter.
TweenToCurrentPosition
  
addedToEmitter(emitter:Emitter):void
[override]
TweenToCurrentPosition
  
initialize(emitter:Emitter, particle:Particle):void
TweenToCurrentPosition
  
[override]
TweenToCurrentPosition
  
update(emitter:Emitter, particle:Particle, time:Number):void
[override] Calculates the current position of the particle based on it's energy.
TweenToCurrentPosition
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
TweenToCurrentPosition()Constructor
public function TweenToCurrentPosition(zone:Zone2D)

The constructor creates a TweenToCurrentPosition action for use by an emitter. To add a TweenToCurrentPosition 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