1. Trang chủ
  2. » Công Nghệ Thông Tin

Flash CS5 THE MISSING MANUAL phần 1 pdf

85 343 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tác giả Chris Grover
Thành phố Beijing
Định dạng
Số trang 85
Dung lượng 3,96 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

1 Part One: Creating a Flash Animation Chapter 1: Getting Around Flash.. Recent and upcoming titles include: Access 2007: The Missing Manual by Matthew MacDonald Access 2010: The Missing

Trang 3

Flash CS5 THE MISSING MANUAL

The book that

should have been

Trang 5

Flash CS5

Beijing  •  Cambridge  •  Farnham  •  Köln  •  Sebastopol  •  Taipei  •  Tokyo

Chris Grover

Trang 6

by Chris Grover

Copyright © 2010 Chris Grover All rights reserved

Printed in the United States of America

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,

Sebastopol, CA 95472

O’Reilly Media books may be purchased for educational, business, or sales promotional use

Online editions are also available for most titles: http://my.safaribooksonline.com For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@

oreilly.com.

May 2010: First Edition

The Missing Manual is a registered trademark of O’Reilly Media, Inc The Missing Manual logo, and “The book that should have been in the box” are trademarks of O’Reilly Media, Inc Many

of the designations used by manufacturers and sellers to distinguish their products are claimed

as trademarks Where those designations appear in this book, and O’Reilly Media is aware of a trademark claim, the designations are capitalized

While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained in it

This book uses a durable and flexible lay-flat binding

ISBN: 978-1-449-38025-0

[M]

Trang 7

Table of Contents

The Missing Credits xv

Introduction 1

Part One: Creating a Flash Animation Chapter 1: Getting Around Flash 13

Starting Flash 13

A Tour of the Flash Workspace 18

Menu Bar 20

The Stage 20

The Timeline 21

Panels and Toolbars 22

Toolbars 24

Tools Panel 25

Properties Panel 27

Library Panel 28

Other Flash Panels 29

The Flash CS5 Test Drive 32

Open a Flash File 32

Explore the Properties Panel 33

Resize the Stage 34

Zoom In and Out 36

Make It Move 37

Play an Animation 38

Save a File 39

Chapter 2: Creating Simple Drawings 41

Plan Before You Draw 41

Creating a Storyboard 42

Five Questions for a Better Result 43

Trang 8

vi table of contents

Setting Document Properties 46

Adding Measurement Guides 49

Drawing a Shape 50

Choosing a Drawing Mode 53

Merge Drawing Mode 53

Object Drawing Mode 55

Using Merge Mode and Object Mode Together 57

Selecting Objects on the Stage 58

Essential Drawing Terms 60

Creating Original Artwork 61

Drawing and Painting with Tools 62

Aligning Objects with the Align Tools 74

Erasing Mistakes with the Eraser Tool 75

Copying and Pasting Drawn Objects 78

Adding Color 79

Changing the Color of a Stroke (Line) 80

Changing the Color of a Fill 83

Chapter 3: Animate Your Art 87

Frame-by-Frame Animation 87

Creating a Frame-by-Frame Animation 88

Test Your Frame-by-Frame Animation 92

Editing Your Frame-by-Frame Animation 93

Selecting Frames and Keyframes 94

Inserting and Deleting Keyframes and Frames 95

Making It Move with Motion Tweens 98

Tweening a Symbol’s Dimension Properties 102

Copying and Pasting Frames 104

Reversing Frames in a Frame Span 106

Editing the Motion Path 107

Moving the Motion Path 107

Adding Curves to the Motion Path 108

Moving End Points on the Motion Path 109

Copying and Pasting a Motion Path 109

Copying and Pasting Properties 110

Shape Tweening (Morphing) 111

Shape Hints 115

Using Multiple Layers for Shape Tweens 117

Classic Tween 118

Trang 9

Part Two: Advanced Drawing and Animation

Chapter 4: Organizing Frames and Layers 121

Working with Frames 121

Copying and Pasting Frames 121

Moving Frames and Keyframes 124

Editing Multiple Frames 126

Working with Multiple Layers 129

Showing and Hiding Layers 133

Working with Layers 135

Renaming Layers 136

Copying and Pasting Layers 138

Reordering (Moving) Layers 139

Deleting a Layer 140

Locking and Unlocking Layers 141

Organizing Layers 142

Outline View 142

Organizing Layers with Folders 143

Spotlight Effect Using Mask Layers 145

Chapter 5: Advanced Drawing and Coloring 149

Selecting Graphic Elements 149

The Selection Tool 151

The Subselection Tool 156

The Lasso Tool 159

Manipulating Graphic Elements 163

Modifying Object Properties 163

Moving, Cutting, Pasting, and Copying 164

Transforming Objects 166

Moving and Rotating Objects in 3-D 173

Stacking Objects 178

Converting Strokes to Fills 181

Aligning Objects 183

Spray Painting Symbols 187

Drawing with the Deco Tool 188

Advanced Color and Fills 190

Color Basics 190

RGB and HSB 191

Creating Custom Colors 191

Specifying Colors for ActionScript 195

Saving Color Swatches 196

Using an Image As a Fill “Color” 197

Trang 10

viii table of contents

Importing a Custom Color Palette 203

Copying Color with the Eyedropper 204

Chapter 6: Choosing and Formatting Text 209

Text Questions 210

Choosing TLF or Classic Text 210

Choose a Text Type 211

About Typefaces and Fonts 213

Adding Text to Your Document 213

Changing Text Position, Height, and Width 216

Rotating, Skewing, and Moving in 3-D 217

Changing Text Color 217

Creating a Text Hyperlink 218

Creating a Hyperlink Using Classic Text 219

Choosing and Using Text Containers 220

Creating Vertical Text Containers 221

Multiline and Single-Line Text Containers 222

Applying Advanced Formatting to Text 223

Create a Multi-Column Text Container 224

Flow Text from One Container to Another 225

Animating Text Without ActionScript 226

Experimenting with Animated Text 230

Moving Text in Three Dimensions 230

Text Properties by Subpanel 232

Text Engine Properties 232

Position and Size 232

3D Position and View (TLF Text Only) 233

Character 233

Advanced Character (TLF Text Only) 235

Paragraph 236

Options (Classic Text Only) 236

Container and Flow (TLF Text Only) 236

Color Effect (TLF Text Only) 237

Display (TLF Text Only) 237

Filters 237

Chapter 7: Reusable Flash: Symbols and Templates 239

Symbols and Instances 240

Graphic Symbols 241

Multiframe Graphic Symbols 255

Movie Clip Symbols 259

