How to drag a movieclip around using mouse

i have done so far but i cannot manage to get this work

any help??

*mouseListener.onMouseDown=function()
{
draw=true;
cubuttonX=_xmouse;
cubuttonY=_ymouse;
};

mouseListener.onMouseUp=function()
{
draw=false;
}
mouseListener.onMouseMove= function()
{
if(draw)
{

button._x=button._x+(_xmouse-cubuttonX);
button._y=button._y+(_ymouse-cubuttonY);
 
 
}

};
Mouse.addListener(mouseListener);
*
the reason why i did this

button._x=button._x+(_xmouse-cubuttonX);
button._y=button._y+(_ymouse-cubuttonY);

is that i dont want the movieclip posisiton is at the (0,0) of the mouse

but the code still doesnt work as what i want
instead, it drag the movieclip too far away…\

There is a startDrag and stopDrag functions built into the movieclip class, I would use them, they make dragging movieclips alot easier.

wow, very straight forwad
thanks

make the movie clip as a button.
and then code it in the button
on(press)
{
startDrag(this,4 parameters);
}
on(release)
{
stopDrag();
}