User Guide
142 Chapter 5: Fireworks JavaScript API
Example
The following command makes one copy of the current frame and places the new frame after the
current frame.
fw.getDocumentDOM().duplicateFrame(-1, 1, "after current", false);
dom.duplicateLayer()
Availability
Fireworks 3.
Usage
dom.duplicateLayer(layerIndex, {howMany}, {where})
Arguments}
layerIndex
An integer value that specifies the layer to duplicate, starting with 0 (although, to
specify the current layer, pass
–1 here).
howMany An optional integer that specifies how many times to duplicate the layer. If omitted,
the layer is duplicated once.
where An optional argument that specifies where to put the new layer(s) in relation to the
source layer. Acceptable values are
"beginning", "before current", "after current", and
"end"
. If omitted, "before current" is assumed.
Returns
Nothing.
Description
Duplicates a layer.
Example
The following command places three copies of the current layer at the end of the document.
fw.getDocumentDOM().duplicateLayer(-1, 3, "end");
dom.duplicateSelection()
Availability
Fireworks 3.
Usage
dom.duplicateSelection()
Arguments
None.
Returns
Nothing.