Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

Trigger API from within a Cue

 0 Minutes

 0 Likes

 2145 Views

Pixera offers a way how to send out an API command via the cues.

  1. Set API output 1 to internal Javascript. no IP, no Port.

  2. Set Cue API output to output 1



The easiest way (and most robust considering possible future changes) to access the environment from a cue handler is to use the g_cue object that is pre-loaded when the script is run. 
It gives access to the instance of the cue whose script is being executed.e.g. g_cue.getTimeline().play() will play whichever timeline the cue is in. 

In principle the javascript api has the same members as the json api so the documentation is relevant for both. Regrettably, the "static" functions (associated with a class but not with an instance) like getInst() do not currently work in javascript.
Example:

function onCue()
{
Pixera.Timelines.getTimelineFromName("Timeline 1").getLayerAtIndex(0).unMuteLayer();
}


Was this article helpful?