# XML driven Flash menu

**URL:** <https://forum.kirupa.com/t/xml-driven-flash-menu/261967>\
**Category:** flash\
**Created:** [June 2, 2008, 7:20am UTC](https://forum.kirupa.com/t/xml-driven-flash-menu/261967 "2008-06-02T07:20:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nickstr](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nickstr](https://forum.kirupa.com/u/Nickstr)\
**Post date:** [June 2, 2008, 7:20am UTC](https://forum.kirupa.com/t/xml-driven-flash-menu/261967/1 "2008-06-02T07:20:57Z")

</div>

Hi,

Im trying to alter the XML menu from Kirupa in a way so that i does all i want to.  
Instead of using multiple dropdown menu’s i will only use the first one, but adding the textfield text to all buttons.

So i just want the menu, and the textfield.  
But i want to add an extra textfield, do 1 menu button, 1 header textfield, and 1 content textfield.

I’ve tried to add a var. to load in a second part of text but with no succes.  
The code used to load the vars is the following:

```auto
curr_node = node_xml.childNodes*;
        curr_item.action = curr_node.attributes.action;
        curr_item.variables = curr_node.attributes.variables;
        curr_item.name.text = curr_node.attributes.name;

```

The code to parse the text into the textfields:

```auto
/ load XML, when done, run CreateMainMenu to interpret it
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(ok){
    // create main menu after successful loading of XML
    if (ok){
        CreateMainMenu(10, 10, 0, this);
        message_txt.text = "message area";
        message_txt2.text = "message area";
    }else{
        message_txt.text = "error: XML not successfully loaded";
    }

```

And the XML file were to text will be put:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<menu name="example">
<item name="Figuranten gezocht" action="message" variables="waarom"/>
<item name="Kop2" action="message" variables="Kop2"/>
<item name="Kop3" action="message" variables="Kop3"/>
<item name="Kop4" action="message" variables="Kop4"/>
<item name="Kop5" action="message" variables="Kop5"/>
    
</menu>
</menu>
</xml>

```

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![Nickstr](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nickstr](https://forum.kirupa.com/u/Nickstr)\
**Post date:** [June 4, 2008, 7:57am UTC](https://forum.kirupa.com/t/xml-driven-flash-menu/261967/2 "2008-06-04T07:57:50Z")

</div>

Anyone ? ☹
