A-C > break

break

Syntax

break; 

Arguments

None.

Description

Action; appears within a loop (for, for..in, do...while or while). The break action instructs Flash to skip the rest of the loop body, stop the looping action, and execute the statement following the loop statement. Use the break action to break out of a series of nested loops.

Player

Flash 4 or later.

Example

The following example uses the break action to exit an otherwise infinite loop:

i = 0;
while (true) {
	if (i >= 100) {
		break;
	}
	i++;
}