PublishSettings.xml holds what the Publish Settings dialog shows: which
files to make when the document is published, what to call them, and how to compile the
SWF. It is UTF-8 XML. Unlike the rest of the document, its values are the text content
of elements, not attributes.
<flash_profiles>
<flash_profile version="1.0" name="Default" current="true">
<PublishFormatProperties …>
<flash>…</flash>
<html>…</html>
…
<flashFileName>….swf</flashFileName>
…
</PublishFormatProperties>
<PublishHtmlProperties …> … </PublishHtmlProperties>
<PublishFlashProperties …>
<Version>11</Version>
<ActionScriptVersion>3</ActionScriptVersion>
<DocumentClass>classes.SimpleMMOWorld</DocumentClass>
<AS3PackagePaths>…</AS3PackagePaths>
<AS3ConfigConst>…</AS3ConfigConst>
<AS3Strict>…</AS3Strict>
<AS3Optimize>…</AS3Optimize>
…
</PublishFlashProperties>
</flash_profile>
</flash_profiles>
PublishSettings.xml, with values from an ActionScript 3.0 document saved by Flash CS5.5. Values shown as … differ from file to file.Profiles
The root element <flash_profiles> holds one or more
<flash_profile> elements, one for each named set of settings in the
dialog. Each has version (1.0), name (such as
Default) and current, which is
true on the profile in use. A reader takes the current profile, or the
first if none is marked; the explorer does the same.
A profile holds a group of settings for each output:
| Element | Holds |
|---|---|
<PublishFormatProperties> | Which formats to publish, as flags (<flash>, <html> and others), and their file names, such as <flashFileName> for the SWF. |
<PublishHtmlProperties> | The settings of the HTML page that embeds the SWF. |
<PublishFlashProperties> | How to compile the SWF (below). |
Flash properties
The children of <PublishFlashProperties> that matter for reading the
document and its scripts:
| Element | Meaning |
|---|---|
<Version> | The Flash Player version to publish for: 9 and 11 in the files seen. |
<ActionScriptVersion> | The ActionScript version of the scripts: 1, 2 or 3. Frame scripts in the document are in this language. |
<DocumentClass> | The ActionScript 3.0 class of the main timeline, such as classes.SimpleMMOWorld. Empty when there is none. See ActionScript in FLA. |
<AS3PackagePaths> | The class path for ActionScript 3.0: the folders searched for .as files. . is the folder of the .fla. |
<AS3ConfigConst> | Constants for conditional compilation, such as CONFIG::debug. |
<AS3Strict> | Whether the ActionScript 3.0 compiler runs in strict mode, checking types. |
<AS3Optimize> | By its name, whether the compiler optimises the code. |
The other children, as the unofficial
PublishSettings schema of the
JPEXS project lists them. Each holds text, mostly a number or 0 and 1; the schema gives
no value lists, so where a number stands for a choice in the dialog (such as
Quality or CompressionType) which number is which choice is
not established.
- SWF:
TopDown(load order),Report(size report),Protect(protect from import),OmitTraceActions,Quality(JPEG quality),DeblockingFilter,CompressMovie,CompressionType,InvisibleLayer(include hidden layers),IncludeXMP,HardwareAcceleration,ScriptStuckDelay(script time limit),UseNetwork(local playback security),ExternalPlayer,FireFox,ExportSwc - Sound:
StreamFormat,StreamCompress,EventFormat,EventCompress,OverrideSounds,DeviceSound,StreamUse8kSampleRate,EventUse8kSampleRate - Debugging:
DebuggingPermitted,DebuggingPassword - ActionScript 2.0:
PackagePaths(class path),PackageExportFrame(frame to export classes in) - ActionScript 3.0:
AS3Coach,AS3AutoDeclare(declare stage instances automatically),AS3Dialect,AS3ExportFrame,AS3Flags,AS3LibraryPaths,AS3ExternalLibraryPaths,DefaultLibraryLinkage,RSLPreloaderMethod,RSLPreloaderSWF, and<LibraryPath>and<LibraryVersions>, lists of SWC paths with their linkage and runtime shared library addresses
The explorer reads the Flash Player version, ActionScript version, document class, class path and SWF file name and shows them with the document, and lists every setting of every profile in its own table.
The other groups
<PublishFormatProperties>: a switch for each format (flash,projectorWin,projectorMac,html,gif,jpeg,png,qt,rnwk,swc), and for each a…FileNameand a…DefaultName; anddefaultNames.<PublishHtmlProperties>: the page template (TemplateFileName), player version detection (VersionDetectionIfAvailable,VersionInfo, content and alternate file names),Width,Height,Units,Align,HorizontalAlignment,VerticalAlignment,Scale,Quality,WindowMode,Loop,StartPaused,DisplayMenu,DeviceFont,DeblockingFilter,showTagWarnMsg.<PublishGifProperties>and<PublishPNGProperties>: size (Width,Height,MatchMovieDim), palette (PaletteOption,PaletteName,MaxColors,OptimizeColors), dithering, smoothing, interlacing, transparency, removing gradients; the GIF’s animation and looping; the PNG’sBitDepthandFilterOption.<PublishJpegProperties>: size,DPI,Quality,Progressive.<PublishQTProperties>: size, alpha and layer options, sound compression and settings, controller, looping, paused at start, play every frame, flatten.<PublishRNWKProperties>: RealPlayer export of the SWF and audio, its bit rates and the connection speeds to target, and a SMIL file.
Each group has an enabled attribute. These are the same settings, by the
same names, as the Group::Name pairs of a binary FLA’s
Contents stream.
A binary FLA of Flash CS3 or CS4 keeps the same settings as name and value pairs in
its Contents stream, such as Vector::DocumentClass.