9
CHAPTER 2
The Fireworks Object Model
If you want to extend the functionality of Macromedia Fireworks MX 2004 by writing or
modifying a JavaScript extensibility file, you must become familiar with the objects that
Fireworks makes available through JavaScript. The hierarchy of these objects makes up the
Fireworks Object Model, containing the following major components:
•
Five global methods that are available from any part of the application and need not be
declared as methods of a particular object. These methods are described in
“Global methods”
on page 12
.
•
Four core objects: Document, Errors, Files, and Find. These objects and their properties and
methods are described in detail in
“Core objects” on page 12
. (The App object that was used in
Fireworks 3 is supported for backward compatibility, but its use is deprecated in favor of the
Fireworks object.)
•
The Fireworks object, which is described in
“The Fireworks object” on page 22
.
•
Numerous objects associated with Fireworks documents, such as ExportOptions, Guides, Path,
Image, and Text. These objects and their properties are described in
“Objects within Fireworks
documents” on page 26
.
•
A set of objects that you can use to specify the format of HTML code when exporting from
Fireworks. These are described in
“HTML export objects” on page 64
.
Using the Fireworks Object Model
When scripting extensions for Fireworks, you write JavaScript commands that send calls to the
Fireworks Object Model to determine or change the current settings for a Fireworks document.
For example, the following command calls the Fireworks object (
fw
) to obtain the path to the
Export Settings directory (
appExportSettingsDir)
, which is expressed as a file://URL. In other
words,
fw
references the Fireworks global object, of which
appExportSettingsDir
is a property
(see
“The Fireworks object” on page 22
), so a JavaScript command can assign the resulting value
to a variable, as follows:
var expSetDir = fw.appExportSettingsDir;
Summary of Contents for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER
Page 1: ...Extending Fireworks...
Page 4: ...4 Contents...
Page 8: ...8 Chapter 1 Extending Fireworks Overview...
Page 102: ...102 Chapter 4 Auto Shapes...