5 Replies Latest reply on Apr 29, 2014 7:55 AM by kglad

    String to new Function

    DazFaz Level 1

      Hello,

       

      Is it possible to convert a string to a new function e.g.

       

      var myNewFunction:Function;

       

      myNewFunction = "myStringFunction(){trace('this has been called');};"

       

      myNewFunction();

       

      //trace Result

      this has been called

       

       

      Thanks in advance