Slider back and forth different images

Jan 30, 2020

Hi!

I am trying to create a sequence of images of opening/closing a door. The problem is that i would like different pictures depending on which way the user drags the slider. 

So if the user would drag the slider to the right, the door will open. An if she/he drags it to the left, it will close. But the image in the middle where the door is partly open is different depending on if the door is opened or closed (lets say a clown would pop up while closing the door for example)

1 Reply
Sally Wiedenbeck

I would add a variable in the project, something like "last-state" and have the variable change when the slider moves to either the door open or door closed position. Then when the user drags the slider back to the middle, you can have two triggers, showing a different image depending on the state of the variable. Something like:

Change state of the door image to door-closing when the slider moves if slider = middle position and last-state is equal to "open"

Change state of the door image to door-opening when the slider moves if slider = middle position and last-state is equal to "closed"

This discussion is closed. You can start a new discussion or contact Articulate Support.