Menu probs

have designed a menu that opens into a sub menu that in turn opens up to reveal another menu

the menu is split 5 times too reveal the submenu’s the script to do this is a tween that at frame 6 opens the menu and 11 closes it.

This is replicated to form another sumenu

I have declared the menu instance as “menu”

I have declared the submenu instance as “subsect”

I have declared the button to open the submenu as “expander”

using the with action i have told the expanders to tell all the other submenu’s to play the closing sequence so that the open menus close when a new menu is opened

this fails to work as the with action cannot find the target

help help help help help help help

the code on the expander button is as follows

on (press) {
with ( {gotoAndPlay(11);

I am worried that a very bizzare occurence of tweens in my libary are to blame

anyone who wants to help can get the .fla file on demand probaly a nessecity to solve this peach of a prob

[email protected]


Not quite sure what’s happening here. Mail me the .fla. Address is [email protected].


Alright, I’ve had a look at this and I get what the problem is now, and I reckon there’s two solutions to this.

First way would be to set up an array of six Boolean flags, one for each of your submenus, and set them to 0 (off). So you get something like this:

<I>menu[0] = 0;
menu[1] = 0;
menu[2] = 0; </I>etc

In the Actions for the expand tween, you run a check (nested <I>if</I> statements, or a <I>for</I> loop) to see if any of the menu flags are set to 1. If there is one, you tell that movie to go to the appropriate frame to close. Then you set the current submenu’s flag to 1 (on) and it opens.

Does that make sense?

I think there’s also a more complex ActionScript way of doing it, but I’d need a bit more time to work it out. Unless any of the Flash geniuses out there can reel one off, of course. :slight_smile: In the meantime, the flag solution should suffice. You just have to make sure that every single movie instance you have placed is named, and named consistently. Otherwise things will get very complicated, very quickly. :slight_smile:

what a super london babe u r
cheers for all the help kitiara

No probs. :slight_smile:

If I can think of a quicker and easier way to do this then I’ll post it…

looks like a good method to me. I used something a little different that doesn’t check every second for each menu… but it’s basicaly the same idea. Clean coding London Girl. :slight_smile:

Thanks. :slight_smile:

That code should only check for any open menus when a new one is clicked. At least that was the intention, I know how confusing my explanations get at times. Checking constantly is way too complex for my liking. :slight_smile: