# Constraining the dragable area of a movieclip

**URL:** https://forum.kirupa.com/t/constraining-the-dragable-area-of-a-movieclip/50900
**Category:** flash
**Created:** [May 7, 2004, 2:20pm UTC](https://forum.kirupa.com/t/constraining-the-dragable-area-of-a-movieclip/50900 "2004-05-07T14:20:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Steveo](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@Steveo](https://forum.kirupa.com/u/Steveo)
#### Post date: [May 7, 2004, 2:20pm UTC](https://forum.kirupa.com/t/constraining-the-dragable-area-of-a-movieclip/50900/1 "2004-05-07T14:20:59Z")

</div>

Hi,

I’ve had a look around the tutorials and forums but still can’t seem to solve this problem.

I’ve got a movie clip with the following code;

```auto
on(press){
startDrag(this);
}
on(release,releaseOutside){
stopDrag();
}

```

I only want the clip to be draggable within a rectangular area on my main stage. How can I put in the constraints?

Thanks for any help
