92
The Fireworks Object Model
Slices object
Slices is an object that has some properties and is also a two-dimensional array of SliceInfo
objects (see
“SliceInfo object” on page 89
). For example,
Slices[0][0]
is the slice
information
for the first cell at row 0, column 0. The first array is rows; the second is
columns.
The following example shows a common way to access the table:
var curRow;
var curCol;
for (curRow = 0; curRow<slices.numRows; +) {
for (curCol=0; curCol<slices.numColumns; +) {
var curSlice = slices[curRow][curCol]; // curSlice is the slice info
for the cell at this row &
column.
// do whatever processing with curSlice.
}
}
The following table lists the properties of the Slices object, along with their data types and,
where appropriate, acceptable values and notes. All Slices object properties are read-only.
top
integer
Top of the cell in pixels. The top starts at
0
.
width
integer
Width of the image in pixels, including
column spans.
Property (read-only)
Data type
Notes
demoIndex
zero-based
index
Index for each file generated for multiple file
button export.
doDemoHTML
Boolean
Corresponds to the Export Multiple Nav bar
HTML Files check box in the Document
Specific tab of the HTML Setup dialog box.
Setting this property to
true
produces n+1
HTML pages where n is the number of
buttons. A value of
false
produces a single
HTML page.
doShimEdges
Boolean
Set to
true
if table shims are set to
Transparent Image in Document
properties.
Property (read-only) or
method
Data type
Notes
Summary of Contents for FIREWORKS 8-EXTENDING FIREWORKS
Page 1: ...Extending Fireworks ...
Page 4: ...4 Contents ...
Page 358: ...358 Fireworks JavaScript API ...
Page 372: ...372 Index ...