Number()
Availability
Flash Lite 1.0.
Usage
Number(expression)
Operands
An expression to convert to a number.
expression
Description
Function; converts the parameter
the following list:
If
is a number, the return value is
expression
If
is a Boolean value, the return value is 1 if
expression
is
expression
false
If
is a string, the function attempts to parse
expression
number with an optional trailing exponent (that is, 1.57505e-3).
If
is
expression
Example
The following example converts the string in the
number in the
myNumber
. The final line shows the result when you call
myResult
myString = "55";
myNumber = Number(myString);
myResult = myNumber + 5;
trace (myResult); // Output: 60
trace (Number(true));// Output: 1
32
Flash Lite Global Functions
expression
.
, the return value is -1.
undefined
variable, adds 5 to the number, and stores the result in the variable
to a number and returns a value as described in
.
expression
expression
expression
variable to a number, stores the
myString
on a Boolean value.
Number()
is
; 0 if
true
as a decimal
Need help?
Do you have a question about the FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers