Flash mx use of with in a popup menu

if I make a popup menu with submenus, and I make multiple menus horizontally next to one another…

I know I can use invisible buttons to close the menu on rollOut, however, I’ve been advised using the “with” function would avoid confusion in the case where menus are close together. I’m a bit confused about doing it this way.

for one thing, assume the menus going horizontally are named menu1, menu2, menu3, etc.

the with action… is this upon rollOver of menu 2 for example…then in that movieclip or menu instance, I’m asking menu1 to move to a closed state? or is the action using with within menu1?

confusion is… what if someone goes from menu3 to menu 2… if the action is placed on menu2, how does it know which submenu to close?. Please help with the code, if you understand my poorly stated question.

Can you post your fla?

Hi,

I’m not sure if I understand u propperly but in MX u don’t need invisible buttons anymore.
U can use the ‘onRollOut’ event on any movieclip (button aren’t needed anymore really) and u even get the hand cursor.

buttonMc.onRollOut = function(){
this.gotoAndStop(“ROLLOUT”);
}

cya

SHO

hi… I can’t use the onRollOut in the case when the sub menu is open, because there are spaces between each of the dropped down submenus (and even a space between the main button and it’s dropped down sub buttons), and I don’t want the list to close before the user has a chance to click on the link they want.

Actually, the single popup (or dropdown) menu I created was based on a tutorial. That’s how I learned to use the invisible button in the first place for this type menu. In that tutorial, mention was made about multiple instances of menus (and submenus) and this exact issue, but no more was said other than that the way this would be solved was using the “with” script.

I’ll attach the menu’s as I have them now. They are spaced as they are to avoid the problem of overlap (due to, yes, the invisible buttons). I would much rather they were straight across. Would placing the submenus against one another end my problem?

I’m modifying your fla - I’ll see if I canchange it. As eki said, you’ve shouldn’t need to use invisible buttons. I’ll post it back up when it’s done. Or leave me a Private Message with your email address and I’ll email it to you.