Confine Mouse to Shape on Drag?

Using this code as a reference:

http://www.flepstudio.org/forum/tutorials/592-startdrag-flash-cs3-actionscript-3-0-a.html

I’m wondering if it’s possible to confine the mouse’s location, on drag, to the shape it is dragging so that when the dragged shape stops at the boundary, it’s not possible to continue to drag the cursor away from the shape (until the mouse is released). Does that make sense?