# Menu Actionscript HELP!

**URL:** https://forum.kirupa.com/t/menu-actionscript-help/46364
**Category:** Uncategorized
**Created:** [March 23, 2004, 9:05pm UTC](https://forum.kirupa.com/t/menu-actionscript-help/46364 "2004-03-23T21:05:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Gwai](https://avatars.discourse-cdn.com/v4/letter/g/b38774/32.png) [@Gwai](https://forum.kirupa.com/u/Gwai)
#### Post date: [March 23, 2004, 9:05pm UTC](https://forum.kirupa.com/t/menu-actionscript-help/46364/1 "2004-03-23T21:05:00Z")

</div>

Hello Everyone, Here’ s the problem. I have a menu once clicked it animates out a menu that holds a couple of links, but with my code I can’t select the links.

Here’s the code:

// on load, define variables and set flags  
onClipEvent (load) {

roll = false;  
menu = false;  
open = false;

this.\_visible = false; // sets drop menu to be invisible  
x\_start = this.\_x; // sets starting x value  
x\_stop = 150; // this number tells menu how far to scroll out (pixels) – sets stop point  
x\_max = x\_stop + this.\_width;  
}

// when mouse is over menu, keep menu open  
on (rollOver) {  
menu = true;  
}

// when mouse is off menu, close  
on (rollOut) {  
menu = false;  
}

onClipEvent (enterFrame)  
{  
menu\_right = this.\_x + this.\_width; // defines the right edge of the menu

// roll menu open  
if ((roll || open) && (!open || menu))  
{  
this.\_visible = true; // make menu visible  
speed = (x\_max - menu\_right) \* 0.500000;// set speed variable based on current menu position compared to desired position

if (x\_stop - 1 \< this.\_x) // if menu is at the stop point:  
{  
this.\_x = x\_stop; // make this menu position the new x\_stop location  
open = true; // set open variable to true – “menu is open”  
roll = false; // set roll variable to false – “menu is not rolling”  
}  
else // else if menu is left of stop point:  
{  
\_x = \_x + speed // roll menu over more  
} // end if

} // end if

// roll menu closed  
if (open && !menu)  
{  
speed = (x\_max - menu\_right) \* 0.700000 + 1; // set speed variable based on current menu position compared to desired position  
if (this.\_x \< x\_start + 1) // if menu is at the original starting point:  
{  
\_x = x\_start // set x coordinate to starting x value  
open = false; // set open variable to fasle – “menu is closed”  
this.\_visible = false; // make menu invisible  
}  
else // else, if menu is still not at original starting point  
{  
\_x = \_x - speed // roll menu over more  
} // end if  
} // end if  
}

Hope someone can help me out. Thanks again.  
I’ll post the fla if need be.
