# Confine Mouse to Shape on Drag?

**URL:** <https://forum.kirupa.com/t/confine-mouse-to-shape-on-drag/282755>\
**Category:** flash\
**Created:** [February 26, 2009, 2:26am UTC](https://forum.kirupa.com/t/confine-mouse-to-shape-on-drag/282755 "2009-02-26T02:26:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [February 26, 2009, 2:26am UTC](https://forum.kirupa.com/t/confine-mouse-to-shape-on-drag/282755/1 "2009-02-26T02:26:16Z")

</div>

Using this code as a reference:

[http://www.flepstudio.org/forum/tutorials/592-startdrag-flash-cs3-actionscript-3-0-a.html](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?
