Packagecom.desuade.partigen.controllers
Classpublic class ParticleTweenController
InheritanceParticleTweenController Inheritance Object

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

Used to configure MotionControllers for the particles.



Public Properties
 PropertyDefined By
  duration : Number
The duration of the entire controller to last.
ParticleTweenController
  keyframes : KeyframeContainer
This is where all the Keyframes are held and configured.
ParticleTweenController
Public Methods
 MethodDefined By
  
ParticleTweenController(duration:Number, containerClass:Class = null, tweenClass:Class = null)
This is like a MotionController from the Motion Package, but is used as a placeholder to configure emitters. ParticleTweenControllers create MotionControllers on each particle that's created, allowing the particles to change over their lives. Using the addTween() method is recommended over calling this directly.
ParticleTweenController
  
Configures the ParticleTweenController from the XML object and sets the keyframes to the child KeyframeContainer XML and it's child Keyframes. Note: this does not include the "property" unless it's called from the ParticleController.
ParticleTweenController
  
setSingleTween(begin:*, beginSpread:* = 0, end:* = 0, endSpread:* = 0, ease:* = null, extras:Object = null):ParticleTweenController
This easily sets the 'begin' and 'end' keyframes of the controller to create a standard "one-shot" tween.
ParticleTweenController
  
toXML():XML
Create an XML object that contains the ParticleTweenController config, KeyframeContainer, and all child Keyframes. Note: this does not include the "property" unless it's called from the ParticleController.
ParticleTweenController
Property Detail
durationproperty
public var duration:Number

The duration of the entire controller to last. The length of individual tweens changes dependent on this.

keyframesproperty 
public var keyframes:KeyframeContainer

This is where all the Keyframes are held and configured.

Constructor Detail
ParticleTweenController()Constructor
public function ParticleTweenController(duration:Number, containerClass:Class = null, tweenClass:Class = null)

This is like a MotionController from the Motion Package, but is used as a placeholder to configure emitters.

ParticleTweenControllers create MotionControllers on each particle that's created, allowing the particles to change over their lives.

Using the addTween() method is recommended over calling this directly.

Parameters
duration:Number — The entire duration for the controller. If this is 0, the duration will be set to the particle's life.
 
containerClass:Class (default = null) — The class to use for Keyframes. Null will use the default.
 
tweenClass:Class (default = null) — The class to use for tweening on the controller. Null will use the default.
Method Detail
fromXML()method
public function fromXML(xml:XML):ParticleTweenController

Configures the ParticleTweenController from the XML object and sets the keyframes to the child KeyframeContainer XML and it's child Keyframes.

Note: this does not include the "property" unless it's called from the ParticleController.

Parameters

xml:XML — The XML object containing the config for the ParticleTweenController

Returns
ParticleTweenController — The ParticleTweenController object (for chaining)
setSingleTween()method 
public function setSingleTween(begin:*, beginSpread:* = 0, end:* = 0, endSpread:* = 0, ease:* = null, extras:Object = null):ParticleTweenController

This easily sets the 'begin' and 'end' keyframes of the controller to create a standard "one-shot" tween.

Parameters

begin:* — The beginning value.
 
beginSpread:* (default = 0) — The beginning spread value.
 
end:* (default = 0) — The end value for the tween.
 
endSpread:* (default = 0) — The end spread value.
 
ease:* (default = null) — The ease to use for the tween on the end keyframe.
 
extras:Object (default = null) — The extras object for the end keyframe.

Returns
ParticleTweenController — The ParticleTweenController
toXML()method 
public function toXML():XML

Create an XML object that contains the ParticleTweenController config, KeyframeContainer, and all child Keyframes.

Note: this does not include the "property" unless it's called from the ParticleController.

Returns
XML — An XML object representing the ParticleTweenController