do...while
Previous  Top  Next

Syntax
do {
   statements;
} while (condition);

Arguments
statements: The statements that are to be executed while the condition is true.
condition: An expression that evaluates to a boolean value.

Returns
Nothing.

Description
This Action executes at least once and repeats while the condition remains true.

Sample
onLoad () {
   a = 1;
   do {
      trace(a);
   } while (a++ < 5);
}

The above example writes the numbers 1 2 3 4 5 to the 'Debug' window.

See Also
while and for.