User Guide

186 Chapter 5: ActionScript Core Language Elements
newline
Availability
Flash Player 4.
Usage
newline
Parameters
None.
Returns
Nothing.
Description
Constant; inserts a carriage return character (\n) that generates a blank line in text output
generated by your code. Use
newline to make space for information that is retrieved by a
function or statement in your code.
Example
The following example shows how newline writes output from the trace() statement on
multiple lines.
var myName:String = "Lisa", myAge:Number = 30;
trace(myName+myAge);
trace("-----");
trace(myName+newline+myAge);
/* output:
Lisa30
-----
Lisa
30
*/
CHAPTER 5
ActionScript Core Language Elements