flash a layer at specific frame intervals

Scripting for After Effects

flash a layer at specific frame intervals

Postby sunsanvil on 08/24/2016, 5:22 am

I need to have a layer which flashes on and off at specific frame intervals. If it was just one interval it would be simple to set a couple key frames and then use the LoopOut function....BUT... we want to vary the interval to specific values over time. For example, 6 frames on 6 frames off for a couple seconds, then 4 on 4 off for a couple seconds etc.

I can use a Null with a slider and key-frame those interval values but I'm having a hard time coming up with an expression which will translate that into the actual on/off.

Any suggestions or even just nudges in the right direction would be appreciated.

Posts: 22
Joined: 05/25/2010, 1:04 pm

Re: flash a layer at specific frame intervals

Postby plae57 on 08/24/2016, 8:20 am

Maybe I am missing the obvious here, but what if you had 2 layers, one that flashes every 6 seconds, the second every 4 seconds, then just toggle the visibility of the layers?
Posts: 574
Joined: 08/4/2014, 4:12 am

Re: flash a layer at specific frame intervals

Postby Mylenium on 08/24/2016, 8:51 am

Simply split up the layer into suitable sections and use different timings. You are completely overcomplicating this simple thing for no good reason. You don't even need expressions, you could just use the Strobe effect.

[Pour Mylène, ange sur terre]
Posts: 3263
Joined: 02/1/2009, 11:45 am
Location: Germany
System Specs: Have, I do!

Return to After Effects Expressions