Every tag starts with a record header whose top 10 bits are the tag code. This is every code from 0 to 93. The SWF column is the version that introduced the tag, as the specification gives it; all of them can appear in this format. Each name links to the tag’s fields.
All tag codes
Tags marked † are not in the SWF 19 specification. They occur in real files, written by early Flash, Macromedia Generator, Flex compilers and the authoring tools; their names are the ones JPEXS and other tools use, and no source gives a version for them. Codes with no name are not defined by the specification. In the Kind column, a definition tag creates a character with an ID; a control tag acts on the timeline or the whole movie.
| Code | Name | SWF | Kind | What it is |
|---|---|---|---|---|
| 0 | End | 1 | Control | End of the file or of a sprite’s tags |
| 1 | ShowFrame | 1 | Control | Shows the frame and starts the next |
| 2 | DefineShape | 1 | Definition | A shape, up to 255 styles of each kind, RGB colours |
| 3 | FreeCharacter † | – | Frees a character (early Flash) | |
| 4 | PlaceObject | 1 | Control | Places a character at a depth |
| 5 | RemoveObject | 1 | Control | Removes a character from a depth |
| 6 | DefineBits | 1 | Definition | JPEG data whose tables are in JPEGTables |
| 7 | DefineButton | 1 | Definition | A button with actions on release |
| 8 | JPEGTables | 1 | Shared data | The JPEG tables for DefineBits |
| 9 | SetBackgroundColor | 1 | Control | The stage colour |
| 10 | DefineFont | 1 | Definition | Glyph outlines |
| 11 | DefineText | 1 | Definition | Static text, RGB |
| 12 | DoAction | 3 | Control | Frame actions |
| 13 | DefineFontInfo | 1 | Adds to a character | Name, style and codes for DefineFont |
| 14 | DefineSound | 1 | Definition | An event sound |
| 15 | StartSound | 1 | Control | Starts or stops a sound |
| 16 | StopSound † | – | Stops all sounds (early Flash) | |
| 17 | DefineButtonSound | 2 | Adds to a character | Sounds for button state changes |
| 18 | SoundStreamHead | 1 | Control | Format of the streaming sound |
| 19 | SoundStreamBlock | 1 | Control | A frame of streaming sound |
| 20 | DefineBitsLossless | 2 | Definition | zlib bitmap, 8, 15 or 24-bit |
| 21 | DefineBitsJPEG2 | 2 | Definition | JPEG with its tables (PNG or GIF from SWF 8) |
| 22 | DefineShape2 | 2 | Definition | Extended style counts, new styles in records |
| 23 | DefineButtonCxform | 2 | Adds to a character | Colour transform for DefineButton |
| 24 | Protect | 2 | Control | Do not import (optional MD5 password) |
| 25 | PathsArePostScript † | – | Marks shapes whose paths follow PostScript fill rules | |
| 26 | PlaceObject2 | 3 | Control | Place or modify, with flags |
| 27 | Not defined | |||
| 28 | RemoveObject2 | 3 | Control | Remove by depth |
| 29 | SyncFrame † | – | Early Flash | |
| 30 | Not defined | |||
| 31 | FreeAll † | – | Frees every character (early Flash) | |
| 32 | DefineShape3 | 3 | Definition | RGBA colours |
| 33 | DefineText2 | 3 | Definition | Static text, RGBA |
| 34 | DefineButton2 | 3 | Definition | Button with condition actions |
| 35 | DefineBitsJPEG3 | 3 | Definition | JPEG (PNG or GIF from SWF 8) with zlib alpha |
| 36 | DefineBitsLossless2 | 3 | Definition | zlib bitmap with alpha |
| 37 | DefineEditText | 4 | Definition | Text field |
| 38 | DefineVideo † | – | Definition | An early video definition, never documented |
| 39 | DefineSprite | 3 | Definition | Movie clip with its own timeline |
| 40 | NameCharacter † | – | A character’s name (early Flash) | |
| 41 | ProductInfo † | – | Control | The compiler that wrote the file (Flex) |
| 42 | DefineTextFormat † | – | Early Flash | |
| 43 | FrameLabel | 3 | Control | Frame label (named anchor from SWF 6) |
| 44 | Not defined | |||
| 45 | SoundStreamHead2 | 3 | Control | Streaming sound format, any format |
| 46 | DefineMorphShape | 3 | Definition | Morph between two shapes |
| 47 | Not defined | |||
| 48 | DefineFont2 | 3 | Definition | Font with codes, name and layout |
| 49 | Not defined | |||
| 50 | Not defined | |||
| 51 | Not defined | |||
| 52 | Not defined | |||
| 53 | Not defined | |||
| 54 | Not defined | |||
| 55 | Not defined | |||
| 56 | ExportAssets | 5 | Control | Names characters for other files and ActionScript |
| 57 | ImportAssets | 5 | Control | Imports from another SWF (replaced by ImportAssets2 in SWF 8) |
| 58 | EnableDebugger | 5 | Control | Debugger password (SWF 5) |
| 59 | DoInitAction | 6 | Control | Actions run once before a sprite is first used |
| 60 | DefineVideoStream | 6 | Definition | Video character |
| 61 | VideoFrame | 6 | Control | A video frame |
| 62 | DefineFontInfo2 | 6 | Adds to a character | FontInfo with a language code |
| 63 | DebugID † | – | Control | A UUID matching the movie to its .swd debug file |
| 64 | EnableDebugger2 | 6 | Control | Debugger password (SWF 6 and later) |
| 65 | ScriptLimits | 7 | Control | Recursion depth and time-out |
| 66 | SetTabIndex | 7 | Control | Tab order |
| 67 | Not defined | |||
| 68 | Not defined | |||
| 69 | FileAttributes | 8 | Control | Flags for the whole file; the first tag from SWF 8 |
| 70 | PlaceObject3 | 8 | Control | Class name, filters, blend mode, cache, visibility |
| 71 | ImportAssets2 | 8 | Control | ImportAssets for SWF 8 and later |
| 72 | DoABCDefine † | – | Control | ABC with no flags or name |
| 73 | DefineFontAlignZones | 8 | Adds to a character | Alignment zones for FlashType |
| 74 | CSMTextSettings | 8 | Adds to a character | Anti-aliasing settings |
| 75 | DefineFont3 | 8 | Definition | DefineFont2 at 20 times the resolution |
| 76 | SymbolClass | 9 | Control | Links characters to ActionScript 3 classes |
| 77 | Metadata | 1 | Control | XMP (RDF/XML) |
| 78 | DefineScalingGrid | 8 | Adds to a character | 9-slice grid |
| 79 | Not defined | |||
| 80 | Not defined | |||
| 81 | Not defined | |||
| 82 | DoABC | 9 | Control | ActionScript 3 code: flags, name, ABC |
| 83 | DefineShape4 | 8 | Definition | Edge bounds, LINESTYLE2, focal gradients |
| 84 | DefineMorphShape2 | 8 | Definition | Morph with LINESTYLE2 |
| 85 | Not defined | |||
| 86 | DefineSceneAndFrameLabelData | 9 | Control | Scenes and frame labels |
| 87 | DefineBinaryData | 9 | Definition | Binary data for an ActionScript 3 class |
| 88 | DefineFontName | 9 | Adds to a character | Font name and copyright |
| 89 | StartSound2 | 9 | Control | Starts a sound by class name |
| 90 | DefineBitsJPEG4 | 10 | Definition | JPEG3 with a deblocking parameter |
| 91 | DefineFont4 | 10 | Definition | CFF font for the Text Layout Framework |
| 92 | Not defined | |||
| 93 | EnableTelemetry | 19 | Control | Allows Adobe Scout telemetry |
Other codes
Any other code, including those above 93, is not defined by the specification. JPEXS gives names to a few of the gaps, such as tags of Macromedia Generator and of the authoring tools; those names are not confirmed here. The explorer shows such a tag as “Unknown tag” with its code, and its body as bytes. Its length still lets a reader step over it.
Metadata (77) is listed by the specification as SWF 1, but it arrived with Flash 8, together with FileAttributes’ HasMetadata flag; that is an inference.
The undocumented tags
- ProductInfo (41) – written by the Flex compiler: the product, edition, version, build and compile date
- DebugID (63) – a 16-byte UUID that matches the movie to the
.swddebugging file the Flash authoring tool writes beside it - DoABCDefine (72) – an ABC file with no flags or name; no file examined for this site has one
FreeCharacter (3), StopSound (16), PathsArePostScript (25), SyncFrame (29), FreeAll (31), DefineVideo (38), NameCharacter (40) and DefineTextFormat (42) come from early Flash. Their layouts are not documented, and the explorer shows their bodies as bytes.