Package | com.desuade.motion.controllers |
Class | public dynamic class KeyframeContainer |
Inheritance | KeyframeContainer ![]() |
Subclasses | ColorKeyframeContainer |
Language Version : | ActionScript 3 |
Since : | 02.07.2009 |
Runtime Versions : | AIR 1.0, Flash Player 9.0.0 |
Property | Defined By | ||
---|---|---|---|
length : int [read-only]
How many keyframes are in the container. | KeyframeContainer | ||
precision : int
How many decimal points the random spread values have. | KeyframeContainer | ||
tweenClass : Class
Which tween class to use for creating the tweens. | KeyframeContainer |
Method | Defined By | ||
---|---|---|---|
KeyframeContainer(tweenClass:Class = null)
Creates a new KeyframeContainer. | KeyframeContainer | ||
Adds a keyframe to the container. | KeyframeContainer | ||
empty():Object
Removes all keyframes between the begin and end keyframes from the container. | KeyframeContainer | ||
flatten(value:*, extras:Object = null):void
This "flattens" the container to the given value, setting all the 'value' and 'extra' properties in each keyframe to the same value, essentially removing any tweens.
Note: this always happen: the ease property becomes 'linear' and the spread becomes '0'.
| KeyframeContainer | ||
fromXML(xml:XML):KeyframeContainer
Configures the KeyframeContainer based on the values in the XML and creates child Keyframes. | KeyframeContainer | ||
getOrderedLabels():Array
Creates an Array with all of the labels of the keyframes, from begin to end
| KeyframeContainer | ||
isFlat():Boolean
Determines if the KeyframeContainer is flat. | KeyframeContainer | ||
toLabeledArray(sort:Boolean = false):Array
Creates an unsorted Array of all the objects in the KeyframeContainer
| KeyframeContainer | ||
toXML():XML
This creates an XML object that represents a KeyframeContainer and all it's Keyframes. | KeyframeContainer |
length | property |
length:int
[read-only] How many keyframes are in the container.
public function get length():int
precision | property |
precision:int
How many decimal points the random spread values have.
public function get precision():int
public function set precision(value:int):void
tweenClass | property |
tweenClass:Class
Which tween class to use for creating the tweens. - ie: BasicTween, Tween, etc.
public function get tweenClass():Class
public function set tweenClass(value:Class):void
KeyframeContainer | () | Constructor |
public function KeyframeContainer(tweenClass:Class = null)
Creates a new KeyframeContainer. This is the core of a MotionController, as it holds, configures, and manages all keyframes, and generates the tween objects.
Each KeyframeContainer will always have 2 keyframes: begin and end. Setting an end value will create a tween, and adding any keyframes will essentially divide it at a specified position and create 2 tweens.
These are always created automatically by mew MotionControllers, but can also be created independently of a controller and shared among multiple ones.
ParameterstweenClass:Class (default = null ) — The class of tweening engine to use. Null will use the default tweenClass from the MotionController static class.
|
add | () | method |
public function add(keyframe:Keyframe, label:String = null):String
Adds a keyframe to the container. The only benefit this has is automatic label generation.
Parameters
keyframe:Keyframe — A Keyframe object to add
| |
label:String (default = null ) — A label to give the keyframe. An auto-incremented label is created if none is provided.
|
String — The keyframe's label
|
See also
empty | () | method |
public function empty():Object
Removes all keyframes between the begin and end keyframes from the container.
ReturnsObject — An object of all the keyframes that were emptied
|
flatten | () | method |
public function flatten(value:*, extras:Object = null):void
This "flattens" the container to the given value, setting all the 'value' and 'extra' properties in each keyframe to the same value, essentially removing any tweens.
Note: this always happen: the ease property becomes 'linear' and the spread becomes '0'.
Parameters
value:* — A value to set all the 'value' properties to. Pass a Number for absolute, or a String for relative.
| |
extras:Object (default = null ) — An object containing an extra properties to pass to the tween
|
See also
fromXML | () | method |
public function fromXML(xml:XML):KeyframeContainer
Configures the KeyframeContainer based on the values in the XML and creates child Keyframes.
Parameters
xml:XML — The XML object to use.
|
KeyframeContainer — This KeyframeContainer object (for chaining)
|
getOrderedLabels | () | method |
public function getOrderedLabels():Array
Creates an Array with all of the labels of the keyframes, from begin to end
ReturnsArray — An orderded Array with the labels of all keyframes in the container
|
isFlat | () | method |
public function isFlat():Boolean
Determines if the KeyframeContainer is flat. Used to determine if there is any actual change in value to tween.
Note: this doesn't necessarily mean that all properties that are checked are necessarily equal, but rather, if the total of keyframes end up having any change in value.
ReturnsBoolean — True if all the values result in the same end value.
|
See also
toLabeledArray | () | method |
public function toLabeledArray(sort:Boolean = false):Array
Creates an unsorted Array of all the objects in the KeyframeContainer
Parameters
sort:Boolean (default = false ) — Sort the Array based on position
|
Array — An unsorted Array of all the keyframe Objects
|
toXML | () | method |
public function toXML():XML
This creates an XML object that represents a KeyframeContainer and all it's Keyframes.
ReturnsXML — An XML object representing the KeyframeContainer including child Keyframes.
|