# Actionscript call button onRelease()

**URL:** https://forum.kirupa.com/t/actionscript-call-button-onrelease/262315
**Category:** Uncategorized
**Created:** [June 5, 2008, 12:05am UTC](https://forum.kirupa.com/t/actionscript-call-button-onrelease/262315 "2008-06-05T00:05:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tobycraftse](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@tobycraftse](https://forum.kirupa.com/u/tobycraftse)
#### Post date: [June 5, 2008, 12:05am UTC](https://forum.kirupa.com/t/actionscript-call-button-onrelease/262315/1 "2008-06-05T00:05:02Z")

</div>

I defined some button using flash timeline like follows:  
[![](http://www.oniva.com/upload/1356/bu3.jpg) ](http://www.oniva.com/upload/1356/bu3.jpg)

# I have a actionscript function that will call that button’s onRelease() function

# var buttons:Array = new Array(“Button 99”, “but2”, “but3”, “but4”); function fireButton() { this[buttons[selected\_button\_index]].onRelease(); }

but after fireButton() function is called, the button is not clicked for some reason, any thing wrong the code?

---

<div class="post-metadata">

### Author: ![tobycraftse](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@tobycraftse](https://forum.kirupa.com/u/tobycraftse)
#### Post date: [June 5, 2008, 10:23pm UTC](https://forum.kirupa.com/t/actionscript-call-button-onrelease/262315/2 "2008-06-05T22:23:51Z")

</div>

[quote=fasilak;2336993]Hi,

I think you are a beginer in flash.  
Can you upload ur fla? So that i can take a look on what you are trying to do…[/quote]

In my fla file, I linked the keyboard event to a mouse onRelease()  
[http://www.oniva.com/upload/1356/menu.fl](http://www.oniva.com/upload/1356/menu.fl)  
(.fla source file in above link)

thanks your help!
