# Determing type of object in array

**URL:** https://forum.kirupa.com/t/determing-type-of-object-in-array/285677
**Category:** flash
**Created:** [April 3, 2009, 8:10pm UTC](https://forum.kirupa.com/t/determing-type-of-object-in-array/285677 "2009-04-03T20:10:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)
#### Post date: [April 3, 2009, 8:10pm UTC](https://forum.kirupa.com/t/determing-type-of-object-in-array/285677/1 "2009-04-03T20:10:38Z")

</div>

I have an array with several text inputs and 2 buttons. How can I test what kind of object they are? I tried this but doesnt work.

```auto

for (var i:int = 0; i < newClientFields.length; i++)
{
	if (newClientFields* is TextInput)
	{
		trace("im a textinput");
	}else{
                trace("im a button");
        }
}

```

If I just trace out newClientFields\* I get:

```auto

[object TextInput]
[object TextInput]
[object TextInput]
[object TextInput]
[object TextInput]
[object TextInput]
[object TextInput]
[object TextInput]
[object Button]
[object Button]

```
