Copy link to clipboard
Copied
Hi guys, I'm trying to add an expression to my type layer in After Effects and I keep getting an error for line two?
Does anyone see what could be wrong with this expression? It seems so basic.
Thanks for your help!!
HERE IT IS:
L = text.sourceText.length;
It = time – thisLayer.inPoint;
T = It*effect(“Speed”)(“Slider”);
F = Math.round( It % 1);if(F==1 |(T0)){Fl=”|”;}else{Fl=” “;}substr(0,T) + Fl
just 2 days ago I was also looking for an expression to create a type cursor and stumbled upon the very same expression I think. it didn't work for me too.
here's one that works and looks more elegant:
L = text.sourceText.length;
T = (time-inPoint)*effect("Speed")("Slider");
F = Math.round(time % 1);
if(F == 1 | (T<L & T>0) ){Fl = "|";}else{Fl ="";}
substr(0,T) + Fl
just remember to add an expression slider and name it "Speed"
Copy link to clipboard
Copied
The conditional statemenet is all botched. Clean it up and use the correct sway brackets and logic operators.
Mylenium
Copy link to clipboard
Copied
just 2 days ago I was also looking for an expression to create a type cursor and stumbled upon the very same expression I think. it didn't work for me too.
here's one that works and looks more elegant:
L = text.sourceText.length;
T = (time-inPoint)*effect("Speed")("Slider");
F = Math.round(time % 1);
if(F == 1 | (T<L & T>0) ){Fl = "|";}else{Fl ="";}
substr(0,T) + Fl
just remember to add an expression slider and name it "Speed"
Copy link to clipboard
Copied
awesome you found it!! ❤️
Copy link to clipboard
Copied
Work for me.. Thank you
Copy link to clipboard
Copied
Alternatively, if you don't want to write any code and happen to own iExpressions, you can use the Scroll Text Terminal expression which can add a blinking, customizable cursor and also can let your text appear letter by letter.