ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Text Blinking On Expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Moon
Text Blinking On Expression
on Mar 28, 2014 at 10:55:18 pm

Hello All,

I'm not very good with expressions and I wanted to know if there were any expressions for text that would make them randomly blink on. Kind of like how a flourescent light would when you first turn it on but randomly with random text?


Return to posts index

George Goodman
Re: Text Blinking On Expression
on Mar 31, 2014 at 2:06:37 pm

In order to change how frequently it shuts on and off, just change the first wiggle value. The bigger that number, the faster it should flicker.

Set your opacity to 50 then put this expression in it:

on=100;
off=0;
x=wiggle(10,50)
if (x>50) on else off



"|_ (°_0) _|"

Sincerely,

George


Return to posts index

Mike Moon
Re: Text Blinking On Expression
on Apr 2, 2014 at 11:11:11 pm

Hmm, my question was more in regard to each individual letters blinking on and off randomly till they are all lit. I was wondering if there was an AE text animation preset that does that? Thanks.


Return to posts index


George Goodman
Re: Text Blinking On Expression
on Apr 3, 2014 at 1:50:55 pm

Ok, gotchya. There is probably a better way, but this will work.

-Take your text layer, right click, and convert to shapes.
-Open up the shape layer and go to the transform>opacity section of each letter, set it to 50, and enter the expression below. (not the one where I explain things, obviously)

Here is how to alter it for different results

on=100;
off=0;
x=wiggle(10,50); - Change the 10 to a larger number for faster blinking, or lower for slower
r=random(9);
if (time<5+(r*.1)){ - Change the 5 to the second you want the effect to stop, in this case the effect ends 5 seconds into the timeline. The (r*.1) is an additional parameter to make them stop at different points. So this equation is saying stop at 5 seconds plus a random number (1-9) *.1 -So each one will stop at 5.3 or 5.7 or 5.2 - whatever it generates. If you would like there to be a longer gap between each one stopping, simple make the .1 a larger number. The larger you go, the longer it can wait to stop the effect
if (x>50) on else off}
else on

The reason this approach sucks is because you have to manually enter it for each letter and if you want to change it, you have to change each expression, rather than just one. But it will do the trick. And if you do need to alter them all, just press "e" with the layer selected and it will bring up all of the expressions.

on=100;
off=0;
x=wiggle(10,50);
r=random(9);
if (time&lt;5+(r*.1)){
if (x>50) on else off}
else on



"|_ (°_0) _|"

Sincerely,

George


Return to posts index

Mike Moon
Re: Text Blinking On Expression
on Jan 20, 2017 at 5:41:40 pm

Wow I must of been in a time crunch when I asked for your help and prob just jimmy rigged the effect the long way. Coincidentally I'm faced with this problem again and found my original post. I tried your script and it seems to give me an error. By the way I wanted the individual letters to blink and then stay on. So they go from 0 opacity and blink to 100 opacity. Kind of like a florescent bulb.

After Effects warning: an expression was disabled as a result of an error.

Error at line 5 in property 'Opacity' of layer 1

Can anyone help with this? Thanks


Return to posts index

George Goodman
Re: Text Blinking On Expression
on Jan 20, 2017 at 6:45:19 pm

Should be that instead. It looks like the formatting of the expression added an &Lt for some reason. I didn't test this, I'm just looking at the inconsistency between my explanation of the code and the actual code you probably copy and pasted. That line definitely doesn't make any sense as is though.

if (time&lt;5+(r*.1))

"|_ (°_0) _|"

Sincerely,

George

http://www.vimeo.com/georgegoodman
http://www.linkedin.com/in/georgefranklingoodman


Return to posts index


Dan Ebberts
Re: Text Blinking On Expression
on Jan 20, 2017 at 6:50:41 pm

If you post code, it's best not to preview it first, or your < characters will get mangled.

Dan



Return to posts index

Mike Moon
Re: Text Blinking On Expression
on Jan 20, 2017 at 8:05:38 pm

Call me crazy but the new code you posted looks the same as the old one.

original post:
on=100;
off=0;
x=wiggle(10,50);
r=random(9);
if (time<5+(r*.1)){
if (x>50) on else off}
else on


new code:
if (time<5+(r*.1))


Return to posts index

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