Package | fl.motion |
Class | public class Keyframe |
Inheritance | Keyframe ![]() |
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
position
, scale
, rotation
, skew
, and color
.
A keyframe can, optionally, define one or more of these properties.
For instance, one keyframe may affect only position,
while another keyframe at a different point in time may affect only scale.
Yet another keyframe may affect all properties at the same time.
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.
See also
Property | Defined By | ||
---|---|---|---|
blank : Boolean = false
Indicates that the target object should not be displayed on this keyframe.
| Keyframe | ||
blendMode : String = "normal"
A value from the BlendMode class that specifies how Flash Player
mixes the display object's colors with graphics underneath it.
| Keyframe | ||
cacheAsBitmap : Boolean = false
If set to true, Flash Player caches an internal bitmap representation of the display object.
| Keyframe | ||
color : Color
A color object that adjusts the color transform in the target object.
| Keyframe | ||
![]() | 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.
| Keyframe | ||
firstFrame : String
Stores the name of the first frame for motion tweens, which affects graphic symbols only.
| Keyframe | ||
index : int
The keyframe's unique time value in the motion tween.
| Keyframe | ||
label : String = ""
A string used to describe the keyframe.
| Keyframe | ||
loop : String
Stores the value of the Loop checkbox for motion tweens, which affects graphic symbols only.
| Keyframe | ||
orientToPath : Boolean = false
If set to true, this property causes the target object to rotate automatically
to follow the angle of its path.
| Keyframe | ||
![]() | 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.
| Keyframe | ||
rotateTimes : uint = 0
Adds rotation to the target object during a motion tween, in addition to any existing rotation.
| Keyframe | ||
rotation : Number
Indicates the rotation of the target object in degrees
from its original orientation as applied from the transformation point.
| Keyframe | ||
scaleX : Number = NaN
Indicates the horizontal scale as a percentage of the object as applied from the transformation point.
| Keyframe | ||
scaleY : Number = NaN
Indicates the vertical scale as a percentage of the object as applied from the transformation point.
| Keyframe | ||
skewX : Number = NaN
Indicates the horizontal skew angle of the target object in degrees as applied from the transformation point.
| Keyframe | ||
skewY : Number = NaN
Indicates the vertical skew angle of the target object in degrees as applied from the transformation point.
| Keyframe | ||
tweens : Array
An array that contains each tween object to be applied to the target object at a particular keyframe.
| Keyframe | ||
tweenScale : Boolean = true
A flag that controls whether scale will be interpolated during a tween.
| Keyframe | ||
tweenSnap : Boolean = false
Stores the value of the Snap checkbox for motion tweens, which snaps the object to a motion guide.
| Keyframe | ||
tweenSync : Boolean = false
Stores the value of the Sync checkbox for motion tweens, which affects graphic symbols only.
| Keyframe | ||
x : Number = NaN
The horizontal position of the target object's transformation point in its parent's coordinate space.
| Keyframe | ||
y : Number = NaN
The vertical position of the target object's transformation point in its parent's coordinate space.
| Keyframe |
Method | Defined By | ||
---|---|---|---|
Constructor for keyframe instances.
| Keyframe | ||
Indicates whether the keyframe has an influence on a specific animation property.
| Keyframe | ||
Retrieves an ITween object for a specific animation property.
| Keyframe | ||
Retrieves the value of a specific tweenable property on the keyframe.
| Keyframe | ||
![]() |
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 the availability of a dynamic property for loop operations.
| Object | |
Changes the value of a specific tweenable property on the keyframe.
| Keyframe | ||
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object |
blank | property |
public var blank:Boolean = false
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.0 |
A value from the BlendMode class that specifies how Flash Player mixes the display object's colors with graphics underneath it.
See also
cacheAsBitmap | property |
public var cacheAsBitmap:Boolean = false
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.0 |
A color object that adjusts the color transform in the target object.
filters | property |
public var filters:Array
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.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 CS3 but does not affect motion tweens defined using ActionScript. It is included here for compatibility with the Flex 2 compiler.
index | property |
index:int
[read-write]
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
The keyframe's unique time value in the motion tween. The first frame in a motion tween has an index of 0
.
public function get index():int
public function set index(value:int):void
label | property |
public var label:String = ""
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
A string used to describe the keyframe.
loop | property |
public var loop:String
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 CS3 but does not affect motion tweens defined using ActionScript. It is included here for compatibility with the Flex 2 compiler.
orientToPath | property |
public var orientToPath:Boolean = false
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.0 |
Controls how the target object rotates during a motion tween, with a value from the RotateDirection class.
See also
rotateTimes | property |
public var rotateTimes:uint = 0
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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.
See also
rotation | property |
rotation:Number
[read-write]
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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.
public function get rotation():Number
public function set rotation(value:Number):void
scaleX | property |
public var scaleX:Number = NaN
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.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.
tweens | property |
public var tweens:Array
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
An array that contains each tween object to be applied to the target object at a particular keyframe. One tween can target all animation properties (as with standard tweens on the Flash authoring tool's timeline), or multiple tweens can target individual properties (as with separate custom easing curves).
tweenScale | property |
public var tweenScale:Boolean = true
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
A flag that controls whether scale will be interpolated during a tween.
If false
, the display object will stay the same size during the tween, until the next keyframe.
tweenSnap | property |
public var tweenSnap:Boolean = false
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Stores the value of the Snap checkbox for motion tweens, which snaps the object to a motion guide. This property is used in the Copy and Paste Motion feature in Flash CS3 but does not affect motion tweens defined using ActionScript. It is included here for compatibility with the Flex 2 compiler.
tweenSync | property |
public var tweenSync:Boolean = false
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Stores the value of the Sync checkbox for motion tweens, which affects graphic symbols only. This property is used in the Copy and Paste Motion feature in Flash CS3 but does not affect motion tweens defined using ActionScript. It is included here for compatibility with the Flex 2 compiler.
x | property |
public var x:Number = NaN
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
Player Version : | Flash Player 9.0.28.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.
Keyframe | () | Constructor |
public function Keyframe(xml:XML = null)
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Constructor for keyframe instances.
Parametersxml:XML (default = null ) — Optional E4X XML object defining a keyframe in Motion XML format.
|
affectsTweenable | () | method |
public function affectsTweenable(tweenableName:String = ""):Boolean
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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 |
getTween | () | method |
public function getTween(target:String = ""):ITween
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Retrieves an ITween object for a specific animation property.
Parameters
target:String (default = " ") — The name of the property being tweened.
|
ITween — An object that implements the ITween interface.
|
See also
getValue | () | method |
public function getValue(tweenableName:String):Number
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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.
|
setValue | () | method |
public function setValue(tweenableName:String, newValue:Number):void
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.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.
|