API version 1

- ‐

reset

オブジェクトの状態をアニメーション開始時の状態に戻します。


AnimationParameterクラスの fromプロパティもしくはtoプロパティで設定された状態のどちらの状態になるかは、animatingDirectionプロパティの値によります。

animatingDirectionプロパティ

reset後の状態

DIRECTION_FORWARD

AnimationParameter.fromプロパティの状態

DIRECTION_BACKWARD

AnimationParameter.toプロパティの状態

呼出形式一覧

呼出形式

説明

void reset()

オブジェクトの状態をアニメーション開始時の状態に戻します。

戻り値一覧

戻り値

説明

void

なし

例外

なし

関連項目

animatingDirectionAnimationParameter.fromAnimationParameter.toプロパティ



使用例 CRSダウンロード

Form Animation_methods {
   X = 0;
   Y = 0;
   Width = 400;
   Height = 300;
   Button buttonStart {
           x = 8;
           y = 8;
           width = 104;
           height = 24;
           Title = "Animation.start";
           Function OnTouch( e ) {
                   if ( !^.anim.isAnimating ) {
                           #アニメーションを開始します
                           ^.anim.start();
                   }
           }
   }
   Button buttonAbort {
           x = 8;
           y = 40;
           width = 104;
           height = 24;
           Title = "Animation.abort";
           Function OnTouch( e ) {
                   #実行中のアニメーションを中止します
                   ^.anim.abort();
           }
   }
   Button buttonStop {
           x = 8;
           y = 72;
           width = 104;
           height = 24;
           Title = "Animation.reset";
           Function OnTouch( e ) {
                   #アニメーションを停止し、初期状態に戻します
                   ^.anim.reset();
           }
   }
   Label labelAnimation {
           x = 120;
           y = 20;
           width = 100;
           height = 30;
           Title = "Animation Sample";
           bgColor = "#80ffff";
   }

   Animation anim {
           duration = 5.0;
           easing = EASINGTYPE_BOUNCE;
           AnimationParameter param {
                   target = ^.^.labelAnimation;
                   propertyName = "Y";
                   from = 20;
                   to = 260;
           }
   }
}