ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Linking a keyframe to a text layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Craig Sinclair
Linking a keyframe to a text layer
on Sep 20, 2018 at 4:29:56 pm

I'm looking to link a keyframe to a text layer, so that it animates from the number 0 to whatever number is entered in the text layer.

I was looking for an expression to do this, in order to template the comp as a mogrt designed for PP.

Is this possible and can anyone out their help?

Cheers team.


Return to posts index

Kalleheikki Kannisto
Re: Linking a keyframe to a text layer
on Sep 20, 2018 at 7:09:12 pm
Last Edited By Kalleheikki Kannisto on Sep 20, 2018 at 7:12:15 pm

Not familiar with what works in mogrts what doesn't, but here's an expression that does that.

finalvalue = value;
startvalue = 0;
starttime = 1; // starting time in seconds
duration = 3; // duration in seconds
Math.round(linear(time, starttime, starttime+duration, startvalue, finalvalue))


Well, actually what this does is animate the source text value between zero and the end value, but you can probably figure it out from there. You could simply link to this value, taking out the rounding.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Craig Sinclair
Re: Linking a keyframe to a text layer
on Sep 21, 2018 at 8:40:58 am

Yea the mogrts thing doesn't really matter. I was just explaining for context.

Can't seem to understand why this wouldn't work.

Essentially I'm trying to get the expression on text layer A to link the numerical value of text layer B to a keyframe on Text layer A, so that text layer A animates from 0 to the numerical value of text layer B.

Everytime I set a var to text layer B I get an error saying that "object of type TextProperty found were a number, array or property is needed.

Is this because AE doesn't read number inputs via a text layer? Would I be better of using a slider?


Return to posts index


Kalleheikki Kannisto
Re: Linking a keyframe to a text layer
on Sep 21, 2018 at 2:43:11 pm

Oh, ok. Just add ".value" at the end of the expression, and it should read the text value rather than the text property.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

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