# startDrag = constrain to only y movements

**URL:** <https://forum.kirupa.com/t/startdrag-constrain-to-only-y-movements/194146>\
**Category:** flash\
**Created:** [July 20, 2006, 8:31pm UTC](https://forum.kirupa.com/t/startdrag-constrain-to-only-y-movements/194146 "2006-07-20T20:31:41Z")\
**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:** [July 20, 2006, 8:31pm UTC](https://forum.kirupa.com/t/startdrag-constrain-to-only-y-movements/194146/1 "2006-07-20T20:31:41Z")

</div>

Can anybody help me with this?I am doing a ‘draggable’ mask but just want it to move on the y. Here is the code that is working so far:

```auto
onClipEvent (load) {
    startDrag (this, true);
    posx = _x ;
    posy = _y ;
}
onClipEvent (enterFrame) {
    back._x = posx - _x ;
    back._y = posy - _y;
}

```