Button Symbols 264

Templates 274

Opening a Prebuilt Template 276

Customizing the Photo Album Template 278

Trang 11

Chapter 8: Advanced Tweens with the Motion Editor 287

Applying Motion Presets 287

Saving a Custom Motion Preset 290

Modifying a Motion Preset 291

Changing the Motion Path 292

Deleting a Motion Path 294

Copying and Pasting a Motion Path 294

Orienting Tweened Objects to a Motion Path 296

Swapping the Tweened Object 298

Editing a Tween Span 299

Viewing and Editing Property Keyframes in the Timeline 300

Copying Properties Between Property Keyframes 302

A Tour of the Motion Editor 302

Workflow for Common Tweens 304

Adding and Removing Property Keyframes 305

Moving Property Keyframes 306

Fine-Tuning Property Changes 306

Adding and Removing Color Effects 307

Using Filters in Tweens 307

Customizing Your Motion Editor View 308

Changing Transparency with the Motion Editor 310

Easing Tweens 312

Applying an Ease Preset 312

Creating a Custom Ease Preset 315

Chapter 9: Realistic Animation with IK Bones 317

Linking Symbols with Bones 318

Changing the Pose Layer 322

Creating Branching Armatures 324

Controlling the Degree of Rotation 326

Moving Bones 327

Repositioning Symbol Instances 330

Changing the Length of a Bone 330

Deleting Bones 330

Making Shapes Move with Bones 332

Working with Control Points 333

Apply Spring to a Motion 335

Animating an Armature with ActionScript 338

Chapter 10: Incorporating Non-Flash Media Files 339

Importing Graphics 339

Importing Illustrator Graphics Files 343

Importing Photoshop Graphic Files 347

Importing Fireworks Graphics 350

Import Options for Graphics 353

Copying Fireworks Effects and Blends 353

Trang 12

x table of contents

Importing a Series of Graphics Files 356

Exporting Graphics from Flash 358

Chapter 11: Incorporating Sound and Video 361

Incorporating Sound 362

Importing Sound Files 362

Adding an Imported Sound to a Frame (or Series of Frames) 364

Editing Sound Clips in Flash 369

Incorporating Video 370

Encoding: Making Flash Video Files 372

Encoding Part of a Video Clip 376

Resizing and Cropping a Video Clip 377

Adding Cue Points to Your Video 380

Choosing a Video Codec 381

Other Techniques for Reducing Video File Sizes 383

Preparing to Import Video Files 384

Importing Video Files 385

Importing a Flash Video File Stored on Your Computer 385

Importing a Flash Video from the Web 391

Customizing the Video Playback Component 391

Part Three: Adding Interactivity Chapter 12: Introduction to ActionScript 3 395

Getting to Know ActionScript 3 396

The Flash/ActionScript Partnership 396

ActionScript 3 397

ActionScript vs JavaScript and Other Languages 397

ActionScript 3 Spoken Here 399

Beginning Your ActionScript Project 400

Writing ActionScript Code in the Timeline 403

Using the Script Pane Toolbar 404

Writing Code in an ActionScript File 405

Object-Oriented Thinking 407

ActionScript Classes 409

Changing an Object’s Properties 409

Functions and Methods Put the Action in ActionScript 413

Events 416

Using Data Types, Variables, and Constants 417

Numbers 417

Strings 419

Boolean 420

Arrays 420

ActionScript Built-in Data Types 421

Trang 13

Variables 421

Constants 423

Conditionals and Loops 423

Conditionals: if() and switch() Statements 423

Loops: while() and for() Statements 425

Combining ActionScript’s Building Blocks 427

Chapter 13: Controlling Actions with Events 429

How Events Work 429

Mouse Events 431

Getting Help for Events and Event Listeners 434

Creating a Rollover with a Mouse Event 435

Add Statements to an Event Listener 439

Creating a Tabbed Window with Mouse Events 441

Setting the Stage for Tabbed Folder Display 441

Planning Before Coding 445

Copy-and-Tweak Coding 452

Keyboard Events and Text Events 455

Using Event Properties 456

Capturing Text Input with TextEvent 459

Keeping Time with TimerEvent 460

Removing Event Listeners 461

In Case of Other Events 462

Chapter 14: Organizing Objects with the Display List 463

The Display List: Everything in Its Place 463

When Display Objects are Display Object Containers 464

Adding Objects to the Display List 465

Add a Second Object to the Display List 467

Using trace() to Report on the Display List 470

Placing Objects Inside Display Containers 472

Moving Objects from One Container to Another 476

Removing Objects from the Display List 479

Managing the Stacking Order 481

Adding Display Objects by Index Position 482

Removing Display Objects by Index Position 484

Getting the Name or Index Position of a Display Object 485

Swapping the Position of Two Children 487

Summary of Properties and Methods 487

DisplayObjectContainer Properties 488

DisplayObjectContainer Methods 489

Chapter 15: Controlling the Timeline and Animation 493

Slowing Down (or Speeding Up) Animation 493

Setting a Document Frame Rate 495

Setting a Frame Rate with ActionScript 497

Trang 14

xii table of contents

Using ActionScript to Start a Timeline 500

Organizing Your Animation 501

Working with Labeled Frames 502

Working with Scenes 508

Looping a Series of Frames 514

Reversing a Series of Frames 515

Reversing Frames in the Timeline 516

Chapter 16: Components for Interactivity 519

Adding Components 520

Making Button Components Work with ActionScript 526

Modifying Components in the Properties Panel 528

Adding a ColorPicker Component 530

The Built-In Components 533

User Interface Components 534

Finding Additional Components 551

Chapter 17: Choosing, Using, and Animating Text 555

What Font Does Your Audience Have? 555

Embedding Fonts in Your SWF file 556

Controlling Text with ActionScript 559

ActionScript Text: String Theory 559

Creating a New String 560

Joining Strings 560

Using TextField’s appendText() Method 561

Adding Line Breaks to a String 562

Finding a String Within a String 563

Replacing Words or Characters in a String 564

Converting Strings to Uppercase or Lowercase 564

Creating Text Fields with ActionScript 565

Positioning, Sizing, and Formatting a Text Field 566

Formatting the Text Field’s Background and Border 566

Adjust the Space Between Text and Border 567

Autosizing a Text Field 568

Formatting Characters and Paragraphs 569

Formatting with HTML and CSS 572

HTML and CSS Philosophical Differences 572

Using HTML Text in Flash 573

Creating a Hyperlink with HTML 574

Using CSS to Format Classic Text in Flash 574

Formatting Text with an External CSS File 577

Choosing the Right Text Formatting System 580

Trang 15

Chapter 18: Drawing with ActionScript 581

What’s the Point? 581

Beginning with the Graphics Class 585

Drawing Lines 586

Drawing Curves 589

Drawing Built-in Shapes 591

Drawing Irregular Shapes 594

Making Drawings Move 595

Using ActionScript’s TimerEvent to Animate Drawings 595

Moving Objects Independently 597

Shape, Sprite, and Movie Clip for Drawings 599

Removing Lines and Shapes 600

Part Four: Debugging and Delivering Your Animation Chapter 19: Testing and Debugging Your Animation 605

Testing Strategies 605

Planning Ahead 606

Techniques for Better Testing 607

Testing on the Stage 609

Testing in Flash Player 611

Testing Inside a Web Page 612

Testing Download Time 615

Simulating Downloads 615

The Art of Debugging 620

Checking with the Syntax Checker 622

Finding Errors with the Compiler Errors Panel 624

Using the Output Panel and trace() Statement 625

Analyzing Code with the Debugger 630

Setting and Working with Breakpoints 632

Chapter 20: Publishing and Exporting 637

Optimizing Flash Documents 638

Ten Optimization Strategies 640

Publishing Your Animations 645

Publishing as a Compiled Flash (.swf) File 647

Publishing As a Web Page 653

Publishing a Frame as a Static Image File 659

Publishing as an Animated GIF 666

Publishing As a Standalone Projector 668

Exporting Flash to Other Formats 669

Exporting the Contents of a Single Frame 669

Exporting an Entire Animation 671

Trang 16

xiv table of contents

Meet Adobe AIR 673

Differences Between AIR and Flash 675

Creating Your First AIR Application 676

Create a Code Signing Certificate 678

Convert a Flash Animation to AIR 680

Publish Your AIR Application 683

Manually Install Adobe AIR Runtime 686

Part Five: Appendixes Appendix A: Installation and Help 689

Appendix B: Flash Professional CS5, Menu by Menu 701

Index 739

Trang 17

The Missing Credits

About the Author

Chris Grover is a veteran of the San Francisco Bay Area

adver-tising and design community, having worked for over 25 years in print, video, and electronic media He has been using and writing about computers from the day he first fired up is Kaypro II Chris

is the owner of Bolinas Road Creative (www.BolinasRoad.com),

an agency that helps small businesses promote their products and

services He’s also the author of Premiere Elements 8: The Missing Manual, Google

SketchUp: The Missing Manual, Flash CS4: The Missing Manual, and Word 2007:

The Missing Manual.

About the Creative Team

Nan Barber (editor) has been working on the Missing Manual series since its

in-ception She lives in Massachusetts with her husband and various Apple products

Email: nanbarber@oreilly.com.

Julie Van Keuren (copy editor) is a freelance editor, writer, and desktop publisher

who runs her “little media empire” from her home in Billings, Montana In her

spare time she enjoys swimming, biking, running, and (hey, why not?) triathlons

Email: little_media@yahoo.com.

Rachel Monaghan (production editor) lives with her husband, John, in Nashville,

where they enjoy exploring their neighborhood, watching HBO, and harassing

their two cats, Henry and Olive She has been with O’Reilly since 2005 Email:

rachel@oreilly.com.

Trang 18

xvi the missing credits

Style

Ellen Troutman Zaig (indexer) is a freelance indexer who has eleven years’ experience

in back-of-the-book indexing She specializes in topics in computer technology; in addition, she has indexed college textbooks in many subject areas

Keith Gladstien (technical reviewer) is a prolific contributor to the Adobe Flash

Forums who has been using Flash since version 4 He has a background in matics (PhD, Purdue) and medicine (MD, Yale) and has created hundreds of Flash

mathe-applications for clients worldwide Website: www.kglad.com.

Tina Spargo (technical reviewer), her husband (and professional musician) Ed, their

preschooler Max, their two silly Spaniels, Parker (Clumber), and Piper (Sussex), all share time and space in their suburban Boston home Tina juggles being an at-home mom with promoting and marketing Ed’s musical projects and freelancing as a virtual assistant Tina has over 20 years’ experience supporting top-level executives in a vari-

ety of industries Website: www.tinaspargo.com.

Acknowledgements

Thanks to all the pros on the Missing Manual team who worked to get this book into your hands A special thanks again to Nan Barber, whose skill, patience, and planning has guided several of my books from concept to printing press Thanks also to Karen Shaner who helped coordinate the manuscript files flying back and forth and to Julie Van Keuren for her copy editing eagle eye Speaking of eagle eyes, many thanks to Tina Spargo, one of my technical reviewers, for taking a fresh look at the text and exercises in this book A special thanks to Keith Gladstien for his technical review and thoughts on Flash His experience as a Flash master was much appreciated Thanks again to Joyce, my wife, whose love, proofreading, and understanding help me in everything I do

The Missing Manual Series

Missing Manuals are witty, superbly written guides to computer products that don’t come with printed manuals (which is just about all of them) Each book features a handcrafted index; cross-references to specific pages (not just chapters); and Rep-Kover, a detached-spine binding that lets the book lie perfectly flat without the as-sistance of weights or cinder blocks

Recent and upcoming titles include:

Access 2007: The Missing Manual by Matthew MacDonald Access 2010: The Missing Manual by Matthew MacDonald Buying a Home: The Missing Manual by Nancy Conner CSS: The Missing Manual, Second Edition, by David Sawyer McFarland Creating a Web Site: The Missing Manual, Second Edition, by Matthew MacDonald David Pogue’s Digital Photography: The Missing Manual by David Pogue

Trang 19

Dreamweaver CS4: The Missing Manual by David Sawyer McFarland

Dreamweaver CS5: The Missing Manual by David Sawyer McFarland

Excel 2007: The Missing Manual by Matthew MacDonald

Excel 2010: The Missing Manual by Matthew MacDonald

Facebook: The Missing Manual, Second Edition, by E.A Vander Veer

FileMaker Pro 10: The Missing Manual by Susan Prosser and Geoff Coffey

FileMaker Pro 11: The Missing Manual by Susan Prosser and Stuart Gripman

Flash CS4: The Missing Manual by Chris Grover with E.A Vander Veer

Google Apps: The Missing Manual by Nancy Conner

The Internet: The Missing Manual by David Pogue and J.D Biersdorfer

iMovie ’08 & iDVD: The Missing Manual by David Pogue

iMovie ’09 & iDVD: The Missing Manual by David Pogue and Aaron Miller

iPad: The Missing Manual by J.D Biersdorfer and David Pogue

iPhone: The Missing Manual, Second Edition, by David Pogue

