Tweensy - easeOutIn

tweensy_easeoutin

TweenerにはあってTweensyにないトランジションタイプがeaseOutIn系。 これは、Tweenerがトランジションを計算する caurina.transitions.Equations クラスにはeaseOutIn系関数が実装されているが、Tweensyで使う fl.motion.easing にはeaseOutIn系の関数が実装されていないからだ。
なので、TweensyでeaseOutIn系の動きをさせたいときには TweenerEquations.easeOutIn*** 関数を、Tweensyの引数の ease:Function に渡して夢のコラボを実現するわけ。

caurina.transitions.Equations クラスの aseOutInQuad 関数を Tweensy.to の第四引数で渡すとこだけ例を挙げておく。

  • ActionScript
  • Tweensy_easeOutIn.as
  • Source
package {
	import caurina.transitions.Equations;
	import com.flashdynamix.motion.Tweensy;
	import flash.display.Sprite;

	// 中略

	public class Tweensy_easeOutIn extends Sprite {

		// 中略

		private function start():void {
			Tweensy.to(box, { x: 500 }, 3, Equations.easeOutInQuad);
		}

	}
}
  1. package {
  2.     import caurina.transitions.Equations;
  3.     import com.flashdynamix.motion.Tweensy;
  4.     import flash.display.Sprite;
  5.  
  6.     // 中略
  7.  
  8.     public class Tweensy_easeOutIn extends Sprite {
  9.  
  10.         // 中略
  11.  
  12.         private function start():void {
  13.             Tweensy.to(box, { x: 500 }, 3, Equations.easeOutInQuad);
  14.         }
  15.  
  16.     }
  17. }

でも、そもそもeaseOutIn系ってあんま使わないかも・・・


About this entry