Slices object

Slices is an object that has some properties and is also a two-dimensional array of SliceInfo objects (see SliceInfo object). 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; curRow++) {
    for (curCol=0; curCol<slices.numColumns; curCol++) {
        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.

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.

doSkipUndefined

Boolean

Set to true if Export Undefined Slices is not selected in Document Properties.

imagesDirPath

string

Relative URL to the images folder. For example, "images/", or "../site_images", or "" (an empty string) if the images and the HTML are in the same directory.

numColumns

integer

Number of columns in the HTML table. Does not include shim column.

numRows

integer

Number of rows in the HTML table. Does not include shim row.

shimPath

string

Relative URL to the shim GIF file; for example, "images/shim.gif".


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_02_68.htm