# \[AS 2.0\] Type Checking Data in Array

**URL:** <https://forum.kirupa.com/t/as-2-0-type-checking-data-in-array/175559>\
**Category:** flash\
**Created:** [January 15, 2006, 9:11pm UTC](https://forum.kirupa.com/t/as-2-0-type-checking-data-in-array/175559 "2006-01-15T21:11:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [January 15, 2006, 9:11pm UTC](https://forum.kirupa.com/t/as-2-0-type-checking-data-in-array/175559/1 "2006-01-15T21:11:04Z")

</div>

Hi everyone,  
I’m trying to do something such as:

```auto
var n:Node = openList.shift();

```

I know that all of the data contained inside openList is a type of Node object, but Flash returns an error. I don’t know how to typecast such as placing (in another language)…

```auto
(Node) openList.shift();

```

…to tell Flash that the data returned will be a Node object.

Better yet, is there a way to specify, while declaring the array, the type of the data that will be placed in it?

I could just take the :Node tag out from my variable declaration, but this might be in a tutorial, so I should at least act like I believe half the stuff about proper coding I write about 😛

Thanks,  
Kirupa :cool:
