Foundation Flash CS5 For Designers- P1

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:50

0
164
lượt xem
89
download

Foundation Flash CS5 For Designers- P1

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Foundation Flash CS5 For Designers- P1: Flash is one of the most engaging, innovative, and versatile technologies available-allowing the creation of anything from animated banners and simple cartoons to Rich Internet Applications, interactive videos, and dynamic user interfaces for web sites, kiosks, devices, or DVDs. The possibilities are endless, and now it just got better

Chủ đề:
Lưu

Nội dung Text: Foundation Flash CS5 For Designers- P1

  1. All you need to succeed in Flash Professional CS5 Covers all of the new additions to Flash CS5 including the Text Layout Framework, and new coding, animation, and video features Master the fundamentals of Flash Professional CS5 from adding and using media to creating games for Android devices www.zshareall.com
  2. This book was purchased by flashfast1@gmail.com www.zshareall.com
  3. Foundation Flash CS5 for Designers Tom Green and Tiago Dias www.zshareall.com
  4. Foundation Flash CS5 for Designers Copyright © 2010 by Tom Green and Tiago Dias All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2994-0 ISBN-13 (electronic): 978-1-4302-2995-7 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logos, or image we use the names, logos, or images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Distributed to the book trade worldwide by Springer Science+Business Media LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer- sbm.com, or visit www.springeronline.com. For information on translations, please e-mail rights@apress.com or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales– eBook Licensing web page at www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is freely available to readers at www.friendsofed.com in the Downloads section. Credits President and Publisher: Coordinating Editor: Paul Manning Mary Tobin Lead Editor: Copy Editor: Ben Renow-Clarke Kim Wimpsett Technical Reviewers: Compositor: Cheridan Kerr, Kristian Besley Lynn LHeureux Editorial Board: Indexer: Clay Andres, Steve Anglin, Mark Beckner, Kevin Broccoli Ewan Buckingham, Gary Cornell, Jonathan Gennick, Artist: Jonathan Hassell, Michelle Lowman, Matthew Moodie, April Milne Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Cover Designer: Dominic Shakeshaft, Matt Wade, Tom Welsh Anna Ishchenko www.zshareall.com
  5. To Sarah and Rory McGrath in Berne, Switzerland. May your marriage be one of peace, love, and joy. —Tom Green www.zshareall.com
  6. Contents at a Glance About the Authors................................................................................................... xiv About the Technical Reviewers .............................................................................. xv Acknowledgments .................................................................................................. xvi Preface................................................................................................................... xviii Chapter 1: Learning the Flash CS5 Professional Interface ..................................... 1 Chapter 2: Graphics in Flash CS5........................................................................... 67 Chapter 3: Symbols and Libraries ........................................................................ 151 Chapter 4: ActionScript Basics ............................................................................. 213 Chapter 5: Audio in Flash CS5 .............................................................................. 279 Chapter 6: Text ....................................................................................................... 315 Chapter 7: Animation, Part 1 ................................................................................. 361 Chapter 8: Animation, Part 2 ................................................................................. 427 Chapter 9: Flash Has a Third Dimension.............................................................. 495 Chapter 10: Video................................................................................................... 527 Chapter 11: Building Interfaces with the UI Components ................................... 601 Chapter 12: XML (Dynamic Data) .......................................................................... 643 Chapter 13: CSS ..................................................................................................... 669 Chapter 14: Building Stuff ..................................................................................... 695 Chapter 15: Optimizing and Publishing Flash Movies......................................... 757 Index ....................................................................................................................... 809 iv www.zshareall.com
  7. Contents About the Authors................................................................................................... xiv About the Technical Reviewers .............................................................................. xv Acknowledgments .................................................................................................. xvi Preface................................................................................................................... xviii Chapter 1: Learning the Flash CS5 Professional Interface ..................................... 1 Getting started ............................................................................................................................. 2 Creating a new Flash document................................................................................................. 5 Managing your workspace .......................................................................................................... 6 Setting document preferences and properties .......................................................................... 8 Document preferences ......................................................................................................... 9 Document settings .............................................................................................................. 10 Zooming the stage .............................................................................................................. 11 Exploring the panels in the Flash interface.............................................................................. 14 The timeline ......................................................................................................................... 14 The Properties panel .......................................................................................................... 23 The Tools panel .................................................................................................................. 29 The Library panel ................................................................................................................ 31 Using layers ............................................................................................................................... 32 Layer properties .................................................................................................................. 33 Creating layers .................................................................................................................... 34 Adding content to layers ..................................................................................................... 36 Showing/hiding and locking layers .................................................................................... 38 Grouping layers................................................................................................................... 40 Where to get help................................................................................................................ 40 Your turn: building a Flash movie ............................................................................................. 42 Nesting movie clips ............................................................................................................. 45 Drawing the fly .................................................................................................................... 47 Creating the illusion of depth with Flash ........................................................................... 48 Creating an animated fly .................................................................................................... 55 Adding audio ....................................................................................................................... 59 Testing and saving Flash files............................................................................................ 61 You have learned....................................................................................................................... 65 v www.zshareall.com
  8. Chapter 2: Graphics in Flash CS5........................................................................... 67 The Tools panel ......................................................................................................................... 70 The Selection and Subselection tools ............................................................................... 72 The Free Transform tool..................................................................................................... 75 The Gradient Transform tool .............................................................................................. 77 Object Drawing mode ......................................................................................................... 80 Drawing in Flash CS5................................................................................................................ 83 The Pencil tool .................................................................................................................... 83 The Brush tool..................................................................................................................... 85 The Deco tool ...................................................................................................................... 88 The Spray Brush tool .......................................................................................................... 98 The Eraser tool.................................................................................................................. 101 The Pen tool ...................................................................................................................... 102 Your turn: let’s have a campfire .............................................................................................. 104 Drawing the tree trunk ...................................................................................................... 104 Drawing the pine tree ....................................................................................................... 106 Adding pine needles ......................................................................................................... 107 Build the campfire movie .................................................................................................. 108 Working with color in Flash ..................................................................................................... 110 The Color palette and the Color Picker ........................................................................... 112 Creating persistent custom colors ................................................................................... 115 The kuler Color Picker ...................................................................................................... 117 Your turn: playing with color............................................................................................. 119 Using bitmap images in Flash................................................................................................. 123 Working with bitmaps in Flash ......................................................................................... 125 Your turn: tracing bitmaps in Flash .................................................................................. 127 JPEG files and Flash ........................................................................................................ 131 Using GIF files in Flash CS5 ............................................................................................ 134 Importing Fireworks CS5 documents into Flash CS5 .................................................... 137 Importing Illustrator CS5 documents into Flash CS5 ..................................................... 140 Importing Photoshop CS5 documents into Flash CS5................................................... 146 You have learned..................................................................................................................... 149 Chapter 3: Symbols and Libraries ........................................................................ 151 Symbol essentials.................................................................................................................... 152 Symbol types............................................................................................................................ 155 Graphic symbols ............................................................................................................... 155 Button symbols.................................................................................................................. 156 Movie clip symbols............................................................................................................ 158 Editing symbols ................................................................................................................. 159 vi www.zshareall.com
  9. 9-slice scaling .......................................................................................................................... 160 How 9-slice scaling works ................................................................................................ 161 Your turn: frames for an olive seller................................................................................. 163 The 9-slice “gotchas” ........................................................................................................ 166 Sharing symbols ...................................................................................................................... 169 Sharing libraries ................................................................................................................ 171 Filters and blend modes .......................................................................................................... 174 Applying filters ................................................................................................................... 174 Applying a Drop Shadow filter.......................................................................................... 175 Adding perspective ........................................................................................................... 177 Playing with blends ........................................................................................................... 180 Managing content on the stage .............................................................................................. 184 Aligning objects on the stage ........................................................................................... 186 Stacking order and using the Align panel ....................................................................... 189 Masks and masking ................................................................................................................. 194 A simple mask ................................................................................................................... 194 Using text as a mask ........................................................................................................ 201 Your turn: a sunny day on Catalina Island ............................................................................. 205 Adding the clouds ............................................................................................................. 206 Getting the clouds in motion............................................................................................. 208 What you’ve learned................................................................................................................ 211 Chapter 4: ActionScript Basics ............................................................................. 213 The power of ActionScript ....................................................................................................... 214 Actions panel components ............................................................................................... 216 The Actions panel vs. the Behaviors panel..................................................................... 219 Everything is an object ............................................................................................................ 220 Classes .............................................................................................................................. 221 Properties .......................................................................................................................... 222 Setting properties via ActionScript ......................................................................................... 225 Methods ............................................................................................................................. 226 Events ................................................................................................................................ 229 Coding fundamentals .............................................................................................................. 233 Syntax ................................................................................................................................ 233 Capitalization matters ....................................................................................................... 233 Semicolons mark the end of a line .................................................................................. 234 Commenting code............................................................................................................. 235 Dot notation ....................................................................................................................... 237 Scope................................................................................................................................. 239 Variables............................................................................................................................ 240 vii www.zshareall.com
  10. Data types ......................................................................................................................... 241 Operators........................................................................................................................... 244 Conditional statements ..................................................................................................... 247 Class files and the document class ................................................................................. 251 Syntax checking ................................................................................................................ 253 How to read the ActionScript 3.0 Language and Components Reference.......................... 257 Getting help ....................................................................................................................... 258 Search tactics.................................................................................................................... 259 Using ActionScript ................................................................................................................... 260 Your turn: pause and loop with ActionScript.......................................................................... 261 Pausing a timeline............................................................................................................. 261 Looping the Timeline ........................................................................................................ 265 Using movie clips to control the timeline ......................................................................... 266 Using Code Snippets ........................................................................................................ 266 What you’ve learned................................................................................................................ 276 Chapter 5: Audio in Flash CS5 .............................................................................. 279 Flash and the audio formats ................................................................................................... 280 Bit depth and sample rates .............................................................................................. 281 Flash and MP3 .................................................................................................................. 283 Adding audio to Flash.............................................................................................................. 284 Importing an audio file ...................................................................................................... 284 Setting sound properties .................................................................................................. 285 Using audio in Flash ................................................................................................................ 288 Choosing a sound type: event or streaming ................................................................... 288 Removing an audio file from the timeline ........................................................................ 291 Getting loopy ..................................................................................................................... 291 Adjusting volume and pan ................................................................................................ 293 Your turn: adding sound to a button ....................................................................................... 296 Controlling audio with ActionScript 3.0 .................................................................................. 298 Playing a sound from the Library ..................................................................................... 298 Using a button to play a sound ........................................................................................ 300 Playing a sound from outside of Flash ............................................................................ 301 Turning a remote sound on and off ................................................................................. 302 Adjusting volume with code.............................................................................................. 304 Your turn: storm over Lake Superior ............................................................................... 305 Code snippet: visualize audio .......................................................................................... 309 What you’ve learned................................................................................................................ 313 viii www.zshareall.com
  11. Chapter 6: Text ....................................................................................................... 315 Fonts and typefaces ................................................................................................................ 316 Adobe CoolType ...................................................................................................................... 319 Typefaces and fonts ......................................................................................................... 321 Working with device fonts ....................................................................................................... 322 Embedding fonts ...................................................................................................................... 324 The two text engines: TLF and Classic .................................................................................. 328 Types of text............................................................................................................................. 330 Read-only text properties ................................................................................................. 331 Container and flow ............................................................................................................ 337 Selectable and editable text ............................................................................................. 340 TLF and ActionScript ........................................................................................................ 341 Using TLF text as a button ............................................................................................... 345 Hyperlinks and TLF ................................................................................................................. 349 Using ActionScript to add hyperlinks to TLF text............................................................ 350 Checking spelling..................................................................................................................... 352 Your turn: scrollable text ......................................................................................................... 355 Using the UIScrollBar component ................................................................................... 355 Rolling your own scroller .................................................................................................. 356 What you have learned ........................................................................................................... 360 Chapter 7: Animation, Part 1 ................................................................................. 361 Shape tweening ....................................................................................................................... 363 Scaling and stretching ...................................................................................................... 363 Modifying shape tweens ................................................................................................... 368 Altering shapes ................................................................................................................. 369 Shape hints ....................................................................................................................... 373 Altering gradients .............................................................................................................. 377 Classic tweening ...................................................................................................................... 379 Rotation ............................................................................................................................. 379 Classic tween properties .................................................................................................. 381 Scaling, stretching, and deforming .................................................................................. 382 Easing ................................................................................................................................ 384 Custom easing .................................................................................................................. 387 Using animation ....................................................................................................................... 395 A closer look at the Timeline panel.................................................................................. 395 Onion skinning .................................................................................................................. 397 Modifying multiple frames................................................................................................. 400 Combining timelines ......................................................................................................... 402 ix www.zshareall.com
  12. Motion guides .................................................................................................................... 408 Tweening a mask.............................................................................................................. 411 Tweening Filter Effects ..................................................................................................... 413 Programmatic animation ......................................................................................................... 415 Copying motion as ActionScript....................................................................................... 416 Using the keyboard to control motion.............................................................................. 419 Creating random motion using ActionScript ................................................................... 421 What you have learned ........................................................................................................... 426 Chapter 8: Animation, Part 2 ................................................................................. 427 Animating with the Motion Editor panel.................................................................................. 428 Getting acquainted: scaling and moving ......................................................................... 430 Easing with graphs ........................................................................................................... 437 Managing property keyframes ................................................................................................ 445 Motion paths............................................................................................................................. 450 Manipulating motion paths ............................................................................................... 450 This book was purchased by flashfast1@gmail.com Motion tween properties ................................................................................................... 454 Motion presets ......................................................................................................................... 455 Inverse kinematics (IK)............................................................................................................ 458 Using the Bone tool .......................................................................................................... 459 Putting some “spring” in your bones ...................................................................................... 468 Animating IK Poses .......................................................................................................... 478 Using the Bind tool............................................................................................................ 480 Your turn: animate a fully rigged IK model...................................................................... 487 Inspiration is everywhere ........................................................................................................ 492 What you have learned ........................................................................................................... 493 Chapter 9: Flash Has a Third Dimension.............................................................. 495 What 3D really means in Flash (and what it doesn’t)............................................................ 496 Understanding the vanishing point ......................................................................................... 498 Using the 3D tools ................................................................................................................... 501 The 3D Rotation tool......................................................................................................... 501 The 3D Translation tool .................................................................................................... 506 Strategies for positioning content in 3D space ...................................................................... 512 The parallax effect: traveling through space ................................................................... 512 Use the 3D center point to your advantage .................................................................... 517 Be aware of depth limitations ........................................................................................... 520 Your turn: simulate a photo cube............................................................................................ 522 What you have learned ........................................................................................................... 526 x www.zshareall.com 9
  13. Chapter 10: Video................................................................................................... 527 Video on the Web .................................................................................................................... 529 Video formats ........................................................................................................................... 530 Encoding an FLV ..................................................................................................................... 532 Using the Adobe Media Encoder ..................................................................................... 532 Batch encoding ................................................................................................................. 541 Creating an F4V file .......................................................................................................... 542 More Media Encoder Goodness ...................................................................................... 544 Playing an FLV in Flash CS5 .................................................................................................. 546 Using the wizard ............................................................................................................... 546 Using the FLVPlayback component ................................................................................ 552 Playing video using ActionScript...................................................................................... 555 Using the FLVPlayback control components .................................................................. 560 Navigating through video using cue points ..................................................................... 562 Adding captions with the FLVPlaybackCaptioning component ..................................... 567 Preparing and using alpha channel video ....................................................................... 572 Going full-screen with video ............................................................................................. 574 When video is not video .......................................................................................................... 579 Embedding video ..................................................................................................................... 579 Embedding video as a movie clip .................................................................................... 581 Interacting with video content .......................................................................................... 582 Adding cue points .................................................................................................................... 583 An alternate XML format for cue points........................................................................... 584 Your turn: create XML captions for video........................................................................ 588 Your turn: play with alpha video ............................................................................................. 593 Your turn: think big, really big! ................................................................................................ 597 What you have learned ........................................................................................................... 598 Chapter 11: Building Interfaces with the UI Components ................................... 601 Button component.................................................................................................................... 603 Using the Button component............................................................................................ 603 Changing the Button component’s appearance ............................................................. 610 CheckBox component ............................................................................................................. 615 ColorPicker component ........................................................................................................... 617 ComboBox component............................................................................................................ 619 DataGrid component ............................................................................................................... 622 Label component ..................................................................................................................... 624 List component......................................................................................................................... 624 NumericStepper component ................................................................................................... 626 ProgressBar component ......................................................................................................... 628 xi www.zshareall.com
  14. RadioButton component.......................................................................................................... 630 ScrollPane component ............................................................................................................ 632 Slider component..................................................................................................................... 633 TextArea component ............................................................................................................... 635 TextInput component............................................................................................................... 636 TileList component .................................................................................................................. 637 UILoader component ............................................................................................................... 638 UIScrollBar component ........................................................................................................... 641 What you have learned ........................................................................................................... 641 Chapter 12: XML (Dynamic Data) .......................................................................... 643 Writing XML.............................................................................................................................. 645 Loading an XML file ................................................................................................................. 648 Using E4X syntax .................................................................................................................... 649 Dots and @s...................................................................................................................... 650 Node types ........................................................................................................................ 654 E4X filtering ....................................................................................................................... 656 Double dots and more ...................................................................................................... 657 Namespaces ..................................................................................................................... 659 Your turn: time to explore XFL ......................................................................................... 661 What you have learned ........................................................................................................... 667 Chapter 13: CSS ..................................................................................................... 669 Styling with CSS ...................................................................................................................... 671 Loading external CSS ............................................................................................................. 676 Custom tags ...................................................................................................................... 684 Style inheritance ............................................................................................................... 686 Styling hyperlinks .............................................................................................................. 688 Embedded fonts ................................................................................................................ 690 Selectors vs. the Properties panel................................................................................... 693 What you have learned ........................................................................................................... 694 Chapter 14: Building Stuff ..................................................................................... 695 Loading content ....................................................................................................................... 697 Are we there yet?.............................................................................................................. 697 Somebody stole my preloader ......................................................................................... 701 Building a slide show with components and XML ................................................................. 703 A tour of the Beijing art district ......................................................................................... 704 xii www.zshareall.com
  15. Building an MP3 player with XML........................................................................................... 711 Setting up the external playlist ......................................................................................... 712 Polishing up the symbols.................................................................................................. 713 Wiring up the MP3 player controls................................................................................... 720 Evaluating and improving the MP3 player ...................................................................... 735 Going mobile ............................................................................................................................ 737 A quick tour of Device Central ......................................................................................... 737 Package the game as an Android AIR app..................................................................... 750 Build more stuff ................................................................................................................. 756 What you have learned ........................................................................................................... 756 Chapter 15: Optimizing and Publishing Flash Movies......................................... 757 Flash’s love-hate Internet relationship ................................................................................... 758 This “Internet” thing........................................................................................................... 759 Enter the World Wide Web............................................................................................... 760 Bandwidth.......................................................................................................................... 760 So, who are these folks we call users? ........................................................................... 762 Streaming ................................................................................................................................. 763 The Bandwidth Profiler ............................................................................................................ 765 Simulating a download ..................................................................................................... 765 Pinpointing problem content............................................................................................. 769 Can I get that in writing?................................................................................................... 770 Optimizing and fine-tuning your Flash movies ...................................................................... 771 Planning your project ........................................................................................................ 771 Distributing the weight ...................................................................................................... 776 Optimizing elements in the movie.................................................................................... 778 Publishing and web formats.................................................................................................... 783 Flash .................................................................................................................................. 784 HTML ................................................................................................................................. 785 Animated GIFs .................................................................................................................. 786 QuickTime ......................................................................................................................... 790 It’s showtime! ........................................................................................................................... 791 Publish settings ................................................................................................................. 792 Publishing the butterfly garden ........................................................................................ 803 Publishing Flash movies containing linked files.............................................................. 805 What you have learned ........................................................................................................... 807 Index ....................................................................................................................... 809 xiii www.zshareall.com
  16. About the Authors Tom Green is currently Professor, Interactive Media through the School of Media Studies at the Humber Institute of Technology and Advanced Learning in Toronto, Canada. He has written numerous books on Adobe technologies and several hundred tutorials for numerous magazines and websites including activetutsplus.com, layersmagazine.com, Community MX, and Computer Arts. Tom is also an Adobe Community Professional and an Adobe Education Leader. He has spoken and lectured at more than 20 conferences and post-secondary institutions internationally including Adobe Max, FITC, SparkEurope, and the Central Academy of Fine Arts in Beijing, China. In his spare time, you can catch him hiking a trail with the Cub Scout group he has led for the past 15 years or paddling a lake in Northern Ontario. You can contact Tom at tom@tomontheweb.ca. Tiago Dias discovered Flash around the time of Flash 3, after seeing a Flash site for the first time. He started off by doing freelance work on the side from his day job as a network/systems engineer. Today he works as a Senior Flash Platform Developer at Publicis Modem, the digital unit of Publicis. Previously he worked as a video producer and Flash developer at a Corporate Television company in Zurich. Besides working and writing, Tiago is an Adobe Community Professional and one of the co-managers of the Swiss Flash User Group (SFUG) and has spoken at such conferences as FITC and FATL on various topics. In his free time, he writes tutorials on Flash, Flex, AS3, and new technologies/libraries for various communities. To relax, he tries to go snowboarding every time the sun is shining in the Swiss Alps or hops on a plane and flies to a sunny and warm destination to go scuba diving. He currently lives and works in Zurich, Switzerland. xiv www.zshareall.com
  17. About the Technical Reviewers Cheridan Kerr has been involved in web development and design since 1997 when she began working on a research team for the Y2K Millennium Bug. It was here she learned about the Internet and promptly fell in love with the medium. In her career, she has been responsible for websites in the early 2000s such as Weight Watchers Australia and Quicken.com.au, and she has worked as a creative services manager of Yahoo!7 in Australia on clients such as Toyota, 20th Century Fox, and Ford. Currently, she is working as the head of digital for an Australian advertising agency. Kristian Besley is a Flash and web developer currently working in education and specializing in games/interactivity and dynamically driven content using Flash, PHP, and .NET (not all at the same time, obviously!). He also lectures in interactive media. Kristian has produced freelance work for numerous clients including the BBC, Heinemann, and BBC Cymru. He has written a number of books for friends of ED, such as working on the Foundation Flash series, Flash MX Video (ISBN-13: 978-1-59059-172-7), Flash ActionScript for Flash 8 (ISBN-13: 978-1- 59059-618-0), and Learn Design with Flash MX (ISBN-13: 978-1-59059-157-4). He was also a proud contributor to the amazing Flash Math Creativity books and has written for Computer Arts magazine. Kristian currently resides with his family in Swansea, Wales and is a fluent Welsh speaker. xv www.zshareall.com
  18. Acknowledgments In the acknowledgments for the CS3 version of this book, I said, “Working with a coauthor can be a tricky business. In fact, it is a little like a marriage. Everything is wonderful when things are going well, but you never really discover the strength of the relationship until you get deep into it.” You may notice there is a new name, Tiago Dias, on the cover, which indicates that David Stiller, my previous coauthor, had to back out of this project because his Flash development business took off, and he simply didn’t have the time necessary to devote to this book. Four years ago Tiago and I explored the intersection of After Effects and Flash when we worked together on another friendsofED title From After Effects to Flash: Poetry in Motion Graphics. When Dave graciously stepped aside, who better to step in than Tiago? Having kept in close touch for the four years between our first book and this one, we had developed a close personal and professional relationship, which made the transition between coauthors seamless. As well, Tiago brought a fresh pair of eyes to the process, and there were several times when I would get e- mails that started off with “Dude, let’s try this approach…” when I went sideways instead of forward. Like David, Tiago gave me a good shake when I wasn’t understanding a code block or technique; these inevitably started with, “It’s really very simple, Tom,” and he would lay out exactly what I was missing. When we finished the book, I reflected on the process and discovered that Tiago and I had picked up exactly where we left off four years ago, and that, my friends, is the mark of an amazing partnership. Next up is our editor Ben Renow-Clark. There seems to be this generalized misconception that the relationship between an editor and a writer is adversarial. Actually, the best work is done when the relationship is the exact opposite, and I am so grateful to have just that relationship with Ben. Another group of people that have had a profound influence on this book are my students at the college where I teach and those of you I have met at conferences, online or through my tutorial efforts. I am deeply grateful for your patience when I tried out some of the exercises in this book and you reacted negatively or positively. It showed me where I was doing something right or where I needed to start over again. Also, hearing from my education peers around the world who use this book in their classrooms didn’t hurt when it came to actually writing the exercises and even determining their order. Finally, writing a book means I disappear into my office and generally become moody and difficult to live with as I mull over some aspect of an exercise or the order of a chapter. It takes a very unique individual to put up with that, let alone understand why, and my wife, best friend, and life partner for more than 30 years, Keltie, has somehow put up with it. Tom Green In 2009, Tom and I got together at Adobe’s MAX 2009 for a rather “quick” chat at one of the lunch tables. The whole conversation was relatively short—15 to 20 minutes—and over that space of time we reviewed all the chapters of this book, their content, and who was doing what. The result of that conversation is the book you are holding. Now you might think that is crazy—our having one brief chat. It might seem like that to you, but for us it was normal. The real discussions happened when we switched on our webcams and xvi www.zshareall.com
  19. saw each other—one in his home office and me in my living room, garden, office, or wherever I was at that time. It was fun, and we laughed a lot during our Skype conversations. As Tom already mentioned, we worked on a book together four years ago, and since then we have developed a great partnership. We understand each other quite well, and, when one side knows what the other is thinking or wants to accomplish, that leads to an awesome workflow. But as it is, life is not a piece of cake; sometimes things don’t go the way they should, and that’s where your good friends, and in this case especially Tom, come in. He backed me up during the course of this book, something that I was a bit scared of, and, because of my job, I couldn’t always be there for him. If I were asked again to write a book, I think I would only do it with this old man! No one else managed to wake my creativity while writing books. Tom, you are a great person and a great mentor. Next up I would like to thank Mischa Plocek and Pascal [P] Baumann for donating some of their work to be used in this book. Thank you guys for all your work and time invested doing what you guys can do best! Marcel, thanks for giving me the spare time I needed and providing me with some ideas; I don’t know how to thank you for this, but I think I can come up with something. Last, but not least, writing books can be a challenge. You constantly think day and night of what you have to deliver the next day. Thanks to the time zones, I always had a few more hours to work on until Tom woke up. I normally close myself in a state of writing in the morning, writing during lunch, and writing any time when I’m home. There is not really a break, and I become very impatient and difficult to be around. It needs lots of nerves and time to handle me during that time, and I can’t thank my girlfriend, Anjanee, enough for supporting me and trying to handle my difficult moods during the process of the book and all the other situations in life. Thank you! Tiago Dias xvii www.zshareall.com
  20. Preface I can remember the day as clear is if it were just yesterday. I was walking by my boss’s office late one winter afternoon at the college where I teach, and he called me into his office. Sitting on his desk was a thin white box with some sort of weird swirl on it. He slid the box across to me and asked, “You know anything about Flash?” To be honest, as a Director user, what I knew was filtered through the eyes of a Director guy, which meant I didn’t know much and what I did know convinced me it was a wind-up toy compared to Director. I replied, “A bit.” The boss leaned back in his chair and said, “Well, learn a lot more because you are teaching it in four weeks.” This was the start of one of the longest, strangest, and most exhilarating trips I have ever been on. The version was Flash 3, and I have been using and teaching Flash ever since. What I didn’t expect is to be writing books, articles, and tutorials around Flash for the past 10 years. I also didn’t expect that my fascination with Flash would take me around the world speaking at conferences or lecturing at universities from Amsterdam to Wu Han on the subject of Flash and web-based media. It has been quite the experience, and Flash CS5 makes things even more fascinating. Flash CS5 is one of the more important versions in the history of the product. Flash CS5 has evolved into a serious design tool able to handle everything from simple motion graphics to broadcast-quality animations. It also marks the point where Flash is fully integrated into the Adobe product line up. The Motion Editor, a rejigged Media Encoder, the TextLayoutFramework, and a fist full of sophisticated animation tools are evidence of that. This book is also a bit different from any Flash book you may have read or considered purchasing. From the very start of the process, we put ourselves in your shoes and asked a simple question: “What do you need to know and why?” This question led us into territory that we didn’t quite expect. As we were grappling with that question early in the process, we kept bothering our network of Flash friends to be sure we were on the right track. At some point, both of us simultaneously came to the conclusion, “Why not just let them explain it in their own words?” This is why, as you journey through this book, you will encounter various experts in the field telling you why they do things and offering you insights into what they have learned. The odd thing is, at some point in their careers, they were no different from you. One other aspect of this book that we feel is important is we had a lot of fun developing the examples and exercises in the book. The fun aspect is important because, if learning is fun, what you learn will be retained. Anybody can show you how to apply the new Springs feature to a rectangle on the Flash stage. It is more effective when you do exactly the same thing to bend trees. Anybody can dryly explain 9-slice scaling, but it becomes less techie when you apply it to a Chinese olive seller. Nested movie clips are a “yawner” at best, but, when they are related to a Hostess Twinkie, the concept becomes understandable. Shared libraries are an important subject. Instead of filling a library with circles and text, the concept becomes relevant when the library is populated with “Bunny Bits.” Interested in going out on the bleeding edge of Flash and preparing a project for an Android-based device? Whack-A-Bunny makes it interesting and fun. As you may have guessed, we continue to exhibit a sense of joy and wonder with Flash, and we hope a little bit of our enthusiasm rubs off on you as well. xviii www.zshareall.com
Đồng bộ tài khoản