# \[Flash CS3, AS2, XML\] Nav Problem

**URL:** <https://forum.kirupa.com/t/flash-cs3-as2-xml-nav-problem/257859>\
**Category:** programming\
**Created:** [April 17, 2008, 6:28pm UTC](https://forum.kirupa.com/t/flash-cs3-as2-xml-nav-problem/257859 "2008-04-17T18:28:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![qumani](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@qumani](https://forum.kirupa.com/u/qumani)\
**Post date:** [April 17, 2008, 6:28pm UTC](https://forum.kirupa.com/t/flash-cs3-as2-xml-nav-problem/257859/1 "2008-04-17T18:28:03Z")

</div>

I have a problem that I am trying to fix and need a little help. I have built my navigation in flash, all the button names are loaded by XML. The problem that I have is that I cannot script the buttons via XML to control the movieclip timeline. I am only trying to use a simple gotoAndPlay type function, however I dont know how to script it in XML. The only way that I know, is to load a new URL. Here is the AS and the XML. Any help would be greatly appreciated, Thank you in advance.

\*\*AS: \*\*

var GLB\_data:CMenuVertClassicGlobalData = new CMenuVertClassicGlobalData();  
GLB\_data.m\_local\_root = this;  
var m\_xml:XML = new XML();  
m\_xml.ignoreWhite = true;

m\_xml.onLoad = function(success)  
{  
if (success)  
{

```
    var xml_reader:CMenuVertClassicXMLReader = new CMenuVertClassicXMLReader(GLB_data);    
    xml_reader.ReadXML(m_xml);        
    var root_node = xml_reader.GetFirstMenuRootNode(m_xml);
    
    var rootGroup = new CMenuVertClassic(0, 0, "menu", 0,null,GLB_data);
    rootGroup.BrowseSubMenu(root_node, 0, null);
    rootGroup.UnselectAndArrange();
    GLB_data.m_local_root.m_root_group = rootGroup;        
}

```

};

m\_xml.load(“menu.xml”);

//  
this.menuItem\_mc.\_visible = false;  
onEnterFrame = function () {  
GLB\_data.m\_local\_root.m\_root\_group.ProcessState(0. 1);  
};

\*\*XML: (the part im having trouble with) \*\*

```
&lt;!-- MENU STRUCTURE --&gt;
&lt;menu_structure&gt;

    &lt;item&gt;
        &lt;item text = "Specials" url="" url_self = "0" &gt;
        &lt;/item&gt;
        &lt;item text = "Kits" url = "" url_self = "1" &gt;
            &lt;item text = "Detail" url = "" url_self = "0" /&gt;
            &lt;item text = "Washing" url = "" url_self = "1" /&gt;
        &lt;/item&gt;
```
