+612 9045 4394
Essential ActionScript 2.0 : O'Reilly Ser. - Colin Moock

Essential ActionScript 2.0

O'Reilly Ser.

Paperback Published: 25th June 2004
ISBN: 9780596006525
Number Of Pages: 528

Share This Book:


RRP $63.95
Ships in 15 business days

In September 2003, Macromedia released Flash MX 2004, and with it, ActionScript 2.0, a dramatically improved version of Flash's programming language. ActionScript 2.0 introduces a formal object-oriented programming syntax and methodology for creating Flash applications. From a developer's perspective, the new OOP-based techniques in ActionScript 2.0 make applications more natural to plan and conceptualize, more stable, more reusable across projects, easier to maintain, change, and expand upon, and much more. In short, they enhance the entire development process.

In Essential ActionScript 2.0, bestselling author Colin Moock--one of the most universally respected developers in the Flash community--covers everything you'll need to know about the new ActionScript language and its methodologies for producing movies, animation, and applications on the web. Moock guides readers through this important new territory with his trademark easy-to-understand style and expertise. Moock's goal throughout the book is not just to get you to use object-oriented programming in your daily Flash work: he wants you to reap the benefits of OOP; he wants you to understand ActionScript 2.0 completely. And without question, Moock is the author who can make this happen.

Essential ActionScript 2.0 begins with a tour of the language, including the fundamentals of object-oriented concepts, syntax, and usage. Those who are new to OOP will learn the basics and how to apply their understanding. Those who are familiar with OOP will leverage their prior experience to learn about Flash-based OOP. The next part of the book shows how to structure entire applications with ActionScript 2.0, teaching you best practices and techniques to build scalable, extensible, stable apps. Next, you'll explore a variety of approaches to various programming situations by applying object-oriented programming strategies, known as design patterns, to Flash.

Experienced Flash developers and programmers coming from other languages will enjoy the sheer depth of Moocks's coverage and expertise in Essential ActionScript 2.0. Novice programmers will appreciate the frequent, low-jargon explanations that are often glossed over by advanced programming books. As usual, Moock guarantees quality and accuracy by working closely with Macromedia Flash engineers, including Rebecca Sun, lead developer of ActionScript 2.0.
Whether you're ready to make the move to ActionScript 2.0 now or simply assessing it for the future, you'll find everything you need to know within this book. Essential ActionScript 2.0 is the one book every ActionScript coder must own.

