0 Replies Latest reply on Sep 28, 2010 11:14 AM by Devtron

    Can I reference object by constructing name?

    Devtron Level 3



      I need to loop through a lot of objects and properties where I would like to reference both objects and properties by constructing name using variables.


      For example, I need to do something similar to this:

      var i:int;
      for (i = 0; i < 5; i++)
      [myHBox+1].width ="100";

      using [myHBox+1] to show expression to be evaluated as object name.


      How can I reference a UI object in this manner, with a dynamic ID or Name?