beautypg.com

Timeline.pastemotion(), Then use, To apply the motion to other frames – Adobe Extending Flash Professional CS5 User Manual

Page 509

background image

487

EXTENDING FLASH PROFESSIONAL

Timeline object

Last updated 5/2/2011

Usage

timeline.pasteLayers([layerIndex])

Parameters

layerIndex

Optional. A zero-based index that specifies the layer above which the layers on the clipboard are pasted.

If you omit layerIndex, the method uses the current selection.

Returns
Integer indicating the lowest layer index of the layers that were pasted.

Description
Method; Paste layers that have been previously cut or copied above the currently selected layer, or above the specified
layer index. If the specified layer is a folder layer, the layers are pasted into the folder. Returns the lowest layer index
of the layers that were pasted. This action does not affect the system clipboard.

Example
The following example pastes the layers from the layer clipboard above the currently selected layer in the Timeline:

fl.getDocumentDOM().getTimeline().pasteLayers();

The following example pastes the layers from the layer clipboard above layer index 2:

fl.getDocumentDOM().getTimeline().pasteLayers(2);

See also

timeline.cutLayers()

,

timeline.copyLayers()

,

timeline.duplicateLayers()

timeline.pasteMotion()

Availability
Flash CS3 Professional.

Usage

timeline.pasteMotion()

Parameters
None.

Returns
Nothing.

Description
Method; pastes the range of motion frames retrieved by

timeline.copyMotion()

to the Timeline. If necessary,

existing frames are displaced (moved to the right) to make room for the frames being pasted.

Example
The following example pastes the motion on the clipboard to the currently selected frame or playhead location,
displacing that frame to the right of the pasted frames:

This manual is related to the following products: