ActionScript for Flash MX: The Definitive Guide (2nd Revised edition)

ActionScript for Flash MX: The Definitive Guide (2nd Revised edition)

By: Colin Moock (author)Paperback

1 - 2 weeks availability


ActionScript is Macromedia's programming language for Flash MX, the popular authoring tool for creating rich Internet applications and animations for the Web. With Macromedia's new focus on application development, ActionScript now includes a direct drawing API, loading of external MP3 and JPG files, improved sound control, an extensive set of text formatting tools, complete support for component development using movie clip subclasses, local data storage, accessibility features, and more. Thoroughly updated to cover the new version of Macromedia Flash - Flash MX - this second edition builds on the strengths of the original book while incorporating changes from this major revision of the software. Author Colin Moock, has added hundreds of new code examples to show new Flash MX techniques in the real world: how to draw circles, save data to disk, convert arrays to onscreen tables, create reusable components, and preload variables, XML, and sounds. The book's language reference alone has nearly doubled from the first edition, with more than 250 new classes, objects, methods, and properties. You'll find exhaustive coverage of dozens of undocumented, under-documented, and mis-documented features. Along with the new material, Colin Moock has revised the entire text to conform to Flash MX best-coding practices. In particular, objected-oriented programming and the new event model get special attention in light of changes to Flash MX ActionScript. From sending data between two movies to creating getter/setter properties, the new edition of this book demystifies the often-confusing new features of Flash MX, giving developers easy access to its powerful new capabilities. The book is structured so non-programmers can learn how to use ActionScript and programmers can enhance their skills.

Create a review

About Author

Colin Moock is an independent web guru with a passion for networked creativity and expression. He has been researching, designing, and developing for the Web since 1995. Colin served as webmaster for SoftQuad, Inc. (makers of HoTMetaL PRO) until 1997, and then as web evangelist for ICE (one of Canada's leading interactive agencies) until 2001. He has created interactive content for Sony, Levi's, Nortel, Air Canada, Procter & Gamble, and Hewlett-Packard. Colin now divides his time between writing, speaking at conferences, and researching emerging web technology. His award-winning Flash work and his renowned support site for Flash developers ( have made him a well-known personality in the Flash developer community. He is a contributor to's Flash developer center, a tutorialist in the Flash MX Bible (2002, Wiley Publishing Inc.), and regularly appears in industry magazines such as cre@te! online. Colin's latest personal undertaking is Unity (, a Flash socket server for multi-user content.


Foreword Preface Part I. ActionScript Fundamentals 1. A Gentle Introduction for Nonprogrammers Some Basic Phrases Further ActionScript Concepts Building a Multiple-Choice Quiz 2. Variables Creating Variables (Declaration) Assigning Values to Variables Changing and Retrieving Variable Values Types of Values Variable Scope Loading External Variables Some Applied Examples 3. Data and Datatypes Data Versus Information Retaining Meaning with Datatypes Creating and Categorizing Data Datatype Conversion Primitive Data Versus Composite Data Copying, Comparing, and Passing Data 4. Primitive Datatypes The Number Type Integers and Floating-Point Numbers Numeric Literals Working with Numbers The String Type Working with Strings The Boolean Type Undefined Null 5. Operators General Features of Operators The Assignment Operator Arithmetic Operators The Equality and Inequality Operators The Strict Equality and Inequality Operators The Comparison Operators The Flash 4 String Operators The Logical Operators The Grouping Operator The Comma Operator The void Operator Other Operators 6. Statements Types of Statements Statement Syntax The ActionScript Statements Statements Versus Actions 7. Conditionals The if Statement The else Statement The else if Statement The switch Statement Compact Conditional Syntax 8. Loop Statements The while Loop Loop Terminology The do-while Loop The for Loop The for-in Loop Stopping a Loop Prematurely Timeline and Clip Event Loops An Alternative to Timeline Loops:setInterval( ) 9. Functions Creating Functions Running Functions Passing Information to Functions Exiting and Returning Values from unctions Function Literals Function Availability and Life Span Function Scope Function Parameters Revisited Recursive Functions Nested Functions Built-in Functions Functions as Objects Centralizing Code The Multiple-Choice Quiz Revisited 10. Events and Event Handling Synchronous Code Execution Event-Based Asynchronous Code Execution Types of Events Event Handling Event Handler Properties Listener Events Flash 5's on( ) and onClipEvent( ) Handlers Event Handler Lifespan Event Handler Scope Values of the this Keyword Flash 5-style onClipEvent( ) Order of Execution Copying Movie Clip Event Handlers Refreshing the Screen with updateAfterEvent( ) Code Reusability Dynamic Movie Clip Event Handlers Event Handlers Applied 11. Arrays What Is an Array? The Anatomy of an Array Creating Arrays Referencing Array Elements Determining the Size of an Array Named Array Elements Adding Elements to an Array Removing Elements from an Array General Array-Manipulation Tools Arrays as Objects Multidimensional Arrays The Multiple-Choice Quiz, Take 3 12. Objects and Classes The Anatomy of an Object Instantiating Objects Object Properties Object Methods Classes and Object-Oriented Programming Using Standalone Object Instances as ssociative Arrays The Almighty Prototype Chain Built-in ActionScript Classes and Objects OOP Quick Reference Further Topics Simulating Namespaces The Multiple-Choice Quiz, OOP Style 13. Movie Clips The "Objectness" of Movie Clips Types of Movie Clips Creating Movie Clips Movie and Instance Stacking Order Referring to Instances and Main Movies Method Versus Global unction Overlap Issues Drawing in a Movie Clip at Runtime Using Movie Clips as Buttons Input Focus and Movie Clips Building a Clock with Clips 14. Movie Clip Subclasses and Components Creating the Library Symbol Creating and Invoking the Subclass Constructor Assigning the MovieClip Superclass Packaging Subclass Code and Library Symbols Together Making Movie Clip Components MovieClip Sub-Subclasses Summary 15. Lexical Structure Whitespace Statement Terminators (Semicolons) Comments Reserved Words Identifiers Case Sensitivity 16. ActionScript Authoring environment The Actions Panel Adding Scripts to Frames Adding Scripts to Buttons Adding Scripts to Movie Clips Where's All the Code? Productivity Externalizing ActionScript Code Defining Components 17. Building a Flash Form The Flash Form Data Cycle Creating a Flash Fill-in Form Part II. Language Reference ActionScript Language Reference Global Functions Global Properties Built-in Classes and Objects Entry Headings Alphabetical Language Reference Part III. Appendixes A. Resources B. Latin 1 Character Repertoire and Keycodes C. Backward ompatibility and Player Build Updates D. Differences from ECMA-262 and JavaScript E. HTML Support in Text Fields F. Support for GET and POST G. Flash UI Component Summary H. Embedding a Flash Movie in a Web Page Index

Product Details

  • publication date: 10/01/2003
  • ISBN13: 9780596003968
  • Format: Paperback
  • Number Of Pages: 1050
  • ID: 9780596003968
  • weight: 1326
  • ISBN10: 059600396X
  • edition: 2nd Revised edition

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly