# Auto Rotate for Sliding Menu

**URL:** https://forum.kirupa.com/t/auto-rotate-for-sliding-menu/272718
**Category:** flash
**Created:** [October 7, 2008, 11:31pm UTC](https://forum.kirupa.com/t/auto-rotate-for-sliding-menu/272718 "2008-10-07T23:31:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chriskalani](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@chriskalani](https://forum.kirupa.com/u/chriskalani)
#### Post date: [October 7, 2008, 11:31pm UTC](https://forum.kirupa.com/t/auto-rotate-for-sliding-menu/272718/1 "2008-10-07T23:31:58Z")

</div>

Ok I am referring to this tutorial: [http://www.kirupa.com/developer/flash5/slidingmenu.htm](http://www.kirupa.com/developer/flash5/slidingmenu.htm)

I have it working and customized to my needs, but I was wondering if someone could help me add some sort of auto-rotate. There has to be an easy way to do it… I just rarely work in flash so my actionscript skills are teh suckz0rz.

Thanks guys.

So here’s what the first button does

```auto
on (press) {
    _root.xnew = _root.mask2._x+3.44*707/2;
}

```

Here’s the first frame of the whole movie. This is all for the slide I guess:

```auto
stop () ;
MovieClip.prototype.move2 = function () {
dest = _root.xnew ;
pos = this._x ;
vel = (dest-pos)/7 ;
this._x += vel ;
}

MovieClip.prototype.move = function () {
dest = _root.xnew ;
pos = this._x ;
vel = (dest-pos)/7 ;
this._x += vel ;
}

```

and then this is on the mask itself, it also sets the initial state when it loads for the first time

```auto
onClipEvent (load) {
_root.xnew = _root.mask2._x + (7-1)*405/2 ;
}
onClipEvent (enterFrame) {
move () ;
}

```
