Join Joseph Labrecque for an in-depth discussion in this video Loops, part of Learning ActionScript.
The concept of looping through code is tied closely to automation, and is a …structure that can both save time, and allow for more dynamic code implementation. …This lesson will examine different looping structures within AS three and …provide some examples of times you may wish to implement them. …So, we can see this example file here and right away we're declaring a private …variable flasharray and typing that to an array. …One of the useful things about array's since they are index based, they're very …easy to loop through and automate. In our constructor function.…
We're calling two other functions. The first one is buildstructures, which …is going to build the array for us. And after that is done, we will process structures. …Which is going to go through and do our looping. …So, scrolling down to these two functions here. …We can see that, within BuildStructures, we're setting FlashArray to a new array. …And then, where we could go through line by line and say newArray.push and push …
- What is ActionScript and why should I learn it?
- ActionScript 2.0 vs. ActionScript 3.0
- Implementing external source code
- Working in Flash Professional and Flash Builder
- Understanding language fundamentals
- Working with ActionScript objects