# Scrolling an XML built menu

**URL:** <https://forum.kirupa.com/t/scrolling-an-xml-built-menu/28958>\
**Category:** Uncategorized\
**Created:** [August 20, 2003, 2:43pm UTC](https://forum.kirupa.com/t/scrolling-an-xml-built-menu/28958 "2003-08-20T14:43:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robocop](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@robocop](https://forum.kirupa.com/u/robocop)\
**Post date:** [August 20, 2003, 2:43pm UTC](https://forum.kirupa.com/t/scrolling-an-xml-built-menu/28958/1 "2003-08-20T14:43:33Z")

</div>

Hey there…i got my xml based menu finally completed…but now, i would like to put it inside of a scroller/mx scrollpane component so that people can scroll through all of the items that the XML file creates…anyone have any ideas? ive pasted the code and a link to the source files…feel free to tear em apart…

clipYPos = 0;  
menuXml = new XML();  
menuXml.ignoreWhite = true;  
menuXml.onLoad = function(success){  
if(success){  
menuItem = this.firstChild.childNodes;  
//trace(contentData);  
for(var i=0; i\<menuItem.length; i++){  
item = \_root.attachMovie(“itemClip”,“itemClip”, + i);  
item.headline.text = menuItem.attributes.name;  
item.myUrl = menuItem.attributes.url;  
item.content.text = menuItem.attributes.content;  
spacing = item.content.textHeight + item.headline.\_height + 20  
item.\_x = 200;  
item.\_y = clipYPos;  
clipYPos = clipYPos + spacing;

}  
}  
}  
menuXml.load(“myMenu.xml” ;

source file: [http://www.pyroblue.com/UPLOAD/myMenu.zip](http://www.pyroblue.com/UPLOAD/myMenu.zip)

im thinkin that where it says “\_root.attatchMovie”…that i should add like “\_root.scroller.attatchMovie”…i dunno…im at a loss…

thanks yall!!
