# starrDrag() woes

**URL:** <https://forum.kirupa.com/t/starrdrag-woes/63882>\
**Category:** flash\
**Created:** [September 10, 2004, 9:02pm UTC](https://forum.kirupa.com/t/starrdrag-woes/63882 "2004-09-10T21:02:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MDiddy](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@MDiddy](https://forum.kirupa.com/u/MDiddy)\
**Post date:** [September 10, 2004, 9:02pm UTC](https://forum.kirupa.com/t/starrdrag-woes/63882/1 "2004-09-10T21:02:58Z")

</div>

I am having the hardest time understanding the constrained area for startDrag. I ususally end up just trying random numbers until they work. Say I have a box 200px x 200px, with registration on the top left corner… It’s parent clip is 238px by 225px, and has registration set to the middle horizontally and verticaly. How woudl figure out the correct numbers to constrain this? If anyone knows a good tutorial for this-I would relaly appreciate it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 11, 2004, 5:55am UTC](https://forum.kirupa.com/t/starrdrag-woes/63882/2 "2004-09-11T05:55:30Z")

</div>

//outerBox = larger rectangle  
//innerBox = smallerRectangle

\_root.outerBox.onEnterFrame = function(){  
a= \_root.outerBox.\_width;  
b= \_root.outerBox.\_height;  
c= \_root.outerBox.\_x;  
d= \_root.outerBox.\_y;  
e= \_root.innerBox.\_width;  
f= \_root.innerBox.\_height;  
\_root.innerBox.startDrag(true,c,d,(d+a)-e,(d+b)-f);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 11, 2004, 3:46pm UTC](https://forum.kirupa.com/t/starrdrag-woes/63882/3 "2004-09-11T15:46:19Z")

</div>

Thank you very much, but that code doesn’t seem to do it. I’m going to try out some variations and If I find one that works I’ll post it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 11, 2004, 4:22pm UTC](https://forum.kirupa.com/t/starrdrag-woes/63882/4 "2004-09-11T16:22:57Z")

</div>

One this I should note is that the Outer Box is draggable too. I’m not sure how much of a difference that makes… In determing the drag area. I would guess that it needs to be determined based on the parent movieclip’s position
