N-R > Number (function)
Number (function)Syntax
Number(
expression
);
Arguments
expression
The string, Boolean, or other expression to convert to a number.
Description
Function; converts the argument x
to a number and returns a value as follows:
If x
is a number, the return value is x
.
If x
is a Boolean, the return value is 1 if x
is true
, 0 if x
is false
.
If x
is a string, the function attempts to parse x
as a decimal number with an optional trailing exponent, that is, 1.57505e-3.
If x
is undefined, the return value is 0.
This function is used to convert Flash 4 files containing deprecated operators that are imported into the Flash 5 authoring environment. See the &
operator for more information.
Player
Flash 4 or later.
See also
Number (object)