Blog Post

Articles
8 MIN READ

How I Built This Recycling Parallax Interaction in Storyline 360

SarahHodge's avatar
SarahHodge
Former Staff
2 years ago

If you’ve ever been on a road trip and gazed out the side window (hopefully only as a passenger 😉), you’ve probably noticed that objects close to you—like trees—appear to zip by really fast, while objects further in the distance—such as mountains—seem to barely move. This phenomenon is known as motion parallax. 

In the digital world, the parallax effect gives the illusion of depth and movement. Combine that with a realistic learning scenario—like in this Recycling Guide example—and you’ve got yourself a truly engaging interaction.

View | Download

Let’s take a look at how to create this interactive parallax example in Storyline 360!

Create layered components

To create a parallax effect you need several layered components that move at different speeds. So, the first thing I did was create all my slide elements with the different layers in mind. Using a combination of shapes in Storyline 360 and Content Library 360 assets, I ended up with six layered components.

Component 1: Recycling bin 

For this example, I wanted the recycling bin to be the main focus—after all, that’s what the course is all about. Since I planned to tilt the bin and make the wheels spin, having it front and center would give the optical illusion that the bin was rolling as the background moved.

Component 2: Park

Next, I needed to create the main interactive piece—the park. This is the only component that learners engage with to reveal additional content, so I was very intentional about how I designed the space. Since the graphics were going to move horizontally, I made sure to extend those designs past the slide size. I carefully placed each object—such as buttons and litter—in different parts of the park and in a specific order to help guide the experience. And because I used only Content Library 360 icons/illustrations and simple shapes, it was easy to move things around and reposition them as needed.

Pro tip: Before duplicating a button, create all the states beforehand so they copy over. Big time-saver! 

Component 3: Mountains (light)

To add a sense of depth and movement, I included mountains in the background. I combined several different mountain-shaped icons to create the extra-wide graphic. I made the first mountain layer a light tan color since objects up close are generally lighter in color. 

Component 4: Mountains (dark)

Behind the lightly colored mountains, I added a darker version for contrast. To save time, I copied and pasted some of the shapes from the lighter mountain. Since not all mountains look alike, I flipped and resized some of the shapes so that when they moved, they didn’t line up exactly the same.  

Component 5: Sky

The scene wouldn’t be complete without a sky! I added a sun for reference. I mostly kept this component simple to save time and to keep the main focus on content. 

Component 6: Frame (optional)

Okay, so this is where it gets a little tricky. I could’ve made things easier by extending the sky and ground to fill the slide. That way, I wouldn’t need a frame and objects could freely animate on and off the rectangular slide. But I really wanted to create a unique learning experience. 

To give this course a custom look and feel I designed a frame to show content within a unique shape. 

The frame is comprised of the title, a white border, arrow buttons, a background, and two side shapes to match so that the other components only show inside the unique shape. 

Pro tip: To make the slide look seamless with the player background, go to your Player settings and change the background color to match.

And here’s how it all looks together.

Save static objects 

Once I created all the components, I realized there were a lot of objects on my slide. So, I decided to make my file easier to manage by saving some of the layered components that had a lot of objects—such as the Park, Mountains (Light), and Mountains (Dark)—as their own image and then replacing them with a scalable vector graphic (SVG) to keep image quality. 

For example, I selected all the objects in the Mountains (Dark) component, right-clicked, and selected Export Shape as Picture.

I saved the shapes as a PNG. For the best image quality, I simply opened that PNG file in Adobe Illustrator and saved it as an SVG. I went back to my Storyline 360 project, inserted and resized my SVG to match the objects on the slide, and then deleted all of the Mountains (Dark) objects. 

I repeated this process with the Mountains (Light) component. 

For the Park component, I took a few extra steps before exporting it as a picture since it had a lot of interactive elements and I only wanted to save the static parts of the image. On the timeline, I clicked the eye icon to hide objects with states, animations, and text so I could still edit them or assign triggers at any time.

Here are all of the static components I exported as a shape to save as an SVG.

And for context, here are all the elements I did not include in the export. 

After inserting and resizing the Park SVG, I moved it beneath the hidden park objects on the timeline. I selected the eye icons to make all the Park components visible again where they remained in the same location as designed. Then, I grouped them and renamed the group “Park.”  

Saving some of the components as an SVG really sped up my workflow. With fewer objects on my timeline, it was easier to select the ones I wanted to edit or add triggers to. It also reduced the file size so content could load faster. To learn more about scalable vector graphics (SVG), check out this article: Storyline 360: SVG Support.

Get things moving

With all the graphics on the base layer in place, I created several additional layers to reveal content and help tell the story. Now it was time to connect everything with movement. To explain how to create the parallax effect, let’s roll through the example.😊

Background

When you move right, the background moves left, making it look like the recycling bin is rolling forward. 

If you move left, those same background components move right, making it look like the recycling bin is rolling backward.  

To create this parallax effect, I added motion path animations to move some of the background components—Park, Mountains (Light), and Mountains (Dark).

And in case you didn’t already know, you can add more than one motion path to the same object. That feature really came in handy here. For each component, I added a Left and Right line motion path. 

Since I wanted the components to all move at the same pace, I edited the easing direction to None for each motion path. 