iPhone App Development: The Missing Manual by Craig Hockenberry

iPhoto ’08: The Missing Manual by David Pogue

iPhoto ’09: The Missing Manual by David Pogue and J.D Biersdorfer

iPod: The Missing Manual, Eighth Edition, by J.D Biersdorfer and David Pogue

JavaScript: The Missing Manual by David Sawyer McFarland

Living Green: The Missing Manual by Nancy Conner

Mac OS X: The Missing Manual, Leopard Edition, by David Pogue

Mac OS X Snow Leopard: The Missing Manual by David Pogue

Microsoft Project 2007: The Missing Manual by Bonnie Biafore

Microsoft Project 2010: The Missing Manual by Bonnie Biafore

Netbooks: The Missing Manual by J.D Biersdorfer

Office 2007: The Missing Manual by Chris Grover, Matthew MacDonald, and

E.A Vander Veer

Office 2010: The Missing Manual by Nancy Connor, Chris Grover, and Matthew

MacDonald

Office 2008 for Macintosh: The Missing Manual by Jim Elferdink

Palm Pre: The Missing Manual by Ed Baig

Trang 20

xviii the missing credits

PCs: The Missing Manual by Andy Rathbone Personal Investing: The Missing Manual by Bonnie Biafore Photoshop CS4: The Missing Manual by Lesa Snider Photoshop CS5: The Missing Manual by Lesa Snider Photoshop Elements 7: The Missing Manual by Barbara Brundage Photoshop Elements 8 for Mac: The Missing Manual by Barbara Brundage Photoshop Elements 8 for Windows: The Missing Manual by Barbara Brundage PowerPoint 2007: The Missing Manual by E.A Vander Veer

Premiere Elements 8: The Missing Manual by Chris Grover QuickBase: The Missing Manual by Nancy Conner

QuickBooks 2010: The Missing Manual by Bonnie Biafore QuickBooks 2011: The Missing Manual by Bonnie Biafore Quicken 2009: The Missing Manual by Bonnie Biafore Switching to the Mac: The Missing Manual, Leopard Edition, by David Pogue Switching to the Mac: The Missing Manual, Snow Leopard Edition, by David Pogue Wikipedia: The Missing Manual by John Broughton

Windows XP Home Edition: The Missing Manual, Second Edition, by David Pogue Windows XP Pro: The Missing Manual, Second Edition, by David Pogue, Craig

Zacker, and Linda Zacker

Windows Vista: The Missing Manual by David Pogue Windows 7: The Missing Manual by David Pogue Word 2007: The Missing Manual by Chris Grover Your Body: The Missing Manual by Matthew MacDonald Your Brain: The Missing Manual by Matthew MacDonald Your Money: The Missing Manual by J.D Roth

Trang 21

Flash’s evolution is unique, even for the fast-changing computer software world

First released in 1996 under the name FutureSplash, it was a tool for creating web-based animations It’s still the “go to” application for that job; however, along the way it’s acquired new capabilities Today, Flash powers video websites

like YouTube and Hulu (Figure I-1) It’s used to develop desktop applications like

eBay Desktop As you read this, Flash/ActionScript pros are developing the next

generation of apps for handheld devices like the Droid and perhaps the iPhone

Flash has grown up with the World Wide Web and managed to carve out an

im-portant niche In fact, there are a whole slew of programs that make use of Flash

technology They include Flex, Flash Builder, and Flash Catalyst Still, if you want to

learn Flash’s design and animation features as well as its programming and

develop-ment features, then Flash Professional CS5 is the place to start

Figure I-1:

Sites like Hulu and YouTube have made great use of Flash’s video abilities You can check any site to see whether it’s using Flash behind the scenes Just right-click (or Control-click)

an image that you think might

be Flash If it says “About Flash Player” at the bottom of the pop-up menu, you guessed right.

Trang 22

2 Flash CS5: The Missing Manual

Here are just some of the things you can do with Flash:

• Animate You can create original artwork using Flash’s tools, or you can add

images from your other favorite programs Flash recognizes the most common image, video, and sound file formats Once your artwork is in Flash, you can add motion, sound, and dazzling effects Surely you’ve spent some quality time watching JibJab cartoons (Figure I-2)

Figure I-2:

With a little creativity, your Flash animations can capture the public’s atten- tion Just ask the folks at JibJab.

• Multimedia websites Today’s websites aren’t static They include motion, video,

background music, and above all interactive objects Flash’s built-in ming language, ActionScript, was designed to create interactive objects You can create eye-catching, attention-grabbing websites with Flash It’s your choice whether you sprinkle Flash bits on various pages or go whole-hog and develop

program-a 100 percent Flprogram-ash site

• Tutorials Web-based training courses, which often include a combination of

text, drawings, animations, video clips, and voice-overs, are a natural fit for Flash By hooking Flash up to a server on the back end, you can even present your audience with graded tests and up-to-the-minute product information You don’t have to deliver your tutorials over the web, though; you can publish them as standalone projector files (Chapter 20) or AIR applications (Chapter 21) and deliver them to your students via CDs or DVDs

Trang 23

• Code snippets are great for when you need to build something quickly

Snip-pets are cut-and-paste bits of code that you can drop into your ActionScript programs Organized by topic and function—like Timeline Navigation, Event Handlers, or Audio and Video—snippets are great learning tools

• Code hinting is another area where ActionScript has improved Turn code

hinting on, and the Actions panel offers truly helpful suggestions as you write your code It’s easy to use the hints or to ignore them It’s your call

Workflow improvements Adobe wants you to use its entire suite of programs

when you create your masterpiece, so with each version, it improves the way Flash works with other programs like Photoshop, Illustrator, and InDesign Newer tools like Flex, Flash Builder, and Flash Catalyst make it easier for teams of designers and programmers to divvy up application development chores

AIR (Adobe Integrated Runtime) is used to develop desktop applications It’s

now easier to create and publish AIR applications in Flash You’ll find the details

in Chapter 21

Packaging applications for the iPhone For years, developers have used Flash

to build applications for handheld devices Flash Professional CS5 includes a packager designed specifically for the iPhone It turns out that Apple doesn’t want developers creating apps with tools like Flash, so at the time this was writ-ten, the usefulness of this feature was up in the air

With Flash on your computer, you have the equivalent of a design studio at your fingertips You provide the inspiration, and Flash can help you generate pro-quality animations and full-blown interactive applications

It’s pretty incredible, when you think about it A few hundred bucks and a few hours spent working with Flash, and you’ve got an animation that, just a few years ago, you’d have had to pay a swarm of professionals union scale to produce Sweet! Natu-rally, if you’re new to animation, it will go easier if you learn the basic terms, tricks, and techniques used by Flash animators

