flash/xml menu problem
- Started
- Last post
- 10 Responses
- stewart
attempt to make an HORIZONTAL flash/xml menu
important: all buttons are as wide as the text shown in it:
http://www.kulsdom.com/newstoday…first level works fine, but i can't fix the second and third level.
anyone has a solution or links to articles on this?
my .fla: http://www.kulsdom.com/newstoday…
the xml: http://www.kulsdom.com/newstoday…thanks!
- joyride0
I think your xml needs to be cleand up first. All first level, should have the same node name, "item" in your case. Then if it has 2nd level, they should have "Menu" name items. And so on, it makes it easier to parse in flash.
- stewart0
*bump*
- Fariska0
this tutorial may help:
http://www.sitepoint.com/article…
- lnu0
what's the problem?
- stewart0
well lnu,
the main problem is that i need a horizontal flash/XML menu (like the unfinished one in the first example) with buttons as long as the textfield (variable lengths), but i can't find a good tutorial, and my flash/xml scripting abilities aren't sufficient.
- stewart0
i'm busy learning, but sometimes i need a little push in the right direction.
- unfittoprint0
I recently came to a solution to create every [or it least fasten the creation x100] of flash navigational menus.
you'll have to abstract yourself from the [final] visual output.
Create a Menu class that will parse an xml menu and dig its tree structure, creating movieclips and 'submovieclips' accordingly, adding onPress listeners and 'activation' functions.
by extending this particular class and adding a particular 'Style' [see below] you'll be able to create every type of navigational menu.
A 'Style' method will arrange the x/y position, transitions [hide/show submenu], fonts, rollover/out/release colors/sounds.
Extending the main class differently will create, er, different menus. And by adding more methods to Menu, you'll automatically have more functionalities on the extended classes.
It's almost the same approach with dhtml/css menus: first. the static structure, then its styling.
- Rand0
you should sell it
- lnu0
stewart: I haven't looked at your .fla but what I usually do is inside the button movieclip I put an AS that autoSize:s the textfield and then sets the width of the clickable area to the textfield.textWidth, I guess you could also do this in the script that creates the submenus, after the right button labels have been asigned ti the buttons.
- mrbee28280
I will do it for $500 :)