Detailed instructions for use are in the User's Guide.
Using Flash
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp 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. Macromedia Flash 8 video is powered by On2 TrueMotion video technology. © 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com. Visual SourceSafe is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Copyright © 2005 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 written approval from Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Acknowledgments Project Management: Sheila McGinn Writing: Chris Bedford Managing Editor: Rosana Francescato Lead Editor: Lisa Stanziano Editing: Geta Carlson, John Hammett, Mary Kraemer, Noreen Maher, Mark Nigara, Lisa Stanziano Production Management: Patrice O'Neill, Kristin Conradi, Yuko Yagi Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman. John Francis, Geeta Karmarkar, Masayo Noda, Paul Rangel, Arena Reed, Mario Reynoso Special thanks to Jody Bleyle, Mary Burger, Lisa Friendly, Stephanie Gowin, Bonnie Loo, Mary Ann Walsh, Erick Vera, the beta testers, and the entire Flash and Flash Player engineering and QA teams. First Edition: September 2005 Macromedia, Inc. 601 Townsend St. San Francisco, CA 94103
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 About Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 About Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 What's new in Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Chapter 1: Working with Flash Documents . . . . . . . . . . . . . . . . . . 21 Creating or opening a document and setting properties . . . . . . . . . . . 22 Using document tabs for multiple documents . . . . . . . . . . . . . . . . . . . . 25 Saving Flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 About adding media content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 About creating motion and interactivity. . . . . . . . . . . . . . . . . . . . . . . . . . 29 About components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Managing media assets with the library. . . . . . . . . . . . . . . . . . . . . . . . . . . 31 About ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 About Multiple Timelines and levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 About nested movie clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Using absolute and relative target paths . . . . . . . . . . . . . . . . . . . . . . . . . 39 About scenes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Working with scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Using the Movie Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Using Find and Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Using the Undo, Redo, and Repeat menu commands . . . . . . . . . . . . . 53 Using the History panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Saving documents when you undo steps . . . . . . . . . . . . . . . . . . . . . . . . 58 Automating tasks with the Commands menu. . . . . . . . . . . . . . . . . . . . . 58 Creating custom keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 About customizing context menus in Flash documents . . . . . . . . . . . 62 About the links menu in Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Speeding up document display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Optimizing Flash documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Testing document download performance. . . . . . . . . . . . . . . . . . . . . . . 66 Printing from the Flash authoring tool . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3
Chapter 2: Working with Projects (Flash Professional Only) . . .69 Creating and managing projects (Flash Professional only) . . . . . . . . . 70 Using version control with projects (Flash Professional only) . . . . . . . 73 Troubleshooting remote folder setup (Flash Professional only) . . . . . 75 Chapter 3: Using Symbols, Instances, and Library Assets . . . . . 77 Types of symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 About 9-slice scaling and movie clip symbols . . . . . . . . . . . . . . . . . . . . 79 Editing movie clip symbols with 9-slice scaling . . . . . . . . . . . . . . . . . . . 80 Runtime bitmap caching movie clip and button symbols . . . . . . . . . . . 81 About controlling instances and symbols with ActionScript . . . . . . . . 82 Creating symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Creating instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Creating buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Enabling, editing, and testing buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Editing symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Changing instance properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Controlling instances with behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Creating custom behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Best practices for using behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Breaking apart instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101 Getting information about instances on the Stage. . . . . . . . . . . . . . . . 102 Copying library assets between documents . . . . . . . . . . . . . . . . . . . . . 103 Using shared library assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Resolving conflicts between library assets . . . . . . . . . . . . . . . . . . . . . . 108 Chapter 4: Working with Color, Strokes, and Fills . . . . . . . . . . . . 111 About the Color Mixer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 About creating gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 Using the Stroke Color and Fill Color controls in the Tools panel. . . .114 Using the Stroke Color and Fill Color controls in the Property inspector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115 Working with solid colors and gradient fills in the Color Mixer . . . . . . 117 Modifying strokes with the Ink Bottle tool . . . . . . . . . . . . . . . . . . . . . . . 120 Applying solid, gradient, and bitmap fills with the Paint Bucket tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Transforming gradient and bitmap fills . . . . . . . . . . . . . . . . . . . . . . . . . . .121 Copying strokes and fills with the Eyedropper tool . . . . . . . . . . . . . . . 124 Locking a gradient or bitmap to fill the Stage . . . . . . . . . . . . . . . . . . . . 124 Modifying color palettes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4
Contents
Chapter 5: Drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 About vector and bitmap graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 About Flash drawing models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 About Flash drawing and painting tools . . . . . . . . . . . . . . . . . . . . . . . . .133 Using the Object Drawing model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 Drawing with the Pencil tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136 Drawing straight lines, ovals, and rectangles . . . . . . . . . . . . . . . . . . . . . 137 Drawing polygons and stars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Using the Pen tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Painting with the Brush tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Reshaping lines and shape outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 Modifying shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 Snapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Specifying drawing settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154 Chapter 6: Working with Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 About FlashType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159 About Unicode text encoding in Flash applications . . . . . . . . . . . . . . .160 About font outlines and device fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Creating text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 Creating scrolling text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 Setting text attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 Creating font symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Editing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Checking spelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 About transforming text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Using Timeline effects with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Breaking text apart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Linking text to a URL (horizonta ...