YOMEDIA
ADSENSE
Flash CS4 Professional in 24 Hours- P1
88
lượt xem 15
download
lượt xem 15
download
Download
Vui lòng tải xuống để xem tài liệu đầy đủ
Flash CS4 Professional in 24 Hours- P1: The creation of this book could not have happened without the skill and patience of many, many people at Sams Publishing. Most of all, I want to thank Mark Taber for offering me this opportunity and Philip Kerman for writing such a great book. I also greatly appreciate the efforts of Songlin Qiu for keeping me on track and organized, not an easy task.
AMBIENT/
Chủ đề:
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Flash CS4 Professional in 24 Hours- P1
- ▼ TRY IT YOURSELF When you’re ready to roll up your sleeves and get some hands-on experience, look for one of the more than 90 “Try It Yourself” mini-lessons that provide step-by-step walkthroughs of key Flash tasks and techniques. HOUR 1: Basics HOUR 9: Using Shape Tweens to Morph HOUR 17: Introducing Components . Make an Animation in 30 Seconds 8 . Make a Simple Shape Tween 178 . Manually Populate the ComboBox . Change Your View on the Stage 12 . Use Shape Hints for a Better Shape Component 314 . Use the Properties Panel to Inspect Tween 183 . Populate the ComboBox Component and Change Fill Colors 18 by Using ActionScript 316 HOUR 10: Advanced Animation with . Create Multiple Buttons for a Portfolio317 HOUR 2: Drawing and Painting Original Inverse Kinematics . Use the RadioButton Components 320 Art in Flash . Create a Shape and Add Bones with . Apply the Radio Buttons 321 . Use the View Tools to Help You See 37 the Bone Tool 192 . Draw and Change Lines 40 . Create a Shape from Multiple Movie HOUR 18: Using Components . Paint Fills 44 Clips and Add Bones 194 . Use the List Component to Enable . Draw and Modify Shapes 47 . Animate a Figure by Adding Poses 197 Users to Select Images 333 . Fill the Stage with the Deco Tool 48 . Control the Motion of an Armature . Use the ProgressBar Component as with the Bind Tool 198 a Preloader 338 . Use the Pen Tool 50 . Create and Style Text 51 HOUR 11: Simulating 3D Animation . Use the Slider to Access Frames in a Movie Clip 339 . Use the Selection Tool to Select and . Create a 3D Movie Clip 207 Modify Shapes 57 . Use the 3D Translation Tool to HOUR 19: Using Video . Select Attributes with the Dropper Tool 60 Create an Animation 210 . Embed a Video 349 . Transform Drawn Objects 62 . Create Multiple Rotating Movie Clips 210 . Make a Playback Controller for an . Use Snap to Objects to Draw Perfect Embedded Video 353 Shapes and Connect Objects 65 HOUR 12: Reusing Your Animations with Motion Presets . Create an .flv and Use the HOUR 3: Importing Graphics into Flash FLVPlayback Component 355 . Apply an Existing Motion Preset 217 . Rotoscope (Draw Frames of a Video) 357 . Import a Raster Graphic 77 . Modify and Save an Existing Preset 220 . Inject and Use Cue Points 359 HOUR 4: Staying Organized with the . Change the Easing of an . Animate a Video in 3D 363 Library and Layers Existing Preset 223, 225 HOUR 20: Linking a Movie to the Web . Create a Symbol by Converting HOUR 13: Including Sound in Animations Selected Objects 90 . Publish a Movie 371 . Import a Sound 231 . Create a New Symbol from Scratch 93 . Use navigateToURL to Create a . Add Sounds and Sound Effects to Hyperlink 374 . Transform the Location, Scale, and an Animation 240 Rotation of Instances 101 . Create a Text Hyperlink 376 . Change Color Styles on Several HOUR 14: Nesting Animations in Movie . Use Dynamic Text to Create a Instances 103 Clip and Graphic Symbols Hyperlink 377 . Make a Symbol by Using Instances . Use a Movie Clip to Make a . Display Text by Using CSS 379 of Another Symbol 108 Rotating Wheel 254 HOUR 21: Designing a Website to be . Compare a Movie Clip Symbol to a Modular HOUR 5: Controlling Color Graphic Symbol 258 . Create a Custom Color and Swatch 119 . Load a Movie 392 HOUR 15: Creating Special Effects . Use the Loader Class to Display . Create a Custom Gradient 122 . Transform Attributes of Gradients . Use an Imported Bitmap as a Fill Progress 395 Used in a Movie 123 Color in a Hall of Mirrors 268 . Play an External MP3 398 . Animate a Block of Text, One . Load Text from File 399 HOUR 6: Applied Layout Techniques Character at a Time 269 . Display the Time in Dynamic Text 133 . Convert Text to a Shape for Special HOUR 22: Minimizing File Size . Use the Hard Light or Overlay Blend Effects 270 . Use the Bandwidth Profiler to Judge to Add a Highlight 135 . Splatter Animated Movie Clips 272 Download Times 415 . Combine Techniques to Improve . Add a Shadow to Show Depth and . Reduce a File’s Size with the the Bevel Filter 137 Distance 275 Bandwidth Profiler’s Help 419 . Add a Filter with the Motion Editor 277 . Use a Preloader in the Bandwidth HOUR 7: Understanding Animation Profiler 421 . Use Masking to Create a Spotlight . Analyze a Finished Animation 150 Effect 278 HOUR 23: Optimizing Performance HOUR 8: Using Motion Tweens to Animate . Create a Hand-Drawn Masking Transition 280 . Use a Custom Performance Meter to . Create a Basic Motion Tween 157 . Use a Mask as a Stencil 281 Calculate Frame Rate 428 . Tween Position, Scale, Rotation, HOUR 24: Publishing a Creation and Color 161 HOUR 16: Basic Interactivity . Make an Animation Finish Where It . Set Up the Publish Settings and . Make an Action That Loops Part of Then Publish a Movie 435 Starts 165 Your Movie 291 . Make an Animation Ease In and . Address Users Without Flash 440 . Use a Frame Label as the Ease Out 170 Destination of a gotoAndPlay Action 293 . Customize a Template 441 . Make a Simple Button 296 . Add Metadata for Search Engine Optimization 443 . Add Buttons to an Animation to Stop and Continue Playback 299 . Add XMP Data to a Movie 445 . Make a Simple Portfolio Viewer 305
- Phillip Kerman and Lynn Beighley Sams Teach Yourself Adobe ® ® Flash CS4 Professional 24 in Hours 800 East 96th Street, Indianapolis, Indiana, 46240 USA
- Sams Teach Yourself Adobe Flash CS4 Professional in 24 Hours Acquisitions Editor Copyright © 2009 by Sams Publishing Mark Taber All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, Development Editor or transmitted by any means, electronic, mechanical, photocopying, recording, or other- Songlin Qiu wise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has Managing Editor been taken in the preparation of this book, the publisher and author assume no responsi- Patrick Kanouse bility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein. Project Editor ISBN-13: 978-0-672-33041-4 Seth Kerney ISBN-10: 0-672-33041-5 Copy Editor Library of Congress Cataloging-in-Publication Data: Jovana San Nicolas- Kerman, Phillip. Shirley Sams teach yourself Adobe Flash CS4 professional in 24 hours / Phillip Kerman and Indexer Lynn Beighley. -- 1st ed. Tim Wright p. cm. ISBN 978-0-672-33041-4 (pbk.) Proofreader 1. Flash (Computer file) 2. Multimedia systems. 3. Web sites--Design. Matt Purcell I. Beighley, Lynn. II. Title. Technical Editor QA76.575.K4625 2009 Brandon Houston 006.7'8—dc22 Publishing 2009015798 Coordinator Printed in the United States of America Vanessa Evans First Printing May 2009 Cover Designer Trademarks Gary Adair All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this Compositor information. Use of a term in this book should not be regarded as affecting the validity of Mark Shirar any trademark or service mark. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an “as is” basis. The authors and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of programs accompanying it. Bulk Sales Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact U.S. Corporate and Government Sales 1-800-382-3419 corpsales@pearsontechgroup.com For sales outside of the U.S., please contact International Sales international@pearsoned.com
- Contents Introduction 1 Part II: Animating in Flash What’s New in This Edition . . . . . . . . . . . . . . . . . . . . . . . . 2 HOUR 7: Understanding Animation 143 Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . 3 How Animation Works . . . . . . . . . . . . . . . . . . . . . . . . . . 143 How This Book Is Organized . . . . . . . . . . . . . . . . . . . . . . 3 Elements of Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 What’s on the Book’s Website . . . . . . . . . . . . . . . . . . . . 4 HOUR 8: Using Motion Tweens to Part I: Assembling the Graphics You’ll Animate in Flash Animate 157 Creating a Motion Tween . . . . . . . . . . . . . . . . . . . . . . . . 157 HOUR 1: Basics 7 Fine-Tuning a Motion Tween . . . . . . . . . . . . . . . . . . 165 Jump Right In and Make an Animation . . . . . . 7 Getting Your Bearings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 HOUR 9: Using Shape Tweens to Getting Around in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Morph 177 Document Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Making a Shape Tween . . . . . . . . . . . . . . . . . . . . . . . . . . 177 File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Refining and Fine-Tuning a Shape Tween . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 HOUR 2: Drawing and Painting Original Art in Flash 35 HOUR 10: Advanced Animation with Drawing on the Stage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Inverse Kinematics 191 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Linking Symbols with the Bone Tool. . . . . . . . 191 Selecting and Transforming Objects . . . . . . . . . . 54 Animating the Armature . . . . . . . . . . . . . . . . . . . . . . . . 195 HOUR 3: Importing Graphics into Flash 69 HOUR 11: Simulating 3D Animation 203 Vector Graphics Versus Raster Graphics . . . . 69 Creating a 3D Movie Clip . . . . . . . . . . . . . . . . . . . . . . . . 203 Reasons to Avoid Importing Graphics . . . . . . 70 Moving Objects with the 3D Importing Vector Graphics . . . . . . . . . . . . . . . . . . . . . . . . 71 Translation Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Using Bitmaps (Also Known as Raster Rotating Objects with the 3D Graphics) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Rotation Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 HOUR 4: Staying Organized with the Library HOUR 12: Reusing Your Animations and Layers 89 with Motion Presets 215 The Concept of the Library . . . . . . . . . . . . . . . . . . . . . . 89 The Motion Presets Panel . . . . . . . . . . . . . . . . . . . . . . . . 215 Using the Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Applying an Existing Motion Preset . . . . . . . . 217 Using Symbols from the Library . . . . . . . . . . . . . . 100 Editing an Existing Preset with the Motion Editor Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 HOUR 5: Controlling Color 113 Using Blends and Filters . . . . . . . . . . . . . . . . . . . . . . . . . . 113 HOUR 13: Including Sound in Creating and Saving Color Swatches . . . . . . 118 Animations 229 Importing Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 HOUR 6: Applied Layout Techniques 129 Using Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Setting Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Controlling Quality and File Size . . . . . . . . . . . . 241 Applied Examples Using Color Styles, Blends, and Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
- iv Sams Teach Yourself Adobe® Flash® CS4 Professional in 24 Hours HOUR 14: Nesting Animations in Movie HOUR 21: Designing a Website to Clip and Graphic Symbols 253 Be Modular 391 Movie Clip Symbol Behavior . . . . . . . . . . . . . . . . . . 253 Loading Movies or Images . . . . . . . . . . . . . . . . . . . . . . 391 Subtleties of Movie Clips . . . . . . . . . . . . . . . . . . . . . . . . 260 Determining When a Movie Is Fully Loaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 HOUR 15: Creating Special Effects 267 Playing External Sounds . . . . . . . . . . . . . . . . . . . . . . . . 398 Effects with Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Loading External Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Splatter Movie Clips with the Spray Brush Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 HOUR 22: Minimizing File Size 405 Using Filters for Special Effects. . . . . . . . . . . . . . . . 274 File Size Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 405 Masking Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 HOUR 23: Optimizing Performance 427 Part III: Adding Interactivity and Video Measuring Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Impacts on Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 428 HOUR 16: Basic Interactivity 287 Basic ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 HOUR 24: Publishing a Creation 435 Making Simple Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . 295 How to Publish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Listening for Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Adding Metadata to Your Flash Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 HOUR 17: Introducing Components 313 Choosing Which Version to Publish . . . . . . . . 445 What Is a Component? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Deciding Which Media Types to Using the Button Component . . . . . . . . . . . . . . . . . . 317 Publish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Using the RadioButton Component . . . . . . . . 319 Exporting Other Media Types. . . . . . . . . . . . . . . . . . 455 Changing Component Appearances . . . . . . . . 322 Index 459 HOUR 18: Using Components 329 Using Data Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Working with Other Components . . . . . . . . . . . . 337 HOUR 19: Using Video 345 Embedding Video Versus Playing External Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Using Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 3D Animation with Video. . . . . . . . . . . . . . . . . . . . . . . . 363 Part IV: Putting It All Together for the Web HOUR 20: Linking a Movie to the Web 369 Basic Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 Simple Hyperlinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Using Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 What Other Web Tasks Can Flash Do? . . . . 380 Using Flash Inside a Larger Website . . . . . . . . 382 Uploading Files to a Web Server . . . . . . . . . . . . . . 386
- About the Authors Phillip Kerman is an independent programmer, teacher, and writer, who specializes in the Adobe Flash platform. He has trained and made presentations around the world, in such exotic locations as Reykjavik, Iceland; Melbourne, Australia; Amsterdam, Holland; and McAlester, Oklahoma. He has programmed several games on MSN and Messenger Live, including Sudoku Too and Jigsaw Too, as well as the real-time cattle auction site stampedecattle.com. Phillip is also the author of Macromedia Flash @work, Flash MX 2004 for Rich Internet Applications, and ActionScripting in Flash MX from New Riders Publishing. Lynn Beighley is a freelance author, web designer, and web developer. After going back to school to get a Masters in Computer Science, she worked for the acronyms NRL and LANL. Then, she discovered Flash and wrote her first bestseller. A victim of bad timing, she moved to Silicon Valley just before the great crash. She spent several years working for Yahoo! and writing other books and training courses. Upon discovering that technical book writing actually paid real money, she learned to accept and enjoy it. Finally giving in to her creative writing bent, she moved to the New York area to get an MFA in creative writing. She current- ly creates Flash animations and applications that range from the ridiculous to the sublime.
- Acknowledgments CS4 Edition The creation of this book could not have happened without the skill and patience of many, many people at Sams Publishing. Most of all, I want to thank Mark Taber for offering me this opportunity and Philip Kerman for writing such a great book. I also greatly appreciate the efforts of Songlin Qiu for keeping me on track and organized, not an easy task. Other folks I’d like to thank include Seth Kerney, Brandon Houston, and Jovana San Nicolas-Shirley. Finally, thank you Adobe for keeping Flash the great product that it is and taking it in inter- esting new directions. Keep up the awesome work! —Lynn Beighley CS3 Edition Most successful feats involve the efforts of many people. This book is no exception. I’m proud of the result, but I can’t take full credit. Here is my attempt to acknowledge everyone. First, I’d like to thank the people at Sams Publishing. When Randi Roger approached me, not only did she provide the faith that I could write this book, but she also stressed the sup- port I would receive from Sams Publishing. She wasn’t exaggerating. The following people were professional and prompted me every step of the way: Betsy Brown, Lynn Baus, Brandon Houston, Jeff Schultz, Amy Patton, Carol Bowers, Mark Taber, Kate Small, Matt Purcell, Vanessa Evans, and Damon Jordan (who as Development Editor made this book flow), plus all the editors listed in the front of this book. When you look at other Sams books, you’ll see many of these people acknowledged for a reason—they are great! There are countless correspondents with whom I’ve learned a lot about Flash. Instead of naming several and inadvertently neglecting many, let me just say that participating in local user groups and online forums is a great way to expand your knowledge and build your business—they’ve helped me and helped this book. Of all the places I’ve learned about Flash, being in the classroom and teaching has probably been the most educational for me. The students and staff of the Northwest Academy, Pacific Northwest College of Art and Portland Community College deserve special recognition. —Phillip Kerman
- We Want to Hear from You! As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way. You can email or write me directly to let me know what you did or didn’t like about this book—as well as what we can do to make our books stronger. Please note that I cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail I receive, I might not be able to reply to every message. When you write, please be sure to include this book’s title and author as well as your name and phone or email address. I will carefully review your comments and share them with the author and editors who worked on the book. Email: graphics@samspublishing.com Mail: Mark Taber Associate Publisher Sams Publishing 800 East 96th Street Indianapolis, IN 46240 USA Reader Services Visit our website and register this book at informit.com/register for convenient access to any updates, downloads, or errata that might be available for this book.
- This page intentionally left blank
- Introduction Adobe is not exaggerating when it says that Flash CS4 Professional is the “industry-leading authoring environment for creating engaging interactive experiences.” You only need to visit a few sites that use Flash to understand how compelling it is. Using graphics, animation, sound, and interactivity, Flash can excite, teach, entertain, and provide practical information. With this version of Flash, Adobe has introduced some valuable new fea- tures, as well as further integrated Flash CS4 into its suite of products. That’s a powerful thing—when products like Photoshop, Illustrator, and Fireworks can be used to help you create graphics for use in your Flash movies. This interoperability only increases as time goes on. More than half a billion users already have the free Flash player that en- ables them to view Flash movies. As of the writing of this book, more than 95% of computers connected to the Internet not only had Flash Player ver- sion 9, but more than 55% have the latest version, Flash Player 10. The fact that Adobe continues to distribute this software so effectively means the potential audience for Flash content is huge and continues to grow. The tools needed to create Flash movies are within your reach. After you purchase Flash, the only investment you need to make is time to learn. You can even download a trial version of Flash from www.adobe.com, and use it for 30 days for free. People can grow from fiddling with Flash to making entertaining movies. Imagine a great musician picking up and learning an instrument in a matter of days. It really is that amazing. If you’re moti- vated, with just a moderate time investment, you feel as though a powerful communication tool has been given to you. Flash is so unique that sometimes it’s better to have less experience. If you have preconceived ideas about Flash or how you’re supposed to use draw-
- 2 Introduction ing tools, it might be best to try to forget everything and start fresh. This book is organized in such a way that you should start seeing successes quickly. With each task, you prove to yourself that you’re acquiring knowl- edge and skills. We don’t need to give you a pep talk because you’ll see for yourself. In just a few one-hour lessons, you are creating drawings that you might have thought you weren’t capable of. In a few more hours, you are making ani- mations. Finally, after 24 one-hour lessons, you are unstoppable. Where you take your skills is up to you, but you get a great foundation here. You might not feel like a pro overnight, but you will feel you have a power- ful communication tool in your control. When you can’t wait to show others your creations, you know you’re on your way. Get ready to have some fun! What’s New in This Edition This is the sixth edition of this book. To prevent the material from getting stale, we change quite a bit in each revision, as well as cover the new CS4 fea- tures with some depth. Unlike many other dramatic software upgrades, Adobe Flash CS4 Professional is not that different from the CS3 version. However, the way people use Flash and Flash in general has definitely broadened significantly. It’s not just Flash anymore; it’s the Flash Platform. Technologies, such as Apollo and the Flex Framework, have attracted a new set of developers all delivering Flash content. The CS4 upgrade is offers a few new tools, techniques, and further integrates with other Adobe CS4 products. This edition doesn’t try to cover everything; there simply isn’t time to do that in 24 one-hour lessons. Instead, we focus on animation techniques, graphics, and delivering to the web. You also spend a whole hour exploring new features including video with the full-screen mode; Inverse Kinemat- ics, the art of animating things connected to other things; and 3D animation. This book contains minimal, but crucial, coverage of ActionScript. We try not to go too much in-depth, but we cover enough to give you an idea of how it works. ActionScript is an entire computer language on its own, and once you have a sense of how it works, you’ll be comfortable learning more using additional resources. ActionScript isn’t getting any less complex; it is becoming much more consistent. So, what you learn in the ActionScript in- troductory hour (Hour 16, “Basic Interactivity”) applies to the rest of the code you see pop up in the book. We do cover Flash Components—ready- built and self-contained objects that include advanced ActionScript code, but also keep you insulated from that code. This edition also includes hours
- Who Should Read This Book 3 that cover using basic ActionScript and Components. ActionScript 3.0(AS3) is the latest version of ActionScript. You see AS3 in most of the code samples that appear in this book. But, in some cases, we show how to perform a task using AS2. Although AS3 is a cleaner version of the ActionScript language, it’s also less forgiving. Programmers gener- ally like the strictness of AS3, but many intermediate Flash users prefer to do things the old way as in AS2 because they can successfully make moder- ately complex tasks work or they’d rather dig into AS3 at a later date. Don’t get hung up on which version of ActionScript appears here. The most important point is that these 24 hours will get you started in Flash by developing good foundation skills. It’s easy to pick up bad habits in Flash, but you definitely get started on the right foot with this book. Who Should Read This Book New users to Flash should read this book first. If you’ve been doing Flash for a while and want to step back to make sure you’re headed in the right direction, you could find some gems throughout the book, but it might be tough to relearn the basics. If you’re someone who can learn on your own, you might think you don’t need a book like this, and, honestly, you might be right. But, this book moves quickly enough and provides tons of hands- on tasks that it’s worth investing the time to read 24 hour-long chapters. If you learn by doing, this is a good book for you. If you’re looking for any of the following Flash topics, they’re not covered here: writing class files in ActionScript 2.0 or ActionScript 3.0, developing content for mobile phones, using Flex Builder, building true 3D environments in Flash (although we do cover the new 3D tool), integrating with back-end web servers, or using Apollo. Some of these topics are mentioned in the book—but at best we only briefly discuss these more advanced topics. How This Book Is Organized This is a hands-on tutorial book. It’s not a project-based tutorial, however, because each task explores a single topic. Occasionally, you find a series of tasks that build upon one another. Generally, we introduce a topic, then, as quickly as possible, jump straight into a task where you get your hands dirty.
- 4 Introduction Throughout this book, you will see “Try It Yourself” sections. They are de- signed to take you through the steps of actually performing the tasks you have been reading about. Do not skip these sections. They usually provide additional information about the topic and are a great chance to practice the concepts. At the end of each hour, we’ve included a Q&A (Question and Answer) sec- tion with common questions we’ve either heard from students or topics that could be confusing to new users. There’s also a quiz at the end of each hour. The goal of both the Q&A and quizzes is to provide an additional way to learn. There are lots of ways to learn, and these questions exercise a different part of your brain. The book as a whole is organized in a linear manner. Later hours rely on the knowledge you acquire in earlier hours. The 24 hours are broken into four parts: . Part I: Assembling the Graphics You’ll Animate in Flash Here you concentrate on getting the graphics to look exactly as you in- tend. It might seem like a lot to spend 25% of the book on static graphics, but the time is well spent as it makes your animations look better. . Part II: Animating in Flash This is where you start moving things! You learn everything from 3D animation to tweening to Inverse Kinematics with the Bone tool. You also learn about valuable time-saving tools, like the Motion Preset Li- brary and the Motion Editor. . Part III: Adding Interactivity and Video In this part of the book, you take a big step into writing instructions so your Flash creations change based on the user’s input. Video is also cov- ered here. . Part IV: Putting It All Together for the Web Although it’s fun to create things inside Flash, you’ll want to put your creations online so your friends, family, and customers can see it. This part of the book shows you how, plus you learn some fine-tuning ad- justments to optimize performance and download speeds. What’s on the Book’s Website Source files for tasks in the book can be found on the publisher’s website. If you have trouble, you can see what the finished project looks like and in- vestigate how it was built. We’ve also included media files, such as images, audio, and video, necessary to complete a few of the tasks.
- PART I Assembling the Graphics You’ll Animate in Flash HOUR 1 Basics HOUR 2 Drawing and Painting Original Art in Flash HOUR 3 Importing Graphics into Flash HOUR 4 Staying Organized with the Library and Layers HOUR 5 Controlling Color HOUR 6 Applied Layout Techniques
- This page intentionally left blank
- HOUR 1 Basics At first glance, the Flash CS4 environment doesn’t seem too complicated. WHAT YOU’LL LEARN IN During this hour, you begin drawing and animating very quickly. Before THIS HOUR: you get to that, you need to know a few things about the interface. . How to easily and The Flash interface might look familiar to you because it shares some inter- quickly draw and ani- mate a graphic face elements with other software you might have used. But, Flash is not just a graphic design software or a programming language. Flash is basi- . How to use Flash’s cally a hybrid. Although Flash is consistent with other types of software, workspace Flash is different in many ways. Experienced users and novices alike will . How to organize and benefit from the basics covered during this hour. use panels Panels are special interface tools that give you access to see and change al- . How the Properties most any setting while working on your Flash file. The Properties panel is panel constantly one of the most useful panels because it automatically changes to give you changes to show you information about anything you have selected. For example, when you se- important information lect text, the Properties panel enables you to change the font style and size. . The common file types When you draw a circle and select it, the Properties panel shows you the related to Flash height and width, as well as the x and y location on the screen. Jump Right In and Make an Animation You can create your first Flash animation in a matter of seconds! Although the following task doesn’t cover all there is to learn, it should prove to you that it’s possible to get rolling with Flash very quickly.
- 8 HOUR 1: Basics ▼ TRY IT YOURSELF Just to prove that it is easy, in this task you make a simple animation in a matter of seconds. Follow these steps: Make an Animation in 1. Open Flash and select Flash File (ActionScript 3.0) from the Create 30 Seconds New column of Flash’s start page. If the start page isn’t initially visible, click File, New to open the New Document dialog box, Flash File (Ac- tionScript 3.0) from the General tab, and OK. You see a large white square, the Stage, in the center of your screen. 2. Press the R key to turn your cursor into a Rectangle tool. When you do this, you should notice the Rectangle tool becomes active in the Tools panel on the left. If you don’t see the Tools panel, you can open it by clicking Window, Tools. 3. On the left side of the Stage, click and drag down toward the right to draw a medium-size rectangle. This is how your animation begins. 4. The Timeline panel should be visible just below the white Stage. If the Timeline panel is not visible, click Window, Timeline. It is made up of numbered cells; select Frame 20 and press F7 (see Figure 1.1). 5. Now press the O key to turn the cursor into an Oval tool. Click the right side of the Stage and drag to draw a medium-size oval. FIGURE 1.1 After selecting Frame 20 in the Timeline, you insert a blank keyframe by pressing F7. 6. Finally, return to Frame 1 (where the animation begins) by clicking the dot under the 1 (for Frame 1) in the Timeline. (That dot represents a keyframe that has content—your rectangle.)
- Getting Your Bearings 9 7. Click Insert from the menu, and click Shape Tween as shown in Figure ▼ TRY IT YOURSELF 1.2. That’s it! Make an Animation in 8. To view your animation, press the Enter key. 30 Seconds FIGURE 1.2 To tell Flash to create an animation, you choose one of the Tween op- tions under the Insert menu. Alter- natively, you can right-click on a frame and select a Tween type. Of course, you’ll learn much more about making animations, including the difference between the three types of Tweens, but you’ve just seen how easy it is to create one. To successfully create and precisely control your ani- mation, you have to understand the basics of Flash first. This book concen- trates on the foundational skills you need to get started. If you’re using a Macintosh (Mac), you’ll be happy to know that Flash on a Mac is nearly identical to the Windows version. Macintosh keyboards are different from Windows keyboards, though, so use the following legend to translate keyboard commands from Windows: Windows Key Mac Key Ctrl Command „ Alt Option Right-click Control-click For example, if you see Ctrl+X in this book, on a Mac you use Command+X. The function keys (such as F8) are the same in Windows and Mac; although on some Mac keyboards, you need to press the fn key as you press the func- tion button. Finally, if you are using a Mac and have a mouse that includes a right button, it should be programmed to invoke the Control key. Getting Your Bearings The key to understanding Flash is always knowing where you are. You’re given the power to edit everything: static graphics, animations, movie clips, and more. It’s easy to accidentally edit an element you didn’t intend to, so
- 10 HOUR 1: Basics you need to be conscious of what you’re currently editing. This section helps you get your bearings. Let’s take a quick tour of the Flash workspace: . The Stage is the visual workspace. Any graphics placed in this area are visible to the audience watching Flash when it plays. . The Tools panel contains the drawing tools.. The Flash tools are cov- ered in depth in Hour 2, “Drawing and Painting Original Art in Flash.” . The Timeline contains the sequence of images that make an anima- tion. The Timeline can also include multiple layers, so certain graph- ics can appear above or below others, and you can have several animations playing simultaneously. The Timeline is introduced in Hour 7, “Understanding Animation.” . Panels stay out of the way by collapsing to icon view when not in use. Panels can be docked above, below, or to the sides of the Stage, or they can float in front of everything. They can also be organized into groups so that, when expanded or floating, only one panel in a group is visible, while the others in the group are accessible from a tab. In addition, floating panels can collapse vertically like a window shade to appear as a thin strip with just the panel’s tabs visible. You can or- ganize panels to suit your work style. User is a general term we use to refer to the person watching your Flash movie on your website. Within this book, we refer to the user frequently. Oc- casionally, we call the user the audience. It doesn’t matter which term you use—just realize that there’s you (the author, creator, or designer), and then there’s the user or audience. As the author, you are able to make edits to the Flash movie, whereas the user can only watch and interact with the movie. The Stage The large white rectangle in the center of Flash’s workspace is called the Stage. Text, graphics, photos—anything the user sees—goes on the Stage (see Figure 1.3). Think of the Stage as the canvas on which a painter paints or the frame in which a photographer composes pictures. Sometimes you want a graphic to begin outside the Stage and then animate onto the Stage. The gray area around the outside of the white Stage is the off Stage area. You can see the off Stage area only when the View menu shows a check mark next to
ADSENSE
CÓ THỂ BẠN MUỐN DOWNLOAD
Thêm tài liệu vào bộ sưu tập có sẵn:
Báo xấu
LAVA
AANETWORK
TRỢ GIÚP
HỖ TRỢ KHÁCH HÀNG
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn