int()
21
Example
The following example uses the
ifFrameLoaded
function to check if Frame 10 of the SWF
file is loaded. If the frame is loaded, the
trace()
command prints “frame number 10 is
loaded” to the Output panel. The output variable is also defined with a variable of
frame
loaded: 10
.
ifFrameLoaded(10) {
trace ("frame number 10 is loaded");
output = "frame loaded: 10";
}
See also
_framesloaded
int()
Availability
Flash Lite 1.0.
Usage
int(
value
)
Operands
value
A number or string to be truncated to an integer.
Description
Function; truncates a decimal number to an integer value.
Example
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
Содержание FLASH 8-FLASH
Страница 1: ...Flash Lite 1 x ActionScript Language Reference...
Страница 6: ...6 Contents...
Страница 46: ...46 Flash Lite Global Functions...
Страница 62: ...62 Flash Lite Properties...
Страница 76: ...76 Flash Lite Statements...
Страница 110: ...110 Flash Lite Operators...
Страница 162: ...162 Index...