ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

control with markers problem

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
John Niven
control with markers problem
on Nov 15, 2017 at 10:10:22 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
}



Return to posts index

DeMarc Johnson
Re: control with markers problem
on Dec 3, 2017 at 3:30:52 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]