// some values and a user function we'll callvar monkeys:String = "monkeys!";var apes:String = "apes!"; function myFunc(str1:String, str2:String) { trace(str1 + " and " + str2);} // locate a function and apply the arguments to itfunction parseFunction(s:String) { var fname:String = s.split("(")[0]; var parameters:String = s.split(")")[0].substr(fname.length + 1); var paramlist:Array = parameters.split(", "); // get the results of each argument for (i in paramlist) { paramlist[i] = eval(paramlist[i]); } // call the function with the specified arguments var func:Function = eval(fname); func.apply(this, paramlist);} // try to call user function, and a system functionparseFunction("myFunc(monkeys, apes);");monkeys = "three little monkeys";parseFunction("trace(monkeys);");