Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Turn Opacity to 100% for 1 frame every (user defined with slider) seconds.

  • Turn Opacity to 100% for 1 frame every (user defined with slider) seconds.

    Posted by Sean Apple on June 15, 2014 at 9:05 pm

    Okay, I’ve spent a couple of days trying to patch this idea together with several (excellent) related posts but can’t quite grasp how to do this.

    I want a layer to flash for 1 frame only. (Opacity at 100%)

    I’d like for the user to be able to decide using a slider how frequently this happens. i.e. Once very 2 seconds. Or once every 5 seconds, etc.

    Any ideas?

    Thanks!
    Sean

    Sean Apple replied 12 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Jeff Kay

    June 16, 2014 at 7:47 pm

    EDIT: ugh I used the wrong formatting for the post and it lost half the post

    My syntax is off, but Try

    create an expression slider for how often it occurs (I’ll call it FXTime)
    maybe create a second slider for frame offset (FXoffset) if you want to give control to them being able start on the first frame in a second or on a later frame (set boundaries from 0 to framerate-1)

    Opacity
    if math.floor[(current frame # + FXoffset) / (current framerate)*FXTime]= [(current frame # + FXoffset) / ((current framerate)*FXTime] then 100
    else 0

    Might want to put in functions to make FXoffset a whole number and/or having “(current framerate)*FXTime” always return a whole number. This should set the opacity to 100 for the single frame where “(current framerate)*FXTime” is a whole number which will happen every FXTime seconds.

    Its not exactly elegant, but it should work.

  • Sean Apple

    June 16, 2014 at 11:02 pm

    Thanks, Jeff. I’ll give it a try…

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy