User Guide
250 Chapter 5: Fireworks JavaScript API
Description
Exports the specified document to the specified file.
See also
fw.exportHtmlAndImages()
fw.exportFrames()
Availability
Fireworks 4.
Usage
fw.exportFrames(docObject, directoryURL)
Arguments
docObject
A Document object that specifies the document that contains the frames to export
(see “Document object” on page 13). To export frames from the current document, pass
null.
directoryURL The directory where the images will be placed, which is expressed as a file://
URL.
Returns
A Boolean value: true if successful; false otherwise.
Description
Exports a document’s frames as individual images. The image names are based on the names in
the Frames panel.
Example
The following command exports the frames in the current document to the C:\images directory.
fw.exportFrames(null, "file:///C|/images");
fw.exportHtmlAndImages()
Availability
Fireworks 4.
Usage
fw.exportHtmlAndImages(doc, htmlUrl, imagesUrl)
Arguments
doc
A Document object that specifies the document to be exported (see “Document object”
on page 13). If
doc is null, the active document is exported.
htmlUrl The filename of the exported HTML file, which is expressed as a file://URL. If
htmlUrl is null, no HTML is generated.
imagesUrl The name of the file containing the exported image(s), which is expressed as a file:/
/URL, and might not be
null. If a single image is generated, this function uses imagesUrl as the
name of the image file. If multiple sliced images are exported, it uses
imagesURL to generate
automatically named images, and all images are placed in this directory.