Restrict the Values a Slider Can Take

Top  Previous  Next

How To... > Work with Dynamic Parameters (Sliders) > Restrict the Values a Slider Can Take

Suppose you want a slider that only takes on integer values (for example); you can restrict a slider’s value in its inspector.

1.Double-click the slider’s axis to open its inspector.
2.Type a numeric value in the Restrict_to_multiples_of cell. To restrict to integers, you would type 1.

Until you remove this value, the slider will only take on values that are a multiple of the property value, whether you change it by typing, dragging, animating, or adding a formula. (see Animate a Slider  and Change a Slider’s Animation Speed.)

Tip: Let’s say your slider scale goes from 0 to 10. Set the Restrict_to_multiples_of property to a small number, such as 0.001. Now animate the slider. In the inspector, you’ll see the slider value changing at full speed, but the slider thumb will hardly be moving because the value has to change by many multiples of 0.001 before the slider gets to move a pixel.

See the sample document Slider Examples.ftm for uses of the new slider functionality.

See also

Slider Properties Panel