# Function names and strings

**URL:** https://forum.kirupa.com/t/function-names-and-strings/265381
**Category:** Uncategorized
**Created:** [July 8, 2008, 10:39am UTC](https://forum.kirupa.com/t/function-names-and-strings/265381 "2008-07-08T10:39:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RebuiltJorge](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RebuiltJorge](https://forum.kirupa.com/u/RebuiltJorge)
#### Post date: [July 8, 2008, 10:39am UTC](https://forum.kirupa.com/t/function-names-and-strings/265381/1 "2008-07-08T10:39:05Z")

</div>

ok so i have a loop that goes throught about 4 times and through eace pass assigns an MouseEvent listener to a button, i would like to store the event listener function names in an array like this  
var functionNames:Array = new Array(“functionOne”,“functionTwo”,functionThree");  
myButton.addEventListener(MouseEvent.CLICK,functionNames\*);

however this doesn’t work, any ideas, thanks

---

<div class="post-metadata">

### Author: ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)
#### Post date: [July 8, 2008, 11:04am UTC](https://forum.kirupa.com/t/function-names-and-strings/265381/2 "2008-07-08T11:04:30Z")

</div>

You need to have an actual reference to your functions, so code like this might work, depending on where your functions are defined:

```auto
var functionNames:Array = new Array(functionOne,functionTwo,functionThree);

```

---

<div class="post-metadata">

### Author: ![RebuiltJorge](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RebuiltJorge](https://forum.kirupa.com/u/RebuiltJorge)
#### Post date: [July 8, 2008, 5:20pm UTC](https://forum.kirupa.com/t/function-names-and-strings/265381/3 "2008-07-08T17:20:26Z")

</div>

that works great, thanks!
