Movement with AS

I’m looking to make a box move from one point to another when you click on it. It seems to be a very simple task, but for some reason I am not grasping it. I have tried to seach the forums and tutorials but can’t quite find what I’m looking for. Ive attached a file similar to what I’m trying to do. Any help is appreciated. Thanks.

on the main timeline
box._x = 0;
box._y = 0;
speed = 20;
box.close.onPress = function() {
endX = Stage.width;
endY = Stage.height;
this._parent.onEnterFrame = function() {
this._x += (endX-this._x)/speed;
this._y += (endY-this._y)/speed;
};
};

yep follow stringy’s code and you’ll be on your way.

Thanks guys, that definetly worked.

I am trying to use this for a pop up menu that can be dragged around the screen. I am also using _alpha to make it disappear by using code similar to what you gave me. I am having trouble combining the movement with the dragging. I am going to work on it some more and if I can’t figure it out, I’ll post my progress and kindly ask for help once again. Thanks again.