Preface

A Dynamic Duo

The book you hold in your hand is one of a pair. It’s not a left sock or a single cufflink, because it’s unique and it’s still of use without its mate. It’s more like a fraternal twin or, perhaps more appropriately, the A–M volume of two-tome encyclopedia. The volumes are linked, and they share common ancestry and a common vision, but they exist perfectly well on their own.

The book you’re reading now is your first ace in the proverbial hole, and focuses on the Flash CS4 Professional application. This book will teach you how to draw and import graphics; use text, sound, and video; and even position objects in 3D space and create a moveable skeletal arm—all without any programming at all.

The second bullet is Learning ActionScript 3.0 (O’Reilly) and covers ActionScript, Flash’s internal scripting language responsible for making Flash projects interactive. Learning ActionScript 3.0 picks up ActionScript where this book leaves off. It takes an introductory chapter nestled within 13 other chapters of application goodness and expands it into coverage that includes the bulk of ActionScript 3.0’s core features.

Why were these books conceived as a pair? Simply put, each book was designed to better deliver its share of the knowledge lode. Each book works better independently than if both volumes were encumbered by tying everything together into one 700-page disc-slipper. This book introduces the Flash application to users who may never have seen it before. Its companion volume assumes familiarity with the Flash interface and is, therefore, able to concentrate solely on the ActionScript language.

Can I See Your Portfolio?

Don’t be deceived by these carefully laid plans. In addition to having an independent streak, this book also teaches its fair share of ActionScript. Why bother when its companion volume is waiting to be read? For one reason, ActionScript is as much a part of Flash as its Timeline panel. Writing a book about Flash without talking about ActionScript is like writing about Sherlock Holmes and neglecting to mention Watson.

For another reason, this book is project-based and you can’t get very far with a project of any significant scale without using ActionScript. Its project is a leading player in this book, to be sure, but it’s not the only act in town. In each chapter, topics are first introduced to you in short, digestible exercises that convey an idea, demonstrate a tool, or explain a script’s syntax. Only at the end of each chapter, in a reinforcing, real-world scenario, are these skills applied to the ongoing portfolio you will build by book’s end.

The portfolio itself is unique, too. Designed not to hinge on a conventional project that trudges through every chapter, this book takes a different path on its way to your studio. The project herein was conceived to be more than a standard top- or left-frame navigation website. The portfolio was created to highlight all the major features that Flash CS4 Professional has to offer and to push the limits of the average Flash authoring experience.

Assets were intentionally designed to create problems to solve, such as how best to add expressive movement to a complex animation and how to optimize large files for quicker download. Design ideas were chosen because they offered opportunities to solve these and other problems in creative ways.

Yes, the book was planned so that you don’t have to invest a lot of time in a project you have no interest in building. Yet if you do choose to practice what you’ve learned in each chapter by applying your new skills to on ongoing project, you’ll hone your chops that much quicker.

Who This Book Is For

This book is aimed at Flash designers and developers who are picking up Flash CS4 Professional for the first time, as well as users upgrading from prior versions who are looking to acquaint themselves with the version’s new features.

No prior experience with Flash is necessary to enjoy this book, as you learn the Flash interface from the ground up, but there are plenty of new features of which veteran Flash designers and developers can take advantage.

Reading through this preface and looking over a few sample chapters will increase the chances that you’ll be happy with the content and straightforward approach adopted herein.

What Is—and Isn’t—in This Book

More than anything else, a book’s preface should be able to give you a few hints as to whether or not the book is right for you. Here are two sections for quick perusal that will, ideally, help you evaluate your interest in this volume.

What’s In

It’s always helpful to pore over the table of contents of a book to see how much of the material catches your eye. Here, detail is replaced by a descriptive sentence or two that may give you some additional insight on the book’s content.

Chapter 1

This chapter covers the Flash CS4 Professional interface, introducing you to menus, panels, and windows. It also covers how to customize the interface to your liking.

Chapter 2

Chapter 2 concentrates on drawing assets within Flash, including both Flash’s natural drawing tools and more traditional object-based drawing techniques.

Chapter 3

Symbols, such as movie clips and buttons, are at the center of this chapter, including those created by Flash CS4’s new Spray Brush and Deco tools.

Chapter 4

Chapter 4 covers importing graphics into Flash, including Flash’s integration with other Adobe Creative Suite tools, and the import of Photoshop PSD files and Illustrator AI files.

Chapter 5

This chapter describes how to animate assets using Flash’s Timeline, including using Flash CS4’s new Motion Editor.

Chapter 6

Chapter 6 introduces you to the ActionScript language and lays the groundwork for topic-specific scripting in the chapters to come.

Chapter 7

Filters and blend modes, like Photoshop’s drop shadow and overlay, respectively, are the focus of Chapter 7. Also included in this chapter is a technique for creating soft-edge masks.

Chapter 8

Flash CS4’s new integrated 3D features are discussed in Chapter 8. Simple use of x-, y-, and z-axes for both rotation and movement are the center of the discussion, but a parallax scrolling environment is also added to the portfolio project.

