Constants
29
newline constant
Inserts a carriage return character (
\r
) 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.
Availability:
ActionScript 1.0; Flash Lite 1.1
Example
The following example shows how
newline
displays output from the
trace()
statement on
multiple lines.
var myName:String = "Lisa", myAge:Number = 30;
trace(myAge);
trace("-----");
trace(myAge);
// output:
Lisa30
-----
Lisa
30
See also
trace function
null constant
A special value that can be assigned to variables or returned by a function if no data was
provided. You can use
null
to represent values that are missing or that do not have a defined
data type.
Availability:
ActionScript 1.0; Flash Lite 1.1
Example
In a numeric context,
null
evaluates to 0. Equality tests can be performed with
null
. In this
statement, a binary tree node has no left child, so the field for its left child could be set to
null
.
if (tree.left == null) {
tree.left = new TreeNode();
}
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...