# Calling Function from String

**URL:** <https://forum.kirupa.com/t/calling-function-from-string/256988>\
**Category:** Uncategorized\
**Created:** [April 9, 2008, 10:42am UTC](https://forum.kirupa.com/t/calling-function-from-string/256988 "2008-04-09T10:42:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [April 9, 2008, 10:42am UTC](https://forum.kirupa.com/t/calling-function-from-string/256988/1 "2008-04-09T10:42:39Z")

</div>

hello,  
was trying to get a prototype run from a foreach loop depending on instance name… but i stripped the code =).  
Why wont this work?  
[AS]  
myFunc = “hello”  
hello = function (){  
trace(“hello World”)  
}  
eval(myFunc)  
[/AS]
