Asset

An object library asset.

Methods:

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

Objects:

AssetType, Boolean, Date, EventListeners, Events, Number, Object, String

Property Listing

Property

Type

Access

Description

assetType

AssetType

AssetType.EPS_TYPE

AssetType.GEOMETRY_TYPE

AssetType.IMAGE_TYPE

AssetType.INDESIGN_FILE_TYPE

AssetType.PAGE_TYPE

AssetType.PDF_TYPE

AssetType.STRUCTURE_TYPE

AssetType.TEXT_TYPE

read/write

The type of object library asset.

date

Date

readonly

The date and time the Asset was created.

description

String

read/write

The description of the Asset.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

id

Number

readonly

The unique ID of the Asset.

index

Number

readonly

The index of the Asset within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

name

String

read/write

The name of the Asset.

parent

Library

readonly

The parent of the Asset (a Library).

properties

Object

read/write

A property that allows setting of several properties at the same time.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

Asset getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

Varies placeAsset (on:Varies Document Text)

Places the asset in the specified document or text.

Parameter

Type

Description

on

Document

Text

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

undefined remove ()

Deletes the Asset.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined select ([existingSelection:SelectionOptions=SelectionOptions])

Selects the object.

Parameter

Type

Description

existingSelection

SelectionOptions

SelectionOptions.ADD_TO

SelectionOptions.REMOVE_FROM

SelectionOptions.REPLACE_WITH

SelectionOptions.SET_KEY

The selection status of the Asset in relation to previously selected objects. (Optional)

(default: SelectionOptions.REPLACE_WITH)

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Return

Asset.getElements()

Assets.anyItem()

Assets.everyItem()

Assets.nextItem()

Assets.previousItem()

Assets.itemByID()

Assets.item()

Assets.[]()

Assets.itemByName()

Assets.itemByRange()

Assets.firstItem()

Assets.lastItem()

Assets.middleItem()

Button.store()

CheckBox.store()

ComboBox.store()

EPS.store()

EPSText.store()

EndnoteTextFrame.store()

FormField.store()

Graphic.store()

GraphicLine.store()

Group.store()

HtmlItem.store()

Image.store()

ImportedPage.store()

ListBox.store()

MediaItem.store()

Movie.store()

MultiStateObject.store()

Oval.store()

PDF.store()

PICT.store()

PageItem.store()

Polygon.store()

RadioButton.store()

Rectangle.store()

SignatureField.store()

Sound.store()

SplineItem.store()

TextBox.store()

TextFrame.store()

WMF.store()

XMLElement.store()

Library.store()