# \[AS3\] startdrag constraint issue

**URL:** <https://forum.kirupa.com/t/as3-startdrag-constraint-issue/316872>\
**Category:** flash\
**Created:** [December 4, 2010, 10:09pm UTC](https://forum.kirupa.com/t/as3-startdrag-constraint-issue/316872 "2010-12-04T22:09:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zzxjoanw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@zzxjoanw](https://forum.kirupa.com/u/zzxjoanw)\
**Post date:** [December 4, 2010, 10:09pm UTC](https://forum.kirupa.com/t/as3-startdrag-constraint-issue/316872/1 "2010-12-04T22:09:29Z")

</div>

I have the following code:

```auto

current = this[event.target.name];
current.startDrag(true,new Rectangle(current.width/2,
     current.height/2,
     stage.stageWidth-current.width/2,
     stage.stageHeight-current.height/2));

```

The problem I’m having is that the objects aren’t stopping at the stage borders. I’m sure I’m missing something obvious, but I’m at my wit’s end.

Any help would be appreciated.
