Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
The Keyframe class defines the visual state at a specific time in a motion tween.
The primary animation properties are
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.
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.
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
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.
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.
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.
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: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
.
Implementation
public function get index():int
public function set index(value:int):void
public var label:String = ""
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
A string used to describe the keyframe.
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.
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.
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
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.
If
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: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.
Implementation
public function get rotation():Number
public function set rotation(value:Number):void
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
public function Keyframe(xml:XML = null)
Language Version : | ActionScript 3.0 |
Player Version : | Flash Player 9.0.28.0 |
Constructor for keyframe instances.
Parameters
| xml:XML (default = null ) — Optional E4X XML object defining a keyframe in Motion XML format.
|
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" .
|
Returns
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.
|
Returns
| ITween — An object that implements the ITween interface.
|
See also
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" .
|
Returns
| Number — The numerical value of the tweenable property.
|
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.
|
© 2004-2007 Adobe Systems Incorporated. All rights reserved.
Tue Mar 18 2008, 12:59 PM GMT-07:00