Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions layer markers and expressions

  • layer markers and expressions

    Posted by Sam Young on June 6, 2006 at 11:13 pm

    i’ve read the archives, including dan ebberts’ “synchronizing animation to audio” tutorial, but i haven’t found any simple solution to my problem.

    i’ve got a bunch of layer markers on a layer. i want an expression on that layer to generate a new random number every time a layer marker is reached.

    is there a way to do this?

    thanks in advance

    Sam Young replied 20 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 7, 2006 at 1:00 am

    This should give you a new random number between 1 and 100 at each marker;

    minNum = 1;
    maxNum = 100;

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

    seedRandom(n,true);
    random(minNum,maxNum)

    Dan

  • Sam Young

    June 7, 2006 at 3:59 am

    thanks, dan!

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