# Menu problem

**URL:** <https://forum.kirupa.com/t/menu-problem/175069>\
**Category:** Uncategorized\
**Created:** [January 11, 2006, 2:13pm UTC](https://forum.kirupa.com/t/menu-problem/175069 "2006-01-11T14:13:06Z")\
**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 11, 2006, 2:13pm UTC](https://forum.kirupa.com/t/menu-problem/175069/1 "2006-01-11T14:13:06Z")

</div>

Im trying make a menu type thing that scrolls in and out on a user click however it just goes nuts I just need a couple of tips on how to get it to work.

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

```

this code means that when it gets to the end it just starts jumping back and forth could some one please just help a little!

many thanks
