| Package | com.desuade.motion.controllers |
| Class | public dynamic class PhysicsMultiController |
| Inheritance | PhysicsMultiController MultiController Object |
| Subclasses | EmitterPhysicsController |
| Language Version : | ActionScript 3 |
| Since : | 02.07.2009 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.0 |
| Property | Defined By | ||
|---|---|---|---|
![]() | active : Boolean [read-only]
This returns true if any of the child controllers are active. | MultiController | |
![]() | duration : 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 | ||
| Method | Defined 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 | ||
![]() | addController(property:String, containerClass:Class = null):MotionController
Creates a new child controller for the given property
| MultiController | |
![]() | addKeyframes(position:Number, keyframes:Object, label:String = null):void
Adds a keyframe with the same label across all controllers at the same position. | MultiController | |
![]() | fromXML(xml:XML, usealldurations:Boolean = true):MultiController
Configures the MultiController and creates all child MotionControllers. | MultiController | |
![]() | 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 | ||
![]() | stop():void
This stops all child MotionControllers at once
| MultiController | |
![]() | toXML():XML
This creates an XML object representing the MultiController and it's child MotionControllers. | MultiController | |
| physics | property |
physics:BasicPhysics [read-only] The BasicPhysics object used to handle physics on a property.
public function get physics():BasicPhysicsSee also
| property | property |
property:StringThis is the property of the target to apply the physics to. Unlike a regular MultiController, which uses each MotionController for each property.
public function get property():String public function set property(value:String):void| target | property |
target:Object[override] The target for the physics to be applied to, since the internal controllers' target is the actual physics object.
public function get target():Object public function set target(value:Object):void| 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.
Parameterstarget: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
|
| 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.
|
* — The MultiController (for chaining)
|