blob: 885a9564f8f18a748cfdf1689a29df40fe1b582c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../../override.css" type="text/css"><meta name="keywords" content="Animation,spark.effects.animation.Animation,LOOP,REVERSE,animationTarget,currentValue,cycleFraction,cycleTime,duration,easer,easer,interpolator,interpolator,isPlaying,keyframes,motionPaths,playReversed,playheadTime,property,repeatBehavior,repeatCount,repeatDelay,startDelay,time,value,valueBy,valueBy,valueFrom,valueTo,animationEnd,animationRepeat,animationStart,animationStop,animationUpdate,clone,clone,end,getValue,pause,play,resume,stop"><title>spark.effects.animation.Animation</title></head><body><script language="javascript" type="text/javascript" src="../../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../../help.js"></script><script language="javascript" type="text/javascript" src="../../../cookies.js"></script><script language="javascript" type="text/javascript"><!--
asdocTitle = 'Animation - ApacheFlex API Reference';
var baseRef = '../../../';
window.onload = configPage;
--></script>
<script type="text/javascript">
scrollToNameAnchor();
</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../../package-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="../../../class-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="../../../all-index-A.html" onclick="loadClassListFrame('../../../index-list.html')">Index</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../../index.html?spark/effects/animation/Animation.html&amp;spark/effects/animation/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">Animation</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Animation"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);}
-->
</script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">spark.effects.animation</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public final class Animation</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Animation <img src="../../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p></p><p></p>
The Animation class defines an animation that happens between
the start and end values of a property over a specified period of time.
The animation can be a change in position, such as performed by
the Move effect; a change in size, as performed by the Resize effect;
a change in visibility, as performed by the Fade effect; or other
types of animations used by effects or run directly with the Animation class.
<p>This class defines the timing and value parts of the animation.
Other code, either in effects or in application code, associates the animation
with target objects and properties, such that the animated values produced by
Animation class can then be applied to target objects and properties to actually
cause these objects to animate.</p>
<p>When defining animation effects, you typically create an
instance of the Animate class, or of a subclass of Animate. This creates
an Animation instance in the <code>play()</code> method. The Animation instance
accepts start and end values, a duration, and optional parameters such as
easer and interpolator objects.</p>
<p>The Animation object calls event listeners at the start and end of the animation,
when the animation repeats, and at regular update intervals during
the animation. These calls pass values which the Animation instance calculated from
the start and end values and the easer and interpolator objects. These
values can then be used to set property values on target objects.</p>
<p></p><p><span class="classHeaderTableLabel">Default MXML Property</span><code>motionPaths</code></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="../../../spark/effects/Animate.html" target="">spark.effects.Animate</a><br/><a href="../../../spark/effects/supportClasses/AnimateInstance.html" target="">spark.effects.supportClasses.AnimateInstance</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#animationTarget" class="signatureLink">animationTarget</a> : <a href="../../../spark/effects/animation/IAnimationTarget.html">IAnimationTarget</a><div class="summaryTableDescription">
The IAnimationTarget object notified with all
start, end, repeat, and update events for this animation.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#currentValue" class="signatureLink">currentValue</a> : Object<div class="summaryTableDescription">
An Object containing the calculated values as of the current frame
of the Animation.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#cycleFraction" class="signatureLink">cycleFraction</a> : Number<div class="summaryTableDescription">[read-only]
The current fraction elapsed in the animation, after easing
has been applied.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#cycleTime" class="signatureLink">cycleTime</a> : Number<div class="summaryTableDescription">[read-only]
The current millisecond position in the current cycle animation.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#duration" class="signatureLink">duration</a> : Number = 500<div class="summaryTableDescription">
The length of time, in milliseconds, of the animation,
not counting any repetitions defined by
the repeatCount property.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#easer" class="signatureLink">easer</a> : <a href="../../../spark/effects/easing/IEaser.html">IEaser</a><div class="summaryTableDescription">
The easing behavior for this effect.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#interpolator" class="signatureLink">interpolator</a> : <a href="../../../spark/effects/interpolation/IInterpolator.html">IInterpolator</a> = null<div class="summaryTableDescription">
The interpolator used by the Animation instance
to calculate values between
the start and end values of the property.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#isPlaying" class="signatureLink">isPlaying</a> : Boolean<div class="summaryTableDescription">[read-only]
If true, the animation is currently playing.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#motionPaths" class="signatureLink">motionPaths</a> : Vector.&lt;<a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a>&gt;<div class="summaryTableDescription">
The set of MotionPath objects that define the properties and values
that the Animation will animate over time.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#playheadTime" class="signatureLink">playheadTime</a> : Number<div class="summaryTableDescription">
The total elapsed time of the animation, including any start delay
and repetitions.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#playReversed" class="signatureLink">playReversed</a> : Boolean<div class="summaryTableDescription">
If true, play the animation in reverse.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#repeatBehavior" class="signatureLink">repeatBehavior</a> : String<div class="summaryTableDescription">
Sets the behavior of a repeating animation.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#repeatCount" class="signatureLink">repeatCount</a> : int<div class="summaryTableDescription">
The number of times that this animation repeats.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#repeatDelay" class="signatureLink">repeatDelay</a> : Number<div class="summaryTableDescription">
The amount of time, in milliseconds, to delay before each repetition cycle
begins.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#startDelay" class="signatureLink">startDelay</a> : Number<div class="summaryTableDescription">
The amount of time spent waiting before the animation
begins.</div></td><td class="summaryTableOwnerCol">Animation</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#Animation()" class="signatureLink">Animation</a>(duration:Number = 500, property:String = null, startValue:Object = null, endValue:Object = null)</div><div class="summaryTableDescription">
Constructor.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#end()" class="signatureLink">end</a>():void</div><div class="summaryTableDescription">
Interrupts the animation, jumps immediately to the end of the animation,
and calls the animationEnd() function on the animationTarget.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#pause()" class="signatureLink">pause</a>():void</div><div class="summaryTableDescription">
Pauses the effect until the resume() method is called.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#play()" class="signatureLink">play</a>():void</div><div class="summaryTableDescription">
Start the animation.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#resume()" class="signatureLink">resume</a>():void</div><div class="summaryTableDescription">
Resumes the effect after it has been paused
by a call to the pause() method.</div></td><td class="summaryTableOwnerCol">Animation</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#stop()" class="signatureLink">stop</a>():void</div><div class="summaryTableDescription">
Stops the animation, ending it without calling the end()
method.</div></td><td class="summaryTableOwnerCol">Animation</td></tr></table></div><script language="javascript" type="text/javascript"><!--
showHideInherited();
--></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="animationTarget"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">animationTarget</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>animationTarget:<a href="../../../spark/effects/animation/IAnimationTarget.html">IAnimationTarget</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The IAnimationTarget object notified with all
start, end, repeat, and update events for this animation.
A value of <code>null</code> indicates that there is no target
to notify.
</p><p> The default value is <code>null</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get animationTarget():<a href="../../../spark/effects/animation/IAnimationTarget.html">IAnimationTarget</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set animationTarget(value:<a href="../../../spark/effects/animation/IAnimationTarget.html">IAnimationTarget</a>):void</code><br/></div><a name="propertyDetail"></a><a name="currentValue"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">currentValue</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var currentValue:Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
An Object containing the calculated values as of the current frame
of the Animation.
The values are stored as map values, using property names as the key.
</p></div><a name="propertyDetail"></a><a name="cycleFraction"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">cycleFraction</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>cycleFraction:Number</code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The current fraction elapsed in the animation, after easing
has been applied. This value is between 0 and 1.
An animation 'cycle' is defined as a single repetition of the animation,
where the <code>repeatCount</code> property defines the number of
cycles that will be played.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get cycleFraction():Number</code><br/></div><a name="propertyDetail"></a><a name="cycleTime"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">cycleTime</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>cycleTime:Number</code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The current millisecond position in the current cycle animation.
This value is between 0 and <code>duration</code>.
An animation 'cycle' is defined as a single repetition of the animation,
where the <code>repeatCount</code> property defines the number of
cycles that will be played.
Use the <code>seek()</code> method to change the position of the animation.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get cycleTime():Number</code><br/></div><a name="propertyDetail"></a><a name="duration"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">duration</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var duration:Number = 500</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The length of time, in milliseconds, of the animation,
not counting any repetitions defined by
the <code>repeatCount</code> property.
</p><p> The default value is <code>500</code>.</p></div><a name="propertyDetail"></a><a name="easer"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">easer</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>easer:<a href="../../../spark/effects/easing/IEaser.html">IEaser</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The easing behavior for this effect.
This IEaser object is used to convert the elapsed fraction of the animation
into an eased fraction, which is then used to calculate
the value at that eased elapsed fraction.
<p>A value of <code>null</code> means no easing is
used, which is equivalent to using a Linear ease, or
<code>animation.easer = Linear.getInstance();</code>.</p>
</p><p> The default value is <code>Sine(.5)</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get easer():<a href="../../../spark/effects/easing/IEaser.html">IEaser</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set easer(value:<a href="../../../spark/effects/easing/IEaser.html">IEaser</a>):void</code><br/></div><a name="propertyDetail"></a><a name="interpolator"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">interpolator</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var interpolator:<a href="../../../spark/effects/interpolation/IInterpolator.html">IInterpolator</a> = null</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The interpolator used by the Animation instance
to calculate values between
the start and end values of the property.
By default, the class uses the NumberInterpolator class or,
in the case of the start and end values being arrays or Vectors,
by the MultiValueInterpolator class.
Interpolation of other data types, or
of Numbers that should be interpolated
differently, such as <code>uint</code> values that hold color
channel information, can be handled by supplying a different
interpolator.
</p><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../../spark/effects/interpolation/NumberInterpolator.html" target="">spark.effects.interpolation.NumberInterpolator</a><br/><a href="../../../spark/effects/interpolation/MultiValueInterpolator.html" target="">spark.effects.interpolation.MultiValueInterpolator</a></div></div><a name="propertyDetail"></a><a name="isPlaying"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">isPlaying</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>isPlaying:Boolean</code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
If <code>true</code>, the animation is currently playing.
The value is <code>false</code> unless the animation
has been played and not yet stopped (either programmatically or
automatically) or paused.
</p><p> The default value is <code>false</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get isPlaying():Boolean</code><br/></div><a name="propertyDetail"></a><a name="motionPaths"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">motionPaths</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var motionPaths:Vector.&lt;<a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a>&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The set of MotionPath objects that define the properties and values
that the Animation will animate over time.
</p><p><span class="label">See also</span></p><div class="seeAlso"><a href="MotionPath.html" target="">spark.effects.animation.MotionPath</a></div></div><a name="propertyDetail"></a><a name="playheadTime"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">playheadTime</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>playheadTime:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The total elapsed time of the animation, including any start delay
and repetitions. For an animation playing through its first cycle,
this value will equal that of <code>cycleTime</code>.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get playheadTime():Number</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set playheadTime(value:Number):void</code><br/></div><a name="propertyDetail"></a><a name="playReversed"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">playReversed</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>playReversed:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
If <code>true</code>, play the animation in reverse.
If the animation is currently playing in the opposite
direction to the specified value of <code>playReversed</code>,
the animation will change direction dynamically.
</p><p> The default value is <code>false</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get playReversed():Boolean</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set playReversed(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="repeatBehavior"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">repeatBehavior</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>repeatBehavior:String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
Sets the behavior of a repeating animation.
A repeating animation has the
<code>repeatCount</code> property set to 0 or to a value greater than 1.
This value should be either <code>RepeatBehavior.LOOP</code>,
meaning the animation repeats in the same order each time, or
<code>RepeatBehavior.REVERSE</code>,
meaning the animation reverses direction for each iteration.
</p><p> The default value is <code>RepeatBehavior.LOOP</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get repeatBehavior():String</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set repeatBehavior(value:String):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="RepeatBehavior.html" target="">spark.effects.animation.RepeatBehavior</a></div></div><a name="propertyDetail"></a><a name="repeatCount"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">repeatCount</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>repeatCount:int</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The number of times that this animation repeats.
A value of 0 means that it repeats indefinitely.
</p><p> The default value is <code>1</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get repeatCount():int</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set repeatCount(value:int):void</code><br/></div><a name="propertyDetail"></a><a name="repeatDelay"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">repeatDelay</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>repeatDelay:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The amount of time, in milliseconds, to delay before each repetition cycle
begins. Setting this value to a non-zero number
ends previous animation cycle exactly at its end value
However, non-delayed repetitions may skip over that
value completely as the animation transitions smoothly from being
near the end of one cycle to being past the beginning of the next.
This property must be a value >= 0.
<p>This property is used for the first repetition
after the first animation cycle.
To delay the first cycle of the animation, use
the <code>startDelay</code> property. </p>
</p><p> The default value is <code>0</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get repeatDelay():Number</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set repeatDelay(value:Number):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="Animation.html#startDelay" target="">startDelay</a></div></div><a name="propertyDetail"></a><a name="startDelay"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">startDelay</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>startDelay:Number</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
The amount of time spent waiting before the animation
begins.
This property must be a value >= 0.
</p><p> The default value is <code>0</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get startDelay():Number</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set startDelay(value:Number):void</code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="Animation()"></a><a name="Animation(Number,String,Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">Animation</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function Animation(duration:Number = 500, property:String = null, startValue:Object = null, endValue:Object = null)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p>
Constructor.
The optional <code>property</code>, <code>startValue</code>, and
<code>endValue</code> parameters define a simple
animation with a single MotionPath object with two Keyframes.
If either value is non-null,
<code>startValue</code> becomes the <code>value</code> of the
first keyframe, at time=0, and
<code>endValue</code> becomes the <code>value</code> of
the second keyframe, at the end of the animation.
</p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">duration</span>:Number</code> (default = <code>500</code>)<code></code> &mdash; The length of the animation, in milliseconds.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">property</span>:String</code> (default = <code>null</code>)<code></code> &mdash; The property to animate.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">startValue</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The initial value of the property.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">endValue</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The final value of the property.
</td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="end()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">end</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function end():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
Interrupts the animation, jumps immediately to the end of the animation,
and calls the animationEnd() function on the <code>animationTarget</code>.
</p></div><a name="pause()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">pause</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function pause():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
Pauses the effect until the <code>resume()</code> method is called.
If <code>stop()</code> is called before <code>resume()</code>, then
the animation cannot be resumed.
</p></div><a name="play()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">play</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function play():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
Start the animation.
If the animation is already playing, it
is stopped first, then played.
</p></div><a name="resume()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">resume</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function resume():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
Resumes the effect after it has been paused
by a call to the <code>pause()</code> method.
</p></div><a name="stop()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">stop</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function stop():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
Stops the animation, ending it without calling the <code>end()</code>
method. The animationStop() function on the <code>animationTarget</code>
will be called.
</p></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 -->