Home > Store

Advanced Macromedia Flash MX: ActionScript in Action, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Advanced Macromedia Flash MX: ActionScript in Action, 2nd Edition

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2003
  • Edition: 2nd
  • Premium Website
  • ISBN-10: 0-13-038460-7
  • ISBN-13: 978-0-13-038460-7

  • Deliver robust, high-performance applications with Macromedia Flash MX and ActionScript!
  • Build complete Web apps, e-commerce front-ends, and games-step by step
  • Leverage Flash MX components, digital video, and other powerful new features
  • Use XML structured data in your Flash applications
  • Learn hands-on, through dozens of expert examples
  • All of the book's Flash movies and ActionScript code available on companion Web site

Make the most of Flash MX and ActionScript, as you build advanced Web applications, e-commerce front ends, and games—hands-on, one step at a time! Through dozens of professional-quality examples, authors Dan Livingston and Carlos Justiniano illuminate the breakthrough features of Macromedia Flash MX, from components to digital video to XML, and beyond. Every ActionScript code example, every source file, and every movie is available on the book's companion Web site, www.phptr.com/advancedweb/flashmx/ . ActionScript has never been this easy—and Flash has never been this powerful!

Do more with Flash MX than ever before!

  • Create effective user forms with Flash MX Components
  • Embed MPG, AVI, and QuickTime directly in your Flash movies
  • Make the most of ActionScript's latest enhancements
  • Deliver a richer user experience with dynamically downloadable JPGs and sounds
  • Integrate Flash with XML
  • Build state-of-the-art Web and e-commerce applications
  • Construct a complete Flash game, start to finish
  • Learn about expanded object and event handler models



Download the book examples

Sample Content

Online Sample Chapters

Introduction to ActionScript

Your First ActionScripts

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130384607.pdf

Table of Contents


1. Introduction to ActionScript.

What Is ActionScript? What Is ActionScript Good For? What ActionScript Can't Do. Variables. Objects and Object-Oriented Scripting. Creating a Class. Object and Frame Actions. Object Actions-Movie Clips. Object Actions-Buttons. Frame Actions. Dot Syntax. Properties. Methods. Events and Event Handlers. Functions. Conclusion.

2. What's New in Flash MX.

New Design Stuff. The Panels. Distribute to Layers. Templates. Shared Libraries. Timeline Easier to Use. Font Substitution. Pixel Snapping. Importing Video. New ActionScript. Button Object. Components. Dynamic Loading: JPEG and MP3. Code Breakpoints. Miscellaneous ActionScript Additions. New Objects. New Methods. New Properties. Event Handlers. Actions, Operators, and Stragglers. Editor Customization.

3. Your First ActionScripts.

Using the Actions Panels. The Panels. Normal Mode Versus Expert Mode. Moving from Scene to Scene. Comments. on(event). Messing with Movie Clips. if and hitTest. Changing Movie Clip Properties. onClipEvent(keyDown). if (Key.getCode() = = Key.LEFT). _x. alphaBounds = alphaBar.getBounds(_root). Global Variables. Positioning the Slider. Making the Slider Slide. A Note About _xscale and _yscale. A Challenge. Another Property-Changing Example. Text Fields, Arrays, and Loops. Text Fields. Arrays. Looping. Creating the Movie. Associative Arrays. What You've Learned.

4. Button and Mouse Objects.

Button Overview. Button Properties. Button Event Handlers. Buttons and Some Complex Scripting. Mouse Object. Hiding and Showing the Cursor. Mouse Event Handlers and Object Listeners.

5. Adding Power to ActionScripts.

Honing Your Skills. Troubleshooting. Space Game. Power Handling Movie Clips. Background-Levels. Duplicating Movie Clips. Removing Movie Clips. Duplicating with Purpose. Loading Movies. Attaching Movie Clips. Movie Explorer. Conclusion.

6. Text Field and Selection Objects.

Text Field Overview. Creating Text Fields. Text Styles.

7. Using Components.

What Components Are. Why Use Components? Creating Components. Radio Buttons. Push Buttons. Combo Box. List Box. Scroll Pane. Scrollbar. Creating Components in ActionScript. Scroll Pane. Dropdown Menus. List Box. Scrollbar. Reading Data from Components. Reading Check Boxes. Combo Box. List Box. Manipulating Components. Disabling Components. More Dropdowns. Component Styles.

