# Button with multiple functions

**URL:** <https://forum.kirupa.com/t/button-with-multiple-functions/12223>\
**Category:** Uncategorized\
**Created:** [January 28, 2003, 5:19pm UTC](https://forum.kirupa.com/t/button-with-multiple-functions/12223 "2003-01-28T17:19:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Audrius](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Audrius](https://forum.kirupa.com/u/Audrius)\
**Post date:** [January 28, 2003, 5:19pm UTC](https://forum.kirupa.com/t/button-with-multiple-functions/12223/1 "2003-01-28T17:19:23Z")

</div>

how to make button do multiple things at the same time. i.e

when button is pressed it animates object1 and object2

i have a buttons that opens a sliding door (code is:

on (release) {  
control.gotoAndStop(2);  
}

so it opens a door where sound control is and i want for the same button at the same time to open lets say another door somewhere in the same stage with a music tracks in there.

any suggestios

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 28, 2003, 6:13pm UTC](https://forum.kirupa.com/t/button-with-multiple-functions/12223/2 "2003-01-28T18:13:57Z")

</div>

just put all your actions in there on one button command.

just target each mc you want to control in there and put your command.

example

```auto

on(release){
	_root.movieclip1.gotoAndPlay(2);
	_root.movieclip2.play();
	_root.movieclip3.stop();
}

```
