Forum Discussion
Moving a slider with a button
I see Judy has posted some screen shots of the triggers. One question Judy.
With these triggers, if the user clicks on the down button 3 times, they need to click on the up button 3 times before the slider will move. How is this preventable?
- JudyNollet3 years agoSuper Hero
You can set a range for a slider (for example, 1-10). And when a user drags the slider back and forth, the associated variable stays within the designated range.
However, if you use triggers to adjust the slider variable, its number (value) can go outside of the designated range.
To use your example, Eric: Suppose you click a button three times that has a trigger that subtracts 1 from the variable. If the variable started a 0, its value after those clicks would be -3. The slider has no way of showing a value outside of its range, so it doesn't move. And, to get it to move with a trigger that adds 1, you will have to click enough to get the value within range before the slider moves.
You can use conditions to prevent that issue.
- On the trigger that adds to the variable, include a condition, so it will only do that when the variable is < maximum value.
- On the trigger that subtracts from the variable, include a condition, so it will only do that when the variable is > minimum value.
Related Content
- 10 months ago
- 12 months ago