# Infinite menu must stop when clicked

**URL:** https://forum.kirupa.com/t/infinite-menu-must-stop-when-clicked/154386
**Category:** Uncategorized
**Created:** [July 9, 2005, 3:47am UTC](https://forum.kirupa.com/t/infinite-menu-must-stop-when-clicked/154386 "2005-07-09T03:47:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lkw](https://avatars.discourse-cdn.com/v4/letter/l/6de8d8/32.png) [@lkw](https://forum.kirupa.com/u/lkw)
#### Post date: [July 9, 2005, 3:47am UTC](https://forum.kirupa.com/t/infinite-menu-must-stop-when-clicked/154386/1 "2005-07-09T03:47:58Z")

</div>

Hi everybody,

I desperately need some help. I have an infinite menu taken from the tutorial at kirupa. It needs to stop when the movie (which has button inside) when clicked.

The script i have now for the mc is. It slows down when i don’t hover over the movie/buttons, but i want it completely to stop. Is this possible?

onClipEvent (load) {  
var xcenter = 400, speed = .001, decel = .94, accel = 0;  
}  
onClipEvent (enterFrame) {  
var distance = \_root.\_xmouse-xcenter;  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
accel += distance\*speed;  
}  
\_x += accel \*= decel;  
if (\_x\>0) {  
\_x = -985;  
} else if (\_x\<-985) {  
\_x = 0;  
}  
}  
Please help  
Thanks in advance
