# Convert String var to function()?

**URL:** <https://forum.kirupa.com/t/convert-string-var-to-function/179393>\
**Category:** flash\
**Created:** [February 19, 2006, 7:48pm UTC](https://forum.kirupa.com/t/convert-string-var-to-function/179393 "2006-02-19T19:48:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThePuzzleMaster](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thepuzzlemaster/32/972_2.png) [@ThePuzzleMaster](https://forum.kirupa.com/u/ThePuzzleMaster)\
**Post date:** [February 19, 2006, 7:48pm UTC](https://forum.kirupa.com/t/convert-string-var-to-function/179393/1 "2006-02-19T19:48:17Z")

</div>

Is there some way to convert a dynamically loaded variable to a function name?

Something along the lines of:

```auto

for (i=1; i<menuArray.length; i++) {
    var menuSelect = menuArray*+"Open";
    menuSelect = function () {
    ////do something here.../// 
    };
}

```

[FONT=Courier New][/FONT]

Basically I have a variablethat stores a string from an Array, and I want that string to then be used as a function name… I’m not sure if this is possible, but I can’t seem to get it to work.

thanks,  
iLan
