Yahoo!ウィジェットで簡単アニメーション アニメーションオブジェクト
Yahooウィジェットでバージョン4.0時点で利用できるアニメーションオブジェクトは5つあります。
FadeAnimation
オブジェクトの不透明度を調整するアニメーション(Version2.1以上)
new FadeAnimation(object, toOpacity, duration, easeType [, doneFunc]);
適用オブジェクト
- Image
- Frame
- Text
- TextArea
- Window
MoveAnimation
オブジェクトの位置を調整するアニメーション(Version2.1以上)
new MoveAnimation(object, toX, toY, duration, easeType [, doneFunc]);
適用オブジェクト
- Image
- Frame
- Text
- TextArea
- Window
RotateAnimation
オブジェクトの回転を調整するアニメーション(Version2.1以上)
new RotateAnimation(image, toAngle, duration, easeType [, doneFunc]);
適用オブジェクト
- Image
ResizeAnimation
オブジェクトのサイズを調整するアニメーション(Version4.0以上)
new ResizeAnimation(object, toWidth, toHeight, duration, easeType [, doneFunc]);
適用オブジェクト
- Image
- Frame
- Text
- TextArea
- Window
CustomAnimation
自分でアニメーションをカスタマイズ記述できます。(Version2.1以上)
new CustomAnimation( interval, updateFunc [,doneFunc] );
カスタムアニメーションはupdateファンクションがfalseを返すまで実行されるので、戻り値をtrueにしたら永久に続くアニメーションになります。
var x = new CustomAnimation( 1, UpdateMe ); x.duration = 350; x.startOpacity = myObject.opacity; x.endOpacity = 0; function UpdateMe(){ }