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

InDesign Server CS5.5

Class

Asset

 An object library asset.

QuickLinks

addEventListener, extractLabel, getElements, insertLabel, placeAsset, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Library
Asset
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
assetTypeAssetType:
AssetType.IMAGE_TYPE
AssetType.EPS_TYPE
AssetType.PDF_TYPE
AssetType.GEOMETRY_TYPE
AssetType.PAGE_TYPE
AssetType.TEXT_TYPE
AssetType.STRUCTURE_TYPE
AssetType.INDESIGN_FILE_TYPE
r/wThe type of object library asset.
dateDate readonlyThe date and time the Asset was created.
descriptionstring r/wThe description of the Asset.
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
idnumber readonlyThe unique ID of the Asset.
indexnumber readonlyThe index of the Asset within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the Asset.
parentLibrary readonlyThe parent of the Asset (a Library).
propertiesObject r/wA property that allows setting of several properties at the same time.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

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

ParameterTypeDescription
keystringThe key.

Array of Asset 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.

Array of any placeAsset (on: varies)
Places the asset in the specified document or text.

ParameterTypeDescription
onDocument
Text
The document or text object in which to place the asset. Can accept: Document or Text.

void remove ()
Deletes the Asset.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

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

string toSpecifier ()
Retrieves the object specifier.

Used in:

Asset Assets.nextItem (obj: Asset)

Asset Assets.previousItem (obj: Asset)

Return

Array of Asset Asset.getElements ()

Asset Assets.[] (index: number)

Asset Assets.anyItem ()

Array of Asset Assets.everyItem ()

Asset Assets.firstItem ()

Asset Assets.item (index: varies)

Asset Assets.itemByID (id: number)

Asset Assets.itemByName (name: string)

Array of Asset Assets.itemByRange (from: varies, to: varies)

Asset Assets.lastItem ()

Asset Assets.middleItem ()

Asset Assets.nextItem (obj: Asset)

Asset Assets.previousItem (obj: Asset)

Asset Button.store (using: Library[, withProperties: Object])

Asset EPS.store (using: Library[, withProperties: Object])

Asset EPSText.store (using: Library[, withProperties: Object])

Asset FormField.store (using: Library[, withProperties: Object])

Asset Graphic.store (using: Library[, withProperties: Object])

Asset GraphicLine.store (using: Library[, withProperties: Object])

Asset Group.store (using: Library[, withProperties: Object])

Asset Image.store (using: Library[, withProperties: Object])

Asset ImportedPage.store (using: Library[, withProperties: Object])

Asset Library.store (using: Array of varies[, withProperties: Object])

Asset MediaItem.store (using: Library[, withProperties: Object])

Asset Movie.store (using: Library[, withProperties: Object])

Asset MultiStateObject.store (using: Library[, withProperties: Object])

Asset Oval.store (using: Library[, withProperties: Object])

Asset PDF.store (using: Library[, withProperties: Object])

Asset PICT.store (using: Library[, withProperties: Object])

Asset PageItem.store (using: Library[, withProperties: Object])

Asset Polygon.store (using: Library[, withProperties: Object])

Asset Rectangle.store (using: Library[, withProperties: Object])

Asset Sound.store (using: Library[, withProperties: Object])

Asset SplineItem.store (using: Library[, withProperties: Object])

Asset TextFrame.store (using: Library[, withProperties: Object])

Asset WMF.store (using: Library[, withProperties: Object])

Asset XMLElement.store (using: Library[, withProperties: Object])

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