# Error 1006 removeEventListener is not a function?

**URL:** <https://forum.kirupa.com/t/error-1006-removeeventlistener-is-not-a-function/293697>\
**Category:** Uncategorized\
**Created:** [August 1, 2009, 10:05pm UTC](https://forum.kirupa.com/t/error-1006-removeeventlistener-is-not-a-function/293697 "2009-08-01T22:05:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbucker](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@humbucker](https://forum.kirupa.com/u/humbucker)\
**Post date:** [August 1, 2009, 10:05pm UTC](https://forum.kirupa.com/t/error-1006-removeeventlistener-is-not-a-function/293697/1 "2009-08-01T22:05:55Z")

</div>

Hi there,

First time I’m having this error, I’ve created different MC in a for loop in a public function.  
Then I need to access these MC for mouseOver / mouseOut functions, and I get this error 1006. I guess I have something undefined or a problem with Array but I can’t see what I’m doing wrong.

Here is my code so far :

```auto

for (var i:int = 0; i <linkNames.length; i++) {
            var link:MovieClip = new MovieClip();
            link.graphics.drawRect(0, 0, 130, 30);
            link.id = i;
            link.x = linkXPos;
            lkArray.push([link]);
            textMenu.addChild(link);

            link.mouseEnabled = true;
            link.mouseChildren = false;    
            link.buttonMode = true;  
            link.addEventListener(MouseEvent.MOUSE_DOWN, dischargeContent);
            link.addEventListener(MouseEvent.MOUSE_OVER, functionOver, false, 0, true);
            link.addEventListener(MouseEvent.MOUSE_OUT, functionOut, false, 0, true);
            
            var lk:TextField = new TextField();    
            lk.autoSize = TextFieldAutoSize.LEFT;
            lk.antiAliasType = AntiAliasType.ADVANCED;
            lk.defaultTextFormat = textFormat1;
            lk.embedFonts = true;
            lk.text = linkNames*;
            lk.alpha = 0;
            link.addChild(lk);
            
            linkXPos = linkXPos + lk.width + 10;
            Tweener.addTween(lk, {alpha:1, time:0.25, delay:i/5, transition:"EaseInExpo"});
            

        }    

```

The problem occurs when I’m doing this in another public function

```auto

lkArray[0].removeEventListener(MouseEvent.MOUSE_OVER, functionOver); 

```

Many thanks, I’m stuck
