2 Replies Latest reply: Apr 1, 2009 9:48 AM by BrianatArena RSS

    Using a variable's definition as a variable name

    BrianatArena Community Member
      I have a string variable with definition I need to use as a variable name.

      For example, this is super simplified:

      var newVariable = 'it is working';
      var partOne:String = 'new';
      var partTwo:String = 'Variable';
      var partThree = partOne + partTwo;

      trace("my variable is " + partThree);

      Instead of tracing partThree as literally partOne + partTwo (which traces "newVariable") i'd like it to trace the Definition of partOne + partTwo (which is "it is working").

      I hope this makes sense, help or advice is appreciated.