Flash 4 Manual
Flash 4 Manual
Using Flash
FLASH
4
2
Trademarks
Macromedia, the Macromedia logo, the Made With Macromedia logo, Authorware, Backstage, Director, Extreme 3D, and Fontographer
are registered trademarks, and Afterburner, AppletAce, Authorware Interactive Studio, Backstage, Backstage Designer, Backstage Desktop
Studio, Backstage Enterprise Studio, Backstage Internet Studio, DECK II, Director Multimedia Studio, Doc Around the Clock, Extreme
3D, Flash, FreeHand, FreeHand Graphics Studio, Lingo, Macromedia xRes, MAGIC, Power Applets, Priority Access, SoundEdit,
Shockwave, Showcase, Tools to Power Your Ideas and Xtra are trademarks of Macromedia, Inc. Other product names, logos, designs,
titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other
entities and may be registered in certain jurisdictions.
Apple Disclaimer
APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED
COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY
NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER
RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE.
Copyright 1999 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or
converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc.
Part Number ZFL40M100
Acknowledgments
Project Management: Joe Schmitz
Writing: Peter Fenczik, Dave Jacowitz, John Lancaster, Ben Melnick, and Michelle Sudduth
Multimedia: John Zippy Lehnus and Noah Zilberberg
Editing: Peter Fenczik
Print and Help Design: Noah Zilberberg
Production: Christopher Basmajian and Noah Zilberberg
Special thanks: David Baldeschwieler, Brad Bechtel, Brian Dister, Margaret Dumas, Raven Erebus, Jon Gay, Gary Grossman, Murat
Konar, Tracy Rankin, Pete Santangeli, Robert Tatsumi, and Eric Wittman
First Edition: June 1999
Macromedia, Inc.
600 Townsend St.
San Francisco, CA 94103
3
CONTENTS
INTRODUCTION
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
System requirements for Flash authoring. . . . . . . . . . . . . . . . . . . . . . . . .9
System requirements for the Flash Player. . . . . . . . . . . . . . . . . . . . . . . .10
Installing Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Whats new in Flash 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Guide to instructional media. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
CHAPTER 1
Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Tutorial overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Open the starting le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Create an animated symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Create animated buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Use editable text elds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
Assemble the movie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Use actions to control content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Publish the movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
CHAPTER 2
Flash Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Flash basics overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
About vector and bitmap graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Introducing the Flash work environment . . . . . . . . . . . . . . . . . . . . . . .53
Creating a new movie and setting its properties . . . . . . . . . . . . . . . . . . .56
Previewing and testing movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
Using the toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Using the Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Using scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Using the Library window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
Contents
4
Using inspectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
Using context menus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
Viewing the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70
Using the grid and rulers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Printing Flash les. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72
Speeding up the display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
Setting preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74
CHAPTER 3
Drawing and Painting. . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Drawing and painting overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Understanding drawing and painting in Flash. . . . . . . . . . . . . . . . . . . .77
Drawing with the pencil tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
Drawing straight lines, ovals, and rectangles . . . . . . . . . . . . . . . . . . . . .80
Painting with the brush tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
Erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82
Filling and stroking shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83
Using color palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
Setting drawing preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
Reshaping lines and shape outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Snapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
Creating special curve effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
Working with complex drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
CHAPTER 4
Working with Objects . . . . . . . . . . . . . . . . . . . . . . . . . 101
Working with objects overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
Selecting objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
Moving, copying, and deleting objects . . . . . . . . . . . . . . . . . . . . . . . .104
Stacking objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Scaling objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
Rotating objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
Flipping objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
Skewing objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Restoring transformed objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Aligning objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111
Grouping objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
Moving an objects registration point. . . . . . . . . . . . . . . . . . . . . . . . . .112
Breaking apart groups and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Contents
5
CHAPTER 5
Using Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Using type overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Using type in Flash movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Creating type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
Creating text elds and editable text . . . . . . . . . . . . . . . . . . . . . . . . . .117
Editing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Setting type attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
Transforming type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Reshaping type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
CHAPTER 6
Using Imported Artwork . . . . . . . . . . . . . . . . . . . . . . . 125
Using imported artwork overview . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Placing artwork into Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Tracing bitmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Painting with a bitmaps image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Setting bitmap properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
CHAPTER 7
Using Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Layers overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Creating layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Editing layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Changing the order of layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
Using guide layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
Using mask layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
CHAPTER 8
Using Symbols and Instances . . . . . . . . . . . . . . . . . . 141
Using symbols and instances overview. . . . . . . . . . . . . . . . . . . . . . . . .141
Determining which type of symbol to use . . . . . . . . . . . . . . . . . . . . . .142
Creating symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142
Creating instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
Identifying instances on the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . .145
Creating buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145
Contents
6
Enabling, selecting, and testing buttons . . . . . . . . . . . . . . . . . . . . . . .147
Editing symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148
Changing instance properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
Breaking apart instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
Using symbols from other movies . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
CHAPTER 9
Creating Animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Creating animation overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
Creating keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
Animating with layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Setting a frame rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Extending still images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
About tweened animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
Tweening instances, groups, and type . . . . . . . . . . . . . . . . . . . . . . . . .159
Tweening motion along a path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
Tweening shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
Creating frame-by-frame animations . . . . . . . . . . . . . . . . . . . . . . . . . .166
Editing animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
CHAPTER 10
Creating Interactive Movies . . . . . . . . . . . . . . . . . . . . 173
Creating interactive movies overview. . . . . . . . . . . . . . . . . . . . . . . . . .173
Assigning actions to buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
Assigning actions to a frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
Editing actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
Playing and stopping movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
Adjusting movie display quality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
Stopping all sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
Jumping to a frame or scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
Jumping to a different URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
Checking whether a frame is loaded . . . . . . . . . . . . . . . . . . . . . . . . . .179
Loading and unloading additional movies . . . . . . . . . . . . . . . . . . . . . .181
Obtaining variables from a remote le. . . . . . . . . . . . . . . . . . . . . . . . .183
Sending messages to the movies host program . . . . . . . . . . . . . . . . . .183
Controlling other movies and movie clips . . . . . . . . . . . . . . . . . . . . . .185
Duplicating and removing movie clips . . . . . . . . . . . . . . . . . . . . . . . .187
Making movie clips draggable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
Changing movie clip position and appearance. . . . . . . . . . . . . . . . . . .189
Contents
7
Commenting actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190
Setting and identifying variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Creating conditional actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
Looping actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
Reusing actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193
Types of values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
Emulating arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
Writing expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196
Using properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200
Troubleshooting Interactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
CHAPTER 11
Creating Interface Elements . . . . . . . . . . . . . . . . . . 205
Creating interface elements overview. . . . . . . . . . . . . . . . . . . . . . . . . .205
Creating forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
Creating pop-up menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
CHAPTER 12
Adding Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Adding sound overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
Importing sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
Adding sounds to a movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
Using the sound-editing controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . .216
Starting and stopping sounds at a keyframe. . . . . . . . . . . . . . . . . . . . .217
Adding sounds to buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218
Exporting movies with sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219
Contents
8
CHAPTER 13
Publishing and Exporting . . . . . . . . . . . . . . . . . . . . . 223
Publishing and exporting overview . . . . . . . . . . . . . . . . . . . . . . . . . . .223
Optimizing movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
Testing movie download performance . . . . . . . . . . . . . . . . . . . . . . . . .226
Publishing Flash movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228
Flash publish settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229
HTML publish settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230
GIF publish settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233
JPEG publish settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
PNG publish settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
QuickTime publish settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239
Creating projectors with Publish . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
Using Publish Preview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
Using the stand-alone player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
Using Export Movie and Export Image . . . . . . . . . . . . . . . . . . . . . . . .242
About export le formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
Creating templates for HTML publishing. . . . . . . . . . . . . . . . . . . . . .247
About Flash HTML requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . .251
Conguring a web server for Flash . . . . . . . . . . . . . . . . . . . . . . . . . . .259
APPENDIX A
Keyboard Shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . 261
File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
Edit menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262
View menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
Insert menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264
Modify menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264
Control menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266
Window menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267
Controlling layers and keyframes. . . . . . . . . . . . . . . . . . . . . . . . . . . . .267
Drawing shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267
INDEX
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
9
INTRODUCTION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Started
Flash is the foremost authoring software for creating scalable, interactive
animation for the web. Whether you are creating animated logos, web site
navigation controls, long-form animations, or entire Flash web sites, youll nd
the power and exibility of Flash an ideal medium for your own creativity.
System requirements for Flash authoring
The following hardware and software is required to run the Flash:
For Microsoft Windows: An Intel Pentium
133 or equivalent processor
running Windows 95, 98, or NT version 4.0 or later; 16 MB of RAM
(Windows 95 or 98; 24 MB recommended) or 24 MB of RAM (Windows
NT; 32 MB recommend) plus 20 MB of available disk space; a color monitor;
and a CD-ROM drive.
For the Macintosh
: A Power Macintosh running System 7.5 or later;
32 MB of RAM plus 20 MB of available disk space; a color monitor; and
a CD-ROM drive.
Introduction
10
System requirements for the Flash Player
To play Flash Player movies in a browser requires the following hardware
and software:
Microsoft Windows 95, NT 3.5.1 or later; or a 68K Macintosh computer
(PowerPC recommended) with System 7.1 or later.
Netscape plugin that works with Netscape 2 or later (Windows and
Macintosh).
If running ActiveX controls, Microsoft Internet Explorer 3 or later (Windows
95 or later, Windows NT) is required.
If running Flash Player Java Edition, a Java-enabled browser is required.
Installing Flash
Follow these steps to install Flash on either a Windows or Macintosh computer.
To install Flash on a Windows or a Macintosh computer:
1
Insert the Flash 4 CD into the computers CD-ROM drive.
2
Choose from the following options:
In Windows, choose Start > Run. Click Browse and choose the le Setup.exe
on the Flash 4 CD. Click OK in the Run dialog box to begin the installation.
On the Macintosh, double-click the Flash 4 Installer icon.
3
Follow the on-screen instructions.
4
If prompted, restart your computer.
Whats new in Flash 4
Flash 4 offers exciting new features for creating immersive, lush interactive web
sites. New playback features include MP3 streaming audio, text elds for placing
user-editable text in a movie, and enhancements to Flash actions that let you
create sophisticated games, forms, and surveys. New authoring features include a
streamlined publishing process, a redesigned Library window, a variety of new
inspectors, and an enhanced graphical interface.
MP3 streaming audio
Export both streaming and event audio with MP3 compression to create
compelling movie sound tracks while maintaining les small enough for efcient,
low-bandwidth delivery. See Exporting movies with sound on page 219.
Getting Started
11
Editable text fields
Place text elds in a movie to let your audience edit text while a movie plays. Use
text elds to create password entry elds, registration forms, surveys, and other
forms for collecting data from users. See Setting text eld properties on
page 118.
Additional, sophisticated actions
The addition of sophisticated actions that can evaluate events and information
while a movie is playing, and change depending on the result, let you create fully-
functional interface elements such as slider controls, radio buttons, application
menus, and more. Use the new actions to duplicate much of the functionality that
can be performed with JavaScript and other scripting languages to create movies
that maintain cross-browser, cross-platform compatibility so viewers have the
same experience regardless of their conguration. See Creating interactive movies
overview on page 173.
Improved Library window
The redesigned Library window now makes it much easier to manage hundreds of
assets for large projects. Create folders to organize and store assets. In addition to
the name of a symbol, Library window columns now display symbol type, the
number of times the item appears in the movie, and the last modication date.
Sort library items by any of the columns. See Using the Library window on
page 65.
Streamlined web publishing
The Publish command is a one-step process for exporting a movie in multiple
formats, as well as the supporting HTML le. Customize the individual
properties of each format prior to publishing. You can also create your own
external template le that instructs Flash how to write out specic HTML syntax.
For more information, see Publishing and exporting overview on page 223.
Introduction
12
Layers and animation enhancements
With the redesigned Timeline, smart motion guides, and updated layer controls,
Flash 4 reduces the time it takes to create web animation:
The Create Motion Tween command lets you create a motion tween in one
step. Motion-tweened objects automatically snap to a motion path drawn on a
motion guide layer. You can also link and unlink multiple layers to a motion
guide or mask layers. See Tweening instances, groups, and type on page 159.
Updated layer controls let you easily hide, display, lock, and unlock layers.
Outline colors mode lets you easily distinguish the objects on a layer from
other objects in the movie. See Viewing layers on page 135.
Drag the Timeline to its own window or dock it to any side of the application
window. See Using the Timeline on page 59
Color palettes
Import and export custom color palettes to ensure colors are used consistently
across your web site. See Using color palettes on page 89.
Enhanced user interface
Improve your productivity with the following interface enhancements:
Object and Transform inspectors let you view and manipulate the position,
scale, rotation, and skew of selected objects. See the appropriate section in
Chapter 4, Working with Objects.
The Scene inspector lets you manage and edit multiple scenes in a Flash
movie. See Using scenes on page 63.
Circle and rectangle tools let you easily create these simple objects. A round
rectangle radius modier lets you round the corners of rectangles. See
Drawing straight lines, ovals, and rectangles on page 80.
Edit symbols in a separate window or in relation to other artwork on screen.
See Editing symbols on page 148.
Getting Started
13
Guide to instructional media
The Flash 4 package contains a variety of media to help you learn the program
quickly and become procient in creating your own Flash Player movies
including online help that appears in your web browser, interactive lessons, a
tutorial, a printed book, and a regularly updated web site.
Flash lessons and tutorial
If you are new to Flash, or if you used only a limited set of its features, start with
the lessons. The lessons introduce you to the main features of Flash, letting you
practice on isolated examples. The tutorial introduces the workow in Flash by
showing you how to create a basic movie. The tutorial assumes an understanding
of the topics covered in the lessons.
To start with the lessons, choose Help > Lessons > 1 Introduction.
Using Flash
Using Flash
contains instructions and information for using all Flash tools and
commands. It is provided as both online help and a printed book. The online help
contains a variety of Flash Player movies demonstrating effects and features.
For the best experience when using Flash Help, Macromedia strongly
recommends that you use Netscape Navigator 4.0 or higher or Microsoft Internet
Explorer 4.0 or higher on Windows, and Netscape Navigator 4.0 or higher on the
Macintosh. If you use a 3.0 browser, all the content of the movies and the Flash
Help is still accessible, but some features (such as Search) will not work. Running
Flash and Flash Help simultaneously on a Macintosh requires up to 32 MB of
memory, depending on your browsers memory needs.
Introduction
14
To use the Flash Help:
1
Choose Help > Flash Help Topics.
2
Navigate the help topics using any of these features:
Contents organizes information by subject. Click top-level entries to
view subtopics.
Index organizes information like a traditional printed index. Click a term to
jump to a related topic.
Search nds nd any character string in all topic text. Search requires a 4.0
browser with Java enabled. To search for a phrase, simply the type the phrase
into the text entry box.
To search for les that contain two keywords (for example, layers and style),
separate each word with a plus (+) sign.
Previous and Next buttons let you move through the topics within a section.
Flash icon links you the Flash Developers Center web site.
Getting Started
15
Flash Developers Center
The Flash Developers Center web site is updated regularly with the latest
information on Flash, plus advice from expert users, advanced topics, examples,
tips, and updates. Check the web site often for the latest news on Flash and how
to get the most out of the program at www.macromedia.com/support/ash/.
Introduction
16
17
1
CHAPTER 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tutorial
Tutorial overview
In this tutorial you will build on the basic skills you learned in the lessons and
create a more complex piece of work. Youll create a home page for a refrigerator
magnet company that features animated symbols, animated buttons, and a way to
store email addresses.
Understanding and taking advantage of the power of symbols is crucial to learning
Flash. This tutorial emphasizes more advanced uses of symbols. Youll learn
how to:
Create animated movie clip symbols and button symbols
Use editable text elds in symbols
Assemble a movie
Attach actions to buttons that control other content
Publish a movie
Youll also learn some animation tricks you might nd useful in future projects.
Chapter 1
18
Before you begin
This tutorial requires basic Flash skills that are covered by the seven lessons
included in Flash. The lessons are available by choosing Help > Lessons. Be sure to
complete these lessons before starting this tutorial.
Lesson 2, Drawing
Lesson 3, Symbols
Lesson 4, Layers
Lesson 5, Text
Lesson 6, Buttons
Lesson 7, Sound
Lesson 8, Animation
Tutorial
19
Preview the completed movie
Begin by taking a look at the nished movie to become familiar with what youll
be working towards.
1
In Flash, choose File > Open. Navigate to the Flash application folder, then
open the Tutorial folder and select Tutorial Finish.a.
Do not edit this movie, since it is already complete. You will edit an alternate
version during the tutorial.
2
To run the movie, choose Control > Test Movie.
The movie opens with an animation that moves a photograph to the
refrigerator and secures it with a crown magnet.
3
Pass the pointer over the buttons and notice that they animate and display the
title of the content youll see when you click them. Click the buttons to see
additional content.
4
When you nish exploring the movie, close the movie window and then close
the Tutorial Finish.a file.
You can refer to the Tutorial Finish.a le throughout the tutorial to make sure
youve done the work correctly, or get back on track if youre lost.
Chapter 1
20
Open the starting file
1 In Flash, Choose File > Open, and then open the Tutorial Start.a file.
2 Choose File > Save As and save the movie with a new le name so that you do
not alter the Tutorial Start.a file.
If you, or another user, want to use the tutorial again, its important to keep
the original Tutorial Start.a file.
3 Tutorial Start should open with the Library window displayed. If the Library
window isnt open, choose Window > Library to open it.
Tutorial Start has no content in the main Timeline, but the Library window
contains basic artwork you could have created with the skills you acquired
doing the Flash lessons.
Timeline
Library window
Tutorial 21
Define the movie properties
Its a good idea to start building a movie from the bottom up, so begin with its size
and background.
1 Choose Modify > Movie.
2 In the Movie Properties dialog box, set the movies dimensions to
550 pixels by 400 pixels.
3 For Background, select an orange color.
4 Click OK to apply the properties.
The Stage is now orange.
Create an animated symbol
Lesson 3, Symbols, taught you how to work with graphic symbols and
instances. Symbols can also include instances of other symbols and animation. In
this section, you create a symbol that shows the photograph moving to the
refrigerator door at the beginning of the movie.
You begin by creating a movie clip symbol and then adding other symbols to it. A
movie clip symbol is like a self-contained movie that you can place in a host movie
as if it were a single object. It can include animation and interactivity just like a
regular movie.
Note: While working in Flash, its often useful to undo your actions. Flash can undo several
of your recent actions. Choose Edit > Undo (or press Control+Z (Windows) or
Command+Z (Macintosh)) repeatedly to step backwards through your recent actions.
Choose Edit > Redo (or press Control+Y (Windows) or Command+Y (Macintosh)) to step
forward through actions youve undone.
Movie dimensions
Background color
Chapter 1 22
Create a movie clip symbol
1 Choose Insert > New Symbol.
2 In the Symbol Properties dialog box, enter the name
INTRO - ANIMATION.
3 Select Movie Clip as the behavior and then click OK.
Flash switches to symbol-editing mode. Symbol-editing mode looks almost
exactly the same as movie-editing mode. Notice that the name of the symbol
youre editing appears in the top left corner above the Timeline. The name also
now appears in the Library window.
4 In the Timeline, double-click the existing layer name and enter Photo.
Symbol name
Tutorial 23
5 Drag an instance of the INTRO - PHOTO symbol from the Library window
and place it over the registration point in the center of the Stage as shown in
the picture that follows.
This adds an instance of the INTRO - PHOTO symbol to the
INTRO - ANIMATION symbol.
Use the arrow keys to move a symbol one pixel at a time. Press Shift and use
the arrow keys to move ten pixels at a time.
6 In the Timeline, select frame 20 in the Photo layer and choose
Insert > Keyframe.
Because you want the animation to begin off the Stage, you must dene a new
position for INTRO - PHOTO in the rst frame.
7 Select the keyframe in frame 1.
8 Move the instance of INTRO - PHOTO about two inches to the right of the
registration point.
The exact location is not important.
Now that youve positioned the image for the rst frame, you can create a
motion tween to make it move to the position of the keyframe in frame 20.
Registration point
Chapter 1 24
9 Making sure the keyframe in frame 1 is still selected, choose
Insert > Create Motion Tween.
The Timeline should now look like this:
10 Choose Window > Controller to open the Controller and then rewind and
play the animation to see what youve done so far.
The photograph should slide in from the right and stop on the symbols
registration point.
Tween rotation and a fade
Now modify the motion tween to make the photograph fade in and rotate as it
moves. You do this by specifying an alpha (transparency) setting of 0 in the
keyframe where the photograph rst appears, and by setting the number of
rotations in the Tweening Properties dialog box.
1 Select frame 1 in the Photo layer.
2 On the Stage, select the instance of INTRO - PHOTO and choose
Modify > Instance.
3 Click the Color Effect tab in the Instance Properties dialog box and choose
Alpha from the Color Effect pop-up menu.
4 Move the Alpha slider to 0 and click OK.
The photo becomes completely transparent (invisible). Only the selected
border is visible.
5 Make sure that the keyframe in frame 1 in the Photo layer is still selected,
choose Modify > Frame, and then click the Tweening tab.
Tutorial 25
6 Choose Clockwise from the Rotate pop-up menu, enter 1 in the Times box,
and then click OK.
7 Use the Controller to rewind and play the animation.
As the motion tween moves the symbol instance, it also rotates the image and
changes the alpha settings between 0 and 100 to make the photograph fade in.
Next, add the crown magnet to the top of the photograph.
8 Select the keyframe in frame 20 in the Photo layer, and then drag an instance
of the INTRO - CROWN symbol from the Library onto the photograph.
9 Rewind and play the animation to make sure it works correctly.
Chapter 1 26
Add a frame action to stop the animation
Although the animation youve created appears to stop at the last frame while
youre in symbol editing mode, it will work differently when placed in the movie
Timeline. Movie clip symbols loop as long as a movie plays unless you make the
movie clips stop.
Add a frame action to make this animation stop when it reaches the last frame.
1 Select the Photo layer in the Timeline, and then choose Insert > Layer.
2 Double-click the layer name, and then enter Actions.
3 Insert a keyframe in frame 20 in the Actions layer, and then choose
Modify > Frame.
4 Click the Actions tab in the Frame Properties dialog box, click + (plus), and
then choose Stop from the Action pop-up menu. Click OK.
Youve now completed the INTRO - ANIMATION symbol.
Tutorial 27
Create animated buttons
Lesson 6, Buttons, taught you how to create a very simple button. In this
section, you create a more complex button that animates when the mouse rolls
over it and displays label text with transparency. To create an animated button,
you place an animated movie clip symbol in one of the buttons frames. Begin by
creating the animation.
1 Double-click the icon for the BUTTON - HOME symbol in the Library
window to open the symbol for editing.
Be sure to click the symbol icon, not the symbol name, otherwise you just edit
the symbol name.
BUTTON - HOME is a partially completed button included to save you a
few steps.
2 Choose View > Show Frame to center the button in the window. Click the
magnier tool in the toolbox to enlarge the button if necessary.
3 In the Timeline, name the rst layer Button.
4 Insert a keyframe in the Over frame in the Button layer.
5 Making sure the keyframe in the Over frame is still selected, click anywhere on
the Stage with arrow tool to deselect the button image.
Symbol icon
Chapter 1 28
6 Drag an instance of the BUTTON - CROSS symbol from the Library to the
registration point in the BUTTON - HOME symbol.
BUTTON - CROSS is a movie clip symbol that already contains an
animation of a rotating cross. The instance of BUTTON - CROSS should
line up exactly with the cross underneath. You can use the arrow keys to move
the selection one pixel at a time.
Add text transparency to the button
First, add the transparent text layer to the button.
1 In the Timeline, insert a new layer and name it Text Transparency.
2 Select the Text Transparency layer in the Timeline and drag it below the
Button layer in the Timeline.
Arranging layers this way makes the content of the Text Transparency layer
appear behind the content of the Button layer.
3 Create a keyframe in the Over frame in the Text Transparency layer.
Tutorial 29
4 Select the BUTTON - BACKGROUND symbol in the Library, and then
drag it so that its left side is on the registration point in the button.
Now, make the button background blend nicely with any background by applying
an alpha setting to it.
1 With BUTTON - BACKGROUND still selected in the work area, choose
Modify > Instance.
2 Click the Color Effect tab in the Instance Properties dialog box, and choose
Alpha from the Color Effect pop-up menu.
3 Enter 50 as the Alpha value, and click OK.
4 Making sure the Over keyframe in the Text Transparency layer is still selected,
click the text tool.
5 Use the text tool modiers to choose Arial (Windows) or Helvetica
(Macintosh), 18 points, bold, italic text.
6 Enter the word Home over the BUTTON - BACKGROUND symbol.
You dont need to change the content of any other frames in the button.
Chapter 1 30
Duplicate the animated button
The button you just created displays Home when you roll over it. Now, you
need to create another button that displays Contact when you roll over it. To
save time, youll duplicate the BUTTON - HOME and then change its text.
1 In the Library, click the BUTTON - HOME symbol, and then choose
Duplicate from the Library Options menu.
2 Name the duplicate symbol BUTTON - CONTACT, and click OK.
3 Double-click the new BUTTON - CONTACT symbol in the Library
to edit it.
If necessary, Choose View > Show Frame to center the button in the window
and use the magnier tool to enlarge the button.
Tutorial 31
4 Select the Over frame in the Text Transparency layer and use the text tool and
modiers to edit the text to read Contact.
You wont be able to see the buttons animating yet because movie clip
animation does not work in the authoring environment.
If you want to see the buttons work, choose Edit > Edit Movie, drag an
instance of BUTTON - HOME or BUTTON - CONTACT onto the Stage,
and then choose Control > Test Movie. After the movie plays, close the movie
window and delete the instance of the button from the Stage.
Chapter 1 32
Use editable text fields
In Flash, you can place interactive controls and editable text elds inside
symbols. In this section, youll add basic data entry capabilities to the
TEXT - CONTACT symbol.
1 Double-click the icon for the TEXT - CONTACT symbol in the Library to
open the symbol for editing.
2 Create a new layer in the Timeline and name it Data Entry.
3 Select the rst frame in the Data Entry layer in the Timeline.
4 With the rst frame in the Data Entry layer selected, click the text tool and the
Text Field modier.
5 Draw editable text elds for Name, Email, and Comment.
Use the arrow tool to adjust the size and position of the elds. Its not
important at this point to get them perfect. Notice that the square resize
handle on an editable text eld is on the elds lower right corner.
6 Using the arrow tool, select the Name text eld and choose
Modify > Text Field to open the Text Field Properties dialog box.
7 Enter Name in the Variable box and click OK.
Flash assigns the content entered in the editable text eld to the variable whose
name you enter here. You can then use the value of the variable in actions.
8 Repeat steps 6 and 7 for the Email text eld; name the variable Email.
9 Repeat steps 6 and 7 again for the Comment text eld; name the variable
Comment, and click the Multiline and Word Wrap options before
clicking OK.
Tutorial 33
Add the Send button
Now add the Send button to the TEXT - CONTACT symbol.
1 Make sure that the rst frame of the Data Entry layer is still selected, and then
drag an instance of the BUTTON - SEND symbol from the Library window
and place it just below the editable elds.
2 Double-click the instance of the BUTTON - SEND symbol to open the
Instance Properties dialog box.
3 On the Actions tab, click + (plus) and choose Get URL from the
pop-up menu.
4 Type a URL in the box on the right, choose Send Using GET from the
Variables pop-up menu, and then click OK.
This sends the contents of all variables (the text entered in the editable elds)
to the URL you specify. In a real application, you would need to create a valid
CGI script at the URL location to receive the information, but for learning
purposes you can enter any URL and it wont matter if there is no CGI script.
At this point, you are done creating symbols for the movie. Youre now ready
to use the symbols youve created in the main movie.
Chapter 1 34
Assemble the movie
Using the symbols youve created so far, assembling the movies content is easy. As
you do this, you will learn more about using layers to organize the content of
a movie.
1 Choose Edit > Edit Movie.
2 Name the rst layer in the Timeline Fridge.
3 Drag an instance of the BACKGROUND - FRIDGE symbol from the
Library window onto the Stage.
4 In the Timeline, insert a new layer above the Fridge layer and name it Green
Background.
5 Make sure the Green Background layer is selected, and then drag an instance
of the BACKGROUND - GREEN symbol onto the Stage.
Tutorial 35
Add the animated buttons
Now, add the animated buttons you created.
1 Insert a new layer and name it Buttons. Make sure it is the top layer in
the Timeline.
As you add layers, youll want to be able to see all of them in the Timeline.
2 Drag the lower border of the Timeline window so that all of the layers
are visible.
3 Select the Buttons layer and drag an instance of the BUTTON - HOME
symbol onto the Stage.
Because buttons respond differently to the mouse than other objects do, you
need to disable buttons before you can select them and make changes. After
you nish working on buttons, you can enable them again.
4 Choose Control > Enable Buttons and make sure that Enable Buttons is
not checked.
5 Select the instance of BUTTON - HOME and move it into position.
6 Make sure the Buttons layer is still selected in the Timeline, and then place an
instance of the BUTTON - CONTACT symbol below the
BUTTON - HOME instance on the Stage.
Timeline lower border
Chapter 1 36
7 To align the buttons, click BUTTON - CONTACT and hold down the Shift
key as you click BUTTON - HOME to select both buttons. Choose
Modify > Align and choose the horizontally left-aligned option.
8 Choose Control > Test Movie to see the buttons animate when you roll the
mouse over them.
After the movie plays, close the test window to continue working in the movie.
Add the animated movie clip
Now add the INTRO - ANIMATION movie clip you created.
1 Insert a new layer in the Timeline and name it Intro Animation. Make sure
it is the top layer.
2 Lock the other layers to make sure youre working only in the Intro
Animation layer.
3 Drag an instance of the INTRO - ANIMATION symbol from the Library
window onto the Stage.
Remember that the photograph image is completely transparent in the rst
frame on the movie clip, so the only visible part of INTRO - ANIMATION is
the registration point.
Tutorial 37
4 Move the INTRO - ANIMATION instance so that its registration point is
over the refrigerator.
Remember that movie clip animation does not run in the authoring
environment.
5 Choose Control > Test Movie to see the movie with the animation working.
The animation only runs the rst time the movie runs the test window.
To see the animation again, close the test window and choose
Control > Test Movie again.
When you nish viewing the animation, close the test window to continue
working in the movie.
Registration point of
INTRO - ANIMATION
Chapter 1 38
Add the text content layers
The buttons youve added are supposed to make the text content appear in the
green area on the right. Now youre ready to add the text content to the movie.
1 Insert a new layer at the top of the Timeline and name it Text Home.
2 Select the keyframe in frame 1 of the Text Home layer and drag an instance of
the TEXT - HOME symbol onto the Stage. Fit the symbol in the green area as
shown here:
3 To make it easier to see what youre doing, click in the Eye column of the Text
Home layer to hide it before you add the next layer.
A red X appears to show that the layer has been hidden.
Tutorial 39
4 Insert a new layer at the top of the Timeline and name it Text Contact.
5 Select the keyframe in frame 1 of the Text Contact layer and drag an
instance of the TEXT - CONTACT symbol onto the Stage so that it ts in
the green area.
Use actions to control content
You create interactive movies by setting up actionssets of instructions that run
when a specic event occurs. These events can be when the playhead reaches a
frame, or when the user clicks a button or presses keys on the keyboard.
Now youll add actions to the buttons to make the appropriate text content appear
when the buttons are clicked.
Chapter 1 40
Modify the instances of the text symbols
Because actions can only target movie clip symbols, you begin by changing the
instances of the text symbols that you just added into movie clips and giving them
names. In the next section you use these names to identify the instances as targets
of an action. Begin with the TEXT - CONTACT instance.
1 Make sure the Text Contact layer is still selected in the Timeline, and then
double-click the TEXT - CONTACT symbol instance on the Stage to open
the Instance Properties dialog box.
2 Click the Denition tab, and then click Movie Clip as the behavior.
Notice that an Instance Name eld appears under Instance Options.
3 Enter Contact as the instance name and click OK.
Now, change the instance of the TEXT - HOME symbol.
1 In the Timeline, click the visibility controls to hide the Text Contact layer and
show the Text Home layer.
Remember that the visibility controls for each layer are in the column below
the eye icon in the Timeline.
2 Select the Text Home layer in the Timeline, and then double-click the instance
of the TEXT - HOME symbol on the Stage to open the Instance Properties
dialog box.
3 Click the Denition tab, and then click Movie Clip as the behavior.
4 Enter Home as the instance name, and click OK.
Tutorial 41
Add an action to the BUTTON - HOME button
Now you can add an action to the BUTTON - HOME button that displays the
Home text and hides the Contact text when the button is clicked.
The buttons should still be disabled so that you can select them and
make changes.
1 Choose Control > Enable Buttons and make sure that Enable Buttons is
not checked.
2 Make sure the Buttons layer is selected in the Timeline and unlocked, then
double-click the BUTTON - HOME button on the Stage to open the
Instance Properties dialog box.
3 On the Actions tab, click + (plus) and choose Set Property from the
pop-up menu.
4 Choose Visibility from the Set pop-up menu.
5 Click the button to the right of the Target box and choose Target Editor from
the pop-up menu.
6 In the Target Editor, double-click Home to select it as the target, and then
click OK.
7 In the Value box on the Actions tab, enter 1.
Chapter 1 42
Now, add a second statement that hides the Contact text.
1 Click + (plus) and choose Set Property again from the pop-up menu.
2 Choose Visibility from the Set pop-up menu.
3 Click the button to the right of the Target box and choose Target Editor from
the pop-up menu.
4 In the Target Editor, double-click Contact to select it as the target, and then
click OK.
5 In the Value eld, enter 0 (zero).
The action for BUTTON - HOME should look like this:
If you make a mistake, you can click the minus button (-) to remove the
selected line in the action and then re-create the statement. You can also
choose Edit > Undo.
6 Click OK to close the dialog box.
Tutorial 43
Add an action to the BUTTON - CONTACT button
Now give the BUTTON - CONTACT button an action that displays the
Contact text and hides the Home text.
1 Double-click the BUTTON - CONTACT button on the Stage to open the
Instance Properties dialog box.
2 On the Actions tab, click + (plus) and choose Set Property from the
pop-up menu.
3 Choose Visibility from the Set pop-up menu.
4 Click the button to the right of the Target box and then choose Target Editor
from the pop-up menu.
5 In the Target Editor, double-click Contact to select it as the target, and then
click OK.
6 In the Value eld on the Actions tab, type 1.
Now, add a second statement that hides the Home text.
1 Click + (plus) and choose Set Property again from the pop-up menu.
2 Choose Visibility from the Set pop-up menu.
3 Click the button to the right of the Target box and choose Target Editor from
the pop-up menu.
4 In the Target Editor, double-click Home to select it as the target, and then
click OK.
5 In the Value eld, enter 0 (zero).
The action for BUTTON - CONTACT should look like this:
6 Click OK to close the dialog box.
Chapter 1 44
Add a frame action
Hiding layers in the Timeline has no effect on content when you run the movie
outside of the authoring environment. To hide both the Home and Contact text
when the movie starts, add a frame action to the movie.
1 Create a new layer in the Timeline and name it Frame Actions.
2 Double-click the rst frame in the Frame Actions layer to open the Frame
Properties dialog box.
3 Click the Actions tab and choose + (plus), and then choose Set Property from
the pop-up menu.
4 Select Visibility from the Set pop-up menu.
5 Click the button to the right of the Target box and choose Target Editor from
the pop-up menu.
6 In the Target Editor, double-click Home to select it as the target, and then
click OK.
7 In the Value eld on the Actions tab, type 0 (zero).
Tutorial 45
Now, create a new statement in the action by copying the existing statement.
1 Press Control+C (Windows) or Command+C (Macintosh) to copy the rst
statement in the action.
2 Press Control+V (Windows) or Command+V (Macintosh) to paste a copy of
the statement into the window.
This creates a copy of the line you just created. You only need to change
the target.
3 Use the Target Editor to change the target from Home to Contact.
The action should look like this:
4 Click OK to close the Frame Properties dialog box when youre done.
At this point, you are done with the content of the movie. Your movie should
look like the Tutorial Finish.a example.
Chapter 1 46
Test the movie
Now that the movie content is complete, you can test the movie to see all of
its features.
1 Choose Control > Test Movie.
2 While testing the movie, enter some data in the Contact elds. Enter more
than one line in the Comment field to see the lines word wrap.
3 Choose Control > List Variables to display the Output window.
4 Click Send to see it how the variables work.
The Output window displays the data that Flash sends to the server.
A functioning application would require additional actions, such as an action
that clears the elds after sending the data, but this example should give you a
basic understanding of how you can use Flash to send data to a server.
5 Close the Output window, and then close the window in which the movie
is playing.
Youre now ready to publish the movie.
Tutorial 47
Publish the movie
The movies content is now complete. To play the movie in a browser, you need to
export it as a Flash Player le. Flash has been doing this for you every time you use
the Test Movie command.
When you create a web site with Flash, you often need to include several
accompanying les. In addition to a Flash movie, you must create an HTML
document that opens in a browser and runs the Flash movie or displays other
Flash-generated graphics. You may also want to create an animated-GIF version of
your movie or a JPEG image to display if the Flash Player is not installed.
Use the Publish command to export to all the supported formats at once and
create an HTML document with all the required settings.
1 Make sure youve closed the separate window in which the movie was playing,
and then choose File > Publish Settings.
2 On the Formats tab, select Flash and HTML. Make sure that the Use Default
option for le names is selected.
Although you are not using any additional formats for this tutorial, this is
where you can choose additional formats such as JPEG or QuickTime.
3 Click the Flash tab.
You dont need to change any of these options now, but you may need them
later for your own work. You may, for example, want the layers to appear from
the top down instead of the bottom up as they do in this movie.
4 Click the HTML tab.
There are several ways to control Flash movies with HTML code. The
settings in the HTML panel let you dene the most common and useful
settings, including the size, positioning, color, and quality of the movie.
Flash inserts the settings you choose in a template document. Flash includes
several template documents containing HTML code for useful features like
browser detection.
To complete this tutorial, you will choose a simple template that does nothing
except display the Flash movie specied.
Chapter 1 48
5 Choose Flash Only from the Template pop-up menu.
6 Deselect the Loop option.
This prevents the movie from playing over and over.
7 Click Paused at Start so that no check mark appears in the check box.
If you leave this option on, the movie does nothing until an action starts the
movie. You want the animation to play as soon as the page is loaded, so this
option should be off.
You dont need to change the default values for the remaining HTML settings.
8 Click Publish and then click OK to close the Publish Settings dialog box and
generate the specied les.
Flash generates the new les and stores them in the same folder as the
movie le.
Tutorial 49
Play the movie inside a browser
Your work in Flash is complete at this point. Now you can see how the movie
plays inside a browser.
1 Open a browser such as Netscape or Internet Explorer.
2 Open the HTML le you just created.
In Netscape Navigator, chose File > Open Page, and then browse to locate
the le.
In Internet Explorer, choose File > Open, and then browse to locate the le.
The HTML le is in the same folder as the movie le and has the same name
as the movie, with an .htm or .html le extension.
The movie should run inside the browser window just as it did when you used
the Test Movie command.
Chapter 1 50
51
2
CHAPTER 2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Basics
Flash basics overview
Flash movies are interactive vector graphics and animation for web sites. Web
designers use Flash to create navigation controls, animated logos, long-form
animations with synchronized sound, and even complete, sensory-rich web sites.
Flash movies are compact, vector graphics, so they download rapidly and scale to
the viewers screen size.
Youve probably watched and interacted with Flash movies on many web sites
including Disney
, The Simpsons
, and Pepsi
fonts, TrueType
(ATM
).
125
6
CHAPTER 6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Imported Artwork
Using imported artwork overview
You can use artwork created in other applications in your Flash movies. You can
import both vector and bitmap graphics. You can trace a bitmap to convert its
image to a vector graphic and you can paint with the image in a bitmap, letting
you create patterned effects.
Placing artwork into Flash
Flash recognizes a variety of bitmap and vector le formats. You can place artwork
into Flash by importing or pasting. Flash imports bitmaps, sequences of images,
and vector graphics as follows:
Bitmaps (scanned photographs, BMP les) are imported as a single
object in the current layer. Flash preserves the transparency settings of
imported bitmaps.
Any sequence of images (for example, a PICT and BMP sequence) is imported
as successive frames of the current layer.
Vector images from FreeHand or Adobe Illustrator, and WMF les are
imported as a group in the current layer. (See Choosing an import le
format on page 127 and Using Adobe Illustrator les on page 127.)
Flash can also import sound les in AIFF and WAV format. See Importing
sounds on page 213. For information on specic le formats, see Choosing an
import le format on page 127.
Chapter 6 126
To import a file into Flash:
1 Choose File > Import.
2 In the standard import dialog box that is displayed, locate and open the
desired le.
If an imported le has multiple layers, new layers might be created in Flash. Be
sure the Timeline is visible when importing a le with multiple layers.
3 If you are importing a le with a name that ends with a number, and there are
additional les in the sequence after that le in the same folder, at the prompt
to import the sequence of les click Yes to import all of these les, or click No
to import only the specied le.
Here are examples of le names that can be used as a sequence:
Frame001.gif Frame002.gif Frame003.gif
Bird 1 Bird 2 Bird 3
Walk-001.ai Walk-002.ai Walk-003.ai
To paste a bitmap from another application into Flash:
1 Copy the image from the other application.
2 Choose Edit > Paste.
To paste a bitmap into Flash as an embedded object (WIndows):
1 Copy the image from the other application.
2 Choose Edit > Paste Special.
When you want to edit the bitmap, Flash opens the original application. Flash
cant rotate an embedded bitmap unless you rst select the bitmap and choose
Modify > Break Apart. See Grouping objects on page 112.
Note: Before pasting graphics from FreeHand 8 into Flash, set your FreeHand export
preferences to convert colors to CMYK and RGB for Clipboard formats.
Using Imported Artwork 127
Choosing an import file format
Use the following table to determine what image import le types are recognized
by the platform you are working on.
Using FreeHand files
FreeHand is the best choice for creating vector graphics for import into Flash.
FreeHand exports layered images that are recognized by Flash. You can exchange
RGB or CMYK graphics between FreeHand 8 and Flash 4. To convert CMYK
images to RGB with good color delity, import the image into FreeHand and
then export it as a Flash movie using the Convert Colors to RGB option in
FreeHand preferences. See the FreeHand Designers Center on the Macromedia
web site for more information (www.macromedia.com/support/freehand/). To
copy and paste graphics from FreeHand 8 into Flash, change your FreeHand
Export Preferences to the CMYK and RGB option.
Using Adobe Illustrator files
Flash supports importing and exporting Adobe Illustrator 88, 3.0, 5.0, and 6.0,
and 7.0 formats. For information on exporting Illustrator les, see Adobe
Illustrator on page 243.
File type Extension Windows Macintosh
Adobe Illustrator (version 6.0
or lower). See Using Adobe
Illustrator files on page 127.
.eps, .ai
AutoCAD DXF. See Using
AutoCAD DXF files on
page 128.
.dxf
Bitmap .bmp
Enhanced Metafile .emf
FutureSplash Player .spl
GIF and animated GIF .gif
JPEG .jpg
PICT .pct, .pic
PNG .png
Flash Player .swf
Windows Metafile .wmf
QuickTime Movie .mov
Chapter 6 128
When you import an Illustrator le into Flash, ungroup all the Illustrator objects
on all layers. Once all the objects are ungrouped, they can be manipulated like any
other Flash object.
Using QuickTime movies
When you import a QuickTime movie into Flash, the movie le does not become
part of the Flash le. Instead, Flash maintains a pointer to the source le. You can
scale, rotate, and animate a QuickTime movie in Flash. You can play and set the
path of the movie in the Library.
When you import a QuickTime movie, only the rst frame of the movie is
displayed. For more information on publishing your Flash le as a QuickTime
movie, see QuickTime publish settings on page 239.
To play a QuickTime movie:
1 Add the number of frames on the Timeline that correspond to the length of
the QuickTime movie you want to play.
2 Choose Control > Play.
To set the path of a QuickTime movie:
1 Choose Window > Library and select the QuickTime movie you want to edit.
2 On the Options menu, choose Properties and click Set Path in the Video
Properties dialog box.
3 Enter the new location of the QuickTime movie.
Using AutoCAD DXF files
Flash supports the AutoCAD DXF format in the release 10 version.
DXF les do not support the standard system fonts. Flash tries to map
fonts appropriately, but the results can be unpredictable, particularly for the
alignment of text.
Since the DXF format does not support solid lls, lled areas are exported as
outlines only. For this reason the DXF format is most appropriate for line
drawings, such as oor plans and maps.
You can import two-dimensional DXF les into Flash. Flash does not support
three-dimensional DXF les.
Flash doesnt support scaling in a DXF le. All imported DXF les produce 12-
inch by 12-inch movies that you can scale with Modify > Transform > Scale. Also,
Flash supports only ASCII DXF les. If your DXF les are binary, convert them
to ASCII before importing into Flash.
Using Imported Artwork 129
Tracing bitmaps
Flash imports a bitmap as a single object that behaves just like a group of shapes.
Use the Trace Bitmap command when you want to keep your le size down, or
when you want to manipulate the image. The Trace Bitmap command converts a
bitmap into a vector graphic with editable discrete areas of color. (To edit the
color of a bitmap that has been broken apart, use the magic wand tool. See
Painting with a bitmaps image on page 129.)
To convert a bitmap to a vector graphic:
1 Select a bitmap in the current scene.
2 Choose Modify > Trace Bitmap.
3 Enter a Color Threshold value.
When comparing two pixels, if the difference in the RGB color values is less
than the color threshold, the two pixels are considered the same color. A high
threshold value gives you a low number of colors.
4 Enter a value for Minimum Area to set the number of surrounding pixels to
consider when assigning a color to a pixel.
5 Enter a value for Curve Fit to determine how smoothly outlines are drawn.
6 Enter a value for Corner Threshold to determine whether sharp edges are
retained or smoothed out.
To create a vector graphic that looks most like the original bitmap, enter the
following values: Color Threshold, 10; Minimum Area,1 pixel; Curve Fit, Pixels;
Corner Threshold, Many Corners.
Note: In some cases, the le size of the traced bitmap can exceed the le size of the original
if the imported bitmap is complex and many vectors are created to match the bitmap.
Painting with a bitmaps image
You can use the brush and paint bucket tools to paint with the image in a bitmap.
This lets you create patterns using the image in a bitmap. You rst break apart a
bitmap into discrete areas of color, and then you sample the bitmap with the
dropper tool. Once youve broken apart a bitmap, you can select ranges of color in
the bitmap with the magic wand tool. After you select the areas, you can change
their ll color or delete them.
Once youve painted an area or shape with a bitmap image, you can use the paint
bucket tool to rotate, skew, or scale the bitmap image. See Using the paint bucket
tool on page 85.
Chapter 6 130
To paint with a bitmaps image:
1 Select a bitmap in the current scene.
2 Choose Modify > Break Apart.
The bitmap is now a collection of discrete areas of color.
3 Select the dropper tool and then click the bitmap.
The dropper tool sets the current ll to the bitmap and changes the active tool
to the paint bucket.
4 Paint with the brush or paint bucket tool.
To select ranges of color in a broken apart bitmap with the magic wand tool:
1 Select the bitmap in the scene.
2 Select the lasso tool and click the Magic Wand modier.
3 Set the magic wand options:
Threshold denes how close the color value of adjacent pixels must be to be
included in the selection. The higher the number, the more lenient the
selection. If you enter 0, only pixels of the exact same color as the rst pixel
you click are selected.
Smoothing denes how much to smooth the edges of a bitmap. Options are
Smooth, Pixels, Rough, and Normal.
4 Click anywhere on the bitmap.
The wand selects areas of color that match the area you click.
Using Imported Artwork 131
Setting bitmap properties
Use the Bitmap Properties dialog box to enable smoothing of the bitmap and to
set the export format. To open the Bitmap Properties dialog box, select a bitmap
in the Library window and click the Propeties button, or choose Properties from
the Library windows Options menu. Choose from the following options:
Bitmap information displays the name, location, date, and size of the bitmap.
Preview displays a picture of the bitmap.
Allow smoothing smooths the edges of the bitmap with anti-aliasing.
Update reimports the bitmap le in a movie if changes have been made to
it externally.
Import opens the Import Bitmap dialog box. Use this dialog box to import a
new bitmap.
Test shows the results of the le compression. You can compare the original
le size to the compressed le size.
Choose Export As to set one of the following:
Default exports the le using the default format. Click Test to determine the
default format.
Lossless exports the le in a compressed format without sacricing any data
in the image.
JPEG exports the le in a compressed JPEG format. JPEG compression can
vary from high quality (saving a document at low compression, such as 2:1) to
low quality (saving a document at high compression, such as 100:1). With
high levels of compression, image quality can suffer. When you Export as
JPEG, the dialog box prompts you to specify the quality of the compression
on a scale of 1 to 100.
Chapter 6 132
133
7
CHAPTER 7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Layers
Layers overview
You can think of layers as transparent sheets of acetate stacked on top of each
other. Where there is nothing on a layer, you can see through it to the layers
below. See Changing the order of layers on page 136.
When you create a new Flash movie, it contains one layer. You can add more
layers to organize the artwork and animation in your movie. The number of layers
you can create is only limited by your computers memory, and layers do not
increase the le size of your published movie.
You can draw and edit objects on one layer without affecting objects on another
layer. In addition, you can use special guide layers to make drawing and editing
easier, and mask layers to help you create sophisticated effects.
Use separate layers for sound les and actions. This helps you nd all your actions
and sounds quickly when you need to edit them.
For an interactive introduction to layers, choose Help > Lessons > 4 Layers.
Creating layers
When you create a new layer, it appears above the selected layer. Newly added
layers become the active layer.
To create a layer:
Do one of the following:
Choose Insert > Layer.
Click the New Layer button at the bottom of the Timeline.
Chapter 7 134
Editing layers
You draw and paint on the active layer. You select a layer to make it active. A
pencil icon next to a layers name indicates the active layer. Only one layer can be
active at a time.
You can edit objects on any visible, unlocked layer. You can lock layers to protect
them from changes, and you can hide layers to keep the work area uncluttered.
You can view objects as outlines in any layer, determine the outline color, and
change the height of a layer.
To select a layer:
Do one of the following:
Click a layers name in the Timeline.
Click a frame in the Timeline.
Select an object on the Stage.
To select multiple layers:
Shift-click layer names in the Timeline.
To delete a layer:
1 Select a layer.
2 Do one of the following:
Click the Trash button in the Timeline.
Drag the layer to the Trash button.
To copy a layer:
1 Click the layer name to select the entire layer.
2 Choose Edit > Copy Frames.
3 Click the New Layer button to create a new layer.
4 Click the new layer and choose Edit > Paste Frames.
Hidden layer
Objects on layer displayed
as outlines
Active layer
Locked layer
Using Layers 135
To lock or unlock a layer:
Do one of the following:
Click in the Lock column to the right of the layers name to lock that layer.
Click it again to unlock the layer.
Click the padlock icon to lock all layers. Click it again to unlock all layers.
Drag through the Lock column to lock or unlock multiple layers.
Alt-click (Windows) or Option-click (Macintosh) in the Lock column to the
right of the layers name to lock all other layers. Alt-click or Option-click in it
again to unlock all layers.
Viewing layers
You can show or hide layers as you work. Hidden layers are exported but they
cannot be edited. You can also display all objects on a layer as colored outlines
to help you distinguish to which layer objects belong. A red X indicates a
hidden layer.
The layer containing the logo has a red outline.
To show or hide a layer:
Do one of the following:
Click in the eye column to the right of the layers name to hide that layer.
Click in it again to show the layer.
Click the eye icon to hide all the layers. Click it again to show all layers.
Drag through the Eye column to show or hide multiple layers.
Alt-click (Windows) or Option-click (Macintosh) in the Eye column to the
right of the layers name to hide all other layers. Alt-click or Option-click it
again to show all layers.
Chapter 7 136
To view the content of a layer as outlines:
Do one of the following:
Click in the Outline column to the right of the layers name to display all
objects on that layer as outlines. Click in it again to turn off outline display.
Click the outline icon to display objects on all layers as outlines. Click it again
to turn off outline display on all layers.
Alt-click (Windows) or Option-click (Macintosh) in the Outline column to
the right of the layers name to display objects on all other layers as outlines.
Alt-click or Option-click in it again to turn off outline display.
Renaming layers
By default, new layers are named by the order in which they are created. Rename
layers to better reect their contents.
To rename a layer:
Double-click the layer name and enter a new name.
Changing the order of layers
The order of layers in the Timeline determines how objects overlap on the Stage.
Objects on layers at the top of the Timeline appear in front of objects on layers
below them. See also Stacking objects on page 106.
To change the order of layers:
Drag layers in the Timeline.
Using guide layers
For help when drawing, you can use guide layers. You can display a square
background grid in all scenes or you can create your own aids on any layer and
designate that layer as a guide layer. Guide layers are indicated by a guide emblem
that is displayed before the layer name. Guide layers do not appear in a published
Flash Player movie.
For information on adding a motion guide, see Tweening motion along a path
on page 161.
Guide layer
Using Layers 137
To designate a layer as a guide layer:
Right-click (Windows) or Control-click (Macintosh) and choose Guide from the
context menu.
To change a guide layer back to a normal layer:
Select the layer and choose Guide from the context menu for that layer.
Note: Place all guide layers at the bottom of your layer order. This can prevent you from
accidently dragging a normal layer onto the guide layer thereby turning it into a motion
guide layer.
Using mask layers
For spotlight effects and transitions, you can create a hole through which the
content of a layer underneath shows using a mask layer. You can group multiple
layers together under a single mask layer to create sophisticated effects. You can
also use any type of animation, except motion paths, to make the mask move. You
cannot mask layers inside of buttons.
A mask layer hides everything on the layers linked to the mask layer, except where
you place a lled object. A lled shape or type object on the mask layer creates a
hole through which the contents of layers underneath are visible. Mask layers can
contain only a single shape, instance, or type object. Mask layers provide similar
functionality to the Paste Inside command in FreeHand.
Chapter 7 138
To create a mask layer:
1 Create a layer containing the content you want to show through the holes in
the mask.
2 Make sure that the layer you created is selected and choose Insert > Layer to
create a new layer above it.
A mask layer always masks the layer immediately below it, so be sure to create
the layer in the proper place.
3 Draw a lled shape, place type, or create an instance of a symbol on the mask
layer. Flash ignores bitmaps, gradients, transparency, colors, and line styles in a
mask layer. Any lled area will be completely transparent in the mask; any
non-lled area will be opaque.
4 Right-click (Windows) or Control-click (Macintosh) the mask layers name in
the Timeline and choose Mask from the context menu.
Flash locks the mask layer and the layer being masked. To edit the mask or
masked layer, unlock the layer. This turns off the display of the mask. To
redisplay the mask effect, lock the mask or masked layer.
Using Layers 139
To link layers to a mask layer:
Do one of the following:
Drag an existing layer below the mask layer. The layer is indented under the
mask layer.
Create a new layer under the mask layer.
Choose Modify > Layer and select Masked in the Layer Properties dialog.
Alt-click (Windows) or Option-click (Macintosh) the layer.
To unlink layers from a mask layer:
Select the layer you want to unlink, and do one of the following:
Drag the layer above the mask layer.
Choose Modify > Layer and select Normal.
Alt-click (Windows) or Option-click (Macintosh) the layer.
Chapter 7 140
141
8
CHAPTER 8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Symbols and Instances
Using symbols and instances overview
A symbol is a reusable image, animation, or button. An instance is an occurrence of
a symbol on the Stage or nested inside another symbol. Symbols can make editing
a movie simpler as changes to repeating elements need only be made to the
symbol and Flash updates all instances.
Using symbols in your movies dramatically reduces le size; saving several
references to a symbol requires less storage space than saving a complete
description of the element for each occurrence. For example, you can reduce the
le size of your movies if you convert static graphics such as background images
into symbols. Using symbols can also speed movie playback because a symbol
needs to be downloaded to a browser only once.
For an interactive introduction to using symbols and instances, choose Help >
Lessons > 3 Symbols.
A symbol in the library and two instances on the Stage
Chapter 8 142
Determining which type of symbol to use
Whenever you create a symbol, you must decide how you want to use it in
the movie.
Use graphic symbols for static images and to create reusable pieces of
animation that are tied to the Timeline of the main movie. Interactive controls
and sounds wont work in a graphic symbols animation sequence.
Use movie clip symbols to create reusable pieces of animation that play
independently of the main movies Timeline. Movie clips are like mini-movies
inside a main movie that can contain interactive controls, sounds, and even
other movie clip instances. You can also place movie clip instances inside the
Timeline of a button symbol to create animated buttons.
Use button symbols to create interactive buttons in the movie that respond to
standard mouse events (such as clicking and rollovers). Dene the graphics
associated with various button states, then assign actions to an instance of the
button symbol. See Assigning actions to buttons on page 173.
Once you create a symbol, you can make instances of it behave as if they were of
another type. See Changing an instance type on page 152.
Note: Interactivity and animation in movie clip symbols do not work when you play a movie
in the Flash authoring environment. To see movie clip animation and interactivity, choose
Control > Test Movie or Control > Test Scene. See Previewing and testing movies on
page 57.
Creating symbols
You can create a symbol from selected objects on the Stage, or you can create an
empty symbol and make the content in symbol-editing mode. Symbols can have
all the functionality that you can create with Flash, including animation.
Using symbols that have animation, you can create movies with lots of
movement while minimizing le size. Consider creating animation in a symbol
when there is a repetitive or cyclic actionthe up-and-down motion of a birds
wings, for example.
To create a new symbol with selected elements:
1 Select elements on the Stage and choose Insert > Create Symbol.
2 In the Symbol Properties dialog box, type the name of the symbol and choose
either Graphic, Button, or Movie Clip as the behavior.
The selected elements become a single object that is an instance of the symbol.
The elements are also copied to a new symbol in the Library. To edit the
symbol itself, open it as described in Editing symbols on page 148.
Using Symbols and Instances 143
To create a new empty symbol:
1 Make sure that nothing is selected on the Stage and do one of the following:
Choose Insert > Create Symbol.
Click the New Symbol button at the bottom of the Library window.
Choose New Symbol from the Options menu in the Library window.
2 In the Symbol Properties dialog box, type the name of the symbol and choose
either Graphic, Button, or Movie Clip as the behavior.
Flash switches to symbol-editing mode. The name of the symbol appears
above the top left corner of the Stage. The window contains a crosshair that
represents the symbols registration point. If you dont see the registration
point, choose View > Show Frame.
3 To create the symbol content, use the Timeline, draw with the drawing tools,
import media, or create instances of other symbols.
4 When you have nished creating the symbol content, choose Edit > Edit
Movie to exit symbol-editing mode.
Converting animation on the Stage into a movie clip
If youve created an animated sequence on the Stage and want to reuse it elsewhere
in the movie, or if you want to manipulate it as an instance, you can select it and
save it as a movie clip symbol.
To convert animation on the Stage into a movie clip:
1 Select every frame in every layer of the animation on the Stage.
2 Right-click (Windows) or Control-click (Macintosh) and choose Copy frames
from the context menu, or choose Edit > Copy Frames.
3 Make sure nothing on the Stage is selected and choose Insert > Create Symbol.
4 Name the symbol, select Movie Clip in the Symbol Properties dialog box, and
click OK.
Flash opens a new symbol for editing in symbol-editing mode.
5 Click the rst frame of the Timeline and choose Edit > Paste Frames.
6 Choose Edit > Edit Movie to return to the main movie Stage.
7 Delete the animation from the main movie Timeline by selecting every frame
in every layer of the animation and choosing Insert > Delete Frame.
Chapter 8 144
Duplicating symbols
Duplicate a symbol when you want to create a new symbol that contains some or
all of the content of an existing symbol.
To duplicate a symbol:
1 Select a symbol in the Library window.
2 Choose Duplicate from the Options menu in the Library window.
Creating instances
After creating a symbol, you can create instances of the symbol wherever you like
throughout the movie, including inside other symbols.
Creating movie clip instances is different than creating graphic instances. Movie
clips need only a single keyframe to play. Graphic instances must be placed in
every frame where you want them to appear.
To create a new instance of a symbol:
1 Select a layer in the Timeline.
Flash can only place instances in keyframes, always on the current layer. If you
dont select a keyframe, the instance will be added to the rst keyframe to the
left of the current frame.
2 Choose Window > Library to open the Library.
3 Drag the symbol to the Stage.
4 If you created an instance of a graphic symbol, choose Insert > Frame to add
the amount of frames that correspond to the length of the graphic symbol.
After creating an instance of a symbol, use Instance Properties to specify color
effects, assign actions, set the graphic display mode, or change the behavior of the
instance. The behavior of the instance is the same as the default behavior of the
symbol unless you specify otherwise. These modications affect only the instance
and not the symbol. See Changing the color and transparency of an instance on
page 150. See also Creating interactive movies overview on page 173.
Note: If a graphic symbol animation appears choppy, you may have to adjust the instance so
that the animation plays in a smooth loop. See Synchronizing graphic instances on
page 160.
Using Symbols and Instances 145
Identifying instances on the Stage
As you create a movie, it can be difcult to identify a particular instance of a
symbol on the Stage, particularly if you are working with multiple instances of the
same symbol. You can identify instances with the Object inspector (Window >
Inspectors > Object).
When an instance is selected, the Object inspector displays its location, size, and
the name of the symbol. For movie clips, it displays the instance name and the
length of the movie clip. For graphics, it displays the loop mode and the length of
the symbol in frames. For buttons, it displays the tracking option and any actions
assigned to the button instance.
A selected button instance and the Object inspector
Creating buttons
A button is a type of symbol that can display a different image for each of the
buttons possible states and carry out a specic action when your audience
interacts with the button using the mouse. You specify the different states of a
button by creating keyframes in a four-frame Timeline.
For an interactive lesson on creating buttons in Flash, choose Help > Lessons >
6 Buttons.
To make a button interactive in a movie, place an instance of the button symbol
on the Stage and assign actions to the instance.
Chapter 8 146
Each frame in the Timeline of a button symbol has a specic function:
The rst framethe Up staterepresents the button whenever the pointer is
not over the button.
The second framethe Over staterepresents the buttons appearance when
the pointer is over it.
The third framethe Down staterepresents the buttons appearance as it
is clicked.
The fourth framethe Hit statedenes the area that will respond to the
mouse. This area is invisible in the movie.
Typical contents of the Up, Over, Down, and Hit frames
Using Symbols and Instances 147
To create a button:
1 Make sure that nothing is selected on the Stage and choose
Insert > New Symbol, or press Control+F8 (Windows) or Command+F8
(Macintosh).
2 In the Symbol Properties dialog box, enter a name for the new button symbol
and choose Button as the Behavior option.
Flash switches to symbol-editing mode. The Timeline header changes to
display four consecutive frames labeled Up, Over, Down, and Hit. The rst
frame, Up, is a blank keyframe.
3 To create the Up state button image, use the drawing tools, import a graphic,
or place an instance of another symbol on the Stage.
You can use either a movie clip or graphic symbol in a button, but you cannot
use another button in a button. Use movie clip symbols if you want to create
an animated button.
4 Click the second frame, labeled Over, and choose Insert > Keyframe.
The button image from the rst frame appears on the Stage.
5 Change the button image for the Over state; repeat steps 4 and 5 for the
Down frame and the Hit frame.
The Hit frame is not visible on the Stage, but it denes the area of the button
that responds when clicked. Make sure that the graphic for the Hit frame is a
solid area large enough to encompass all the graphic elements of the Up,
Down, and Over frames. It can also be larger than the visible button. If you do
not specify a hit frame, the objects in the Up state are used as the hit frame.
6 To assign a sound to the Down state of the button, select the Down frame in
the Timeline, choose Modify > Frame, and then click the Sound tab in the
Frame Properties dialog box. See Adding sounds to buttons on page 218.
7 When youve nished, choose Edit > Edit Movie, and then drag the button
symbol out of the Library to create an instance of it in the movie.
Enabling, selecting, and testing buttons
Flash lets you control whether buttons are enabled while you author. When a
button is enabled, it responds to the mouse events that youve specied as if the
movie were playing. When a button is disabled, clicking the button selects it. You
can still select enabled buttons, however. In general, work with buttons disabled.
Enable buttons to quickly test their behavior.
Chapter 8 148
To enable and disable buttons:
Choose Control > Enable Buttons. A check mark appears next to the command to
indicate buttons are enabled. Choose it again to disable buttons.
To select an enabled button:
Use the arrow tool to drag a selection rectangle around the button. Use the arrow
keys to move the button. Choose Modify > Instance to open the Instance
Properties dialog box and edit the button.
To test a button:
Choose Control > Enable Buttons and play the movie.
Movie clips in buttons are not visible in the Flash authoring environment. See
Previewing and testing movies on page 57.
Editing symbols
When you edit a symbol, Flash updates all the instances in the movie. You edit
symbols in symbol-editing mode. You can edit such that the symbol you are
editing is all that you see, or you can use the Edit in Place command to edit the
symbol in context with the other objects on the Stage. Other objects appear
grayed out to distinguish them from the symbol you are editing.
To edit a symbol in place:
Select an instance of the symbol on the Stage and right-click (Windows) or
Control-click (Macintosh) and choose Edit in Place.
Using Symbols and Instances 149
To edit a symbol in a new window:
Select an instance of the symbol on the Stage and right-click (Windows) or
Control-click (Macintosh) and choose Edit in New Window.
Double-click a symbols icon in the Library window.
To edit a symbol in symbol-editing mode:
Select an instance of the symbol on the Stage and choose Edit > Edit Symbol,
or right-click (Windows) or Control-click (Macintosh) and choose Edit.
Select the symbol in the Library window and choose Edit from the Options
menu in the Library window.
The symbol attached to the instance opens in symbol-editing mode. You can now
edit the symbol. All instances of the symbol throughout the movie are updated to
reect your edits.
While editing a symbol, use any of the drawing tools, import media, or create
instances of other symbols.
Return to scene
Chapter 8 150
To finish editing a symbol and return to editing the movie:
Do one of the following:
Choose Edit > Edit Movie.
Click the scene name in the left corner of the Timeline.
Changing instance properties
Each instance has its own properties that are separate from the symbol. You can
change the tint, transparency, and brightness of an instance; redene the instance
type (for example, change a graphic to a movie clip); and set the play mode of the
animation inside a graphic instance. You can also skew, rotate, or scale an instance
without affecting the symbol.
The properties of an instance are saved with it. If you edit the symbol or relink the
instance to a different symbol, any instance properties youve changed still apply
to the instance.
The original symbol, a modied instance, and the instance linked to another symbol
Changing the color and transparency of an instance
Use the Color Effect tab in the Instance Properties dialog box to set color and
transparency options for instances. Settings on the Color Effect tab also affect
bitmaps placed within symbols.
Each instance of a symbol can have its own color effect.
Using Symbols and Instances 151
When you change the color and transparency for an instance in a certain frame,
Flash makes the change as soon as it displays that frame. To make gradual color
changes, you must tween the color change. When tweening color, you enter
different effect settings in starting and ending keyframes of an instance, and then
tween the settings to make the instances colors shift over time. See Tweening
instances, groups, and type on page 159.
Note: If you apply a color effect to a movie clip that includes multiple frames, Flash applies
the effect to every frame in the movie clip.
To change the color and transparency of an instance:
1 Do one of the following:
Select an instance on the Stage and choose Modify > Instance.
Double-click an instance on the Stage.
2 Click the Color Effect tab.
3 Choose one of the following options from the Color Effect pop-up menu:
Brightness adjusts the relative lightness or darkness of the image, measured on
a scale from black (-100%) to white (100%).
Tint colors the instance with the same hue. Use the color picker, or enter red,
green, and blue values. Use the slider to set the tint percentage. A 100% tint
means that the instance will be completely saturated with the color.
Alpha adjusts the transparency of the instance.
Special adjusts separately the red, green, blue, and transparency values in
an instance. This is most useful when you want to create and animate subtle
color effects on objects such as bitmaps. The controls on the left let you
reduce the color or transparency values by a specied percentage. The controls
on the right let you reduce or increase the color or transparency values by a
constant value.
The current red, green, blue, and alpha values are multiplied by the percentage
values, and then added to the constant values in the right column, producing
the new color values. For example, if the current red value is 100, setting the
left slider to 50% and the right slider to 100 produces a new red value of 150
((100 x .5) + 100 = 150).
The preview in the upper left corner shows the effect of the changes you make.
Chapter 8 152
Replacing an instance with another symbol
Assigning a different symbol to an instance displays a different instance on the
Stage while leaving all the original instance properties (such as color effects and
button actions) intact.
To assign a different symbol to an instance:
1 Do one of the following:
Select an instance on the Stage and choose Modify > Instance.
Double-click an instance on the Stage.
2 Click the Denition tab.
3 Select a symbol from the list and click the switch symbol icon.
To duplicate a selected symbol, click the duplicate symbol icon.
4 Close the Instance Properties dialog box to apply the changes.
Changing an instance type
You can change the type of a instance to redene its behavior in the movie. For
example, if a graphic instance contains animation that you decide you want to
play independently of the main movies Timeline, you could redene it as a movie
clip instance.
To change the type of an instance:
1 Do one of the following:
Select an instance on the Stage and choose Modify > Instance.
Double-click an instance on the Stage.
2 Click the Denition tab.
3 In the Behavior area, select a different behavior.
4 Close the Instance Properties dialog box to apply the changes.
Using Symbols and Instances 153
Setting the play mode of an animated graphic instance
Set play mode options to determine how animation sequences inside a graphic
instance play during the movie.
To set the play mode of a graphic instance:
1 Do one of the following:
Select a graphic instance on the Stage and choose Modify > Instance.
Double-click a graphic instance on the Stage.
2 Click the Denition tab.
3 Choose a play mode:
Loop loops all the animation sequences contained in the current instance for
as many frames as the instance occupies.
Play Once plays the animation sequence beginning from the frame
you specify.
Single Frame displays one of any frame of the animation sequence.
4 Enter a frame number in the First Frame eld to set the rst frame of the
animation sequence for all three play modes.
5 Close the Instance Properties dialog box to apply the changes.
Breaking apart instances
Break apart an instance to sever its link to its symbol and make it into a
collection of ungrouped shapes and lines. This is useful if you want to
substantially change the instance, but you dont want to affect the symbol itself or
any of its other instances.
To break apart an instance of a symbol:
1 Select the instance.
2 Choose Modify > Break Apart.
This breaks the instance into its component graphic elements.
3 Use the painting and drawing tools to modify these elements.
Breaking apart an instance changes only that instance without affecting other
instances of that symbol. If you modify the source symbol after breaking apart
the instance, the instance is not updated with the changes.
Chapter 8 154
Using symbols from other movies
You can display the Library of another movie without opening that movie,
and you can use symbols from any other movie library in the current movie.
Sometimes its useful to replace a symbol in the current movie with an
updated version from another movie without having to reposition all its
instances on the Stage.
To use a symbol from another movie in the current movie:
1 Choose File > Open as Library and select a movie.
The movies library appears in its own Library window. Commands on the
Options menu and the icons in the left corner are grayed-out indicating that
they are unavailable.
2 Drag the symbol from the Preview window into the current scene.
Flash creates an instance of the symbol on the Stage and copies the symbol
itself into the library of the current movie. It is also still available as a symbol
in the Library of its original movie.
155
9
CHAPTER 9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Animation
Creating animation overview
You create animation by changing the content of successive frames. You can make
an object move across the Stage, increase or decrease in size, rotate, change color,
fade in or out, or change shape. Changes can occur independent of, or in concert
with other changes. For example, you can make an object rotate and fade in as it
moves across the Stage.
There are two methods for creating an animation sequence in Flash: frame-by-
frame animation and tweened animation. In frame-by-frame animation you create
the image in every frame. In tweened animation, you create starting and ending
frames and let Flash create the frames in between. Every frame where something
on the Stage changes is a keyframe. Frame-by-frame animation increases le size
much more rapidly than tweened animation.
For an interactive introduction to animation, choose Help > Lessons > Lesson 7
Animation.
Creating keyframes
A keyframe is a frame where you dene changes in the animation. When you
create frame-by-frame animation, every frame is a keyframe. In tweened
animation, you dene keyframes at important points in the animation and let
Flash create the content of frames in between. Flash displays the interpolated
frames of a tweened animation as light blue or green with an arrow drawn
between keyframes.
Keyframes appear within a frame as a solid circle. Empty keyframes appear as
hollow circles. The rst frame in every layer is automatically a keyframe. The
contents of a keyframe appear in new frames that you add to a layer.
Chapter 9 156
To create a keyframe:
Do one of the following:
Select a frame and choose Insert > Keyframe.
Right-click (Windows) or Control-click (Macintosh) a frame in the Timeline
window and choose Insert Keyframe.
To create a series of keyframes:
Select a range of frames and choose Insert > Keyframe.
Distinguishing animations in the Timeline
Flash distinguishes tweened animation from frame-by-frame animation in the
Timeline as follows:
Motion-tweened keyframes have a black dot and intermediate tweened frames
have a black arrow with a light blue background.
Shape-tweened keyframes have a black dot and intermediate frames have a
black arrow with a light green background.
A dashed line indicates a problem with a tween.
Single keyframes have black dots. Light-gray frames after a single keyframe
contain the same content with no changes.
An empty keyframe has a hollow black dot.
A small a indicates that the frame has been assigned a frame action with the
Frame Properties dialog box.
A red ag indicates that the frame contains a label or comment.
Creating Animation 157
Animating with layers
Each scene in a Flash movie can consist of any number of layers. As you animate,
use layers to organize the components of an animation sequence and to separate
animated objects so they dont erase, connect, or segment each other. If you want
Flash to tween the movement of several groups or symbols at once, each must be
on a separate layer. Typically, the background layer contains static artwork.
Additional layers contain one separate animated object each.
Layers appear as rows in the Timeline.
When a movie has several layers, tracking and editing the objects on one or two of
them can be difcult. This task is easier if you work with the content layer by
layer. See Layers overview on page 133.
Setting a frame rate
A frame rate thats too slow makes the animation appear to stop and start; a frame
rate thats too fast blurs the details of the animation. Choose a frame rate of 12
frames per second (fps) for the best results on the web. QuickTime and AVI
movies are generally 12 fps, while the standard motion-picture rate is 24 fps.
The complexity of the animation and the speed of the computer on which the
animation is being played affect the smoothness of the playback. Test your
animations on a variety of machines to determine optimum frame rates.
Because you specify only one frame rate for the entire Flash movie, it is a good
idea to set this rate before you begin creating animation. See Creating a new
movie and setting its properties on page 56.
Extending still images
When creating a background for animation, its often necessary to make a still
image span several frames. Adding new frames (not keyframes) to a layer
duplicates the contents of the last keyframe in all the new frames.
Chapter 9 158
To extend a still image through multiple frames:
1 Create an image in the rst keyframe of the sequence.
2 Select a frame as many frames to the right as you want to add.
3 Choose Insert > Frame.
To use a shortcut to extend still images:
1 Create an image in the rst keyframe.
2 Control-drag (Windows) or Command-drag (Macintosh) the frame to the
right for as many frames as you need. Each time you drag to the right, a
keyframe is added at the end of the new frames.
About tweened animation
Flash can create two types of tweened animation. In the rst, called motion
tweening, you dene properties such as position, size, and rotation for an instance,
group, or type block at one point in time, and then you change those properties at
another point in time. In the second, called shape tweening, you draw a shape at
one point in time, and then you change that shape or draw another shape at
another point in time. Flash interpolates the values or shapes for the frames in
between, creating the animation.
Tweened animation is an effective way to create movement and changes over time
while minimizing le size. Unlike frame-by-frame animation, Flash only needs to
store the values for the changes between frames, not the entire frame.
Creating Animation 159
Tweening instances, groups, and type
Use motion tweening to tween the changes in properties of instances, groups, and
type. Flash can tween position, size, rotation, and skew of instances, groups, and
type. Additionally, Flash can also tween the color of instances and type creating
gradual color shifts or making an instance fade in or out. To tween the color of
groups or type, make them into symbols. If you tween an object that is not a
symbol, Flash automatically converts it to a symbol and names it tween1, tween2,
tween3, and so on. See Creating instances on page 144.
When tweening position, you can make the object move along a non-linear path.
See Tweening motion along a path on page 161.
The position and size of the spacecraft in the three tween frames was tweened
from the rst and last keyframes.
To motion tween an instance, group, or type block:
1 Select an empty keyframe, draw an object on the Stage, or drag an instance of
a symbol from the Library window.
2 Choose Insert > Create Motion Tween. If you drew the object, Flash
automatically converts it to a symbol and names it tween1, tween2, and so on.
3 Insert a range of frames over which you want the animation to occur by
choosing Insert > Frame where you want the animation to end.
4 Move the object, instance, or type block on the Stage to the desired position.
A keyframe is automatically added to the end of the frame range.
5 To set motion tweening properties, double-click the keyframe at the end of the
motion tween:
To tween the size of a group or symbol, turn on Tween Scaling.
Chapter 9 160
To make the group or symbol rotate, choose an option from the Rotate list
and enter the number of rotations in the box on the right. If you dont enter a
number, no rotation occurs. Automatic rotates the object in the direction
requiring the least motion. Clockwise or Counterclockwise make the object
rotate as indicated, as many times as you specify.
To orient the base line of the group or symbol to a path, turn on Orient to
Path Direction. See Tweening motion along a path on page 161.
To change the Easing settings, drag the Easing slider toward Ease In to
slow the beginning of a transition, or toward Ease Out to slow the end of
the transition.
The closer the slider is to the end of its range in either direction, the more
pronounced the acceleration or deceleration. When the slider is closer to In,
the change begins slowly and gets faster at the end. With easing left in the
middle, tweening occurs at a regular rate through all frames. By default, the
rate of change through tweened frames is constant. Easing creates a more
natural appearance of acceleration or deceleration in motion by decreasing the
rate of change toward the beginning or ending frames of the tween.
To ensure that the instance loops properly in the main movie, select
Synchronize Symbols. For more information, see Synchronizing graphic
instances on page 160.
To automatically snap the instance you are animating to a motion guide, select
Snap to Guide.
6 To tween the colors of an instance, double-click the instance and modify color
properties as described in Changing the color and transparency of an
instance on page 150. Flash automatically adds a new keyframe each time
you double-click the instance at tweened frames.
If you change the number of frames between the two keyframes, or move
the group or symbol in either keyframe, Flash automatically tweens the
frames again.
Synchronizing graphic instances
If the number of frames in the animation sequence inside the symbol is not
an even multiple of the number of frames the graphic instance occupies in the
movie, you may have to synchronize the instance so that it loops properly in the
main movie.
Creating Animation 161
To synchronize a graphic instance:
1 Select all frames (including the start and end keyframes) containing the
animation in the main movie Timeline.
2 Do one of the following:
Right-click (Windows) or Control-click (Macintosh) and choose
Synchronize Symbols.
Choose Modify > Frame. In the Frame Properties dialog box, click the
Tweening tab and select Synchronize Symbols.
Tweening motion along a path
Motion guide layers let you draw paths along which tweened instances, groups, or
type blocks can be animated. You can link multiple layers to a motion guide layer
to have multiple objects follow the same path. A normal layer that is linked to a
motion guide layer becomes a guided layer type.
Chapter 9 162
To create a motion path for a tweened animation:
1 Create a tweened animation sequence as described in Tweening instances,
groups, and type on page 159.
2 Do one of the following:
Choose Insert > Motion Guide.
Right-click (Windows) or Control-click (Macintosh) and choose Add Motion
Guide from the context menu.
Flash creates a new layer above the selected layer with a motion guide icon to
the left of the layer name.
3 Use the pencil, line, circle, rectangle, or brush tool to draw the desired path.
If you have Snap to Guide selected on the Tweening tab of the Frame
Properties dialog, the group or symbol is automatically attached to the path by
its registration point.
Snap the center to beginning of the line in the rst frame, and the end of the line in
the last frame.
4 To hide the motion guide layer and the line so that only the objects
movement is visible when the animation is played, click in the Eye column on
the motion guide layer.
The group or symbol follows the motion path when you play the animation.
5 To change the orientation of the groups or symbols baseline so that it remains
parallel with the motion path, double-click the rst keyframe of the tweened
sequence, click the Tweening tab in the Frame Properties dialog box, and then
select Orient to Path Direction.
Creating Animation 163
To link layers to a motion guide layer:
Do one of the following:
Drag an existing layer below the motion guide layer. The layer is indented
under the motion guide layer. All objects on this layer automatically snap to
the motion path.
Create a new layer under the motion guide layer. Objects you tween on this
layer are automatically tweened along the motion path.
Choose Modify > Layer and select Guided in the Layer Properties dialog.
Alt-click (Windows) or Option-click (Macintosh) the layer.
To unlink layers from a motion guide layer:
Select the layer you want to unlink, and do one of the following:
Drag the layer above the motion guide layer.
Choose Modify > Layer and select Normal as the layer type.
Alt-click (Windows) or Option-click (Macintosh) the layer.
Tweening shapes
By tweening shapes you can create an effect similar to morphing, making one
shape appear to change into another shape over time. Flash can also tween the
location, size, and color of shapes.
Flash can shape-tween as many shapes as you place on a layer, but placing a single
shape on each layer usually produces the best results. Use shape hints to control
more complex or improbable shape changes. Shape Hints control how parts of the
original shape move into the new shape. See Using shape hints on page 165.
Chapter 9 164
To tween a shape:
1 Click a layer name to make it the current layer and select an empty keyframe
in the layer where you want the animation to start.
2 Create the image for the rst frame of the sequence.
Use any of the drawing tools to create a shape. The shapes you want to tween
must be on the same layer. Flash cannot tween the shape of groups, symbols,
text blocks, or bitmap images.
3 Create a second keyframe the desired number of frames after the rst frame.
4 Create the image for the last frame of the sequence.
In addition to changing the shape, you can also change the color and position.
5 Double-click the rst keyframe in the sequence to open the Frame Properties
dialog box. Or select the keyframe at the beginning of the sequence and
choose Modify > Frame.
6 Click the Tweening tab in the Frame Properties dialog box and choose Shape
from the Tweening pop-up menu.
7 Choose an option for Blend Type:
Distributive creates an animation in which the intermediate shapes are
smoother and more irregular.
Angular creates an animation that preserves apparent corners and straight lines
in the intermediate shapes. Angular is appropriate only for blending shapes
with sharp corners and straight lines. If the shapes you choose do not have
corners, Flash reverts to Distributive shape tweening.
8 Set the Easing slider.
Drag the Easing slider toward Ease In to slow the beginning of a transition, or
toward Ease Out to slow the end of the transition. The closer the slider is to
the end of its range in either direction, the more pronounced the acceleration
or deceleration. When the slider is closer to In, the change begins slowly and
gets faster at the end. With easing left in the middle, shape tweening occurs at
a regular rate through all frames. By default, the rate of change through
tweened frames is constant. Easing creates a more natural appearance of
acceleration or deceleration in motion by decreasing the rate of change toward
the beginning or ending frames of the tween.
Creating Animation 165
Using shape hints
Use shape hints to control more complex or improbable shape changes. Shape
hints identify points that should correspond in starting and ending shapes. For
example, if you were tweening a drawing of a face as it changes expression, you
could use a shape hint to mark each eye. Then, instead of turning the face into an
amorphous tangle while the shape change takes place, each eye remains
recognizable and changes separately during the shift.
Shape hints contain letters (a through z) for identifying which ones correspond in
the starting and ending shape. You can have up to 26 shape hints.
Shape hints are yellow in a starting keyframe, and green in an ending keyframe.
Also, they are red when not on a curve.
For best results when tweening shapes, follow these guidelines:
In complex shape tweening, create intermediate shapes and tween them
instead of just dening a start and end shape.
Make sure that shape hints are logical. For example if, three shape hints are
along a line, they must be in the same order on both lines. They cannot be
ABC in the rst keyframe and ACB in the second.
Shape hints work best if you place them in counter-clockwise order beginning
at the top left corner of the shape.
Chapter 9 166
To use shape hints:
1 Select the rst keyframe in a shape tweened sequence.
2 Choose Modify > Transform > Add Shape Hint, or press Control+H
(Windows) or Command+H (Macintosh).
The beginning shape hint appears as a red circle with the letter a somewhere
on the shape.
3 Move the shape hint to a point that you want to mark.
4 Select the last keyframe in the tweening sequence.
The ending shape hint appears somewhere on the shape as a green circle with
the letter a.
5 Move the shape hint to the point in the ending shape that should correspond
to the rst point you marked.
6 Run the movie again to see how the shape hints change the shape tweening.
Move the shape hints to ne-tune the tweening.
7 Repeat this process to add additional shape hints. New hints appear with the
letters that follow (b, c, and so on).
8 While working with shape hints, you can also do the following:
To see all shape hints, choose View > Show Shape Hints. The layer and
keyframe that contains shape hints must be current for Show Shape Hints to
be available.
To remove a shape hint, drag it off the Stage.
To remove all shape hints, choose Modify > Transform > Remove All Hints.
Creating frame-by-frame animations
Frame-by-frame animation changes the contents of the Stage in every frame and is
best suited to complex animation in which an image changes in every frame
instead of simply moving. Frame-by-frame animation increases le size more
rapidly than tweened animation.
Use frame-by-frame animation when you need to change an image in each frame.
Creating Animation 167
To create frame-by-frame animation:
1 Click a layer name to make it the current layer and select a frame in the layer
where you want the animation to start.
2 If the frame isnt already a keyframe, choose Insert > Keyframe to make it one.
3 Create the image for the rst frame of the sequence.
You can use the drawing tools, paste graphics from the Clipboard, or
import a le.
4 Click the next frame to the right in the same row and choose Insert >
Keyframe, or right-click (Windows) or Control-click (Macintosh) and choose
Insert Keyframe from the Frame pop-up menu.
This adds a new keyframe whose contents are the same as the rst keyframe.
5 Alter the contents of this frame on the Stage to develop the next increment of
the animation.
Chapter 9 168
6 To complete your frame-by-frame animation sequence, repeat steps 4 and 5
until you have built the motion you want. It is often useful to play back
animation occasionally as you go.
7 To test the animation sequence, choose Control > Play or click the Play button
on the Controller.
Editing animation
After you create a frame or a keyframe, you can move it elsewhere in the current
layer or to another layer, remove it, and make other changes. Only keyframes are
editable. You can view tweened frames, but you cant edit them directly. Edit
tweened frames by changing one of the dening keyframes or by inserting a new
keyframe between the beginning and ending keyframes. You use onion-skinning
to display and edit more than one frame at a time.
To edit a frame or keyframe:
Do one of the following:
To copy frames and their contents, select a frame or sequence of frames and
choose Edit > Copy Frames.
To place copied frames elsewhere in the animation, select the frame where the
frames will be pasted or highlight a sequence of frames that the pasted frames
will replace, and choose Edit > Paste Frames.
To move frames and their contents, select the entire sequence of frames on a
layer, and drag them to the desired location.
To change the length of a tweened sequence, drag any keyframe left or right.
To change the length of a frame-by-frame sequence, see Creating frame-by-
frame animations on page 166.
To insert new frames in an animation, choose Insert > Frame.
To delete frames, select a sequence of frames and then right-click (Windows)
or Control-click (Macintosh) within the selected frames, and choose Delete
Frame from the context menu.
To create a new empty keyframe, choose Insert > Blank Keyframe.
To reverse an animation sequence, select the appropriate frames in one
or more layers and choose Modify > Frames > Reverse. There must be
keyframes at the beginning and end of the sequence.
To convert a keyframe back into a frame, select the keyframe and choose
Edit > Clear Keyframe. The existing contents of the frame are replaced by
copies of the previous keyframe.
Creating Animation 169
Onion-skinning
Normally, Flash displays one frame of the animation sequence at a time on the
Stage. To help you position and edit a frame-by-frame animation, you can see
multiple frames on the Stage at once. The frame under the playhead appears in
full color, while surrounding frames are dimmed, making it appear as if each
frame were drawn on a sheet of translucent onion-skin paper and the sheets were
stacked one on top of another. Dimmed frames cannot be edited.
To simultaneously see several frames of an animation on the Stage:
Click the Onion Skin button. All frames between the Start Onion Skin and End
Onion Skin markers (in the Timeline header) are superimposed as one frame in
the Movie window.
Chapter 9 170
To use onion skinning:
Use the following controls:
To display onion skinned frames as outlines, click Onion Skin Outlines.
To change the position of either onion skin marker, drag its pointer to a new
location. (Normally, the onion skin markers move in conjunction with the
current frame pointer.)
To enable editing of all frames between onion skin markers, click Edit
Multiple Frames. Usually onion skinning lets you edit only the current frame.
However, you can display the contents of each frame between the onion skin
markers normally, and make each available for editing, regardless of which is
the current frame.
Note: Locked layers (those with a Lock icon) arent displayed when onion skinning is turned
on. To avoid a multitude of confusing images, you can lock or hide the layers you dont want
onion skinned.
To change the display of onion skin markers:
Choose an option from the Modify Onion Markers context menu:
Always Show Markers displays the onion skin markers in the Timeline header
whether or not onion skinning is on.
Anchor Onion Marks locks the onion skin markers to their current position in
the Timeline header. Normally, the Onion Skin range is relative to the current
frame pointer and the Onion Skin markers. By anchoring the Onion Skin
markers, you prevent the Onion Skin markers from moving with the current
frame pointer.
Onion 2 displays two frames on either side of the current frame.
Onion 5 displays ve frames on either side of the current frame.
Onion All displays all frames on either side of the current frame.
Creating Animation 171
Moving an entire animation
If you need to move an entire animation on the Stage, you must move the
graphics in all frames and layers at once to avoid realigning everything.
To move the entire animation to another location on the Stage:
1 Unlock all layers.
To move everything on one layer but nothing on other layers, lock or hide all
the layers you dont want to move.
2 Click the Edit Multiple Frames button.
3 Drag the onion skin markers so that they enclose all the frames you want
to select, or click Modify Onion Markers and choose Onion All.
4 Choose Edit > Select All.
5 Drag the entire animation to the new location on the Stage.
Chapter 9 172
173
10
CHAPTER 10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Interactive Movies
Creating interactive movies overview
An interactive movie involves your audience. Using the keyboard, the mouse, or
both, your audience can jump to different parts of movies, move objects, enter
information in forms, and perform many other interactive operations.
You create interactive movies by setting up actionssets of instructions that run
when a specic event occurs. The events that can trigger an action are either when
the playhead reaches a frame, or when the user clicks a button or presses keys on
the keyboard. You create instructions that tell Flash what action to perform when
the event occurs.
Actions are set up in the Actions tab of the Properties dialog box for either a
button or a frame (graphics and movie clips do not have the Actions tab available).
The instructions can be a single statement that tells a movie to stop playing or
a series of statements that rst evaluate a condition before performing an action.
Many actions require little programming experience. Other actions require some
familiarity with programming languages and are only for truly sophisticated
development.
Assigning actions to buttons
Assign an action to an instance of a button to have the action run when the user
clicks or rolls over a button. Assigning an action to a button instance doesnt affect
other instances of the button.
When assigning an action to a button, you specify the mouse events that trigger
the action. You can also assign a keyboard key that triggers the action.
Chapter 10 174
To assign an action to a button:
1 Select a button instance and choose Modify > Instance, or double-click the
button instance.
2 Click the Actions tab.
3 Click the + (plus) and choose a statement from the pop-up menu.
If the Actions tab is not available, the selected instance is not a button. You
can click the Denition tab and make the selected instance behave as a button,
but the instance probably will not have the special button states associated
with it. See Creating buttons on page 145.
When you choose a statement, Flash automatically inserts an On/End On
statement and sets Release as the default button state. You can also select On
MouseEvent to insert an On/End On statement.
Creating Interactive Movies 175
4 In the Parameters pane, with the On (Release) statement highlighted, select
which mouse and keyboard events trigger the action:
Press Occurs when the mouse button is pressed while the pointer is over
the button.
Release Occurs when the mouse button is released while the pointer is over
the button. This sets up standard clicking behavior.
Release Outside Occurs when the mouse button is released while the pointer is
outside the button.
Roll Over Occurs when the pointer rolls over the button.
Roll Out Occurs when the pointer rolls outside the button.
Drag Over Occurs after the mouse button has been pressed while the pointer is
over the button, rolled outside the button, and then the pointer is rolled back
over the button.
Drag Out Occurs when the mouse button is pressed over the button and the
pointer then rolls outside the button.
Key Press Occurs when the specied key is pressed.
5 Click the + (plus) and choose a statement from the pop-up menu.
Depending on the action you choose, the Parameters pane can offer additional
parameters for the statement. For information about a specic statement, see
the topics later in this chapter. You can also look up specic statements in
the Index.
If you are familiar with basic programming techniques, you can enter
parameters that Flash can evaluate when the movie is playing. See Writing
expressions on page 196.
6 Assign any additional statements that you want.
Flash inserts the statement below the currently selected action. Use the up and
down buttons to change the order of statements.
To test a button:
Choose Control > Enable Buttons before playing the movie.
Chapter 10 176
Assigning actions to a frame
Assign a frame action to a keyframe to make the movie do something when it
reaches that frame. For example, to create a loop within a movie, you could add a
frame action to frame 20 that species go to frame 10 and play.
Its a good idea to place frame actions in a separate layer. Frames with actions
display a small a in the Timeline.
To assign an action to a keyframe:
1 Select a keyframe in the Timeline and choose Modify > Frame, or double-click
a keyframe.
If a keyframe is not selected, the action is assigned to the previous keyframe.
2 Click the Actions tab, and then click the + (plus) and then choose a statement
from the pop-up menu.
Depending on the action you choose, the Parameters pane can offer additional
parameters for the statement. For information about a specic statement, see
the topics later in this chapter. You can also look up specic statements in
the Index.
If you are familiar with basic programming, you can specify parameters as
expressions that Flash evaluates when the movie plays. See Writing
expressions on page 196.
3 Assign additional statements to make more than one thing happen when the
frame is displayed.
Flash inserts a new statement below the currently selected statement. Flash
executes statements in the order they appear. Use the up and down buttons to
change the order of actions.
To test a frame action in a scene:
Choose Control > Enable Frame Actions before playing the movie.
Creating Interactive Movies 177
Editing actions
Use the controls in the Actions pane of the Instance Properties dialog box
to delete or change the order and parameters of statements. These controls
are especially useful for managing frame or button actions that have several
statements.
To move the statement up or down the list:
Click the Up or Down arrow buttons.
To delete an action:
Click the - (minus) button.
To change the parameters of existing actions:
Enter new values in the Parameters pane.
Playing and stopping movies
Unless instructed otherwise, once a movie starts, it plays through every frame in
the Timeline. Use the Play and Stop statements to stop or start a movie at specic
intervals. For example, you can stop a movie at the end of a scene before
proceeding to the next scene. Once stopped, a movie must be explicitly started
again. You must use the Play statement to restart the movie.
Play and Stop are most commonly used to control movie clips with buttons. To do
so, however, the movie clip must have an instance name and must be targeted
with Tell Target. See Controlling other movies and movie clips on page 185.
Adjusting movie display quality
Use the Toggle High Quality statement to turn anti-aliasing for a movie on and off.
With anti-aliasing off, the movie plays faster. Toggle High Quality affects all the
movies playing back in the Flash Player.
Delete a statement
Change the statement order
Add a statement
Chapter 10 178
A Toggle High Quality statement assigned to a button lets the audience adjust the
playback quality of the movie. The following action turns anti-aliasing off with
the rst click, and turns it on with the second.
On(Press)
Toggle high quality
End On
You can also use the _highquality property as described in Global properties on
page 202.
Stopping all sounds
Use the Stop All Sounds statement to stop the audio track without interrupting the
movie Timeline (this does not simply suppress the volume). Stop All Sounds affects
all the movies playing back in the Flash Player.
Assign Stop All Sounds to a button to let your audience stop the sounds in a
playing movie.
Jumping to a frame or scene
Use the Go To statement to jump to a specic frame or scene in the movie. When
the movie jumps to a frame, you have the option of stopping the movie at the new
frame or playing from the frame. The default behavior is to jump to a frame and
stop the movie.
The Go To statement has the following parameters:
Scene species a destination scene. If you select the current scene or a named
scene, you can specify a frame within that scene. If you select the next or
previous scene, the movie jumps to the rst frame of the scene.
Frame species a frame within the current scene or a named scene specied
with the Scene option. You can enter a frame by number, label, or an
expression that evaluates to a frame number or label. You can also specify the
next or previous frame. For example, this statement indicates the frame that is
ve frames ahead of the frame that contains the action:
Go to and Stop(_currentframe + 5)
For information on writing expressions, see Writing expressions on
page 196.
Go To and Play instructs the movie to continue playing from the specied
frame. When this option is off, the movie stops at the specied frame.
Creating Interactive Movies 179
Jumping to a different URL
Use the Get URL statement to load a document from a specic URL into a specic
window, or to pass variables to another application at a dened URL.
To test this action, the le to be loaded must be at the specied location. A
network connection must exist for absolute URLs (for example,
http://www.myserver.com/).
The Get URL action has the following parameters:
URL species the URL from which to obtain the document.
Window species the window or HTML frame that the document should be
loaded into. You can enter the name of a specic window or frame or enter an
expression. You can also choose from the following reserved target names:
_self species the current frame in the current window.
_blank species a new window.
_parent species the parent of the current frame.
_top species the top-level frame in the current window.
Variables determines whether to use GET or POST to send variables, or
whether to pass no variables at all. The GET method appends the variables to
the end of the URL, and is used when a small number of variables are
involved. The POST method sends the variables in a separate header, and is
capable of sending much longer strings. See Setting and identifying variables
on page 191.
Checking whether a frame is loaded
Use the _framesloaded property (within an If statement) or the If Frame Is Loaded
statement to check whether the contents of a specic frame are available locally.
A common use for _framesloaded or If Frame Is Loaded is to start playing a simple
animation while the rest of the movie downloads to the local computer. The main
difference between the two approaches is that the If (_framesloaded) statement
allows you to add an Else or Else If statement to your action, quickly. The
If Frame Is Loaded statement allows you to specify a specic number of frames in a
simple statement.
Chapter 10 180
To use the _framesloaded property in an action that plays a short animation loop
while a movie finishes loading:
1 Create a short animation loop at the beginning of the movie. For example, you
can create a loop that displays the message Movie loading....
2 Create a frame action with If Frame Is Loaded that jumps out of the animation
loop after all the frames are loaded and continues playing the movie. For
example, a movie that has a two-frame animation loop at the beginning would
require the following action attached to Frame 2:
If (_framesloaded)
Go to and Play (3)
Else
Go to and Play (1)
End If
To use the If Frame is Loaded statement in an action that plays a short animation
while a movie finishes loading:
1 Create a short animation loop at the beginning of the movie. For example, you
can create a loop that displays the message Movie loading....
2 Create a frame action with If Frame Is Loaded that jumps out of the animation
loop when all the frames are loaded and continues playing the movie. For
example, a 30 frame movie that has a two-frame animation loop at the
beginning would require the following action attached to Frame 1:
If Frame Is Loaded (30)
Go to and play (3)
End If Frame Is Loaded
When you insert an If Frame is Loaded statement, Flash automatically inserts an
End If Frame is Loaded statement at the end.
3 For Frame 2, attach the following action, which restarts the movie at frame 1:
Go to and play (1)
When the frame specied in the If Frame is Loaded statement is loaded, the
movie skips the second frame and continues playing the movie from the
third frame.
The If Frame is Loaded statement is also useful for a section in a movie that requires
loading a large bitmap or sound le.
Typically, If Frame Is Loaded is a condition for a frame action, but you can also use it
as a button action. To test an If Frame Is Loaded condition, use the Streaming option
with the Test Movie command. The frames load in the same way as they would if
streaming from a web site. See Testing movie download performance on
page 226.
Creating Interactive Movies 181
The If Frame Is Loaded statement has the following parameters:
Frame species the frame number of the frame label you want loaded locally
before the next statement is executed.
Scene is the scene containing the specied frame.
Loading and unloading additional movies
Use the Load Movie and Unload Movie statements to play additional movies without
closing the Flash Player. Normally, the Flash Player displays a single Flash Player
movie (SWF le). Load Movie lets you display several movies at once or switch
between movies without loading another HTML document. Unload Movie removes
a movie previously loaded by Load Movie.
For example, you can use Load Movie in the following ways:
To play a sequence of banner ads that are SWF les by placing a Load Movie
statement at the end of each SWF le to load the next movie.
To develop a branching interface where the user can choose among several
different SWF les.
To build a navigation interface where level 0 has navigation controls that load
other levels. By loading levels, you can get smoother transitions than by
loading new HTML pages in a browser.
Chapter 10 182
Load Movie and Unload Movie statements have the following parameters:
Action identies whether to load a movie, unload a movie, or load variables
(from a remote text le) into an active movie. For more information see
Obtaining variables from a remote le on page 183.
URL species an absolute or relative URL for the SWF le to load. For use in
the Flash Player or for testing in Flash, all the SWF les must be stored in the
same folder and listed as le names without folder or disk drive specications.
Location species a level or target for the Load Movie or Unload Movie statement.
In the Flash Player, movie les are assigned a number according to the order in
which they were loaded. The movie that was loaded rst is loaded at the
bottom level, level 0. The movie in level 0 sets the frame rate, background
color, and frame size for all other loaded movies. Movies are then stacked in
higher numbered levels above the movie in level 0.
For more information about levels and targets, see Understanding multiple
Timelines on page 185.
You can selectively load movies into levels that already have SWF les loaded.
If you do, the new movie will replace the existing SWF le. If you use Load
Variables, the active movie is not replaced, but the variables are updated with
the new values. If you load a new movie into level 0, every level is unloaded,
and level 0 is replaced with the new le.
Target species a movie clip that you want the loaded movie to replace. If you
use Target, the movie that you loaded inherits the position, rotation, and scale
properties of the targeted movie clip. See also Controlling other movies and
movie clips on page 185.
Variables allows you to specify whether to send a set of the existing variables
for the loaded movie to the location identied in the URL eld. This can
be used to send variables to a CGI script which generates a SWF le as its
CGI output. Variables determines the whether to use GET or POST when
downloading the URLs content, or to pass no variables at all. See Setting and
identifying variables on page 191 for more information about variables
in Flash.
The Load Movie and Unload Movie statements do not function in the editing mode.
Use Control > Test Movie to check whether they work. To test this statement, the
movie youre loading must be at the specied path. If the path is an absolute URL,
use File > Publish Preview option (a network connection must exist, and must be
active) to test the movie.
Creating Interactive Movies 183
Obtaining variables from a remote file
Use the Load Variables statement, which is one of the parameters of Load Movie, to
read data from a text le or text generated by a CGI script, and set the values for
variables in a movie or movie clip. For example, if a user submits an order form,
you might want a conrmation screen to display an order number gathered from a
le on a remote server.
With Load Variables, the text at the URL must be in the standard MIME format
application/x-www-urlformencoded (a standard format used by CGI scripts).
Any number of variables can be specied. For example, this phrase denes
several variables:
company=Macromedia&address=600+Townsend&city=San+Francisco&zip=94103
URL species an absolute or relative URL for the remote le.
Location species a level or target to receive the variables. In the Flash Player,
movie les are assigned a number according to the order in which they were
loaded. The movie that was loaded rst is loaded at the bottom level, level 0.
The movie in level 0 sets the frame rate, background color, and frame size for
all other loaded movies. Movies are then stacked in higher numbered levels
above the movie in level 0.
For more information about levels and targets, see Understanding multiple
Timelines on page 185.
Variables determines whether to use GET or POST to pass variables, or to
pass no variables at all. This can be used to send variables to a CGI script that
generates a SWF le as its CGI output. The GET method appends the
variables to the end of the URL, and is used when a small number of variables
are involved. The POST method sends the variables in a separate header, and
is capable of sending much longer strings. See Setting and identifying
variables on page 191.
If you specify either GET or POST with the Load Variables statement, Flash
sends the variables to the web server, and then interprets the servers response
to update the variables in the movie.
Use the File > Publish Preview option to test the loading of variables. (An active
network connection must exist for this to work.)
Sending messages to the movies host
program
Use the FS Command statement to send a message to whichever program is hosting
the Flash Player. If you are not familiar with JavaScript or building projectors, you
probably have no need to use FS Command.
Chapter 10 184
FS Command has two parameters: Command and Argument. Enter the string you
want to send in the Command box. If the string requires any arguments, enter
them in the Arguments box. The Command and Arguments boxes let you use a
literal value or an expression.
In a web browser, an FS Command statement invokes the JavaScript function
moviename_DoFSCommand in the HTML page that embeds the Flash movie, where
moviename is the name of the Flash player as assigned by the NAME attribute of the
EMBED or OBJECT tag. If the Flash player is assigned the name theMovie, the
JavaScript function invoked is theMovie_DoFSCommand.
The JavaScript function is passed the parameters Command and Arguments, which
can be used for any purpose.
For example, to use the FS Command statement to open a message dialog box from
a Flash movie in the HTML page through Javascript:
1 In the HTML page that embeds the Flash movie, add the following
Javascript code:
function theMovie_DoFSCommand(command, args) {
if (command == "messagebox") {
alert(args);
}
}
2 In the Flash movie, add the FS Command statement whenever you want to open
a message dialog box:
FS Command ("messagebox", "This is a message box invoked from within Flash.")
You can also use expressions for the FS Command statement and arguments, as
in the following example:
FS Command ("messagebox", "Hello, " & name & ", welcome to our website!")
You can set up the HTML page to support this by creating your own template
and using the Publish and Preview commands. See Flash publish settings on
page 229.
In Director, the FS Command statement can send messages that are interpreted as
events by Lingo. You must write the Lingo code to receive the messages from FS
Command and carry out an action in Director.
In Visual Basic, Visual C++, and other programs that can host ActiveX controls,
FS Command sends a VB Event with two strings that can be handled in the
environments programming language.
Creating Interactive Movies 185
The following special FS Command statements control a movie playing as
a projector:
Controlling other movies and movie clips
Use the Tell Target statement to control a different movie clip or another movie
that was loaded with the Load Movie statement.
The Tell Target statement is useful for navigation controls. Assign the Tell Target
statement to buttons that stop or start movie clips elsewhere on the Stage. You can
also make movie clips go to a particular frame in that clip.
The Tell Target statement has the single parameter Target, which species the
Timeline that is to be controlled. Any statements nested within the Begin Tell Target
and End Tell Target statements are directed at the targeted Timeline.
Understanding multiple Timelines
When a movie plays back in the Flash Player, multiple Timelines may be present.
Every Flash movie has a main Timeline. Each movie clip instance within a movie
represents another Timeline. Additional Timelines may be present by loading
movies with the Load Movie statement.
For example, the following outline shows seven Timelines present within the
Flash Player:
MovieX.swf (in level 0)
ClipA (Instance name: Jack)
ClipA1 (Instance name: Bert)
ClipA2(Instance name: Ernie)
ClipB (Instance name: Jill)
MovieY.swf (in level 1)
ClipC (Instance name: Smith)
Command Arguments Function
quit none Closes the projector.
fullscreen True/False True sets the player to full-screen mode. False
returns the player to normal menu view.
allowscale True/False False sets the player so that the movie is always
drawn at 100% and the image is never scaled.
True sets the player back to the default Show
All mode.
showmenu True/False True enables the full set of right-click menu
items. False hides the menu bar.
exec Path to
application
Executes an application from within
the projector.
Chapter 10 186
Each Timeline runs independently, and can control any of the other Timelines.
For example, a button in the main Timeline of MovieX can start and stop ClipC
in MovieY. Likewise, a frame action in ClipC can make the playhead in MovieX
jump to another scene or frame.
Specifying targets
The Expression Editor has a Target button for inserting target names. In some
situations, once you click the Target button, the area above the Target eld
displays movie clips that can be targeted. If this is the case and one of these
movie clips is to be targeted, double-click the movie clips name. The correct
information is automatically entered in the Target eld. At other times, the
Timeline that you wish to target will not be in the window and the path will need
to be entered manually.
Similar to the hierarchy of les and folders on a web server, Flash has a hierarchy
of Timelines. To specify targets at different levels in the hierarchy, add a path to
the targets instance name using the same system as for le paths or URLs. Movies
(SWF les) are at the top of the hierarchy with movie clips below them.
The syntax for identifying targets is similar to that for folders in a le system. For
example, a leading / identies a movie clip at the root of the current layer.
Targets without the / are identied relative to the current movie clip.
The following Tell Target paths use the seven Timeline example from the
previous section:
/Jack targets the movie clip named ClipA from the main Timeline of MovieX.
../ targets the Timeline of MovieX from the movie clip named ClipA.
/Jack/Bert targets movie clip ClipA1 from any other movie clip.
Bert targets movie clip ClipA1 from the Timeline of movie clip ClipA.
../Ernie targets movie clip ClipA2 from the Timeline of ClipA1.
_level1/Smith targets movie clip ClipC in MovieY from any other movie clip.
A blank target eld name targets the current Timeline.
The same movie clip can be targeted using more detailed variations of the path
name. For example, /Jack targets the movie clip named ClipA from the main
Timeline of MovieX; so does _level0/Jack which merely includes more information.
A more detailed path name might be useful if you copy buttons with Tell Target
statements from one movie to the next, changing the context of the button.
You can also use an expression to specify a target. For example, the expression
"/"&ButtonName in the Parameters pane has Tell Target send a message to the movie
clip contained in the variable ButtonName.
Creating Interactive Movies 187
A Timeline must currently be in the Flash Player in order to be targeted. A movie
clip Timeline is present in the Player when the playback head is positioned within
the movie clips frames. For example, if a movie clip is placed on the Timeline in
frames 1 through 20, the movie clip can be targeted while the movie is playing or
stopped at any frame between 1 and 20. After the movie reaches frame 21 the
movie clip is no longer in the Player and cannot be targeted. See Checking
whether a frame is loaded on page 179 to set up a statement to check for a frame
before executing the Tell Target statement.
The following sample action is for a button on the main Timeline that, when
pressed, stops the movie clip instance Jack from playing. When the button is
released, the action starts frame 55 of the movie clip instance Bert:
On (Press)
Begin Tell Target ("/Jack")
Stop
End Tell Target
End On
On (Release)
Begin Tell Target ("/Jack/Bert")
Go to and Play (55)
End Tell Target
Go to Next Frame
End On
Duplicating and removing movie clips
Use the Duplicate Movie Clip statement to create an instance of a movie clip while
the movie is playing. When you duplicate a movie clip, the new movie clip starts
at frame 1 even if the original movie clip was on another frame when duplicated.
Use the Remove Movie Clip statement to delete a movie clip instance that had been
created with Duplicate Movie Clip.
Chapter 10 188
Duplicate/Remove Movie Clip has the following parameters:
Action sets the statement to duplicate or remove the movie clip.
Target species the movie clip to duplicate or remove. Click the button
labelled abc and choose Target Editor to specify a target visually, or enter a
target path in the eld. See Specifying targets on page 186.
New Name is the instance name for the duplicated movie clip. Provide only
the name, not a target path. Then, once named, the instance can be targeted
from another action.
Depth determines how the duplicated movie clip appears when overlapping
other objects. Think of depth levels in terms of the stacking order with level 0
the initial level. Each successive duplicate movie clip needs to be given a
depth, otherwise each duplicate will replace the previous clip at level 0.
Duplicate movie clips are always on top of the original movie clip.
Remove duplicate movie clip changes the statement to Remove Movie Clip.
Duplicated movie clips do not disappear unless the parent movie clip
disappears, or you use the Remove Movie Clip statement.
Note: Variables are not copied into the new movie clip, and the duplicate movie clip starts at
the rst frame.
Making movie clips draggable
Use the Drag Movie Clip statement to move a movie clip while the movie is running.
The statement can be set to start or stop a drag operation. A movie clip remains
draggable until explicitly stopped by Stop Drag or until another movie clips is made
draggable. Only one movie clip is draggable at a time.
Drag Movie Clip has the following parameters:
Start Drag Operation begins dragging the movie clip.
Target species the movie clip to drag. Click the button labelled abc and
choose Target Editor to specify a target visually, or enter a target path in the
eld. See Specifying targets on page 186.
Constrain to Rectangle lets you specify a rectangular area beyond which the
movie clip cannot be moved. The left, top, right, and bottom values are
relative to the coordinates of the movie clips parent.
Lock Mouse to Center makes the center of the movie clip appear directly
under the mouse pointer as the user moves the pointer. When this option is
not selected, the movie clip maintains a position relative to the pointer when
the drag operation started.
Creating Interactive Movies 189
For example, this action constrains the movie clip named target_item within a
200 x 200 pixel box (offset to the specied coordinates):
On (Press, Release, Outside)
Start Drag ("target_item", L=100, T=100, R=300, B=300, lockcenter)
End On
Drag-and-drop movie clips
For a movie clip that the user can position in any location, use the Start Drag and
Stop Drag statements as follows:
On (Press)
Start Drag ("movie")
End On
On (Release)
Stop Drag
End On
To create more complicated drag-and-drop behavior, you can evaluate the
_droptarget property of the movie clip being dragged. For example, you might
examine the _droptarget property to see if the movie was dragged to a specic
movie clip (such as a trash can movie clip), and then trigger another action. See
Creating conditional actions on page 192 and Writing expressions on
page 196.
Changing movie clip position and appearance
Use the Set Property statement to change the position, scale, transparency, visibility,
and rotation of a movie clip as the movie plays.
Chapter 10 190
Set Property has the following parameters:
Set species the property to change.
X Position and Y Position set the movie clips horizontal and vertical position,
respectively. The position is relative to the local coordinates of the parent
movie clip.
X Scale and Y Scale scale the movie clip horizontally or vertically, respectively.
Values for the property are percentages; the default value is 100.
Alpha species the movie clips transparency. Values can be from 0 (fully
transparent) to 100 (fully opaque). Objects in a movie clip with Alpha set
to 0 are active, even though they are invisible. For example, a button in a
movie clip with Alpha property set to 0 can still be clicked.
Visibility species whether the movie clip is visible. Values for this property are
either True (visible) or False (not visible). The movie clip is visible if the value is
any nonzero value; the movie clip is invisible if the value is zero. Objects in a
movie clip with Visibility set to false are disabled. For example, a button in a
movie clip with the Visibility property set to false can not be clicked.
Rotation species a movie clips rotation. The value is in degrees.
Target species the movie clip whose property you want to set. Click the
button labelled abc and choose Target Editor to specify a target visually, or
enter a target path in the eld. See Specifying targets on page 186.
Value species the value to assign the property.
For example, this statement sets the Y position property of a movie clip named
target_item to 150:
On (Release)
Set Property ("target_item", Y Position) = 150
End On
Commenting actions
Use the Comment statement to add notes to a frame or button action to help you
keep track of what you intended an action or part of an action to do. Comments
are also useful for passing information to other developers if you work in a
collaborative environment or are providing samples.
Creating Interactive Movies 191
Setting and identifying variables
A variable is a container that holds information. The container itself is always the
same, but the contents can change. By changing the value of a variable as the
movie plays, you can record and save information about what the user has done,
record values that change as the movie plays, or evaluate whether some condition
is true or false.
Variables can hold either numbers or strings of characters. Typical types of
information you can store in a variable include a URL, a users name, the result of
a mathematical operation, the number of times that something occurred, or
whether a button has been clicked. Each movie and movie clip has its own set of
variables, with each variable having its own value independent of variables in other
movies or movie clips.
Variables in Flash do not have to be explicitly dened as holding either a number
or a string. It interprets the data type as an integer or string accordingly. See also
Emulating arrays on page 194.
Assigning values to variables
Use the Set Variable statement to assign a value to a variable. If a variable doesnt
exist in the movie or a movie clip, Flash creates the variable when you rst assign a
value to it.
Set Variable has the following parameters:
The Variable eld species the name of the variable. Its a good habit to use
variable names that indicate what the variable represents. For example, the
variable name password indicates that the variable contains a password.
The Value eld species the value to assign the variable.
You can use numerical operations and string operators to change the content of a
variable. For example, this statement modies the existing value of the variable
totalSum by adding 3 to its current value:
Set Variable: "totalSum" = totalSum + 3
Identifying a variable in a specific movie or movie clip
To identify a variable in a specic movie or movie clip, prex the variable name
with the path to the movie or movie clip.Use a colon to separate the path from the
variable name. For example, this phrase species the variable Timer in the movie
clip Explosion:
/Explosion:Timer
Chapter 10 192
Creating conditional actions
Use the If statement to set up statements that run only when a certain condition
exists. For example, you can check the value a user entered in a text eld and
display a message if the value is too high or too low. To use the If statement
effectively, you should be familiar with creating expressions that evaluate
conditions. See Writing expressions on page 196.
For every If statement, the statement End If marks the end of the statements that
run if the condition is still true. If you want an action to respond to one of several
possibilities, use a series of If statements. An If statement can also contain an Else
statement that designates an alternate series of statements to run if the condition is
false (zero).
Statements within the If and End if statements are indented. The indented
statements run only if the condition is true. Otherwise, Flash ignores the
indented statements.
For each Else statement, select the original If statement, and then click the Add
Else/Else if clause button. Each click adds another Else clause. Set the Else if clause
by selecting an individual Else clause and clicking the Else if radio button in the
Parameters pane.
For example, this action uses If with Else if and Else to direct different users to
different scenes in a movie. If the variable name doesnt equal any of the names
mentioned, then a standard welcome scene starts:
If (name eq "Gary")
Go to and Play ("Garys World", 1)
Else if (name eq "David")
Go to and Play ("Davids World", 1)
Else if (name eq "Peter")
Go to and Play ("Peters World", 1)
Else
Go to and Play ("Welcome", 1)
End If
Looping actions
Use the Loop statement to set up a series of statements that run repeatedly while a
specic condition remains true. A common use of looping is to use a variable as a
counter and perform an action while the counter is less than a specied value. At
the end of each loop, you increment the counter. To use the Loop statement
effectively, you should be familiar with creating expressions that evaluate
conditions. See Writing expressions on page 196.
For every Loop statement, an End Loop statement marks the end of the statements
that run when the condition remains. Upon reaching the End Loop statement,
Flash starts the loop over by testing the condition. If the condition is false or equal
to zero, Flash skips to the rst statement following End Loop.
Creating Interactive Movies 193
For example, these statements form a sample loop that runs ten times. Each
time the loop runs, the Index variable is increased by 1. When Index equals
11, the expression Index <= 10 is false, so Flash skips past the loop to any
subsequent statements.
Set Variable: "Index" = 1
Loop While (Index <= 10)
Set Property (target_item, Y position) = 150
Set Variable: "Index" = Index +1
End Loop
The screen is not updated until the loop nishes.
Reusing actions
You may want multiple buttons or frames to use the same action. Rather than
copy and paste all the statements between the buttons and frames, assign the
action to a different frame and then use the Call statement to run that action.
Specify the frame to call by using any of the ways that identify frames for the Go To
statement. (See Jumping to a frame or scene on page 178.) If the frame cannot
be located due to a naming error or because it hasnt streamed to the local
computer, Flash ignores the Call statement. (You can use the _framesloaded
property to check whether a frame is available.)
After the specied frames actions run, control returns to the action that issued the
Call statement.
To create a library of actions, create a movie and assign each action to a separate
frame in the Timeline. Label each frame with the scripts name to make it easy
to call.
Flash provides no special way to pass or return values when using the Call
statement. In fact, when you use the Call statement, the context is switched to the
move clip being called, including the known variables. To pass values into a
another movie clip, pass them in Flash variables. Similarly, the targeted movie clip
should store any return values in variables. Basically, separate Set Variable
statements should be used in conjunction with the Call statement to pass or
return values.
For example, this statement sets the variables in Database before running the
action AddDatabaseRecord:
Set Variable: "/Database:Name" = "Franz Schubert"
Set Variable: "/Database:Occupation" = "Musician"
Call ("/Database:AddDatabaseRecord")
If (/Database:Result eq "OK")
Go to And Stop ("OK")
Else
Go To And Stop ("Error")
End If
Chapter 10 194
Types of values
Values in Flash can be numbers or strings. These values can be literal values
(auto) or represented by expressions (Substring (automobile, 1, 4)).
Action scripting is not a typed language: a variables type (string, integer, and so
on) depends on the type of values assigned to the variable.
True and false/nonzero and zero
The terms True and False indicate whether a condition exists: The term False
indicates that a condition does not exist. Flash also uses the number 0 as a
numerical equivalent to False. Flash treats any nonzero number as true.
Strings
Flash treats any characters enclosed within quotation marks as strings instead
of variables.
Obtaining a propertys value
The method for obtaining a propertys value depends on the context of the
property relative to the current movie clip. For example, using the statement ( _x)
in the current movie clip returns the x position of the current movie clip.
For a property of another movie clip, use a pathname to target the movie clip.
For example, the target and property name /Foo: _x returns x of movie clip Foo
as a value.
Using GetProperty
When the target is an expression, use the GetProperty() statement to return the
value of a movie clip property. For example, to return the x-position of each
spaceship in a video game with many spaceships, each in a movie clip numbered
sequentially (/spaceship_1, /spaceship_2, ...), use the statement:
GetProperty(/spaceship_&ShipNumber, _x)
Emulating arrays
Flash can construct variable names dynamically because the variable assignment
and retrieval operations can evaluate an expression to get the variable name. This
makes it possible to emulate arrays, dictionaries, and other data structures. For
example, a 10-element array could be emulated by ten variables with the names
A_1
A_2
...
A_10
Creating Interactive Movies 195
For example, the array:
Set Variable "name" & namecount = newname
Set Variable "namecount" = namecount + 1
creates an array that looks like this:
name1 -> Gary
name2 -> another name
name3 -> someone else
namecount -> 3
To nd a particular name, you can use the following action:
Set Variable "index" = 1
Set Variable "found" = false
Loop While (index <= namecount and not found)
If (Eval("name" & index) eq nametofind)
Set Variable "found" = true
Else
Set Variable "index" = index + 1
End If
End Loop
In this action, when found is true, index contains the array index of the
located name.
You can also emulate a two-dimensional array, such as this:
A_1_1
A_2_1
...
A_3_3
Obtaining the value of a dynamically named variable
Use the eval function to obtain the value of a variable named by an expression. For
example, the expression eval("Name") is exactly the same as the expression Name.
By specifying the name as an expression, the name of the variable to be obtained
can be decided while the Flash movie is playing.
For example, the statement eval("Name"&Index) lets you manage 10 names, where
Index is a variable that contains a number from 1 to 10. This expression obtains
one of the variables Name1, Name2, Name3, ... depending on what the value of
Index is. In a loop, Index can be updated each iteration to obtain all 10 names.
Checking variable and property values
Because action scripting is not a typed language, variables may be misassigned as
integers or strings. If an integer is entered for a string variable, then Flash assigns a
true value to the integer. If a string is entered for an integer variable, then Flash
assigns a number equaling the length of the string. (For example, entering Name
returns 4).
Chapter 10 196
Writing expressions
An expression is any phrase that Flash can evaluate to a value. Flash has three types
of expressions: string expressions, numerical expressions, and comparison
expressions. You create an expression by combining operators and values.
Whether the expressions initial value is a string or a number depends on the
parameters default type. For example, the Frame Label parameter in the Go To
statement is a string, so an expression that species the Frame Label parameter is a
string by default.
Using the Expression Editor
An Expression Editor that helps you formulate the exact contents of certain
statement parameters can be opened from the Actions tab.
For some parameters, the parameter eld has an abc button indicating that
the statement expects a literal value. Simply type the literal value into the eld.
For other parameters, Flash presents a = button indicating that an expression
is expected.
If you need to create an expression, click the button next to the field and choose
Expression Editor.
Creating Interactive Movies 197
Double-click the operators and functions you want to use. Some functions
contain generic information that you need to replace with the proper details for
your statement. For example, to extract the value of the x coordinate of a movie
clip location:
1 Double-click the Properties option GetProperty until it appears in the text box
at the top of the dialog box.
2 Highlight the generic term target and click Target.
3 Select the desired movie clip from the list. If the target movie clip doesnt
appear in the list, type the name of the movie clip in the Target eld and
click OK.
4 Select the generic term property, and double-click the item in the Properties
menu _x which refers to the X position.
5 Click OK in the Expression Editor.
If you havent provided enough information or have used improper syntax, the
Expression Editor displays a warning message. Otherwise, the new expression
appears in the statement.
Numerical expressions
Numerical expressions evaluate to numbers. They can combine numbers, variables
that contain numbers, and operators such as +, -, =, logical operators, and
comparison operators.
This is a simple numerical expression:
1+2
This statement uses the expression Score + 1, which combines numbers and
variables:
Set Variable: Score = Score+1
The statement adds 1 to the current value of the variable Score.
String expressions
A string expression concatenates two or more strings to create a new string. The
operands can be variables, literal strings enclosed in double-quotes, or functions
that return strings.
For example, the string expression "Hello, " & "world." concatenates the strings
Hello, and world. The result is Hello, world.
Chapter 10 198
Use the Substring function to extract part of a string. When using Substring, the
rst parameter is the string. The second parameter, the Index, is the number of
the rst character to extract. The third parameter is the number of characters to
include after the Index. For example, Substring("Hello", 4, 2) returns lo. If the third
parameter is omitted, the entire string from the Index to the end of the string
is returned.
Numbers used in string expressions are automatically converted to strings when
used with string operators. For example, "value_"&(index+1) evaluates the numerical
expression index+1, after which the resulting number is concatenated to the end
of the string value_.
Arithmetic operators
Flash operators follow basic mathematical principles. Multiplication and
division occur before addition and subtraction. Terms within parentheses
occur before multiplication and division. Attempting division by zero results
in the string #ERROR#.
These are some examples of arithmetic expressions:
(1+2)*3
Principal*Rate*Time
Subtotal*(1+(SalesTaxRate/100))
-Value (negative value of variable Value)
+Value (leaves value unchanged)
You can use the functions Int() and Length() in arithmetic expressions because these
functions return numbers.
Int(number) returns the integer value of a specic number. For example, INT(12.5)
returns 12.
Length(string) returns the length of the specied string. For example, Length("Hello")
returns 5.
Length(variableName) returns the length of variable name. For example, Random (5)
returns 0, 1, 2, 3, or 4.
If you use a string in a Flash expression, the string is converted to numbers when
used with numerical operators. For example, "1"+2 evaluates to 3.
If the string cannot be converted to a number, the string evaluates to 0. For
example, in the expression "ABC"+3, ABC evaluates to 0. The result is 0+3,
which is 3.
Creating Interactive Movies 199
String operators
Flash treats any sequence of characters surrounded by double quotation marks as a
literal string.The following operations are useful for manipulating strings and
specifying string contents.For example, this statement uses the string comparison
operator eq to test whether the variable name contains the string Harold:
name eq "Harold"
Comparison operators
Comparison expressions compare two expressions to each other. These are usually
used for If statements and Loop statements. For example, the statement Year = 2000
tests whether the value of the variable Year is 2000.
The statement Age >= 18 tests whether the variable Age is greater than or
equal to 18.
Logical expressions
Logical expressions are, like comparison expressions, usually used for If statements
and Loop statements.
For example, the statement Index <= 10 and Done = 0 tests whether the variable
Index is less than or equal to 10 and whether the variable Done equals 0.
The statement LotteryNumber >= 6 and LotteryNumber <= 49 tests whether the
variable LotteryNumber is between 6 and 49.
The statement Index < 1 or Index > 10 tests whether the variable Index is out of the
range 1 to 10.
The statement not (Index < 1 or Index > 10) tests whether the variable Index is in the
range 1 to 10.
Measuring time
Use GetTimer to return the number of milliseconds elapsed since the movie started
playing. For example, in a frame the statement
Trace (Int(GetTimer / 1000) & " seconds have elapsed.")
creates a message in an output window displaying each second as it elapses.
Converting ASCII code characters
Flash can convert ASCII code numbers into characters, and characters into ASCII
code numbers.
The function Chr converts ASCII code numbers to characters. For example, the
function Chr (65) = "A" converts the number 65 to the letter A.
The function Ord converts characters to ASCII code numbers. For example, the
function Ord(a) = 97 converts the letter a to the number 97.
Chapter 10 200
Using properties
Movie clip properties are essentially variables that exist for every movie clip. You
can set values for properties to modify the behavior of a movie clip, or retrieve
property values to evaluate them and initiate statements based on the results. The
Expression Editor contains a complete list of all available properties. Most
property values are specic to individual movie clips. However, some properties
are applied to the entire movie and are called global properties.
Movie clip properties
Most movie clip properties are self-explanatory. (For example, _width is the width
of the movie clip in pixels). However, the following movie clip properties need to
be claried:
The _x and _y properties are in pixels, with the upper left corner of the Stage
being (0, 0).
The _x and _y properties are specied in the local coordinate system of the
movie clip's parent. If a movie clip is in the main Timeline, then its coordinate
system refers to the upper left corner of the Stage as 0, 0.
If the move clip is inside another movie clip that has transformations, the
movie clip is in the local coordinate system of the enclosing movie clip. Thus,
for a movie clip rotated 90 degrees counterclockwise, the movie clips children
inherit a coordinate system that is rotated 90 degrees counterclockwise.
For example, suppose that animated movie clip A sets the _x property for every
frame in order to animate a circle moving from the left to the right. If you
place movie clip A into movie clip B, which is rotated 90 degrees
counterclockwise, the circle in movie clip A will travel from bottom to top
instead of left to right, even though the _x property is being set. The rotation
of the parent movie clip has rotated the coordinate system of the children.
The movie clips coordinates refer to the registration point position. If Use
Center Point is checked in the Object Properties dialog box, the center point
location is the registration point. Otherwise, the center point location is the
upper left corner of the object.
_xscale and _yscale are measured in percentages with the default set to 100.
Scaling is applied from the registration point of the movie clip.
Scaling of the local coordinate system affects what the _x and _y properties
mean. At the top level, the _x and _y properties are values in whole pixels. In
the example of a moving circle, if the parent movie clip is scaled to 50%,
setting the _x property moves the circle half the number of pixels as when the
scale was 100%.
_rotation is set in degrees.
Creating Interactive Movies 201
The _x, _y, _rotation, _xscale and _yscale properties are all cumulative. They
transform not only the movie clip but any children the movie clip has. They
are affected by the transformations on the movie clips parent.
_url is the URL where the movie clip resides.
_visible can be set to True (default) or False. If False, the movie hides the movie
clip instance and it is not hittested. The button or frame actions in that clip
will not work.
Text field scrolling properties
If a scene contains a text eld associated with a variable, there are two special
properties associated with the display of that text eld:
Use the scroll property to dene where the text eld begins displaying its content.
This property can be particularly useful to direct an audience to a specic
paragraph in a long passage.
variable_name.scroll The scroll value is the line number of the topmost visible
line in the text field.
The scroll value is initially set by you. The default is 1, and
Flash updates this value as the audience scrolls up and
down the text field.
The scroll value may be retrieved and modified.
variable_name.maxscroll The maxscroll value is the line number that is the maximum
value that scroll can be based on the height of the
text field.
Flash sets the maxscroll value.
The maxscroll value may be retrieved, but not modified.
Chapter 10 202
For example, in a text eld that is four lines in vertical size and identifying variable
speech which is nine lines, vertically, then only part of the speech can be shown
(identied by the solid outlined box):
speech.scroll equals 1 because the texteld starts displaying at the rst line.
speech.maxscroll equals 6 because, as the audience scrolls down to see the last line,
line 6 is the uppermost limit of the text eld.
Note: These variables return unpredictable values if more than one text eld displays the
same variable at the same time. (This can occur when the audience can scroll through two
elds displaying the same variable at the same time).
Global properties
Global properties impact the entire movie, not just specic movie clips. (The
Target eld is disabled for these properties because you cannot specify an
individual level). The values of these properties can be read from anywhere in the
main Timeline.
_highquality can have one of three values:
0 = low quality (no anti-aliasing)
1 = high quality (anti-aliasing and if the movie does not
contain animation, bitmaps are smoothed. If the movie
contains animation, bitmaps are not smoothed.)
2 = best quality (anti-aliasing and bitmaps are always
smoothed)
_focusrect If true (nonzero), the audience sees a yellow rectangle around
the currently focused button as they use the Tab key to
navigate buttons. The default value is true. Set to false if you
want your audience to see only the button Over state as they
navigate.
_soundbuftime Establishes the number of seconds of streaming sound to pre-
buffer. The default is 5 seconds.
1
2
3
4
5
6
7
8
9
Creating Interactive Movies 203
Troubleshooting Interactivity
The level of sophistication of some actions, especially in combination with one
another, can create complexity as well. Continually test your movie clips and keep
some of the following tips in mind to help you with any unexpected results:
Trace displays information in an output window. You can use trace to have
programming notes or specic results appear when a button is pushed, or a
frame is played while testing a movie or scene. You can write expressions in the
trace statement parameters to check if a condition exists or not, and have the
trace window display values while testing a movie.
If a variable is attached to a frame that has not been loaded, then the value of
that variable is null.
While testing a movie or scene, use the commands Control > List Objects and
Control > List Variables.
For ease in reading actions that have long lines or contain many lines, use the
Object inspector or Frame inspector to display the actions entire text.
Chapter 10 204
205
11
CHAPTER 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Interface Elements
Creating interface elements overview
You can use Flashs interactivity features to assemble common interface elements
such as pop-up menus, drop-down lists and command menus. Such elements are
useful for collecting data in forms and for allowing users to interact with a movie
as they would a stand-alone application.
Creating forms
Forms are an advanced type of interactivitya combination of buttons, movies
and elds that let you pass information to another application on a local or remote
server. All common form elements (such as radio buttons, drop down lists, and
check boxes) can be created as movies or buttons with the look and feel of your
web sites overall design.
Common types of forms that use such interface elements include surveys, order
forms, and search interfaces. For example, a Flash form can collect and send
address information to another application that compiles the information into an
email or database le.
Forms require two components: the Flash elements that make up the form and
either a server-side application or client-side script to process the information that
the user enters. The following steps outline the general procedure for creating
form elements in Flash.
Chapter 11 206
To create a form:
1 Create a library of elements such as buttons and checkboxes.
2 Place a combination of editable text elds and symbol instances in the movie
using the layout you want.
3 Name the variables within the Properties dialog box for each text eld. Use
unique and descriptive variable names.
4 Assign the button actions that send data to a Flash Player or web-based
application via HTTP.
Creating forms that interact with a web server
Use the Get URL statement to send variables to databases, email, or other
applications. (You can also use Get URL with mailto:[email protected] as the
URL parameter to send an email directly from a browser.) Use the Load Variables
statement to collect information from web servers. For example, you can use Load
Variables to retrieve variables for a movie clip from a remote server, and then
display the variables as current information from a news server. Both of these
statements are described in more detail in Jumping to a different URL on
page 179 and Obtaining variables from a remote le on page 183.
Using variables in forms
For better results, do the following when using variables in forms:
Provide variable names that clearly indicate what the variables represent. For
example, with multiple forms that ask for user names, item names, and
location names, its a good ides to use variable names that indicate the context
of the data.
Make sure that the variable names correspond to the names expected by the
application or script that receives the variables.
Use variables in the Timeline or movie clip to record and track information.
(This is also called maintaining state.) This acts as the equivalent of using
a hidden eld in an HTML form to make it possible for your users to reset
a form.
If you have variables attached to particular frames, use the _framesloaded
property or the If Frame is Loaded statement to ensure that the variables are
identied before sending them. See Checking whether a frame is loaded on
page 179.
Evaluate variables before sending them to a web server. If a server-side
application expects a number in a certain format, make sure the user has
entered proper data. For more information, see Verifying entered data on
page 208.
Creating Interface Elements 207
Creating a dialog box
A dialog box is a typical short form and provides a good introduction to creating
forms. The following example provides instructions for creating a search dialog
box: a text eld and a button using the Get URL statement. By entering the required
information, users can pass a keyword to a search engine on a remote web server.
You can use the steps in Creating pop-up menus on page 209 to make the
password dialog box a pop-up menu.
To create a simple search dialog box:
1 Create a button that you can use to submit the entered data.
Do not include any text over the button. You can do this within each form to
suit the specic needs of the instance.
2 Create a label, a blank text eld, and an instance of the button on the Stage
as follows:
3 Select the text eld and choose Modify > Text Field.
4 Specify a name for the variable. (Individual search engines may require a
specic variable. Contact the search engines provider for details.) Select Draw
Border and Background, and Include All Font Outlines. Click OK.
5 On the Stage, select the button and choose Modify > Instance.
6 Click the Actions tab. Click the + (plus) and choose Get URL from the
pop-up menu.
7 In the Parameters pane, set the following options:
For URL, enter the URL for the search engine.
For Window, select _blank. This will open a new window with the search
results in it.
For Variables, select Send Using GET.
8 On the Stage, create a text eld over the button instance with the text
you want.
9 To see the form work, choose File > Publish Preview > HTML.
Chapter 11 208
For passwords and secure information
Flash relies on standard browser and HTTP security features. If you want to
support secure passwords in Flash, you need to establish your password
authentication with a request to a web server. Essentially, Flash offers the same
security that is available with standard HTML. You should follow the same rules
that you follow when building secure HTML web sites.
For a password, request a password from the user and then submit it to a sever by
using a Load Variables statement, using the Send using POST parameter, via an
HTTPS: URL. The web server could then verify whether the password is valid.
This way, the password would never be available in the SWF le.
For more information, see Obtaining variables from a remote le on page 183.
Verifying entered data
For a form that passes variables to an application on a web server, you want to
verify that the audience is entering proper information. For example, you dont
want your audience to enter text in a phone number eld. Use a series of
Set Variable statements in conjunction with Loop and If to evaluate entered data.
Creating Interface Elements 209
The following sample action checks to see whether the data is a number, and that
the number is in the format ###-###-####. If the data is valid, the message
Good, this is a valid phone number! is displayed. If the data is not valid, the
message This phone number is invalid! is displayed:
On (Release)
If (Length(PhoneNumber) = 12)
Set Variable: "Index" = 1
Set Variable: "Valid" = true
Loop While (Index <= 12 and Valid)
Set Variable: "Char" = Substring(PhoneNumber,Index,1)
If (Index = 4 or Index = 8)
If (Char ne "-")
Set Variable: "Valid" = false
End If
Else
If (not (Ord(Char) >= Ord("0") and Ord(Char) <= Ord("9")))
Set Variable: "Valid" = false
End If
End If
Set Variable: "Index" = Index+1
End Loop
Else
Set Variable: "Valid" = false
End If
If (Valid = true)
Set Variable: "Message" = "Good, this is a valid phone number!"
Else
Set Variable: "Message" = "This phone number is invalid!"
End If
End On
When the time comes to send the data, create a button that has an action similar
to the following. (Replace the Get URL parameters with parameters appropriate for
your movie.):
On (Release)
If (Valid = true)
Get URL ("www.webserver.com", window="_self", vars=GET)
End If
End On
Creating pop-up menus
Creating a pop-up menu requires two steps:
Turning on the Track As Menu Item option in the Properties dialog box for all
buttons in the pop-up menu. As a result, all other buttons in the menu can
receive the mouse release events.
Enclosing the pop-up menu with a large button that closes the menu if the
user rolls the pointer off the menu and releases the mouse button.
Chapter 11 210
The following example explains how to create a very simple pop-up menu that can
be used as the basis for something more complex. The instructions assume that
you are familiar with creating button and movie clip symbols, and attaching
actions to buttons and frames.
To create a button for use in a pop-up menu:
1 Create a new button symbol for the menu items.
2 Draw a lled white rectangle in the Up frame of the button symbols Timeline.
3 Create a keyframe in the Over frame.
4 Fill the rectangle with a different color for the highlight color of menu items.
You dont need to dene the Down or Hit frames.
To create the pop-up menu movie clip:
1 Create a new movie clip symbol.
2 Place an instance of the button symbol you just created in the rst frame of
the movie clip.
3 Double-click the button, and then select the Actions tab in the Properties
dialog box.
4 Click the + (plus), choose On MouseEvent from the pop-up menu, and select
Press in the Parameters pane. With the On (Press) line selected, choose Go To
from the pop-up menu. Specify Frame Number as the parameter and enter 1
in the box.
This action makes the movie clip go to the next frame when the user clicks the
button. The next frame will show the open menu. Use the On (Press) condition
because pop-up menus respond instantly when clicked, not when the mouse is
released as do normal buttons.
5 Double-click the rst frame in the Timeline, and select the Actions tab in the
Frame Properties dialog box. Click the + (plus) and choose Go To from the
pop-up menu. Choose Frame Number 1 as the parameter.
This makes the movie loop on frame 1 until the user clicks the button.
Clicking the button sends the movie to frame 2.
6 Create a keyframe in frame 2.
7 Create several instances of the button symbol you made earlier. Arrange the
instances in a column below the button you created in frame 1.
8 Use Modify > Align to align and evenly space the instances.
9 Add text labels to each button.
Creating Interface Elements 211
10 Double-click each button, including the top button you created in frame 1.
Use the Instance Properties dialog box to do the following:
Click the Denition tab and select Track as Menu Item. (When set to Track
as Menu Item, a clicked button allows other buttons to receive the mouse
release event.)
Click the Actions tab and choose the statement that you want the menu item
to run. Following this statement, choose a Go To statement that sends the
movie clip back to the rst frame. The action may look something like this:
On (Release)
Toggle High Quality
Go To and Stop (1)
End On
The Go To statement closes the menu after the user makes a selection.
11 To test the pop-up menu, create an instance of the pop-up menu movie clip
symbol and choose Control > Test Movie.
The pop-up menu works in most respects, except that it stays open when you
open the menu and click somewhere off the menu.
To make the pop-up menu close when the user clicks outside the menu:
1 Create a new button symbol that is a rectangle the same size and color as
the Stage.
Dont dene a Down, Over, or Hit state for the button because you dont want
the button to respond visibly to being clicked.
2 Open the movie in symbol-editing mode, and create a new layer underneath
the layer youve been working in.
3 Create an instance of the large button you just made.
4 Double-click the button.
5 Turn on the Track as Menu Item option in the Instance Properties dialog box,
and then attach a Go To statement that sends the movie clip back to frame 1.
To test the pop-up menu, create an instance of the pop-up menu symbol on the
Stage and choose Control > Test Movie.
Chapter 11 212
213
12
CHAPTER 12
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding Sound
Adding sound overview
Flash offers a number of ways to use sounds. You can make sounds that play
continuously, independent of the Timeline, or you can synchronize animation to a
sound track. Attach sounds to buttons to make them more responsive. Make
sounds fade in and out for a more polished sound track.
There are two types of sounds in Flash, event sounds and stream sounds. An event
sound must download completely before it begins playing and continues playing
until explicitly stopped. Stream sounds begin playing as soon as enough data for
the rst few frames has been downloaded and synchronizes the sound to the
Timeline for playing on a web site.
Adding sounds to a movie involves creating a layer for the sound, assigning the
sound, and setting options in the Sound panel of the Frame Properties dialog box.
The sampling rate and degree of compression signicantly affect the quality and
size of sounds in exported movies. Control the exported quality and size of
individual sounds with the Sound Properties dialog box, or dene settings for all
sounds in the movie in the Publish Settings dialog box.
For an interactive introduction to using sound in Flash, choose Help > Lessons >
6 Sound.
Importing sounds
Choose File > Import to bring either AIFF or WAV sounds into Flash, just as you
would import any other le type. Flash stores sounds in the Library along with
bitmaps and symbols.
Chapter 12 214
Sounds can use considerable amounts of disk space and RAM. Generally, its best
to use 22 kHz 16-bit mono sounds (stereo uses twice as much data as mono), but
Flash can import either 8- or 16-bit sounds at sample rates of 11 kHz, 22 kHz, or
44 kHz. Flash can convert sounds to lower sample rates on export. See Exporting
movies with sound on page 219.
Like symbols, you need only one copy of a sound le to use that sound in any
number of ways in your movie.
Note: Sounds recorded in formats that are not multiples of 11 kHz (such as 8, 32, or 96 kHz)
are resampled when imported into Flash causing the sound to play lower or higher than
originally recorded.
To import a sound:
1 Choose File > Import.
2 In the standard import dialog box, locate and open the desired AIFF or
WAV le.
Note: If you want to add effects to sounds in Flash, its best to import 16-bit sounds. If
you have limited RAM, keep your sound clips short or work with 8-bit sounds instead of
16-bit sounds.
Adding sounds to a movie
Adding sounds to a movie involves creating a layer for the sound, assigning the
sound, and setting options in the Sound panel of the Frame Properties dialog box.
To add sound to a movie:
1 Import the sound into the movie.
See Importing sounds on page 213.
2 Choose Insert > Layer to create a layer for sound.
You can place sounds on as many layers as you want. Each layer acts like a
separate sound channel. The sounds on all layers are combined when you play
back the movie.
3 Click the frame of the sound layer where you want the sound to start.
4 Choose Modify > Frame and then click the Sound tab in the Frame Properties
dialog box.
Adding Sound 215
5 From the Sound pop-up menu, choose the name of the sound le to associate
with this sound layer.
If the sound doesnt appear in the pop-up menu, you have to import it. See
Importing sounds on page 213.
6 Choose a synchronization option:
Event synchronizes the sound to the occurrence of an event. An event sound
plays when its starting keyframe is rst displayed and plays in its entirety,
independently of the Timeline, even if the movie stops. Event sounds are
mixed when you play your published movie.
Start is the same as Event, except that if the sound is already playing, a new
instance of the sound is started.
Stop silences the specied sound.
Stream synchronizes the sound for playing on a web site. Flash forces
animation to keep pace with stream sounds. If Flash cant draw animation
frames quickly enough, it skips frames. Unlike event sounds, stream sounds
stop if the animation stops. Also, a stream sound can never play longer than
the length of the frames it occupies. Stream sounds are mixed when you
publish your movie.
7 Enter a value in Loop to specify the number of times the sound should loop;
for continuous play, enter a very high number.
Chapter 12 216
8 Use the Sound window controls to edit the sound as needed. Choose from the
following options.
None applies no effects to the sound le. Choose this option to remove
previously applied effects.
Left Channel/Right Channel plays sound only in the left or right channel.
Fade Left to Right/Fade Right to Left shifts the sound from one channel to
the other.
Fade In gradually increases the amplitude of a sound over its duration.
Fade Out gradually decreases the amplitude of a sound over its duration.
Custom lets you create your own sound effects. Use the Sound window to
customize the sound wave. See Using the sound-editing controls on
page 216.
To use a shortcut for adding sounds:
1 Make the sound layer the current layer.
2 Drag a sound from the Library preview window directly to the Stage.
Flash places the sound in the current frame with default sound settings.
Using the sound-editing controls
Use the sound-editing controls in the Sound panel of the Frame Properties dialog
box to dene the starting point of a sound or to control the volume of the sound
as it plays.
Flash can change the point at which a sound starts and stops playing. This is
useful for making sounds smaller by removing unused sections.
Adding Sound 217
To edit a sound with the sound editing controls:
1 Add a sound to a frame (see Adding sounds to a movie on page 214), or
select a frame already containing a sound and choose Modify > Frame; then
click Sound in the Frame Properties dialog box.
2 Do any of the following:
To change the start and end points of a sound, drag the Time In and Time
Out controls in the Sound Frame Properties dialog box.
To change the sound envelope, drag the envelope handles on the envelope
lines to change levels at different points in the sound. Envelope lines show the
volume of the sound as it plays. Click on the lines to create up to eight
envelope handles. To remove an envelope handle, drag it out of the window.
To display more or less of the sound in the window, click the Zoom In/Out
buttons.
To switch the time units between seconds and frames, click the Seconds and
Frames buttons.
Starting and stopping sounds at a keyframe
Starting and stopping sounds at keyframes in synchronization with animation is
the most common sound-related task.
Time In control Time Out control
Zoom In/Out
Seconds/Frames
Envelope lines Envelope handles
Play
Stop
Chapter 12 218
To stop and start a sound at a keyframe:
1 Add a sound to a movie in a layer by itself.
To synchronize this sound with an event in the scene, choose a beginning
keyframe that corresponds to the keyframe of the event in the scene. You can
choose any of the synchronization options. See Adding sounds to a movie on
page 214.
2 Create a keyframe in the sound layers time strip at the frame where you want
the sound to end.
A representation of the sound le appears in the time strip.
3 Double-click the ending keyframe and click the Sound tab in the Frame
Properties dialog box.
4 Choose the same sound from the Sound pop-up menu.
5 Choose Stop from the Synchronization pop-up menu.
When you play the movie, the sound stops playing when it reaches the
ending keyframe.
Shift-dragging the playback head repeats the streaming sound of the frame you
are on. This is useful for aligning sounds to your animation.
Adding sounds to buttons
You can associate sounds with the different states of a button symbol. Because the
sounds are stored with the symbol, they work for all instances of the symbol.
To add sounds to a button:
1 Select the button in the Library.
2 Choose Edit from the Symbol pop-up menu.
3 In the buttons Timeline, add a sound layer.
4 In the sound layer, create one keyframe to correspond with each button state
you want to have a sound.
For example, to add a sound that plays when the button is clicked, create a
keyframe in the frame labeled Down.
5 Add a sound to the new keyframe and choose Event from the Synchronization
pop-up menu.
To associate a different sound with each of the buttons keyframes, use a
different sound layer and sound le for each keyframe. You can also use the
same sound le but create or use a different sound effect for each
button frame.
Adding Sound 219
Exporting movies with sound
The sampling rate and degree of compression make a signicant difference in the
quality and size of sounds in exported movies. The more you compress a sound
and the lower the sampling rate, the smaller the size and the lower the quality. You
will have to experiment to get the best results.
Control the exported quality and size of individual sounds using the export
settings in the Sound Properties dialog box. If there are no export settings dened
for a sound, Flash exports the sound using the sound settings in the Publish
Settings dialog box. See Flash publish settings on page 229. To override export
settings for all the sounds in a movie, enter the sound settings in the Publish
Settings dialog box. This option is useful if you want to create a larger high-
delity audio movie for local use, and a smaller low- delity version for the web.
Note: In Windows, you can also export all the sound from a movie as a WAV le using File >
Export Movie. See Using Export Movie and Export Image on page 242.
To set export properties for an individual sound:
1 Right-click (Windows) or Control-click (Macintosh) a sound le in the
Library window and choose Properties from the context menu.
2 If the sound le has been edited externally, click Update.
3 Set export settings as described in Specifying sound compression options on
page 220.
4 Click Test and Stop to play and stop the sound.
Chapter 12 220
Specifying sound compression options
Use the options in the Export Settings area of the Sound Properties dialog box to
choose sound compression options. The options available depend on the
compression method you select.
Default Uses the default compression settings in the Publish Settings dialog box
when you export your movie. No additional options are available for this setting.
ADPCM Sets compression for 16-bit sound data. Use the ADPCM setting when
you are exporting short event sounds such as button clicks. When you select
ADPCM, Convert Stereo to Mono, Sample Rate, and ADPCM bits options
are displayed.
Convert Stereo to Mono Mixes stereo sounds to mono. Mono sounds are
unaffected.
Sample Rate Sets the export rate for the le. Higher rates yield better sound
delity and larger sound les. Lower rates save disk space. Rate options, in either
mono or stereo, are as follows: 5 kHz is barely acceptable for speech; 11 kHz is the
lowest recommended quality for a short segment of music and is a quarter of the
standard CD rate; 22 kHz is a popular choice for web playback and is half the
standard CD rate; and 44 kHz is the standard compact disc (CD) audio rate.
Flash cannot improve the quality of sounds. If a sound is recorded at 11 KHz
mono, Flash continues to export it at 11KHz mono even if you change the
sampling rate to 44Khz stereo.
ADPCM Bits Determines the number of bits used in ADPCM encoding. Greater
compression rates yield smaller sound les but poorer sound delity. 2-bit is the
smallest, lowest quality option; 5-bit is the largest, best quality option.
MP3 Lets you export sounds with MP3 compression. Use MP3 when you are
exporting longer, stream sounds such as music soundtracks. When MP3
compression is selected, Preprocessing, Bit Rate, and Quality options are available.
Bit Rate Determines the maximum bit rate of the sound produced by the MP3
encoder. The MP3 Bit Rate parameter is only shown when you select MP3
encoding as the compression option. When you are exporting music, set the bit
rate to 16 Kbps or higher for the best results. The Convert Stereo to Mono option
is not available at 16Kbps or lower.
Quality Lets you choose between Fast, Medium, or Best. Use the Fast setting if you
are publishing your movie on a web site. Use Medium or Best if you are running
your movie on your hard drive, or on CD.
RAW Exports sounds with no sound compression. You can select the Convert
Stereo to Mono option and sample rate when this setting is selected.
Adding Sound 221
Guidelines for exporting sound in movies
Aside from sampling rate and compression, there are several ways to use sound
efciently in a movie and keep le size down:
Set the in and out point to prevent silent areas from being stored in the
Shockwave Flash le and reduce the size of the sound.
Get more out of the same sounds by applying different effects for sounds at
different keyframes (such as volume envelopes, looping, and in/out points).
You can get a number of sound effects using only one sound le.
Use looping to extract the common part of the sound and play it repeatedly.
Loop short sounds for background music.
Guidelines for exporting sound to video
Movies that you export as QuickTime or Windows AVI les use sound differently
than Shockwave Flash movies; thus, le size considerations for Flash movies may
not apply to QuickTime or AVI videos. Guidelines for exporting to video include:
Use as many sounds and channels as you want without worrying about le
size. The sounds are combined into a single sound track when you export as
QuickTime or Windows AVI. The number of sounds you use has no effect on
the nal le size.
Use stream synchronization to keep the animation synchronized to your
sound track when you preview your animation in the editor. If your computer
is not fast enough to draw the animation frames so that they keep up with
your sound track, Flash skips frames.
Chapter 12 222
223
13
CHAPTER 13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Publishing and Exporting
Publishing and exporting overview
When you create a web site with Flash, you often need to include several other
les. To open a Flash Player movie in a browser, you must rst open an HTML
document which in turn activates the Flash Player and runs the movie. In
addition to this HTML document, you may also want to create an animated-GIF
version of your movie, or a JPEG or GIF image to display if the Flash Player is
not installed.
The main le format for distributing Flash content is the Flash Player format
(.swf ). The Flash Player format is the only one that supports all Flash interactive
functionality. You can play a Flash Player movie in the following ways:
In Internet browsers such as Netscape and Internet Explorer that are equipped
with the Flash Player
With the Flash Xtra in Director and Authorware
With the Flash Active X control in Microsoft Ofce and other Active X hosts
As part of a QuickTime movie
As a type of stand-alone application called a projector
The Flash Player le format is an open standard and may be supported by other
applications in the future. Consult the Macromedia web site for the latest
information.
In addition to the Flash Player format, you can export moving and still images
from Flash in a variety of formats, including GIF, JPEG, PNG, BMP, PICT,
QuickTime, or AVI.
Chapter 13 224
Use the Publish command to create the les you need for a Flash web application
all at once with a single command. Publish generates not only a Flash Player le,
but graphic les in many formats usable as alternate images, and an HTML
document with all the settings required to play your movie.
If you want to quickly export a single le of a certain type, use the Export
command. Export options are oriented towards providing Flash content for
modication in other applications. You can export an entire movie as a Flash
Player le or as a series of bitmap images. You can also export a single frame or
image as an image le.
Instead of using Publish, you can also create your own HTML document with any
HTML editor and include the tags required to display a Flash movie.
Before you complete the publishing process, you can test how a movie works with
Test Movie and Test Scene.
Note: To alter or update a Flash Player movie created with Publish, edit the original Flash
movie and then use Publish again. Flash Player movies imported into Flash lose some of the
authoring environment information.
Publishing and Exporting 225
Optimizing movies
As part of the publishing process, Flash automatically detects duplicate shapes on
export and places them in the le only once, and converts nested groups into
single groups.
You can further reduce a movies size before exporting it to minimize downloading
time by doing any of the following:
Use symbols, animated or otherwise, for every element that appears more
than once.
Whenever possible, use tweened animations, which require less overhead than
a series of keyframes.
Limit the number of special line types such as dashed, dotted, ragged, and so
on. Solid lines are smaller. Lines created with the pencil tool require less
memory than brush strokes.
Use layers to separate elements that change over the course of the animation
from those that do not.
Use Modify > Curves > Optimize to minimize the number of separate lines
that are used to describe shapes.
Limit the number of fonts and font styles.
When including text elds, use the Include Only Specied Font Outlines
option in Text Field properties instead of Include All Font Outlines.
MP3 is the smallest format for sound. Use it as much as possible.
Embedded fonts increase le size. Use them sparingly.
Avoid animating bitmap elements; use bitmap images as background or
static elements.
Limit the area of change in each keyframe; make the action take place in as
small an area as possible.
Group elements as much as possible.
Use the Color Effects pop-up menu in the Instance Properties dialog box to
create many different colored instances of a single symbol.
Use the Colors window to match the color palette of the movie to a browser-
specic palette.
Use gradients sparingly. Filling an area with gradient color requires about 50
bytes more than lling it with solid color.
As you make changes, test your movie on a variety of different computers,
operating systems, and Internet connections.
Chapter 13 226
Testing movie download performance
Test movies to nd places where pauses may occur during downloading. If
required data has not downloaded by the time the movie reaches a frame, the
movie pauses until the data arrives. The Bandwidth Proler graphically compares
how much data must be sent for each frame in the movie according to the dened
modem speed.
In simulating the speed of downloading, the Bandwidth Proler uses estimates of
typical Internet performance, not the exact speed of the modem. For example, a
28.8 Kbps modem can theoretically download data at 3.5 Kbytes/second, but
when you choose 28.8 from the Control menu, Flash sets the actual rate to 2.3
Kbytes/second in order to more accurately simulate typical Internet performance.
You test either a single scene or an entire movie. Choose File > Publish Settings to
change the settings for the Flash Player le created by Test Movie and Test Scene.
See Previewing and testing movies.
To test downloading performance:
1 Choose Control > Test Scene or Control > Test Movie.
Flash exports the current scene or movie as an SWF le and opens the
SWF le in a new window. It uses the export settings dened in the Publish
Setting dialog box. See Publishing Flash movies. The movie begins playing
immediately.
2 Choose a downloading speed from the View menu to determine the
downloading rate that Flash simulates: Choose 14.4 Kbps, 28.8 Kbps, or 56
Kbps; or choose Customize and enter your own settings.
Publishing and Exporting 227
3 Choose View > Bandwidth Proler to see a graph of the downloading
performance.
Each alternating light and dark block is an individual frame of the movie. The
size of the block corresponds to that frame's size in bytes. If a block goes above
the red line, the movie must wait for that frame to load.
In streaming mode the header indicates the number of frames loaded along
with the frame currently playing.
4 Stop the movie and click the shaded bands in the graph to see settings for a
particular frame in the area on the left.
5 While viewing the graph, adjust the view:
Choose Control > Show Streaming to turn the streaming bar off or on.
Choose View > Streaming Graph to see which frames will cause pauses.
Choose View > Frame by Frame to see the size of each frame.
6 Close the test window to return to the normal authoring environment.
You can also choose File > Open to test an existing SWF le.
Streaming bar
Frames above this line
cause loading delays
Chapter 13 228
Publishing Flash movies
Use the Publish command to prepare all the required les for a complete Flash
application on the web. Publish prepares not only the Flash movie itself for the
web, but creates alternate images in a variety of formats that display automatically
if a Flash player is not available. Publish creates the supporting HTML document
required to display a movie (or an alternate image) in a browser and control
browser settings. Publish can also create stand-alone projectors for both Windows
and Macintosh systems and QuickTime videos from Flash movies.
Before publishing, use the Publish Settings command to choose formats and
specify settings. Once you have entered all the necessary Publish Settings options,
you can repeatedly export to all selected formats at once by simply choosing File >
Publish. Flash stores the Publish Setting you specify with the movie le, so each
le can have its own settings.
To publish a movie:
1 Choose File > Publish Settings.
2 Select the option for each le format you want to create.
When you select a format for which Flash offers additional settings, a new tab
appears above the current panel in the dialog box. Note that Windows and
Macintosh projector options have no settings and therefore do not have their
own tabs in the Publish Setting dialog box. When you choose an image format
such as GIF, JPEG, or PNG, Flash automatically add the required HTML
code to display the image if the Flash player is not available.
3 Enter a unique name for le, or select Use Default Name to create each le
using the Flash les name with the extension appropriate for that format.
4 Click the tab for the format options you want to change. Specify publish
settings for each format as described in the following sections. Click Publish to
generate all the specied les when youre done, or click OK to close the
dialog box without publishing.
Flash generates the les as specied in Publish Settings. Choose File > Publish
to immediately publish les in all specied formats using the current
publish settings.
Publishing and Exporting 229
Flash publish settings
Use the Flash panel in the Publish Settings dialog box to set options for the Flash
Player movie that is created in the Publish process. You can choose several options
when exporting a Flash Player movie, including image and sound compression
options, and an option to protect your movie from being imported.
Use the controls in the Flash panel of the Publish Settings dialog box to change
the following settings:
Load Order Determines how layers are loaded for the rst frame. Over a slow
network or modem connection, Flash draws parts of the movie as they become
available. Use this option to determine what will appear rst when the movie
downloads. Load order affects only the rst frame.
Generate Size Report Produces a text le useful as a guide for minimizing the le
size of the movie. This size report shows how many bytes various parts of your
movie use in the nal Flash Player le. The report has the same name as the
exported movie, but with a .txt extension.
Protect From Import Prevents the Flash Player movie from being downloaded
from the web and imported back into Flash.
Omit Trace Actions Makes Flash ignore the Trace statement in the current movie.
Trace causes Flash to open an output window to display certain content.
JPEG Quality Determines the amount of JPEG le compression applied to any
bitmaps contained in your le. Lower image quality produces smaller les, while
higher image quality produces larger les. Experiment with different settings to
determine the best trade-off between size and quality: 100 provides the highest
quality and least compression. If the exported image contains no bitmaps, this
setting has no effect.
Audio Stream and Audio Event Specify the rate and compression for exported
stream and event sounds, respectively. (If you dont understand the difference
between stream and event sounds, see Adding sound overview.) These settings
apply only if you have not specied settings for individual sounds in the Sound
Properties dialog box, or if you have turned on the Override Sound Settings
option. The settings are identical to the settings for individual sounds in the
Sound Properties dialog box. See Exporting movies with sound. If the movie has
no streamed sounds, this setting has no effect.
Override Sound Settings Makes the settings in this dialog box override settings
dened in the Sound Properties dialog box for individual sounds. This option is
useful if you want to create a larger high delity audio movie for local use, and
smaller low delity version for the web. See Exporting movies with sound on
page 219.
Version Species which version of the Flash Player the exported movie will play
back on. Flash 4 features do not work in movies exported in earlier versions.
Chapter 13 230
HTML publish settings
To play a Flash movie in a web browser, you must create an HTML document
that activates the movie and species browser settings. You can use Publish to
generate the required HTML document automatically.
There are HTML parameters that determine where the Flash movie appears in the
window, the background color, the size of the movie, and so on. You can change
these and other settings with the options in the HTML panel of the Publish
Settings dialog box.
Flash inserts the HTML parameters you specify in a template document. The
template document can be any text le that contains the appropriate template
variables. A template can be a plain HTML le, or one that also includes code for
special interpreters such as Cold Fusion or ASP. You select a template to use from
several included with Flash. There are basic templates that simply display the
movie in a browser, and more advanced templates containing code for browser
detection and other features. You can use included templates, or create your own.
See Creating templates for HTML publishing on page 247.
Note: You can also manually enter HTML parameters for Flash using any HTML editor. See
About Flash HTML requirements on page 251.
Many of the settings Flash modies are parameters of the OBJECT and EMBED tags.
OBJECT is the HTML tag that opens a Flash movie in Internet Explorer; EMBED is
the Netscape equivalent.
Use the controls in the HTML panel of the Publish Setting dialog box to change
the following settings:
Template Species which of the installed templates to use. All of the template les
in the HTML folder in the Flash application folder appear on the pop-up menu.
For a description of each template, select a template from the pop-up menu and
click the Info button to the right. If you dont choose a template Flash uses a
template named Default.html.If Default.html is not present, Flash uses the rst
template on the list.
Flash saves the modied template using the le name of the Flash movie with the
extension of the template. For example, if you select a template named
Standard.asp for use with a Flash movie named MyMovie.swf, the resulting le
would be named MyMovie.asp.
Dimensions Sets the values of the WIDTH and HEIGHT attributes in the OBJECT
and EMBED tags. There are three options on the pop-up menu.
Match Movie sets the dimensions to the size of the movie. This is the
default setting.
Pixels lets you enter the number of pixels in the Width and Height eld.
Percent lets you set the movie dimensions relative to the browser window.
Enter percentage values in the Width and Height elds.
Publishing and Exporting 231
Playback Assigns values to the LOOP, PLAY, MENU, and DEVICE FONT parameters in
the OBJECT and EMBED tags.
Paused at Start sets the PLAY parameter to FALSE and pauses the movie until the
visitor initiates play, either by clicking a button in the movie or by choosing
Play from the shortcut menu. Paused at Start is off by default so that the
movie begins to play as soon as it is loaded.
Loop sets the LOOP parameter to TRUE and repeats the movie when it reaches
the last frame. Deselect this option to stop the movie when it reaches the last
frame. Loop is on by default.
Display Menu sets the MENU parameter to TRUE, making a shortcut menu
available to users when they right-click (Windows) or Command-click
(Macintosh) on the movie. Display Menu is on by default. Deselect the
Display Menu option if you want About Flash to be the only available option
in the shortcut menu.
Device Font (Windows only) sets the DEVICE FONT parameter to TRUE and
substitutes anti-aliased system fonts for fonts that are not installed on the
users system. Device Font is off by default.
Quality Sets the value of the QUALITY parameter in the OBJECT and EMBED tags and
determines the level of anti-aliasing performed. Because anti-aliasing requires a
faster processor to smooth each frame of the movie before it is rendered on the
viewers screen, the QUALITY parameter assigns priorities to appearance and
playback speed.
Low gives priority to playback speed over appearance. With this setting, anti-
aliasing is never used.
Autolow emphasizes speed at rst, but improves appearance whenever
possible. Playback begins with anti-aliasing turned off. If the Flash player
detects that the processor can handle it, anti-aliasing is turned on.
Autohigh emphasizes playback speed and appearance equally at rst, but
sacrices appearance for the sake of playback speed if necessary. Playback
begins with anti-aliasing turned on. If the actual frame rate drops below the
specied frame rate, anti-aliasing is turned off to improve playback speed. Use
this setting to emulate the View > Antialias setting in Flash.
High gives priority to appearance over playback speed. With this setting, anti-
aliasing is always used. If the movie does not contain animation, bitmaps are
smoothed; if there is animation, bitmaps are not smoothed. High is the
default setting for Quality.
Best provides the best display quality and does not consider playback speed.
All output is antialiased and all bitmaps are always smoothed.
Chapter 13 232
Window Mode (Windows only) Sets the WMODE parameter of the OBJECT tag,
which lets you take advantage of the transparent movie, absolute positioning, and
layering capabilities available in Internet Explorer 4.0. This option works only in
the Windows version of Internet Explorer with the Flash Active X control.
Window sets the WMODE parameter value to WINDOW and plays a Flash Player
movie in its own rectangular window on a web page. This setting normally
provides the fastest animation performance.
Opaque Windowless sets the WMODE parameter value to OPAQUE. Use
this setting if you want to move elements behind Flash movies (for example,
with dynamic HTML) and dont want them to show through.
Transparent Windowless sets the WMODE parameter to TRANSPARENT.
Use this setting to make the background of the HTML page on which the
movie is embedded show through all the transparent potions of the movie.
Animation performance might be slower when you use this setting.
Alignment Species the ALIGN attribute for the OBJECT, EMBED, and IMG
tags and determines how the Flash movie window is positioned within the
browser window.
Default centers the movie in the browser window and crops edges if the
browser window is smaller than the movie.
Left aligns the movie along the left edge of the browser window and crops the
top, bottom, and right sides as necessary.
Right aligns the movie along the right edge of the browser window and crops
the top, bottom, and left sides as necessary.
Top aligns the movie along the top edge of the browser window and crops the
bottom, left, and right sides as necessary.
Bottom aligns the movie along the bottom edge of the browser window and
crops the top, left, and right sides as necessary.
Scale Determines the value of the SCALE parameter in the OBJECT and EMBED tags
and denes how the movie is placed within the boundaries you specify in the
Width and Height elds. These settings apply only if you enter a width and height
setting different from the movies original size.
Default (Show all) makes the entire movie visible in the specied area while
maintaining the original aspect ratio of the movie. No distortion occurs.
Borders may appear on two sides of the movie.
No Border scales the movie to ll the specied area while maintaining the
original aspect ratio of the movie. No distortion occurs. Portions of the movie
might be cropped.
Exact Fit makes the entire movie visible in the specied area. However, no
attempt is made to preserve the original aspect ratio, and distortion may occur.
Publishing and Exporting 233
Flash Alignment Sets the SALIGN parameter of the OBJECT and EMBED tags. The
settings you choose from the Horizontal and Vertical pop-up menu determine
how the movie is placed within the movie window and, if it must be cropped
to t that window, how it is cropped. Choose Left, Center or Right from the
Horizontal pop-up menu; and Top, Center, or Bottom from the Vertical
pop-up menu.
Show Warning Messages Determines if Flash displays error messages warning of
conicts in tag settings. For example, with this option on an error message would
appear if a template includes code referring to an alternate image that you have
not specied.
GIF publish settings
GIF les provide an easy way to export drawings and simple animations for use in
web pages. Standard GIF les are simply compressed bitmaps.
An animated GIF (sometimes referred to as a GIF89a) offers a simple way to
export short animation sequences. Flash optimizes an animated GIF, storing only
frame-to-frame changes.
Flash exports the rst frame in the movie as a GIF, unless you mark a different
keyframe for export by entering the frame label #Static. Flash exports all the
frames in the current movie to an animated GIF unless you specify a range
of frames for export by entering the frame labels #First and #Last in the
appropriate keyframes.
Flash can generate an image map for a GIF so buttons that link to URLs in the
original movie continue to function as links in the image. Place the frame label
#Map in the keyframe in which you want to create the image map. If you dont
create a frame label, Flash creates an image map using the buttons in the last frame
of the movie. To create an image map the $IM template variable must be present in
the template you select. See Creating an image map on page 250.
Use the controls in the GIF panel of the Publish Settings dialog box to change the
following settings:
Dimensions Sets the size of the exported bitmap image to the number of pixels
you enter in the Width and Height elds. If you turn on Match Movie, the entries
in the Width and Height elds have no effect and Flash makes the GIF the same
size as the movie. Flash ensures that the size you specify always has the same aspect
ratio as your original image.
Playback Determines if Flash creates a static image, or an animation. Click Static
to export a still image. Click Animated to export an animated GIF. If you choose
Animated, choose either Loop Continuously, or enter a number of repetitions.
Chapter 13 234
Options Specify a range of appearance settings for the exported GIF.
Optimize Colors removes any unused colors from the color table of a GIF le.
This can reduce the size of a GIF le by 1000-1500 bytes with no sacrice in
image quality. It does, however, cause a small increase in the memory
requirements. Note that this option has no effect with an Adaptive palette.
Smooth enables or disables anti-aliasing in the exported bitmap. Smoothing
produces a higher-quality bitmapped image. Text display quality is poor
without anti-aliasing. However, a halo of gray pixels may appear around
an anti-aliased image placed on a colored background. Export without
smoothing if a halo appears, or if you are creating a transparent GIF that
will be placed over a multicolored background. Turning this option off makes
GIF les smaller.
Interlace makes the exported GIF display in a browser incrementally as it
downloads. An interlaced GIF provides the user with basic graphic content
before the le has completely downloaded and may download faster over a
slow network connection. Do not interlace an animated GIF.
Dither Solids applies dithering to solid colors as well as gradients and images.
See the denition of dithering that follows.
Remove Gradients converts all gradients lls in the movie to solid colors using
the rst color in the gradient. Gradients increase the size of a GIF and often
are of poor quality. When using this option you must choose the rst color of
your gradients carefully to prevent unexpected results. The default is false.
Transparent Determines how the background of a movie and alpha (transparency)
settings in Flash are converted to GIF. Choose one of the following options from
the pop-up menu:
Opaque makes the background of the movie opaque.
Transparent makes the background transparent.
Alpha makes all the colors below the threshold alpha value completely
transparent (invisible). Colors with alpha values above the threshold are left as
they are. Enter a value between 0 and 255 in the Threshold box to the right. A
value of 128 corresponds to 50% alpha.
Publishing and Exporting 235
Dither Enables or disables dithering and species the method. Dithering displays
pixels of a range of similar colors to simulate colors not available in the current
palette. With dithering off, Flash replaces colors not in the basic color table with
the solid color from the table that most closely approximates the specied color;
not dithering can produce smaller les, but check the results to see if the colors are
satisfactory. Dithering can help if a transparent image contains artifacts. Dithering
increases the les size. Choose from the following dithering options:
None disables dithering.
Ordered provides good quality dithering with the least possible le
size increase.
Diffusion provides the best quality dithering but increases le size and
processing time more than Ordered dithering. It also only works with the Web
216 color palette selected.
Palette Type Denes the color palette to use for the image. Choose from the
following options:
Web 216 uses the standard 216 color browser-safe color palette to create
the GIF image. This provides good image quality and the fastest processing
on the server.
Adaptive analyzes the colors in the image and creates a unique color table for
the particular GIF. This creates the most accurate color for the image but the
resulting le size is larger than a GIF created with the Web 216 palette. You
can reduce the size of a GIF created with an adaptive palette by decreasing
the number of colors in the palette (see the Max Colors option that follows).
An adaptive palette works best for systems displaying thousands or millions
of colors.
Web Snap Adaptive is the same as the Adaptive palette option except that it
converts close colors to the Web 216 color palette. The resulting color palette
is optimized for the image, but when possible, Flash uses colors from Web
216. This produces better colors for the image when the Web 216 palette is
active on a 256-color system.
Custom lets you specify a palette that you have optimized for the current
image. This provides the same processing speed as the Web 216 palette. To use
this option you must be familiar with creating and using custom palettes. To
choose a custom palette, click the button labeled with the ellipsis (...) to the
right of the Palette box at the bottom of the dialog box and select a palette le.
Flash supports palettes saved in the ACT format. This is the same format
exported by Macromedia Fireworks and other leading graphics applications.
Max Colors Sets the number of colors used in the GIF image. Choosing a smaller
number of colors can produce a smaller le, but may degrade the colors in the
image. You can specify a value for the maximum colors only when you have
selected Adaptive or Web Snap as the Palette Type option.
Chapter 13 236
JPEG publish settings
Use the JPEG format to save an image as highly compressed, 24-bit bitmap.
Generally, GIF is better for exporting line art, while JPEG may be better for
images that include a number of gradients, or embedded bitmaps.
Flash exports the rst frame in the movie as a JPEG, unless you mark a different
keyframe for export by entering the frame label #Static.
Use the controls in the JPEG panel of the Publish Setting dialog box to change the
following settings:
Dimensions Sets the size of the exported bitmap image to the number of pixels
you enter in the Width and Height elds. If you turn on Match Movie, the entries
in the Width and Height elds have no effect and Flash makes the JPEG the same
size as the movie. Flash ensures that the size you specify always has the same aspect
ratio as your original image.
Quality Controls the amount of JPEG le compression used. Lower image quality
produces smaller les, while higher image quality produces larger les. Try
different settings to determine the best trade-off between size and quality.
Progressive Displays Progressive JPEG images. These images are displayed
incrementally by a web browser and may appear faster when loaded over a
slow network connection. This option is similar to interlacing in GIF and
PNG images.
PNG publish settings
PNG is the only cross-platform bitmap format that supports transparency (alpha
channel). It is also the native le format for Macromedia Fireworks.
Flash exports the rst frame in the movie as a PNG, unless you mark a different
keyframe for export by entering the frame label #Static.
Use the controls in the PNG panel of the Publish Settings dialog box to change
the following settings:
Dimensions Sets the size of the exported bitmap image to the number of pixels
you enter in the Width and Height elds. If you turn on Match Movie, the entries
in the Width and Height elds have no effect and Flash makes the PNG the same
size as the movie. Flash ensures that the size you specify always has the same aspect
ratio as your original image.
Bit Depth Species the number of bits per pixel to use in creating the image. The
bit depth determines the number of colors to be used in the image. For a 256-
color image, choose 8-bit; for thousands of colors, choose 24-bit; for thousands of
colors with transparency (32 bits) choose 24-bit with Alpha. The higher the bit
depth, the larger the le.
Publishing and Exporting 237
Options Specify a range of appearance settings for the exported PNG.
Optimize Colors removes any unused colors from the color table of a PNG
le. This can reduce the size of a PNG le by 1000-1500 bytes with no
sacrice in image quality. It does, however, cause a small increase in the
memory requirements and processing required on the server. Note that this
option has no effect with an adaptive palette.
Smooth enables or disables anti-aliasing in the exported bitmap. Smoothing
produces a higher quality bitmapped image. Text display quality is poor
without anti-aliasing. However, a halo of gray pixels may appear around an
image placed on a colored background. Export without smoothing if a halo
appears, or if you are creating a transparent PNG that will be placed over a
multicolored background. Turning this option off makes PNG les smaller.
Interlace makes the exported PNG display in a browser incrementally as it
downloads. An interlaced PNG provides the user with basic graphic content
before the le has completely downloaded and may download faster over a
slow network connection.
Dither Solids applies dithering to solid colors as well as gradients and images.
see the denition of dithering that follows.
Transparent displays a transparent PNG. A transparent PNG allows the
background of your web browser to show through the portions of the PNG
where you have not drawn any images. If you create a transparent PNG, set
the background color by choosing Modify > Movie to match the web page
background. Use the Smooth options to further optimize the color match.
Remove Gradients converts all gradient lls in the movie to solid colors using
the rst color in the gradient. Gradients increase the size of a PNG and often
are of poor quality. When using this option you must choose the rst color of
your gradients carefully to prevent unexpected results. The default is false.
Chapter 13 238
Dither Enables or disables dithering and species the method. Dithering displays
pixels of a range of similar colors to simulate colors not available in the current
palette. With dithering off, Flash replaces colors not in the basic color table with
the solid color from the table that most closely approximates the specied color;
not dithering can produce smaller les, but check the results to see if the colors are
satisfactory. Dithering can help if a transparent image contains artifacts. Dithering
increases the les size. Choose from the following dithering options:
None disables dithering.
Ordered provides good quality dithering with the least possible le
size increase.
Diffusion provides the best quality dithering but increases le size more than
Ordered dithering. It also only works with the Web 216 color palette selected.
Palette Type Denes the color palette to use for the image. Choose from the
following options:
Web 216 uses the standard 216-color browser-safe color palette to create the
PNG image. This provides good image quality and the fewest color problems
in all types of browsers.
Adaptive analyzes the colors in the image and creates a unique color table
for the particular PNG. This creates the most accurate color for the image but
the resulting le size is larger than a PNG created with the Web 216 palette.
You can reduce the size of a PNG created with an adaptive palette by
decreasing the number of colors in the palette (see the Max Colors option that
follows). An adaptive palette works best for systems displaying thousands or
millions of colors.
Web Snap Adaptive is the same as the Adaptive palette option except that it
"snaps" close colors to the Web 216 color palette. The resulting color palette is
optimized for the image, but when possible, Flash uses colors from Web 216.
This produces better colors for the image when the Web 216 palette is active
on a 256-color system.
Custom lets you specify a palette that you have optimized for the current
image. To use this option you must be familiar with creating and using custom
palettes. To choose a custom palette, click ..." to the right of the Palette box at
the bottom of the dialog box and select a palette le. Flash supports palettes
saved in the ACT format. This is the same format exported by Macromedia
Fireworks and other leading graphics applications.
Max Colors Sets the number of colors used in the PNG image. Choosing a smaller
number of colors can produce a smaller le, but may degrade the colors in the
image. You can specify a value for the maximum colors only when you have
selected Adaptive or Web Snap as the Palette Type option.
Publishing and Exporting 239
Filter Options Species the ltering method for the PNG. Prior to compression, a
PNG image is ltered line-by-line to make it more compressible. Compare the
results of the different options to see which works best for a particular image. The
choices are the standard PNG ltering options:
None provides no ltering.
Sub transmits the difference between each byte and the value of the
corresponding byte of the prior pixel.
Up transmits the difference between each byte and the value of the
corresponding byte of the pixel immediately above.
Average uses the average of the two neighboring pixels (left and above) to
predict the value of a pixel.
Paeth computes a simple linear function of the three neighboring pixels (left,
above, upper left), then chooses as predictor the neighboring pixel closest to
the computed value.
QuickTime publish settings
The QuickTime publish option creates movies in the QuickTime 4 format. When
Flash creates a QuickTime le, it copies the Flash movie on a separate track. The
Flash movie plays in the QuickTime movie exactly as it does in the Flash Player,
retaining all of its interactive features. If the Flash movie contains a QuickTime
movie, Flash copies it to a separate track in the new QuickTime le.
Use the controls in the QuickTime panel of the Publish Settings dialog box to
change the following settings:
Dimensions Sets the size of the exported QuickTime movie to the number of
pixels you enter in the Width and Height elds. If you turn on Match Movie, the
entries in the Width and Height elds have no effect and Flash makes the new
movie the same size as the Flash movie.
Alpha Determines the alpha (transparency) mode of the Flash track in the
QuickTime movie. Note that this does not affect any alpha settings within the
Flash movie itself. The choices are as follows:
Alpha Transparent makes the Flash track transparent. Any content in tracks
behind the Flash track are visible.
Copy makes the Flash track opaque. All content in tracks behind the Flash
track is masked.
Auto makes the Flash track transparent if it is on top of any other tracks, but
makes it opaque if it is the bottom track, or the only track in the movie.
Chapter 13 240
Layer Denes where the Flash track will be placed in the QuickTime movie. The
choices are as follows:
Top always places the Flash track on top of other tracks in the
QuickTime movie.
Bottom always places the Flash track behind other tracks.
Auto places the Flash track in front of other tracks if there are Flash object in
front of video objects within the Flash movie. Otherwise, it places the Flash
movie behind all other tracks.
Streaming Sound Makes Flash export all of the streaming audio in the Flash movie
to a QuickTime sound track. It recompresses the audio using the standard
QuickTime audio settings. Click Audio Settings to change these options. See the
QuickTime documentation for a description.
Controller Species the type of QuickTime controller used to play the exported
movie. The choices are None, Standard, or QuickTime VR.
Looping Determines whether or not the QuickTime movie loops continuously.
Pause At Start Species whether or not the QuickTime movie starts automatically
when it is opened.
Play Every Frame Makes QuickTime shows every frame of the movie without
skipping to maintain time. When this option is set in a QuickTime movie, sound
is not played.
Flatten (Make Self-Contained) Combines the Flash content and imported video
content into the new QuickTime movie. When this option is not set, the new
QuickTime movie references the imported les externally; these les must be
present for the movie to work properly.
Creating projectors with Publish
Use Publish to create projectors for both Windows and Macintosh systems. There
are no settings to specify for creating projectors.
Although you can create a Macintosh projector using the Windows versions of
Flash, you must convert the resulting le use a le translator such as BinHex to
make it appear as an application le in the Macintosh Finder. The Windows
version of Flash names a Macintosh projector le with a .hqx extension.
Using Publish Preview
Publish Preview exports the type of le you select from the Publish Preview menu
and opens it in the default browser. If you preview a QuickTime movie, Publish
Preview launches the QuickTime Movie Player. If you preview a projector, Flash
launches the projector.
Publishing and Exporting 241
The Publish Preview menu displays the formats you select in the Publish Settings
dialog box. It also export all formats using the current Publish Settings options.
To preview a file with Publish Preview:
1 Use Publish Settings to dene export options.
2 Choose File > Publish Preview and then select the le format you want to
preview from the submenu.
Using the current Publish Settings values, Flash creates a le of the specied
type in the same location as the Flash movie le. This le remains in this
location until you overwrite or delete it.
Press F12 to export and preview the default format.
Using the stand-alone player
The stand-alone player plays Flash Player movies exactly as they appear in a web
browser or an Active X host application. The stand-alone player is installed along
with Flash so that when you double-click a Flash Player le, the operating system
starts the stand-alone player, which in turn runs the movie.
There are a number of FS Command options for controlling movies in the
stand-alone player. For example, to make the stand-alone player take over the
whole screen, assign the FS Command action to a frame or button and enter
FullScreen as the command and True as the argument. See Sending messages to the
movies host program.
The le names of the stand-alone player are:
Windows: FlashPla.exe
Macintosh: FlashPlayer
While the stand-alone player is running you can do the following:
Open a new le by choosing File > Open.
Change your view of the movie by choosing Zoom > Show All, Zoom In/Out,
or 100%.
Make the movie take over the entire screen by choosing View > Full Screen.
Control movie playback by choosing Control > Play, Rewind, Loop, Pause, or
Fast Forward.
Create a stand-alone projector by choosing File > Create Projector.
Chapter 13 242
Using Export Movie and Export Image
Use Export to prepare Flash content for use in other applications. Unlike Publish,
you can only specify settings for one type of media each time you use Export
Movie or Export Image. Also, Flash does not store Export settings separately with
each le as it does with Publish Settings. (Use Publish to create all the les you
need to put a Flash movie on the web. See Publishing Flash movies.)
Use the Export Movies command to export the complete content of the current
Flash Movie to one of the supported le types. If you use Export Movie to export
a Flash movie to one of the still image formats, Export creates a numbered image
le for every frame in the movie. You can also use Export Movie to export the
sound in a movie to a WAV le (Windows only).
Use Export Image to export the content of the current frame or the currently
selected image to one of the still-image formats, or to a single-frame
Flash Player movie.
When you export a Flash image as a vector-graphic le (Illustrator), you
preserve its vector information. You can edit these les in other vector-based
drawing programs, but you cant import these images into most page-layout
and word-processing programs.
When you save a Flash image as a bitmap GIF, JPEG, PICT (Macintosh), or
BMP (Windows) le, the image loses its vector information and is saved with
pixel information only. You can edit Flash images exported as bitmaps in
image editors such as Photoshop, but you can no longer edit them in vector-
based drawing programs.
To use Export Movie or Export Image:
1 If you are exporting an image, select the frame or image in the current movie
that you want to export.
2 Choose File > Export Movie, or File > Export Image.
3 Enter a name for the output le.
4 Choose the type of le from the Format pop-up menu.
5 Click Save.
If the format you selected requires more information, an Export dialog
box appears.
6 Set the export options for the format you selected and click OK.
See the following sections for descriptions of Export options.
7 Click Save.
Publishing and Exporting 243
The Export options for a Flash movie are identical to the Publish Settings options,
see Flash publish settings on page 229. For a description of other options, see
About export le formats.
About export file formats
This table shows the export le types recognized by each platform.
PNG is the only cross-platform bitmap format that supports transparency (as an
alpha channel). Some nonbitmapped export formats do not support alpha
(transparency) effects or mask layers.
For more information on a specic le format, see the sections that follow.
Adobe Illustrator
The Adobe Illustrator format is ideal for exchanging drawings between Flash and
other drawing applications such as FreeHand. This format supports very accurate
conversion of curve, line style, and ll information. Flash supports import and
export of the Adobe Illustrator 88, 3.0, 5.0, and 6.0 formats. (See Using Adobe
Illustrator les.) Flash does not support the Photoshop EPS format or EPS les
generated using Print.
File type Extension Windows Macintosh
Adobe Illustrator; EPS (Version
6.0 or earlier)
.eps and .ai
Bitmap (BMP) .bmp
Enhanced Metafile .emf
FutureSplash Player .spl
GIF publish settings .gif
JPEG publish settings .jpg
QuickTime publish settings .mov
QuickTime Video (Macintosh) .mov
PICT (Macintosh)
PNG publish settings .png
Windows AVI (Windows) .avi
Windows Metafile .wmf
WAV audio (Windows) .wav
Chapter 13 244
Most Windows drawing programs support only Adobe Illustrator 88 or 3
versions. Versions of the Adobe Illustrator format before 5 do not support
gradient lls, and only version 6 supports bitmaps.
The Export Adobe Illustrator dialog box contains a single option for choosing the
version of the le format the choices are:
Adobe Illustrator 88
Adobe Illustrator 3.0
Adobe Illustrator 5.0
Adobe Illustrator 6.0
Bitmap (BMP)
Use the Bitmap format to export Flash drawings into programs that accept
bitmapped images.
The Bitmap Export options dialog box contains the following options:
Dimensions Sets the size of the exported bitmap image specied in pixels.
Flash ensures that the size you specify always has the same aspect ratio as your
original image.
Resolution Sets the resolution of the exported bitmap image in dots per inch (dpi)
and Flash automatically calculates width and height based on the size of your
drawing. The Match Screen button sets resolution to match your monitor. Use
Resolution as an alternative to Dimensions.
Include Sets the size of the exported bitmap image according to the option you
choose. If you choose Minimum Image Area from the Include pop-up menu, the
dimensions of the bitmap are just large enough to enclose all elements in the
frame; if you choose Full Document Size, the dimensions match those specied in
the Movie Properties dialog box, (accessed by choosing Modify > Movie). Use
Include as an alternative to Dimensions.
Note: When exporting a sequence of bitmaps, the dimensions always match the movie size.
Color Depth Species the bit depth of the image. Many Windows applications do
not yet support the newer 32-bit depth for bitmapped images. If you have
problems using this format, simply use the older 24-bit format.
Smooth Turns Flash anti-aliasing on and off in the exported bitmap. Smoothing
produces a higher quality bitmapped image. However, a halo of gray pixels may
appear around an image placed on a colored background. Export without
smoothing if a halo appears.
Publishing and Exporting 245
Enhanced Metafile
Enhanced Metale Format (EMF) is a graphics format available in Windows 95
and Windows NT that saves both vector and pixel information. Enhanced
Metale supports the curves used in Flash drawings better than the older
Windows Metale format. However, many applications do not yet support this
newer graphics format.
There are no denable exporting options for the Enhanced Metale format.
EPS 3.0 with Preview
You can export the current frame as an EPS 3.0 le for placement in another
application, such as a page-layout document. The EPS le includes a preview that
is used for placement display.
There are no denable exporting options for EPS les.
PICT (Macintosh)
PICT is the standard graphics format on the Macintosh and can contain bitmap
or vector information.
The PICT Export options dialog box contains the following options:
Dimensions Is the size of the exported bitmap image specied in pixels.
Flash ensures that the size you specify always has the same aspect ratio as your
original image.
Resolution Is specied in dots per inch (dpi), and Flash automatically calculates
width and height based on the size of your drawing. The Match Screen button sets
resolution to match your monitor. Normally, bitmap PICT images with 72-dpi
resolution look best on-screen.
Include Options are Minimum Image Area from the Include pop-up menu, which
sets the dimensions of the bitmap just large enough to enclose all elements in the
frame; and Full Document Size, which matches the dimensions to those specied
in the Movie Properties dialog box (accessed by choosing Modify > Movie).
Color Depth Designates the type of PICT le, object-based or bitmap. Object-
based images generally look better when printed, and scaling doesnt affect their
appearance. Bitmap PICT images normally look best displayed on-screen and can
be manipulated in applications such as Adobe Photoshop. You can also choose a
variety of color depths with bitmap PICT les.
Include Postscript Is available only for an object-based PICT le to include
information that optimizes printing on a PostScript printer. This information
makes the le larger and may not be recognized by all applications.
Chapter 13 246
QuickTime
The QuickTime export option creates movies in the QuickTime 4 format.
QuickTime export options are identical to QuickTime publish options. See
QuickTime publish settings.
QuickTime Video (Macintosh)
The QuickTime Video option is available on Macintosh systems only. It exports
using the QuickTime 3 le format, so all Flash content is bitmapped. Using this
option, a Flash movie loses all of its interactivity. This format is useful if you want
to change Flash content in a video editing application.
The QuickTime Video Export options dialog box contains the following options:
Size Species a width and height in pixels for the frames of a QuickTime movie.
By default, you need specify only the width or the height and the other dimension
are automatically set to maintain the aspect ratio of your original movie. If you
deselect Maintain Aspect Ratio, you can set both the width and the height.
Format Selects a color depth.
Smooth Turns Flashs anti-aliasing on and off in the exported QuickTime movie.
This improves the appearance of the bitmapped frame images. However, anti-
aliased images might have a halo when placed over a colored background.
Compressor Selects a standard QuickTime compressor.
Quality Controls the amount of compression applied to your movie. The exact
effect depends upon the compressor selected.
Sound Format Sets the export rate for sounds in the movie. Higher rates yield
better delity and larger les. Lower rates save disk space.
Windows AVI (Windows)
Windows AVI is the standard Windows movie format and is a good format to use
if you want to open a Flash animation in a video-editing application. Since AVI is
a bitmap-based format, movies that contain long or high-resolution animations
can quickly become very large.
The Windows AVI Export options dialog box contains the following options:
Dimensions Species a width and height in pixels for the frames of an AVI movie.
Specify only the width or the height; the other dimension is automatically set to
maintain the aspect ratio of your original movie. Deselect Maintain Aspect Ratio
to set both the width and the height.
Video Format Selects a color depth. Many applications do not yet support the
Windows 32-bit image format. If you have problems using this format, simply use
the older 24-bit format.
Publishing and Exporting 247
Smooth Turns Flash anti-aliasing on in the exported AVI movie. Smoothing
produces higher quality images. However, a halo of gray pixels may appear
around an image placed on a colored background. Export without smoothing
if a halo appears.
Compress Video Displays a dialog box for choosing standard AVI
compression options.
Windows Metafile
Windows Metale format is the standard Windows graphics format and is
supported by most Windows applications. Importing and exporting les in this
format provides good results.
There are no denable exporting options for Windows Metale export.
WAV audio (Windows)
The WAV option for Export Movie exports all the sounds in the current movie to
a single WAV le. You can specify the sound format of the new le.
The Export Windows WAV les contains the following options:
Sound Format Determines the sampling frequency, bit rate, and stereo or mono
setting of the exported sound.
Ignore Event Sounds Excludes events sounds from the exported le.
Creating templates for HTML publishing
During the publish process, Flash inserts the Publish Settings parameters in a
template you select in the HTML panel. A template is a text le that includes
special variables beginning with a dollar sign ($). (Use \$ if you need to use a $ for
another purpose in the document.) Flash substitutes the appropriate value for
each template variable. A template can be any text le containing the appropriate
template variables.
Flash does not change anything in a template except for the template variables in a
template, so a template can include any HTML content for your application, or
even code for special interpreters such as Cold Fusion, ASP, and the like.
Flash saves the modied template using the le name of the Flash movie with the
extension of the template. For example, if you select a template named
Standard.asp for use with a Flash movie named MyMovie.swf, the resulting le
would be named MyMovie.asp.
A template does not have to include all of the template variables. Flash simply
does not insert values for any missing variable and the default values remain.
Chapter 13 248
When no template has been selected in the Publish Settings dialog box, Flash uses
a template named Default.html.If Default.html is not present, Flash uses the rst
template on the list.
Flash stores templates in the Flash application folder in a folder named HTML.
Flash templates have the following characteristics:
A one-line title which appears on the Template pop-up menu.
A longer description which appears when you click the Info button.
Template variables beginning with $ which specify where parameter values
should be substituted when Flash generates the output le.
The following tables lists all the template variables Flash recognizes. For a
denition of all the tags these variables work with, see About Flash HTML
requirements.
Parameter Template Variable
Template title $TT
Template description start $DS
Template description finish $DF
Width $WI
Height $HE
Movie $MO
HTML alignment $HA
Looping $LO
Parameters for OBJECT $PO
Parameters for EMBED $PE
Play $PL
Quality $QU
Scale $SC
Salign $SA
Wmode $WM
Devicefont $DE
Bgcolor $BG
Movie text (spot to write movie text) $MT
Publishing and Exporting 249
Movie URL (location of movie URLs) $MU
Image width (unspecified image type) $IW
Image height (unspecified image type) $IH
Image file name (unspecified image type) $IS
Image map name $IU
Image map tag location $IM
QuickTime width $QW
QuickTime height $QH
QuickTime file name $QN
GIF width $GW
GIF height $GH
GIF file name $GS
JPEG width $JW
JPEG height $JH
JPEG file name $JN
PNG width $PW
PNG height $PH
PNG file name $PN
Generator variables OBJECT tag $GV
Generator variables EMBED tag $GE
Parameter Template Variable
Chapter 13 250
Creating an image map
Flash can generate an image map using any image so that buttons that link to
URLs in the original Flash movie continue to function as links if an image is
substituted. Flash inserts the image map code in a template when it encounters
the $IM template variable. The $IU variable identies the name of the GIF le. For
example, the following code in a template:
$IM
<IMG SRC=$IS usemap=$IU WIDTH=$IW HEIGHT=$IH BORDER=0>
might produce this code in the HTML document created by Publish:
<MAP NAME="mymovie">
<AREA COORDS="130,116,214,182" HREF="http://www.macromedia.com">
</MAP>
<IMG SRC="mymovie.gif" usemap="#mymovie" WIDTH=550 HEIGHT=400 BORDER=0>
Place the frame label #Map in the keyframe in which you want to create the image
map. If you dont create a frame label, Flash creates an image map using the
buttons in the last frame of the movie.
Creating a text report
The $MT template variable causes Flash to insert all the text from the current Flash
movie as a comment in the HTML code. This is useful for indexing the content of
a movie and making it visible to search engines.
Creating a URL report
The $MU template variable makes Flash generate a list of the URLs referred to by
actions in the current movie and insert it at the current location as a comment.
This enables link verication tools to see and verify the links in the movie.
Using shorthand template variables
The $PO (for OBJECT tags) and $PE (for EMBED tags) template variables are useful
shorthand elements. Both variables cause Flash to insert into a template any non-
default values for some of the most common Flash OBJECT and EMBED parameters,
including PLAY ($PL), QUALITY ($QU), SCALE ($SC), SALIGN ($SA), WMODE ($WM),
DEVICEFONT ($DE), and BGCOLOR ($BG). See the default template in the section that
follows for an example of using these variables.
Publishing and Exporting 251
Sample template
Here is an example of a template le that includes many of the commonly used
template variables.
$TTFlash Only (Default)
$DS
Use an OBJECT and EMBED
tag to display Flash.
$DF
<HTML>
<HEAD>
<TITLE>$TI</TITLE>
</HEAD>
<BODY bgcolor="$BG">
<!-- URLs used in the movie-->
$MU
<!-- text used in the movie-->
$MT
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0
,0"
ID=$TI WIDTH=$WI HEIGHT=$HE>
$PO
<EMBED $PE WIDTH=$WI HEIGHT=$HE
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash">
</OBJECT>
</BODY>
</HTML>
About Flash HTML requirements
The Publish command creates an HTML document with all the parameters set as
you specify in the Publish Setting dialog. If you are not familiar with HTML, you
can rely on Publish to specify changes to HTML settings. If you are experienced
with HTML, you can change or enter HTML parameters manually in an HTML
editor, create your own HTML les to control a Flash movie, or create your own
HTML templates for use with Publish.
Chapter 13 252
Using OBJECT and EMBED
To display a Flash Player movie in a web browser an HTML document must use
the EMBED and OBJECT tags with the proper parameters. For the EMBED tag, all
settings (such as HEIGHT, WIDTH, QUALITY, and LOOP) are attributes that appear
between the angle brackets of the opening EMBED tag. For example:
<EMBED SRC="moviename.swf" WIDTH="100" HEIGHT="100" PLAY="true
LOOP="true" QUALITY="high"
PLUGINSPAGE=http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash>
</EMBED>
For OBJECT, four settings (HEIGHT, WIDTH, CLASSID, and CODEBASE) are attributes
that appear within the OBJECT tag; all others are parameters that appear in separate,
named PARAM tags. For example:
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="100"
HEIGHT="100" CODEBASE="http://active.macromedia.com/flash4/cabs/
swflash.cab#version=4,0,0,0">
<PARAM NAME="MOVIE" VALUE="moviename.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">
</OBJECT>
To use both tags together, position the EMBED tag just before the closing OBJECT
tag, like this:
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="100"
HEIGHT="100" CODEBASE="http://active.macromedia.com/flash4/cabs/
swflash.cab#version=4,0,0,0">
<PARAM NAME="MOVIE" VALUE="moviename.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">
<EMBED SRC="moviename.swf" WIDTH="100" HEIGHT="100" PLAY="true
LOOP="true" QUALITY="high"
PLUGINSPAGE=http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash>
</EMBED>
</OBJECT>
Note: If you are using both the OBJECT and the EMBED tags, use identical values for
each attribute or parameter to ensure that playback is consistent across browsers. Also,
swflash.cab#version=4,0,0,0 is optional. Leave it off if you dont want to check for
version number.
Publishing and Exporting 253
The following list of tag attributes and parameters will help you understand the
HTML that Publish creates and help you to write your own HTML to insert
Flash movies. All items apply to both OBJECT and EMBED tags unless otherwise
noted in the description. Optional entries are noted. When creating a template,
you can substitute a template variable listed here for the value. See Creating
templates for HTML publishing.
SRC
Value movieName.swf
Template variable: $MO
Description Species the name of the movie to be loaded. EMBED only.
MOVIE
Value movieName.swf
Template variable: $MO
Description Species the name of the movie to be loaded. OBJECT only.
CLASSID
Value clsid:D27CDB6E-AE6D-11cf-96B8-444553540000
Description Identies the ActiveX control for the browser. The value must be entered exactly
as shown. OBJECT only.
WIDTH
Value n or n%
Template variable: $WI
Description Species the width of the movie in either pixels or percentage of browser window.
HEIGHT
Value n or n%
Template variable: $HE
Description Species the height of the movie in either pixels or percentage of browser window.
Because Flash movies are scaleable, their quality will not degrade at different sizes
as long as the aspect ratio is maintained (for example, all of these sizes have a 4:3
aspect ratio: 640 pixels by 480 pixels, 320 pixels by 240 pixels, and 240 pixels
by 180 pixels).
Chapter 13 254
CODEBASE
Value http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
Description Identies the location of the Flash Player ActiveX control so that the browser can
automatically download it if it is not already installed. The value must be entered
exactly as shown. OBJECT only.
PLUGINSPAGE
Value http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash
Description Identies the location of the Flash Player plugin so that the user can download it if
it is not already installed. The value must be entered exactly as shown. EMBED only.
SWLIVECONNECT
Value true | false
Description (Optional) Species whether the browser should start Java when loading the Flash
Player for the rst time. The default value is false if this attribute is omitted.
Whenever you use JavaScript and Flash on the same page, Java must be running
for FS Commands to work; however, if you are using JavaScript only for browser
detection or some other purpose unrelated to FS Commands, you can prevent
Java from starting by setting SWLIVECONNECT to false. You can also force Java to
start when you are not using JavaScript with Flash by explicitly setting
SWLIVECONNECT to true. Starting Java substantially increases the time it takes to
start a movie; set this tag to true only when necessary. EMBED only.
Use the Exec FS Command to start Java from a stand-alone projector. See Sending
messages to the movies host program.
PLAY
Value true | false
Template variable: $PL
Description (Optional) Species whether the movie begins playing immediately upon loading
in the browser. If your Flash movie is interactive, you may want to let the user
initiate play by clicking a button or performing some other task. In this case, set
the PLAY attribute to false to prevent the movie from starting automatically. The
default value is true if this attribute is omitted.
LOOP
Value true | false
Template variable: $LO
Description (Optional) Species whether the movie repeats indenitely or stops when it
reaches the last frame. The default value is true if this attribute is omitted.
Publishing and Exporting 255
QUALITY
Value low | high | autolow | autohigh | best
Template variable: $QU
Description (Optional) Species the level of anti-aliasing to be used during playback of your
movie. Because anti-aliasing requires a faster processor to smooth each frame of
the movie before it is rendered on the viewers screen, choose a value based on
whether speed or appearance is your top priority:
Low gives priority to playback speed over appearance. With this setting, anti-
aliasing is never used.
High gives priority to appearance over playback speed. With this setting, anti-
aliasing is always used. If the movie does not contain animation, bitmaps are
smoothed; if there is animation, bitmaps are not smoothed. High is the
default setting for Quality.
Best provides the best display quality and does not consider playback speed.
All output is antialiased and all bitmaps are always smoothed.
The default value is high if this attribute is omitted.
BGCOLOR
Value #RRGGBB (hexadecimal RGB value)
Template variable: $BG
Description (Optional) Species the background color of the movie. Use this attribute to
override the background color setting specied in the Flash le. This attribute has
no effect on the background color of your HTML page.
Chapter 13 256
SCALE
Value showall | noborder | exactfit
Template variable: $SC
Description (Optional) Denes how the movie is placed within the browser window when
WIDTH and HEIGHT values are percentages.
Default (Show all) makes the entire movie visible in the specied area while
maintaining the original aspect ratio of the movie. No distortion occurs.
Borders may appear on two sides of the movie.
No Border scales the movie to ll the specied area while maintaining the
original aspect ratio of the movie. No distortion occurs. Portions of the movie
might be cropped.
Exact Fit makes the entire movie visible in the specied area. However, no
attempt is made to preserve the original aspect ratio, and distortion may occur.
The default value is showall if this attribute is omitted (and WIDTH and HEIGHT
values are percentages).
ALIGN
Value L | R | T | B
Template variable: $HA
Species the ALIGN attribute for the OBJECT, EMBED, and IMG tags and determines
how the Flash movie window is positioned within the browser window.
Default centers the movie in the browser window and crops edges if the
browser window is smaller than the movie.
Left aligns the movie along the left edge of the browser window and crops the
top, bottom, and right sides as necessary.
Right aligns the movie along the right edge of the browser window and crops
the top, bottom, and left sides as necessary.
Top aligns the movie along the top edge of the browser window and crops the
bottom, left, and right sides as necessary.
Bottom aligns the movie along the bottom edge of the browser window and
crops the top, left, and right sides as necessary.
Publishing and Exporting 257
SALIGN
Value L | R | T | B | TL | TR | BL | BR
Template variable: $SA
Description (Optional) Species where a scaled Flash movie is positioned within the area
dened by the WIDTH and HEIGHT settings. See SCALE on page 256 for more
information about these conditions.
L aligns the movie along the left edge of the browser window and crops the
top, bottom, and right sides as necessary.
R aligns the movie along the right edge of the browser window and crops the
top, bottom, and left sides as necessary.
T aligns the movie along the top edge of the browser window and crops the
bottom, left, and right sides as necessary.
B aligns the movie along the bottom edge of the browser window and crops
the top, left, and right sides as necessary.
TL aligns the movie to the top left corner of the browser window and crops the
bottom and right sides as necessary.
TR aligns the movie at the top right corner of the browser window and crops
the bottom and left sides as necessary
BL aligns the movie at the bottom left corner of the browser window and crops
the top and right sides as necessary.
BR aligns the movie at the bottom right corner of the browser window and
crops the top and left sides as necessary.
If this attribute is omitted, the movie is centered in the browser window.
Cropping may occur or borders may appear on any side, as necessary.
BASE
Value base directory or URL
Description (Optional) Species the base directory or URL used to resolve all relative path
statements in the Flash Player movie. This attribute is helpful when your Flash
Player movies are kept in a different directory from your other les.
Chapter 13 258
MENU
Value true | false
Template variable: $ME
Description (Optional) Species what type of menu the viewer receives when right-clicking
(Windows) or command-clicking (Macintosh) the movie area in the browser.
True displays the full menu, allowing the user a variety of options to enhance
or control playback.
False to displays a menu that contains only the About Flash option.
The default value is true if this attribute is omitted.
WMODE
Value Window | Opaque | Transparent
Template variable: $WM
Description (Optional) Lets you take advantage of the transparent movie, absolute
positioning, and layering capabilities available in Internet Explorer 4.0. This tag
works only in Windows with the Flash Active X control.
Window plays the movie in its own rectangular window on a web page.
Transparent makes the background of the HTML page show through all the
transparent portions of the movie. Animation performance might be slower
when you use this setting.
The default value is Window if this attribute is omitted. Object only.
Publishing and Exporting 259
Configuring a web server for Flash
When your les are accessed from a web server, the server must properly identify
them as Flash Player les in order to display them. If the MIME type is missing or
not properly delivered by the server, the browser might display error messages or a
blank window with a puzzle piece icon.
To ensure that visitors can see your movies, you (or your servers administrator)
must add the Flash Player MIME types to the servers conguration les and
associate these MIME types with the Flash Player le extensions. The relevant
MIME types and sufxes are:
If you are administering your own server, consult your server software
documentation for instructions on adding or conguring MIME types. If you are
not administering your own server, contact your Internet service provider,
webmaster, or IT department and ask them to add the MIME type information.
If your site is on a Macintosh server, you must also set the following parameters:
Action: Binary; Type: SWFL; and Creator: SWF2.
MIME type Suffix
application/x-shockwave-flash .swf
application/futuresplash .spl
Chapter 13 260
261
A
APPENDIX A
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Keyboard Shortcuts
File menu
Command Windows Macintosh
New Control+N Command+N
Open Control+O Command+O
Open as Library Control+Shift+O Command+Shift+O
Close Control+W Command+W
Save Control+S Command+S
Save As Control+Shift+S Command+Shift+S
Import Control+R Command+R
Export Movie Control+Alt+Shift+S Command+Shift+Option+S
Print Control+P Command+P
Quit Control+Q Command+Q
Appendix A 262
Edit menu
Command Windows Macintosh
Undo Control+Z Command+Z
Redo Control+Y Command+Y
Cut Control+X Command+X
Copy Control+C Command+C
Paste Control+V Command+V
Paste In Place Control+Shift+V Command+Shift+V
Clear Delete Delete
Duplicate Control+D Command+D
Select All Control+A Command+A
Deselect All Control+Shift+A Command+Shift+A
Copy Frames Control+Alt+C Command+Option+C
Paste Frames Control+Alt+V Command+Option+V
Edit Symbols Control+E Command+E
Keyboard Shortcuts 263
View menu
Go To submenu
Command Windows Macintosh
100% Control+1 Command+1
Show Frame Control+2 Command+2
Show All Control+3 Command+3
Outlines Control+Alt+Shift+O Shift Option+Command+0
Fast Control+Alt+Shift+F Shift Option+Command+F
Antialias Control+Alt+Shift+A Shift Option+Command+A
Antialias Text Control+Alt+Shift+T Shift Option+Command+T
Timeline Control+Alt+T Command+Option+T
Work Area Control+Shift+W Command+Shift+W
Rulers Control+Alt+Shift+R Command+Option+Shift+R
Grid Control+Alt+Shift+G Command+Option+Shift+G
Snap Control+Alt+G Control+command+G
Show Shape Hints Control+Alt+H Command+Option+H
Command Windows Macintosh
First Home Home
Previous Page Up Page Up
Next Page Down Page Down
Last End End
Appendix A 264
Insert menu
Modify menu
Command Windows Macintosh
Create Symbol F8 F8
Frame F5 F5
Delete Frame Shift+F5 Shift+F5
Key Frame F6 F6
Blank Key Frame F7 F7
Clear Key Frame Shift+F6 Shift+F6
Command Windows Macintosh
Instance Control+I Command+I
Frame Control+F Command+F
Movie Control+M Command+M
Font Control+T Command+T
Paragraph Control+Shift+T Command+Shift T
Align Control+K Command+K
Group Control+G Command+G
Ungroup Control+Shift+G Command+Shift G
Break Apart Control+B Command+B
Keyboard Shortcuts 265
Style submenu
Kerning submenu
Transform submenu
Command Windows Macintosh
Plain Control+Shift+P Command+Shift+P
Bold Control+Shift+B Command+Shift+B
Italic Control+Shift+I Command+Shift+I
Align Left Control+Shift+L Command+Shift+L
Align Center Control+Shift+C Command+Shift+C
Align Right Control+Shift+R Command+Shift+R
Justify Control+Shift+J Command+Shift+J
Command Windows Macintosh
Narrower Control+Alt+Left Command+Option+Left
Wider Control+Alt+Right Command+Option+Right
Reset Control+Alt+Up Command+Option+Up
Command Windows Macintosh
Scale and Rotate Control+Alt+S Command+Option+S
Remove Transform Control+Shift+Z Command+Shift+Z
Add Shape Hint Control+H Command+H
Appendix A 266
Arrange submenu
Curves submenu
Control menu
Command Windows Macintosh
Bring to Front Control+Shift+Up Command+Shift+Up
Move Ahead Control+Up Command+Up
Move Behind Control+Down Command+Down
Send to Back Control+Shift+Down Command+Shift+Down
Lock Control+Alt+L Command+Option+L
Unlock All Control+Alt+Shift L Command+Option+Shift+L
Command Windows Macintosh
Optimize Control+Alt+Shift+C Command+Option+Shift+C
Command Windows Macintosh
Play Enter Enter
Rewind Control+Alt+R Command+Option+R
Step Forward > >
Step Backward < <
Test Movie Control+Enter Command+Enter
Test Scene Control+Alt+Enter Command+Option+Enter
Enable Frame Actions Control+Alt+A Command+Option+A
Enable Buttons Control+Alt+B Command+Option+B
Mute Sounds Control+Alt+M Command+Option+M
Keyboard Shortcuts 267
Window menu
Controlling layers and keyframes
Drawing shortcuts
Command Windows Macintosh
New Window Control+Alt+N Command+Option+N
Inspector Control+Alt+I Command+Option+I
Library Control+L Command+L
To Windows Macintosh
Move a keyframe Control-drag Command-drag
Extend frames from
a keyframe
Control-drag the right
border of the keyframe
Command-drag the right
border of the keyframe
Link or a unlink a layer
to a mask or motion
guides layer
Alt-click a layer icon Control-click a layer icon
To Windows Macintosh
Set fill and line attributes
for all tools with the
dropper tool
Shift-click with the
dropper tool
Shift-click with the
dropper tool
Create a new
corner handle
Control-drag a line Control-drag a line
Move a selected element
by one pixel
Arrow keys Arrow keys
Move a selected element
by 8 pixels
Shift+Arrow keys Shift+Arrow keys
Change between zoom in
and zoom out while the
magnifier tool is active
Alt Option
Drag a copy of the
selected element
Control-drag Option-drag
Drag the stage with
hand tool
Press Spacebar and drag Press Spacebar and drag
Appendix A 268
Spring-loaded tools
Hold down the corresponding key listed below to temporarily activate certain
tools. When you release the key, the tool you were using before reactivates.
Switching tools
Press the keys listed below to switch to a different tool.
To temporarily activate
this tool
Windows Macintosh
Arrow Control Command
Lasso Tab Tab
Hand Spacebar Spacebar
Magnifier zoom in Control+Spacebar Command+Spacebar
Magnifier zoom out Control+Shift+Spacebar Command+Shift+Spacebar
To switch to this tool Press
Arrow a
Text t
Rectangle r
Oval o
Pencil p
Ink bottle i
Brush b
Paint bucket u
Eraser e
Dropper d
Magnifier m
Lasso l
269
INDEX
A
actions
assigning to buttons 173
button parameters 175
Call, using 193
Comment, using 190
Drag Movie Clip, using 188
Duplicate Movie Clip, using 187
editing 177
frame actions 176
FS Command, using 183
Get URL, using 179
Go To, using 178
If Frame is Loaded, using 179
If, using 192
Load Movie, using 181
Load Variables, using 183
Loop, using 192
Movie Clip, using 188
On Mouse Event, using 173
Play, using 177
Remove Movie Clip, using 187
Set Property, using 189
Set Variable, using 191
Stop All Sounds, using 178
Stop Drag, using 189
Stop, using 177
Tell Target, using 185
Toggle High Quality, using 177
Trace, using 203
Unload Movie, using 181
ActiveX controls 223
Adobe Illustrator
exporting 243
importing 127
Adobe Type Manager 115
ADPCM sound compression 220
AIFF sounds, importing 213
ALIGN parameter 256
setting in Publish 232
aligning, objects 111
AllowScale FSCommand 185
alpha settings
bitmaps 125
gradients 93
solid colors 91
symbol instances 150
animation 168
adding text to 116
changing length of 168
color changes 159
frame-by-frame 166
motion paths for 161
moving 171
placing frames in 168
reversing 168
still images 157
tweened 158
tweening motion 159
tweening shape 163
using layers in 157
Antialias command 73
Antialias Text command 73
arrays, emulating in actions 194
arrow tool 102
Audio Event Rate and Compression option 229
Audio Stream Rate and Compression option 229
authoring environment 51
AutoCAD DXF
exporting 128
importing 127
AVI
exporting 246
sound in 221
B
Bandwidth Proler 226
BGCOLOR parameter 255
Bitmap Properties dialog box 131
Index 270
bitmaps
alpha settings 125
breaking apart 129
copying frames and 105
importing 125
painting with 129
using as ll 129
working with 125
Bitmaps on Clipboard preference (Windows only) 74
Blank Keyframe command 168
BMP
exporting 244
importing 127
breaking apart
bitmaps 129
Break Apart command 113
groups 113
symbols 153
text 113
Bring to Front command 106
brush tool 80
button symbol 142
buttons
action parameters 175
adding sounds to 218
assigning actions to 173
creating 145
enable and disable 148
C
Call action, using 193
center point of objects 112
changing instance properties, buttons 173
CLASSID parameter 253
Click Accuracy 95
Clipboard, copying to 105
CODEBASE parameter 254
color palettes
changing 91
importing and exporting 90
colors
alpha settings for 93
animating color changes 159
changing 91
creating new gradient color 93
creating new solid color 91
deleting 93
colors (continued)
editing 91
effects for symbol instances 150
matching 93
text 122
transparency 93
Comment action, using 190
Connect Lines 95
connecting lines and shapes 104
Controller command 57
coordinates as properties 200
copying
frames 168
shapes 106
curves
creating special effects 99
optimizing 97
straightening 96
cutting 104
D
deleting
colors 93
frames 168
gradient colors 93
lines 82
scenes 64
shapes 106
depth, for duplicate movie clips 188
Deselect All command 102
DEVICE FONT parameter 231
device fonts 115
dialog boxes in forms 207
dimensions, setting in Publish 230
Disable Timeline Docking preference 75
display, speeding 73
Dither Solid Colors
GIF 234
PNG 237
down state, for buttons 146
download performance 226
Drag Movie Clip action, using 188
drawing preferences
Assistant command 94
setting 94
Duplicate Movie Clip action, using 187
duplicating symbols 144
Index 271
E
easing tweened frames 159
Edit Center command 112
Edit Multiple Frames button 170
editable text 117
editing
reshaping lines and shape outlines 95
soften edges of an object 99
symbols 148
text 119
editor for expressions 196
Else statement 192
EMBED parameters. See individual parameters
empty symbols, creating 143
Enable Buttons command 147
Enhanced Metale
exporting 245
importing 127
EPS
exporting 245
importing 127
eq operator 199
eraser tool 82
mode modier 82
shape modier 82
event sound 215
Exec FSCommand 185
Expand Shape command 99
export le formats
about 243
Adobe Illustrator 243
AVI 246
BMP 244
Enhanced Metale 245
EPS 245
GIF 233
JPEG 236
PICT 245
PNG 236
QuickTime 246
SWF 228
Windows Metaile 247
exporting
color palettes 90
Flash Player movies 228
images 242
sound in movies 221
exporting (continued)
sound in video 221
SWF 228
WAV les 247
with Publish 228
expression editor, use 196
eye dropper tool 89
eye icon 135
F
fade in or out 159
Fast command 73
ll
adjusting gradient or bitmap 86
applying value of none 84
locking 88
using bitmaps as 129
using locked gradient or bitmap 88
Flash Player movies
about 51
conguring web server for 259
creating 223
exporting 228
ipping shapes 109
focusrect as property 202
fonts 115
forms
advanced interactivity 205
verifying data 208
FPS (frames per second) 157
frame actions
assigning to keyframes 176
creating 176
frame comments 63
frame labels 63
frame rate, setting 157
Frame View pop-up menu 62
frame-by-frame animation 166
Frame-by-Frame graph 227
frames
about 59
adding sounds 214
converting keyframes into 168
copying 168
deleting 168
displaying 62
easing tweened frames 159
Index 272
frames (continued)
editing 157
exporting as static images 242
placing in animation sequence 168
registering images in 169
FreeHand
exporting 245
importing 127
FS Command action
using 183
Full Screen command 241
FullScreen FSCommand 185
functions
Get Timer 199
Int 198
Length 198
Random 198
substring 198
FutureSplash Player, importing 127
G
Generate Size Report option 229
geometric shapes, drawing 78
Get Property in actions 194
Get Timer function 199
Get URL action
for sending email 206
in forms 206
using 179
GIF
dither settings 235
importing 127
publish and export settings 233
Go To action, using 178
gradient colors
alpha settings 93
copying frames and 105
creating and editing 93
deleting 93
linear 93
radial 93
transparency 93
Gradients on Clipboard preference 74
Gradients preference (Macintosh only) 74
graphic symbol 142
play mode for instances of 153
grids 71
Grid command 71
grid layers 136
groups
breaking apart 113
creating 112
editing 112
stacking order of 106
ungrouping 113
guide layers 136
H
HEIGHT parameter 253
setting in Publish 230
hidden layers 135
hiding, rulers 71
highquality, as property 202
Hit state, buttons 146
HTML
publish settings 230
tag reference 251
templates 247
I
If action, using 192
If Else statement 192
If Frame is Loaded action, using 179
Illustrator
exporting 245
importing 127
image map, creating 250
images, exporting 242
importing
Adobe Illustrator 127
AIFF 213
AutoCAD DXF 127
BMP 127
color palettes 90
Enhance Metale 127
Freehand 127
FutureSplash Player 127
GIF 127
JPEG 127
libraries 154
PICT 127
PNG 127
Index 273
importing (continued)
QuickTime 127
sounds 213
SWF 127
symbols 154
WAV 213
Windows Metale 127
in point, setting for sounds 221
ink bottle tool 88
Insert Frame command 168
Inspector window, using 69
Instance Properties dialog box 150
instances
changing properties 150
color effects 150
creating 144
Int function 198
interactivity, about 173
interlace
GIF 234
PNG 237
J
Java, starting in Netscape 254
joining lines and shapes 104
JPEG
importing 127
publishing and exporting 236
K
kerning, manual 121
keyframes
assigning frame actions 176
associating with sounds 217
converting into frames 168
creating 155
extending images 157
frame-by-frame animation 166
motion 159
shape 163
tweening 158
L
labels, frame 63
Large frame view 62
lasso tool 103
layers
changing the order of 136
copying 134
creating 133
deleting 134
displaying as outlines 157
grid layers 136
guide layers 136
hidden layers 135
locked layer 134
locking 157
manipulating to edit frame contents 157
mask 137
renaming 136
selecting 134
selecting everything on 102
selecting multiple 134
showing 135
sound 214
using in animation 157
Length function 198
length of animation 168
libraries
bitmaps 125
from other movies 154
included in Flash 68
sounds 213
Library window 65
linear gradients 93
lines
drawing 78
Lines to Fills command 99
removing with Eraser tool 82
straightening 96
styles 84
widths 84
links. See instances
Load Default Colors 89
Load Movie action, using 181
Load Order option 229
Load Variables action
in forms 206
using 183
Lock command 102
lock ll modier 88
locking layers 134
Loop action, using 192
Index 274
LOOP parameter 254
setting in Publish 231
Loop Playback command 57
looping sounds 221
M
magnet modier 98
magnication level, changing 70
magnier tool 70
mailto, using Get URL action 206
manual kerning 121
markers, frame 63
mask layers 137
link and unlink layers 139
matching colors 93
maxscroll value 201
Medium frame view 62
MENU parameter, setting in Publish 231
MIME type for Flash Player 259
Modify Onion Markers context menu 170
morphing 163
motion paths 161
motion tweening 159
movie
controlling playback 57
creating 53
properties 56
Movie Clip action, using 188
movie clip symbol 142
creating 143
MOVIE parameter 253
moving shapes 104
MP3 sound compression 220
Mute Sounds command 57
N
New command 53
Normal frame view 62
O
OBJECT and EMBED parameters.
See individual parameters
objects
aligning 111
copying 106
cutting 106
deleting 106
erasing 82
ipping 109
moving 104
pasting 104
restoring transformed 110
rotating 108
scaling 107
selecting 101
skewing 110
OLE objects 113
On Mouse Event action, using 173
100% command 71
onion skinning 169
Open as Library command 154
optimize colors
GIF 234
PNG 237
optimizing curves 97
optimizing movies 225
out point, setting for sounds 221
outline icon 136
Outlines command 73
ovals and rectangles, drawing 80
over state, buttons 146
Override Sound Settings option 229
P
padlock icon 135
Paeth, PNG lter option 239
paint bucket tool 85
paragraph settings 121
passwords 208
Paste in Place command 104
Paste Special command 104
Windows version 105
pasting shapes 104
path, tweening along 161
pencil tool 78
Index 275
PICT
exporting 245
importing 127
PICT Settings for Clipboard preference
(Macintosh only) 74
Play action, using 177
Play All Scenes command 57
PLAY parameter 254
setting in Publish 231
playback rate 157
player 241
playing, QuickTime 128
PLUGINSPAGE parameter 254
PNG
exporting 236
importing 127
publish settings 236
pop-up menu, creating 209
Postscript font preferences 115
preferences 74
Bitmaps on Clipboard (Windows only) 74
Disable Timeline Docking 75
Gradients (Macintosh only) 74
Gradients on Clipboard 74
PICT, settings for Clipboard (Macintosh only) 74
Printing Options (Windows only) 74
Shift Select 75
Show Tooltips 75
Size Limit (Windows only) 74
Undo Levels 74
preferences, drawing 94
preview
Preview frame view 62
Preview in Context frame view 62
Print Preview command 72
Publish Preview command 240
printing 72
Printing Options preference (Windows only) 74
projectors
creating 240
playing with stand-alone player 241
properties
coordinates 200
focusrect 202
highquality 202
in actions 190
rotation, setting 200
properties (continued)
soundbuftime 202
text eld scrolling 201
using Get Property 194
visible, setting 201
xscale 200
yscale 200
Publish command 228
Publish Preview command 240
Publish Settings 228
Flash 229
GIF 233
HTML 230
JPEG 236
PNG 236
projectors 240
QuickTime 239
Q
QUALITY parameter 255
setting in Publish 231
QuickTime
exporting 246
importing 127
manipulating 128
playing 128
publish settings 239
setting path 128
sound in 221
R
radial gradients 93
Random function 198
Recognize Lines 95
Recognize Shapes 95
registering images from frame to frame 169
registration point, moving 112
Remove Gradients 234
Remove Movie Clip action, using 187
renaming layers 136
rendering settings 73
reshaping
lines and shapes 95
type 123
restoring transformed objects 110
reversing animation 168
Index 276
rotating
Rotate command 108
rotate modier 102
rotation property 200
shapes 108
rulers 71
S
SALIGN parameter, setting in Publish 233
scale modier 102
SCALE parameter
Default 232
Exact Fit 232
No Border 232
setting in Publish 232
scaling shapes 107
scenes
changing name of 64
changing order of 64
creating 64
deleting 64
pasting into 104
selecting everything on every layer of 102
using 63
viewing 64
Score. See Timeline
scroll value 201
secure information, sending variables 208
segmenting 104
Select Unused Media command 65
selecting
deselecting 102
shapes 101
with a selection marquee 102
with the arrow tool 102
with the lasso tool 103
Send to Back command 106
Set Property action, using 189
Set Variable action, using 191
shape hints 165
shape tweening 163
shape hints 165
tips 165
shapes 82
copying 106
cutting 106
deleting 106
drawing 78
erasing 82
lling and stroking 83
ipping 109
grouping 112
moving 104
pasting 104
rotating 108
scaling 107
selecting 101
size 107
skewing 110
snapping 98
Shift Select preference 75
Shockwave Flash. See Flash Player
Short frame view 62
Show All command 71
Show Frame command 71
Show Streaming command 227
Show Tooltips preference 75
ShowMenu FSCommand 185
Size Limit preference (Windows only) 74
size report 229
skewing shapes 110
slanting shapes 110
Small frame view 62
Smooth
GIF publish setting 234
PNG publish setting 237
smooth modier 102
smoothing curves, lines 96
snap modier 102
snapping 98
Soften Edges command 99
solid colors, creating 91
soundbuftime as property 202
sounds
about 213
adding to buttons 218
adding to frames 214
ADPCM sound compression 220
associating with keyframes 217
event 215
Index 277
sounds (continued)
exporting movies with sound 219
exporting to video 221
importing 213
looping 221
MP3 sound compression 220
Override Sound Settings option 229
reusing 221
stream 215
SRC parameter 253
stacking order of groups 106
Stage 53
about 53
dening the size of 53
viewing 70
stand-alone player 241
static images, exporting frames as 242
still images 157
exporting 242
Stop action, using 177
Stop All Sounds action, using 178
Stop Drag action, using 189
straighten modier 102
straightening curves, lines 96
stream sound 215
stream synchronization 221
Streaming Graph 227
Substring, function 198
SWF
exporting 228
importing 127
SWLIVECONNECT parameter 254
symbols
breaking apart 153
color effects for instances 150
creating 142
creating instances 144
dissolving 113
duplicating 144
edit in place 148
editing 148
from other movies 154
instances properties 150
tweening colors 159
using symbols from other movies 154
synchronizing graphic instances 160
T
Targets, specifying in expressions 186
Tell Target action, using 185
templates
creating 247
sample 251
selecting 230
shorthand variables 250
variables 248
Test movie command 58
Test Scene command 58
testing
download performance 226
movies 58
testing frame actions 176
text
adding 116
aligning
breaking apart 113
colors 122
editing 119
justication
kerning 121
paragraph settings 121
reshaping 113
typesetting 116
text eld
creating 117
saving font outlines 119
scrolling properties 201
setting properties of 118
text report, in HTML le 250
text tool 116
Timeline
about 59
disable docking preference 75
displaying frames 62
frames 59
Timelines, understanding multiple 185
timers 199
Tiny frame view 62
Toggle High Quality action, using 177
Toolbox, using 58
Index 278
tools
arrow 102
brush 80
eraser 82
eyedropper 89
ink bottle 88
lasso 103
magnier 70
paint bucket 85
pencil 78
text 116
Trace action, using 203
Track as Menu Item, for pop-up menus 209
Transform Fill modier 86
Transform Inspector
rotating with 108
skewing with 110
transitions 159
transparency. See alpha settings
TrueType fonts 115
tweening 158
along a path 161
easing 159
motion paths for 162
shape 163
symbol colors 159
type. See text
typesetting text 116
U
Undo Levels preference 74
Ungroup command 113
Unload Movie action, using 181
Up state, buttons 146
URL report, in HTML le 250
V
values in actions 194
variables
identifying in movie clips 191
in actions 191
in forms 206
sending secure data 208
template 248
verifying 208
verifying entered data 208
View menu commands 71
visible, as property 201
W
WAV sounds, importing 213
WAV, exporting 247
web servers, conguring for Flash Player 259
WIDTH parameter 253
setting in Publish 230
Windows Metale
exporting 247
importing 127
WMMODE parameter, setting in Publish 232
WMODE parameter 258
work area 53
Work Area command 71
X
x property 200
xscale, as property 200
Y
y property 200
yscale as property 200
Z
zooming 70