Trang 24

Introduction

Up To Speed

An Animation by Any Other Name

You may occasionally hear Flash animations referred to (by

books, websites, and even Flash’s own documentation) as

movies Perhaps that’s technically accurate, but it sure can

be confusing.

QuickTime’s mov files are also called movies, and some

people refer to video clips as movies; but to Flash, these

are two very different animals In addition, Flash lets you

create and work with movie clips, which are something else

entirely And “movie,” with its connotations of quietly sitting

in a theater balcony eating popcorn, doesn’t convey one of the most important features Flash offers: interactivity

Here’s the most accurate way to describe what you ate using Flash: a website or program with a really cool, animated interface Unfortunately, that description is a bit long and unwieldy, so in this book, what you create using Flash is called an animation.

cre-Flash in a Nutshell

Say you work for a company that does custom auto refinishing First assignment:

Design an intro page for the company’s new website You have the following idea for

an animation:

The first thing you want your audience to see is a beat-up jalopy limping along a

city street toward the center of the screen, where it stops and morphs into a shiny,

like-new car as your company’s jingle plays in the background A voice-over informs

your audience that your company has been in business for 20 years and offers the

best prices in town

Across the top of the screen, you’d like to display the company logo, as well as a

navigation bar with buttons—labeled Location, Services, Prices, and Contact—that

your audience can click to get more information about your company But you also

want each part of the car to be a clickable hotspot That way, when someone clicks

one of the car’s tires, he’s whisked off to a page describing your custom wheels and

hubcaps; when he clicks the car’s body, he sees prices for dent repair and repainting;

and so on

Here’s how you might go about creating this animation in Flash:

• Using Flash’s drawing tools, you draw the artwork for every keyframe of the

animation—that is, every important image For example, you’ll need to create a

keyframe showing the beat-up junker and a second keyframe showing the

gleam-ing, expertly refurbished result (Chapter 2 shows you how to draw artwork in

Flash; Chapter 3 tells you everything you need to know about keyframes.)

• Within each keyframe, you might choose to separate your artwork into different

layers Like the see-through plastic cels that professional animators used in the

old days, layers let you create images separately and then stack them on top of

one another to make a single composite image For example, you might choose

to put the car on one layer, your company logo on a second layer, and your

Trang 25

city-street background on a third layer That way, you can edit and animate each layer independently, but when the animation plays, all three elements appear to

be on one seamless layer (Chapter 4 shows you how to work with layers.)

• Through a process called tweening, you tell Flash to fill in each and every frame

between the keyframes to create the illusion of the junker turning slowly into

a brand-new car Flash carefully analyzes all the differences between the frames and does its best to build the interim frames, which you can then tweak or—if Flash gets it all wrong—redraw yourself (Chapter 3 introduces tweens, and Chapter 8 gives you the lowdown on advanced techniques.)

key-• As you go along, you might decide to save a few of the elements you create (for example, your company logo) so you can reuse them later There’s no sense in reinventing the wheel, and in addition to saving you time, reusing elements actually helps keep your animation files as small and efficient as possible (See Chapter 7 for details on creating and managing reusable elements.)

• Add the background music and voice-over audio clips, which you’ve created in other programs (Chapter 11)

• Create the navigation bar buttons and hotspots and other ways for your ence to interact with your animation (Chapters 12–18)

audi-• Test your animation (Chapter 19) and tweak it to perfection

• Finally, when your animation is just the way you want it, you’re ready to publish

it Without leaving the comfort of Flash, you can convert the editable fla file you’ve been working with into a noneditable swf file and either embed it into

an HTML file or create a standalone projector file that your audience can run

without having to use a browser Chapter 20 tells you everything you need to know about publishing

The scenario described above is pretty simple, but it covers the basic steps you need

to take when creating any Flash animation

The Very Basics

You’ll find very little jargon or nerd terminology in this book You will, however, encounter a few terms and concepts that you’ll use frequently in your computing life:

• Clicking This book gives you three kinds of instructions that require you to use

your computer’s mouse or trackpad To click means to point the arrow cursor at

something on the screen and then—without moving the cursor at all—to press

and release the left clicker button on the mouse (or laptop trackpad) To

double-click, of course, means to click twice in rapid succession, again without moving

the cursor at all And to drag means to move the cursor while pressing the left

button continuously

• Keyboard shortcuts Every time you take your hand off the keyboard to move

the mouse, you lose time and potentially disrupt your creative flow That’s why

Trang 26

Introduction

many experienced computer fans use keystroke combinations instead of menu

commands wherever possible Ctrl+B (c-B), for example, is a keyboard

short-cut for boldface type in Flash (and most other programs)

When you see a shortcut like Ctrl+S (c-S) (which saves changes to the current

document), it’s telling you to hold down the Ctrl or c key, and, while it’s down,

type the letter S, and then release both keys

• Choice is good Flash frequently gives you several ways to trigger a particular

command—by choosing a menu command, or by clicking a toolbar button, or

by pressing a key combination, for example Some people prefer the speed of

keyboard shortcuts; others like the satisfaction of a visual command array

avail-able in menus or toolbars This book lists all the alternatives, but by no means

are you expected to memorize all of them

About This Book

Despite the many improvements in software over the years, one feature has grown

consistently worse: documentation With the purchase of most software programs

these days, you don’t get a single page of printed instructions To learn about the

hundreds of features in a program, you’re expected to use online electronic help

But even if you’re comfortable reading a help screen in one window as you try

to work in another, something is still missing At times, the terse electronic help

screens assume you already understand the discussion at hand and hurriedly skip

over important topics that require an in-depth presentation In addition, you don’t

always get an objective evaluation of the program’s features (Engineers often add

technically sophisticated features to a program because they can, not because you

need them.) You shouldn’t have to waste your time learning features that don’t help

you get your work done

The purpose of this book, then, is to serve as the manual that should have been in

the box In this book’s pages, you’ll find step-by-step instructions for using every

Flash feature, including those you may not have quite understood, let alone

mas-tered, such as working with video or drawing objects with ActionScript In addition,

you’ll find clear evaluations of each feature that help you determine which ones are

useful to you, as well as how and when to use them

Note: This book periodically recommends other books, covering topics that might interest Flash designers

and developers Careful readers may notice that not every one of these titles is published by Missing

Manual parent O’Reilly Media While we’re happy to mention other Missing Manuals and books in the

O’Reilly family, if there’s a great book out there that doesn’t happen to be published by O’Reilly, we’ll still

let you know about it

Flash CS5: The Missing Manual is designed for readers of every skill level, except

