Using Fireworks Api Functions - Adobe 38039927 - Fireworks CS3 - PC Extended User Manual

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

Advertisement

Matrix data type
The format for a matrix is
. This guide assumes that you know how to use these nine values to construct a three-by-three transfor-
float]}
mation matrix; discussion of the construction of transformation matrices is beyond the scope of this manual.
Point data type
The format for a point is
{x: float
look like the following example:
fw.getDocumentDOM().addNewLine({x:64.5, y:279.5}, {x:393.5, y:421.5});
Rectangle data type
The format for a rectangle is
dom.addNewOval(boundingRectangle)
fw.getDocumentDOM().addNewOval({left:72, top:79, right:236, bottom:228});
Resolution data type
The format for resolution is
or "
". For instance,
cm
dom.setDocumentResolution(resolution)
fw.getDocumentDOM().setDocumentResolution({pixelsPerUnit:72, units:"inch"});

Using Fireworks API functions

Three categories of API functions are described in this book: Document functions, History panel functions, and
Fireworks functions. The following rules apply to all functions.
Zero-based indexes
Some functions take an
index
represents the first item in the array,
deletes the second layer of the active Fireworks document:
fw.getDocumentDOM().deleteLayer2;
Functions that take a
frameIndex
that take a
argument may be passed
layerIndex
Passing null values
In general, passing a
null
an argument; such cases are noted in the function descriptions.
Working with selected elements
Many API functions in this chapter refer to a "selection" or to "selected items. " These terms refer to Fireworks
elements, such as text boxes or images, that are currently selected. In most cases, the functions work even if only one
item is selected. If a function requires more than one selected item, this is noted in the description of the function.
{matrix: [float, float, float, float, float, float, float, float,
,
. For instance,
y: float}
{left: float, top: float, right: float, bottom: float}
could look like the following example:
{pixelsPerUnit: float, units: string}
argument which is a zero-based, one-dimensional array. That means a value of
represents the second item, and so on. For example, the following command
1
argument can be passed
–1
value to a function causes an exception to be thrown. A few functions do allow
dom.addNewLine(startPoint
. Acceptable values for units are "
could look like the following example:
to indicate the current frame. Similarly, functions
–1
to indicate the current layer.
ADOBE FIREWORKS CS3
Extending Guide
,
could
endPoint)
. For instance,
"
inch
0
as
null
6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs3

Table of Contents