MX movieclip movement with deceleration?

I have movieclip1. When I mouseDown, I want to move movieclip2 to a specific _x position with deceleration.

I am using setProperty (_x) of clip2 on mouseDown of clip1, and clip2 moves just fine, but how do I get the deceleration to work?

Thanks for any help,

georgia

:-\

Take a search of this site for something called “easing”…

I think you’ll find it very useful :wink:

http://www.kirupa.com/developer/mx/followease.htm

http://www.kirupa.com/developer/mx/easing_mouseclick.htm

I have studied the easing tutorial, but as a newbie, I still don’t get one thing.

In the tutorial, the actions are targeting the movieclip that they are attached to. I am trying to target a different (clip2) clip and to have it move to a specific _x coordinate with the deceleration (not follow the mouse). I have tried various experiments, but no good. Any help would be greatly appreciated.:beam:

Well easing is an equation…

_x += (endX-_x)/speed;
_y += (endY-_y)/speed;

endX and endY are the final destinations.

So if you set endX and endY to where you want the clip to go, it will go there.