On 4/25/07 5:31 PM, "Joshua Sera" <[EMAIL PROTECTED]> wrote:

> If you know that the two endpoints of the curve are
> always going to have an equal x or y value, the you
> can just use the quadratic formula, and get the right
> Y value.

The two endpoints will never move. The middlepoint will be the only one
moving.

So now I just need the quadratic formula ... I googled "quadratic formula"
and I couldn't figure it out nor translate it to my Flash needs.

Like I said, I'm (almost) totally math impaired !

> If the endpoints are arbitrary, it's a bit more
> complicated. Bezier curves take a number from 0 to 1
> and give you a point along the curve. Plugging 0 into
> the formula gives you the first endpoint, 1 gets you
> the last, and anything else gives you something in
> between.
> 
> This means you're going to have to figure out where
> along the curve your MC is closest to, which involves
> some vector math.
> 

Since I know the _x position of MC, in order to figure out where the MC is
along the curve... Can't I use its _x "percentage":

 MC._x / (lastpoint.x - firstpoint.x)

Just curious, but I don't think I need this since my two endpoints will not
move.

> If you want, I can draw out the way I'd approach it.

Of course I'd be more than happy to see that.




_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to