开发者

ActionScript - Tween With Zero Duration?

开发者 https://www.devze.com 2023-01-22 13:59 出处:网络
i 开发者_如何转开发have a tween function which fades in a display object over time. when i set my tween duration to 0 nothing happens.isn\'t the tween suppose to animate in 0 seconds (or frames) to e

i 开发者_如何转开发have a tween function which fades in a display object over time.

when i set my tween duration to 0 nothing happens. isn't the tween suppose to animate in 0 seconds (or frames) to emulate no animation at all?

new Tween(this, "alpha", None.easeOut, 0.0, 1.0, 0, true);


I had a look at the source code for the Tween class. There is a simple conditional in it where it checks to see if the time passed is greater than the duration. If it is, then it dispatches the MOTION_FINISH event, stops any timers, removes listeners to ENTER_FRAME and that is it. There is no code to then set the target object to the finished state.

0

精彩评论

暂无评论...
验证码 换一张
取 消