Packageorg.flintparticles.initializers
Classpublic class Initializer
SubclassesAlphaInit, ApplyFilter, ColorInit, ImageClass, ImageClasses, Lifetime, Position, PositionAbsolute, RotateVelocity, Rotation, RotationAbsolute, ScaleInit, SharedImage, SharedImages, Velocity

The Initializer class is the abstract base class for all particle initializers. Instances of the Initializer class should not be directly created because the Initializer class itself simply defines default methods that do nothing. Classes that extend the Initializer class implement their own functionality for the methods they want to use. The Initializer interface must be implemented by all particle initializers.

An Initializer is a class that is used to set an aspect of a particle when it is created. Initializers may, for example, set an initial velocity for a particle.

Initializers are added to all particles created by an emitter by using the emitter's addInitializer method.

See also

org.flintparticles.emitters.Emitter.addInitializer()


Public Methods
 MethodDefined by
  
The constructor creates an Initializer object.
Initializer
  
addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called from the emitter when the Initializer is added to it It is called within the emitter's addInitializer method and need not be called by the user.
Initializer
  
The getDefaultPriority method is used to order the execution of initializers.
Initializer
  
initialize(emitter:Emitter, particle:Particle):void
The initialize method is used by the emitter to initialize the particle.
Initializer
  
The removedFromEmitter method is called by the emitter when the Initializer is removed from it It is called within the emitter's removeInitializer method and need not be called by the user.
Initializer
Constructor detail
Initializer()constructor
public function Initializer()

The constructor creates an Initializer object. But you shouldn't use it because the Initializer class is abstract.

Method detail
addedToEmitter()method
public function addedToEmitter(emitter:Emitter):void

The addedToEmitter method is called from the emitter when the Initializer is added to it It is called within the emitter's addInitializer method and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that the Initializer was added to.
getDefaultPriority()method 
public function getDefaultPriority():Number

The getDefaultPriority method is used to order the execution of initializers. It is called within the emitter's addInitializer method when the user doesn't manually set a priority. It need not be called directly by the user.

Returns
Number

See also

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

The initialize method is used by the emitter to initialize the particle. It is called within the emitter's createParticle method and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that created the particle.
 
particle:Particle — The particle to be initialized.
removedFromEmitter()method 
public function removedFromEmitter(emitter:Emitter):void

The removedFromEmitter method is called by the emitter when the Initializer is removed from it It is called within the emitter's removeInitializer method and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that the Initializer was removed from.