7 Replies
Matthew Bibby

You can do this using JavaScript.

If you have a text variable in Storyline called viewing, use this JavaScript to determine if the Flash or HTML5 output is being viewed:

var player = GetPlayer();
if (/html5/.test(window.location.href)) {
player.SetVar("viewing","HTML5");
} else {
player.SetVar("viewing","Flash");
}

When executed, this code will check if the HTML5 or Flash output is being viewed and will update the viewing variable with either HTML5 or Flash. You can then use that variable to determine how your other triggers behave...

Jason Lampitt

Excellent suggestion, Matt. Thank you.

Can I press a bit more and inquire how we might handle that if HTML5 is being utilized on both platforms?

Is there a 'developers reference guide' I can look at that defines methods and variables present within Storyline? I'm an ECMAScript developer by profession, but I don't have any familiarity with Storyline, and am assisting a teammate who is actually creating the course, but is less familiar with scripting.

Matthew Bibby

Hey Jason,

This page shows what is supported in Storyline's HTML5 output and what is supported in the Flash output. 

As far as coding goes, there isn't much you can do with Storyline. You can get and set variables (as outlined here) but you can't directly interact with objects in Storyline. 

Hope that helps clarify what's possible...