# Dragging

**URL:** <https://forum.kirupa.com/t/dragging/231166>\
**Category:** Uncategorized\
**Created:** [July 2, 2007, 5:12pm UTC](https://forum.kirupa.com/t/dragging/231166 "2007-07-02T17:12:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfoston](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tfoston/32/2516_2.png) [@tfoston](https://forum.kirupa.com/u/tfoston)\
**Post date:** [July 2, 2007, 5:12pm UTC](https://forum.kirupa.com/t/dragging/231166/1 "2007-07-02T17:12:45Z")

</div>

I’m curious as to how to drag a move clip but only change the x value, so dragging left and right. Obviously the startDrag() allows you to drag all over. I had tried

map\_mc.onPress = function(){  
this.startDrag()  
this.onEnterFrame = function(){  
this.\_y = 0  
}  
}  
map\_mc.onRelease = function(){  
delete this.onEnterFrame  
stopDrag()  
}

which “kinda” works but is far far from perfect. This is more or less makes the movieclip slide from side to side, but like i said, its not perfect. Any ideas?😱
