# Same Callback Function on different ty of EventHandler

**URL:** <https://forum.kirupa.com/t/same-callback-function-on-different-ty-of-eventhandler/322152>\
**Category:** flash\
**Created:** [May 12, 2011, 8:26am UTC](https://forum.kirupa.com/t/same-callback-function-on-different-ty-of-eventhandler/322152 "2011-05-12T08:26:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gkp\_gaurav1](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@gkp\_gaurav1](https://forum.kirupa.com/u/gkp_gaurav1)\
**Post date:** [May 12, 2011, 8:26am UTC](https://forum.kirupa.com/t/same-callback-function-on-different-ty-of-eventhandler/322152/1 "2011-05-12T08:26:03Z")

</div>

I have 2 event listener in my document class. One is for a TimerEvent.TIMER and another is for VideoEvent.COMPLETE.

Now my question is can i assign a single callback function for both of them?

```auto
vdo.addEventListener(VideoEvent.COMPLETE, completeVideo);
myTimer.addEventListener(TimerEvent.TIMER, completeVideo);

```

In both listeners the callback function completeVideo is same. This function’s definition is like this:

```auto
private function completeVideo(e:Event)
        {
}

```

Its working. But is this good? Any side effect or memory load?
