Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Time remapping triggered by marker


  • Time remapping triggered by marker

    Posted by Jean Livenais on April 23, 2023 at 5:41 pm


    I have a 2 layers T1 and T2, each one contains an animation triggered by its marker on the MARKER layer.

    The following expression make the animation of each layer starts when the corresponding marker is reached. It is in the time remapping expression of each layer:

    markerName =;

    Unfortunately, it just works for the first marker of each layer.

    I’d like to trigger the animation of each layer several time. The time remap for each layer would continue until the next same marker is reached and it would start again from the beginning for that same layer.

    Can you give me a hand please?

    Brie Clayton replied 5 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    April 23, 2023 at 5:53 pm

    Something like this should work:

    m = thisComp.layer("MARKER").marker;
    n = m.nearestKey(time).index;
    t = 0;
    if (time < m.key(n).time) n--;
    if (n > 0){
    for(i = n; i > 0; i--){
    if (m.key(i).comment == name){
    t = time - m.key(i).time;
  • Jean Livenais

    April 23, 2023 at 7:47 pm

    Thank you very much Dan, it works great!!!!

  • Brie Clayton

    April 25, 2023 at 5:47 pm

    Thank you Dan!

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