Matthew Bibby
Matthew Bibby

Using a Slider to Explore a Series of Images

In this tutorial, we will look at how to animate a series of images and allow the user to control this via a slider.

Matthew BibbyMatthew Bibby

Have you every wanted to present a procedure visually, in such a way that a learner can explore it in more detail, at a speed they are comfortable with?

Maybe you want to make an image spin around... Like in those interactions you see on car websites. You know the ones, where you can turn the car around to check if it has the right amount of wheels (or whatever it is that people like looking at on cars)?

Maybe you want to build a graph that allows learners to explore the relationship between various variables? Or show something more detailed, like how to perform a dance move or a basic surgical procedure?

In this tutorial, we will look at how to do this by using a slider, image states and a number of conditional triggers.

But before we begin, I just want to thank Michael Hinze for the various slider examples he has shared over the years. I'm pretty sure everything I'm about to share I learnt from him! Thanks Michael.

Preparing Your Images

The first thing to do is get your images right.

Let's consider the two examples below:

Example progress bar

As you can see, the second example is a lot smoother than the first example. That is because it has more states. For reference, here are the images used to create this example:

Various states used to construct progress bar example

As we reduce the size of the transitions between each state, the animation will get smoother.

This is good, as it creates a much nicer experience for the learner.

For this tutorial, we will be using some images kindly provided by my mate Steve Colucci.

As you can see below, the difference between these images is very small:

Three pictures showing a gradual transition between states

If you can't spot the difference between these images, look at the gap between the feet. These tiny graduations will result in a very smooth transition as the learner moves the slider.

Setting Up Your Slider

Now that we have our images organised, let's set up our slider in Storyline by going to Insert > Controls > Sliders:

Insert slider

We can then change the design of the slider by playing around with the options in the Slider Tools > Format tab. Once satisfied with the look, we can go to the Slider Tools > Design tab:

Slider Tools tab

Note that this tab is only available when the slider is selected.

The only thing that we need to change here is the End value. We want this to reflect the number of different images that we are going to include in our interaction.

This slider will update a variable called Slider1 every time it is moved, like this:

But of course, instead of showing a number, we want to get our image to do the moving. So let's get on to that.

Warning, Repetitive Steps Ahead

The next part of this process isn't fun.

Whenever dealing with tasks that require repetitive clicking motions you need to be mindful of your health.

Please take your time setting this up and if you notice any pain in your fingers, hands or wrists, take a break, do some gentle stretches, have a cuppa, then go for a nice leisurely bike ride.

Because bike riding is fun.

And RSI is no joke.

Setting Up Our Image

Next, we need to add our image and then go to States > Edit States:

Edit states button

Then we can select the New State button and give the state a logical name:

Name state

Once the new state is created, we can right-click on the image and select Change Picture and then navigate to the next image in the series.

Change picture

Then, we can go through that process again 58 more times! (Or more or less, depending on how many images you are working with).

To help minimise the repetitive clicking during this phase, it is a good idea to add the Change Picture command to Storyline's Quick Access Toolbar so that you can trigger it via a keyboard shortcut.

We can do this by right-clicking on the Change Picture command in the Picture Tools Format ribbon and selecting Add to Quick Access Toolbar.

We can then trigger the Change Picture command by pressing Alt + 4.

Anyway, eventually we'll end up with our 60 states:

All the states

The Triggers

Next, we need to add conditional triggers that will change the state of the image as the slider moves.

So, let's create a new trigger by clicking Create a new trigger:

Create a new trigger button

Then we can start setting up our first trigger as shown below:

Trigger wizard

So what we are saying here is:

Please change our image to the first state when the slider moves.

But that isn't enough, as we don't want it to change to the first state every time the slides moves, only if it moves to the first position.

So let's click Show Conditions, then hit that little + in the bottom right to add a new condition:

Show conditions and add a new condition

Then we can set up our condition to clarify that we only want this trigger to do its thing when the Slider1 variable equals 1:

Conditional trigger

Then it is done:

Well, the first trigger anyway!

Copy and Paste Time

Now it's copy and paste time. Make sure our trigger is selected and then hit Ctrl+C to copy, and Ctrl+V to paste. We'll need to hit Ctrl+V lots of times as we'll need a trigger for each state.

Then we simply go through the trigger list and modify each trigger as shown below:

Then, we are really done setting this up!

Here's a Demo

Here is a demo that shows how this works when published:

Files You Might Need:

Here is the .story file that was used in this example.

Frequently Asked Questions:

Q. Why did you make a demo using so many different states?
A. Because I wanted to demonstrate how good this could look.

Q. Does this work in HTML5? (i.e. will it work on my phone and tablet?)
A. Yes, it will.

Q. Didn't all that clicking get a bit tedious?
A. Yes, but I did it for you... because I like you.

Q. Will this work in Articulate Mobile Player?
A. Yes, it will.

Q. Will this work in an LMS?
A. Yes, it will, I've tested it in SCORM Cloud and it worked perfectly.

Q. Do Articulate support this method?
A. Yes, they do. Although I imagine that they would also like you to be careful with all that repetitive clicking.

Q. My question isn't listed here, what should I do?
A. Slide your way down to the comments below or contact me.

Q. You're silly.
A. Correct... and that's not a question.

If you found this tutorial helpful and think others in your network will also, please share using the share buttons below. Thanks!

Matthew Bibby

Matthew Bibby

I'm Matt. I'm an eLearning Consultant. I help people like you develop memorable, engaging and profitable training programs. What do you need a hand with?