Packagestarling.extensions
Classpublic class ParticleSystem
InheritanceParticleSystem Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object
Implements IAnimatable
Subclasses PDParticleSystem



Public Properties
 PropertyDefined By
 Inheritedalpha : Number
The opacity of the object.
DisplayObject
 Inheritedbase : DisplayObject
[read-only] The topmost object in the display tree the object is part of.
DisplayObject
  blendFactorDestination : String
ParticleSystem
  blendFactorSource : String
ParticleSystem
 InheritedblendMode : String
The blend mode determines how the object is blended with the objects underneath.
DisplayObject
 Inheritedbounds : Rectangle
[read-only] The bounds of the object relative to the local coordinates of the parent.
DisplayObject
  capacity : int
[read-only]
ParticleSystem
  emissionRate : Number
ParticleSystem
  emitterX : Number
ParticleSystem
  emitterY : Number
ParticleSystem
 Inheritedfilter : FragmentFilter
The filter that is attached to the display object.
DisplayObject
 InheritedhasVisibleArea : Boolean
[read-only] Indicates if an object occupies any visible area.
DisplayObject
 Inheritedheight : Number
The height of the object in pixels.
DisplayObject
  maxCapacity : int
ParticleSystem
 Inheritedname : String
The name of the display object (default: null).
DisplayObject
  numParticles : int
[read-only]
ParticleSystem
 Inheritedparent : DisplayObjectContainer
[read-only] The display object container that contains this display object.
DisplayObject
 InheritedpivotX : Number
The x coordinate of the object's origin in its own coordinate space (default: 0).
DisplayObject
 InheritedpivotY : Number
The y coordinate of the object's origin in its own coordinate space (default: 0).
DisplayObject
 Inheritedroot : DisplayObject
