View Full Version : Trajectories, Projectiles and speeds

05-18-2009, 05:02 AM
Hi all,

This is more of a theory question than a request for code, but if you have something that might help, please feel free.

I'm working on a project that has balls travelling in a trajectory manner.

I already have various parablic equations, but what I'm interested in is having two balls travel the same arc (so same distance, angle, height, etc) but at different speeds. I.E. One takes 2 seconds to reach the destination, and the other ball takes 4 seconds.

What's the best way of doing this? I'm not using any tween libraries for the motion (rather, an onEnterFrame that movies the ball x and y positions), but I do have Tweener available if someone has suggestions.

Is there a way to manipulate the frames on a movieclip level, rather than the whole movie?

Thanks in Advance,

05-27-2009, 01:20 AM
Hey all, just thought I'd give an update.

I changed my code from being frame-based (onEnterFrame), to having the same function simply triggered by a Timer, which I can then change from 10 milliseconds, to 20 milliseconds, to 5 seconds, etc.

Pretty simple, and obvious solution, but hoperfully it helps someone else.