# Infinite menu that stops on rollover

**URL:** <https://forum.kirupa.com/t/infinite-menu-that-stops-on-rollover/9168>\
**Category:** Uncategorized\
**Created:** [December 6, 2002, 4:25am UTC](https://forum.kirupa.com/t/infinite-menu-that-stops-on-rollover/9168 "2002-12-06T04:25:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![takashi0808](https://avatars.discourse-cdn.com/v4/letter/t/e9c0ed/32.png) [@takashi0808](https://forum.kirupa.com/u/takashi0808)\
**Post date:** [December 6, 2002, 4:25am UTC](https://forum.kirupa.com/t/infinite-menu-that-stops-on-rollover/9168/1 "2002-12-06T04:25:54Z")

</div>

I downloaded the infinite menu which is under new tutorial on top page.  
But now what i want to do is to make it stop on rollover. I have seen that example at  
 ![here is the link](http://www.monarc.com/mariahcarey/music/index.las)

Does anybody know how to do that?

Thank you for your help

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 7, 2002, 10:12am UTC](https://forum.kirupa.com/t/infinite-menu-that-stops-on-rollover/9168/2 "2002-12-07T10:12:17Z")

</div>

I’ve done the same thing for the website i’m doing…  
I did a little bit of modification to the code:

onClipEvent (load)  
{  
xcenter=240.1;  
speed=1/20;  
mode=true;  
}  
onClipEvent (enterFrame)  
{  
if(mode){  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance_speed);  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance_speed);  
if (\_x \> 0 ) \_x=-840;  
if (\_x \< -840 ) \_x=0;  
}  
}

i’ve made the infinite menu into a movieclip, its instance name on the main timeline is “scrollbar”. the instance name of menu\_general is “menu”.

so, on each one of the button on the infinite menu, i enter this code:

on(rollOut)  
{\_root.scrollbar.menu.mode=true;}  
on(rollOver)  
{\_root.scrollbar.menu.mode=false;}

so… u can do a bit of modification to the instance name yourself…

I’m still quite new to flash, only a few weeks old…so correct me if any of these terms that i use are wrong… took me quite a long time by trial and error… coz i didn’t understand all these level and instance stuff…

hope this is helpful

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 12, 2003, 4:28am UTC](https://forum.kirupa.com/t/infinite-menu-that-stops-on-rollover/9168/3 "2003-05-12T04:28:29Z")

</div>

onClipEvent (load)  
{  
xcenter=345;  
speed=1/30;  
mode=true;  
}  
onClipEvent (enterFrame)  
{  
if(mode){  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance_speed);  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance_speed);  
if (\_x \> 0) \_x=-1059;  
if (\_x \< -1059) \_x=0;  
}

BUT I get this error

Symbol=menu\_a, Layer=Layer 1, Frame=1: Line 8: Statement block must be terminated by ‘}’  
{

Symbol=menu\_a, Layer=Layer 1, Frame=1: Line 16: Syntax error.  
}

Can you help

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 12, 2003, 5:19am UTC](https://forum.kirupa.com/t/infinite-menu-that-stops-on-rollover/9168/4 "2003-05-12T05:19:16Z")

</div>

you just need another bracket at the end
