# Menu scripting problem help!

**URL:** <https://forum.kirupa.com/t/menu-scripting-problem-help/187487>\
**Category:** Uncategorized\
**Created:** [April 29, 2006, 6:02pm UTC](https://forum.kirupa.com/t/menu-scripting-problem-help/187487 "2006-04-29T18:02:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkstyle](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@darkstyle](https://forum.kirupa.com/u/darkstyle)\
**Post date:** [April 29, 2006, 6:02pm UTC](https://forum.kirupa.com/t/menu-scripting-problem-help/187487/1 "2006-04-29T18:02:26Z")

</div>

hi friends,  
thanks for the earler help.  
i am using this menu which is working fine but my client require me to differentiate the main menu and submenu with different attached movie clip.  
for the main menu i have used. “itemClip” as attached movie clip and xml code is “myItem”  
Now i want another submenu . “subClip” as attached movie clip and xml code is “subItem”

please help with coding

flash code

```php

menuXml = new XML(); 
     menuXml.ignoreWhite = true; 
     menuXml.onLoad = function(success) { 
if (success) { 
  menuItem = this.firstChild.childNodes; 
  for (var i=0; i<menuItem.length; i++) { 
     item = _root.attachMovie("itemClip", "itemClip" + i, i); 
     item._x = 0; 
     item._y = 20*i; 
     item.itemLabel.text = menuItem*.attributes.name; 
     item.myUrl = menuItem*.attributes.url; 
     item.onRelease = function() { 
      getURL(this.myUrl,"_blank"); 
  } 
} 
} 
    } 
     menuXml.load("myMenu.xml"); 

```

xml code:

```php
<?xml version="1.0"?> 
    <myMenu> 
        <myItem name="Philter" url="http://www.philterdesign.com/" /> //MY MAIN MENU
<subItem name =="Philter" url="http://www.philterdesign.com </submenu> //SUBMENU WITH with "subClip" atttached movie clip.
        <myItem name="Studiowhiz" url="http://www.studiowhiz.com/" /> 
         
    </myMenu>  

```
