Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions control with markers problem

  • control with markers problem

    Posted by John Niven on November 15, 2017 at 10:10 pm

    hey guys,

    i am trying to make two markers on precomposition that will control start and end of transition (from 0 to 100) inside that precomposition on a text layer.
    so far it was working good, but time is giving me a problem,

    if i move precomposition on timeline, “in” marker works fine, but “out” marker sometimes work, sometimes not..

    any idea what i am doing wrong?

    if (comp("MAIN COMP").layer("HOR-TXT-1").marker.numKeys > 0){
    m = comp("MAIN COMP").layer("HOR-TXT-1").marker.nearestKey(time);
    t = m.time;
    s = comp("MAIN COMP").layer("HOR-TXT-1");

    if (m.index%2){
    ease(time+s.inPoint,t,t+25*thisComp.frameDuration,0,100)
    }else{
    ease(time+s.inPoint,t,t+25*thisComp.frameDuration,100,0)
    }
    }else{
    value
    }

    Demarc Johnson replied 8 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Demarc Johnson

    December 3, 2017 at 3:30 am

    This might work, you forgot to add a comparison in the if statement.

    if (comp("MAIN COMP").layer("HOR-TXT-1").marker.numKeys > 0){
    m = comp("MAIN COMP").layer("HOR-TXT-1").marker.nearestKey(time);
    t = m.time;
    s = comp("MAIN COMP").layer("HOR-TXT-1");

    if (m.index % 2 === 0){
    ease(time+s.inPoint,t,t+25*thisComp.frameDuration,0,100)
    }else{
    ease(time+s.inPoint,t,t+25*thisComp.frameDuration,100,0)
    }
    }else{
    value
    }

    For Expression Tutorials:
    https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw

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