|
Flash CS4 Resources |
presetPanel.findItemIndex()AvailabilityFlash CS4 Professional. UsagepresetPanel.findItemIndex([presetName]) Parameters
ReturnsAn
integer that represents the index of the specified preset in the presetPanel.items array.
If you don’t pass a value for presetName, the index of the
currently specified preset is returned. This method returns ‑1 in
the following situations:
DescriptionMethod; returns an integer that represents the index location of an item in the Motion Presets panel. ExampleThe following code displays the index value and full pathname of the currently selected preset: // Select one preset in the Motions Preset panel before running this code var selectedPreset = fl.presetPanel.findItemIndex(); fl.trace(selectedPreset); fl.trace(fl.presetPanel.items[selectedPreset].path); |