Here are the first two paragraphs of Chapter 2 of Essential ActionScript 3.0.
2. Conditionals and Loops
In this chapter, we’ll depart from the general topics of classes and objects. Instead, we’ll focus, on two essential types of statements: conditionals and loops. Conditionals are used to add logic to a program, while loops are used to perform repetitive tasks. Both conditionals and loops are extremely common, and can be found in nearly every ActionScript program. Once we’ve finished with conditionals and loops, we’ll return to classes and objects, and continue developing our virtual zoo program.
This chapter presents all code examples outside the context of a functioning class or program. However, in a real program, conditionals and loops can be used within instance methods, constructor methods, static methods, functions, directly within class bodies or package bodies, and even outside package bodies.