Packagecom.desuade.motion.controllers
Classpublic dynamic class PhysicsMultiController
InheritancePhysicsMultiController Inheritance MultiController Inheritance Object
Subclasses EmitterPhysicsController

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

An extension of a MultiController specifically for Physics objects.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
[read-only] This returns true if any of the child controllers are active.
MultiController
 Inheritedduration : Number
Sets/gets the duration for all child controllers
MultiController
  physics : BasicPhysics
[read-only] The BasicPhysics object used to handle physics on a property.
PhysicsMultiController
  property : String
This is the property of the target to apply the physics to.
PhysicsMultiController
  target : Object
[override] The target for the physics to be applied to, since the internal controllers' target is the actual physics object.
PhysicsMultiController
Public Methods
 MethodDefined By
  
PhysicsMultiController(target:Object, property:String = null, duration:Number = 0, physics:BasicPhysics = null, containerClass:Class = null, tweenClass:Class = null)
This creates a new PhysicsMultiController.
PhysicsMultiController
 Inherited
addController(property:String, containerClass:Class = null):MotionController
Creates a new child controller for the given property
MultiController
 Inherited
addKeyframes(position:Number, keyframes:Object, label:String = null):void
Adds a keyframe with the same label across all controllers at the same position.
MultiController
 Inherited
fromXML(xml:XML, usealldurations:Boolean = true):MultiController
Configures the MultiController and creates all child MotionControllers.
MultiController
 Inherited
setKeyframes(keyframe:String, properties:Object):void
This lets you configure a specific keyframe for each controller at once.
MultiController
  
start(keyframe:String = begin, startTime:Number = 0, rebuild:Boolean = false):*
[override] This starts all child MotionControllers at once.
PhysicsMultiController
 Inherited
stop():void
This stops all child MotionControllers at once
MultiController
 Inherited
toXML():XML
This creates an XML object representing the MultiController and it's child MotionControllers.
MultiController
Property Detail
physicsproperty
physics:BasicPhysics  [read-only]

The BasicPhysics object used to handle physics on a property.


Implementation
    public function get physics():BasicPhysics

See also

propertyproperty 
property:String

This is the property of the target to apply the physics to. Unlike a regular MultiController, which uses each MotionController for each property.


Implementation
    public function get property():String
    public function set property(value:String):void
targetproperty 
target:Object[override]

The target for the physics to be applied to, since the internal controllers' target is the actual physics object.


Implementation
    public function get target():Object
    public function set target(value:Object):void
Constructor Detail
PhysicsMultiController()Constructor
public function PhysicsMultiController(target:Object, property:String = null, duration:Number = 0, physics:BasicPhysics = null, containerClass:Class = null, tweenClass:Class = null)

This creates a new PhysicsMultiController. This controls the velocity, acceleration, and friction for a given target's property using a physics object.

Like a regular MultiController, there are child MotionControllers. For this, there are only 3: velocity, acceleration, and friction - accessible as this.velocity, etc.

If acceleration or friction controllers are used, the velocity controller will be disabled as acceleration and friction influence the target's velocity.

Parameters
target:Object — The target object to set for all child MotionControllers
 
property:String (default = null) — The single property to have physics applied to
 
duration:Number (default = 0) — The length of time to set all child controllers
 
physics:BasicPhysics (default = null) — The BasicPhysics object to use. If there is no existing one, set to null and an internal one will be created.
 
containerClass:Class (default = null) — The class of keyframe container to use for all MotionControllers
 
tweenClass:Class (default = null) — The class of tweens to pass to all the keyframe container
Method Detail
start()method
override public function start(keyframe:String = begin, startTime:Number = 0, rebuild:Boolean = false):*

This starts all child MotionControllers at once. If a keyframe label is specified, each controller will be started at the given keyframe.

Parameters

keyframe:String (default = begin) — The label of the keyframe to start the controllers at.
 
startTime:Number (default = 0) — This is like keyframe, but instead uses actual time to start at, as if it's already been running. This overrides the keyframe param.
 
rebuild:Boolean (default = false) — Forces a rebuild of each MotionControllers internal sequence on start.

Returns
* — The MultiController (for chaining)