# More functions on one button... how to?

**URL:** <https://forum.kirupa.com/t/more-functions-on-one-button-how-to/258067>\
**Category:** Uncategorized\
**Created:** [April 20, 2008, 2:50pm UTC](https://forum.kirupa.com/t/more-functions-on-one-button-how-to/258067 "2008-04-20T14:50:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![findAll](https://avatars.discourse-cdn.com/v4/letter/f/4da419/32.png) [@findAll](https://forum.kirupa.com/u/findAll)\
**Post date:** [April 20, 2008, 2:50pm UTC](https://forum.kirupa.com/t/more-functions-on-one-button-how-to/258067/1 "2008-04-20T14:50:17Z")

</div>

I am aware you can have a code like

```auto

myButton.onRelease = function (){
gotoAndPlay(2);
movieHolder.loadMovie("movie.swf");
}

```

My question is how to apply more than one function to a button, but define the functions later, something like

```auto

myButton.onRelease = playing;
myButton.onRelease = loading;

function playing () {
gotoAndPlay(2);
}
function loading () {
movieHolder.loadMovie("movie.swf");
}

```

Is this possible, and if yes, what should be the correct code?
