Browser Action Object

Document created by DPM Admin Employee on Jul 21, 2017
Version 1Show Document
  • View in full screen mode

Represents a Browser Action within the Composition.

Browser Action Properties

  • 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 this item. It cannot have been started playing yet, cannot have started repeating yet, no other actions for it can have occurred yet (no other properties of it can have been set).

The name must 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 (read only – object)

The parent Clip.

  • propertyList (read only – object)

A PropertyList object that allows access to all of the Custom Properties contained in this Browser Action.

  • systemPropertyList (read only – object)

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

  • type (read only – string)

The string “Browser Action”.

  • children (read only – array of objects)

Always null.

  • 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 of 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.

  • forEachValue (read only – string, number, date/time, or null)

If this item is repeating due to a “for-each” repeat, this property contains the for-each value associated with this instance of the object. This will be a value in the array used for the for-each.

If this item is not repeating due to a “for-each” repeat, this property will be null.

  • repeatIndex (read only – integer)

An integer value that represents the “repeat index” of this item if it repeats, according to the context in which the current script is executing. The first repeat starts at index zero. The value is -1 if the current item does not repeat or has a repeat count of one (in other words, it is -1 if it doesn’t actually repeat).

  • playNumber (read only – integer)

An integer value that represents the “play ordinal number” of this item. Starting with the number 0, each play is assigned a unique number. The numbers are contiguous (no gaps).

Play number sequences are maintained within the item’s parent only. For example, if a p

  • playNumber (read only – integer)

An integer value that represents the “play ordinal number” of this item. Starting with the number 0, each play is assigned a unique number. The numbers are contiguous (no gaps).

Play number sequences are maintained within the item’s parent only. For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats. The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

arent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

 

An item will only have a non-zero play number if it repeats. The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

  • playNumberBeforeRenewal (read only – integer)

If this item repeats in parallel with the “Renew parallel repeats” option enabled, this is an integer value that is the “playNumber” value of the original parallel repeat for this item if it has been renewed because a prior parallel repeat ended. If this is the original parallel repeat, the value of playNumberBeforeRenewal will be equal to the value of playNumber. If this item does not repeat in parallel, the value will be zero.

For example, if parallel repeat number 5 of the item ends, but the Renew parallel repeats checkbox is enabled, the ending repeat will be replaced with a new, replacement repeat. The new repeat will have new repeatIndex and playNumber values (according to how many other repeats have already occurred). However, the playNumberBeforeRenewal value will still be 5 in this example.

This property is always 0 for Composition, Checkpoint, Delay, and Target.

  • target (read only – Target object)

The Target object for this Browser Action. Can be null.

  • REPEAT_TIMING_PARALLEL (read only – integer)

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

  • REPEAT_TIMING_SERIAL (read only – integer)

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 – integer)

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

  • REPEAT_DISTRIBUTION_CONSTANT (read only – integer)

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

  • REQUEST_OPERATION_PARAMS (read only – integer)

A constant that can be passed in calls to the “getRequest” and “setRequest” methods. (See the descriptions of the “getRequest” and “setRequest” methods.)

  • RESPONSE_OUTPUTS (read only – integer)

A constant that can be passed in calls to the “getResponse” method. (See the description of the “getResponse” method.)

 

Browser Action Methods

getChild Method

Always returns null.

 

object getChild(string childName)

getItemViaPath Method

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.

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" (see  In Situ Substitution Expressions below).  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).


object getItemViaPath(string itemType, string path)

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.  See the description of this method in the description of the Band object.


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

getRequest Method

Returns the specified portion of the Browser Action request that will be performed when the Browser Action is executed. The “indicator” parameter must be the following value (only one possible value is currently supported):

  • REQUEST_OPERATION_PARAMS

Returns the “parameter” values for the Browser Action. An array of up to three String values is returned. The array will always have a size of three elements. If the Browser Action has less than three parameters, the extra elements of the returned array will contain nulls.

void getRequest(int indicator)

setRequest Method

Sets the specified portion of the Browser Action request that will be performed when the Browser Action is executed. The “value” parameter contains the value(s) to be placed into the request. The “indicator” parameter must be the following value (only one possible value is currently supported):

  • REQUEST_OPERATION_PARAMS

Sets the “parameter” values for the Browser Action. The “value” parameter must be an array of up to three String values, representing up to three “parameter” values to be placed into the request. Any and all existing parameteres in the request will be removed and replaced with these new values.

void setRequest(Object value, int indicator)

getResponse Method

Returns the specified portion of the results of the Browser Action that was performed. The “indicator” parameter must be the following value (only one possible value is currently supported):

  • RESPONSE_OUTPUTS

Returns a JavaScript associative array containing the “output” values from the Browser Action. The “keys” of the array are the names of the output values, and the values associated with the “keys” are the output values themselves. If the Browser Action did not return any “output” values, null is returned.


String or String[] getResponse(int indicator, string param)

setMessage Method

Sets all or the specified portion of the message that is to be sent.
The "value" parameter is the value to be placed into the message.
The "indicator" parameter must be one of the following:

  • MESSAGE_TEXT

Sets the entire text of the message that is to be sent from the "value" parameter.
This indicator value is valid only for messages that are not HTTP-based.

  • MESSAGE_HTTP_BODY

Sets the body of the HTTP message that is to be sent from the "value" parameter.
This indicator value is valid only for messages that are HTTP-based.

  • MESSAGE_HTTP_HEADERS

The "value" parameter contains the (optional) HTTP headers to be sent with the message.  Can be null.  The value should be a text string with new-lines between the HTTP headers. This indicator value is valid only for messages that are HTTP-based.

If the "indicator" parameter is omitted, null or undefined, "MESSAGE_HTTP_BODY" will be assumed for HTTP-based messages, or "MESSAGE_TEXT" will be assumed for non-HTTP-based messages.


String setMessage(string value, int indicator)

endRepeat Method

Requests that repeating for this Browser Action be ended. If this Browser Action is not currently playing, no action is taken. Note that this is not an “abort” – repeating will be ended after any current individual repeat play of this Browser Action completes.

This method is permitted for serial repeating only, it is not supported for parallel repeating and an error will be generated if it is attempted to call this method for a parallel repeat.

 

void endRepeat()

Attachments

    Outcomes