Timeline.clearframes() – Adobe Extending Flash Professional CS5 User Manual
Page 488
466
EXTENDING FLASH PROFESSIONAL
Timeline object
Last updated 5/2/2011
Usage
timeline.addNewLayer([name] [, layerType [, bAddAbove]])
Parameters
name
A string that specifies the name for the new layer. If you omit this parameter, a new default layer name is assigned
to the new layer (“Layer n,” where n is the total number of layers). This parameter is optional.
layerType
A string that specifies the type of layer to add. If you omit this parameter, a “Normal” type layer is created.
This parameter is optional. Acceptable values are
"normal"
,
"guide"
,
"guided"
,
"mask"
,
"masked"
, and
"folder"
.
bAddAbove
A Boolean value that, if set to
true
(the default), causes Flash to add the new layer above the current layer;
false
causes Flash to add the layer below the current layer. This parameter is optional.
Returns
An integer value of the zero-based index of the newly added layer.
Description
Method; adds a new layer to the document and makes it the current layer.
Example
The following example adds a new layer to the timeline with a default name generated by Flash:
fl.getDocumentDOM().getTimeline().addNewLayer();
The following example adds a new folder layer on top of the current layer and names it
Folder1
:
fl.getDocumentDOM().getTimeline().addNewLayer("Folder1", "folder", true);
timeline.clearFrames()
Availability
Flash MX 2004.
Usage
timeline.clearFrames([startFrameIndex [, endFrameIndex]])
Parameters
startFrameIndex
A zero-based index that defines the beginning of the range of frames to clear. If you omit
startFrameIndex, the method uses the current selection. This parameter is optional.
endFrameIndex
A zero-based index that defines the end of the range of frames to clear. The range goes up to, but does
not include, endFrameIndex. If you specify only startFrameIndex, endFrameIndex defaults to the value of
startFrameIndex. This parameter is optional.
Returns
Nothing.
Description
Method; deletes all the contents from a frame or range of frames on the current layer.