# Calling function question

**URL:** <https://forum.kirupa.com/t/calling-function-question/315592>\
**Category:** Uncategorized\
**Created:** [October 29, 2010, 7:50pm UTC](https://forum.kirupa.com/t/calling-function-question/315592 "2010-10-29T19:50:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbo](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tbo](https://forum.kirupa.com/u/tbo)\
**Post date:** [October 29, 2010, 7:50pm UTC](https://forum.kirupa.com/t/calling-function-question/315592/1 "2010-10-29T19:50:20Z")

</div>

```auto
stage.addEventListener(Event.DEACTIVATE,callMenu);
...
function callMenu(e:Event)
        {
        //game is paused and a menu is brought up.
        }

```

if i also want to call the menu within another function which is not the same type of event, should i pass in null ?

example: a switch statement finds the correct keyboard input has been pressed, is it bad to use callMenu(null);…it seemed to work, but feels wrong.

thanks for the help.
