2 Replies Latest reply on Apr 6, 2007 12:30 PM by Glenn Gervais

    How to read a String as an Expression

    capulet_x
      I need help addressing a very unique problem.
      Does anyone know if there is a way after building a string compiled of varibles to intruct flash to read the resulting string as an expression? This is an example:

      I write: "this."+Example

      which results in the following: this.Example

      So how can I tell flash to read my result, this.Example, as an expression instead of a string.

      Is there a class for expression like there is for string or boolean?

      Or is there a way to pass variables to an expression?

      myVarible = Example

      myData = new LoadVars();
      myData.onLoad = function() {
      myDynamicTextField.text = this.+ myVarible; <<<<This unfortunately returns "this.myVarible" to myDynamicTextField
      /// instead of myVarible IN myTextDocument.txt
      };
      myData.load(" http://www.example.com/myTextDocument.txt", 0);