MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 371

Actionscript language reference
Table of Contents

Advertisement

Number class
Availability
Flash Player 5 (became a native object in Flash Player 6, which improved
performance significantly).
Description
The Number class is a simple wrapper object for the Number data type. You can manipulate
primitive numeric values by using the methods and properties associated with the Number class.
This class is identical to the JavaScript Number class.
To call the Number class methods, you must first use the constructor to create an instance of the
Number class. The properties of the Number class, however, are static, which means you do not
need an object to use them, so you do not need to use the constructor.
The following example calls the
string
:
1234
var myNumber:Number = new Number(1234);
myNumber.toString();
The following example assigns the value of the
the use of the constructor:
var smallest:Number = Number.MIN_VALUE;
Method summary for the Number class
Method
Number.toString()
Number.valueOf()
Property summary for the Number class
The properties in the following table are constants:
Property
Number.MAX_VALUE
Number.MIN_VALUE
Number.NaN
Number.NEGATIVE_INFINITY
Number.POSITIVE_INFINITY
method of the Number class, which returns the
toString()
MIN_VALUE
Description
Returns the string representation of a Number object.
Returns the primitive value of a Number object.
Description
The largest representable number (double-precision IEEE-754). This
number is approximately 1.79E+308.
The smallest representable number (double-precision IEEE-754).
This number is approximately 5e-324.
The value for Not a Number (
The value for negative infinity.
The value for positive infinity. This value is the same as the global
variable
.
Infinity
ActionScript Core Classes
property to a variable declared without
).
NaN
Number class
CHAPTER 6
371

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents