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
The attributes seen on the root element:
| Attribute | Meaning |
|---|---|
width, height | The stage size, in pixels. |
backgroundColor | The stage colour, as #RRGGBB. |
frameRate | Frames a second. Absent in every file seen, so the default applied; its value is not confirmed here. |
currentTimeline | The scene open when the document was saved. |
xflVersion | The version of XFL, such as 2.1 for Flash CS5.5. See Versions. |
creatorInfo | The program, such as Adobe Flash Professional CS5.5. |
platform | The system it was saved on, such as Macintosh. |
versionInfo | 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. |
viewAngle3D | The perspective angle of the 3D camera. |
nextSceneIdentifier | The number the next new scene will take. |
playOptions… | A group of attributes for playing the timeline in the authoring tool. |
autoSaveEnabled | Whether auto-save is on. |
| grid and guide attributes | The editing grid and guides: spacing, colours and snapping. |
Adobe has not documented these attributes. The meanings of
currentTimeline, viewAngle3D,
nextSceneIdentifier and the play options are read from their names and
the files, and so are those of itemIcon and loadImmediate
below.
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. |
| others | Such as <scripts> and <persistentData>; not seen in the files examined. |
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.