beautypg.com

Chapter 45: timeline object, Timeline object, Adds a new scene – Adobe Extending Flash Professional CS5 User Manual

Page 485: Deletes the current scene, And if the deleted, To select a frame or frames, such as

background image

463

Last updated 5/2/2011

Chapter 45: Timeline object

Availability
Flash MX 2004.

Description
The Timeline object represents the Flash timeline, which can be accessed for the current document by using

fl.getDocumentDOM().getTimeline()

. This method returns the timeline of the current scene or symbol that is

being edited.

When you work with scenes, each scene’s timeline has an index value, and can be accessed for the current document
by

fl.getDocumentDOM().timelines[i]

. (In this example,

i

is the index of the value of the timeline.)

When you work with frames by using the methods and properties of the Timeline object, remember that the frame
value is a zero-based index (not the actual frame number in the sequence of frames in the timeline). That is, the first
frame has a frame index of 0.

Method summary
The following methods are available for the Timeline object:

Method

Description

timeline.addMotionGuide()

Adds a motion guide layer above the current layer and attaches the
current layer to the newly added guide layer.

timeline.addNewLayer()

Adds a new layer to the document and makes it the current layer.

timeline.clearFrames()

Deletes all the contents from a frame or range of frames on the current
layer.

timeline.clearKeyframes()

Converts a keyframe to a regular frame and deletes its contents on the
current layer.

timeline.convertToBlankKeyframes()

Converts frames to blank keyframes on the current layer.

timeline.convertToKeyframes()

Converts a range of frames to keyframes (or converts the selection if no
frames are specified) on the current layer.

timeline.copyFrames()

Copies a range of frames on the current layer to the clipboard.

timeline.copyLayers()

Copies a range of Timeline layers to the clipboard.

timeline.copyMotion()

Copies motion on selected frames, either from a motion tween or from
frame-by-frame animation, so it can be applied to other frames.

timeline.copyMotionAsAS3()

Copies motion on selected frames, either from a motion tween or from
frame-by-frame animation, to the clipboard as ActionScript 3.0 code.

timeline.createMotionObject()

Creates a new motion object at a designated start and end frame.

timeline.createMotionTween()

Sets the

frame.tweenType

property to

motion

for each selected

keyframe on the current layer, and converts each frame’s contents to a
single symbol instance if necessary.

timeline.cutFrames()

Cuts a range of frames on the current layer from the timeline and saves
them to the clipboard.

timeline.cutLayers()

Cuts a range of Timeline layers and saves them to the clipboard.

This manual is related to the following products: