Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Lock Expression Slider to Select Values

  • Lock Expression Slider to Select Values

    Posted by Jon Smith on August 7, 2013 at 2:21 pm

    I would like to create an expression slider that can only be the values 0, 25, 50, 75, 100. Is there an expression that will do that? I’ve been looking at some posts that hint at it but can’t seem to decipher it to my needs. Thanks

    Jon Smith replied 12 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 7, 2013 at 5:02 pm

    Something like this maybe:

    Math.max(Math.min(Math.floor(value/25)*25,100),0)

    Dan

  • Jon Smith

    August 8, 2013 at 2:32 pm

    Thanks as always!

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