Forum Replies Created

Page 2 of 2
  • So now, I’m stumped again. I’m working with the same project and wanted to adapt your expression to flip a CC composite effect from 0 % opacity to 100 %.There’s also an if clause that checks the layer’s y-position to see, if it’s been moved from a fixed position. If that is true, CC composite’s opacity is also turned on.

    I get an error message that “startTime” is not defined and might lie outside of the array’s valid space. But I think, that’s not all that is wrong here.

    Here’s the code:

    startTime = thisLayer.inPoint;

    truePos = thisComp.layer(“CONTROL_politicalParties”).transform.position[1];

    tag = “full”;

    t = 999999;

    for (i = 1; i <= thisComp.numLayers; i++){

    s = thisComp.layer(i).marker;

    if (s.numKeys > 0){

    n = s.nearestKey(time).index;

    if (time < s.key(n).time) n–;

    for (j = n; j > 0; j–){

    if (s.key(j).comment == tag){

    t = Math.min(t,time – s.key(j).time);






    if (t < startTime) {

    if (truePos == 757) {






  • Wow, it works! Thanks so much, Dan :).

    Can you break it down for me? I’d like to know how exactly it works out. If you have the time, that is.

  • I feel like I need to elaborate a little more, so I’ve snapped a screenshot that hopefully clarifies my problem.

  • Hi Dan,

    thank you very much for your reply! This would let the expression check every preComp layer for markers? Not just on a specific one?

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy