# Dynamic component creation?

**URL:** <https://forum.kirupa.com/t/dynamic-component-creation/266283>\
**Category:** Uncategorized\
**Created:** [July 18, 2008, 1:22am UTC](https://forum.kirupa.com/t/dynamic-component-creation/266283 "2008-07-18T01:22:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IPswich](https://avatars.discourse-cdn.com/v4/letter/i/ce7236/32.png) [@IPswich](https://forum.kirupa.com/u/IPswich)\
**Post date:** [July 18, 2008, 1:22am UTC](https://forum.kirupa.com/t/dynamic-component-creation/266283/1 "2008-07-18T01:22:31Z")

</div>

Hi, I am relatively new to Flash and AS3, and I am attempting to build my first site. I am setting the site up to populate from xml documents so it can be easily updated. The problem I have run into is how to create a TextArea (or any component) dynamically.

In other words, I have an xml document with 20 nodes, each pertaining to a song. I want to create 20 TextAreas to display the song names. I wrote a _for each_ loop that runs through the xml, but I’m not sure how to create a unique textfield for each node in the xml. Am I even going about this the right way? If you need a better explanation please let me know.

Thanks, much appreciated.

Just some extra explanation if that doesn’t make sense:  
Each of the text boxes should have the same attributes and settings, so I thought maybe I should make a class? I think the concept is right but I’m not exactly sure how to go about that either, or how to give each instance of the class a unique name/identifier. I’m sorry to be long-winded, just trying to make it clear.