8. Advanced OOP.

Why OOP? Objects, Objects Everywhere. Differences in OOPs. The Zen of ActionScript. A Classic OOP Example. Conclusion.

9. Building Flash MX Components.

Tying It All Together. Components Revealed! Building Your Own Components. What Time Is It? It's Test Drive Time! Cleanup. Enhancements and Packaging. Adding a Custom Icon. Including Information About Our Component. Packaging Our Component for Distribution. Welcome to the Big Time!

10. Extending ActionScript.

Extending Objects. OOP Extensions. Text Encryption. Extending the Date Object. Extending Your Environment. Packaging Your Extensions. Conclusion.

11. Serious Interactivity.

Linking to the Outside World. Transparent Buttons. Calling JavaScript Using getURL. Receiving Data. Sending Variables with loadVariables. Formatting the Variables so Flash Can Read Them. The LoadVars Object. Sending and Receiving Information. Streaming Data. FSCommand. Controlling the Standalone Flash Player. Conclusion.

12. Flash and XML.

What Is XML? How Is This Done? The XML Object. The Screenplay Example. Creating XML. Creating the Object. Creating the Authors. Creating the Characters. The Whole Thing. The XMLSocket Object. Conclusion.

13. Debugging.

Debugging? A Coder's Best Friend. Object Section. Data Inspection. Method Call Stack. Debug Actions. Code Window. Other Tools. The trace() Method. Bandwidth Profiler. List Objects and List Variables. Beware of ActionScript. Fixing Bugs. Avoiding Bugs. Clean, Clear Code. Other Debugging Tips. Conclusion.

14. Importing Video and Loading JPEGs and Sounds.

Importing Video. Sorenson. Compression. Using the Sorenson Codec to Your Advantage. Linked Video. Loading an Image or Sound Dynamically.

15. Drawing from ActionScript.

Straight Lines. Shapes. Curves. Dynamic Curves. Gradients. Color. Alpha. Ratios. Matrix.

Appendix A. ActionScript Reference.




We've written a few books on some pretty fun topics (Flash 5, JavaScript, DHTML and PhotoShop), but we had a great time writing this book—Macromedia Flash MX is a hoot. Flash MX can do some pretty amazing things, and it's great to see ActionScript filling out as a serious scripting language. We hope we've been able to show you some of these things well enough to get you excited, too.

The Goal of This Book

When you're through with this book, you should have a thorough grasp of what Flash MX and ActionScript can do, and know how to create a wide diversity of really engaging, fun, and useful interactive Flash movies. We're talking fantastic navigation, awesome games, and industrial-strength, robust applications.

Hopefully, given the foundation you'll get in this book, you'll be able to create new kinds of Flash movies that no one else has thought of.

The focus of this book is more technical than artistic, but we believe it provides a good springboard for programmers, animators, and artists alike.

Who This Book Is For

This book is for anyone who wants to include any level of complexity and interaction in their Flash movies. This can include navigation, games, and interaction with middleware and databases. You can be a right-brained Flash designer who's making the reluctant leap into ActionScript or a seasoned, left-brained programmer who wants to create a custom interface to a backend e-commerce or communications system.

To get the most out of this book, you should already know some Flash basics:

  • drawing
  • tweening
  • creating symbols
  • creating buttons

That's it. If you know how to do these things at all, then you're ready for this book.

How This Book Teaches

Both of Dan's parents were teachers, and they shared the same philosophy. "There are three ways to teach," they said, "example, example, example." We think they're right on this one, and this book uses complete, fully functional examples for every aspect of interactivity and ActionScript in this book. All examples can be found on the accompanying Web sites at www.phptr.com/advancedweb/flashmx/ and www.wire-man.com/flashmx/

We've tried to avoid using overly simple squares and circles to explain concepts (we mostly succeeded). Instead, we'll ask you to load small movies and manipulate them. You will see a number of examples using Jake the Fish, and we hope you'll forgive our small indulgence-it's the only way Dan can put his marine zoology degree to use.


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership