MarkerValue object

newMarkerValue(comment,chapter,url,frameTarget,cuePointName,params)

Description

The MarkerValue object represents a layer marker, which associates a comment, and optionally a chapter reference point, Web-page link, or Flash Video cue point with a particular point in a layer. Create it with the constructor; all arguments except comment are optional. All arguments are strings that set in the corresponding attributes of the returned MarkerValue object, except params. This is an array containing key-value pairs., which can then be accessed with the getParameters() and setParameters() methods. A script can set any number of parameter pairs; the order does not reflect the order displayed in the application.

To associate a marker with a layer, set the MarkerValue object in the Marker AE property of the layer:
“Using markers” in After Effects Help.

Attributes

Attribute Reference Description
comment “MarkerValue comment attribute” A comment on the associated layer.
du r at i on “MarkerValue duration attribute” The amount of time represented by the marker.
chapter “MarkerValue chapter attribute” A chapter link reference point for the associated layer.
cuePointName “MarkerValue cuePointName attribute” The Flash Video cue point name.
eventCuePoint “MarkerValue eventCuePoint attribute” Whether the Flash Video cue point is for an event or navigation.
url “MarkerValue url attribute” A URL for Web page to be associated with the layer.
frameTarget “MarkerValue frameTarget attribute” A specific frame target within the Web page specified by ur l.

Methods

Method Reference Description
getParameters() “MarkerValue getParameters() method” Retrieves the key-value pairs associated with the marker value.
setParameters() “MarkerValue setParameters() method” Sets the key-value pairs associated with the marker value.

Examples

• To set a marker that says “Fade Up” at the 2 second mark:
var myMarker = new MarkerValue(“Fade Up”);
myLayer.property(“Marker”).setValueAtTime(2, myMarker);
• To get comment values from a particular marker:
var commentOfFirstMarker = app.project.item(1).layer(1).property(“Marker”).keyValue(1).comment;
var commentOfMarkerAtTime4 =

app.project.item(1).layer(1).property(“Marker”).valueAtTime(4.0,true).comment
var markerProperty = app.project.item(1).layer(1).property(“Marker”);
var markerValueAtTimeClosestToTime4 =

markerProperty.keyValue(markerProperty.nearestKeyIndex(4.0));
var commentOfMarkerClosestToTime4 = markerValueAtTimeClosestToTime4.comment;

Other Tags

Posted in MarkerValue object and tagged , , , , , , , , , , , , , , , , .