the super-advanced programmer If Flash is the first image creation or animation

program you’ve ever used, you’ll be able to dive right in using the explanations and

Trang 27

examples in this book If you come from an animation or multimedia background, you’ll find this book a useful reference for unique Flash topics such as the motion tweens and the Motion Editor The primary discussions are written for advanced-beginner or intermediate computer users But if you’re a first-timer, special sidebar articles called Up to Speed provide the introductory information you need to under-stand the topic at hand If you’re an advanced user, on the other hand, keep your eye out for similar shaded boxes called Power Users’ Clinic They offer more technical tips, tricks, and shortcuts for the experienced Flash fan The Design Time boxes explain the art of effective multimedia design

The ActionScript programming language is a broad, complex subject This book isn’t

an exhaustive reference manual, but it gives you a great introduction to ActionScript programming, providing working examples and clear explanations of ActionScript principles

Macintosh and WindowsFlash Professional CS5 works almost precisely the same in its Macintosh and Win-dows versions You’ll find the same buttons in almost every dialog box Occasionally, they’ll be dressed up differently In this book, the illustrations have been given even-handed treatment, rotating between Windows 7 and Mac OS X

Shortcut keys are probably the area where the Mac and Windows versions differ the most Often where Windows uses the Ctrl key, Macs use the c key You’ll find some other relatively minor differences, too

Whenever this book refers to a key combination, you’ll see the Windows keystroke listed first (with + symbols, as is customary in Windows documentation); the Macintosh keystroke follows in parentheses (with - symbols, in time-honored Mac fashion) In other words, you might read, “The keyboard shortcut for saving a file is Ctrl+S (c-S).”

About the Outline

Flash CS5: The Missing Manual is divided into five parts, each containing several

chapters:

• Part One: Creating a Flash Animation guides you through the creation of your

very first Flash animation, from the first glimmer of an idea to drawing images, animating those images, and testing your work

• Part Two: Advanced Drawing and Animation is the designer’s feast Here you’ll

see how to manipulate your drawings by rotating, skewing, stacking, and ing them; how to add color, special effects, and multimedia files like audio and video clips; how to slash file size by turning bits and pieces of your drawings into special elements called symbols; and how to create composite drawings using layers Text is an increasingly important part of Flash animations and applica-tions, so this section introduces important text topics In Part Three, you’ll learn

Trang 28

Introduction

how ActionScript works with text In this section, you’ll learn about the Motion

Editor and how to use the inverse kinematics (“Bones”) feature (Chapter 9)

• Part Three: Adding Interactivity shows you how to add ActionScript 3.0

actions to your animations, creating on-the-fly special effects and giving your

audience the power to control your animations An entire chapter is devoted to

predesigned components, like buttons, checkboxes, sliders, and scrolling lists

Powerful but easy to use, these components give your animation professional

functions and style This section includes lots of examples and ActionScript

code You can copy and modify some of the practical examples for your own

projects You’ll see how to loop frames and how to let your audience choose

which section of an animation to play, and how to customize the prebuilt

interactive components that come with Flash You’ll find specific chapters on

using ActionScript with text and using ActionScript to draw

• Part Four: Debugging and Delivering Your Animation focuses on testing,

debugging, and optimizing your animation You’ll also find out how to publish

your animation so that your audience can see and enjoy it and how to export an

editable version of your animation so that you can rework it using another

graph-ics, video editing, or web development program The last chapter introduces

Adobe AIR, a system for creating full-blown desktop applications using Flash

• Part Five: Appendixes Appendix A, Installation and Help, explains how to install

Flash and where to turn for help Appendix B, Flash CS5, Menu by Menu,

pro-vides a menu-by-menu description of the commands you’ll find in Flash CS5

About➝These➝Arrows

Throughout this book, you’ll find instructions like, “Open your Program Files➝

Adobe➝Adobe Flash CS5 folder.” That’s Missing Manual shorthand for much

lon-ger sentences like “Double-click your Program Files folder to open it Inside, you’ll

find a folder called Adobe; double-click to open it Inside that folder is a folder called

Adobe Flash CS5; open it, too.” This arrow shorthand also simplifies the business of

choosing menu commands, as you can see in Figure I-3

Figure I-3:

When you see tions like “Choose Text➝Style➝Italic,” think, “Click to pull down the Text menu, and then move your mouse down to the Style command

instruc-When its submenu opens, choose the Italic option.”

Trang 29

Living ExamplesThis book is designed to get you started animating faster and more professionally

As you read the book’s chapters, you’ll encounter a number of living examples—

step-by-step tutorials that you can build yourself, using raw materials that you can

download from this book’s “Missing CD” (www.missingmanuals.com/cds) You

might not gain very much by simply reading these step-by-step lessons while ing in your hammock But if you take the time to work through them at the com-puter, you’ll discover that these tutorials give you an unprecedented insight into the way professional designers create animations and applications in Flash

relax-About MissingManuals.com

At www.missingmanuals.com, you’ll find articles, tips, and updates to Flash CS5: The

Missing Manual In fact, we invite and encourage you to submit such corrections and

updates yourself In an effort to keep the book as up to date and accurate as possible, each time we print more copies of this book, we’ll make any confirmed corrections you’ve suggested We’ll also note such changes on the website so that you can mark

important corrections into your own copy of the book, if you like (Go to www.

missingmanuals.com/feedback, choose the book’s name from the pop-up menu,

and then click Go to see the changes.)Also on our Feedback page, you can get expert answers to questions that come to you while reading this book, write a book review, and find groups for folks who share your interest in Flash

We’d love to hear your suggestions for new books in the Missing Manual line There’s

a place for that on missingmanuals.com, too And while you’re online, you can also

