4 Replies Latest reply on Jun 4, 2009 7:25 AM by bigmamainthemud

    URLVariables On The Fly

    AwesomeDigital2
      I am making a URL Request with variables

      I know I can do this to add the vaiables
      var variables:URLVariables = new URLVariables():

      variables.someName = "jhggjhg";
      variables.someOtherName = "hjkhh";
      ...

      But I would like to load the variables without hard coding the name in the code.
      I am loading in the variables from an array created from an external xml file.

      Is there a way I can add the variables without hard coding the names as I loop though the array?

      e.g

      for(var h:int=o; h < myArray.length; h++){
      variables.[myArray .name ] = myArray .value;
      }

      any hints are appreciated

      Thanks
      Mathias