03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

while (i < 10);<br />

In a for loop, continue causes the Flash interpreter to skip the rest of the loop body. In the<br />

following example, if the i modulo 3 equals 0, then the trace(i) statement is skipped:<br />

trace("example 3");<br />

for (var i = 0; i < 10; i++) {<br />

if (i % 3 == 0) {<br />

continue;<br />

}<br />

trace(i);<br />

}<br />

In the following for..in loop, continue causes the Flash interpreter to skip the rest of the<br />

loop body <strong>and</strong> jump back to the top of the loop, where the next value in the enumeration is<br />

processed:<br />

for (i in _root) {<br />

if (i == "$version") {<br />

continue;<br />

}<br />

trace(i);<br />

}<br />

See also<br />

do..while statement<br />

default statement<br />

default: statements<br />

Defines the default case for a switch statement. The statements execute if the expression<br />

parameter of the switch statement doesn't equal (using the strict equality [===] operation)<br />

any of the expression parameters that follow the case keywords for a given switch<br />

statement.<br />

A switch is not required to have a default case statement. A default case statement does<br />

not have to be last in the list. If you use a default statement outside a switch statement, it<br />

produces an error <strong>and</strong> the script doesn't compile.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Parameters<br />

statements:String - Any statements.<br />

204 <strong>ActionScript</strong> language elements

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!