Timeline.setselectedlayers() - MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual

Flash javascript dictionary
Hide thumbs Also See for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY:
Table of Contents

Advertisement

bReplaceCurrentSelection
selected frames to be deselected before the specified frames are selected. The default value is
selectionList
Returns
Nothing.
Description
Method; selects a range of frames in the current layer or sets the selected frames to the selection
array passed into this method.
Example
The following example selects the top layer, Frame 1, up to, but not including, Frame 10; it then
adds Frame 12 up to, but not including, Frame 15 on the same layer to the current selection
(remember that index values are different from frame number values):
fl.getDocumentDOM().getTimeline().setSelectedFrames(0, 9);
fl.getDocumentDOM().getTimeline().setSelectedFrames(11, 14, false);
The following example first stores the array of selected frames in the
variable, and then uses the array later in the code to reselect those frames after a command or user
interaction has changed the selection:
var savedSelectionList =
fl.getDocumentDOM().getTimeline().getSelectedFrames();
// do something that changes the selection
fl.getDocumentDOM().getTimeline().setSelectedFrames(savedSelectionList);
The following example selects the top layer, Frame 1, up to, but not including, Frame 10, then
adds Frame 12, up to, but not including, Frame 15, on the same layer to the current selection:
fl.getDocumentDOM().getTimeline().setSelectedFrames([0, 0, 9]);
fl.getDocumentDOM().getTimeline().setSelectedFrames([0, 11, 14], false);

timeline.setSelectedLayers()

Availability
Flash MX 2004.
Usage
timeline.setSelectedLayers(index [, bReplaceCurrentSelection])
Parameters
A zero-based index for the layer to select.
index
bReplaceCurrentSelection
replace the current selection;
default value is
true
Returns
Nothing.
A Boolean value that, if it is set to
An array of three integers, as returned by
A Boolean value that, if it is set to
causes the method to extend the current selection. The
false
. This parameter is optional.
, causes the currently
true
timeline.getSelectedFrames()
savedSelectionList
, causes the method to
true
Timeline object
.
true
.
347

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents