This is a pretty old post, but still valuable for expressions. Here’s a script get something to flicker/blink.
If you put the opacity at 50%, it will randomly blink on/off.
If you put two keyframes from 100 to 0%, it will transition with flickering instead of a smooth fade, like a light burning out.
If you don’t use any keyframe and set the opacity to 70%, with a flicker frequency of 100, it nicely approximates an eye blink.
Cheers!
-Greg @ Antifreeze Design
//--Flicker On
//Make something flicker to 100% opacity instead of fading in
//Adjust this flicker frequency to your taste
flickerFrequency = 150;
op = value;
if(op > 0 && op < 100){
reverseAmt=100-transform.opacity;
wiggledAmt=wiggle(flickerFrequency,reverseAmt);
roundedAmt=Math.round((wiggledAmt/100));
roundedAmt*100;
}
//--end Flicker On