We help IT Professionals succeed at work.

multiline text box in flash as3

Hi all. I have a text box that fills dynamically with quiz questions from an array. However the text doesn't automatically go down to the next line when it reaches the edge of the box it just continues off the edge of the stage. what i need to know how to do is to get the text to jump down onto the next line when with width dimension of the text box is filled. my as3 code is bellow here for the text box


 //create and position the textfield (question):
            questionField = new TextField();
            questionField.text = question;
   
            questionField.width = 476.05;
                  questionField.height = 50.00;
                  questionField.x = questionX;
            questionField.y = questionY;
                  questionField.setTextFormat(format);
            addChild(questionField);
Comment
Watch Question

Commented:
You probably need to set the multiline and wordWrap properties of the textField to true...

CyanBlue

Author

Commented:
Very helpful. I had tried this before and not got it working. then realised i hadn't adjusted the text field size to accommodate the extra space!