套件 | spark.effects.interpolation |
類別 | public class NumberInterpolator |
繼承 | NumberInterpolator Object |
實作 | IInterpolator |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | NumberInterpolator | ||
Given a base value and a value to subtract from it,
return the result of that decrement operation. | NumberInterpolator | ||
[靜態]
Returns the singleton of this class. | NumberInterpolator | ||
指出物件是否有已定義的指定屬性。 | Object | ||
Given a base value and a value to add to it,
return the result of that operation. | NumberInterpolator | ||
Interpolation for NumberInterpolator consists of a simple
parametric calculation between startValue and
endValue, using fraction as the
fraction of the elapsed time from start to end:
return startValue + fraction (endValue - startValue);
| NumberInterpolator | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
NumberInterpolator | () | 建構函式 |
public function NumberInterpolator()
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
decrement | () | 方法 |
public function decrement(baseValue:Object, decrementValue:Object):Object
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Given a base value and a value to subtract from it,
return the result of that decrement operation. For example,
if the objects are simple Numbers, the result would be
Number(baseValue) - Number(incrementValue)
.
This function is called by the animation system when it
needs to dynamically calculate a value given some ending
value and a 'by' value that should be subtracted from it. Both of
the arguments are of type Object and cannot simply be added together.
參數
baseValue:Object — The start value of the interpolation.
| |
decrementValue:Object — The change to apply to the baseValue .
|
Object — The interpolated value.
|
getInstance | () | 方法 |
public static function getInstance():NumberInterpolator
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Returns the singleton of this class. Since all NumberInterpolators have the same behavior, there is no need for more than one instance.
傳回值NumberInterpolator — The singleton of this class.
|
increment | () | 方法 |
public function increment(baseValue:Object, incrementValue:Object):Object
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Given a base value and a value to add to it,
return the result of that operation.
For example, if the objects are simple Numbers, the result is a
Number(baseValue) + Number(incrementValue)
.
This method is called by the animation system when it
needs to dynamically calculate a value given some starting
value and a 'by' value that should be added to it. Both of
the arguments are of type Object and cannot simply be added together.
參數
baseValue:Object — The start value of the interpolation.
| |
incrementValue:Object — The change to apply to the baseValue .
|
Object — The interpolated value.
|
interpolate | () | 方法 |
public function interpolate(fraction:Number, startValue:Object, endValue:Object):Object
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Interpolation for NumberInterpolator consists of a simple
parametric calculation between startValue
and
endValue
, using fraction
as the
fraction of the elapsed time from start to end:
return startValue + fraction (endValue - startValue);
參數
fraction:Number — The fraction elapsed of the
animation, between 0.0 and 1.0.
| |
startValue:Object — The start value of the interpolation.
| |
endValue:Object — The end value of the interpolation.
|
Object — The interpolated value.
|
Tue Jun 12 2018, 03:47 PM Z