# For in loops/ Text Field Turmoil

**URL:** <https://forum.kirupa.com/t/for-in-loops-text-field-turmoil/120486>\
**Category:** Uncategorized\
**Created:** [August 24, 2004, 9:15pm UTC](https://forum.kirupa.com/t/for-in-loops-text-field-turmoil/120486 "2004-08-24T21:15:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pup\_100](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@Pup\_100](https://forum.kirupa.com/u/Pup_100)\
**Post date:** [August 24, 2004, 9:15pm UTC](https://forum.kirupa.com/t/for-in-loops-text-field-turmoil/120486/1 "2004-08-24T21:15:09Z")

</div>

[font=Times New Roman]Sorry to insult everyone’s intelligence with what is probably a very simple question, but…[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]I have a dynamic text field that I would like to populate with the contents of a pre-loaded array (I know I could have populated the text field directly but this was just for practice using loops.)[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]So we’ve got the text field & the following script in the first frame[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]nums=[“one”,“two”,“three”];[/font]

[font=Times New Roman]for (e in nums){[/font]

[font=Times New Roman]flip\_txt.text=nums [e];[/font]

[font=Times New Roman]}[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]I sort of hoped that this would have given me a nice text field with “one, two, three” in it but no such luck; it only gives me “one.” [/font]

[font=Times New Roman] [/font]

[font=Times New Roman]Why?[/font]

[font=Times New Roman] [/font]

[font=Times New Roman]Thank you.[/font]
