Movieclip 'if' and 'var' control help request

Hello all,

Newbie here. :crazy: <-- Gives you and understanding of how ANY type of programming makes feel. :stunned: <-- The effect you badass programmers and your actionscript skills have on me. Enough with intro and asskissing, on to my question:

I have 5 movie clips, each has 3 keyframes. From the first to the second it shows a menu entering the scene, from the second to the third it shows it exiting. All 5 MCs are equal. each key frame has a value, which i assigned like so:

//frame 1
submenu1 = “X”;
//frame 10
submenu1 = “Y”;
//frame 20
submenu1 = “Z”;

I have 5 buttons, one to trigger each menu (MC). What i am trying to do here, is have only one menu open at a time. So when they click on menu 2 and menu 4 is open, it will simulteneaously do both functions. Here is what i have so far:

on (release){
menusub2.gotoAndPlay(“1”);
if (submenu1 = “Y”) {
menusub1.gotoAndPlay(“11”);
}else{
menusub1.gotoAndStop();
}
}

Any help would be gold as I am a graphic designer ‘attempting’ to actionscript. Thanks and advanced.

–hz

i would use a loop to check all clips on their state (name them with a number like clip1, clip2…and use for i=1, i<5,i++ ; if state==this, then clipdothat else if state ==something else clipdoanotherthing …you get the idea?

Mr. Eyezberg,

Thanks for the reply, I’ve been stressing all week trying to learn actionscript just to do this task. Although in theory I have a very good idea of what you are saying, i have zero idea on how to format it… is there any skeleton/structure i can sample? Thanks again.

-hz

I don’t fully get what your asking for, but maybe this will help.
:phil:

Waffe, can’t thank you enough for taking a crack at it. It’s almost what I need, but only imagine that it plays the reverse tween of the menu’s entrance after you click on another menu.

Basically:

If I click menu2 while menu1 is open, it will play menu2’s reverse tween and vice versa… except there are more than 2 menus… more like 1++… or 5, which ever comes first.

THANKS.:beam: