# Need help building a basic menu

**URL:** <https://forum.kirupa.com/t/need-help-building-a-basic-menu/188850>\
**Category:** flash\
**Created:** [May 11, 2006, 11:04am UTC](https://forum.kirupa.com/t/need-help-building-a-basic-menu/188850 "2006-05-11T11:04:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![messlah](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@messlah](https://forum.kirupa.com/u/messlah)\
**Post date:** [May 11, 2006, 11:04am UTC](https://forum.kirupa.com/t/need-help-building-a-basic-menu/188850/1 "2006-05-11T11:04:29Z")

</div>

Hi all, I need some help with building a basic menu.

[http://users.ncable.net.au/~timfrancis/menutestingmx.swf](http://users.ncable.net.au/%7Etimfrancis/menutestingmx.swf)  
[http://users.ncable.net.au/~timfrancis/menutestingmx.fla](http://users.ncable.net.au/%7Etimfrancis/menutestingmx.fla)

I have 75% of it complete but are having a few issues and need someone to help me.  
I am using an if statement to find out where the variable (for option setting) is currently set, to determine which option is in the selected state.

1stly the menu must have a selected state. I am initalising it to be the first option.  
When ever you roll over an option there will be a rollover [animation](http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_21846529.html#) and if you keep the mouse on the rollover state it will appear the same as the selected state, and when you roll off there will be a roll off aninmation. (but if the button is selected/clicked on there will be no rolloff animation)

I am having some difficulty getting the if statement to go to the right frames under certain conditions.  
At present when you roll off option 1 I can not get it to stay selected.  
I thought that if the option variable was not equal to what the option varialbe is set to then yes, you can play the roll off animation like,

this.onRollOut = function(){  
if(\_root.navvar != 1 &&this.currentframe == 16){  
gotoAndPlay(“off”);  
}

But i cant seem to work it out.

If someone could help me out would be greatly appreciated.
