User Guide
Constants 35
Constants
A constant is a variable used to represent a property whose value never changes. This section
describes global constants that are available to every script.
Constants summary
false constant
A unique Boolean value that represents the opposite of true.
When automatic data typing converts
false to a number, it becomes 0; when it converts
false to a string, it becomes "false".
Availability: ActionScript 1.0; Flash Player 5
Example
This example shows how automatic data typing converts
false to a number and to a string:
var bool1:Boolean = Boolean(false);
// converts it to the number 0
trace(1 + bool1); // outputs 1
Modifiers Constant Description
false A unique Boolean value that represents the opposite
of true.
Infinity Specifies the IEEE-754 value representing positive
infinity.
-Infinity Specifies the IEEE-754 value representing negative
infinity.
NaN A predefined variable with the IEEE-754 value for
NaN (not a number).
newline Inserts a carriage return character (\r) that generates
a blank line in text output generated by your code.
null A special value that can be assigned to variables or
returned by a function if no data was provided.
true A unique Boolean value that represents the opposite
of false.
undefined A special value, usually used to indicate that a
variable has not yet been assigned a value.