# Sliding menu

**URL:** https://forum.kirupa.com/t/sliding-menu/257586
**Category:** Uncategorized
**Created:** [April 15, 2008, 2:33pm UTC](https://forum.kirupa.com/t/sliding-menu/257586 "2008-04-15T14:33:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![A\_FluX](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@A\_FluX](https://forum.kirupa.com/u/A_FluX)
#### Post date: [April 15, 2008, 2:33pm UTC](https://forum.kirupa.com/t/sliding-menu/257586/1 "2008-04-15T14:33:00Z")

</div>

Hi I am busy with a sliding menu I have used this code on the movie clip

onClipEvent (load) {  
xCen = 778/2;  
}  
onClipEvent (enterFrame) {  
x = xCen-\_root.\_xmouse;  
\_x += x/30;  
}

When the mouse goes left the clip goes right and the opposite aswell, but I need to know how to make it stop once the clip gets to either end.

I have attached the file, thanks for any help.
