# Problem with removeEventListener

**URL:** <https://forum.kirupa.com/t/problem-with-removeeventlistener/280644>\
**Category:** Uncategorized\
**Created:** [January 29, 2009, 9:35pm UTC](https://forum.kirupa.com/t/problem-with-removeeventlistener/280644 "2009-01-29T21:35:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ParanoidAndroid](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@ParanoidAndroid](https://forum.kirupa.com/u/ParanoidAndroid)\
**Post date:** [January 29, 2009, 9:35pm UTC](https://forum.kirupa.com/t/problem-with-removeeventlistener/280644/1 "2009-01-29T21:35:24Z")

</div>

Hi guys, i have an annoying problem. I have a mc that i use as a button. I have an external class that controls the button and adds interactivity to it, here’s part of the code:

```auto
package
{
   import flash.display.*;
   import flash.text.*;
   import flash.geom.ColorTransform;
   import flash.events.*;
   
   public class BtnCuadSelect extends MovieClip
   {
                  
      public function BtnCuadSelect():void
      {
         this.mouseChildren=false;
         this.buttonMode=true;
         init();                  
      }
      
      public function init():void
      {
         addEventListener(MouseEvent.MOUSE_OVER,over);
         addEventListener(MouseEvent.MOUSE_OUT ,up);
         addEventListener(MouseEvent.MOUSE_DOWN ,down);
      }
      
      private function over(evt:MouseEvent):void
      {
         //acciones...
      }
      
      private function up(evt:MouseEvent):void
      {
         //acciones...
      }
      
      private function down(evt:MouseEvent):void
      {
         removeEventListener(MouseEvent.MOUSE_OVER,over);
         removeEventListener(MouseEvent.MOUSE_OUT ,up);
         removeEventListener(MouseEvent.MOUSE_DOWN ,down);
         this.buttonMode=false;
      }
      
   }
} 

```

The problem is, i want the btn that, when clicked, remain inactive.That’s why I remove all the listeners in the class. HOWEVER, it still functions as a button, I mean the functions haven’t been removed at all after I click it. What’s wrong here?? Why are the functions still there, if I have removed them when clicked at the btn??? :S  
Any help, please?
