# For in statement

**URL:** <https://forum.kirupa.com/t/for-in-statement/81315>\
**Category:** Uncategorized\
**Created:** [March 1, 2005, 4:39pm UTC](https://forum.kirupa.com/t/for-in-statement/81315 "2005-03-01T16:39:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shotsy247](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@shotsy247](https://forum.kirupa.com/u/shotsy247)\
**Post date:** [March 1, 2005, 4:39pm UTC](https://forum.kirupa.com/t/for-in-statement/81315/1 "2005-03-01T16:39:47Z")

</div>

```auto
for(var i in Q7_Clip){
    if(typeof(Q7_Clip*) == "object"){
        Q7_Clip*.onChanged = function(){
        _root.myVars["Q7_"+Q7_Clip*._name] = Q7_Clip*.text;
    }
}

```

I was hoping to be able to assign the above onChanged function to each instance of an inputText field within a movieclip. The result is that the final textfield works with the onChanged event but none of the others do.

What am I doing wrong?

Thanks.

\_t
