Package | com.greensock.easing |
Class | public class OutIn |
Inheritance | OutIn ![]() |
The first parameter, linearRatio
, determines the proportion of the ease during which
the rate of change will be linear (steady pace). This should be a number between 0 and 1. For example,
0.5 would be half, so the first 25% of the ease would be easing out (decelerating), then 50% would be
linear, then the final 25% would be easing in (accelerating). If you choose 0.8, that would mean 80%
of the ease would be linear, leaving 10% on each end to ease. The default is 0.7.
The second parameter, power
, determines the strength of the ease at each end.
If you define a value greater than 1, it will actually reverse the linear portion in the middle
which can create interesting effects. The default is 0.7.
import com.greensock.*; import com.greensock.easing.*; //use the default OutIn ease (linearRatio of 0.7 and power of 0.7) TweenLite.to(mc, 5, {x:600, ease:OutIn.ease}); //use a new OutIn ease with 50% of the tween being linear (2.5 seconds) and a power of 0.8 TweenLite.to(mc, 5, {x:600, ease:new OutIn(0.5, 0.8)}); //this gives the exact same effect as the line above, but uses a different syntax TweenLite.to(mc, 5, {x:600, ease:OutIn.ease.config(0.5, 0.8)});
Copyright 2012, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
Property | Defined by | ||
---|---|---|---|
ease : OutIn
[static] The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time.
| OutIn |
Method | Defined by | ||
---|---|---|---|
OutIn(linearRatio:Number = 0.7, power:Number = 0.7)
Constructor
| OutIn | ||
Permits customization of the ease with various parameters.
| OutIn | ||
getRatio(p:Number):Number
Translates the tween's progress ratio into the corresponding ease ratio.
| OutIn |
ease | property |
public static var ease:OutIn
The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time.
OutIn | () | constructor |
public function OutIn(linearRatio:Number = 0.7, power:Number = 0.7)
Constructor
ParameterslinearRatio:Number (default = 0.7 ) — the proportion of the ease during which the rate of change will be linear (steady pace). This should be a number between 0 and 1. For example, 0.5 would be half, so the first 25% of the ease would be easing out (decelerating), then 50% would be linear, then the final 25% would be easing in (accelerating). If you choose 0.8, that would mean 80% of the ease would be linear, leaving 10% on each end to ease. The default is 0.7.
|
|
power:Number (default = 0.7 ) — The strength of the ease at each end. If you define a value above 1, it will actually reverse the linear portion in the middle which can create interesting effects. The default is 0.7.
|
config | () | method |
public function config(linearRatio:Number = 0.7, power:Number = 0.7):OutIn
Permits customization of the ease with various parameters.
ParameterslinearRatio:Number (default = 0.7 ) — the proportion of the ease during which the rate of change will be linear (steady pace). This should be a number between 0 and 1. For example, 0.5 would be half, so the first 25% of the ease would be easing out (decelerating), then 50% would be linear, then the final 25% would be easing in (accelerating). If you choose 0.8, that would mean 80% of the ease would be linear, leaving 10% on each end to ease. The default is 0.7.
|
|
power:Number (default = 0.7 ) — The strength of the ease at each end. If you define a value above 1, it will actually reverse the linear portion in the middle which can create interesting effects. The default is 0.7.
|
OutIn —
new OutIn instance that is configured according to the parameters provided
|
getRatio | () | method |
public override 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.
Parametersp:Number — progress ratio (a value between 0 and 1 indicating the progress of the tween/ease)
|
Number — translated number
|