Find Out How

Print Friendly Version

 

Band, Track, Chain, Checkpoint, and Script Objects

These objects represent Band, Track, Target, Chain, Checkpoint, Delay, or Script objects, respectively, in the Composition.

Band, Track, Chain, Checkpoint, and Script Properties

All of the following Band, Track, Target, Chain, Checkpoint, and Script properties are read-only.

  • name (string)

The name of this item. An item’s name can be changed by setting this property, with the following restrictions:

  • The name can only be changed before any activity has occurred for the given item. The item cannot have started playing yet, cannot have started repeating yet, and no other actions for it can have occurred yet (e.g. no other properties of it can have been set).
  • The name specified by the script must, of course, be a legal item name (255 chars max, no square brackets or slashes), and must not be the same name as another item in the same container.
  • parent (object)
The parent object of this item.
propertyList (object)
A PropertyList object that allows access to all of the Custom Properties contained in this object.
  • systempropertyList (read only – object)

A SystemPropertyList object that allows access to all of the System Properties contained in this object.

  • type (string)

A string that indicates the type of this object.

  • children (array of objects)

An array of objects representing the children of this object, if any.  Null if the object has no children.

  • index (read only – integer)

Returns the position (zero-based index) of this item’s parent’s array of children.

  • nextItem (read only – object)

Returns the next item after this one in this item’s parent’s array of children, or null if this is the last item.  In other words, returns the next sibling in the object hierarchy.  Equivalent to:
item.parent.children(item.index + 1)
where "item" is the current item.

  • previousItem (read only – object)

Returns the previous item before this one in this item’s parent’s array of children, or null of this is the first item.  In other words, returns the next sibling in the object hierarchy.  Equivalent to:
item.parent.children(item.index - 1)
where "item" is the current item.

  • REPEAT_TIMING_PARALLEL (read only – int)

A constant that can be passed in calls to the "setRepeat" method.  (See the description of the "setRepeat" method.)

  • REPEAT_TIMING_SERIAL (read only – int)

A constant that can be passed in calls to the "setRepeat" method.  (See the description of the "setRepeat" method.)

  • REPEAT_TYPE_COUNT_CONSTANT (read only – int)

A constant that can be passed in calls to the "setRepeat" method.  (See the description of the "setRepeat" method.)

  • REPEAT_DISTRIBUTION_CONSTANT (read only – int)

A constant that can be passed in calls to the "setRepeat" method.  (See the description of the "setRepeat" method.)

Band, Track, Chain, Checkpoint, and Script Methods

getChild Method

Returns a specific child object by name, or null if there is no child with the specified name.





object getChild(string childName)

getItemViaPath

Given a type of item and the path to that item in the Composition object hierarchy, returns the object in the hierarchy that represents that item.


object getItemViaPath(string itemType, string path)

The "itemType" parameter value indicates the type of item (not case sensitive):

  • "Composition"
  • "Band"
  • "Track"
  • "Clip"
  • "Chain"
  • "Message"
  • "Browser Action"
  • "Delay"
  • "Checkpoint"
  • "Target"

The "path" parameter contains a path as specified for In Situ Substitution Specifications. The path can be relative to the current item (for example to specify another item in the same Clip, the Band, Track and Clip portions of the path can be omitted).

clearRepeat Method

Removes any current repeating specification from this item (so that it will play exactly once).


void clearRepeat()

setRepeat Method

Sets a new repeating specification for this item.

The "timingType" parameter indicates which type of repeat timing is to be used.  It must be one of the following values:

  • REPEAT_TIMING_PARALLEL
  • REPEAT_TIMING_SERIAL
  • The "repeatType" parameter indicates what sort of value is contained in the "control" parameter.  Currently the "repeatType" parameter must always be set to "REPEAT_TYPE_COUNT_CONSTANT".
  • The "control" parameter is the count of the number of repeats to be performed.  If the value is less than or equal to zero, the item will not be played at all.
  • The "distributionType" parameter indicates what sort of value is contained in the "distribution" parameter.  Currently the "distributionType" parameter must always be set to "REPEAT_DISTRIBUTION_CONSTANT".
  • The "distribution" parameter is a time length, in milliseconds, by which the start of each repeat is to be offset from the start of the prior repeat.  This value only applies to parallel repeats, and must be set to zero for serial repeats.

void setRepeat(int timingType, intRepeat Type, long control, int distributionType, long distribution)