ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to Scale Certain Text on Number Counter

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
ryan christopher
How to Scale Certain Text on Number Counter
on Nov 20, 2018 at 8:16:13 am







Hi I have a number counter with "$" infront and "goal" at the back that moves accordingly to the length of the numbers, did it with the following expression and a slider.

I am trying to decrease the font size of the word "goal". Since it's in the same text layer, I am not sure how to do that with code. Can anyone help ?

Thank you in advance.

s = Math.round(effect("Slider Control")("Slider")).toString();
outStr = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i--){
outStr += "," + s.substr(-i*3,3);
}
"$"+ outStr +" goal";


Return to posts index

Dan Ebberts
Re: How to Scale Certain Text on Number Counter
on Nov 20, 2018 at 4:44:12 pm

I think you have to make it a separate layer to have a different font size.


Dan



Return to posts index

ryan christopher
Re: How to Scale Certain Text on Number Counter
on Nov 20, 2018 at 5:25:21 pm

Hi Dan,

Thanks for your reply.

I am not sure how to link the second layer text position to the jumping digits in the first.
Do you know any alternative solution to achieve similar results ?

Best Regards,
Ryan


Return to posts index


Dan Ebberts
Re: How to Scale Certain Text on Number Counter
on Nov 20, 2018 at 5:28:40 pm

You can use sourceRectAtTime() to track the right edge of the other text layer. There should be lots of examples on this site for doing that.


Dan



Return to posts index

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