4 Replies Latest reply on May 26, 2008 11:05 PM by ctzn99

    Evaluating a variable that contains a variable

    cheftimo Level 2
      Hello, all:

      I have a bindable variable that contains the name of another variable that I want to return. Example:

      [Bindable]
      var price:String = "dollars";
      [Bindable]
      var dollars: Number = "10.00"

      If I use {price} in some expression, the output is 'dollars'. I am looking for a way to use {price} and have it output '10.00'. How would I do this in AS 3?

      This would be like the ColdFusion function 'Evaluate()', where #Evaluate(price)# would return '10.00'.

      Any ideas would be highly appreciated. Thanks,

      Carlos