Home | Contact Us | Store

Flash ActionScript 3 For Loop Statement Tutorial

Looping statements are very powerful in all computer languages. It allows the program to perform some specific tasks repeatedly.

The for loop is the most commonly used loop statement in Flash ActionScript. It allows the program to iterate through a variable for a specific range of values. Three expressions are required in a for statement:

- a variable set to an initial value,

- a conditional determines when the looping ends, and

- an expression changes the value of the variable with each loop.

Structure of a For Loop Statement:

The For Loop Statement using in Flash ActionScript is explained in the following diagram:

Flash ActionScript For Loop Statement

The following is a typical and practical example of a for loop statement:

Flash ActionScript For Loop Statement Example

Remarks:

This Flash ActionScript tutorial provide an introduction of a For Loop statement.

Flash ActionScript For Loop Statement Tutorial