View Full Version : Menu vs. Submenu appearance : XML-Driven Drop-Down Menu Help
maccarrp
April 16th, 2004, 04:30 AM
I love Senocular's XML-Driven Drop-Down Tutorial. But I can't seem to get it to make the menu headers look different from the submenus.
Any help?
See the tutorial (http://www.kirupa.com/developer/actionscript/xml_dropdown_menu.htm)
Much appreciated.
(and if anyone is interested, i've turned it into a horizonal menu... reply and i'll post the code. better yet, help me fix the GUI issue and i'll post it :smirk: )
maccarrp
April 16th, 2004, 06:35 PM
what i'd like to do is duplicate the "menuitem" mc, rename it "submenuitem" (and make submenuitem look different)
then create an if clause around the attachmovieclip line that assigns the menuitem mc to the rest of the process. that way i could differentiate between menus and items.
BUT, for some reason, i can't get it to work. even if i simply change the "menuitem" in the code to "menuitem2" (just for testing), and rename the mc in the library as well, it doesn't work... so the name "menuitem" is more important than i realized.
So where do i go now?
maccarrp
April 16th, 2004, 06:40 PM
here's the line in question:
curr_item = curr_menu.attachMovie("menuitem","item"+i+"_mc", i);
what i'm proposing:
if (node_xml.childNodes[i].nodeName == "menu"){
curr_item = curr_menu.attachMovie("menuitem","item"+i+"_mc", i);
}else{ // nodeName == "item"
curr_item = curr_menu.attachMovie("submenuitem","item"+i+"_mc", i);
}
but if i change "menuitem" at all, it doesn't work (and yes, i changed the name of the menuitem MC)
maccarrp
April 19th, 2004, 03:05 AM
anyone got a solution yet?
maccarrp
April 19th, 2004, 12:19 PM
and is there a way i can make the backgrounds transparent? I'd love to be able to see the background behind the menus. But since it's done with the background attribute, i can't add an alpha.
maccarrp
April 21st, 2004, 06:21 AM
Senocular, where are you!?
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.