# How can you use a string value as a function name?

**URL:** <https://forum.kirupa.com/t/how-can-you-use-a-string-value-as-a-function-name/276881>\
**Category:** flash\
**Created:** [December 4, 2008, 4:25pm UTC](https://forum.kirupa.com/t/how-can-you-use-a-string-value-as-a-function-name/276881 "2008-12-04T16:25:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rustyleaf](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rustyleaf](https://forum.kirupa.com/u/rustyleaf)\
**Post date:** [December 4, 2008, 4:25pm UTC](https://forum.kirupa.com/t/how-can-you-use-a-string-value-as-a-function-name/276881/1 "2008-12-04T16:25:58Z")

</div>

I have a function set up that returns a string. I then want to use this string as the part of the function name for my next function call…

```auto
function onClicknav(event:MouseEvent):void {
   statusreport = String(checkstatus.checkit(event.target.name));   
   trace(statusreport);   
   TraversePage.statusreport();

```

This returns an error because there is no function statuspage!!! There is a function called Traverse.st\_bi(); and st\_bi is the value that statusreport is holding (that has been returned from the previous functioncall) but I can’t seem to get it to use the value of statusreport as part of the call instead of statusreport itself???

I hope you understand my dilemma - I am sure it is some punctuation I need but I dont know what it is… ? Anyone know?