I also selected Relative Start Point to ensure each component always moved from its current position. 

Next, I changed the duration of the paths to one second.

   

I chose this duration because I planned to have the recycling bin roll left or right for one second as well. That way, all the animations would stop and start at the same time. 

To make it easier to manage triggers later on, I also renamed the motion paths to include the component name and the direction of the path. For example, I named the motion path that moves the park group right “Park Right.”

Next, I changed the length of the paths. This is where it differs for each component. Since I wanted the background objects to move at a slower speed than the foreground objects, I edited the left and right motion path lengths for each component to the following.  

  • Park: 180 px 
  • Mountains (Light): 90 px
  • Mountains (Dark): 40 px 

Using these settings, the furthest-away component, Mountains (Dark), would only move left and right 40 px during the one-second duration. Whereas, Mountains (Light) would move about twice the distance, at 90 px, during that same time.

And that was it for the motion path settings! Now it was time to add triggers to make these components move in the right direction. By default, when you add a motion path animation to an object, a trigger is automatically created. Since I wanted the components to move based on the user selecting Right or Left, I deleted those triggers from the base layer and instead added them to the Bin Right and Bin Left layers. 

On the Bin Left layer, I added triggers to move the components right when the timeline starts.

And on the Bin Right layer, I added triggers to move the components left when the timeline starts. 

Now, when the learner selects Left or Right, they’ll see the background move accordingly. 

Recycling bin 

Now for the recycling bin. I put it front and center to make it appear like it was rolling when the background moved. 

When you go right, the bin tilts and rolls forward. When you move left, it tilts and moves backward. After one second, the animations stop and the recycling bin returns to its upright position. 

To create this optical illusion, on the Bin Right and Bin Left layers I hid the recycling bin that was on the base layer so it was no longer visible.

In its place, I added a tilted bin with dirt paths depending on the direction it was going to move.  

Bin left layer

Bin right layer

 

Next, I added a Spin entrance animation to the wheels. Just like a regular wheel, if you go left, the wheel’s direction moves counterclockwise. 

If you go right, the wheel’s direction moves clockwise. 

As for the amount it spins in each direction, I landed on a quarter spin since that looked the most accurate. 

To emphasize the direction the recycling bin was moving, I included dirt paths and added Wipe and Fade animations. 

And because both the duration of the background components and the timeline on these layers are set to only one second, all the animations come to a stop at the same time.

To ensure the recycling bin returned to its original upright position, I added a trigger to hide whichever layer you’re on—Bin Left or Bin Right—when the timeline ends.

The learner automatically returns to the base layer, where they can continue the learning journey.  

Set boundaries 

With the freedom to move the recycling bin left and right as you please, you may be wondering how I stopped the background components from moving too far. 

If you go left at the very beginning, you’ll see a little tortoise and a deactivated Left button so you can’t move any further. 

To keep learners from navigating outside of the main area, I needed to set some boundaries. To achieve this, I added a Deactivated button over the Left button that only shows when you navigate to that side of the screen. To make the button visible, I added a transparent shape and pasted it inside the existing group, “Park.” 

When you navigate left, the Park group moves right, causing the bin and the transparent shape to intersect, which changes the Deactivated button to Normal (visible). When you navigate away, it stops intersecting and returns to its original hidden state.

I used this same technique at the end of the learning experience. 

When the recycling bin intersects with the transparent shape next to the house, it shows the final layer. 

This allowed me to end the parallax learning experience at the end of the graphic.

Wrap-Up

And that’s all there is to it! Using the parallax effect can create an engaging learning experience that truly brings your content to life. If you haven’t already, download this Recycling Guide project to take a closer look at how I built it. 

For more advice on working with motion paths, head on over to this article: 7 Pro Tips for Working With Motion Path Animations in Storyline 360.

If you want to see more ways to create a motion effect, check out this webinar: Create Parallax Effects With Sliders in Storyline 360.

Want to try to create your own parallax example, but don’t have Articulate 360? Start a free 30-day trial, and come back to E-Learning Heroes regularly for more helpful advice on everything related to e-learning. If you have any questions, please share them in the comments.

Published 2 years ago
Version 1.0
  • SuHo's avatar
    SuHo
    Community Member

    Dear Sarah, thank you very much for your great example and the possibility to download it! I work for the railway in Austria and would like to modify your file and make it available to my colleagues. Am I allowed to do that and how am I allowed to record your authorship there? Thank you and best regards, Susanne
    • SarahHodge's avatar
      SarahHodge
      Former Staff
      Glad you like it, Su Ho! Sorry for the late reply. Feel free to use the file and customize it for your needs.
  • Hi Sarah! I love the interactive you built, along with the instructions as they were very helpful! I may need your assistance as I am creating a project similar to yours. The motion paths work, however the city restarts and I would like the city to resume where the user left off after clicking an activity button. I'd like to show you the Storyline project I am working on. Where is a good place to upload that?
  • Thank you. Sarah, for sharing all the great techniques in this project! I downloaded the SL file and have been playing around with it! I have to say you are so creative!
  • Thank you Sarah for the lovely explanation. I saw it hot off the press! You are always very thorough and inspirational. Your creativity is infectious :-) Keep creating those masterpieces for all to learn from!