| <!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="SimpleMotionPath,spark.effects.animation.SimpleMotionPath,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"><title>spark.effects.animation.SimpleMotionPath</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 = 'SimpleMotionPath - 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> | <a href="../../../class-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Classes</a> | <a href="../../../all-index-A.html" onclick="loadClassListFrame('../../../index-list.html')">Index</a> | <a id="framesLink1" href="../../../index.html?spark/effects/animation/SimpleMotionPath.html&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">SimpleMotionPath</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a> | <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3"> </td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve"> |
| <!-- |
| |
| if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("SimpleMotionPath"); 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 class SimpleMotionPath</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">SimpleMotionPath <img src="../../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a> <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 : </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 : </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 : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p></p><p></p> |
| The SimpleMotionPath class specifies the name of a property, and the values that |
| that property takes over time, for instances of the Animate |
| effect. |
| |
| <p>This class is a simple subclass of MotionPath for defining |
| two keyframes to hold the <code>valueFrom</code>, <code>valueTo</code>, and |
| <code>valueBy</code> properties. |
| The MotionPath class itself can define any number of keyframes.</p> |
| <p></p><p><span class="classHeaderTableLabel">Default MXML Property</span><code>keyframes</code></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="MotionPath.html" target="">MotionPath</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="../../../images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="../../../images/collapsed.gif"> Show Inherited Public Properties</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../../spark/effects/animation/MotionPath.html#interpolator" class="signatureLink">interpolator</a> : <a href="../../../spark/effects/interpolation/IInterpolator.html">IInterpolator</a><div class="summaryTableDescription"> |
| The interpolator determines how in-between values in an animation |
| are calculated.</div></td><td class="summaryTableOwnerCol"><a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../../spark/effects/animation/MotionPath.html#keyframes" class="signatureLink">keyframes</a> : Vector.<<a href="../../../spark/effects/animation/Keyframe.html">Keyframe</a>><div class="summaryTableDescription"> |
| A sequence of Keyframe objects that represent the time/value pairs |
| that the property takes during the animation.</div></td><td class="summaryTableOwnerCol"><a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../../spark/effects/animation/MotionPath.html#property" class="signatureLink">property</a> : String<div class="summaryTableDescription"> |
| The name of the property on the effect target to be animated.</div></td><td class="summaryTableOwnerCol"><a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a></td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#valueBy" class="signatureLink">valueBy</a> : Object<div class="summaryTableDescription"> |
| Optional property which specifies the delta used to calculate |
| either the valueFrom or valueTo value.</div></td><td class="summaryTableOwnerCol">SimpleMotionPath</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#valueFrom" class="signatureLink">valueFrom</a> : Object<div class="summaryTableDescription"> |
| The starting value for the property during the animation.</div></td><td class="summaryTableOwnerCol">SimpleMotionPath</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#valueTo" class="signatureLink">valueTo</a> : Object<div class="summaryTableDescription"> |
| The value that the named property will animate to.</div></td><td class="summaryTableOwnerCol">SimpleMotionPath</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="../../../images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="../../../images/collapsed.gif"> Show Inherited Public Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#SimpleMotionPath()" class="signatureLink">SimpleMotionPath</a>(property:String = null, valueFrom:Object = null, valueTo:Object = null, valueBy:Object = null)</div><div class="summaryTableDescription"> |
| Constructor.</div></td><td class="summaryTableOwnerCol">SimpleMotionPath</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../../spark/effects/animation/MotionPath.html#clone()" class="signatureLink">clone</a>():<a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a></div><div class="summaryTableDescription"> |
| Returns a copy of this MotionPath object, including copies |
| of each keyframe.</div></td><td class="summaryTableOwnerCol"><a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../../spark/effects/animation/MotionPath.html#getValue()" class="signatureLink">getValue</a>(fraction:Number):Object</div><div class="summaryTableDescription"> |
| Calculates and returns an interpolated value, given the elapsed |
| time fraction.</div></td><td class="summaryTableOwnerCol"><a href="../../../spark/effects/animation/MotionPath.html">MotionPath</a></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="valueBy"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">valueBy</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>valueBy:Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </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 : </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 : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| Optional property which specifies the delta used to calculate |
| either the <code>valueFrom</code> or <code>valueTo</code> value. |
| Providing this optional property lets the effect |
| calculate the necessary from/to values if either |
| are not provided or are to be determined dynamically when the animation |
| begins. |
| |
| <p>The way that the <code>valueBy</code> value is used depends on which of the |
| other values are set. If neither are set, then the <code>valueFrom</code> |
| value is determined from the current property value in the target, |
| and the <code>valueTo</code> value is <code>valueFrom + valueBy</code>. |
| If one or the other is set, but not both, then |
| the unset value is calculated by the other value: |
| <code>valueTo = valueFrom + valueBy</code> or |
| <code>valueFrom = valueTo - valueBy</code>). If both are set, then the |
| <code>valueBy</code> property is ignored.</p> |
| |
| <p>Note that since <code>valueBy</code> is of type |
| Object, the effect cannot directly calculate the other values |
| from it. It uses the effect's interpolator |
| to calculate the values by calling the interpolator's <code>increment()</code> |
| and <code>decrement()</code> methods. |
| If no interpolator is set, then it will use NumberInterpolator by default.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get valueBy():Object</code><br/><code> public function set valueBy(value:Object):void</code><br/></div><a name="propertyDetail"></a><a name="valueFrom"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">valueFrom</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>valueFrom:Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </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 : </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 : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| The starting value for the property during the animation. |
| |
| <p>A value of Null or NaN (in the case of Numbers) specifies that a |
| value must be determined dynamically at runtime, either by |
| getting the value from the target property directly or calculating |
| it if the other value is valid and there is also a valid |
| <code>valueBy</code> value supplied.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get valueFrom():Object</code><br/><code> public function set valueFrom(value:Object):void</code><br/></div><a name="propertyDetail"></a><a name="valueTo"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">valueTo</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>valueTo:Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </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 : </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 : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| The value that the named property will animate to. |
| |
| <p>A value of Null or NaN (in the case of Numbers) element specifies that a |
| value must be determined dynamically at runtime, either by |
| getting the value from the target property directly or calculating |
| it if the other value is valid and there is also a valid <code>valueBy</code> |
| value supplied.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get valueTo():Object</code><br/><code> public function set valueTo(value:Object):void</code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="SimpleMotionPath()"></a><a name="SimpleMotionPath(String,Object,Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">SimpleMotionPath</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function SimpleMotionPath(property:String = null, valueFrom:Object = null, valueTo:Object = null, valueBy:Object = null)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </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 : </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 : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p> |
| Constructor. You can specify both the |
| <code>valueFrom</code> and <code>valueTo</code> parameters, |
| or specify the <code>valueBy</code> parameter and either the <code>valueFrom</code> |
| or <code>valueTo</code> parameter. |
| If you omit these parameters, Flex calculates them from the effect target. |
| |
| </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">property</span>:String</code> (default = <code>null</code>)<code></code> — The name of the property being animated. |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">valueFrom</span>:Object</code> (default = <code>null</code>)<code></code> — The initial value of the property. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">valueTo</span>:Object</code> (default = <code>null</code>)<code></code> — The final value of the property. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">valueBy</span>:Object</code> (default = <code>null</code>)<code></code> — An optional parameter that specifies the delta with |
| which to calculate either the from or to values, if one is omitted. |
| |
| </td></tr></table></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 --> |