# For each

**URL:** <https://forum.kirupa.com/t/for-each/270934>\
**Category:** Uncategorized\
**Created:** [September 16, 2008, 12:13pm UTC](https://forum.kirupa.com/t/for-each/270934 "2008-09-16T12:13:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayteq](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ayteq/32/2058_2.png) [@ayteq](https://forum.kirupa.com/u/ayteq)\
**Post date:** [September 16, 2008, 12:13pm UTC](https://forum.kirupa.com/t/for-each/270934/1 "2008-09-16T12:13:27Z")

</div>

In actionscript 2.0 i could reach textfield loacted in a movieclip. Suppose you have a movieclip with a instance name “ **mc** ”, and this mc contains two textfields with instance names of **a\_txt** and **b\_txt**. if you want to access these text with a loop you can use

```auto
 
for (var each in mc) {
trace(each);
mc[each].text = "foo";
}
//Output will be a_txt, b_txt.

```

But if you do the same in actionscript 3.0, in output window nothing appears. Why?

Thank you in advance.
