# Which direction clip moving?

**URL:** <https://forum.kirupa.com/t/which-direction-clip-moving/212711>\
**Category:** Uncategorized\
**Created:** [January 13, 2007, 10:07am UTC](https://forum.kirupa.com/t/which-direction-clip-moving/212711 "2007-01-13T10:07:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coop](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@coop](https://forum.kirupa.com/u/coop)\
**Post date:** [January 13, 2007, 10:07am UTC](https://forum.kirupa.com/t/which-direction-clip-moving/212711/1 "2007-01-13T10:07:30Z")

</div>

Which direction clip moving ?

Hi all,

I have a simple clip with a startDrag onPress and stopDrag onRelease - I was looking for a way to determine which way the clip was being dragged, either up or down.

```auto

slider_mc.onPress = function() {
	startDrag(this, false, 186, 300, 186, 0);
	this.onEnterFrame = function() {
		if (this._y += 1) {
			trace("moving up");
		}else{
			trace("moving down")
			}
	};
};
slider_mc.onRelease = function() {
	delete this.onEnterFrame;
	stopDrag();
};

```
