Actionscript3动画控制
记录一下Tween 的事件相关,方便以后使用
import fl.transitions.*;
import fl.transitions.easing.*;
function finishHandler(event:TweenEvent):void
{
// Place your actions here
trace(“MOTION_FINISH time = “+event.time);
}
var myTween:Tween = new Tween(img1_mc, “y”, Elastic.easeOut, 0, 300, 3, true);
myTween.addEventListener(TweenEvent.MOTION_FINISH, finishHandler);
注: 此代码示例显示如何使用为侦听动画指派的事件句柄函数创建简单的变形。 事件是定时分支, 可用于对动画的不同时间做出响应。 可以响应以下事件: motionChange、motionFinish、motionLoop、motionResume、motionStart 和 motionStop。