# Xml & flash problems

**URL:** <https://forum.kirupa.com/t/xml-flash-problems/145730>\
**Category:** Uncategorized\
**Created:** [April 25, 2005, 12:58pm UTC](https://forum.kirupa.com/t/xml-flash-problems/145730 "2005-04-25T12:58:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RabBell](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rabbell/32/340_2.png) [@RabBell](https://forum.kirupa.com/u/RabBell)\
**Post date:** [April 25, 2005, 12:58pm UTC](https://forum.kirupa.com/t/xml-flash-problems/145730/1 "2005-04-25T12:58:47Z")

</div>

yes I’m having another problem with the XML and Flash menu I was working on. First here is the code

> function showdrop(pParam){  
> if (pParam == “ORG”) { org\_mc.gotoAndPlay(2); }  
> }

function CreateMenu(menu\_xml){  
var items = menu\_xml.firstChild.firstChild.childNodes;  
for (var i=0; i\<items.length; i++) {  
var dept = items\*.firstChild;  
var position = items\*.childNodes[1];  
var rolls = items\*.childNodes[2];  
var item\_mc = menu\_mc.attachMovie(“menu\_item”,“item”+item\_count, item\_count);  
lanswer = position.firstChild.nodeValue \* 1;  
item\_mc.\_x = lanswer;  
item\_count++;   
item\_mc.heading\_txt.text = dept.firstChild.nodeValue;  
item\_mc.main\_btn.onRollOver = function() {  
showdrop(rolls.firstChild.nodeValue);  
}  
}  
}

the showdrop function is called when a person rollsover a button in the menu, this works no problem. The problem is that every button seems to pass the same value where, obviously, they should each be adding unique values

if I change this line  
item\_mc.heading\_txt.text = dept.firstChild.nodeValue;  
to this  
item\_mc.heading\_txt.text = rolls.firstChild.nodeValue;

it shows me the values are coming in like they’re supposed to but for some reason, when I rollover the button it’s passing the value for the last button everytime

anyone any ideas? :h:
