Timeline.deletelayer() – Adobe Extending Flash Professional CS5 User Manual
Page 497
475
EXTENDING FLASH PROFESSIONAL
Timeline object
Last updated 5/2/2011
endLayerIndex
Optional. A zero-based index that specifies the layer at which to stop cutting. The range of layers to
cut goes up to and including
endLayerIndex
. If you specify only
startLayerIndex
, then
endLayerIndex
defaults
to the value of
startLayerIndex
.
Returns
Nothing.
Description
Method; Cuts the layers that are currently selected in the Timeline, or the layers in the specified range. Optional
arguments can be provided in order to specify a layer or range of layers to cut.
Example
The following example cuts the layers from index 2 to index 7 in the Timeline:
fl.getDocumentDOM().getTimeline().cutLayers(2, 7);
See also
timeline.deleteLayer()
Availability
Flash MX 2004.
Usage
timeline.deleteLayer([index])
Parameters
index
A zero-based index that specifies the layer to be deleted. If there is only one layer in the timeline, this method
has no effect. This parameter is optional.
Returns
Nothing.
Description
Method; deletes a layer. If the layer is a folder, all layers within the folder are deleted. If you do not specify the layer
index, Flash deletes the currently selected layers.
Example
The following example deletes the second layer from the top:
fl.getDocumentDOM().getTimeline().deleteLayer(1);
The following example deletes the currently selected layers:
fl.getDocumentDOM().getTimeline().deleteLayer();