Disable slider when slider value reaches a specific number

Mar 24, 2024

Hi All, I have a "carousel image" interaction where an object spins 360 degrees by use of a slider. I added a picture with 36 individual states to the slide, which  represent the object at every 10 degrees. What I want to do, is to pause the spin action when the object is at 90 degrees, and show a layer that will display some detail about the product, and when the Close button on the layer is pressed, the the slider will again become active. What I did so far:

  • Added a trigger to disable the slider when the slider count reaches 90 (I since found out that the disable state doesn't work with sliders)
  • Put a transparant shape on top of the slider, initially set to Hidden. Added a trigger to set the hidden shape to Normal when the slider count reaches 90. It doesn't work, I guess because the interaction is in an unknown state until the user releases the mouse button. 
  • Put a trigger to pause the timeline when the slider reaches 90. It doesn't work for the same reason above. 

Then I had the idea to make the interaction semi-automated. The idea is that the user presses a button and the object should rotate in 10 degree increments to 90 degrees (e.g., the image should change state 9 times and then stop). I added a numeric variable, Image_Rotate and set the initial value set to 0. I also added a Rotate button that should start everything.  Then I set triggers to do the following:

  • Click Rotate button, value 10 added to Image_Rotate.
  • Change state of image to 10, when Image_Rotate changes, if Image_Rotate is 10
  • Change state of image to 20, when Image_Rotate changes, if Image_Rotate is 20
  • ...etc.

My idea was to add another trigger to add 10 to Image_Rotate, when Image_Rotate changes, if Image_Rotate is < 90, so that the counting is automated until 90.

The problem is, that the counting happens before any of the state changes can take place. So the counter immediately goes to 90, and the image remains static.

I'm curious if anyone has any ideas how to solve this problem... 

1 Reply