I have a main object that moves around wherever the mouse is.
How would I make an animation that shoots out other objects from the main object toward receivers that don't move? Is there an easier way than finding the angle between the main object and the receivers and then sending the animation out that way?
So the shooting animation should rotate depending on where the main object is so that the shooting animations will always reach the target.
You can use TweenLite and just specify the x, y location :
TweenLite.to(bullet, duration, {x:targetX, y:targetY});
You can download it here :
You'll probably want to calculate the duration of the tween based on the distance between the objects and how fast you'd like it to move in pixels per second. For example :
var duration:Number = distance / pixelsPerSecond;
That would give you the correct amount of time for the tween.