Adobe 38039927 - Fireworks CS3 - PC Extended User Manual page 9

Extending fireworks
Hide thumbs Also See for 38039927 - Fireworks CS3 - PC:
Table of Contents

Advertisement

fw.documents[2].brushes[4].shape = "square";
The preceding example includes the following properties:
is a property of the Fireworks object and contains an array of Document objects.
documents
is a property of the Document object and contains an array of Brush objects.
brushes
is a property of the Brush object.
shape
Note: Throughout this manual, optional arguments are enclosed in {braces}.
Fireworks Object Model calls and API calls
In some cases, you can use Fireworks Object Model calls or API calls to perform the same operations. In other cases,
a certain function might be available in either the Fireworks Object Model or the API, but not in both.
For example, if the first open document is the current document, the first code fragment has the same effect as the
second and third code fragments. The
information, see "Accessing a Fireworks document" on page 4).
fw.getDocumentDOM().setDocumentResolution({pixelsPerUnit:72, units:"inch"});
fw.documents[0].resolution =72;
fw.documents[0].resolutionUnits ="inch";
Formatting nonstandard data types
In addition to the standard data types that can be passed to functions as arguments, or used as properties, such as
integer, string, and so on, Fireworks accepts other data types.
• Some functions accept values that are Fireworks objects. For more information, see "The Fireworks Object Model"
on page 4.
• Some functions accept a string in a specific format. Others accept value types that are not Fireworks objects but
are JavaScript object types that are specific to Fireworks. These types of arguments are described next, in alpha-
betical order.
Color string data type
Functions that accept colors as arguments use the HTML syntax
(transparency) component by passing a longer string of the form
Mask data type
The format for a mask is
{maskBounds: rectangle
,
mount: int
maskData: hex-string}
specifies the bounding rectangle of the mask area.
maskBounds
• Acceptable values for
maskKind
.
"uncompressed"
• If the value of
maskKind
is constructed that fills
• If the value of
maskKind
is presumed to contain 8-bit mask data in hexadecimal format that precisely matches the
the mask.
fw.getDocumentDOM()
.
are
"rectangle"
is
or
"rectangle"
"oval"
and that has the edge specified by
maskBounds
is "
", "
zlib compressed
function references the current document (for more
. You can specify a color with an alpha
"#rrggbb"
"#rrggbbaa"
,
,
maskKind: string
maskEdgeMode: string
,
,
"oval"
"zlib compressed"
, the
string is ignored, and a mask of the right shape
maskData
maskEdgeMode
, or "
rle compressed"
uncompressed"
ADOBE FIREWORKS CS3
.
,
featherA-
,
"rle compressed"
and
featherAmount
, the
maskData
to define
maskBounds
5
Extending Guide
, or
.
string

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs3

Table of Contents