dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: moving clips on Bezier curves

  1. #1
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194

    moving clips on Bezier curves

    hi,

    I've seen examples of drawing Bezier curves, but how would you get a movieclip to move on one??

    thanks for any help
    boombanguk

  2. #2
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,367
    If you don't want it to be dynamic, you can just create the tool in authoring time and have a follow motion path tween.

    If you want it dynamic, the way I did it(because I my limited knowledge of calculus), Is you have your initial and final point of a curve. Then you have a point somewhere else, which you will reach half to distance off(which causes the curve). To plot the course, average the slope from the first point to the curve point with the slope from the curve point to the final point. (By average, I mean as the ball progresses use more and more of the final slope, and less of the first slope).

    This ends accurately, and produces a curve, though is not perfect(You would have to know the length of the curve for it to be better for finding the percent, I currently use the percentage of how far it has gone along the first point to last point line, by using a perpendicular line to that line, to find the intersection).

    This may not make much sense, but if you want more explaining, just ask.

    Hope that helps!

  3. #3
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    thanks for that, but i what im trying to acheive is take some of the bezier curve drawing code I have, and then use that to plot the path of my clip, so I think i'll need to be able to calc the path using the actual quadratic equation......my calc is non existant as well! , but im hoping someone can point me in the direction to figure that out

  4. #4
    self-portrait Kianis's Avatar
    Join Date
    Feb 2004
    Location
    Stockholm, Sweden
    Posts
    425
    I know André-Michelle got tons of stuff about bezier curves in his lab but I can't seem to find where to get the actual code anymore, it _used_ to be available. :/
    // Mazapán, my portfolio

  5. #5

  6. #6
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    hi,
    thats exactly what I need, but there was no source code

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center