User Guide

The FWLaunch API 67
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.
FWLaunch.validateFireworks()
Availability
Dreamweaver 2, Fireworks 2.
Description
This function looks for the specified version of Fireworks on the user’s hard disk.
Arguments
{versionNumber}
The versionNumber argument is an optional floating-point number that is greater than or
equal to 2; it represents the required version of Fireworks. If this argument is omitted, the
default is 2.
Returns
A Boolean value that indicates whether the specified version of Fireworks was found.
Example
The following code checks whether Fireworks is installed:
if (FWLaunch.validateFireworks(6.0)){
alert("Fireworks 6.0 or later is installed.");
}else{
alert("Fireworks 6.0 is not installed.");
}
000_DW_API_Print.book Page 67 Wednesday, August 20, 2003 9:14 AM