Flash CS3 Documentation |
|||
| Extending Flash > Objects > Timeline object | |||
Flash MX 2004.
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.
The following methods are available for the Timeline object:
|
Method |
Description |
|---|---|
|
Adds a motion guide layer above the current layer and attaches the current layer to the newly added guide layer. |
|
|
Adds a new layer to the document and makes it the current layer. |
|
|
Deletes all the contents from a frame or range of frames on the current layer. |
|
|
Converts a keyframe to a regular frame and deletes its contents on the current layer. |
|
|
Converts frames to blank keyframes on the current layer. |
|
|
Converts a range of frames to keyframes (or converts the selection if no frames are specified) on the current layer. |
|
|
Copies a range of frames on the current layer to the clipboard. |
|
|
Copies motion on selected frames, either from a motion tween or from frame-by-frame animation, so it can be applied to other frames. |
|
|
Copies motion on selected frames, either from a motion tween or from frame-by-frame animation, to the clipboard as ActionScript 3.0 code. |
|
|
Sets the frame.tweenType property to |
|
|
Cuts a range of frames on the current layer from the timeline and saves them to the clipboard. |
|
|
Deletes a layer. |
|
|
Expands or collapses the specified folder or folders. |
|
|
Finds an array of indexes for the layers with the given name. |
|
|
Retrieves the specified property's value for the selected frames. |
|
|
Retrieves the specified property's value for the selected layers. |
|
|
Retrieves the currently selected frames in an array. |
|
|
Retrieves the zero-based index values of the currently selected layers. |
|
|
Inserts a blank keyframe at the specified frame index; if the index is not specified, inserts the blank keyframe by using the playhead/selection. |
|
|
Inserts the specified number of frames at the given frame number. |
|
|
Inserts a keyframe at the specified frame. |
|
|
Pastes the range of frames from the clipboard into the specified frames. |
|
|
Pastes the range of motion frames retrieved by |
|
|
Deletes the frame. |
|
|
Moves the first specified layer before or after the second specified layer. |
|
|
Reverses a range of frames. |
|
|
Selects all the frames in the current timeline. |
|
|
Sets the property of the Frame object for the selected frames. |
|
|
Sets the specified property on all the selected layers to a specified value. |
|
|
Selects a range of frames in the current layer or sets the selected frames to the selection array passed into this method. |
|
|
Sets the layer to be selected; also makes the specified layer the current layer. |
|
|
Shows the layer masking during authoring by locking the mask and masked layers. |
The following methods are available for the Timeline object:
|
Property |
Description |
|---|---|
|
A zero-based index for the frame at the current playhead location. |
|
|
A zero-based index for the currently active layer. |
|
|
Read-only; an integer that represents the number of frames in this timeline's longest layer. |
|
|
Read-only; an integer that represents the number of layers in the specified timeline. |
|
|
Read-only; an array of layer objects. |
|
|
A string that represents the name of the current timeline. |
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00004516.html