Chapter 9

Completing the portfolio gallery, Chapter 9 demonstrates the loading of external assets with components using little to no ActionScript.

Chapter 10

Adding a skeletal infrastructure to movie clip and shape animations is at the heart of Chapter 10. Inverse kinematics is put to use to constrain character movement to a range of motion that mimics that of human joints.

Chapter 11

Chapter 11 details how to create text fields and format text, including loading external HTML and CSS files. The chapter content concludes with a demonstration of the XFL file format for opening InDesign assets in Flash.

Chapter 12

Playback of digital audio from external files isn’t the only thing covered in Chapter 12. Also in the spotlight is real-time sound visualization of stereo amplitudes.

Chapter 13

Chapter 13 examines adding video to the portfolio gallery, but not before you’ll learn how to compress video assets using Adobe Media Encoder.

Chapter 14

Finally, the book ends with a chapter explaining how to deploy your project to the Web, as well as how to create a desktop application with AIR.

What’s Not

Unfortunately, it’s inevitable that material must be left out of a book about such a large topic, and this volume is no exception. Scope and space limitations simply do not allow a complete and exhaustive account of Flash and ActionScript features. Here are a handful of things these pages don’t deliver:

Flash for mobile devices

A big topic of study unto itself, there just wasn’t room to include coverage of Flash Lite, Adobe’s Flash playback engine for mobile devices. This book focuses on creating assets for online (Flash Player) and desktop (AIR, or Adobe Integrated Runtime) delivery, but not for handhelds or consumer electronics.

Other Flash platform technologies

Because this book focuses on Flash CS4 Professional, other Flash Platform technologies such as Flex and Flash Media Server were necessarily omitted. AIR makes an appearance in Chapter 14 because an AIR authoring workflow is integrated into Flash CS4 Professional. However, the focus of that appearance is on deploying your project to the desktop, and no significant discussion of AIR-specific features is included.

Script Assist

No coverage of the GUI (graphical user interface) script editor, Script Assist, appears in this book.

Alternative ActionScript editors

Again, as this book is Flash-centric, it doesn’t cover the use of FlexBuilder, FlashDevelop, FDT, or other external ActionScript editors.

ActionScript 2.0

Although you can still develop in Flash CS4 Professional using ActionScript 2.0, this book and its companion volume concentrate on the newer, faster, more powerful version of the language.

The other 90% of ActionScript 3.0

Since this book’s thrust is on the Flash CS4 Professional authoring environment, only a limited amount of ActionScript made it into these pages. If you’re versed in Flash already and are considering reading this book to brush up your knowledge, know that it will provide help with the Flash interface but may be insufficient on the scripting front. This book can get you started, but if you want a resource more dedicated to AS3, try the companion volume.

Object-oriented programming

Object-oriented programming (OOP) is outside the scope of this book. This book introduces AS3 in a procedural context using scripts written in the Timeline. If you want to learn OOP using AS3, take a look at the companion volume to see whether it includes enough OOP for your liking.

Companion Website

All the exercises included in this book are available for download from the book’s companion website, http://www.LearningFlashCS4.com. Supplemental materials are also available and will be introduced over time through the site blog. Finally, although I never quite know how quickly I can reply, I can be reached directly through the companion website.

Related Resources

Here is a small list of additional resources to help you as you learn Flash.

Adobe

Important starting points from the makers of Flash:

AS2 Migration

If you were attracted to this book because you’re upgrading to Flash CS4 Professional from a prior version of Flash and you have experience with ActionScript 2.0, this book may help you smooth over the transition to ActionScript 3.0: The ActionScript 3.0 Quick Reference Guide by Jen deHaan, Darren Richardson, Rich Shupe, and David Stiller (O’Reilly).

Training

These destinations offer online and in-person training resources for Flash and ActionScript:

Mailing Lists/Forums

For ongoing community support, try these mailing lists and forums:

Conferences

There’s no substitute for meeting other members of the community and learning from Flash leaders from all over the world. Here are a few conferences that are really worth attending:

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, and directories.

Constant width

Indicates ActionScript code, text output from executing scripts, XML tags, HTML tags, and the contents of files.

Constant width bold

Shows commands or other text that should be entered literally.

Note

A note gives additional information, such as resources or a more detailed explanation.

Warning

This box indicates a warning or caution.

The scripts herein are color-coded by syntax to match the way your scripts look in Flash. Script basics (such as operators, punctuation, and so on), as well as custom names (such as for variables and functions), are black. Special words and symbols are printed in different colors: keywords and identifiers are blue, strings are green, and comments are gray. For example:

//Happy Birthday, Claire!
var cas:String = "Claire";

Project Progress

This icon precedes any work you’ll need to do to further the cumulative portfolio project. Without this icon, discussions will sometimes describe actions you may take in the Flash interface, that don’t ultimately lead to you creating an exercise file. Further, when exercises are suggested, they are always optional.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Learning Flash CS4 Professional by Rich Shupe. Copyright 2009 Rich Shupe, 978-0-596-15976-4.

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

