# Simple as problem

**URL:** https://forum.kirupa.com/t/simple-as-problem/175351
**Category:** Uncategorized
**Created:** [January 13, 2006, 4:28pm UTC](https://forum.kirupa.com/t/simple-as-problem/175351 "2006-01-13T16:28:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ineedsleep](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@Ineedsleep](https://forum.kirupa.com/u/Ineedsleep)
#### Post date: [January 13, 2006, 4:28pm UTC](https://forum.kirupa.com/t/simple-as-problem/175351/1 "2006-01-13T16:28:42Z")

</div>

Im trying to make a menu that when you click on it the menu scrolls out then when you cick on it again it scrolls back again i would like to do it with as. but I have so far just got something that stops stuck out.

could some have a quick sneak peak and try and help me out here!

```auto
 
on (press) {
 if (_root.menu._x<90) {
  moveOut();
 }
 if (_root.menu._x>90) {
  moveIn();
 }
 moveOut = function () {
  onEnterFrame = function () { if (_root.menu._x<90) {_root.menu._x += 3;trace(_root.menu._x);}};
 };
 moveIn = function () {
  onEnterFrame = function () { if (_root.menu._x>90) {_root.menu._x -= 3;trace(_root.menu._x);}};
 };
}

```
