Packageorg.flintparticles.common.initializers
Classpublic class ImageClasses
InheritanceImageClasses Inheritance InitializerBase Inheritance Object

The ImageClasses Initializer sets the DisplayObject to use to draw the particle. It selects one of multiple images that are passed to it. It is used with the DisplayObjectRenderer. When using the BitmapRenderer it is more efficient to use the SharedImage Initializer.



Public Properties
 PropertyDefined By
  images : Array
[write-only]
ImageClasses
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
  weights : Array
[write-only]
ImageClasses
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
ImageClasses(images:Array = null, weights:Array = null)
The constructor creates a ImageClasses initializer for use by an emitter.
ImageClasses
  
addedToEmitter(emitter:Emitter):void
[override]
ImageClasses
  
addImage(image:*, weight:Number = 1):void
ImageClasses
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
ImageClasses
 Inherited
This method does nothing.
InitializerBase
  
removeImage(image:*):void
ImageClasses
Property Detail
imagesproperty
images:Array  [write-only]


Implementation
    public function set images(value:Array):void
weightsproperty 
weights:Array  [write-only]


Implementation
    public function set weights(value:Array):void
Constructor Detail
ImageClasses()Constructor
public function ImageClasses(images:Array = null, weights:Array = null)

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

Parameters
images:Array (default = null) — An array containing the classes to use for each particle created by the emitter.
 
weights:Array (default = null) — The weighting to apply to each displayObject. If no weighting values are passed, the images are used with equal probability.

See also

Method Detail
addedToEmitter()method
override public function addedToEmitter(emitter:Emitter):void

Parameters

emitter:Emitter

addImage()method 
public function addImage(image:*, weight:Number = 1):void

Parameters

image:*
 
weight:Number (default = 1)

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

removeImage()method 
public function removeImage(image:*):void

Parameters

image:*