FORUMS: list search recent posts

Targeting Layer name

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam levine
Targeting Layer name
on Apr 26, 2016 at 5:49:26 pm

I've this little expression. As in the expression I want to change "End" time marker from different layer as set the "number" slider. But it doesn't work. Can you please help me to fix what I did wrong.
(Misc mean layer name) I've created several Misc layer such as Misc 1, Misc 2, ...etc. And every layers have two Markers.

Start = thisComp.layer("Misc 1").marker.key(1).time;

var number = effect("Slider Control")(1).value;
(Layer).name = Misc number;

End = thisComp.layer(Layer).marker.key(2).time;

x = linear(time, Start, End, 300, 2000);

[x, value[1]]


Return to posts index


Dan Ebberts
Re: Targeting Layer name
on Apr 26, 2016 at 6:21:14 pm

Like this maybe:

Start = thisComp.layer("Misc 1").marker.key(1).time;
n = Math.round(effect("Slider Control")(1).value);
End = thisComp.layer("Misc " + n).marker.key(2).time;
x = linear(time, Start, End, 300, 2000);
[x, value[1]]

Dan



Return to posts index

Adam levine
Re: Targeting Layer name
on Apr 26, 2016 at 6:31:07 pm

Thank you Master Dan. It works Perfect.
Thank you so much again.


Return to posts index

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