# Array problem

**URL:** <https://forum.kirupa.com/t/array-problem/308556>\
**Category:** Uncategorized\
**Created:** [April 25, 2010, 8:51pm UTC](https://forum.kirupa.com/t/array-problem/308556 "2010-04-25T20:51:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neys](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@neys](https://forum.kirupa.com/u/neys)\
**Post date:** [April 25, 2010, 8:51pm UTC](https://forum.kirupa.com/t/array-problem/308556/1 "2010-04-25T20:51:57Z")

</div>

Hello and thank you for reading. Here’s my problem:

I have 2 movieclips, **mc\_projekt1** and **mc\_projekt2**.

I would like to store them in an array and then call a function which works for both of them, hence the array.

Here’s my code:

```auto
var over_alpha:Array = new Array(); 
over_alpha = [mc_projekt1, mc_projekt2];

over_alpha.addEventListener(MouseEvent.MOUSE_OVER, Over2);
    function Over2(e:Event):void{
    TweenLite.to(over_alpha, 0.25, {alpha:0.5});
}
over_alpha.addEventListener(MouseEvent.MOUSE_OUT, Out2);
    function Out2(e:Event):void{
    TweenLite.to(over_alpha, 0.25, {alpha:1});
}

```

I’m getting the following error:

```auto
TypeError: Error #1006: addEventListener is not a function.

```

I’m still really new to actionscript3 and I might be completely off with the way I’m putting my movieclips in the array, but I think I’m pretty close, just don’t understand the error I’m getting.

Hope you can help me out, thank you 🙂
