Dynamically creat buttons from XML data

I looked for an answer to this in the forum… forgive me if I missed it.

I’m building a site that draw it’ data from XML for the first time. Right now, all of the text and image paths are coming from an XML doc.

What I want is to be able to write something like a foreach loop that will create a series of menu buttons on the stage based on the number of child nodes in the XML node I specify. Each button should be offset horizontally from the previous one, and draw itself several frames after, to give a wave-like effect. Each button should also have the functionality to load XML data into a pre-existing textArea.

The site I’m working on is here: http://jason-carlin.com.
The menu I want to build dynamically is the submenu (above the main menu) that appears after you click on WORK.

Any help is appreciated.

I have been searching for months trying to find out how to do exactly what you want to do and have come up with nothing.

Are you using ASP? You can do this with ASP and XSLT since you are using XML. Basically build your xml in a query string. It is real involved and hard to explain, but that should at least send you on your way.

maybe that link is part of what your looking for:
http://www.actionscript.org/forums/showthread.php3?t=52684

hope that helps,
-zod

That is exatly what I was looking for. There were some subtle differences in my syntax that were keeping my code from working. Thanks so much for your help.

you’re very welcome :thumb:

  • zod