Adobe InDesign CS2 (4.0) Object Model JS: Sounds

InDesign CS2

Class

Sounds

 A collection of sound clips.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Sound add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])
Create a new Sound

ParameterTypeDescription
layerLayerThe layer on which to create the Sound. (Optional)
atLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
Location (Optional) (default: LocationOptions.UNKNOWN)
referenceDocument
Layer
MasterSpread
Page
Spread
Before/after this Sound or at the beginning/end of this Document, Spread, Master Spread, Page or Layer. Can accept: Document, Spread, MasterSpread, Page or Layer. (Optional)
withPropertiesObjectInitial values for properties of the new Sound (Optional)

Sound anyItem ()
Returns any Sound in the collection.

number count ()
Displays the number of elements in the Sound.

Array of Sound everyItem ()
Returns every Sound in the collection.

Sound firstItem ()
Returns the first Sound in the collection.

Sound item (index: any)
Returns the Sound with the specified index or name.

ParameterTypeDescription
indexLong
String
The index or name. Can accept: Long or String.

Sound itemByID (id: number)
Returns the Sound with the specified ID.

ParameterTypeDescription
idnumberThe ID.

Sound itemByName (name: string)
Returns the Sound with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Sound itemByRange (from: any, to: any)
Returns the Sounds within the specified range.

ParameterTypeDescription
fromLong
Sound
String
The Sound, index, or name at the beginning of the range. Can accept: Sound, Long or String.
toLong
Sound
String
The Sound, index, or name at the end of the range. Can accept: Sound, Long or String.

Sound lastItem ()
Returns the last Sound in the collection.

Sound middleItem ()
Returns the middle Sound in the collection.

Sound nextItem (obj: Sound)
Returns the Sound whose index follows the specified Sound in the collection.

ParameterTypeDescription
objSoundThe Sound whose index comes before the desired Sound.

Sound previousItem (obj: Sound)
Returns the Sound with the index previous to the specified index.

ParameterTypeDescription
objSoundThe index of the Sound that follows the desired Sound.

string toSource ()
Generates a string which, if executed, will return the Sound.

Element of

Oval.sounds

Page.masterPageItems

PageItem.sounds

Polygon.sounds

Rectangle.sounds

Used in:

Asset Library.store (using: Array of any)

Jongware, 27-Jun-2010 v3.0.3dContents :: Index