Open flashultra opened 9 years ago
public function calculate (k:Float):Float {
if ((k /= 0.5) < 1) return 0.5 * (k * k * (((s *= (1.525)) + 1) * k - s));
return 0.5 * ((k -= 2) * k * (((s *= (1.525)) + 1) * k + s) + 2);
}
Each call to calculate is further modifying the stored variable s
What it should be is...
public function new (s:Float) {
this.s = s * 1.525;
}
public function calculate (k:Float):Float {
if ((k /= 0.5) < 1) return 0.5 * (k * k * ((s + 1) * k - s));
return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);
}
BackEaseInOut not works at expected. I trying with: Actuate.tween (spriteSpin, 1, { y: 100 }).ease (Back.easeInOut); , but sprite disapear from the screen. It should work as is shown here http://greensock.com/tweenlite-as