Adobe InDesign CS2 (4.0) Object Model JS: Sound

InDesign CS2

Class

Sound

 A sound clip.

QuickLinks

bringForward, bringToFront, detach, duplicate, extractLabel, fit, getElements, insertLabel, markup, move, override, remove, removeOverride, resetScaling, resize, select, sendBackward, sendToBack, store, toSource, toSpecifier

Hierarchy

Oval | PageItem | Polygon | Rectangle
Sound
Image | Link

Properties

PropertyTypeAccessDescription
associatedXMLElementXMLItem readonlyThe XML element associated with the Sound.
descriptionstring r/wThe description of the Sound.
doNotPrintPosterbool r/wIf true, the sound poster does not print with the document.
embedInPDFbool r/wIf true, the file is embedded in the PDF. If false, the file is linked to the PDF. Note: To embed movie files, acrobat compatibility must be acrobat 6 or higher.
filePathFile r/wThe full path to the file.
geometricBounds Array of Measurement Unit (Number or String) r/wThe bounds of the Sound excluding the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box.
horizontalScalenumber r/wThe horizontal scaling applied to the text as a percentage of its current size. (Range: 1 to 1000)
idnumber readonlyThe unique ID of the Sound.
imagesImages readonlyA collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).
indexnumber readonlyThe index of the Sound within its containing object.
itemLayerLayer r/wThe layer that the Sound is on.
itemLinkLink readonlyThe source file of the link.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the Sound.
overriddenbool readonlyIf true, the object originated on a master spread and was overridden. If false, the object either originated on a master spread and was not overridden, or the object did not originate on a master page.
overriddenMasterPageItemGraphicGuide
Movie
PageItem
Sound
readonlyAn object that originated on a master page and has been overridden. Can return: PageItem, Guide, Graphic, Movie or Sound.
parentOval
PageItem
Polygon
Rectangle
readonlyThe parent of the Sound (a PageItem, Oval, Rectangle or Polygon).
playOnPageTurnbool r/wIf true, the movie plays automatically when a user views the page that contains the movie poster in the PDF document.
posterFilestring r/wThe poster file.
propertiesObject r/wA property that allows setting of several properties at the same time.
soundPosterTypeSoundPosterTypes:
SoundPosterTypes.NONE
SoundPosterTypes.STANDARD
SoundPosterTypes.PROXY_IMAGE
r/wThe type of sound poster.
verticalScalenumber r/wThe vertical scaling applied to the text as a percentage of its current size. (Range: 1 to 1000)
visibleBounds Array of Measurement Unit (Number or String) r/wThe bounds of the Sound including the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box.

Methods

Instances

void bringForward ()
Brings the Sound forward one level in its layer.

void bringToFront ()
Brings the Sound to the front.

void detach ()
Detaches an overridden master page item from the master page.

Sound duplicate ()
Duplicates the Sound.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

void fit (given: FitOptions)
Applies the specified fit option to content in a frame.

ParameterTypeDescription
givenFitOptions:
FitOptions.CONTENT_TO_FRAME
FitOptions.CENTER_CONTENT
FitOptions.PROPORTIONALLY
FitOptions.FRAME_TO_CONTENT
FitOptions.FILL_PROPORTIONALLY
The fit option to use.

Array of Object getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void markup (using: XMLElement)
Associates the page item with the specified XML element while preserving existing content.

ParameterTypeDescription
usingXMLElementThe XML element.

void move ([to: any][, by: Array of Measurement Unit (Number or String)][, transformingContent: bool=true])
Move Page Item to a new location. One of the 'To' or 'By' parameters is required.

ParameterTypeDescription
to Array of 2 Units
Layer
Page
Spread
The new location of the object. Can accept: Array of 2 Units, Spread, Page or Layer. (Optional)
by Array of Measurement Unit (Number or String)Amount by which to move the object relative to its current position (Optional)
transformingContentboolIf true then both the object and items within it are moved (Optional) (default: true)

any override (destinationPage: Page)
Overrides a master page item and places the item on the document page as a new object.

ParameterTypeDescription
destinationPagePageThe document page that contains the master page item to override.

void remove ()
Deletes the Sound.

void removeOverride ()
Removes the override from a previously overridden master page item.

void resetScaling ()
Resets the Sound's scaling to 100%. Note: This does not change the size of the Sound. Instead, it makes the current size of the Sound the basis for future scaling.

void resize ([horizontalScale: number][, verticalScale: number][, around: any][, consideringCurrentScale: bool=false][, transformingContent: bool=true][, consideringParentsScale: bool=false])
Resize the page item. You must specify either horizontal scale or vertical scale or both.

ParameterTypeDescription
horizontalScalenumberThe percentage of horizontal scale (Optional)
verticalScalenumberThe percentage of vertical scale (Optional)
aroundAnchorPoint
Array of 2 Units
The point to scale around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional)
consideringCurrentScaleboolIf true then the object's current scale and new scale will be combined. If false then the new value is absolute. The default value is false. (Optional) (default: false)
transformingContentboolIf true then both the object and items within it are scaled (Optional) (default: true)
consideringParentsScaleboolIf true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread. (Optional) (default: false)

void select ([existingSelection: SelectionOptions=SelectionOptions.REPLACE_WITH])
Selects the object.

ParameterTypeDescription
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE_WITH
The selection status of the Sound in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH)

void sendBackward ()
Sends the Sound back one level in its layer.

void sendToBack ()
Sends the Sound to the back.

Asset store (using: Library)
Store a page item in a library

ParameterTypeDescription
usingLibraryThe library in which to store

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Button.overriddenMasterPageItem

EPS.overriddenMasterPageItem

FormField.overriddenMasterPageItem

Graphic.overriddenMasterPageItem

GraphicLine.overriddenMasterPageItem

Group.overriddenMasterPageItem

Guide.overriddenMasterPageItem

Image.overriddenMasterPageItem

Link.parent

Movie.overriddenMasterPageItem

Oval.overriddenMasterPageItem

PDF.overriddenMasterPageItem

PICT.overriddenMasterPageItem

PageItem.overriddenMasterPageItem

Polygon.overriddenMasterPageItem

Rectangle.overriddenMasterPageItem

Sound.overriddenMasterPageItem

SoundBehavior.soundItem

TextFrame.overriddenMasterPageItem

WMF.overriddenMasterPageItem

Used in:

array of Sound Sounds.itemByRange (from: any, to: any)

Sound Sounds.nextItem (obj: Sound)

Sound Sounds.previousItem (obj: Sound)

XMLElement XMLElements.add (markupTag: any[, xmlContent: any][, withProperties: Object])

Return

Sound Sound.duplicate ()

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

Sound Sounds.anyItem ()

Array of Sound Sounds.everyItem ()

Sound Sounds.firstItem ()

Sound Sounds.item (index: any)

Sound Sounds.itemByID (id: number)

Sound Sounds.itemByName (name: string)

Array of Sound Sounds.itemByRange (from: any, to: any)

Sound Sounds.lastItem ()

Sound Sounds.middleItem ()

Sound Sounds.nextItem (obj: Sound)

Sound Sounds.previousItem (obj: Sound)

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