Reputation: 29497
I have a Bullet
symbol on my stage, but I want to move it towards a Point
at a given speed
. Is there any way of doing this?
Upvotes: 1
Views: 82
Reputation: 12431
You don't specify which version of ActionScript you're using but, if it's ActionScript 2.0, you can move a symbol as long as it is a MovieClip
type and you give it an instance name. In ActionScript 3.0 I think you can also move a Button
symbol,
The easiest way to move the symbol to a new point would be to use a tween library such as Greensock's TweenLite which is pretty much the standard for movement in Flash. If you're using ActionScript 3.0, you could use the built in Tween
class. Either of these will allow you to move the object over a duration which you can specify in either seconds or frames.
Upvotes: 2