SL 360 - Flip cards interaction using JavaScript and CSS

Jul 15, 2020

Hi,

I'm learning JavaScript specifically to be able to extend interactions in Storyline. I want to create a flip-card interaction to reveal more information and I have a concept on Codepen.io using the concept. But now I'm trying to figure out how to apply in an SL slide. It relies on CSS classes and I'm not sure how to add a CSS class in SL.

Here's the Codepen.io sample functionality: https://codepen.io/kthayer-git/pen/KKVqLyo?editors=0010

Thanks for any suggestions/tips.

16 Replies
Dave Cox

Hi Kris,

You don't really need a special place to store an html page. It is just a file then an .html extension. You can even publish it as part of your storyline project, although would have add it to the .zip file yourself.

If you want to practice working with HTML and CSS, all that you must have, is a pure text editor (Notepad works) and a browser. There are a lot of really good HTML editors on the internet that make it a lot easier as well.

Dave

Sanduni Fernando

Hi Kris,

When you use "Insert --> Webojbects" in SL, the HTML page using created locally will store in WebOjbects folder in "Story_content" folder upon publishing to Web or LMS. So you don't have to worry about the path. You can deliver or transfer the zip file as it is without worrying about the HTML page inside. 

This way, you don't have to use a separate server to store HTML pages created locally.

Dave Cox

Hi Kris,

Yes, you can. 

A web object is really just a simple web page, and you can internalize it into your project.

Here is some really good information about how to use web objects.

But then, here is the fun part that they don't tell you.

If you create the web page as they've described in a folder of its own, you have created a basic web site. 

In this following image, you can see where I've created a folder called Web_Object for my test web object. Of course you can call it anything that you want.

Sample Directory Listing

Inside of that folder I have a file called index.html, and an image. I'm including it for you, so feel free to check it out. For convenience, I placed this file right next to my project file, but it can be anywhere on your system.

Now that you have your web object, in Storyline select insert Web Object. Click the folder icon to the right of the Address line, and select the folder where you have your Web Object.

Insert Web Object

When you publish your project, Storyline will make a copy of the file inside of its own folder structure, and save the web object as an internal part of the project. It is good to know where this is in the published folder, because sometimes storyline will miss some of the extra files that you may need. So if you open your published files, and drill into the directories to C:\StorylineProjectName\story_content\WebObjects\SomeStrangeFileName\index.html you will see your web object files. I've found that if my Web Objects don't play correct, I can just drag a copy of everything in my source web object folder into this folder. 

Then run the storyline starting file like normal. For mine I run story.html, and you can see your web object on a storyline slide in all of its wonderful glory.

I'm including both test storyline file, my published file and the web object for you to examen for yourself.

Best regards,

Dave