3 Replies Latest reply on Apr 19, 2006 6:37 AM by Peter Lorent

    Use variable in target path


      Im sure this is no sweat for a lot of you guys but as im new to using arrays and stuff its still escapung me.

      I nees to use a variable as part of a target path inside a for loop so it populates a series of dynamic text boxes with instance names busName0, busName1 etc. can this be done?

      Heres my code so far:


      var busNameArray:Array = new Array(
      "business 01",
      "business 02",
      "business 03",
      "business 04",
      "business 05",
      "business 06",
      "business 07",
      "business 08",
      "business 09",
      "business 10"
      var i:Number;
      for (i = 0; i < busNameArray.length; i++) {
      this.rightPanel.busName(need the variable i to go here).text = this.busNameArray ;

      Any help much appreciated.
      cheers chris