Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2007
    Posts
    24
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Trajectories, Projectiles and speeds

    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,
    Roy

  • #2
    New Coder
    Join Date
    Jul 2007
    Posts
    24
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •