I need a solution for this

i have created a dynamic movieclip using lineTo and curveTo methods.
i drag this using startDrag(), if this hits another movieclip which is static in the stage, i need to set the xy of the dynamically drawn movieclip to that of the static movieclip. how do i do this?pls give me the solution.