Statement |
Syntax |
Use |
break |
break;
|
Cancels a loop |
call |
call (frame);
|
Executes the script on a remote frame |
continue |
continue;
|
Restarts the current loop |
do-while |
do {
statements
} while (expression);
|
A variation of a while loop |
empty
statement |
;
|
Holds a place where a statement is expected, and used with
evaluate in novice mode |
for |
for (init; test; increment) {
statements
}
|
Executes some code repetitively (a for loop) |
for-in |
for (property in object) {
statements
}
|
Enumerates the properties of an object |
function |
function name(parameters) {
statements
}
|
Declares a function |
if-else if-else |
if (expression) {
statements
} else if (expression) {
statements
} else {
statements
}
|
Executes some code based on a condition or a series of conditions |
ifFrameLoaded |
ifFrameLoaded (frame) {
statements
}
|
Executes some code if a certain frame has loaded; deprecated in Flash
5 |
return |
return;
return expression;
|
Exits a function or returns a value from a function |
set |
set (variable, value);
|
Assigns a value to a dynamically named variable |
var |
var variableName;
var variableName = expression;
|
Declares and optionally initializes a variable |
while |
while (expression) {
statements
}
|
Executes some code repetitively (a while loop) |
with |
with (objectName) {
statements
}
|
Executes some code in the context of a given object |