2 Replies Latest reply on Feb 8, 2007 6:38 AM by logeye

    creating multiple textFields

    logeye
      I thought I knew what I was doing.

      I'm creating a logbook form that has about 500 different input textFields. Using a simple for loop, I trying to create a portion of the textFields then change their properties to an Input textFeild that is prepopulated with data.

      Here's the code:

      var maxColumns:Number = 10;
      var maxRows:Number = 8;
      var tc_TabOrderStart = 13;
      var xStart:Number = 256;
      var yStart:Number = 123;
      var xOffset:Number = 46.3;
      var yOffset:Number = 21.8;
      var txtFieldWidth:Number = 41;
      var txtFieldHeight:Number = 81;
      for (var j:Number = 0; j<maxRows; j++)
      {
      for (var i:Number = 0; i<maxColumns; i++)
      {
      var tc_tfld:String = "tc"+j+"_"+i;
      trace("tc_tfld = "+tc_tfld);
      this.createTextField(tc_tfld, this.getNextHighestDepth(), xStart+(xOffset*i), yStart+(yOffset*j), txtFieldWidth, txtFieldHeight);
      with (this.tc_tfld)
      {
      type="input";
      text = "DUMB";
      }
      }
      }

      Thanks for any help. I've been stuck for three days.