beautypg.com

Timeline.name, Timeline.pasteframes() – Adobe Extending Flash Professional CS4 User Manual

Page 504

background image

482

EXTENDING FLASH CS4 PROFESSIONAL

Timeline object

Usage

timeline.layers

Description
Read-only property; an array of layer objects.

Example
The following example uses the

currentLayers

variable to store the array of layer objects in the current document:

var currentLayers = fl.getDocumentDOM().getTimeline().layers;

timeline.name

Availability
Flash MX 2004.

Usage

timeline.name

Description
Property; a string that specifies the name of the current timeline. This name is the name of the current scene, screen
(slide or form), or symbol that is being edited.

Example
The following example retrieves the first scene name:

var sceneName = fl.getDocumentDOM().timelines[0].name;

The following example sets the first scene name to

FirstScene

:

fl.getDocumentDOM().timelines[0].name = "FirstScene";

timeline.pasteFrames()

Availability
Flash MX 2004.

Usage

timeline.pasteFrames([startFrameIndex [, endFrameIndex]])

Parameters

startFrameIndex

A zero-based index that specifies the beginning of a range of frames to paste. If you omit

startFrameIndex, the method uses the current selection. This parameter is optional.

endFrameIndex

A zero-based index that specifies the frame at which to stop pasting frames. The method pastes up

to, but not including, endFrameIndex. If you specify only startFrameIndex, endFrameIndex defaults to the
startFrameIndex value. This parameter is optional.