beautypg.com

Fwlaunch.optimizeinfireworks(), Fwlaunch.validatefireworks() – Adobe Dreamweaver API Reference CS5 User Manual

Page 41

background image

36

DREAMWEAVER API REFERENCE

Fireworks integration

Last updated 8/27/2013

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 that 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.