Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Triggering An Expression “on off on off etc’ via Markers

  • Triggering An Expression “on off on off etc’ via Markers

    Posted by Victor Nash on December 10, 2010 at 4:09 pm

    Could someone guide me with my current expression. I basically have an expression that begins the pulse of the Opacity when it hits the Marker. I really need to create an “On Off, On Off etc” with each Marker I lay in?

    Thanks!

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n--;
    }
    }

    if (n == 0){
    value;
    }else{

    f = 3; // frequency
    a = 100; // amount
    (Math.cos(time * f * 2 * Math.PI) + 1) * (a / 2);
    }

    Victor Nash replied 15 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 10, 2010 at 6:16 pm

    I’m not sure, but this might be what you’re after:


    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time) n--;
    }

    if (n %2){
    f = 3; // frequency
    a = 100; // amount
    (Math.cos(time * f * 2 * Math.PI) + 1) * (a / 2);
    }else{
    value
    }

    Dan

  • Victor Nash

    December 10, 2010 at 6:24 pm

    Yes! Thanks Dan.

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