# Startdrag just on the y

**URL:** <https://forum.kirupa.com/t/startdrag-just-on-the-y/178487>\
**Category:** Uncategorized\
**Created:** [February 10, 2006, 10:46pm UTC](https://forum.kirupa.com/t/startdrag-just-on-the-y/178487 "2006-02-10T22:46:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedkap](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mikedkap](https://forum.kirupa.com/u/mikedkap)\
**Post date:** [February 10, 2006, 10:46pm UTC](https://forum.kirupa.com/t/startdrag-just-on-the-y/178487/1 "2006-02-10T22:46:01Z")

</div>

Is there a way to constrain a mc being dragged to just the y coordinate?

Here is the code I’m using so far:

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

Thanks!
