Timeline.copymotion() – Adobe Extending Flash Professional CS5 User Manual
Page 492
470
EXTENDING FLASH PROFESSIONAL
Timeline object
Last updated 5/2/2011
Usage
timeline.copyLayers([startLayerIndex [, endLayerIndex]])
Parameters
startLayerIndex
Optional. A zero-based index that specifies the beginning of the range of layers to copy. If you omit
startLayerIndex
, the method uses the current selection.
endLayerIndex
Optional. A zero-based index that specifies the layer at which to stop copying. The range of layers to
copy goes up to and including
endLayerIndex
. If you specify only
startLayerIndex
, then
endLayerIndex
defaults
to the value of
startLayerIndex
.
Returns
Nothing.
Description
Method; Copies 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 copy.
Example
The following example copies the layers from index 2 to index 7 in the Timeline:
fl.getDocumentDOM().getTimeline().copyLayers(2, 7);
See also
timeline.copyMotion()
Availability
Flash CS3 Professional.
Usage
timeline.copyMotion()
Parameters
None.
Returns
Nothing.
Description
Method; copies motion on selected frames, either from a motion tween or from frame-by-frame animation. You can
then use
to apply the motion to other frames.
To copy motion as text (code) that you can paste into a script, see
Example
The following example copies the motion from the selected frame or frames: