ptg Legal Notice: Peachpit Press makes no warranty or representation, either express or implied, with respect to this software, its quality, performance, merchantability, or fi tness for a particular purpose. In no event will Peachpit Press, its distributors, or dealers be liable for direct, indirect, special, incidental or consequential damages arising out of the use or inability to use the software. The exclusion of implied warranties is not permitted in some states. Therefore, the above exclusion may not apply to you. This warranty provides you with specifi c legal rights. There may be other rights that you may have that vary from state to state. The software and media fi les are copyrighted by the authors and Peachpit Press. You have the non-exclusive right to use these programs and fi les. You may use them on one computer at a time. You may not distribute the URL to third parties or redistribute the fi les over a network. You may transfer the fi les onto a single hard disk so long as you can prove ownership of this eBook. You may not reverse engineer, decompile, or disassemble the software or media fi les. You may not modify or translate the software or media, or distribute copies of the software or media without the written consent of Peachpit Press. Thank you for purchasing this digital version of: The print version of this title comes with a disc of lesson fi les. As an eBook reader, you have access to these fi les by following the steps below: 1. On your PC or Mac, open a web browser and go to this URL: 2. Download the ZIP fi le (or fi les) from the web site to your hard drive. 3. Unzip the fi les and follow the directions for use in the Read Me included in the download. Please note that many of our lesson materials can be very large, especially image and video fi les. You will be able to see the size of any fi le for download once you reach the URL listed above. If you are unable to locate the fi les for this title by following the steps above, please email ask@peachpit.com and supply the URL from step one. Our customer service representatives will assist you as soon as possible. WHERE ARE THE LESSON FILES? Download from Library of Wow! ebook Adobe Flash Professional CS5 Classroom in a Book http://www.peachpit.com/ebookfiles/032171332X ptg Download from Library of Wow! ebook ptg www.adobepress.com ADOBE ® FLASH ® PrOFESSiOnAL CS5 classroom in a book ® e ocial training workbook from Adobe Systems Download from Library of Wow! ebook ptg Adobe Flash Professional CS5 Classroom in a Book © 2010 Adobe Systems Incorporated and its licensors. All rights reserved. If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, record- ing, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement. e content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. Please remember that existing artwork or images that you may want to include in your project may be protected under copyright law. e unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright owner. Any references to company names in sample files are for demonstration purposes only and are not intended to refer to any actual organization. Adobe, the Adobe logo, Flash, the Flash logo, Flash Builder, Flash Catalyst, Flash Lite, Flash Player, Classroom in a Book, InDesign, and Photoshop are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Apple, Mac OS, Macintosh, and Safari are trademarks of Apple, registered in the U.S. and other countries. Microsoft, Windows, and Internet Explorer are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. All other trademarks are the property of their respective owners. Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110-2704, USA Notice to U.S. Government End Users. e Software and Documentation are “Commercial Items,” as that term is defined at 48 C.F.R. §2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §§227.7202-1 through 227.7202-4, as applica- ble, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. e affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference. Adobe Press books are published by Peachpit, a division of Pearson Education located in Berkeley, California. For the latest on Adobe Press books, go to www.adobepress.com. To report errors, please send a note to errata@peachpit.com. For information on getting permission for reprints and excerpts, contact permissions@peachpit.com. Writer: Russell Chun Editor: Rebecca Gulick Production Editor: Tracey Croom Copyeditor: Anne Marie Walker Proofreader: Liz Welch Technical Editor: Jeremy Rue Compositor: Kim Scott, Bumpy Design Indexer: Valerie Haynes Perry Cover design: Eddie Yuen Interior design: Mimi Heft Printed and bound in the United States of America ISBN-13: 978-0-321-70180-0 ISBN-10: 0-321-70180-1 9 8 7 6 5 4 3 2 1 Download from Library of Wow! ebook ptg A bonus 2-hour set of Learn Photoshop CS5 by Video tutorials are included on this disc, from video2brain and Adobe Press. Learn by Video is one of the most critically acclaimed training products on Adobe software and is the only Adobe-approved video courseware for the Adobe Certifi ed Associate Level certifi cation. Learn by Video bonus tutorials Each lesson has its own folder inside the Lessons folder. You will need to copy these lesson folders to your hard drive before you can begin each lesson. Lesson fi les e Adobe Flash Professional CS5 Classroom in a Book disc includes the lesson fi les that you’ll need to complete the exercises in this book, as well as other content to help you learn more about Adobe Flash Professional CS5 and use it with greater effi ciency and ease. e diagram below represents the contents of the disc, which should help you locate the fi les you need. WHAT’S ON THE DISC Here is an overview of the contents of the Classroom in a Book disc Links to Adobe Community Help, product Help and Support pages, Adobe Press, Adobe certifi cation programs, Adobe TV, and other useful online resources can be found inside a handy HTML fi le. Just open it in your Web browser and click on the links, including a special link to this book’s product page where you can access updates and bonus material. A d o b e , t h e A d o b e l o g o , C l a s s r o o m i n a B o o k a n d F l a s h a r e t r a d e m a r k s o f A d o b e S y s t e m s I n c o r p o r a t e d . M a c O S i s a t r a d e m a r k o f A p p l e, r e g i s t e r e d i n t h e U . S . a n d o t h e r c o u n tr i e s . W i n d o w s i s e it h e r a r e g i st e r e d t r a d e m a r k o r a t r a d e m a r k o f M i c r o s o C o r p o r a ti o n i n t h e U . S . a n d / o r o t h e r c o u n t r i e s . CLASSROOM IN A BOOK ® ADOBE ® FLASH ® PROFESSIONAL CS5 WINDOWS®/MAC OS® © 2010 Adobe Systems Incorporated All rights reserved. Made in the USA. ISBN-13: 978-0-321-70180-0 ISBN-10: 0-321-70180-1 5/10 Online resources Download from Library of Wow! ebook ptg iv CONTENTS CONTENTS GETTING STARTED 1 About Classroom in a Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Installing Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Copying the Lesson Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 How to Use the Lessons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Adobe Certifi cation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1 GETTING ACQUAINTED 8 Starting Flash and Opening a File . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Getting to Know the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Working with the Library Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Understanding the Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Organizing Layers in a Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Using the Properties Inspector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Using the Tools Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Undoing Steps in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Previewing Your Movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Publishing Your Movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Saving Your Movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Finding Resources for Using Flash . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Checking for Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2 WORKING WITH GRAPHICS 42 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Understanding Strokes and Fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Creating Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Download from Library of Wow! ebook ptg ADOBE FLASH PROFESSIONAL CS5 CLASSROOM IN A BOOK v Making Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Editing Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Using Gradient and Bitmap Fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Making Patterns and Decorations . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Creating Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Creating Transparencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Creating and Editing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3 CREATING AND EDITING SYMBOLS 70 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Importing Illustrator Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 About Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Creating Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Importing Photoshop Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Editing and Managing Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Changing the Size and Position of Instances . . . . . . . . . . . . . . . . 87 Changing the Color Eff ect of Instances . . . . . . . . . . . . . . . . . . . . . 90 Understanding Blend Eff ects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Applying Filters for Special Eff ects . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Positioning in 3D Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 4 ADDING ANIMATION 102 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104 About Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Understanding the Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 Animating Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 Changing the Pacing and Timing . . . . . . . . . . . . . . . . . . . . . . . . . .109 Animating Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Animating Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 Animating Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Changing the Path of the Motion . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Swapping Tween Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Creating Nested Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129 Download from Library of Wow! ebook ptg vi CONTENTS Using the Motion Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 Easing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Animating 3D Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Previewing the Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 5 ARTICULATED MOTION AND MORPHING 150 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Articulated Motion with Inverse Kinematics . . . . . . . . . . . . . . . .153 Constraining Joints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Inverse Kinematics with Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . .168 Armature Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 Morphing with Shape Tweens . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 Using Shape Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Simulating Physics with Inverse Kinematics . . . . . . . . . . . . . . . . 185 6 CREATING INTERACTIVE NAVIGATION 194 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 About Interactive Movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 Creating Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Understanding ActionScript 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . .208 Preparing the Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Adding a Stop Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Creating Event Handlers for Buttons . . . . . . . . . . . . . . . . . . . . . . .214 Creating Destination Keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Creating a Home Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 Playing Animation at the Destination . . . . . . . . . . . . . . . . . . . . . .226 Animated Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 7 USING TEXT 234 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 Understanding TLF Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Adding Simple Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 Adding Multiple Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 Wrapping Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250 Hyperlinking Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259 Creating User-input Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Loading External Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268 Download from Library of Wow! ebook ptg ADOBE FLASH PROFESSIONAL CS5 CLASSROOM IN A BOOK vii 8 WORKING WITH SOUND AND VIDEO 278 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 Understanding the Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Using Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282 Understanding Flash Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295 Using Adobe Media Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295 Understanding Encoding Options . . . . . . . . . . . . . . . . . . . . . . . . .299 Playback of External Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 Working with Video and Transparency . . . . . . . . . . . . . . . . . . . . .310 Using Cue Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314 Embedding Flash Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322 9 LOADING AND CONTROLLING FLASH CONTENT 330 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332 Loading External Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 Removing External Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339 Controlling Movie Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340 Creating Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 10 PUBLISHING FLASH DOCUMENTS 348 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350 Testing a Flash Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350 Understanding the Bandwidth Profi ler . . . . . . . . . . . . . . . . . . . . .352 Adding Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353 Publishing a Movie for the Web . . . . . . . . . . . . . . . . . . . . . . . . . . .356 Alternative Publishing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . .362 INDEX 369 Download from Library of Wow! ebook ptg About the Contributor Russell Chun is a multimedia developer and consultant specializing in using Adobe Flash Professional to visualize science, data, and stories on the Web. He is on the adjunct faculty of the Columbia University Graduate School of Journalism and the City University of New York Graduate School of Journalism, where he teaches interactive journalism. Russell has authored the previous edition of this Classroom in a Book and all of the previous editions of Flash Advanced: Visual QuickPro Guide. He has also co- authored an interactive e-book on multimedia journalism called Storytelling with Flash CS3 Professional, and has written extensively about Flash in magazines such as SBS Digital Design and Macworld. Visit the site where Russell shares his Flash-related ideas at www.RussellChun.com. Download from Library of Wow! ebook . reserved. Made in the USA. ISBN -1 3 : 97 8-0 -3 2 1- 7 018 0-0 ISBN -1 0 : 0-3 2 1- 7 018 0 -1 5 /10 Online resources Download from Library of Wow! ebook ptg iv CONTENTS CONTENTS GETTING STARTED 1 About Classroom in a. Bumpy Design Indexer: Valerie Haynes Perry Cover design: Eddie Yuen Interior design: Mimi Heft Printed and bound in the United States of America ISBN -1 3 : 97 8-0 -3 2 1- 7 018 0-0 ISBN -1 0 : 0-3 2 1- 7 018 0 -1 9. ebook Adobe Flash Professional CS5 Classroom in a Book http://www.peachpit.com/ebookfiles/03 217 1332X ptg Download from Library of Wow! ebook ptg www.adobepress.com ADOBE ® FLASH ® PrOFESSiOnAL