AS3:创建运动吐温通过动作 [英] AS3: Create motion-tween through ActionScript

查看:101
本文介绍了AS3:创建运动吐温通过动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在主场景中创建了一个简单的形状(影片剪辑)。

I've created a simple shape(MovieClip) in main Scene.

所以,我想通过补间动画在ActionScript中移动的形状。

So, i wanna move that shape via Motion Tween in ActionScript.

请告诉我,我该怎么办呢?

Please tell me how can i do that ?

请注意:

我不是在谈论创建补间动画闪光灯时间表。我需要做的是在ActionScript。

I'm not talking about create Motion Tween in flash timeline. I need to do that in ActionScript.

P.S:

我在使用Flash Professional。

I'm using Flash Professional.

推荐答案

例如$ C $从的官方参考

 import fl.transitions.Tween;
 import fl.transitions.easing.*;
 var myTween:Tween = new Tween(myObject, "x", Elastic.easeOut, 0, 300, 3, true);

另外这里是一个<一个href="http://hub.tutsplus.com/tutorials/an-introduction-to-tweening-with-actionscript-30--active-2022"相对=nofollow>教程的话题。

只是为了您的信息:你可以补间的对象不仅是位置,还包括其他数字参数,例如:宽度和高度。

Just for your info: you can tween not only position of the object but also other numeric parameters, e.g. width and height.

这篇关于AS3:创建运动吐温通过动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