We’d Like to Hear from You

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international or local)
(707) 829-0104 (fax)

We have a web page for this book where we list errata, examples, and any additional information. You can access this page at:

http://www.oreilly.com/catalog/9780596159764

To comment or ask technical questions about this book, send email to:

For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our website at:

http://www.oreilly.com

Safari® Books Online

When you see a Safari Books Online icon on the cover of your favorite technology book, it means the book is available online through the O’Reilly Network Safari Bookshelf.

Safari offers a solution that’s better than e-books. It’s a virtual library that lets you search thousands of top tech books easily, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at http://my.safaribooksonline.com.

Acknowledgments

Before diving in, I want to thank my favorite collaborator, Zevan Rosser, who created the art for the portfolio project. Any time I can rope Zevan into something I’m doing, I’ll come out looking good.

I’d also like to thank Lee Brimelow for donating his time and effort to writing the foreword for this book. I’ve always felt that Lee and I shared similar goals when it came to teaching, and his video tutorials and selfless contributions to the Flash community have consistently inspired me. When I grow up, I want to be just like Lee.

On the next pedestal, I seat the O’Reilly crew that made this book possible (it’s a big pedestal). Many thanks to Laurel Ackerman, Ron Bilodeau, Dan Brodnitz, Suzanne Caballero, Michele Filshie, Dennis Fitzgerald, Edie Freedman, Julie Hawks, Marsee Henon, Linda Laflamme, Mike Leonard and the O’Reilly sales team, Chris Meredith, Rachel Monaghan, Karen Montgomery, Mark Paglietti, Sara Peyton, Marlowe Shaeffer, Amy Thomson, Rachel Thurow, Betsy Waliszewski, Chris Walker, Steve Weiss, Joe Wikert, and Adam Witwer. Honestly, I can think of a few reasons why this crowd should throw their hands up and be done with me.

Included in the list of contributors to this book are my indispensible tech editors, Anselm Bradford and Thomas Yeh, and beta readers Wei-Chu Chen (Beryl), Aaron Crouch, Rajiv Ganesan, Valerie Guinn, Steven Mattson Hayhurst, and Anita Ramroop.

I would also like to thank:

  • Mark Anders, Mike Chambers, Jen deHaan, Mike Downey, Richard Galvan, Mally Gardiner, Jeff Kamerer, San Khong, Sean Kranzberg, John Mayhew, Ted Patrick, Nivesh Rajbhandari, and all at Adobe.

  • Bruce Wands, Joe Dellinger, Russet Lederman, Jaryd Lowder, Diane Field, The School of Visual Arts, and all of my students.

  • Paul Kent, Kathy Moran, and IDG; John Davey and Flash on the Beach; Dave Schroeder and Flashbelt; Chris and Rebecca Allen and Flash on Tap; Susan Horowitz, William Morrison, Colin Macdonald, and all at University of Hawaii’s Outreach program.

  • Hudson Ansley, Jean-Charles Carelli, Colin Holgate, Tyler Larson, Lisa Larson-Kelley, and all at FlashCodersNY.

  • Aral Balkan, Pete Barr-Watson, Brendan Dawes, Peter Elst, Brandan Hall, Mario Klingemann, Seb Lee-Delisle, Ralph Hauwert, Thibault Imbert, André Michelle, Dom Minns, Erik Natzke, Keith Peters, Darren Schall, Senocular, Sephiroth, Grant Skinner, Geoff Stearns, David Stiller, Craig Swann, Jared Tarbell, Tink, Josh Tynjala, Carlos Ulloa, and no doubt others that I’m forgetting, for support and/or inspiration.

  • The Jungle, and any pals I still have after such shameful neglect (I promise, it’s nothing personal).

  • Most importantly, I’d like to thank my immediate family: Jodi Rotondo, Sally Shupe, and Claire Shupe, as well as ankle-biter wrangler and long-time friend Mike Wills; Steve Shupe and Cindy Shupe; and Brian Shupe and Abigail Janssens; for allowing me to spend so much time writing. I also owe a big dose of gratitude to my extended family for supporting me even when I’m thankless.

Len, Cass, Ry, and Annabel.... All the best!

About the Author

Rich Shupe is the founder and president of FMA—a full-service multimedia development company and training facility in New York City. Rich teaches a variety of digital technologies in academic and commercial environments, and has frequently lectured on these topics at Flash on the Beach, Flashbelt, Flash on Tap, FlashForward, Macworld, and other national and international events. He is a faculty member of New York’s School of Visual Arts’ MFA Computer Art Department. Rich is also the author or coauthor of multiple books, including Learning ActionScript 3.0 (O’Reilly), The ActionScript 3.0 Quick Reference Guide (O’Reilly), Flash CS3 Professional Video Training Book (Peachpit Press), CS3 Web and Design Workflow Guides (Adobe). He also presents video training on Flash and other topics for Lynda.com. Visit Rich’s website at http://www.fmaonline.com.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The text font is Linotype Birka; the heading font is Adobe Myriad Pro; and the code font is LucasFont’sTheSansMonoCondensed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset