# Create dynamic buttons, dynamically assign button text?

**URL:** <https://forum.kirupa.com/t/create-dynamic-buttons-dynamically-assign-button-text/210297>\
**Category:** Uncategorized\
**Created:** [December 17, 2006, 3:10pm UTC](https://forum.kirupa.com/t/create-dynamic-buttons-dynamically-assign-button-text/210297 "2006-12-17T15:10:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohbeewan](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ohbeewan/32/1745_2.png) [@ohbeewan](https://forum.kirupa.com/u/ohbeewan)\
**Post date:** [December 17, 2006, 3:10pm UTC](https://forum.kirupa.com/t/create-dynamic-buttons-dynamically-assign-button-text/210297/1 "2006-12-17T15:10:49Z")

</div>

Hello Kirupa!

I’m trying to create buttons dynamically from xml data, only I want to use a real button, from my library, so that I can have up/over/down states for the button.

Basically I want to do this:

1. open xml loop
2. while looping, assign (attachMovie) an instance of a button from my library to a movie clip on the stage for each row in the xml data.
3. BUT, I also want to dynamically assign the button text from the xml data.

And that’s were I’m stuck. Inside my button, I have a dynamic text box, and normally, I know how to change the text of a dynamic text box using actionscript, but I can’t seem to change the value of the dynamic text box inside the button.

Is this possible?
