Detailed instructions for use are in the User's Guide.
Using Flash
Trademarks Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware, Authorware Star, Backstage, Bright Tiger, Clustercats, ColdFusion, Contribute, Design In Motion, Director, Dream Templates, Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Flash Lite, Flex, Fontographer, FreeHand, Generator, HomeSite, JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Knowledge Track, LikeMinds, Lingo, Live Effects, MacRecorder Logo and Design, Macromedia, Macromedia Action!, Macromedia Breeze, Macromedia Flash, Macromedia M Logo and Design, Macromedia Spectra, Macromedia xRes Logo and Design, MacroModel, Made with Macromedia, Made with Macromedia Logo and Design, MAGIC Logo and Design, Mediamaker, Movie Critic, Open Sesame!, Roundtrip, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and Xtra are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com). SorensonTM SparkTM video compression and decompression technology licensed from Sorenson Media, Inc.
Opera ® browser Copyright © 1995-2002 Opera Software ASA and its suppliers. All rights reserved. Apple Disclaimer APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE. Copyright © 2004 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc. Acknowledgments Director: Erick Vera Project Management: Julee Burdekin, Erick Vera Writing: Jay Armstrong, Jody Bleyle, Mary Burger, Francis Cheng, Jen deHaan, Stephanie Gowin, Phillip Heinz, Shimul Rahim, Samuel R. Neff Managing Editor: Rosana Francescato Editing: Mary Ferguson, Mary Kraemer, Noreen Maher, Antonio Padial, Lisa Stanziano, Anne Szabla Production Management: Patrice O'Neill Media Design and Production: Adam Barnett, Christopher Basmajian, Aaron Begley, John Francis Second Edition: June 2004 Macromedia, Inc. 600 Townsend St. San Francisco, CA 94103
CONTENTS
CHAPTER 1: Working with Flash Documents .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Creating or opening a document and setting properties. . . . . . . . . . . . . . . . . . . . . 12 Using document tabs for multiple documents (Windows only) . . . . . . . . . . . . . . . 14 Saving Flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 About adding media content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 About creating motion and interactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 About components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Using the library to manage media assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 About ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Multiple Timelines and levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Nested movie clips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Using absolute and relative target paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Working with scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Using the Movie Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Using Find and Replace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Using the Undo, Redo, and Repeat menu commands . . . . . . . . . . . . . . . . . . . . . . 34 Using the History panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Saving documents when you undo steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Automating tasks with the Commands menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 About customizing context menus in Flash documents . . . . . . . . . . . . . . . . . . . . . 39 About the links menu in Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Speeding up document display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Optimizing Flash documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Testing document download performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Printing from the Flash authoring tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
CHAPTER 2: Working with Projects (Flash Professional Only)
. . . . . . . . . . . . . . 45
Creating and managing projects (Flash Professional only) . . . . . . . . . . . . . . . . . . . 46 Using version control with projects (Flash Professional only). . . . . . . . . . . . . . . . . 49 Troubleshooting remote folder setup (Flash Professional only). . . . . . . . . . . . . . . . 51
3
CHAPTER 3: Using Symbols, Instances, and Library Assets
. . . . . . . . . . . . . . . . 53
Types of symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 About controlling instances and symbols with ActionScript. . . . . . . . . . . . . . . . . . 55 Creating symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Creating instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Creating buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Enabling, editing, and testing buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Editing symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Changing instance properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Controlling instances with behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Breaking apart instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Getting information about instances on the Stage . . . . . . . . . . . . . . . . . . . . . . . . 67 Copying library assets between documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Using shared library assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Resolving conflicts between library assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
CHAPTER 4: Working with Color
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using the Stroke Color and Fill Color controls in the Tools panel . . . . . . . . . . . . . 76 Using the Stroke Color and Fill Color controls in the Property inspector . . . . . . . 76 Working with solid colors and gradient fills in the Color Mixer. . . . . . . . . . . . . . . 77 Modifying strokes with the Ink Bottle tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Applying solid, gradient, and bitmap fills with the Paint Bucket tool. . . . . . . . . . . 79 Transforming gradient and bitmap fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Copying strokes and fills with the Eyedropper tool . . . . . . . . . . . . . . . . . . . . . . . . 81 Locking a gradient or bitmap to fill the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Modifying color palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
CHAPTER 5: Drawing . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
About vector and bitmap graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Flash drawing and painting tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 About overlapping shapes in Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Drawing with the Pencil tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Drawing straight lines, ovals, and rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Drawing polygons and stars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Using the Pen tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Painting with the Brush tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Reshaping lines and shape outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Modifying shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Snapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Specifying drawing settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4
Contents
CHAPTER 6: Working with Text
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
About Unicode text encoding in Flash applications . . . . . . . . . . . . . . . . . . . . . . . 107 About font outlines and device fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Creating text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Creating scrolling text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Setting text attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Creating font symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Editing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Checking spelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 About transforming text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Using Timeline effects with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Breaking text apart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Linking text to a URL (horizontal text only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Preserving rich text formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Substituting missing fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Controlling text with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Creating scrolling text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
CHAPTER 7: Using Imported Artwork.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Placing artwork into Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Working wit ...