User Guide

The FWLaunch API 57
FWLaunch.optimizeInFireworks()
Availability
Dreamweaver 2, Fireworks 2.
Description
This function opens a Fireworks optimization session for the specified image.
Arguments
docURL, imageURL, {targetWidth}, {targetHeight}
The docURL argument is the path to the active document, which is expressed as a file://
URL.
The imageURL argument is the path to the selected image. If the path is relative, it is
relative to the path that you specify in the
docURL argument.
The targetWidth argument, which is optional, defines the width to which the image
should be resized.
The targetHeight argument, which is optional, defines the height to which the image
should be resized.
Returns
Zero, if a Fireworks optimization session successfully opens for the specified image; otherwise,
a nonzero error code that indicates one of the following errors occurred:
Invalid usage, which indicates that the docURL argument, the imageURL argument, or
both, are specified as a
null value or an empty string.
File I/O error, which indicates that Fireworks cannot create a response file because the
disk is full.
Error notifying Dreamweaver that the user is not running a valid version of Dreamweaver
(version 2 or later).
Error starting Fireworks process, which indicates that the function does not open a valid
version of Fireworks (version 2 or later).
User cancelled the operation.
000_DW_API_Print.book Page 57 Wednesday, July 20, 2005 11:58 AM