Forewordp. xi
Prefacep. xv
The ActionScript 2.0 Language
ActionScript 2.0 Overviewp. 3
ActionScript 2.0 Featuresp. 3
Features Introduced by Flash Player 7p. 5
Flash MX 2004 Version 2 Componentsp. 6
ActionScript 1.0 and 2.0 in Flash Player 6 and 7p. 8
Let's Go OOPp. 12
Object-Oriented ActionScriptp. 13
Procedural Programming and Object-Oriented Programmingp. 13
Key Object-Oriented Programming Conceptsp. 14
But How Do I Apply OOP?p. 19
On with the Show!p. 23
Datatypes and Type Checkingp. 24
Why Static Typing?p. 30
Type Syntaxp. 31
Compatible Typesp. 36
Built-in Dynamic Classesp. 40
Circumventing Type Checkingp. 41
Castingp. 45
Datatype Information for Built-in Classesp. 54
ActionScript 2.0 Type Checking Gotchasp. 55
Up Next: Creating Classes--Your Own Datatypes!p. 58
Classesp. 59
Defining Classesp. 59
Constructor Functions (Take 1)p. 64
Propertiesp. 65
Methodsp. 81
Constructor Functions (Take 2)p. 112
Completing the Box Classp. 119
Putting Theory into Practicep. 123
Authoring an ActionScript 2.0 Classp. 124
Class Authoring Quick Startp. 124
Designing the ImageViewer Classp. 125
ImageViewer Implementation (Take 1)p. 129
Using ImageViewer in a Moviep. 134
ImageViewer Implementation (Take 2)p. 138
ImageViewer Implementation (Take 3)p. 146
Back to the Classroomp. 157
Inheritancep. 158
A Primer on Inheritancep. 158
Subclasses as Subtypesp. 162
An OOP Chat Examplep. 163
Overriding Methods and Propertiesp. 166
Constructor Functions in Subclassesp. 193
Subclassing Built-in Classesp. 198
Augmenting Built-in Classes and Objectsp. 201
The Theory of Inheritancep. 202
Abstract and Final Classes Not Supportedp. 213
Let's Try Inheritancep. 214
Authoring an ActionScript 2.0 Subclassp. 215
Extending ImageViewer's Capabilitiesp. 215
The ImageViewerDeluxe Skeletonp. 216
Adding setPosition() and setSize() Methodsp. 217
Autosizing the Image Viewerp. 218
Using ImageViewerDeluxep. 223
Moving Right Alongp. 223
Interfacesp. 224
The Case for Interfacesp. 224
Interfaces and Multidatatype Classesp. 226
Interface Syntax and Usep. 227
Multiple Type Inheritance with Interfacesp. 232
Up Next, Packagesp. 236
Packagesp. 238
Package Syntaxp. 239
Defining Packagesp. 244
Package Access and the Classpathp. 245
Simulating Packages in ActionScript 1.0p. 248
Just a Little More Theoryp. 248
Exceptionsp. 249
The Exception-Handling Cyclep. 250
Handling Multiple Types of Exceptionsp. 255
Exception Bubblingp. 264
The finally Blockp. 268
Nested Exceptionsp. 271
Control Flow Changes in try/catch/finallyp. 275
Limitations of Exception Handling in ActionScript 2.0p. 277
From Concepts to Codep. 280
Application Development
An OOP Application Frameworkp. 283
The Basic Directory Structurep. 284
The Flash Document (.fla file)p. 284
The Classesp. 285
The Document Timelinep. 287
The Exported Flash Movie (.swf file)p. 289
Projects in Flash MX Professional 2004p. 290
Let's See It in Action!p. 290
Using Components with ActionScript 2.0p. 291
Currency Converter Application Overviewp. 291
Preparing the Flash Documentp. 292
The CurrencyConverter Classp. 295
Handling Component Eventsp. 308
Components Completep. 315
MovieClip Subclassesp. 316
The Duality of MovieClip Subclassesp. 317
Avatar: A MovieClip Subclass Examplep. 318
Avatar: The Composition Versionp. 326
Issues with Nested Assetsp. 327
A Note on MovieClip Sub-subclassesp. 330
Curiouser and Curiouserp. 331
Distributing Class Librariesp. 332
Sharing Class Source Filesp. 332
Sharing Classes Without Sharing Source Filesp. 338
Solving Real OOP Problemsp. 346
Design Pattern Examples in ActionScript 2.0
Introduction to Design Patternsp. 349
Bring on the Patternsp. 351
The Observer Design Patternp. 352
Implementing Observer in ActionScript 2.0p. 354
Logger: A Complete Observer Examplep. 360
Memory Management Issues with Observerp. 378
Beyond Observerp. 380
The Singleton Design Patternp. 381
Implementing Singleton in ActionScript 2.0p. 381
The Singleton Pattern in the Logger Classp. 383
Singleton Versus Class Methods and Class Propertiesp. 384
A Warning Against Singletons as Globalsp. 385
On to User Interfacesp. 385
The Model-View-Controller Design Patternp. 386
The General Architecture of MVCp. 388
A Generalized MVC Implementationp. 392
An MVC Clockp. 398
Further Explorationp. 421
The Delegation Event Modelp. 423
Structure and Participantsp. 423
The Flow of Logicp. 427
Core Implementationp. 427
NightSky: A Delegation Event Model Examplep. 432
Other Event Architectures in ActionScriptp. 442
From Some Place to Some OtherPlacep. 443
ActionScript 2.0 Language Quick Referencep. 447
Differences from ECMAScript Edition 4p. 478
Indexp. 481
Table of Contents provided by Ingram. All Rights Reserved.

ISBN: 9780596006525
ISBN-10: 0596006527
Series: O'Reilly Ser.
Audience: Professional
Format: Paperback
Language: English
Number Of Pages: 528
Published: 25th June 2004
Publisher: John Wiley & Sons Publishers
Country of Publication: US
Dimensions (cm): 22.86 x 17.78  x 2.54
Weight (kg): 0.75