# Click function from one button to another

**URL:** <https://forum.kirupa.com/t/click-function-from-one-button-to-another/305179>\
**Category:** flash\
**Created:** [February 20, 2010, 2:20pm UTC](https://forum.kirupa.com/t/click-function-from-one-button-to-another/305179 "2010-02-20T14:20:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [February 20, 2010, 2:20pm UTC](https://forum.kirupa.com/t/click-function-from-one-button-to-another/305179/1 "2010-02-20T14:20:55Z")

</div>

Have two buttons and want that button2, when clicked, triggers the same action button1.

Bellow the code I’m trying. But what is wrong?

```auto

botao1.addEventListener(MouseEvent.MOUSE_UP, botao_clique);
botao2.addEventListener(MouseEvent.MOUSE_UP, botao_clique2);

function botao_clique(e:MouseEvent):void {
	trace ("botao 1")
	}
	function botao_clique2(e:MouseEvent):void {
	
	botao1.botao_clique();
	}

```

Thanks
