Chapter 8. SWF: The Flash File Format
The SWF file format is a highly optimized specification for creating scriptable multimedia files to be distributed over a network and viewed on a screen. An SWF file, typically called a movie, allows for the representation of an animation by defining objects (such as vector-based shapes, bitmaps, or buttons) that are placed into frames and encoding a kind of script that sets the order and rate at which the frames are displayed. Nearly every aspect of a movie is scriptable using ActionScript, an integrated scripting environment very similar to ECMAscript (JavaScript). A movie can be a traditional, sequential animated narrative, or it can be used to implement a complete user interface or application. We don’t cover ActionScript in this book; if you want to learn more, see Colin Moock’s ActionScript: The Definitive Guide (O’Reilly).
The Ming module described in Chapter 9 provides an object-oriented API for creating SWF files. Each of the objects described in the next chapter corresponds to an element of an SWF file described in the section The Format and Function of SWF Files. The sections Anatomy of a Tag and Parsing an SWF File with Perl go into the low-level details of the SWF file format. These sections are useful if you really want to know what’s going on under the hood, but most readers can safely read the first section and move on to Chapter 9.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access