Skip to Main Content
Essential ActionScript 3.0
book

Essential ActionScript 3.0

by Colin Moock
June 2007
Intermediate to advanced content levelIntermediate to advanced
948 pages
27h 2m
English
O'Reilly Media, Inc.
Content preview from Essential ActionScript 3.0

Chapter 10. Statements and Operators

This chapter provides a reference-style overview of ActionScript’s statements and operators—many of which we’ve already seen in this book. Rather than discussing each statement and operator in isolation, this book teaches the use of statements and operators in the context of other programming topics. Accordingly, this chapter lists many crossreferences to discussion and usage examples found elsewhere in this book. For information on operators not covered in this book, see Adobe’s ActionScript Language Reference.

Statements

Statements are one kind of directive, or basic program instruction, consisting of a keyword (command name reserved for use by the ActionScript language) and, typically, a supporting expression.

Table 10-1 lists ActionScript’s statements, their syntax, and purpose.

Table 10-1. ActionScript statements

Statement

Usage

Description

break

break

Aborts a loop or switch statement. See Chapter 2.

case

case expression:
  substatements

Identifies a statement to be executed conditionally in a switch statement. See Chapter 2.

continue

continue;

Skips the remaining statements in the current loop and begins the next iteration at the top of the loop. See Adobe documentation.

default

default:
  substatements

Identifies the statement(s) to execute in a switch statement when the test expression does not match any case clauses. See Chapter 2.

do-while

do {
  substatements
} while (expression);

A variation of a while loop that ensures at least one iteration ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Essential ActionScript 2.0

Essential ActionScript 2.0

Colin Moock
The ActionScript 3.0 Quick Reference Guide

The ActionScript 3.0 Quick Reference Guide

Jen deHaan, David Stiller, Darren Richardson, Rich Shupe
ActionScript 3.0 Cookbook

ActionScript 3.0 Cookbook

Joey Lott, Darron Schall, Keith Peters

Publisher Resources

ISBN: 0596526946Errata