Example
The following example shows how
multiple lines.
var myName:String = "Lisa", myAge:Number = 30;
trace(myName+myAge);
trace("-----");
trace(myName+newline+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
data type.
Availability: ActionScript 1.0; Flash Player 5
Example
The following example checks the first six values of an indexed array and outputs a message if
no value is set (if the value ==
var testArray:Array = new Array();
testArray[0] = "fee";
testArray[1] = "fi";
testArray[4] = "foo";
for (i = 0; i < 6; i++) {
if (testArray[i] == null) {
trace("testArray[" + i + "] == null");
}
}
The output is the following:
testArray[2] == null
testArray[3] == null
testArray[5] == null
newline
to represent values that are missing or that do not have a defined
null
):
null
displays output from the
statement on
trace()
Constants
37
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?