• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Looping Statements

With looping statements, you can create an action or set of actions that repeat a certain number of times or while a certain condition holds true. Repeating actions are often used to build arrays, which are special kinds of variables that hold data in a structured, easily accessible way. The looping action makes sure that each piece of data is put in a particular order or retrieved in a particular order. You’ll learn more about arrays in Chapter 11.

In general, use looping statements to execute actions automatically a specific number of times by using an incremental variable. That incremental variable modifies the parameters of each successive method in the loop or modifies certain properties of objects that are created. You can generate intricate patterns by duplicating movie clips or dynamically drawing lines and shapes with looping statements. Use looping statements to change the properties of a whole series of movie clips, modify multiple sound settings, or alter the values of a set of variables.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint