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
精彩评论