ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Animating with text

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jesper DahlAnimating with text
by on Oct 8, 2015 at 11:31:24 am


I'm trying to find a way to use a line of text to animate a comp.

Let's say I write "acf" in a text layer or in some kind of expression.
I also have a comp with time remapping enabled that show the numbers 0 to 9 in the equivalent frames of the comp.
I then want to animate the time remapping value so when you play the animation, it shows the numbers 1, 3 and 6 (because a, c and f are the 1st, 3rd and 6th letter in the alphabet)

So I want to be able to animate the remapping value with text.


Return to posts index

Walter SoykaRe: Animating with text
by on Oct 8, 2015 at 4:56:57 pm

Try this:

inputString = value.toLowerCase();
baseValue = "a";
offset = baseValue.charCodeAt(0) - 1;
outputValues = "";
for (i=0; i<inputString.length; i++) outputValues += (inputString.charCodeAt(i)-offset);
n = parseInt(outputValues);

Is that what you were looking for?

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved