Packageorg.flintparticles.common.initializers
Classpublic class ColorInit
InheritanceColorInit Inheritance InitializerBase Inheritance Object

The ColorInit Initializer sets the color of the particle.



Public Properties
 PropertyDefined By
  color : uint
When reading, returns the average of minColor and maxColor.
ColorInit
  maxColor : uint
The maximum color value for particles initialised by this initializer.
ColorInit
  minColor : uint
The minimum color value for particles initialised by this initializer.
ColorInit
 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
  
ColorInit(color1:uint = 0xFFFFFF, color2:uint = 0xFFFFFF)
The constructor creates a ColorInit initializer for use by an emitter.
ColorInit
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
ColorInit
 Inherited
This method does nothing.
InitializerBase
Property Detail
colorproperty
color:uint

When reading, returns the average of minColor and maxColor. When writing this sets both maxColor and minColor to the same color.


Implementation
    public function get color():uint
    public function set color(value:uint):void
maxColorproperty 
maxColor:uint

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


Implementation
    public function get maxColor():uint
    public function set maxColor(value:uint):void
minColorproperty 
minColor:uint

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


Implementation
    public function get minColor():uint
    public function set minColor(value:uint):void
Constructor Detail
ColorInit()Constructor
public function ColorInit(color1:uint = 0xFFFFFF, color2:uint = 0xFFFFFF)

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

The color of particles initialized by this class will be a random value between the two values pased to the constructor. For a fixed value, pass the same color in for both parameters.

Parameters
color1:uint (default = 0xFFFFFF) — the 32bit (ARGB) color at one end of the color range to use.
 
color2:uint (default = 0xFFFFFF) — the 32bit (ARGB) color at the other end of the color range to use.

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