Adobe InDesign CS6 Server (8.0) Object Model JS: MotionPreset

InDesign Server CS6

Class

MotionPreset

 A Motion preset Object.

QuickLinks

addEventListener, duplicate, extractLabel, getElements, insertLabel, remove, removeEventListener, saveACopy, toSource, toSpecifier

Hierarchy

Application | Document
MotionPreset
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
contentsstring r/wMotion preset raw data
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
idnumber readonlyThe unique ID of the MotionPreset.
indexnumber readonlyThe index of the MotionPreset 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 MotionPreset.
parentApplicationDocument readonlyThe parent of the MotionPreset (a Application or Document).
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)

MotionPreset duplicate ([name: string])
Duplicates the motion preset.

ParameterTypeDescription
namestringThe name for the duplicated motion preset. (Optional)

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

ParameterTypeDescription
keystringThe key.

Array of MotionPreset 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 remove ()
Deletes the MotionPreset.

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)

void saveACopy (to: File)
Save a copy of this motion preset to a InDesign motion preset file.

ParameterTypeDescription
toFileThe Flash motion preset file to export to.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

AnimationSetting.preset

Used in:

MotionPreset MotionPresets.nextItem (obj: MotionPreset)

MotionPreset MotionPresets.previousItem (obj: MotionPreset)

Return

MotionPreset AnimationSetting.save (name: string)

MotionPreset Application.loadMotionPreset (from: File)

MotionPreset MotionPreset.duplicate ([name: string])

Array of MotionPreset MotionPreset.getElements ()

MotionPreset MotionPresets.[] (index: number)

MotionPreset MotionPresets.add ([withProperties: Object])

MotionPreset MotionPresets.anyItem ()

Array of MotionPreset MotionPresets.everyItem ()

MotionPreset MotionPresets.firstItem ()

MotionPreset MotionPresets.item (index: varies)

MotionPreset MotionPresets.itemByID (id: number)

MotionPreset MotionPresets.itemByName (name: string)

Array of MotionPreset MotionPresets.itemByRange (from: varies, to: varies)

MotionPreset MotionPresets.lastItem ()

MotionPreset MotionPresets.middleItem ()

MotionPreset MotionPresets.nextItem (obj: MotionPreset)

MotionPreset MotionPresets.previousItem (obj: MotionPreset)

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