# AS2: Drag and Drop Rotation

**URL:** <https://forum.kirupa.com/t/as2-drag-and-drop-rotation/283710>\
**Category:** flash\
**Created:** [March 10, 2009, 9:33am UTC](https://forum.kirupa.com/t/as2-drag-and-drop-rotation/283710 "2009-03-10T09:33:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilleypants](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@lilleypants](https://forum.kirupa.com/u/lilleypants)\
**Post date:** [March 10, 2009, 9:33am UTC](https://forum.kirupa.com/t/as2-drag-and-drop-rotation/283710/1 "2009-03-10T09:33:17Z")

</div>

I’ve been making a drag and drop by using the following code:

```auto

plank0_mc.onPress = function() {
		startDrag(this);
		this.gotoAndStop(2);
		//this._rotation = 33;

	};

plank0_mc.onRelease = plank0_mc.onReleaseOutside=function () {
StopDrag(this);

}

```

It works fine apart from the rotation - when it rotates the movieclip the mouse can technically no longer be on the plank anymore. And the mouse is dragging the plank but is not actually on the graphic.

Is there any way of snapping the mouse to the centre of the movieclip no matter where they click?

Thanks for any help!
