User Guide
372 Chapter 6: ActionScript Core Classes
Constructor for the Number class
Availability
Flash Player 5.
Usage
new Number(value:Number) : Number
Parameters
value
The numeric value of the Number object being created or a value to be converted to
a number. The default value is 0 if
value is not provided.
Returns
A reference to a Number object.
Description
Constructor; creates a new Number object. You must use the Number constructor when using
Number.toString() and Number.valueOf(). You do not use a constructor when using the
properties of a Number object. The
new Number constructor is primarily used as a placeholder.
A Number object is not the same as the
Number() function that converts a parameter to a
primitive value.
Example
The following code constructs new Number objects:
var n1:Number = new Number(3.4);
var n2:Number = new Number(-10);
See also
Number()
Number.MAX_VALUE
Availability
Flash Player 5.
Usage
Number.MAX_VALUE:Number
Description
Property; the largest representable number (double-precision IEEE-754). This number is
approximately 1.79e+308.
Example
The following ActionScript writes the largest and smallest representable numbers to the log file.
trace("Number.MIN_VALUE = "+Number.MIN_VALUE);
trace("Number.MAX_VALUE = "+Number.MAX_VALUE);