Movement with actionscript

I have a floating menu on my page that the viewer can drag around the screen. I need to have the viewer be able to click on it and it move to a certain spot on the screen from where it was. I can make it go to a certain point by setting the _x and _y values of it, but I want to be able to see the motion of it going to that point, instead of just appearing there. Hope I explained clearly. Thanks.

so say your menu is an MC w/instance name menu, it’s AS:

onClipEvent (load){
	speed = 5;
	destinationx = 100;
	destinationy = 20; // (100,20) is the start location

}
onClipEvent (enterFrame) {
	x = destinationx-_x;
	this._x += x/speed;
	y = destinationy-_y;
	this._y += y/speed;
}

AS for button inside menu mc:

on (release){
	_parent.menu.destinationx = 300; // (300,400) is where you want the menu to go when clicked.
	_parent.menu.destinationy = 400;
}

Sweet, thanks bwh2!

you’re welcome.

gumby, u know there is a tutorial section on this site right? the movement is called easing :wink:

Prophet.