# Can i create new textfields for each childNode?

**URL:** <https://forum.kirupa.com/t/can-i-create-new-textfields-for-each-childnode/188651>\
**Category:** Uncategorized\
**Created:** [May 9, 2006, 7:22pm UTC](https://forum.kirupa.com/t/can-i-create-new-textfields-for-each-childnode/188651 "2006-05-09T19:22:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapstan](https://avatars.discourse-cdn.com/v4/letter/k/d26b3c/32.png) [@kapstan](https://forum.kirupa.com/u/kapstan)\
**Post date:** [May 9, 2006, 7:22pm UTC](https://forum.kirupa.com/t/can-i-create-new-textfields-for-each-childnode/188651/1 "2006-05-09T19:22:54Z")

</div>

Hi, i have a situation where i am recreating an all flash site into a hybrid site once the folks figured out that their search terms can’t be used by google in a flash site…

anyway, there are numerous paragraphs of text that they would like to retain formatting for. I am reading in in the text using separate childNodes in an XML file for each paragraph break. however, i would like to know if i can create new textfields everytime i loop through a childNode structure and then write out the new textfield with the current Node’s value used as the text property for the TextField instance.

here’s how i think it might work in my head:

```auto

var paragraph;

for (var i = 0; i < xml.firstChild.childNodes[0].childNodes.length; i++) {
  this.createTextField(name, depth, x, y, width, height);
  paragraph = xmlNodeDecl.firstChild.childNodes*.firstChild;  
  newTextField.text += paragraph;  
*}

```

is what i’m trying to do possible and if so, has anyone done something like this before? right now i’m not getting any output whatsoever.

thanks for any help.  
ian
