# Where i am going wrong? (xml menu)

**URL:** <https://forum.kirupa.com/t/where-i-am-going-wrong-xml-menu/187389>\
**Category:** Uncategorized\
**Created:** [April 28, 2006, 6:45pm UTC](https://forum.kirupa.com/t/where-i-am-going-wrong-xml-menu/187389 "2006-04-28T18:45:21Z")\
**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 28, 2006, 6:45pm UTC](https://forum.kirupa.com/t/where-i-am-going-wrong-xml-menu/187389/1 "2006-04-28T18:45:21Z")

</div>

Hi friend  
I am basically a web designer and don’t have much knowledge about action scripting and xml, my client require me to make a dynamic xml menu and vertical submenu.  
I tried to look for tutorials on the web and found this script really easy, but got stuck in the programming part, please help figure where I am going wrong?  
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/" />
<submenu name =="Philter" url="http://www.philterdesign.com </submenu>
<submenu name =="Philter" url="http://www.philterdesign.com </submenu>
<myItem name="Studiowhiz" url="http://www.studiowhiz.com/" />

</myMenu>

```

1.I am having problem with position the menu in the right place (\_y axis).  
2. And creating a vertical submenu with differentiating color of the button.  
Please friend help , I am asking this question since 4 days. i would really appreciate if some one help me here. I will be really kind of you.  
I have attached the file.
