Packageorg.flintparticles.common.initializers
Classpublic class AlphaInit
InheritanceAlphaInit Inheritance InitializerBase

The AlphaInit Initializer sets the alpha transparency of the particle.



Public Properties
 PropertyDefined by
  alpha : Number
When reading, returns the average of minAlpha and maxAlpha.
AlphaInit
  maxAlpha : Number
The maximum alpha value for particles initialised by this initializer.
AlphaInit
  minAlpha : Number
The minimum alpha value for particles initialised by this initializer.
AlphaInit
Public Methods
 MethodDefined by
  
AlphaInit(minAlpha:Number, maxAlpha:Number)
The constructor creates an AlphaInit initializer for use by an emitter.
AlphaInit
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
Returns a default priority of 0 for this action.
AlphaInit
  
initialize(emitter:Emitter, particle:Particle):void
This method does nothing.
AlphaInit
 Inherited
This method does nothing.
InitializerBase
Property detail
alphaproperty
alpha:Number  [read-write]

When reading, returns the average of minAlpha and maxAlpha. When writing this sets both maxAlpha and minAlpha to the same alpha value.

Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
maxAlphaproperty 
maxAlpha:Number  [read-write]

The maximum alpha value for particles initialised by this initializer. Should be between 0 and 1.

Implementation
    public function get maxAlpha():Number
    public function set maxAlpha(value:Number):void
minAlphaproperty 
minAlpha:Number  [read-write]

The minimum alpha value for particles initialised by this initializer. Should be between 0 and 1.

Implementation
    public function get minAlpha():Number
    public function set minAlpha(value:Number):void
Constructor detail
AlphaInit()constructor
public function AlphaInit(minAlpha:Number, maxAlpha:Number)

The constructor creates an AlphaInit initializer for use by an emitter. To add an AlphaInit to all particles created by an emitter, use the emitter's addInitializer method.

The alpha of particles initialized by this class will be a random value between the minimum and maximum values set. If no maximum value is set, the minimum value is used with no variation.

Parameters
minAlpha:Number — the minimum alpha for particles initialized by the instance. The value should be between 1 and 0.
 
maxAlpha:Number — the maximum alpha for particles initialized by the instance. The value should be between 1 and 0.

See also

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

Returns a default priority of 0 for this action. Derived classes overrid ethis method if they want a different default priority.

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

This method does nothing. All derived classes override this method to initialize each particle created by the emitter.

Parameters
emitter:Emitter
 
particle:Particle