AS textField help

  • Started
  • Last post
  • 1 Response
  • skelly_b

    why doesn't this work? Help please I have been hitting my head against the wall for hours now.

    drawTextBox (_root, "testText", 1, 20, 100, 150, 50, "IT WORKS!", 20, true, "0x777777", "left");

    function drawTextBox (parent, boxName, dep, x, y, w, h, txt, si, bo, col, al){
    parent.createTextField(boxName, dep, x, y, w, h);

    //textFormat properties
    var tf = new TextFormat();
    tf.align = al;
    tf.bold = bo;
    tf.color = col;
    tf.font = "Futura";
    tf.size = si;

    //textField properties
    parent[boxName].multiline = true;
    parent[boxName].wordWrap = true;
    parent[boxName].selectable = false;
    parent[boxName].embedFonts = true;
    parent[boxName].text = txt;
    parent[boxName].setTextFormat(tf...
    }

  • skelly_b0

    To clarify I need a function that creates a dynamic textField. Eventually this will frop into a for loop. If put all the create the text in the loop it works without a problem. With this function I get nothing.