# forEach method

**URL:** <https://forum.kirupa.com/t/foreach-method/226486>\
**Category:** flash\
**Created:** [May 21, 2007, 7:42pm UTC](https://forum.kirupa.com/t/foreach-method/226486 "2007-05-21T19:42:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smizzle](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/smizzle/32/3547_2.png) [@smizzle](https://forum.kirupa.com/u/smizzle)\
**Post date:** [May 21, 2007, 7:42pm UTC](https://forum.kirupa.com/t/foreach-method/226486/1 "2007-05-21T19:42:39Z")

</div>

I am having trouble getting the forEach method to work in a class where I am extending an array. I keep getting this error:

ReferenceError: Error #1069: Property 0 not found on com.infinity.effects.Parallel and there is no default value.  
at Array$/Array::\_forEach()  
at Array/[http://adobe.com/AS3/2006/builtin::forEach()](http://adobe.com/AS3/2006/builtin::forEach())  
at com.infinity.effects::Parallel/start()  
at Untitled\_fla::MainTimeline/Untitled\_fla::frame1()

Here is my callback method:

```
    private function setup(item:*, index:int, array:Array):void {
        trace(item+', '+index+', '+array)
    }
```
