Is it possible to work out the direction a slider is moved

I am looking to create a gallery effect where the image I want to use is wider than the slide.  I want to use a slider to pan across the image - if the slider value increases the image will move towards the left revealing the right hand side of the image and vice-versa.  I have been trying to use a motion path, set to move relative to the starting position each time the slider value changes.  I can get this working so long as i am moving the slider towards the right. The problem i've run into is getting the backwards direction working (where moving the slider to the left reveals the left side of the image).  I think I really need a way to tell if the slider value has increased or decreased - if I can do this i can select the correct motion path to pick (and move the gallery image to left or right based on this).  I have tried to set up triggers to store the previous slider value and compare it to the current value, but as i need to use 'when the slider changes', the previous slider value is getting overwritten.  Any help would be appreciated! May be there is a simpler way to do it?! Thanks.

 

5 Replies
Michael Hinze

It's probably just a question of your trigger order. See attached a quick, rough example. You might want to consider making the picture the thumb of another slider and connect that slider to the same variable as the first one. With that you don't need any motion paths or triggers at all. See this example here. All the elements (plane, clouds, etc. are all sliders that are controlled by the one at along the bottom. 

Stephanie Powner

Hi Micheal

Thanks so much for the speedy reply.  Your attached story is brilliant and has the same effect that i am trying to achieve so now i am confident that it can be done and is worth me persevering with.  I have seen a great example by Nancy Woinoski on here where she used an image as the thumb for the slider, but I couldn't get the downloaded storyline 2 file to publish in Storyline 360,  I assumed that the general approach might be problematic in the later version of SL so looked to used the motion paths.  Did you publish example in Storyline 360?  Guess that would answer the question for me.  Much appreciated.