Package | fl.motion |
Class | public class KeyframeBase |
Inheritance | KeyframeBase Object |
Subclasses | Keyframe |
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
position
, scale
, rotation
, skew
, and color
.
To use KeyframeBase, all properties must have values for every KeyframeBase,
and there must be a KeyframeBase defined for every frame in the motion.
Within a motion tween, each time index can have only one keyframe.
A keyframe also has other properties like blend mode
, filters
, and cacheAsBitmap
,
which are always available. For example, a keyframe always has a blend mode.
Related API Elements
Property | Defined By | ||
---|---|---|---|
adjustColorObjects : Dictionary = null
Stores AdjustColor instances mapped to their corresponding index in the filters Array for this keyframe. | KeyframeBase | ||
blank : Boolean = false
Indicates that the target object should not be displayed on this keyframe. | KeyframeBase | ||
blendMode : String = "normal"
A value from the BlendMode class that specifies how Flash Player
mixes the display object's colors with graphics underneath it. | KeyframeBase | ||
cacheAsBitmap : Boolean = false
If set to true, Flash Player caches an internal bitmap representation of the display object. | KeyframeBase | ||
color : Color
A color object that adjusts the color transform in the target object. | KeyframeBase | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
filters : Array
An array that contains each filter object to be applied to the target object at a particular keyframe. | KeyframeBase | ||
firstFrame : String
Stores the name of the first frame for motion tweens, which affects graphic symbols only. | KeyframeBase | ||
index : int
The keyframe's unique time value in the motion tween. | KeyframeBase | ||
label : String
A string used to describe the keyframe. | KeyframeBase | ||
loop : String
Stores the value of the Loop checkbox for motion tweens, which affects graphic symbols only. | KeyframeBase | ||
matrix : Matrix = null
Stores matrix property if one exists for this keyframe. | KeyframeBase | ||
matrix3D : Object = null
Stores matrix3d property if one exists for this keyframe. | KeyframeBase | ||
opaqueBackground : Object = null
Controls whether target object has an opaque background. | KeyframeBase | ||
orientToPath : Boolean = false
If set to true, this property causes the target object to rotate automatically
to follow the angle of its path. | KeyframeBase | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
rotateDirection : String = "auto"
Controls how the target object rotates during a motion tween,
with a value from the RotateDirection class. | KeyframeBase | ||
rotateTimes : uint = 0
Adds rotation to the target object during a motion tween, in addition to any existing rotation. | KeyframeBase | ||
rotation : Number
Indicates the rotation of the target object in degrees
from its original orientation as applied from the transformation point. | KeyframeBase | ||
rotationConcat : Number = NaN
The rotation (z-axis) values of the target object in the motion relative to previous orientation as applied from the transformation point,
as opposed to absolute rotation values, and separate from skewY values. | KeyframeBase | ||
rotationX : Number = NaN
Stores rotationX property for this keyframe. | KeyframeBase | ||
rotationY : Number = NaN
Stores rotationY property for this keyframe. | KeyframeBase | ||
scaleX : Number = NaN
Indicates the horizontal scale as a percentage of the object as applied from the transformation point. | KeyframeBase | ||
scaleY : Number = NaN
Indicates the vertical scale as a percentage of the object as applied from the transformation point. | KeyframeBase | ||
skewX : Number = NaN
Indicates the horizontal skew angle of the target object in degrees as applied from the transformation point. | KeyframeBase | ||
skewY : Number = NaN
Indicates the vertical skew angle of the target object in degrees as applied from the transformation point. | KeyframeBase | ||
tweensLength : int [read-only]
The number of frames for the tween. | KeyframeBase | ||
useRotationConcat : Boolean = false
If set to true, this property causes the target object to rotate when data for motion is supplied by addpropertyarray. | KeyframeBase | ||
visible : Boolean = true
Controls whether target object is visible. | KeyframeBase | ||
x : Number = NaN
The horizontal position of the target object's transformation point in its parent's coordinate space. | KeyframeBase | ||
y : Number = NaN
The vertical position of the target object's transformation point in its parent's coordinate space. | KeyframeBase | ||
z : Number = NaN
The depth (z-axis) position of the target object's transformation point in its parent's coordinate space. | KeyframeBase |
Method | Defined By | ||
---|---|---|---|
KeyframeBase(xml:XML = null)
Constructor for keyframe instances. | KeyframeBase | ||
Indicates whether the keyframe has an influence on a specific animation property. | KeyframeBase | ||
Retrieves the value of a specific tweenable property on the keyframe. | KeyframeBase | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets one of the four AdjustColor properties to the AdjustColor object for the given filter index. | KeyframeBase | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Changes the value of a specific tweenable property on the keyframe. | KeyframeBase | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
adjustColorObjects | property |
public var adjustColorObjects:Dictionary = null
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Stores AdjustColor
instances mapped to their corresponding index in the filters Array for this keyframe.
This is used for Flash authoring's AdjustColor filters, which correspond to ColorMatrixFilters in Flash Player.
blank | property |
public var blank:Boolean = false
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates that the target object should not be displayed on this keyframe.
blendMode | property |
public var blendMode:String = "normal"
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A value from the BlendMode class that specifies how Flash Player mixes the display object's colors with graphics underneath it.
Related API Elements
cacheAsBitmap | property |
public var cacheAsBitmap:Boolean = false
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
If set to true
, Flash Player caches an internal bitmap representation of the display object.
Using this property often allows faster rendering than the default use of vectors.
color | property |
public var color:Color
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A color object that adjusts the color transform in the target object.
filters | property |
public var filters:Array
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
An array that contains each filter object to be applied to the target object at a particular keyframe.
firstFrame | property |
public var firstFrame:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Stores the name of the first frame for motion tweens, which affects graphic symbols only. This property is used in the Copy and Paste Motion feature in Flash CS4 but does not affect motion tweens defined using ActionScript. It is included here for compatibility with the Flex 2 compiler.
index | property |
index:int
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The keyframe's unique time value in the motion tween. The first frame in a motion tween has an index of 0
.
Implementation
public function get index():int
public function set index(value:int):void
label | property |
public var label:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
A string used to describe the keyframe.
loop | property |
public var loop:String
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Stores the value of the Loop checkbox for motion tweens, which affects graphic symbols only. This property is used in the Copy and Paste Motion feature in Flash CS4 but does not affect motion tweens defined using ActionScript. It is included here for compatibility with the Flex 2 compiler.
matrix | property |
public var matrix:Matrix = null
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 10, AIR 1.5, AIR 1.0 |
Stores matrix
property if one exists for this keyframe. matrix
is used for non-tween frames that do not 3D.
You can use either the matrix
property or the other position and scaling properties (x
, y
, scaleX
, scaleY
, etc), but not both sets together.
If matrix
is set to something other than null, then it is used instead of any other properties (3D properties included).
matrix3D | property |
public var matrix3D:Object = null
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 10, AIR 1.5, AIR 1.0 |
Stores matrix3d
property if one exists for this keyframe. matrix3d
is used for non-tween frames containing 3D.
You can use either the matrix3d
property or the other 3D properties (z
, rotationX
, rotationY
), but not both sets together.
If matrix3d
is set to something other than null, then it is used instead of any other properties (2D properties included).
opaqueBackground | property |
public var opaqueBackground:Object = null
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5.5 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Controls whether target object has an opaque background. Value is a number describing the color in the form 0xrrggbb or null for no opaque background.
orientToPath | property |
public var orientToPath:Boolean = false
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
If set to true
, this property causes the target object to rotate automatically
to follow the angle of its path.
rotateDirection | property |
public var rotateDirection:String = "auto"
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Controls how the target object rotates during a motion tween, with a value from the RotateDirection class.
Related API Elements
rotateTimes | property |
public var rotateTimes:uint = 0
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Adds rotation to the target object during a motion tween, in addition to any existing rotation.
This rotation is dependent on the value of the rotateDirection
property,
which must be set to RotateDirection.CW
or RotateDirection.CCW
.
The rotateTimes
value must be an integer that is equal to or greater than zero.
For example, if the object would normally rotate from 0 to 40 degrees,
setting rotateTimes
to 1
and rotateDirection
to RotateDirection.CW
will add a full turn, for a total rotation of 400 degrees.
rotateDirection
is set to RotateDirection.CCW
,
360 degrees will be subtracted from the normal rotation,
resulting in a counterclockwise turn of 320 degrees.
Related API Elements
rotation | property |
rotation:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates the rotation of the target object in degrees
from its original orientation as applied from the transformation point.
A value of NaN
means that the keyframe does not affect this property.
Implementation
public function get rotation():Number
public function set rotation(value:Number):void
rotationConcat | property |
public var rotationConcat:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 10, AIR 1.5, AIR 1.0 |
The rotation (z-axis) values of the target object in the motion relative to previous orientation as applied from the transformation point,
as opposed to absolute rotation values, and separate from skewY
values.
rotationX | property |
public var rotationX:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Stores rotationX
property for this keyframe. This property is the rotation of the target object around the x-axis from its original orientation.
rotationY | property |
public var rotationY:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Stores rotationY
property for this keyframe. This property is the rotation of the target object around the y-axis from its original orientation.
scaleX | property |
public var scaleX:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates the horizontal scale as a percentage of the object as applied from the transformation point.
A value of 1
is 100% of normal size.
A value of NaN
means that the keyframe does not affect this property.
scaleY | property |
public var scaleY:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates the vertical scale as a percentage of the object as applied from the transformation point.
A value of 1
is 100% of normal size.
A value of NaN
means that the keyframe does not affect this property.
skewX | property |
public var skewX:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates the horizontal skew angle of the target object in degrees as applied from the transformation point.
A value of NaN
means that the keyframe does not affect this property.
skewY | property |
public var skewY:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates the vertical skew angle of the target object in degrees as applied from the transformation point.
A value of NaN
means that the keyframe does not affect this property.
tweensLength | property |
useRotationConcat | property |
public var useRotationConcat:Boolean = false
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 10, AIR 1.5, AIR 1.0 |
If set to true
, this property causes the target object to rotate when data for motion is supplied by addpropertyarray
.
Also when true
, the rotationConcat
property is used instead of rotation
. The default is
false
.
visible | property |
public var visible:Boolean = true
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5.5 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Controls whether target object is visible.
x | property |
public var x:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The horizontal position of the target object's transformation point in its parent's coordinate space.
A value of NaN
means that the keyframe does not affect this property.
y | property |
public var y:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
The vertical position of the target object's transformation point in its parent's coordinate space.
A value of NaN
means that the keyframe does not affect this property.
z | property |
public var z:Number = NaN
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 10, AIR 1.5, AIR 1.0 |
The depth (z-axis) position of the target object's transformation point in its parent's coordinate space.
When referring to a 3D plane, a z-axis refers to the depth of a 3D object.
A value of NaN
means that the keyframe does not affect this property.
KeyframeBase | () | Constructor |
affectsTweenable | () | method |
public function affectsTweenable(tweenableName:String = ""):Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Indicates whether the keyframe has an influence on a specific animation property.
Parameters
tweenableName:String (default = " ") — The name of a tweenable property, such as "x"
or "rotation" .
|
Boolean |
getValue | () | method |
public function getValue(tweenableName:String):Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Retrieves the value of a specific tweenable property on the keyframe.
Parameters
tweenableName:String — The name of a tweenable property, such as "x"
or "rotation" .
|
Number — The numerical value of the tweenable property.
|
setAdjustColorProperty | () | method |
public function setAdjustColorProperty(filterIndex:int, propertyName:String, value:*):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Sets one of the four AdjustColor
properties to the AdjustColor
object for the given filter index.
It creates the AdjustColor
instance if one does not exist for that index yet.
The four properties that can be set are:
- adjustColorBrightness
- adjustColorContrast
- adjustColorSaturation
- adjustColorHue
AdjustColor
properties must be set in order for the filter to be created.
Once all four properties are set on an AdjustColor
instance,
the function gets from the AdjustColor
object a flat array of 20 values representing all four properties,
and creates a ColorMatrixFilter
instance, which requires the flattened array.
Parameters
filterIndex:int — The index position of the filter in the filters array to add the
propertyName property.
| |
propertyName:String — One of the four allowed properties values: "adjustColorBrightness" ,
"adjustColorContrast" , "adjustColorSaturation" , or "adjustColorHue" .
| |
value:* — The value to set for the specified property.
|
More examples
Related API Elements
setValue | () | method |
public function setValue(tweenableName:String, newValue:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
Changes the value of a specific tweenable property on the keyframe.
Parameters
tweenableName:String — The name of a tweenable property, such as "x"
or "rotation" .
| |
newValue:Number — A numerical value to assign to the tweenable property.
|
Mon Nov 28 2011, 06:48 AM -08:00