# Running Function from a string

**URL:** <https://forum.kirupa.com/t/running-function-from-a-string/309841>\
**Category:** flash\
**Created:** [May 25, 2010, 9:47pm UTC](https://forum.kirupa.com/t/running-function-from-a-string/309841 "2010-05-25T21:47:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Immulsifier](https://avatars.discourse-cdn.com/v4/letter/i/b2d939/32.png) [@Immulsifier](https://forum.kirupa.com/u/Immulsifier)\
**Post date:** [May 25, 2010, 9:47pm UTC](https://forum.kirupa.com/t/running-function-from-a-string/309841/1 "2010-05-25T21:47:14Z")

</div>

Hi

If I have the name of the function I want to run in a string called function\_name and the params I want to pass to the function in another string called function\_params, how would I could this to go in a button with the following code:

mc.button1.addEventListener(MouseEvent.MOUSE\_DOWN, button1\_handler);  
function button1\_handler(Event:MouseEvent):void {  
// Dont know what to put here  
}
