# Multiple event handlers for one function

**URL:** <https://forum.kirupa.com/t/multiple-event-handlers-for-one-function/123104>\
**Category:** Uncategorized\
**Created:** [September 20, 2004, 5:29pm UTC](https://forum.kirupa.com/t/multiple-event-handlers-for-one-function/123104 "2004-09-20T17:29:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArcanE](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/arcane/32/183_2.png) [@ArcanE](https://forum.kirupa.com/u/ArcanE)\
**Post date:** [September 20, 2004, 5:29pm UTC](https://forum.kirupa.com/t/multiple-event-handlers-for-one-function/123104/1 "2004-09-20T17:29:46Z")

</div>

Is there a way to achieve what i’m trying to do here? Obviously it doesn’t work this way because only the last event handler is activated and the first one is ignored.

```php
 
this.txtbtn_edegem.onRelease, this.btn_edegem.onRelease = function() {
 
if(_root.content == Number(_root.content)){
loadMovieNum("realisaties_sevenoaks.swf",_root.content);
} else {
_root.content.loadMovie("realisaties_sevenoaks.swf");
}
 
}

```

I’m simply trying to apply the function to the two handlers in the beginning of the first line: **this.txtbtn\_edegem.onRelease** and **this.btn\_edegem.onRelease**

Thanks!
