# startDrag problem

**URL:** <https://forum.kirupa.com/t/startdrag-problem/160876>\
**Category:** Uncategorized\
**Created:** [August 30, 2005, 4:37am UTC](https://forum.kirupa.com/t/startdrag-problem/160876 "2005-08-30T04:37:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Furpants](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@Furpants](https://forum.kirupa.com/u/Furpants)\
**Post date:** [August 30, 2005, 4:37am UTC](https://forum.kirupa.com/t/startdrag-problem/160876/1 "2005-08-30T04:37:24Z")

</div>

Hello!

I am using this code to make a draggable bar within a long, rectangular box. It works great except when I roll out, it continues to drag back and forth, depending on where the mouse is on the rest of the screen, even though it’s not over the movie clip itself.

This is the code I used on the timeline:

// Starts the dragging  
\_root.connect.onRollover = function() {  
\_root.connect.startDrag(false, 50, 148, 655, 148)  
}

// Stops the dragging  
\_root.connect.onRollout=function(){  
this.stopDrag();  
}

OR does anyone have any other suggestions? the site I’m modeling this function after is [[color=#22229c]www.andytitus.com[/color]](http://www.andytitus.com/)

Thanks!
