Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using loopIn and loopOut in the same expression

  • Using loopIn and loopOut in the same expression

    Posted by David Cabestany on July 20, 2022 at 4:50 pm

    Pretty much, what the title says, I’m trying to use one or the other via a conditional statement but I’m getting the following error:

    Undefined value used in expression (could be an out of range array subscript?)

    This is for time remapping a video, so add some head and tails to it.


    Thanks in advance for your help.

    n = 0;

    if (marker.numKeys > 0){

    n = marker.nearestKey(time).index;

    if (marker.key(n).time > time) n–;

    }

    if

    (n<=1)

    {loopIn(“pingpong”)

    }

    if

    (n>2)

    {loopOut(“pingpong”)

    }

    ;

    David Cabestany replied 2 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 20, 2022 at 5:53 pm

    I’m not sure if this is what you’re after, but your expression needs to define what happens between markers 2 and 3.

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time) n--;
    }
    if (n<=1){
    loopIn("pingpong");
    }else if (n>2){
    loopOut("pingpong");
    }else{
    value;
    }
  • David Cabestany

    July 21, 2022 at 4:15 pm

    perfect, let me try it now.

    Thanks a lot Dan.

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