# What's wrong with this?

**URL:** https://forum.kirupa.com/t/whats-wrong-with-this/301741
**Category:** Uncategorized
**Created:** [December 14, 2009, 11:36pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this/301741 "2009-12-14T23:36:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Press\_Tilty](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Press\_Tilty](https://forum.kirupa.com/u/Press_Tilty)
#### Post date: [December 14, 2009, 11:36pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this/301741/1 "2009-12-14T23:36:37Z")

</div>

I got this drag code online (here, in fact), and pasted it into my actions.

```auto

onClipEvent (load) {
	_x = 0;
	_y = 0;
	speed = 5;
}
onClipEvent (enterFrame) {
	var endX = _root._xmouse;
	var endY = _root._ymouse;
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;
	this._rotation += 20;
}

```

It’s not working, but it works on another movieclip…help?