[read-only] The root object the display object is connected to (i.e.
DisplayObject
 Inheritedrotation : Number
The rotation of the object in radians.
DisplayObject
 InheritedscaleX : Number
The horizontal scale factor.
DisplayObject
 InheritedscaleY : Number
The vertical scale factor.
DisplayObject
 InheritedskewX : Number
The horizontal skew angle in radians.
DisplayObject
 InheritedskewY : Number
The vertical skew angle in radians.
DisplayObject
 Inheritedstage : Stage
[read-only] The stage the display object is connected to, or null if it is not connected to the stage.
DisplayObject
  texture : Texture
ParticleSystem
 Inheritedtouchable : Boolean
Indicates if this object (and its children) will receive touch events.
DisplayObject
 InheritedtransformationMatrix : Matrix
The transformation matrix of the object relative to its parent.
DisplayObject
 InheriteduseHandCursor : Boolean
Indicates if the mouse cursor should transform into a hand while it's over the sprite.
DisplayObject
 Inheritedvisible : Boolean
The visibility of the object.
DisplayObject
 Inheritedwidth : Number
The width of the object in pixels.
DisplayObject
 Inheritedx : Number
The x coordinate of the object relative to the local coordinates of the parent.
DisplayObject
 Inheritedy : Number
The y coordinate of the object relative to the local coordinates of the parent.
DisplayObject
Protected Properties
 PropertyDefined By
  mBlendFactorDestination : String
ParticleSystem
  mBlendFactorSource : String
ParticleSystem
  mEmitterX : Number
ParticleSystem
  mEmitterY : Number
ParticleSystem
  mPremultipliedAlpha : Boolean
ParticleSystem
Public Methods
 MethodDefined By
  
ParticleSystem(texture:Texture, emissionRate:Number, initialCapacity:int = 128, maxCapacity:int = 8192, blendFactorSource:String = null, blendFactorDest:String = null)
ParticleSystem
 Inherited
addEventListener(type:String, listener:Function):void
[override]
DisplayObject
  
advanceTime(passedTime:Number):void
ParticleSystem
 Inherited
alignPivot(hAlign:String = center, vAlign:String = center):void
Moves the pivot point to a certain position within the local coordinate system of the object.
DisplayObject
 Inherited
dispatchEvent(event:Event):void
Dispatches an event to all objects that have registered listeners for its type.
EventDispatcher
 Inherited
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event with the given parameters to all objects that have registered listeners for the given type.
EventDispatcher
  
dispose():void
[override]
ParticleSystem
  
getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle
[override] Returns an empty rectangle at the particle system's position.
ParticleSystem
 Inherited
getTransformationMatrix(targetSpace:DisplayObject, resultMatrix:Matrix = null):Matrix
Creates a matrix that represents the transformation from the local coordinate system to another.
DisplayObject
 Inherited
globalToLocal(globalPoint:Point, resultPoint:Point = null):Point
Transforms a point from global (stage) coordinates to the local coordinate system.
DisplayObject
 Inherited
hasEventListener(type:String):Boolean
Returns if there are listeners registered for a certain event type.
EventDispatcher
 Inherited
hitTest(localPoint:Point, forTouch:Boolean = false):DisplayObject
Returns the object that is found topmost beneath a point in local coordinates, or nil if the test fails.
DisplayObject
 Inherited
localToGlobal(localPoint:Point, resultPoint:Point = null):Point
Transforms a point from the local coordinate system to global (stage) coordinates.
DisplayObject
  
pause():void
Pauses the system; when you 'start' again, it will continue from the old state.
ParticleSystem
 Inherited
removeEventListener(type:String, listener:Function):void
[override]
DisplayObject
 Inherited
removeEventListeners(type:String = null):void
[override]
DisplayObject
 Inherited
removeFromParent(dispose:Boolean = false):void
Removes the object from its parent, if it has one, and optionally disposes it.
DisplayObject
  
render(support:RenderSupport, alpha:Number):void
[override]
ParticleSystem
  
start(duration:Number):void
Starts the sysytem for a certain time.
ParticleSystem
  
stop():void
Stops the system and removes all existing particles.
ParticleSystem
Protected Methods
 MethodDefined By
  
advanceParticle(particle:Particle, passedTime:Number):void
ParticleSystem
  
ParticleSystem
  
initParticle(particle:Particle):void
ParticleSystem
Events
 Event Summary Defined By
 InheritedDispatched when an object is added to a parent.DisplayObject
 InheritedDispatched when an object is connected to the stage (directly or indirectly).DisplayObject
  Dispatched when emission of particles is finished.ParticleSystem
 InheritedDispatched once every frame on every object that is connected to the stage.DisplayObject
 InheritedDispatched when a key on the keyboard is pressed.DisplayObject
 InheritedDispatched when a key on the keyboard is released.DisplayObject
 InheritedDispatched when an object is removed from its parent.DisplayObject
 InheritedDispatched when an object is removed from the stage and won't be rendered any longer.DisplayObject
 InheritedDispatched when an object is touched.DisplayObject
Property Detail
blendFactorDestinationproperty
blendFactorDestination:String


Implementation
    public function get blendFactorDestination():String
    public function set blendFactorDestination(value:String):void
blendFactorSourceproperty 
blendFactorSource:String


Implementation
    public function get blendFactorSource():String
    public function set blendFactorSource(value:String):void
capacityproperty 
capacity:int  [read-only]


Implementation
    public function get capacity():int
emissionRateproperty 
emissionRate:Number


Implementation
    public function get emissionRate():Number
    public function set emissionRate(value:Number):void
emitterXproperty 
emitterX:Number


Implementation
    public function get emitterX():Number
    public function set emitterX(value:Number):void
emitterYproperty 
emitterY:Number


Implementation
    public function get emitterY():Number
    public function set emitterY(value:Number):void
maxCapacityproperty 
maxCapacity:int


Implementation
    public function get maxCapacity():int
    public function set maxCapacity(value:int):void
mBlendFactorDestinationproperty 
protected var mBlendFactorDestination:String

mBlendFactorSourceproperty 
protected var mBlendFactorSource:String

mEmitterXproperty 
protected var mEmitterX:Number

mEmitterYproperty 
protected var mEmitterY:Number

mPremultipliedAlphaproperty 
protected var mPremultipliedAlpha:Boolean

numParticlesproperty 
numParticles:int  [read-only]


Implementation
    public function get numParticles():int
textureproperty 
texture:Texture


Implementation
    public function get texture():Texture
    public function set texture(value:Texture):void
Constructor Detail
ParticleSystem()Constructor
public function ParticleSystem(texture:Texture, emissionRate:Number, initialCapacity:int = 128, maxCapacity:int = 8192, blendFactorSource:String = null, blendFactorDest:String = null)



Parameters
texture:Texture
 
emissionRate:Number
 
initialCapacity:int (default = 128)
 
maxCapacity:int (default = 8192)
 
blendFactorSource:String (default = null)
 
blendFactorDest:String (default = null)
Method Detail
advanceParticle()method
protected function advanceParticle(particle:Particle, passedTime:Number):void

Parameters

particle:Particle
 
passedTime:Number

advanceTime()method 
public function advanceTime(passedTime:Number):void

Parameters

passedTime:Number

createParticle()method 
protected function createParticle():Particle

Returns
Particle
dispose()method 
override public function dispose():void

getBounds()method 
override public function getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle

Returns an empty rectangle at the particle system's position. Calculating the actual bounds would be too expensive.

Parameters

targetSpace:DisplayObject
 
resultRect:Rectangle (default = null)

Returns
Rectangle
initParticle()method 
protected function initParticle(particle:Particle):void

Parameters

particle:Particle

pause()method 
public function pause():void

Pauses the system; when you 'start' again, it will continue from the old state.

render()method 
override public function render(support:RenderSupport, alpha:Number):void

Parameters

support:RenderSupport
 
alpha:Number

start()method 
public function start(duration:Number):void

Starts the sysytem for a certain time.

Parameters

duration:Number (default = NaN)

stop()method 
public function stop():void

Stops the system and removes all existing particles.

Event Detail
complete Event
Event Object Type: starling.events.Event

Dispatched when emission of particles is finished.