Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-18-2009, 05:02 AM   PM User | #1
hardnrg
New Coder

 
Join Date: Jul 2007
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
hardnrg is an unknown quantity at this point
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
hardnrg is offline   Reply With Quote
Old 05-27-2009, 01:20 AM   PM User | #2
hardnrg
New Coder

 
Join Date: Jul 2007
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
hardnrg is an unknown quantity at this point
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.
hardnrg is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:36 AM.


Advertisement
Log in to turn off these ads.