1 Reply Latest reply on Jun 4, 2007 3:43 PM by kglad

    Function for creating multiple Text Fields thru ActionScript

    BillG-Seattle Level 1
      I'm trying to create multiple text fields dynamically and am trying, without success, to come up with a function that will handle the basic set up more easily. Here's what I have so far:

      function myCreateField(layer, fieldname, level, xpos, ypos, mywidth, myheight) {
      layer.createTextField(fieldname, level, xpos, ypos, mywidth, myheight);
      layer.fieldname.html = true;
      layer.fieldname.antiAliasType = "advanced";
      layer.fieldname.wordWrap = true;
      layer.fieldname.autoSize = "left";
      layer.fieldname.multiline = true;
      myCreateField(this, "directions_txt", 10, 400, 20, 300, 80)

      It's working, except that the text appears to be cut off...that is, the wordWrap or autoSize do not appear to be working. Any pointers would be much appreciated. Thanks! - Bill