PDA

View Full Version : Menu System


dduncomb
04-19-2001, 03:02 AM
Ok I am having difficulty with constructing a simple menu system.

I have 5 Menu Options each which have an associated MC. What I would like to be able to do is...

when you click on the menu option 1 it shows its MC (fine here)... then when u click on the menu option 2 it sets _visble to False for Option 1's MC and shows Option 2's MC....etc.

How do you derive this dynamically....?

i.e. if u click Option 1 then Option 5 then Option 3, how do you get FLASH to show the correct MCs?

Any pointers would be helpful.

Thanks,

Dave.

Jesse
05-02-2001, 02:03 PM
So you only want to show the option clicked and hide all the others?

Make a function:

function hideThem () {
for (x=1; x<=10; x++) {
_root["mc"+x]._visible = false;
}
}

Then call this code on each button and also set this button's item to visible, like this, for button 2:

on (release) {
_root.hideThem()
_root.mc2._visible = true
}

This assumes you have 10 movie clips whose instance names are "mc1" thru "mc10"...

Cheers

Jesse

dduncomb
05-09-2001, 07:29 AM
Thanks for your help Jesse

Dave.