register this book at www.oreilly.com (you can jump directly to the registration page by going here: http://tinyurl.com/yo82k3) Registering means we can send you

updates about this book, and you’ll be eligible for special offers like discounts on

future editions of Flash CS5: The Missing Manual.

Safari® Books Online

Safari® Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly

With a subscription, you can read any page and watch any video from our library online Read books on your cellphone and mobile devices Access new titles before they’re available for print, and get exclusive access to manuscripts in development and post feedback for the authors Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features

O’Reilly Media has uploaded this book to the Safari Books Online service To have full digital access to this book and others on similar topics from O’Reilly and other

publishers, sign up for free at http://my.safaribooksonline.com.

Trang 30

Part One:

Creating a Flash Animation

Chapter 1: Getting Around Flash

Chapter 2: Creating Simple Drawings

Chapter 3: Animating Your Art

Trang 32

chapter

1

Getting Around Flash

As mentioned in this book’s introduction, Flash performs several feats of

audiovisual magic You use it to create animations, to display video on a

web-site, to create handheld apps, or to build a complete web-based application

So it’s not surprising that the Flash workspace is crammed full of tools, panels, and

windows (Figure 1-1) The Flash Pro workspace is more complicated and cluttered

than the average program But don’t be intimidated—you don’t have to conquer these

tools all at once This chapter introduces you to Flash’s main work areas and the

tool-bars and panels you’ll use most often, so you can start creating Flash projects right

away You’ll get to experiment with Flash’s stage and timeline and see how Flash lets

you animate graphics, making them move along a path and change shape

Tip: To get further acquainted with Flash, you can check out the built-in help text by selecting

Help➝Flash Help Once the help panel opens, click Workspace (on the left), and then click “Flash

work-flow and workspace.” You can read more about Flash’s help system in Appendix A, Installation and Help.

Starting Flash

You start Flash just as you would any other program—which means you can do it in

a few different ways, depending on whether you have a PC or a Mac Installing the

program puts Flash CS5 and its related files in the folder with your other programs,

and you can start it by clicking its icon Here’s where it’s usually installed:

• Windows Go to C:\Program Files\Adobe\Adobe Flash CS5\Flash.exe You can

create a shortcut or drag the file to your taskbar for quicker starting

Trang 33

Starting Flash

Figure 1-1:

The Flash sional workspace is divided into three main areas: the stage, the timeline, and the panels dock This entire window, together with the timeline, toolbars, and panels, is sometimes called the Flash desktop, the Flash interface, or the Flash authoring environment.

Profes-Timeline

• Mac Go to Macintosh HD\Applications\Adobe Flash CS5\Adobe Flash CS5 You

can make an alias or drag the file to your Dock for quicker starting

Here are some other Windows ways to start the program:

• From the Vista or Windows 7 Start menu, choose All Programs➝Adobe Flash Professional CS5

• For Windows XP, go to Start➝All Programs➝Adobe➝Adobe Flash sional CS5

Profes-• If you’re a keyboard enthusiast, press the Windows key and begin to type flash

As you type, Windows searches for a match and displays a list with programs

at the top Most likely, the Flash program is at the top of the list and already selected, so just press Enter Otherwise, use your mouse or arrow keys to select and start the program

Here are some Mac options for launching Flash:

• Even if you haven’t added the Flash icon to the Dock, you can still find it in the Dock’s Applications folder Click and hold the Applications folder icon and choose Adobe Flash CS5➝Adobe Flash CS5

Trang 34

Chapter 1: Getting Around Flash

• Want to hunt down Flash in the Finder? Most of the time, it’s installed in

Macin-tosh HD➝Applications➝Adobe Flash CS5➝Adobe Flash CS5

• If you’d rather type than hunt, use Spotlight Press c-space and then begin to

type flash As you type, Spotlight displays a list of programs and files that match

Most likely, the Flash program is at the top of the list and already selected, so

just press Return Otherwise, use your mouse or arrow keys to select and start

the program

When you first start Flash, up pops the Welcome screen, as shown in Figure 1-2

When you open the program, you’re most likely to either start a new document or

return to a work in progress This screen puts all your options in one handy place

For good measure, Adobe includes some links to help references and resources on

its website

Figure 1-2:

This Welcome screen appears the first time you launch Flash—

and every subsequent time, too, unless you turn on the

“Don’t show again” checkbox (circled)

If you ever miss the convenience of seeing all your recent Flash documents, built-in templates, and other options in one place, then you can turn it back on by choosing EditPreferences (Windows) or FlashPreferences (Mac) On the Gen- eral panel, choose Welcome Screen from the On Launch pop-up menu.

Note: If Flash seems to take forever to open—or if the Flash desktop ignores your mouse clicks or

responds sluggishly—you may not have enough memory installed on your computer See page 689 for

more advice.

Trang 35

Starting Flash

When you choose one of the options on the Welcome screen, it disappears and your actual document takes its place Here are your choices:

• Create from Template Clicking one of the little icons under this option lets

you create a Flash document using a predesigned form called a template Using

a template helps you create a Flash animation more quickly because a developer has already done part of the work for you You can find out more about tem-plates in Chapter 7

Open a Recent Item As you create new documents, Flash adds them to this list

Clicking one of the filename listed here tells Flash to open that file Clicking the folder icon lets you browse your computer for (and then open) any other Flash files on your computer

Create New Clicking one of the options listed here lets you create a brand-new

Flash file Most of the time, you want to choose the first option, ActionScript 3.0, which is a garden-variety animation file ActionScript is the underlying pro-gramming language for Flash animations The current version of ActionScript

is 3.0, and it’s the version used for the projects in this book You can use the ActionScript 2.0 option if you need to work with a Flash project that was created several years ago For details on the variety of file formats for different Flash projects, see the box on page 17

Note: Old programming pros—you know who you are—may have reasons to prefer Flash File

(Action-Script 2.0) For example, you might choose this option if you’re continuing work on a project created using ActionScript 2.0, if or you’re working with a team using ActionScript 2.0.

• Extend Clicking the Flash Exchange link under this option tells Flash to open

your web browser (if it’s not already running) and load the Flash Exchange site There, you can download Flash components, sound files, and other goodies (some free, some fee-based, and all of them created by Flashionados just like you) that you can add to your Flash animations

web-• Learn As you might guess, these links lead to materials Adobe designed to help

you get up and running Click an option, and your web browser opens to a page

on the Adobe website The first few topics introduce basic Flash concepts like symbols, instances, and timelines Farther down the list, you find specific topics for building applications for mobile devices or websites (AIR) At the bottom

of the Welcome screen, Getting Started covers the very, very basics New tures explains (and celebrates) some of Flash CS5’s new bells and whistles The Developer Center leads to an online magazine with articles and videos with

Fea-an ActionScript programming slFea-ant The Designer Center leads to a similar resource for the Flash graphics and design community

Tip: The options for creating new Flash documents and opening recent documents also appear on the

File menu, as shown in Figure 1-3.

Trang 36

As, you can press Ctrl+Shift+S to tell Flash to save your Flash docu- ment On the Mac, the keystroke is Shift-c-S.

FreqUenTly ASked qUeSTion

Understanding Flash File Formats

Why are there so many different options under Create

New on the Welcome screen? What are they all for?

There seem to be a bewildering number of options when

you create a new Flash document As explained on page

16, if you’re just learning Flash, you probably want to use

the first option: ActionScript 3.0 The other options are for

special Flash projects targeted to specific devices, like the

iPhone, or for specific programming needs, like creating an

ActionScript class There are more details in the appropriate

sections of this book, but here’s a quick rundown:

Use Adobe AIR 2 to create desktop applications using the

Adobe Integrated Runtime tools Instead of using Flash

Player, these applications use AIR These programs are

called rich Internet applications or RIA For more details,

see Chapter 21.

Creating an iPhone app? Use the iPhone option Flash

cre-ates a document that’s just the right size and provides gramming options and support for making iPhone apps

pro-Flash Lite 4 is similar to the iPhone format but works for

several other handheld devices

You can also create an ActionScript File (a file containing

nothing but ActionScript, for use with a Flash animation);

a Flash JavaScript File (used to create custom tools,

pan-els, commands, and other features that extend Flash); or

a Flash Project (useful if you’re planning a complex,

multifile, multideveloper Flash production and need sion control)

ver-The last two options, ActionScript 3.0 Class and ActionScript

3.0 Interface, help programmers create reusable objects

that can be used in multiple Flash projects

Trang 37

A Tour of the Flash

Workspace

A Tour of the Flash Workspace

The best way to master the Flash CS5 Professional workspace is to divide and conquer That means you first focus on the three main work areas: the stage, the timeline, and the Panels dock Then you gradually learn how to use all the tools in those areas

One of the common problems for Flash newbies is that the Flash workspace can be customized You can open bunches of panels, windows, and toolbars You can move the timeline above the stage, or you can have it floating in a window all its own Once you’re a seasoned Flash veteran, you’ll have strong opinions about how you want to set up your workspace so the tools you use most are at hand If you’re just learning Flash with the help of this book, though, it’s probably best if you set up your work-space so that it matches the pictures in these pages

Fortunately, there’s an easy way to do that Adobe, in its wisdom, created the space Switcher—a tool that lets you rearrange the entire workspace with the click of

Work-a menu The thinking is thWork-at Work-an ideWork-al workspWork-ace for Work-a cWork-artoon Work-animWork-ator is different from the ideal workspace for a rich Internet application (RIA) developer The Work-space Switcher is a menu in the upper-right corner of the Flash window, next to the Search box The menu displays the name of the currently selected workspace; when

you first start Flash, it probably says Essentials That’s a great workspace that displays

some of the most frequently used tools In fact, it’s the workspace used throughout most of this book

Here’s a quick little exercise that shows you how to switch among the different spaces and how to reset a workspace after you’ve mangled it by dragging panels out

work-of place and opening new windows

1 Start Flash.

Flash opens, displaying the Welcome screen Unless you’ve made changes, the Essentials workspace is used See Figure 1-4, top

2 From the Workspace menu near the upper-right corner of the Flash window, choose Classic.

The Classic arrangement harks back to earlier versions of Flash, when the line resided above the stage (Figure 1-4, bottom) If you wish, go ahead and check out some of the other layouts

time-3 Choose the Essentials workspace again.

Back where you began, the Essentials workspace shows the timeline at the tom The stage takes up most of the main window On the right, the Panels dock holds toolbars and panels Now’s the time to cause a little havoc

bot-4 In the Panels dock, click the Properties tab and drag it to a new location on the screen.

Panels can float, or they can dock to one of the edges of the window For this experiment, it doesn’t matter what you choose to do

Trang 38

Chapter 1: Getting Around Flash

Workspace

5 Drag the Color and Swatches toolbars to new locations.

The Color toolbar has an icon that looks like an artist’s palette at the top Like

the larger panels, toolbars can either dock or float You can drag them anywhere

on your monitor, and you can expand and collapse them by clicking the

double-triangle button in their top-right corners

6 Go to Window➝Other Panels➝History.

Flash has dozens of windows Only a few are available now, because you haven’t

even created a document yet

Tip: As you work on a project, the History panel keeps track of all your commands, operations, and

changes It’s a great tool for undoing mistakes For more details, see page 31.

Trang 39

A Tour of the Flash

Menu BarLike most computer programs, Flash gives you menus to interact with your docu-ments In traditional fashion, Windows menus appear at the top of the program window, while Mac menus are always at the very top of the screen The commands

on these menus list every way you can interact with your Flash file, from creating a new file—as shown on page 16—to editing it, saving it, and controlling how it ap-pears on your screen

Some of the menu names—File, Edit, View, Window, and Help—are familiar to one who’s used a PC or a Mac Using these menu choices, you can perform basic tasks like opening, saving, and printing your Flash files; cutting and pasting artwork

any-or text; viewing your project in different ways; choosing which toolbars to view; ting help; and more

get-To view a menu, simply click the menu’s title to open it, and then click a menu option

If you prefer, you can also drag down to the option you want Let go of the mouse button to activate the option Figure 1-3 shows you what the File menu looks like Most of the time, you see the same menus at the top of the screen, but occasionally they change For example, when you use the Debugger to troubleshoot ActionScript programs, Flash hides some of the menus not related to debugging

Tip: You’ll learn about specific commands and menu options in their related chapters For a quick

refer-ence to all the menu options, see Appendix B, Flash Professional CS5, Menu by Menu.

The Stage

As the name implies, the stage is usually the center of attention It’s your virtual

canvas Here’s where you draw the pictures, display text, and make objects move across the screen The stage is also your playback arena; when you run a completed animation—to see if it needs tweaking—the animation appears on the stage Figure 1-5 shows a project with animated text

Trang 40

is being dragged from the work area back to center stage.

Work area (backstage)

Stage

The work area is the technical name for the gray area surrounding the stage,

although many Flashionados call it the backstage This work area serves as a prep

zone where you can place graphic elements before you move them to the stage, and

as a temporary holding pen for elements you want to move off the stage briefly as

you reposition things For example, let’s say you draw three circles and one box

con-taining text on your stage If you decide you need to rearrange these elements, you

can temporarily drag one of the circles off the stage

Note: The stage always starts out with a white background, which becomes the background color for your

animation Changing it to any color imaginable is easy, as you’ll learn in the next chapter.

You’ll almost always change the starting size and shape of the stage depending on

where people will see your finished animation—in other words, your target

plat-form If your target platform is a web-enabled cellphone, for example, you’re going

to want an itty-bitty stage If, on the other hand, you’re creating an animation you

know people will be watching on a 50-inch computer monitor, you’re going to want

a giant stage You’ll get to try your hand at modifying the size and background color

of the stage later in this chapter

The Timeline

When you go to the theater, the stage changes over time—actors come and go, songs

are sung, scenery changes, and the lights shine and fade In Flash, you’re the director,

and you get to control what appears on the stage at any given moment The timeline

Ngày đăng: 08/08/2014, 20:20