# Annoying behavior

**URL:** <https://forum.kirupa.com/t/annoying-behavior/256457>\
**Category:** Uncategorized\
**Created:** [April 3, 2008, 6:23am UTC](https://forum.kirupa.com/t/annoying-behavior/256457 "2008-04-03T06:23:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![no\_support](https://avatars.discourse-cdn.com/v4/letter/n/85f322/32.png) [@no\_support](https://forum.kirupa.com/u/no_support)\
**Post date:** [April 3, 2008, 6:23am UTC](https://forum.kirupa.com/t/annoying-behavior/256457/1 "2008-04-03T06:23:24Z")

</div>

I have the following code:

a\_panel.addEventListener(MouseEvent.MOUSE\_DOWN, function():void{a\_panel.startDrag(true);  
a\_panel.addEventListener(MouseEvent.MOUSE\_UP, function():void{a\_panel.stopDrag();})});

When I drag, the mouse cursor immediately snaps to the upper left corner and it always drags by the upper left corner. How do i get rid of this movement altogether and just have the object be dragged by where the mouse cursor initially was?
