我得到了使我的对象连续旋转的代码
movieClip_2.addEventListener(Event.ENTER_FRAME, fl_RotateContinuously_2);
function fl_RotateContinuously_2(event:Event)
{
movieClip_2.rotation += 100;
}
我怎样才能让这个物体从 100 到 10 减慢 5 秒?
我得到了使我的对象连续旋转的代码
movieClip_2.addEventListener(Event.ENTER_FRAME, fl_RotateContinuously_2);
function fl_RotateContinuously_2(event:Event)
{
movieClip_2.rotation += 100;
}
我怎样才能让这个物体从 100 到 10 减慢 5 秒?
var fps:Number = stage.frameRate;
var step:int = 100;
var minStep:int = 10;
var time:Number = 5;
var increment:Number = (step - minStep) / (time * fps);
movieClip_2.addEventListener(Event.ENTER_FRAME, fl_RotateContinuously_2);
function fl_RotateContinuously_2(event:Event)
{
movieClip_2.rotation += step;
step -= increment;
step = Math.max(minStep, step);
}