
v
Table of Contents
Foreword
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xv
Part I. The ActionScript 2.0 Language
1. ActionScript 2.0 Overview
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
ActionScript 2.0 Features 3
Features Introduced by Flash Player 7 5
Flash MX 2004 Version 2 Components 6
ActionScript 1.0 and 2.0 in Flash Player 6 and 7 8
Let’s Go OOP 12
2. Object-Oriented ActionScript
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
Procedural Programming and Object-Oriented Programming 13
Key Object-Oriented Programming Concepts 14
But How Do I Apply OOP? 19
On with the Show! 23
3. Datatypes and Type Checking
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
Why Static Typing? 30
Type Syntax 31
Compatible Types 36
Built-in Dynamic Classes 40
Circumventing Type Checking 41
Casting 45
Datatype Information for Built-in Classes 54