# Put textfields into array

**URL:** <https://forum.kirupa.com/t/put-textfields-into-array/310566>\
**Category:** flash\
**Created:** [June 13, 2010, 10:04pm UTC](https://forum.kirupa.com/t/put-textfields-into-array/310566 "2010-06-13T22:04:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dexter1](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@Dexter1](https://forum.kirupa.com/u/Dexter1)\
**Post date:** [June 13, 2010, 10:04pm UTC](https://forum.kirupa.com/t/put-textfields-into-array/310566/1 "2010-06-13T22:04:23Z")

</div>

Hi, I have a bunch of dynamic textfields on the main timeline. Each has its own instance name t0, t1, t2 … t25. This might sound stupid but how can I use a loop to put them into the array?

This is my simple “non-loop” code :doh:

```auto
var lettersArray:Array = new Array();
lettersArray.push(t0);
lettersArray.push(t1);
lettersArray.push(t2);
//add the rest here
trace(lettersArray); //[object TextField],[object TextField],[object TextField]

```
