FORUMS: list search recent posts

color change to blinking cursor expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Robert Paynter
color change to blinking cursor expression
on Aug 19, 2014 at 8:09:34 pm

I'm using this expression to animate a blinking cursor.
I would like to change the color and size of the cursor. Is this possible?

CH = Math.round(effect("LetterNumber")("Slider"));
BlinkSpd = effect("BlinkSpeed")("Slider");
F = Math.round((time * BlinkSpd) % 1); //result flickers between 0 and 1 for blinker on-off;
TypeSpd = effect("LetterNumber")("Slider").speed;
if (F==1 | TypeSpd > 0){Cursor = "|"} else {Cursor = "";}
substr(0,CH) + Cursor;


Return to posts index

Dan Ebberts
Re: color change to blinking cursor expression
on Aug 19, 2014 at 9:21:48 pm

You could add an animator for fill color and scale (set to what you want for the cursor), add an expression selector (delete the range selector), and set the expression selector's amount expression to something like this:

CH = Math.round(effect("LetterNumber")("Slider"));
if (textIndex < CH+1) 0 else 100


Dan



Return to posts index

Robert Paynter
Re: color change to blinking cursor expression
on Aug 20, 2014 at 2:47:21 pm

Thanks Dan. That worked Perfectly.


Return to posts index


Robert Paynter
Re: color change to blinking cursor expression
on Sep 16, 2014 at 6:55:50 pm

I have an issue with this expression. When Justified Right, the line bounces back and forth with the blinking of the cursor. I understand why but is there any simple fix for it ? I added a space between the " " but that of course is not perfect.

CH = Math.round(effect("LetterNumber")("Slider"));
BlinkSpd = effect("BlinkSpeed")("Slider");
F = Math.round((time * BlinkSpd) % 1); //result flickers between 0 and 1 for blinker on-off;
TypeSpd = effect("LetterNumber")("Slider").speed;
if (F==1 | TypeSpd > 0){Cursor = "|"} else {Cursor = " ";}
substr(0,CH) + Cursor;


Return to posts index

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