Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

Flash ActionScript 3 Tutorial: Line Break in Text Field

Sometimes you may require to insert line break and paragraph break in Text Field of Flash Movie for better presentation. This Flash ActionScript tutorial shows how to do it.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

Sometimes you may wonder how to add line break or paragraph to the Text Field. The most easiest way is to use HTML tag, i.e. <BR> and <P>.

The complete Flash Movie is shown as above, you may try how it works before you start this Flash ActionScript tutorial.

Flash ActionScript Codes:

//Set the multiline parameter of the Text Field to true
//The <br> tag creates a line break in the Text Field.
//Must set the text field to be a multiline Text Field to use this tag.
output_txt.multiline = true;


//Allow HTML Property of the TextField
output_txt.htmlText = "This is the 1st line." + "<br>" +
"This is the 2nd line." + "<br>" +
"This is the 3rd line.";

Download Flash Source File:

Flash Source File using-line-break-in-textfield.fla


This Flash ActionScript tutorial shows how to insert line break and paragraph break in Text Field.