# stopDrag when it reaches the end of another MC

**URL:** <https://forum.kirupa.com/t/stopdrag-when-it-reaches-the-end-of-another-mc/90535>\
**Category:** flash\
**Created:** [May 18, 2005, 4:32pm UTC](https://forum.kirupa.com/t/stopdrag-when-it-reaches-the-end-of-another-mc/90535 "2005-05-18T16:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tattered](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Tattered](https://forum.kirupa.com/u/Tattered)\
**Post date:** [May 18, 2005, 4:32pm UTC](https://forum.kirupa.com/t/stopdrag-when-it-reaches-the-end-of-another-mc/90535/1 "2005-05-18T16:32:37Z")

</div>

Ok I am having some really big problems with this. For some reason I cant get this to work for me :S. If some one can help me with it, it would be great.

This is what I tried

on (press){  
if (\_root.MCSmallMenu.hitTest(\_root.background1, true)){  
\_root.MCSmallMenu.startDrag;  
}else{  
stopDrag();  
}

Can someone tell me what I have done wrong?? I only want MCSmallMenu to drag inside background1. :S I know its only easy but for some reason my head is not working around it at all.
