EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE - Int()

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE
162 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Related product manuals