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

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
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
AlphaInit(minAlpha:Number = 1, maxAlpha:Number)
The constructor creates an AlphaInit initializer for use by an emitter.
AlphaInit
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
AlphaInit
 Inherited
This method does nothing.
InitializerBase
Property Detail
alphaproperty
alpha:Number

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

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

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 = 1, 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.

This initializer has a priority of -10 so that it occurs after the color assignment.

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

See also

Method Detail
initialize()method
override public 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