MACROMEDIA FIREWORKS MX 2004-EXTENDING FIREWORKS Manual page 254

Extending fireworks
Hide thumbs Also See for FIREWORKS MX 2004-EXTENDING FIREWORKS:
Table of Contents

Advertisement

Example
The Macromedia Flash writer is controlled by the values of several preferences. See the following
example for allowed values. A well-behaved script should restore the original values after
exporting the file.
var prevMaintainObjEditable = fw.getPref("SwfMaintainObjEditable");
fw.setPref("SwfMaintainObjEditable", true);
// maintain non-text editability
//at expense of appearance or not
var prevMaintainTextEditable = fw.getPref("SwfMaintainTextEditable");
fw.setPref("SwfMaintainTextEditable", false);
// maintain text editability
// at expense of appearance or not
var prevExportAllFrames = fw.getPref("SwfExportAllFrames");
fw.setPref("SwfExportAllFrames", true);
// if true all frames are exported
var prevExportFromFrame = fw.getPref("SwfExportFromFrame");
fw.setPref("SwfExportFromFrame", 1);
// from frame; only used ifSwfExportAllFrames is false
var prevExportToFrame = fw.getPref("SwfExportToFrame");
fw.setPref("SwfExportToFrame", 5);
// from frame; only used if SwfExportAllFrames is false
var prevJpegQualit = fw.getPref("SwfJpegQuality");
fw.setPref("SwfJpegQuality", 85);
var prevFrameRate = fw.getPref("SwfFrameRate");
fw.setPref("SwfFrameRate", 5);
fw.exportSWF(null, "file:///C|/new folder/test.swf");
// Put the prefs back.
fw.setPref("SwfMaintainObjEditable", prevMaintainObjEditable);
fw.setPref("SwfMaintainTextEditable", prevMaintainTextEditable);
fw.setPref("SwfExportAllFrames", prevExportAllFrames);
fw.setPref("SwfExportFromFrame", prevExportFromFrame);
fw.setPref("SwfExportToFrame", prevExportToFrame);
fw.setPref("SwfJpegQuality", prevJpegQualit);
fw.setPref("SwfFrameRate", prevFrameRate);
fw.findApp()
Availability
Fireworks MX.
Usage
fw.findApp(macAppSignature or winExeRegistryName)
Arguments
macAppSignature
find, such as "
MKBY
winExeRegistryName
find in the Windows registry, such as "
Returns
A URL to the application. This URL can be passed as an argument to
such application can be found, the URL is empty.
254
Chapter 5: Fireworks JavaScript API
// frame rate
A Macintosh-specific string that identifies the signature of the application to
".
A Windows-specific string that identifies the name of an executable to
Fireworks.exe
// JPEG quality
".
. If no
fw.launchApp()

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FIREWORKS MX 2004-EXTENDING FIREWORKS and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Fireworks mx 2004

Table of Contents