Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Auto position animation at the end of the composition

  • Steve Sierra

    May 4, 2017 at 1:06 pm

    Re-cleaned it up :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

    😉

  • Avinash Ramanath

    May 4, 2017 at 1:29 pm

    Getting an error this time

  • Steve Sierra

    May 4, 2017 at 1:34 pm

    It was the copy/past…
    here it is again :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b - 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

  • Steve Sierra

    May 4, 2017 at 1:35 pm

    Happened again…. the last two lines are “if(time n){y}”….

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

  • Steve Sierra

    May 4, 2017 at 1:37 pm

    I think a part of the expression turns into “…”
    I’ll change my variable names and re post it…

  • Steve Sierra

    May 4, 2017 at 1:39 pm

    How about this :

    InTime = thisLayer.inPoint;
    InFrames = timeToFrames(InTime);
    m = timeToFrames(thisLayer.source.duration) + InFrames – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,InTime, InTime+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time < InTime +p){x}
    if(time > n){y}

    InTime = thisLayer.inPoint;
    InFrames = timeToFrames(InTime);
    m = timeToFrames(thisLayer.source.duration) + InFrames - 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,InTime, InTime+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time &lt; InTime +p){x}
    if(time > n){y}

  • Avinash Ramanath

    May 4, 2017 at 3:42 pm

    It’s working now. Many thanks for the effort Steve.

Page 2 of 2

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