A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: [CS3] Inertia/Friction Drag thing

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448

    [CS3] Inertia/Friction Drag thing

    Ok, I'm not sure where to start on this, but I'm looking for a car like momentum on a clip that rests on another one that can be dragged.
    In this image:

    The red area is a movieclip that can be dragged with the mouse horizontal only. The blue area is a movieclip that rests on top of the red one.
    What I'd like to do is if the user drags the red clip slowly, then the blue one moves along with the red one evenly. However, if they drag the red one fast then the blue one slides back. So dragging the red fast to the right causes the blue to slide to the left. Also if the red one comes to a sudden stop, then I'd like the blue one to continue along for a bit. So if they are dragging to the right and then stop suddenly, the blue clip keeps sliding to the right for awhile....
    This would all be similar to having something in a car that slides when you take off and stop suddenly. Also it will not go past the blockers on the right and left of the red clip.

    Any help is much appreciated!
    Attached Images Attached Images

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