Packageverlocity.components
Classpublic class verParticles
InheritanceverParticles Inheritance Component Inheritance Singleton Inheritance Object

Bitmap-based particle system. This class manages the displaying, calculating, and cleanup of all particles, emitters, and any bitmap filters applied to the particles.



Public Properties
 PropertyDefined By
 InheritedclassName : Object
[read-only] Returns the class name of the component for dictionary registration.
Component
  countEmitters : int
[read-only] Returns the current amount of emitters active.
verParticles
  countParticles : int
[read-only] Returns the current amount of alive particles.
verParticles
  deadParticles : int
[read-only] Returns the current dead particles.
verParticles
  maxEmitters : int
[read-only] Returns the max emitters allowed.
verParticles
  maxParticles : int
[read-only] Returns the max particles available.
verParticles
Protected Properties
 PropertyDefined By
 Inheritedstage : Stage
Component
Public Methods
 MethodDefined By
  
Constructor of the component.
verParticles
  
_Destruct():void
[override] Destructor of the component.
verParticles
 Inherited
_IsNotUpdating():Boolean
Returns if the component is not updating (paused).
Component
 Inherited
_IsValid():Boolean
Returns if this singleton is active/valid.
Singleton
 Inherited
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable.
Component
 Inherited
Updates the component, if possible.
Component
  
Create(sLayer:String, iSetMaxParticles:int = 800, iSetMaxEmitters:int = 25, nWidth:Number, nHeight:Number):void
Creates the particle system
verParticles
  
Creates a particle emitter
verParticles
  
IsParticlePool():Boolean
Returns if the particle pool was created
verParticles
  
Remove():void
Removes the particle system
verParticles
  
RemoveAll():void
Removes all particles and emitters
verParticles
  
Removes all emitters
verParticles
  
Removes all active particles.
verParticles
  
Removes the effects applied to the particles completely
verParticles
  
SetEffectPreset(iPreset:int = 0):void
Sets the effect to a preset.
verParticles
  
SetEffects(iRedrawSpeed:int = 15):void
Sets the effects (redraw speed)
verParticles
Protected Methods
 MethodDefined By
  
[override] Concommands of the component.
verParticles
  
_Update():void
[override] Updates the particles, emitters, and effects.
verParticles
Public Constants
 ConstantDefined By
  EFF_DEFAULT : int = 0
verParticles
  EFF_EVERLASTING : int = 1
verParticles
  EFF_HARDDOTS : int = 2
verParticles
Property Detail
countEmittersproperty
countEmitters:int  [read-only]

Returns the current amount of emitters active.


Implementation
    public function get countEmitters():int
countParticlesproperty 
countParticles:int  [read-only]

Returns the current amount of alive particles.


Implementation
    public function get countParticles():int
deadParticlesproperty 
deadParticles:int  [read-only]

Returns the current dead particles.


Implementation
    public function get deadParticles():int
maxEmittersproperty 
maxEmitters:int  [read-only]

Returns the max emitters allowed.


Implementation
    public function get maxEmitters():int
maxParticlesproperty 
maxParticles:int  [read-only]

Returns the max particles available.


Implementation
    public function get maxParticles():int
Constructor Detail
verParticles()Constructor
public function verParticles()

Constructor of the component.

Method Detail
_Concommands()method
override protected function _Concommands():void

Concommands of the component.

_Destruct()method 
override public function _Destruct():void

Destructor of the component.

_Update()method 
override protected function _Update():void

Updates the particles, emitters, and effects.

Create()method 
public function Create(sLayer:String, iSetMaxParticles:int = 800, iSetMaxEmitters:int = 25, nWidth:Number, nHeight:Number):void

Creates the particle system

Parameters

sLayer:String — The layer to spawn the bitmap (particles) in
 
iSetMaxParticles:int (default = 800) — The max particles available (suggested 800)
 
iSetMaxEmitters:int (default = 25) — The max emitters available (suggested 25)
 
nWidth:Number (default = NaN) — The width of the particle bitmap (defaults screen width)
 
nHeight:Number (default = NaN) — The height of the particle bitmap (defaults screen height)

CreateEmitter()method 
public function CreateEmitter(emitter:ParticleEmitter):void

Creates a particle emitter

Parameters

emitter:ParticleEmitter

IsParticlePool()method 
public function IsParticlePool():Boolean

Returns if the particle pool was created

Returns
Boolean
Remove()method 
public function Remove():void

Removes the particle system

RemoveAll()method 
public function RemoveAll():void

Removes all particles and emitters

RemoveAllEmitters()method 
public function RemoveAllEmitters():void

Removes all emitters

RemoveAllParticles()method 
public function RemoveAllParticles():void

Removes all active particles.

RemoveEffects()method 
public function RemoveEffects():void

Removes the effects applied to the particles completely

SetEffectPreset()method 
public function SetEffectPreset(iPreset:int = 0):void

Sets the effect to a preset. Use EFF_ constants.

Parameters

iPreset:int (default = 0)

SetEffects()method 
public function SetEffects(iRedrawSpeed:int = 15):void

Sets the effects (redraw speed)

Parameters

iRedrawSpeed:int (default = 15) — The speed to redraw the particles; -100 - 100 (higher the faster). Recommended 15.

Constant Detail
EFF_DEFAULTConstant
public const EFF_DEFAULT:int = 0

EFF_EVERLASTINGConstant 
public const EFF_EVERLASTING:int = 1

EFF_HARDDOTSConstant 
public const EFF_HARDDOTS:int = 2