# Easy Function question

**URL:** https://forum.kirupa.com/t/easy-function-question/312773
**Category:** Uncategorized
**Created:** [August 12, 2010, 9:38am UTC](https://forum.kirupa.com/t/easy-function-question/312773 "2010-08-12T09:38:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![timmy666](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@timmy666](https://forum.kirupa.com/u/timmy666)
#### Post date: [August 12, 2010, 9:38am UTC](https://forum.kirupa.com/t/easy-function-question/312773/1 "2010-08-12T09:38:22Z")

</div>

Here is an easy noobie question…

Say I have the following function

```auto
function myVideoFunction(event:VideoEvent):void {
do some stuff....
}

```

but i want to call it from the event listener

```auto
button.addEventListener(MouseEvent.CLICK,myVideoFunction);

```

I cant because it runs off a VideoEvent, not a MouseEvent.

The obvious work around is to copy and paste the function and rename this part, or alternativly just make a function such as:

```auto
button.addEventListener(MouseEvent.CLICK,callMyVideoFunction);

function callMyVideoFunction (event:MouseEvent) {
myVideoFunction(null);
}

function myVideoFunction(event:VideoEvent):void {
do some stuff....
}

```

but what is the proper way to do it? surely that isn’t the correct way?
