开发者

In actionscript 3 flash cs5, how do I define a symbol's position

I wan to know how to move a movie clip to a certain x, y. How would I do that? Because I know this is wrong:

paddle.x 开发者_高级运维= 253;

Thanks.


check that the name of the movieclip is "paddle" not(or not just) the class name.

Also make sure that you put this code in the parent


To move any DisplayObject or MovieClip you can use Tween Class to animate. and you can also use timeline based Animation. Using Tween Class to move paddle movieClip in 3 seconds then here is the code

vat TweenObj:Tween =new Tween(paddle, "x", Elastic.easeInOut,paddle.x, 254, 3, true);


Check that the movieclip you are trying to move is currently placed on the stage and that it is named (in the properties) paddle. Then paddle.x = 253; should work as long as the actionscript is on the same frame

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