# Drag Horizontal

**URL:** <https://forum.kirupa.com/t/drag-horizontal/297471>\
**Category:** flash\
**Created:** [October 2, 2009, 4:55pm UTC](https://forum.kirupa.com/t/drag-horizontal/297471 "2009-10-02T16:55:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [October 2, 2009, 4:55pm UTC](https://forum.kirupa.com/t/drag-horizontal/297471/1 "2009-10-02T16:55:57Z")

</div>

Hi

I am using this simple code to startDrag()

drag.addEventListener(MouseEvent.MOUSE\_DOWN, dragD);  
stage.addEventListener(MouseEvent.MOUSE\_UP, dragU);

function dragD(event:Event):void {  
this.startDrag();  
}

function dragU(event:Event):void {  
this.stopDrag();  
}

I need to drag only horizontally. Can anyone help me with this?

Thanks
