Package | com.greensock.easing |
Class | public class SteppedEase |
Inheritance | SteppedEase Ease Object |
TweenLite.to(mc, 2, {x:100, ease:SteppedEase.config(5)}); //or create an instance directly var steppedEase = new SteppedEase(5); TweenLite.to(mc, 3, {y:300, ease:steppedEase});
Note: SteppedEase is optimized for use with the GreenSock tweenining platform, so it isn't intended to be used with other engines. Specifically, its easing equation always returns values between 0 and 1.
Copyright 2008-2012, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
Method | Defined By | ||
---|---|---|---|
SteppedEase(steps:int)
Constructor
| SteppedEase | ||
config(steps:int):SteppedEase [static]
Permits customization of the ease (defining a number of steps). | SteppedEase | ||
getRatio(p:Number):Number [override]
Translates the tween's progress ratio into the corresponding ease ratio. | SteppedEase |
SteppedEase | () | Constructor |
public function SteppedEase(steps:int)
Constructor
Parameterssteps:int — Number of steps between the start and the end values.
|
config | () | method |
public static function config(steps:int):SteppedEase
Permits customization of the ease (defining a number of steps).
Parameters
steps:int — Number of steps between the start and the end values.
|
SteppedEase — new SteppedEase instance that is configured according to the parameters provided
|
getRatio | () | method |
override public function getRatio(p:Number):Number
Translates the tween's progress ratio into the corresponding ease ratio. This is the heart of the Ease, where it does all its work.
Parameters
p:Number — progress ratio (a value between 0 and 1 indicating the progress of the tween/ease)
|
Number — translated number
|