# Dragging and Rotating Individual Movie Clips

**URL:** <https://forum.kirupa.com/t/dragging-and-rotating-individual-movie-clips/253286>\
**Category:** flash\
**Created:** [February 28, 2008, 9:52pm UTC](https://forum.kirupa.com/t/dragging-and-rotating-individual-movie-clips/253286 "2008-02-28T21:52:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JRRC](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@JRRC](https://forum.kirupa.com/u/JRRC)\
**Post date:** [February 28, 2008, 9:52pm UTC](https://forum.kirupa.com/t/dragging-and-rotating-individual-movie-clips/253286/1 "2008-02-28T21:52:58Z")

</div>

Hello everyone

A while ago, I posted a little thread asking for help with a simple yet stressing issue (at least for me, an AS noob). I wanted to drag individual movie clips around the stage as well as rotate them, but wasn’t able to because of X reason.

Now i have just finished the right script and I’m posting it here in case anyone is having the same problem.

```auto
on (press) {
    drag = true;
}
on (release) {
    drag = false;
}
onClipEvent (enterFrame) {
    if (drag) {
        this._x = _root._xmouse;
        this._y = _root._ymouse;
        if (Key.isDown (Key.RIGHT)) {
            this._rotation +=10;
        }
        if (Key.isDown (Key.LEFT)) {
            this._rotation -=10;
        }
    }
}

```

I hope it helps someone, i have seen some threads asking for something like this. The only downside i find is that you have to place the code in any object you want it to work, but it’s not that bad.

Cheers,  
JRRC
