Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions putting a stop to random(minValOrArray, maxValOrArray)

  • putting a stop to random(minValOrArray, maxValOrArray)

    Posted by Hymn Wong on April 14, 2008 at 3:31 am

    how can i put a stop to a random(0,359) generator,
    so that on the first frame, the value won’t change, and keep the same value?

    i am using this for changing the color of each object with “CC color Offset” on the first frame

    how about adding a “checkbox control”?

    thanks in advance!! (urgent..)

    Hymn Wong replied 18 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Filip Vandueren

    April 14, 2008 at 10:46 am

    this should do the trick:


    seedRandom(index,true);
    random(360);

    the first value (index) will make sure the random number is unique for every layer, the second value (true) sets the “timeless” option to true: the values will NOT be recalculated every frame, so you have 1 constant random value per layer.

  • Hymn Wong

    April 14, 2008 at 1:21 pm

    thanks Filip! it works great~! 😀

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