User Guide
Number class 651
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()