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

Control Blocks

A statement is the “sentence” of coding; that is, it is the smallest unit of code that communicates a complete command to the ActionScript interpreter. There are two basic kinds of statements: standalone statements and control blocks. So far, you've seen standalone statements, such as x = 3 * 7;. A control block is a statement that can contain other statements.

There are two kinds of control blocks: looping (or iterative) and non-looping. The looping control blocks (while, do-while, for, and for-in) repeat the statements they contain until a condition is met. The non-looping control blocks (if-else, ifFrameLoaded, and with) execute the statements they contain just once.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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