Timeline.getlayerproperty(), Timeline.getselectedframes() – Adobe Extending Flash Professional CS4 User Manual

Page 499

Advertising
background image

477

EXTENDING FLASH CS4 PROFESSIONAL

Timeline object

timeline.getLayerProperty()

Availability
Flash MX 2004.

Usage

timeline.getLayerProperty(property)

Parameters

property

A string that specifies the name of the property whose value you want to retrieve. For a list of properties,

see the Property summary for the

Frame object

.

Returns
The value of the specified property. Flash looks at the layer’s properties to determine the type. If all the specified layers
don’t have the same property value, Flash returns

undefined

.

Description
Method; retrieves the specified property’s value for the selected layers.

Example
The following example retrieves the name of the top layer in the current document and displays it in the Output panel:

fl.getDocumentDOM().getTimeline().currentLayer = 0;

var layerName = fl.getDocumentDOM().getTimeline().getLayerProperty("name");

fl.trace(layerName);

timeline.getSelectedFrames()

Availability
Flash MX 2004.

Parameters
None.

Returns
An array containing 3n integers, where n is the number of selected regions. The first integer in each group is the layer
index, the second integer is the start frame of the beginning of the selection, and the third integer specifies the ending
frame of that selection range. The ending frame is not included in the selection.

Description
Method; retrieves the currently selected frames in an array.

Example
With the top layer being the current layer, the following example displays

0,5,10,0,20,25

in the Output panel:

Advertising