5 Replies Latest reply on Apr 17, 2006 11:55 AM by NSurveyor

    createTextField help...

    organicdigital Level 1
      ok. im trying to get the data that is entered into the created text fields and turn them into an Array.
      for some reason it reads the text field varibles as the variable name not the value of the text field.

      anyone got any idea how to work this out?


      the code:


      word = "test_test";
      amount = word.length;
      letters = new Array();

      for (x=0; x<amount; x++) {

      xpos = 100;
      xpos = xpos + x * 25;

      createTextField("Box_"+ [x], x, xpos, 150, 20,20);
      _root["Box_" + x].type = "input"
      _root["Box_" + x].background=true;
      _root["Box_" + x].border=true;
      _root["Box_" + x].backgroundColor=0xFFFFFF;//white
      _root["Box_" + x].borderColor=0x000000;//black
      _root["Box_" + x].multiline=false;
      _root["Box_" + x].wordWrap=false;
      _root["Box_" + x].variable = "myText"+x
      _root["Box_" + x].maxChars = 1;
      _root["Box_" + x].tabEnabled = false;




      btn.onPress = function(){
      got = new Array(amount)
      for(i=0; i<amount; i++){

      got = "myText[" + i + "]";
      trace(got);

      }

      }