Packagecom.desuade.partigen.controllers
Classpublic dynamic class ParticlePhysicsController
InheritanceParticlePhysicsController Inheritance Object

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

Used to configure PhysicsMultiControllers for the particles.



Public Properties
 PropertyDefined By
  duration : Number
This sets/gets the duration for all the ParticleTweenControllers inside (velocity, acceleration, friction)
ParticlePhysicsController
  flip : Boolean = false
The boolean flip (for cartesian reversal) value to be passed to the internal 'physics' object.
ParticlePhysicsController
  useAngle : Boolean = true
If this is set to true, the physics object will use the emitter's angle value.
ParticlePhysicsController
Public Methods
 MethodDefined By
  
ParticlePhysicsController(duration:Number, containerClass:Class = null, tweenClass:Class = null)
This is like a PhysicsMultiController from the Motion Package, but is used as a placeholder to configure emitters. ParticlePhysicsControllers create PhysicsMultiControllers on each particle that's created, allowing the particles to change over their lives with physics. Each one has 3 sub ParticleTweenControllers: velocity, acceleration, friction.
ParticlePhysicsController
  
Configures the ParticlePhysicsController and creates all child ParticleTweenControllers. Note: this does not include the "property" unless it's called from the ParticleController.
ParticlePhysicsController
  
toXML():XML
This creates an XML object representing the ParticlePhysicsController and it's child ParticleTweenControllers. Note: this does not include the "property" unless it's called from the ParticleController.
ParticlePhysicsController
Property Detail
durationproperty
duration:Number

This sets/gets the duration for all the ParticleTweenControllers inside (velocity, acceleration, friction)


Implementation
    public function get duration():Number
    public function set duration(value:Number):void
flipproperty 
public var flip:Boolean = false

The boolean flip (for cartesian reversal) value to be passed to the internal 'physics' object.

See also

useAngleproperty 
public var useAngle:Boolean = true

If this is set to true, the physics object will use the emitter's angle value. If false, no angle will be used in calculating the initial velocity.

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

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

ParticlePhysicsControllers create PhysicsMultiControllers on each particle that's created, allowing the particles to change over their lives with physics.

Each one has 3 sub ParticleTweenControllers: velocity, acceleration, friction. These can each be configured like normal ParticleTweenControllers.

Using the addPhysics() 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):ParticlePhysicsController

Configures the ParticlePhysicsController and creates all child ParticleTweenControllers.

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

Parameters

xml:XML — The XML object to use for configuration

Returns
ParticlePhysicsController — The ParticlePhysicsController object (for chaining)
toXML()method 
public function toXML():XML

This creates an XML object representing the ParticlePhysicsController and it's child ParticleTweenControllers.

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

Returns
XML — And XML object for the ParticlePhysicsController