Click to See Complete Forum and Search --> : accordion-type menu with sub-buttons

07-03-2004, 04:30 PM
heeeeelp !!!

this thing is driving me crazy !

i worked all day trying to script this kind of menu into working properly. the thing is i'm more of a designer than a developer and when it comes to actionscript i'm kind of limited.

so, at this link you will find the menu i'm working on. the menu is on the left and underneath it is the default flash mx 2004 accordion


and should work like this:
- when i click a menu button, it unfolds and the other menu buttons move down to make room for the new sub-buttons.
- when i click a menu button anyu other unfolded menu button should close and the new menu unfolds. however, when the former menu button closes, the menu buttons underneath it should move up to fill the blank space created.

i tried to make this work by using a variable called "active" which records 0, 1, 2, or 3 depending on which menu button is unfolded [0 for none]. it is in the root of the menu.fla so i access it with _parent.active in order for it to work when i load it into another movie.

but this is where the line breaks and, although the debugger shows me the variable changes its value correctly, i don't know why the other menubutton-movieclips respond correctly to it.

if you could please give me a detailed explantaion of how this works [but with as little actionscript as possible [i only used "on (release)", "gotoAndPlay", "if (active=x)", and easy stuff like that]. i did make some of the situations to work [for example when there is no unfolded menu button in the scene] but when some menus are already active the plot thickens because i have to tell the _active_ one to close, the ones underneath it to move up, the clicked one to unfold, the ones underneath the clicked one to move down.

so pleeeease pleeeease help because i don't know how much longer i can try. if you could make it as simple and AS-less as possible i would really appreciate it.