| Introduction | Basic Types | Display List | Control Tags |
| Shapes | (Examples Shapes) | Gradients | Buttons |
| Sprites | Fonts and Text | Shape Morphing | Bitmap |
| Sounds | Actions | ActionScripts | Reference |
![]() |
![]() |
![]() |
![]() |
Location of ShapeRecord[n] = StartOfOffsetTable + OffsetTable[n]Because the ShapeTable immediately follows the OffsetTable, the number of entries in both tables can be inferred by dividing the first offset by two:
Shape count = OffsetTable[0] / 2
DefineFont Field Type Comment Header RECORDHEADER Tag ID = 10 FontId UI16 ID for this character OffsetTable UI16 [nGlyphs] Array of shape offsets Shape Table SHAPE [nGlyphs] Array of shapes
|
|
DefineText Field Type Comment Header RECORDHEADER Tag ID = 11 TextId UI16 ID for this character TextBounds RECT Bounds of the text TextMatrix MATRIX Matrix for the text TextGlyphBits nGlyphBits = UI8 Bits in each glyph index TextAdvanceBits nAdvanceBits = UI8 Bits in each advance value TextRecords TEXTRECORD[zero or more] Text records TextEndOfRecordsFlag UI8 = 0 Always set to zero
|
|
TextRecord Field Type Comment TextRecordType UB [1] 0 = glyph record, 1 = text style record
TextRecordType1 (Text Style Change Record) Field Type Comment TextRecordType UB [1] = 1 1 if text stage change record TextReserved UB [3] Reserved always 0 TextHasFont HasFont = UB [1] 1 if text font specified TextHasColor HasColor = UB [1] 1 if text color specified TextHasYOffset HasYOffset = UB [1] 1 if Y offset specified TextHasXOffset HasXOffset = UB [1] 1 if X offset specified TextFontID if hasFont UI16 Font ID for following text TextColor If hasColor RGB
If this record is part of a DefineText2 tag then RGBAFont color for following text TextXOffset If hasXOffset SI16 Font X offset for following text TextYOffset If hasYOffset SI16 Font Y offset for following text TextHeight If hasFont UI16 Font height for following text
|
|
TextRecordType0 (Glyph Record) Field Type Comment TextRecordType UB [1] = 0 0 if text glyph record TextGlyphCount nGlyphs = UB [7] Number of glyphs in record TextGlyphEntries GLYPHENTRY[nGlyphs] Glyph entry see below
|
GlyphEntry Field Type Comment TextGlyphIndex UB [nGlyphBits] Glyph index into current font TextGlyphAdvance SB [nAdvanceBits] X advance value for glyph
|
|
DefineFontInfo Field Type Comment Header RECORDHEADER Tag ID = 13 FontID UI16 Font ID this information is for FontNameLen NameLen = UI8 Length of font name FontName UI8 [nameLen] Name of the font FontFlagsReserved UI8 [2] Reserved bit fields FontFlagsUnicode UB [1] Unicode character codes FontFlagsShiftJIS UB [1] ShiftJIS character codes FontFlagsANSI UB [1] ANSI character codes FontFlagsItalic UB [1] Font is italic FontFlagsBold UB [1] Font is bold FontFlagsWideCodes WideChars = UB [1] if 1 codeTable is UI16s else UI8s CodeTable if whideChars = 1 UI16 [nGlyphs]
if wideChars = 0 UI8 [nGlyphs]Glyph to code table
|
|
DefineFont2 Field Type Comment Header RECORDHEADER Tag ID = 48 FontID UI16 Font ID for this information FontFlagsHasLayout UB [1] Has font metrics/layout information FontFlagsShiftJIS UB [1] ShiftJIS encoding FontFlagsUnicode UB [1] Unicode encoding FontFlagsAnsi UB [1] ANSI encoding FontFlagsWideOffsets UB [1] If 1, uses 32 bit offsets FontFlagsWideCodes UB [1] If 1, font uses 16-bit codes, otherwise font uses 8 bit codes FontFlagsItalic UB [1] Italic font FontFlagsBold UB [1] Bold font FontFlagsReserved UB [8] Reserved Flags FontNameLen NameLen = UI8 Length of name FontName UI8 [NameLen] Name of font FontGlyphCount UI16 Count of Glyphs in font nGlyphs FontOffsetTable If FontFlagsWideOffsets is 1, UI32 [nGlyphs] else UI16 [nGlyphs] FontCodeOffset If FontFlagsWideOffsets is 1, UI32 else UI16 Byte count from start of the FontOffsetTable to start of FontCodeTable FontShapeTable SHAPE [nGlyphs] FontCodeTable If FontFlagsWideCodes is 1, UI16 [nGlyphs] else UI8 [nGlyphs] FontAscent If FontFlagsHasLayout is 1, SI16 Font ascender height FontDescent If FontFlagsHasLayout is 1, SI16 Font descender height FontLeading If FontFlagsHasLayout is 1, SI16 Font leading height FontAdvance Table If FontFlagsHasLayout is 1, SI16 [nGlyphs] FontBoundsTable If FontFlagsHasLayout is 1, RECT [nGlyphs] Not used in Flash Player 4 FontKerningCount If FontFlagsHasLayout is 1, nCount = UI16 Not used in Flash Player 4 FontKerningTable If FontFlagsHasLayout is 1, KERNINGRECORD[nCount] Not used in Flash Player 4
|
KerningRecord Field Type Comment FontKerningCode1 If FontFlagsWideCodes is 1, UI16 else UI8 The character code of the left hand character. FontKerningCode2 If FontFlagsWideCodes is 1, UI16 else UI8 The character code of the right hand character. FontKerningAdjustment SI16 Adjustment relative to advance values.
|
DefineText2 Field Type Comment Header RECORDHEADER Tag ID = 33 TextId UI16 ID for this character TextBounds RECT Bounding box of the text TextMatrix MATRIX Transform Matrix TextGlyphBits nGlyphBits = UI8 Bits in each glyph index TextAdvanceBits nAdvanceBits = UI8 Bits in each advance value TextRecords TEXTRECORD[zero or more] Text records TextEndOfRecordsFlag UI8 = 0 Always set to zero
|
DefineEditText Field Type Comment Header RECORDHEADER Tag ID = 37 TextId UI16 ID for this character Bounds RECT Rectangle that completely encloses the text field. HasText HasText = UB [1] 0 = text field has no default text
1 = text field initially displays the string specified by InitialTextWordWrap WordWrap = UB [1] 0 = text will not wrap and scroll sideways.
1 = text will wrap automatically when the end of line is reachedMultiline Multiline = UB [1] 0 = text field is one line only.
1 = text field is multi-line and will scroll automatically.Password Password = UB [1] 0 = characters are displayed as typed.
1 = all characters are displayed as an asterisk.ReadOnly ReadOnly = UB [1] 0 = text editing is enabled
1 = text editing is disabled.HasTextColor HasTextColor = UB [1] 0 = use default color
1 = use specified color (TextColor)HasMaxLength HasMaxLength = UB [1] 0 = length of text is unlimited.
1 = maximum length of string is specified by MaxLength.HasFont HasFont = UB [1] 0 = use default font.
1 = use specified font (FontID) and height (FontHeight)Reserved UB [2] Reserved for future use HasLayout HasLayout = UB [1] 0 = no margins, idents or leading
1 = use specified margins, indents, and leadingNoSelect NoSelect = UB [1] 0 = selections enabled
1 = selections disabledBorder Border = UB [1] 0 = text field is drawn without border.
1 = text field is drawn with border.Reserved UB [2] Reserved for future use UseOutlines UseOutlines = UB [1] 0 = (???) FontID If HasFont UI16 Font ID for text FontHeight If HasFont UI16 Height of font in twips TextColor If HasTextColor RGBA Color of text MaxLength If HasMaxLength UI16 Text is restricted to this length Align If HasLayout UI8 0 = Left, 1 = Right, 2 = Center, 3 = Justify LeftMargin If HasLayout UI16 Left margin in twips RightMargin If HasLayout UI16 Right margin in twips Indent If HasLayout UI16 Indent in twips Leading If HasLayout UI16 Leading in twips VariableName STRING Name of the variable where the contents of the text field are stored. InitialText If HasText STRING Text that is initially displayed in the text field, before it is edited.
|
| Introduction | Basic Types | Display List | Control Tags |
| Shapes | (Examples Shapes) | Gradients | Buttons |
| Sprites | Fonts and Text | Shape Morphing | Bitmap |
| Sounds | Actions | ActionScripts | Reference |