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

Book

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

Description

  • Copyright 2003
  • Edition: 2nd
  • Book
  • 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

Downloads

Downloads

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



Preface.


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.


Index.

Preface

Preface

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.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020