Monday, September 06, 2010

Adobe Flex For The OI Guy – Part 4 – Loops

Adobe Flex Icon                  OpenInsight Icon

In this edition of "Adobe Flex for the OI Guy", we will discuss Actionsscript loops and how they compare to OpenInsight's loops.  First I will give you some links for you to review Actionscript loops, then I will go into detail on how it differs from OpenInsight's Basic +.

For you to review Actionscript loops, visit here. This will give you a good overview of what loops are all about.

Actionscript your OI

The For Loop statement

In OpenInsight:

In Actionscript

Notice in the Actionscript example, the set up is a bit different. We set "i" to 0 and set "z" to 10. The second part of the For loop setup is the condition for when the loop runs. In this case the loop runs until "i" is greater than or equal to "z". Finally, the third part of the setup is how we increment "i". In this example, "i" is incremented by 1 each loop (i++).

The Loop statement

In OpenInsight:

Until

While

In ActionScript:

While

Do While

There are other loops in ActionScript, however the scope of these articles is a comparison of OpenInsight's Basic + and Adobe's ActionScript. Next week, Functions!

Leave a Reply