Timeline object
327
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.
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.
Содержание FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Страница 1: ...Flash JavaScript Dictionary ...
Страница 16: ...16 Contents ...
Страница 40: ...40 Chapter 2 Top level functions ...
Страница 368: ...368 Chapter 3 Objects ...
Страница 386: ...386 Chapter 4 C Level Extensibility ...