# Restricting drag to one axis

**URL:** <https://forum.kirupa.com/t/restricting-drag-to-one-axis/140252>\
**Category:** Uncategorized\
**Created:** [March 9, 2005, 4:19pm UTC](https://forum.kirupa.com/t/restricting-drag-to-one-axis/140252 "2005-03-09T16:19:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Unit9](https://avatars.discourse-cdn.com/v4/letter/u/c77e96/32.png) [@Unit9](https://forum.kirupa.com/u/Unit9)\
**Post date:** [March 9, 2005, 4:19pm UTC](https://forum.kirupa.com/t/restricting-drag-to-one-axis/140252/1 "2005-03-09T16:19:14Z")

</div>

Hi all, 🙂

I’m using this simple code to drag a clip on stage:

on (press) {  
startDrag ("");  
}  
on (release) {  
stopDrag ();  
}

Can anyone tell me how I can restrict the drag to the X axis only?

Cheers. 😃
