Adobe InDesign CS5.5 (7.5) Object Model JS: Sounds

InDesign CS5.5

Class

Sounds

 A collection of sound clips.

See also Sound.

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 [] (index: number)
Returns the Sound with the specified index.

ParameterTypeDescription
indexnumberThe index.

Sound add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])
Creates 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
The location at which to insert the Sound relative to the reference object or within the container object. (Optional) (default: LocationOptions.UNKNOWN)
referenceDocument
Layer
MasterSpread
Page
PageItem
Spread
The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (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: varies)
Returns the Sound with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer 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: varies, to: varies)
Returns the Sounds within the specified range.

ParameterTypeDescription
fromLong Integer
Sound
String
The Sound, index, or name at the beginning of the range. Can accept: Sound, Long Integer or String.
toLong Integer
Sound
String
The Sound, index, or name at the end of the range. Can accept: Sound, Long Integer 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

GraphicLine.sounds

Oval.sounds

Page.masterPageItems

Polygon.sounds

Rectangle.sounds

SplineItem.sounds

Jongware, 28-Apr-2012 v3.0.3iContents :: Index