Number constructor

public Number(num:Object)

Creates a new 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.

Availability: ActionScript 1.0; Flash Lite 2.0

Parameters

num:Object - 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.

Example

The following code constructs new Number objects:

var n1:Number = new Number(3.4);
var n2:Number = new Number(-10);

See also

toString (Number.toString method), valueOf (Number.valueOf method)