These tags set properties of the whole movie or link it to other files and to code. Each table gives the body after the tag header; offsets are from the start of the body, inside the decompressed data. “ID” fields are UI16 character IDs. Strings are UTF-8, as in every SWF 6 and later movie.
End (0)
No body. It ends the main timeline’s tags, the end of the movie, and each sprite’s tags. Bytes after the main End tag are ignored by players; the explorer shows them as “After the End tag”.
SetBackgroundColor (9)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 3 | RGB | BackgroundColor | The colour of the stage. Only the main timeline’s counts. |
Protect (24)
Asks authoring tools not to import the file. The body is empty, or, when a password was set (Flash 5 and later), a UI16 and a string:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | Reserved | 0 |
| 2 | … | STRING | Password | An MD5 crypt hash of the password |
It does not stop decompilers, which ignore it.
ExportAssets (56)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | Count | The number of exported characters |
| 2 | … | Count × (UI16, STRING) | Tag, Name | A character ID and the name it is exported under |
The name is the “linkage identifier” of the Flash library. ActionScript 1 and 2 use it
to attach a symbol at run time, and the compiler exports each ActionScript 2 class as a
sprite named __Packages. and the class name (see
ActionScript in SWF).
ImportAssets (57)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | … | STRING | URL | The SWF to import from |
| … | 2 | UI16 | Count | The number of imported characters |
| … | … | Count × (UI16, STRING) | Tag, Name | The ID this file gives the character, and its export name in the other movie |
Deprecated by ImportAssets2 in SWF 8.
ImportAssets2 (71)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | … | STRING | URL | The SWF to import from |
| … | 1 | UI8 | Reserved | Must be 1 |
| … | 1 | UI8 | Reserved | Must be 0 |
| … | 2 | UI16 | Count | The number of imported characters |
| … | … | Count × (UI16, STRING) | Tag, Name | As in ImportAssets |
EnableDebugger (58)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | … | STRING | Password | An MD5 crypt hash of the debugging password |
The SWF 5 form. SWF 6 and later movies use EnableDebugger2.
EnableDebugger2 (64)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | Reserved | 0 |
| 2 | … | STRING | Password | An MD5 crypt hash of the debugging password |
ScriptLimits (65)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | MaxRecursionDepth | The deepest the call stack may go (default 256) |
| 2 | 2 | UI16 | ScriptTimeoutSeconds | How long a script may run before the player offers to stop it (default 15 to 20 seconds, by platform) |
SetTabIndex (66)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | Depth | The object’s depth on the display list |
| 2 | 2 | UI16 | TabIndex | Its place in the tab order |
FileAttributes (69)
Four bytes of flags for the whole file, read as bits, most significant first. From SWF 8 it should be the first tag (a secondary source says so; the explorer notes when it is not).
| Bits | Name | As a byte | Meaning |
|---|---|---|---|
| UB[1] | Reserved | 0x80 | 0 |
| UB[1] | UseDirectBlit | 0x40 | Use hardware acceleration to blit graphics (Flash Player 10) |
| UB[1] | UseGPU | 0x20 | Use GPU compositing (Flash Player 10) |
| UB[1] | HasMetadata | 0x10 | The file has a Metadata tag |
| UB[1] | ActionScript3 | 0x08 | The file runs on the AVM2; DoAction and DoInitAction are then ignored |
| UB[2] | Reserved | 0x04, 0x02 | 0. JPEXS names these bits for SWF-relative URLs and “no cross-domain cache”; not in the specification as read here, not confirmed. |
| UB[1] | UseNetwork | 0x01 | Decides a local file’s sandbox: set, it may use the network; clear, only local files |
| UB[24] | Reserved | 0 |
A ZWS movie is SWF 13 or later, so FileAttributes should be its first tag, the first thing in the decompressed data after FrameCount.
Metadata (77)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | … | STRING | Metadata | XMP: RDF/XML in UTF-8, ending with a zero byte |
Usually Dublin Core and xmp properties written by the authoring tool.
FileAttributes’ HasMetadata flag says it is there.
SymbolClass (76)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | NumSymbols | The number of links |
| 2 | … | NumSymbols × (UI16, STRING) | Tag, Name | A character ID and the fully qualified ActionScript 3 class name for it |
Character 0 is the main timeline: its class is the movie’s document class. The player makes an instance of the named class whenever it creates that character. See ABC file.
DefineBinaryData (87)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | Tag | The character ID |
| 2 | 4 | UI32 | Reserved | 0 |
| 6 | … | bytes | Data | The data, to the end of the tag |
Linked to a class by SymbolClass. The Flex compiler writes one for each
[Embed(source="…", mimeType="application/octet-stream")] in the
source.
EnableTelemetry (93)
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UI16 | Reserved | 0 |
| 2 | 32 | bytes | PasswordHash | Optional: the SHA-256 hash of a password for Adobe Scout |
SWF 19. It allows advanced telemetry, read by Adobe Scout, a profiler.
ProductInfo (41, undocumented)
Not in the specification. The Flex compiler (mxmlc) writes it. The
layout below is the one JPEXS and the Flex SDK’s sources use, and the one the explorer
reads; it is not confirmed by Adobe’s documents.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 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 part |
| 14 | 4 | UI32 | BuildHigh | The build number, high part |
| 18 | 8 | UI64 | CompilationDate | Milliseconds since 1 January 1970, UTC |
DebugID (63, undocumented)
16 bytes: a UUID that matches the movie to the .swd debugging file the
Flash authoring tool writes beside it. Not in the specification.