Introduction to Macromedia Flash (SWF)
The Macromedia Flash file format (SWF) (pronounced “swiff ”) delivers vector graphics and
animation over the Internet to the Macromedia Flash Player. The SWF file format is designed to
be a very efficient delivery format, not a format for exchanging graphics between graphics editors.
It is designed to meet the following goals:
On-screen display —The format is primarily intended for on-screen display and supports antialiasing,
fast rendering to a bitmap of any color format, animation, and interactive buttons.
Extensibility — The format is a tagged format, so it can be evolved with new features while
maintaining backward compatibility with older Flash Players.
Network delivery — The format can travel over a network with limited and unpredictable
bandwidth. The files are compressed to be small and support incremental rendering through
streaming. SWF is a binary format and is not human readable like HTML. SWF uses techniques
such as bit-packing and structures with optional fields to minimize file size.
Simplicity —The format is simple so that the Flash Player is small and easily ported. Also, the
Flash Player only depends upon a limited set of operating system features.
File independence —The files display without any dependence on external resources such as
Scalability —The files work well on limited hardware, and can take advantage of better hardware
when it is available. This is important because computers have different monitor resolutions and
Speed —The files render at a high quality very quickly.
Scriptability — The format includes tags that provide sequences of byte codes to be interpreted by
a stack machine. The byte codes support the ActionScript language. The Flash Player provides a
runtime ActionScript object model that allows interaction with drawing primitives, servers, and
features of the Flash Player.
SWF files have the extension .swf and a MIME type of application/x-shockwave-flash.
The SWF format has gone through several versions, from 1 to 6 at the time of this writing. Up
through SWF 5, substantial additions were made to the SWF tag set. From SWF 6 onward, there
is less change in the SWF format, as more and more new Flash features are implemented partly or
entirely at the ActionScript level. For this reason, anyone planning to generate SWF content that
uses newer features should become familiar with the ActionScript object model that the Flash
Player exposes. The best reference for this information is O’Reilly’s ActionScript: the Definitive
Guide, by Colin Moock.