These tags say something about the whole movie: where it ends, its colour, whether it may be imported, and which characters it shares with other movies. Each table gives the body, after the record header. A character ID is a UI16. Strings are in the player’s code page, ending with a zero byte.
End (0)
No body: the record header 00 00. It ends the movie’s tag run, and the
tag run inside each DefineSprite.
Bytes after the movie’s End tag are ignored by players.
SetBackgroundColor (9)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 3 | RGB | BackgroundColor | The colour of the stage |
Only the main timeline’s counts. 43 02 FF FF FF sets white.
Protect (24, SWF 2)
Asks authoring tools not to import the movie. The body is empty, or, when a password is set (Flash 5):
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | UI16 | Reserved | 0 |
| 2 | varies | STRING | Password | An MD5 crypt hash of the password |
It does not stop decompilers, which ignore it.
ExportAssets (56, SWF 5)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | UI16 | Count | The number of entries |
| 2 | 2 each | UI16 | Tag | A character ID |
| … | varies | STRING | Name | The name it is exported under |
Gives characters names that other movies can import and ActionScript can use, as in
attachMovie("name", …). The name is the symbol’s “linkage identifier” in
the authoring tool.
ImportAssets (57, SWF 5)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | varies | STRING | URL | The movie to import from |
| … | 2 | UI16 | Count | The number of entries |
| … | 2 each | UI16 | Tag | The ID this movie gives the imported character |
| … | varies | STRING | Name | Its export name in the other movie |
EnableDebugger (58, SWF 5)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | varies | STRING | Password | An MD5 crypt hash of the debugging password |
Lets the Flash 5 debugger connect to the movie.
Metadata (77)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | to the end | STRING | Metadata | XMP: RDF/XML in UTF-8 |
The specification lists it as SWF 1, but it arrived with Flash 8, together with the FileAttributes tag that announces it; that is an inference. A movie of this format is not expected to have one.
ProductInfo (41, not in the specification)
Written by the Flex compiler, which makes only later movies. The layout is from JPEXS and the Flex SDK’s sources as remembered; it is not in the specification.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | UI32 | ProductId | 0 unknown, 1 Macromedia Flex for J2EE, 2 Macromedia Flex for .NET, 3 Adobe Flex |
| 4 | 4 | UI32 | Edition | 0 Developer, 1 Full commercial, 2 Non-commercial, 3 Educational, 4 Not for resale, 5 Trial, 6 None |
| 8 | 1 | UI8 | MajorVersion | The compiler’s major version |
| 9 | 1 | UI8 | MinorVersion | The compiler’s minor version |
| 10 | 4 | UI32 | BuildLow | The build number, low half |
| 14 | 4 | UI32 | BuildHigh | The build number, high half |
| 18 | 8 | UI64 | CompilationDate | Milliseconds since 1 January 1970, UTC |
Tags from later versions
These control tags came with SWF 6 and later and have no place in a SWF 1 to 5 movie. Where one turns up, the explorer reads it with the fields below.
| Tag | SWF | Fields |
|---|---|---|
| EnableDebugger2 (64) | 6 | UI16 Reserved, STRING Password (an MD5 crypt hash) |
| ScriptLimits (65) | 7 | UI16 MaxRecursionDepth, UI16 ScriptTimeoutSeconds |
| SetTabIndex (66) | 7 | UI16 Depth, UI16 TabIndex |
| FileAttributes (69) | 8 | Four bytes of flags for the whole movie, most significant first: Reserved, UseDirectBlit, UseGPU, HasMetadata, ActionScript3, two reserved bits, UseNetwork, then 24 reserved bits |
| ImportAssets2 (71) | 8 | STRING URL, UI8 Reserved (1), UI8 Reserved (0), UI16 Count, then Count × (UI16 Tag, STRING Name) |
| SymbolClass (76) | 9 | UI16 NumSymbols, then NumSymbols × (UI16 Tag, STRING Name): character IDs and ActionScript 3 class names |
| DefineBinaryData (87) | 9 | UI16 Tag, UI32 Reserved, then the data to the end of the tag |
| EnableTelemetry (93) | 19 | UI16 Reserved, then optionally a 32-byte SHA-256 password hash |