# addChild buttons pointing at XML data

**URL:** <https://forum.kirupa.com/t/addchild-buttons-pointing-at-xml-data/280290>\
**Category:** flash\
**Created:** [January 25, 2009, 7:34pm UTC](https://forum.kirupa.com/t/addchild-buttons-pointing-at-xml-data/280290 "2009-01-25T19:34:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icebrk](https://avatars.discourse-cdn.com/v4/letter/i/a8b319/32.png) [@icebrk](https://forum.kirupa.com/u/icebrk)\
**Post date:** [January 25, 2009, 7:34pm UTC](https://forum.kirupa.com/t/addchild-buttons-pointing-at-xml-data/280290/1 "2009-01-25T19:34:35Z")

</div>

Hi everybody,

This is probably a pretty newbie question but since this is my first AS3 project I hope someone will be kind enough to point me in the right direction.

I have a scroll component that I use to scroll through a long movie clip that loads a list of 3 text fields from an XML file (each item is called Li and some of the fields include a unique bID (b1, b2, b3 etc) pN, Da etc. on XML load I use a loop to populate the movie clip with the primary information fields creating a list of each \<Li\> Item in the list by showing the first three fields in that item. Now I would like to add a button to each item that allows the user to see the complete information in that list item. This button should either generate a new movie clip (or make a current one visible) and populate that new movie clip with information taken from said list item. What I don’t seem to be able to figure out is how does AS3 handle this, how do I either generate or add a button that will know that if this button is clicked it should get the information from the corect XML list item. I hope this makes sense?

Again, I appreciate any advice or hints on how I should approach this and what syntax is available for accomplishing this.

Thanks!
