Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Layer Label and Comp Marker relationship problem

  • Layer Label and Comp Marker relationship problem

    Posted by Bert Brown on September 4, 2009 at 3:22 pm

    I want to use comp marker numbers to activate events on layers labeled with numbers, but am having trouble translation 1 into “1” and then back to 1

    I’ve pasted the code that doesnt work, and I understand why it doesnt work (it’s reading the comment as a string when the expression needs a number) but I’m kind of lost as to how to translate.

    so in basic terms, i want the layer labeled with “1” to only be active between comp marker 1 and 2

    LABEL = thisLayer.marker.key(1).comment;
    START = thisComp.marker.key(LABEL).time;
    END = thisComp.marker.key(LABEL+1).time;
    ease(time, START, END, 0, 100)

    Dan Ebberts replied 16 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    September 4, 2009 at 5:39 pm

    I think you just need to convert your layer marker comment to an integer, like this:

    LABEL = parseInt(thisLayer.marker.key(1).comment);
    START = thisComp.marker.key(LABEL).time;
    END = thisComp.marker.key(LABEL+1).time;
    ease(time, START, END, 0, 100)

    Dan

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