Packagecom.desuade.partigen.controllers
Classpublic dynamic class EmitterController
InheritanceEmitterController Inheritance Object

Language Version : ActionScript 3
Since : 02.07.2009
Runtime Versions : AIR 1.0, Flash Player 9.0.0

This controls the configuration for controllers that effect the actual emitter.



Public Properties
 PropertyDefined By
  tweenClass : Class
[static] The default tween class to use for emitter controllers
EmitterController
Public Methods
 MethodDefined By
  
This creates a new EmitterController.
EmitterController
  
addBeginValue(property:String, value:*, spread:* = 0, precision:int = 0, extras:Object = null):EmitterTweenController
This sets the initial value of the given property.
EmitterController
  
addPhysics(property:String, duration:Number, flip:Boolean = false):EmitterPhysicsController
This creates a EmitterPhysicsController (which inherits PhysicsMultiController) that has 3 EmitterTweenControllers for each physics property: velocity, acceleration, and friction.
EmitterController
  
addTween(property:String, duration:Number):EmitterTweenController
This creates an EmitterTweenController for the given property.
EmitterController
  
This configures the EmitterController from XML and creates all child controllers.
EmitterController
  
start():void
This starts all the emitter MotionControllers at once.
EmitterController
  
stop():void
This stops all the emitter MotionControllers at once.
EmitterController
  
toXML():XML
Creates an XML object containing configuration for the EmitterController
EmitterController
Property Detail
tweenClassproperty
public static var tweenClass:Class

The default tween class to use for emitter controllers

Constructor Detail
EmitterController()Constructor
public function EmitterController(emitter:Emitter)

This creates a new EmitterController. This shouldn't be called, as it's created by the emitter automatically.

All the controllers (by default) get started whenever the emitter starts.

Parameters
emitter:Emitter — The emitter to control
Method Detail
addBeginValue()method
public function addBeginValue(property:String, value:*, spread:* = 0, precision:int = 0, extras:Object = null):EmitterTweenController

This sets the initial value of the given property. If the property exists as a EmitterTweenController already, it will modify the current 'begin' keyframe. If it doesn't, this creates a new EmitterTweenController and sets its 'begin' keyframe.

Note: this only sets EmitterTweenControllers, NOT EmitterPhysicsControllers.

Parameters

property:String — The emitter's property to be set.
 
value:* — The property's value.
 
spread:* (default = 0) — The spread of the value. If this is anything besides '0', a random value will be generated using the value and spread.
 
precision:int (default = 0) — The amount of decimal points used when creating a spread value
 
extras:Object (default = null) — An 'extras' object to be passed to the tween engine for that keyframe.

Returns
EmitterTweenController
addPhysics()method 
public function addPhysics(property:String, duration:Number, flip:Boolean = false):EmitterPhysicsController

This creates a EmitterPhysicsController (which inherits PhysicsMultiController) that has 3 EmitterTweenControllers for each physics property: velocity, acceleration, and friction.

Parameters

property:String — The emitter's property to be set.
 
duration:Number — The entire duration for the controller. Since the emitter always exists, there must be a set duration.
 
flip:Boolean (default = false) — To set the physics's object flip value. This is useful for some properties like 'y'.

Returns
EmitterPhysicsController
addTween()method 
public function addTween(property:String, duration:Number):EmitterTweenController

This creates an EmitterTweenController for the given property. This actually inherits a real MotionController.

Parameters

property:String — The emitter's property to be set.
 
duration:Number — The entire duration for the controller. Since the emitter always exists, there must be a set duration.

Returns
EmitterTweenController
fromXML()method 
public function fromXML(xml:XML):EmitterController

This configures the EmitterController from XML and creates all child controllers.

Parameters

xml:XML — The XML object used to configure the EmitterController.

Returns
EmitterController — The EmitterController object (for chaining)
start()method 
public function start():void

This starts all the emitter MotionControllers at once.

stop()method 
public function stop():void

This stops all the emitter MotionControllers at once.

toXML()method 
public function toXML():XML

Creates an XML object containing configuration for the EmitterController

Returns
XML — An XML object representing the EmitterController