xml flash dropdown nav
- Started
- Last post
- 12 Responses
- xrusos
anyone seen a tutorial for a xml driven flash drop down menu?
i'm just looking to implement a simple drop down menu ... a menu that i can totally do in CSS/HTML, but not in flash.
so help me out. where do i look?
(flashkit, ultrashock, actionscripts.org, and a few others haven't proven useful yet... so please give me an exact link rather than redirect to another general flash site!)
here's the menu i want to implement in flash (based on xml):
http://www.mezzoblue.com/archive…
- xrusos0
rock on! thanks.
have you used this before? I can't get the menu headers to look different than the sub menus.
i already posted the question to their forum, but was hoping you might have experience with the script.
here's my post on their forum:
http://www.kirupaforum.com/forum…
- xrusos0
bump
- arlo0
I haven't tested this but I checked the code out. In the GenerateMenu function there is this line:
curr_menu.attachMovie("menuitem... i);
If you make a different template for a menu header and attach that clip instead of 'menuitem", it'll place it in the menu instead of that one style.
- xrusos0
i've been thinking that too. so i created a "submenuitem" MC as a template - but i still don't see where to plug that in...
it seems that there's no distinction between menu headers or menu items.
is there some sort of "first one" attribute that i can utilize - as in, first one in the list for each menu takes on "submenuitem" MC? perhaps a separate if?
- xrusos0
so i included this near the beginning instead of that other line...
for (var i=0; i
- xrusos0
if (node_xml.childNodes[i].nodeName == "menu"){
curr_item = curr_menu.attachMovie("menuitem... i);
}else{
curr_item = curr_menu.attachMovie("submenuit... i);
}but now the submenu's won't show up
- xrusos0
backup... it's not my statement, or the menuitem...
it's something else... i just tried duplicating the menuitem mc again, naming it "menuitem2" and trying to just change the one line:
curr_item = curr_menu.attachMovie("menuitem2... i);that doesn't even work , so it's something else.
- unfittoprint0
Yopu'll have to use e a for in loop in each of the 'branches' of your XML tree.
Check to see the length of each item [and subitem] parse their information accordingly.
If you want a menu with different submenu items and with a show hide display feature,., create empty movie clips to serve as 'holders' of each subcontent.
Align the different items, using the _y value for example:
this["item"+i]._y=this["item"+(i...Another thing. Use different loop carathers in different loops [i, b, x].
good luck.
- arlo0
And make sure you set up the linkage in the mc properties or it won't attach the right way.
- el_chilaquil0
Here's one that you may like as well:
click under "open source" and you'll see the xml driven menu there. It's not exactly like the one you described, but it's pretty cool. I HAVE seen xml menus like the one you wanted in ultrashock too for sure.
- xrusos0
el chil, that is pretty cool... definitely worth a bookmark. i'm sure i'll find a use for that sometime. thanks.
still working toward a solution for the other one... but i'll get to it more monday. if you all have any other advice, or other samples, please share.