Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Global Functions > int() | |||
Flash Lite 1.0.
int(value)
value A number or string to be truncated to an integer.
Function; truncates a decimal number to an integer value.
The following example truncates the numbers in the distance and myDistance variables:
distance = 6.04 - 3.96;
//trace ("distance = " add distance add " and rounded to:" add int(distance));
// Output: distance = 2.08 and rounded to: 2
myDistance = "3.8";
//trace ("myDistance = " add int(myDistance));
// Output: 3
|
|
|
|