In just 24 lessons of one hour or less, Sams Teach Yourself Adobe Flash CS4 in 24 Hours will show Flash beginners and upgraders how to build high-impact vector-based graphics and animations with Adobe Flash CS4. In this book's straightforward, step-by-step approach, each lesson builds on the previous ones -- helping you master all the essentials of Adobe's newest version of Flash from the ground up. Friendly, accessible, and conversational, this book gives Flash beginners a practical grounding in the entire package, without ever becoming overwhelming or intimidating. Coverage includes: assembling graphics for use in Flash; utilizing each leading approach to creating Flash animations; adding interactivity and advanced animation; optimizing and publishing Flash content; preparing for deployment on mobile devices; and much more. Throughout, step-by-step instructions carefully walk you through the most common Flash questions, issues, and tasks... Q and As, Quizzes, and Exercises help you build and test your knowledge... "Did You Know?" tips offer you insider advice and shortcuts... and "Watch Out!" alerts help you avoid problems. By the time you've finished with these lessons, you won't just understand Flash CS4: you'll be comfortable using it in real-world projects.
Introduction xxiii
Part I: Assembling the Graphics You’ll Animate in Flash
HOUR 1 Basics 3
Jump Right In and Make an Animation.......................................................................... 3
Getting Your Bearings....................................................................................................... 6
The Stage.............................................................................................................. 7
The Tools Panel................................................................................................. 11
The Timeline....................................................................................................... 12
The Properties Panel......................................................................................... 14
The Library......................................................................................................... 19
Getting Around in Flash................................................................................................. 20
The Current Layer............................................................................................. 20
The Current Frame............................................................................................. 21
The Current Scene or Current Symbol........................................................... 22
Navigating Through the Interface.................................................................. 23
Document Properties....................................................................................................... 26
File Types.......................................................................................................................... 27
Source (.fla) Files............................................................................................... 27
Exported (.swf) Files.......................................................................................... 28
HTML Files That Host the .swf File............................................................... 29
Summary............................................................................................................................ 30
QandA................................................................................................................................... 30
Workshop......................................................................................................................... 31
Quiz...................................................................................................................... 31
Quiz Answers..................................................................................................... 31
HOUR 2 Drawing and Painting Original Art in Flash 33
Drawing on the Stage...................................................................................................... 34
Tools.................................................................................................................................. 34
Viewing and Modification Tools.................................................................... 35
Creation Tools................................................................................................... 37
Selecting and Transforming Objects............................................................................. 53
Object Draw Mode Versus Merge Mode...................................................... 54
Selection Tools ................................................................................................. 56
The Dropper Tool.............................................................................................. 60
Transforming Scale, Rotation, Envelope, and Distortion............................ 61
Using Snap to Objects to Connect Shapes................................................... 65
Summary............................................................................................................................ 68
QandA................................................................................................................................... 68
Workshop......................................................................................................................... 69
Quiz...................................................................................................................... 69
Quiz Answers..................................................................................................... 69
Exercise............................................................................................................... 70
HOUR 3 Importing Graphics into Flash 71
Vector Graphics Versus Raster Graphics...................................................................... 71
Reasons to Avoid Importing Graphics......................................................................... 72
Importing Vector Graphics.............................................................................................. 73
Importing from a File......................................................................................... 73
Using Bitmaps (Also Known as Raster Graphics)...................................................... 79
Importing Flat Raster Graphics........................................................................ 80
Adjusting Bitmap Properties........................................................................... 82
Importing Layered Raster Graphics................................................................ 87
Summary............................................................................................................................ 90
QandA................................................................................................................................... 90
Workshop......................................................................................................................... 91
Quiz...................................................................................................................... 92
Quiz Answers..................................................................................................... 92
HOUR 4 Using the Library for Productivity 93
The Concept of the Library............................................................................................ 94
How to Create and Use Symbols.................................................................... 94
How Symbols Help You................................................................................. 100
Using the Library........................................................................................................... 101
Getting Your Bearings.................................................................................... 101
Managing the Library by Using Names, Sorting, and Folders................. 103
Using Symbols from the Library.................................................................................. 106
Placing Instances of Symbols on the Stage................................................ 106
Modifying Instances of Symbols................................................................. 106
Using Color Styles.......................................................................................... 108
How Each Instance Behaves Differently..................................................... 112
Nesting Instances of Symbols Inside Symbols.......................................... 113
Summary.......................................................................................................................... 116
QandA................................................................................................................................. 116
Workshop....................................................................................................................... 117
Quiz.................................................................................................................... 117
Quiz Answers................................................................................................... 118
HOUR 5 Controlling Color 119
Using Blends and Filters............................................................................................... 119
Controlling Color............................................................................................................ 124
Creating Solid and Gradient Swatches......................................................... 124
Using and Transforming Gradients.............................................................. 130
Applied Examples Using Blends and Filters............................................... 135
Summary.......................................................................................................................... 139
QandA................................................................................................................................. 140
Workshop....................................................................................................................... 140
Quiz.................................................................................................................... 141
Quiz Answers................................................................................................... 141
HOUR 6 Applied Layout Techniques 143
Setting Text..................................................................................................................... 143
Static Text Layout........................................................................................... 143
Embedding Fonts for Dynamic Text............................................................. 145
Applied Examples Using Color Styles, Blends, and Filters..................................... 148
Practical Uses for Blends............................................................................... 148
Practical Uses for Filters................................................................................. 150
Summary.......................................................................................................................... 153
QandA................................................................................................................................. 153
Workshop....................................................................................................................... 154
Quiz.................................................................................................................... 154
Quiz Answers................................................................................................... 155
Part II: Animating in Flash
HOUR 7 Understanding Animation 159
How Animation Works................................................................................................. 159
Elements of Animation.................................................................................................. 160
Frames and Frame Rate................................................................................... 160
Frame Rate Versus the Number of Frames................................................... 163
Frame Rates of Different Types of Animation............................................ 164
Keyframes and Blank Keyframes.................................................................. 165
Tweening.......................................................................................................... 169
Summary.......................................................................................................................... 170
QandA................................................................................................................................. 170
Workshop....................................................................................................................... 171
Quiz.................................................................................................................... 172
Quiz Answers................................................................................................... 172
HOUR 8 Animation the Old-Fashioned Way 173
Understanding the Brute-Force Animation Technique........................................... 173
Previewing an Animation Using Test Movie.............................................. 176
Editing One Keyframe at a Time.................................................................... 177
Changing the Frame View Setting................................................................. 177
Using the Onion Skin Tools.......................................................................... 177
Enhancing a Frame-by-Frame Animation................................................................... 182
Incorporating Pauses...................................................................................... 182
Implying Motion.............................................................................................. 183
Summary.......................................................................................................................... 185
QandA................................................................................................................................. 185
Workshop....................................................................................................................... 186
Quiz.................................................................................................................... 186
Quiz Answers................................................................................................... 187
Exercise............................................................................................................. 187
HOUR 9 Using Motion Tweens to Animate 189
Creating a Motion Tween............................................................................................. 189
Following the Rules of a Motion Tween..................................................... 192
Motion Tweening Techniques and Tips..................................................... 193
Fine-Tuning a Motion Tween...................................................................................... 198
Using Multiple Keyframes............................................................................. 198
Using Ease In and Ease Out.......................................................................... 200
Custom Easing................................................................................................. 201
Rotating in a Motion Tween.......................................................................... 204
Summary.......................................................................................................................... 205
QandA................................................................................................................................. 206
Workshop....................................................................................................................... 207
Quiz.................................................................................................................... 207
Quiz Answers................................................................................................... 208
Exercises........................................................................................................... 208
HOUR 10 Using Shape Tweens to Morph 209
Making a Shape Tween................................................................................................. 209
Following the Rules of a Shape Tween........................................................ 211
Techniques and Tips...................................................................................... 211
Refining and Fine-tuning a Shape Tween.................................................................. 215
Using Shape Hints.......................................................................................... 215
Understanding Shape Hints.......................................................................... 218
Summary.......................................................................................................................... 220
QandA................................................................................................................................. 221
Workshop....................................................................................................................... 222
Quiz.................................................................................................................... 222
Quiz Answers................................................................................................... 222
Exercise............................................................................................................. 222
HOUR 11 Including Sound in Animations 223
Importing Sounds.......................................................................................................... 223
Supported Formats.......................................................................................... 224
Using Sounds................................................................................................................. 227
Synch Settings................................................................................................. 229
Effect Settings.................................................................................................. 232
Loop Settings................................................................................................... 234
Controlling Quality and File Size................................................................................. 236
Digital Audio Fundamentals ......................................................................... 237
Export Settings................................................................................................. 238
Tricks for Efficiency........................................................................................ 242
Summary.......................................................................................................................... 243
QandA................................................................................................................................. 244
Workshop....................................................................................................................... 245
Quiz.................................................................................................................... 246
Quiz Answers................................................................................................... 246
HOUR 12 Using Layers in Animations 247
How Layers Work.......................................................................................................... 247
The True Purpose of Layers.......................................................................... 247
Layer Properties That Help You Edit............................................................ 250
Managing Layers............................................................................................ 254
Using Layer Properties for Visual Effect.................................................................... 255
Guide Layers.................................................................................................... 255
Motion Guide Layers...................................................................................... 260
Mask Layers..................................................................................................... 263
Summary.......................................................................................................................... 267
QandA................................................................................................................................. 268
Workshop....................................................................................................................... 269
Quiz.................................................................................................................... 269
Quiz Answers................................................................................................... 270
Exercises........................................................................................................... 270
HOUR 13 Nesting Animations in Movie Clip and Graphic Symbols 271
Movie Clip Symbol Behavior....................................................................................... 272
Creating Nested Movie Clips........................................................................ 272
Comparing Movie Clip Symbols to Graphic Symbols................................ 274
When to Use Movie Clips............................................................................. 277
Subtleties of Movie Clips............................................................................................. 278
Addressable Movie Clip Instances.............................................................. 278
Effects on Download Order........................................................................... 280
Summary.......................................................................................................................... 280
QandA................................................................................................................................. 280
Workshop....................................................................................................................... 281
Quiz.................................................................................................................... 282
Quiz Answers................................................................................................... 282
Exercises........................................................................................................... 283
HOUR 14 Creating Special Effects 285
Effects with Shapes....................................................................................................... 285
Painting with Bitmaps..................................................................................... 286
Breaking Apart Text........................................................................................ 287
Turning Text into a Shape.............................................................................. 289
Using Filters for Special Effects................................................................................... 291
Showing Depth with Shadows...................................................................... 292
Adding a Motion Blur.................................................................................... 294
Masking Effects............................................................................................................. 295
Summary.......................................................................................................................... 301
QandA................................................................................................................................. 302
Workshop....................................................................................................................... 302
Quiz.................................................................................................................... 302
Quiz Answers................................................................................................... 303
Exercise............................................................................................................. 303
Part III: Adding Interactivity and Video
HOUR 15 Basic Interactivity 307
Basic ActionScript......................................................................................................... 308
Specifying Actions by Using Parameters.................................................... 311
Frame Actions.................................................................................................. 315
Making Simple Buttons................................................................................................. 316
Listening for Events...................................................................................................... 320
Understanding Event Handling.................................................................... 322
Properties and Methods................................................................................. 324
ActionScript Application............................................................................... 326
Summary.......................................................................................................................... 330
QandA................................................................................................................................. 330
Workshop....................................................................................................................... 331
Quiz.................................................................................................................... 331
Quiz Answers................................................................................................... 332
HOUR 16 Introducing Components 333
What Is a Component?................................................................................................. 334
Using the Button Component...................................................................................... 338
Using the RadioButton Component............................................................................ 340
Changing Component Appearances........................................................................... 344
Manually Editing Component Skins............................................................. 344
Setting the Style of a Single Component Instance..................................... 346
Setting the Style of One Component Type................................................. 346
Setting the Style of All Components............................................................ 347
Summary.......................................................................................................................... 347
QandA................................................................................................................................. 347
Workshop....................................................................................................................... 349
Quiz.................................................................................................................... 349
Quiz Answers................................................................................................... 349
HOUR 17 Using Components 351
Using Data Providers.................................................................................................... 351
Using the List Component............................................................................. 355
Using the DataGrid Component.................................................................... 357
Exercises with Other Components............................................................................... 359
Using the ProgressBar Component.............................................................. 359
Using the Slider Component.......................................................................... 361
Summary.......................................................................................................................... 363
QandA................................................................................................................................. 364
Workshop....................................................................................................................... 365
Quiz.................................................................................................................... 365
Quiz Answers................................................................................................... 366
HOUR 18 Using Video 367
Embedding Video Versus Playing External Video..................................................... 367
Making Video Look Good.............................................................................. 368
Supported Formats.......................................................................................... 370
Using Video.................................................................................................................... 376
Playing an Embedded Video.......................................................................... 376
Playing External .flv Videos........................................................................... 378
Special Effects.................................................................................................. 380
Optimizing Quality and File Size.................................................................... 386
Using Outside Video Editors......................................................................... 387
Summary.......................................................................................................................... 387
QandA................................................................................................................................. 388
Workshop....................................................................................................................... 389
Quiz.................................................................................................................... 389
Quiz Answers................................................................................................... 390
Part IV: Putting It All Together for the Web
HOUR 19 Linking a Movie to the Web 393
Basic Publishing............................................................................................................. 393
Simple Hyperlinks.......................................................................................................... 398
Using Style Sheets......................................................................................................... 403
What Other Web Tasks Can Flash Do?..................................................................... 405
Targeting Windows........................................................................................ 405
Sending Email: The mailto: Command.......................................................... 406
Using Flash Inside a Larger Website.......................................................................... 407
Pop-up Windows............................................................................................ 407
Uploading Files to a Web Server................................................................................. 410
Summary.......................................................................................................................... 412
QandA................................................................................................................................. 412
Workshop....................................................................................................................... 413
Quiz.................................................................................................................... 413
Quiz Answers................................................................................................... 414
HOUR 20 Designing a Website to Be Modular 415
Loading Movies or Images........................................................................................... 416
Determining When a Movie Is Fully Loaded............................................................ 419
Playing External Sounds............................................................................................... 422
Loading External Text.................................................................................................... 423
Summary.......................................................................................................................... 425
QandA................................................................................................................................. 426
Workshop....................................................................................................................... 426
Quiz.................................................................................................................... 427
Quiz Answers................................................................................................... 427
Exercise............................................................................................................. 427
HOUR 21 Minimizing File Size 429
File Size Considerations................................................................................................ 429
Calculating Download Times......................................................................... 430
What’s Big? What’s Small?........................................................................... 431
Sounds and Bitmaps....................................................................................... 434
Using the Bandwidth Profiler........................................................................ 438
Improving the Download Experience........................................................... 447
Summary.......................................................................................................................... 448
QandA................................................................................................................................. 448
Workshop....................................................................................................................... 449
Quiz.................................................................................................................... 449
Quiz Answers................................................................................................... 450
HOUR 22 Optimizing Performance 451
Measuring Performance................................................................................................ 451
Impacts on Performance................................................................................................ 452
Be Creative....................................................................................................... 453
Avoiding Gratuitous Special Effects............................................................ 453
Avoiding Streaming Sounds......................................................................... 454
Graphic Issues................................................................................................. 454
Summary.......................................................................................................................... 457
QandA................................................................................................................................. 457
Workshop....................................................................................................................... 457
Quiz.................................................................................................................... 458
Quiz Answers................................................................................................... 458
HOUR 23 Advanced Animation Techniques 459
It’s the Result, Not the Technology........................................................................... 460
Simple Techniques to Use Sparingly........................................................... 460
Ways to Fool the User................................................................................... 461
Applying Conventional Techniques.......................................................................... 462
Adding a Motion Blur.................................................................................... 463
Using Anticipation.......................................................................................... 465
Using Overkill.................................................................................................. 467
Simulating Depth............................................................................................. 469
Controlling Point of View............................................................................... 474
Beginning with the End in Mind................................................................... 476
Summary.......................................................................................................................... 477
QandA................................................................................................................................. 477
Workshop....................................................................................................................... 478
Quiz.................................................................................................................... 478
Quiz Answers................................................................................................... 478
Exercise............................................................................................................. 479
HOUR 24 Publishing a Creation 481
How to Publish............................................................................................................... 481
Ensuring Users Have the Flash Player......................................................... 485
Using Publish Templates............................................................................... 488
Adding Metadata to Your Flash Creation.................................................................. 490
Deciding Which Media Types to Publish.................................................................. 492
Publishing Flash (.swf) Files.......................................................................... 492
Publishing HTML Files.................................................................................. 495
Publishing GIF, JPG, and PNG Files.............................................................. 496
Exporting Other Media Types...................................................................................... 502
Publishing AVI Files........................................................................................... 502
Publishing Image Sequences............................................................................. 502
Summary...................................................................................................................... 503
QandA............................................................................................................................. 504
Workshop................................................................................................................... 504
Quiz.................................................................................................................... 505
Quiz Answers................................................................................................... 505
Exercise............................................................................................................. 505
GLOSSARY 507
Online Bonus Content
Appendix A Shapes You Can Make in Merge Drawing Mode
Appendix B Resources
Appendix C ActionScript Primer0672329379, TOC, 5/22/2007