A frame’s children are the objects on the stage: instances of library symbols, text fields, grouped shapes and bitmaps. All of them start with the object part, and each has the revision of its own fields next. These layouts are those of the JPEXS FLA converter, checked against some 1,300 documents from Flash 3, 4, 5 and MX. Every string is a single-byte CString.
Symbol instances
CPicSymbol: a graphic symbol placed on the stage. Movie clips and buttons
are the same record with their own fields after it, below.
| Field | Present from | Meaning |
|---|---|---|
| object part | always | Revision 1; no children. |
| u8 revision | always | 6 in Flash 3, 7 in Flash 4, 8 in Flash 5, 0x0A in Flash MX. Flash 5 documents also keep instances at 7. |
| 6 × s32 | always | The placement matrix. |
| u16 | always | The first frame to show. |
| u16 | 2 | Loop mode: 0 loop, 1 play once, 2 single frame. |
| colour words | 3 to 6 | Six s16, the red, green and blue multipliers and offsets; from 5 the alpha multiplier and offset come first. |
| effect words | 4 to 6 | A u16 effect type, an s16 percent and a u32 colour, as in the colour transform. |
| colour transform | 7 | The record below, in place of the two rows above. |
| CString | 6 | A legacy name. |
| u32 | always | The library item: the libraryId of a CDocumentPage. |
| CString, CString | 8 and 9 only | Flash 5 Smart Clip settings: the custom user interface file and the symbol’s description. |
| property list | 8 and 9 only | The clip parameters. |
| u32 | 8 and 9 only | Parameters are locked. |
| CString | 9 only | A component name. |
A Flash MX instance (revision 0x0A) ends after the library item. Later
releases go on with timeline effects, filters, blend modes and 3D; those are on the
Flash MX 2004 to CS4 page.
Movie clips and buttons
A movie clip instance is a CPicSprite: a whole symbol instance, then
| Field | Present from | Meaning |
|---|---|---|
| u8 revision | always | 1 in Flash 3 and 4, 3 in Flash 5, 6 in Flash MX. |
| actions | 2 | An ActionScript block with its onClipEvent handlers. |
| CString | always | The instance name. |
| property list | 3 | The instance’s Smart Clip or component parameters. |
| accessibility | 6 | The instance’s accessibility settings. |
| u32 | 5 | Property inspector state. |
A button instance is a CPicButton: a whole symbol instance, then
| Field | Present from | Meaning |
|---|---|---|
| u8 revision | always | 4 in Flash 3 and 4, 5 in Flash 5, 8 in Flash MX. |
| actions | 2 | Revision 2: one action command. 3 and 4: a u32 count and that many commands. 5 on: an ActionScript block holding its on handlers. |
| u8 | 4 | Track as menu item (1) or as button (0). |
| CString | 6 | The instance name. |
| accessibility | 8 | The instance’s accessibility settings. |
Colour transform
From instance revision 7 (Flash 4): a u8 revision (always 1), then eight s16: alpha multiplier and offset, then the same for red, green and blue, then a u16 effect type, an s16 percent and a u32 colour. Multipliers are 8.8 fixed point (256 is 1); offsets are added to the 0 to 255 value of each channel.
| Effect type | Meaning |
|---|---|
| 0 | None. |
| 1 | Brightness: the percent, −100 to 100. |
| 2 | Tint: the colour, and the percent of it. |
| 3 | Advanced: the multipliers and offsets as set. |
| 4 | Alpha: the percent. |
Text fields
CPicText: the object part, a u8 revision (3 in Flash 3, 4 in Flash 4, 5
in Flash 5, 9 in Flash MX), the matrix, four s32 for the bounds (left, right, top,
bottom, in twips), a u8 auto-expand flag, then:
| Field | Present from | Meaning |
|---|---|---|
| u8 | 3 | Not established. |
| flags | 4 | u16 at revision 4, u32 from 5; below. |
| u16 | 4 | Maximum characters, 0 for no limit. |
| CString | 4 | The variable name. |
| CString | flag 0x2000 | The font library name. |
| style | flag 0x4000 | The default style, for an empty field. |
| runs | always | Text runs, each a u16 character count (up to 0x202), a style and the characters, one byte each; ended by a count of 0. |
| CString | 6 | The instance name. |
| accessibility | 9 | The field’s accessibility settings. |
| u32 | 8 | Scrollable. |
Flash 3 had only static text, so revision 3 has no flags. The flags:
| Bits | Meaning |
|---|---|
0x0001 | Editable: an input or dynamic text field rather than static text. |
0x0002 | Dynamic text (set by script, not typed by the viewer). |
0x0004 | Password. |
0x0008, 0x0010 | Line mode: 0x10 alone multiline without wrap, both multiline with wrap, neither single line. |
0x2000 | A font library name follows. |
0x4000 | A default style follows. |
0x20000 | Use device fonts. |
Bits 0x0020, 0x0040, 0x0080, 0x0100
to 0x1000 and 0x8000 also occur in real files. A text field
has further settings, such as HTML, border, selectable and which characters to embed,
but no public source says which bit holds which, so the explorer shows them as a
number.
Text styles
Each run carries its whole style. A u8 revision (4 in Flash 3 and 4, 5 in Flash 5, 7 in Flash MX; below 2 nothing else follows), then:
| Field | Present from | Meaning |
|---|---|---|
| u16 | 2 | Size in twips. |
| string | 2 | Font family: a u8 byte count, then the name in single bytes, sometimes with a zero byte at the end. |
| u32 | 2 | The colour. |
| u8 | 2 | Pitch and family (as in a Windows LOGFONT). |
| u8 | 2 | Character set (as in a Windows LOGFONT), below. |
| u8 | 2 | Bold. |
| u8 | exactly 2 | Bits: 1 italic, 2 use screen spacing, 4 no auto-kern, 0x18 character position. |
| 4 × u8 | 3 | Italic, use screen spacing, auto-kern, character position (0 normal, 1 superscript, 2 subscript). |
| u8 | 2 | Alignment: 0 left, 1 right, 2 centre, 3 justify. |
| 5 × s16 | 2 | Line spacing, indent, left margin, right margin, letter spacing (twips). |
| string | 5 | URL. |
| 3 × u8 | 6 | Vertical, right-to-left, rotation flags. |
| string | 7 | URL target. |
The character set says which code page the run’s bytes are in: 0 the system’s (ANSI), 1 default, 2 symbol, 128 Shift-JIS, 129 Hangul, 130 Johab, 134 GB2312, 136 Big5, 161 Greek, 162 Turkish, 163 Vietnamese, 177 Hebrew, 178 Arabic, 186 Baltic, 204 Cyrillic, 222 Thai, 238 Eastern European. The explorer decodes each run by it.
Accessibility settings
Flash MX’s accessibility panel, on movie clips, buttons and text fields. A u32 revision; 0 means nothing else follows, and is what nearly every Flash MX file holds. Otherwise a u32 of flags, CStrings for the name, description and shortcut, then u32 force-simple and u32 auto-labelling.
Clip and component parameters
Flash 5’s Smart Clips and Flash MX’s components keep their parameters as a property list: a u8 revision (1 in Flash 5, 2 in Flash MX), a u32 count, then entries.
- Revision 0 entries: a u32 type, a CString name and a CString value.
- Revision 1 and 2 entries: a u8 revision (0 in Flash 5, 1 in Flash MX), a CString name, a value record, and from entry revision 1 a CString variable name and a 17-byte identifier (a u8 revision and 16 bytes).
- A value record: a u8 revision (1 here), a u16 type, a u32 count, a u32 selected index, a u32 that says whether entries are named, then each entry as an optional CString name and a CString value.
- Revision 2 of the list ends with a u32, parameters are new.
Value types 1, 2 and 4 to 9 occur. Flash MX offers the parameter kinds default, array, object, list, string, number, Boolean, font name and colour, but no public source says which number is which kind, so the explorer shows the number.
Other objects
| Class | Is | Fields after the object part |
|---|---|---|
CPicShape | A shape object, such as a group | The shape part. |
CPicBitmap | A bitmap on the stage | u8 revision (1 in every file seen), matrix; at 0 an inline raster, from 1 a u16 media number. |
CPicVideoStream | Embedded video (Flash MX) | u8 revision, matrix, four s32 bounds, a u8, a CString, the instance name, from 3 a u32 present flag, then a u16 media number when present. |
CPicOle | An OLE object | u8 revision, matrix, four s32 bounds, a u16 item number; 0 means an object (CSketchCntrItem) follows. |
CCommandObj | Generator command | u8 revision, matrix, four s32 bounds, the command as a CString; from 1 a display label. |
CPicTempClipboardObj | Clipboard placeholder | u8 revision and a matrix. |
Shape objects and bitmaps are common; the last four were not found in the files examined, and their layouts are the JPEXS reader’s. What the unnamed bytes in them do is not publicly known. Classes added after Flash MX, such as filters, screens and compiled clips, are on the Flash MX 2004 to CS4 page.
In the explorer
The explorer reads every object and lists the instances of each timeline with their library item, instance name, matrix and colour effect; text fields with their kind (static, input or dynamic), their text in the right code page, font, size and colour; and each movie clip’s and button’s handlers with the instance name.