Parameters
A string that specifies the name for the new layer. If you omit this parameter, a new
name
default layer name is assigned to the new layer ("Layer n," where n is the total number of layers).
This parameter is optional.
A string that specifies the type of layer to add. If you omit this parameter, a
layerType
"Normal" type layer is created. This parameter is optional.
A Boolean value that, if set to
bAddAbove
above the current layer;
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
If you omit
startFrameIndex
endFrameIndex
range goes up to, but does not include,
endFrameIndex
Returns
Nothing.
Description
Method; deletes all the contents from a frame or range of frames on the current layer.
causes Flash to add the layer below the current layer. This
false
A zero-based index that defines the beginning of the range of frames to clear.
, the method uses the current selection. This parameter is optional.
A zero-based index that defines the end of the range of frames to clear. The
defaults to the value of
(the default), causes Flash to add the new layer
true
. If you specify only
endFrameIndex
. This parameter is optional.
startFrameIndex
,
startFrameIndex
Timeline object
327
Need help?
Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?
Questions and answers