DOMDocument.xml is the document. It is UTF-8 XML in the namespace
http://ns.adobe.com/xfl/2008/, with one root element,
<DOMDocument>, whose attributes describe the stage and the release
that saved it and whose children hold the library lists and the scenes. Flash leaves out
attributes that have their default value, so a missing attribute is not an error.
<DOMDocument xmlns="http://ns.adobe.com/xfl/2008/" width="…" height="…"
backgroundColor="…" currentTimeline="…" xflVersion="2.1"
creatorInfo="Adobe Flash Professional CS5.5" platform="Macintosh"
versionInfo="Saved by Adobe Flash Macintosh 11.5 build 349"
majorVersion="11" minorVersion="5" buildNumber="349" …>
<folders>
<DOMFolderItem name="Assets" itemID="…" isExpanded="…"/>
</folders>
<media>
<DOMBitmapItem name="Assets/Other/minimap.png" bitmapDataHRef="M 31 1372941248.dat" …/>
</media>
<symbols>
<Include href="Tween 1.xml" itemIcon="…" loadImmediate="…" itemID="…" lastModified="…"/>
</symbols>
<timelines>
<DOMTimeline name="Scene 1">
<layers> … </layers>
</DOMTimeline>
</timelines>
</DOMDocument>
DOMDocument.xml saved by Flash CS5.5. Values shown as … differ from file to file.The DOMDocument element
Every attribute of the root element, with the default that applies when it is absent, as the unofficial XFL schema of the JPEXS project gives them:
| Attribute | Default | Meaning |
|---|---|---|
width, height | 550, 400 | The stage size, in pixels. |
backgroundColor | #ffffff | The stage colour, as #RRGGBB. |
frameRate | 24 | Frames a second; Flash leaves it out at 24. |
currentTimeline | 1 | The scene open when the document was saved, counted from 1. |
nextSceneIdentifier | 1 | The number the next new scene will take. |
xflVersion | The version of XFL, such as 2.1 for Flash CS5.5. See Versions. | |
creatorInfo, platform, versionInfo | The program (Adobe Flash Professional CS5.5), the system (Windows or Macintosh) and a line such as Saved by Adobe Flash Macintosh 11.5 build 349. | |
majorVersion, minorVersion, buildNumber | The same version as numbers: 11, 5 and 349. | |
filetypeGUID, fileGUID | Identifiers of the kind of document and of this document. | |
timelineLabelWidth | 0 | The width of the layer names in the Timeline panel. |
autoSaveEnabled, autoSaveHasPrompted | false | Auto-save is on; Flash has asked about it. |
rulerUnitType, rulerVisible | pixels, false | inches, decimal inches, points, centimeters, millimeters or pixels; rulers shown. |
gridVisible, gridSnapTo, gridColor | false, false, #949494 | The grid shown, snap to it, its colour. |
gridSpacingX, gridSpacingY | 10 | The grid’s spacing in pixels. |
gridSnapAccuracy | Normal | Must be close, Normal, Can be distant or Always snap. |
guidesVisible, guidesLocked, guidesSnapTo, guidesColor | true, false, true, #58FFFF | The guides. |
guidesSnapAccuracy | Normal | Must be close, Normal or Can be distant. |
objectsSnapTo, pixelSnap | true, false | Snap to objects, to pixels. |
snapAlign, snapAlignHorizontalCenter, snapAlignVerticalCenter | true, false, false | Snap align, and to centres. |
snapAlignBorderSpacing, snapAlignHorizontalSpacing, snapAlignVerticalSpacing | 0 | Snap align’s distances, in pixels. |
previewMode | anti alias text | outlines, fast, anti alias, anti alias text or full. |
viewOptionsAnimationControlVisible, viewOptionsButtonsActive, viewOptionsPasteBoardView, viewOptionsLivePreview | true, false, true, true | The view options. |
playOptionsPlayLoop, playOptionsPlayPages, playOptionsPlayFrameActions, playOptionsPlaySounds | true | How the authoring tool plays the timeline: loop, all scenes, frame actions, sounds. |
sharedLibraryURL | The shared library this document uses. | |
viewAngle3D, vanishingPoint3DX, vanishingPoint3DY, adjustViewAngle3D | –, 275, 200, true | The 3D perspective angle, the vanishing point in pixels, and whether the angle follows the stage size. |
| accessibility | hasAccessibleData, silent, forceSimple, autoLabeling, accName, description, shortcut, tabIndex: the whole document’s accessibility settings. |
Adobe has not documented these attributes; the meanings follow their names and the
same settings in the binary Contents
stream. The meanings of itemIcon and loadImmediate
below are read from their names.
Children
The root element’s children:
| Element | Holds |
|---|---|
<folders> | The library’s folders. |
<fonts> | Font items: <DOMFontItem>. |
<media> | Bitmaps, sounds, videos and compiled clips. |
<symbols> | The symbol files, by reference. |
<timelines> | One <DOMTimeline> for each scene. |
<swatchLists>, <extendedSwatchLists> | The swatches, below. |
<persistentData> | Values set by extensions: any number of <PD> elements (a persistent datum), each with n (its name), t (its type: s a string, i an integer, d a double, I an integer array, D a double array, B a hexadecimal byte array) and v (its value as text). All three are required. Instances, shapes and text fields can carry the same element; the explorer lists them as they stand. |
<scripts> | Scripts kept with the document; the schema marks it as uncertain, perhaps from Animate 2020. |
<PrinterSettings> | The print settings, below. |
<publishHistory> | One <PublishItem> for each publish: publishSize (the size of what was published), publishTime (a time stamp) and publishDebug (debugging information included). |
<swcCache> | The SWC libraries used, each a <Swc> with its <classDefinitions> (<ClassDefinition value hashKey>) and an href. |
Swatches
Each <swatchList> holds <SolidSwatchItem>
elements, with color, alpha and the colour mixer’s
hue, saturation and brightness, and
<LinearGradientSwatchItem> and
<RadialGradientSwatchItem> elements, with
<GradientEntry> stops, spreadMethod,
interpolationMethod and, for a radial one, the focal point. The explorer
shows the solid swatches as a palette and lists the gradients.
Print settings
<PrinterSettings>: framesToPrint (first frame
only or all frames), layout (actual size,
fit on one page, storyboard - boxes, storyboard -
grid, storyboard - blank), labelPages,
frameCountAcrossPage (default 3), storyBoardMargin (180 twips),
the four page margins pageMarginLeft, pageMarginTop, pageMarginRight and pageMarginBottom (whole twips, 1,440 to an inch; 360 each, a quarter inch), centerHorizontal,
centerVertical, disablePostscript, scale (a
percentage, default 100) and modeData and namesData, the
printer’s Windows DEVMODE and DEVNAMES as text.
Folders
<folders> holds a <DOMFolderItem> for each
folder of the library, with name (the path, with / between
folders), itemID (an identifier) and isExpanded (whether
the folder is open in the Library panel). Items in a folder carry the folder path in
their own name.
Media
<media> lists the imported items, one element each:
<DOMBitmapItem>– a bitmap; itsbitmapDataHRefnames its file inbin/<DOMSoundItem>– a sound<DOMVideoItem>– a video<DOMCompiledClipItem>– a compiled clip or component, kept as a SWF inbin/
Fonts are listed separately, in <fonts>. The attributes of each
item are on The library.
Symbols
<symbols> does not hold the symbols themselves. It holds one
<Include> for each, pointing at its XML file:
| Attribute | Meaning |
|---|---|
href | The file, relative to LIBRARY/, such as Tween 1.xml for LIBRARY/Tween 1.xml. |
itemIcon | Which icon the Library panel shows. |
loadImmediate | Whether Flash loads the symbol when the document opens. |
itemID | The symbol’s identifier, as in its own file. |
lastModified | When the symbol last changed, as a number. |
A reader finds each symbol’s timeline by opening the file href names. The
explorer reports an <Include> whose file is not in the archive.
Timelines
<timelines> holds one <DOMTimeline> for each
scene, in scene order, with the scene’s name in name. Each holds its
layers, frames, what is on the stage and the frame scripts. Symbols have the same
structure inside their own files. See
Timelines, layers and frames.