1 Reply Latest reply on Aug 31, 2010 4:21 PM by kglad

    object name in a string

    cliquot_mp

      I want to create a XML file that I can change for different languages.  It contains the names of the fields that have text and the text that they should be changed to: eg. <lang name="titleLabel" value="This is the app title" />.  I can read in the XML lines into an array but I can't figure out how to use the name as an object name:

       

         var labels:Array = new Array();
         var lblNumber:int = 0;
         for each (var lbl:XML in langFile.children())
         {
          labels[lblNumber] = lbl.@name;

          how do I use what's contained in labels[1] as the object name? e.g. (labels[1].@name).text = labels[1].@value

         }