EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE - Page 67

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...
continue 67
Example
In the following while loop, continue causes Flash Lite to skip the rest of the loop body and
jump to the top of the loop, where the condition is tested:
i = 0;
while (i < 10) {
if (i % 3 == 0) {
i++;
continue;
}
trace(i);
i++;
}
In the following do..while loop, continue causes Flash Lite to skip the rest of the loop body
and jump to the bottom of the loop, where the condition is tested:
i = 0;
do {
if (i % 3 == 0) {
i++;
continue;
}
trace(i);
i++;
} while (i < 10);
In a for loop, continue causes Flash Lite to skip the rest of the loop body. In the following
example, if
i modulo 3 equals 0, the trace(i) statement is skipped:
for (i = 0; i < 10; i++) {
if (i % 3 == 0) {
continue;
}
trace(i);
}
See also
do..while, for, while

Table of Contents

Related product manuals