# eventHandler issue - pls help

**URL:** <https://forum.kirupa.com/t/eventhandler-issue-pls-help/299308>\
**Category:** flash\
**Created:** [November 3, 2009, 8:56am UTC](https://forum.kirupa.com/t/eventhandler-issue-pls-help/299308 "2009-11-03T08:56:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superFlex](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@superFlex](https://forum.kirupa.com/u/superFlex)\
**Post date:** [November 3, 2009, 8:56am UTC](https://forum.kirupa.com/t/eventhandler-issue-pls-help/299308/1 "2009-11-03T08:56:00Z")

</div>

Hi,

I am very new to flex and trying to understand eventHandling.  
I have created a custom event and would like to invoke it.  
Below is the code of custom event class:

package com.xxx  
{  
import [com.xxx.Me](http://com.xxx.Me);

```
import flash.events.Event;

public class AddMeEvent extends Event
{
    public static const ADDME:String = "add-me";
    
    private var _me:Me;
    
    public function AddMeEvent(type:String, me:Me){
        super(type, true);
        _me = me;
    }
    
    public override function clone():Event {
        return new AddMeEvent(type, _me);
    }
    
    public function get me():Me {
        return _me;
    }
}

```

}

and for an obj of type Me in a class i add the above event as:

obj1.addEventListner(AddMeEvent.ADDME, addHandler);

addHandler method is as below:

private function addHandler(event:AddMeEvent):void{  
dispatchEvent(new AddMeEvent(AddMeEvent.ADDME, event.target as Me));  
}

but the addHandler code is not reached when i try to debug the above code. Pls help me if you could find what the error is.
