Issues with JavaScript in Storyline 360

Jan 11, 2019

Our team have recently undergone the process of converting some of our existing storyline 2 courses into storyline 3, to see if purchasing a SL3 license is a worthwhile investment for the business. Overall we are happy with the features offered by the new software, but have come across a glaring issue that is preventing us from being able make the leap.

We have found that after converting and publishing an existing course from SL3, our embedded JavaScript functions are no longer executing. This erroneous behavior seems to only occur when viewing the HTML5 output via a desktop (tested in IE, Firefox and Chrome). The aforementioned JavaScript seems to work perfectly fine however, when viewing the flash version of the course and the HTML5 version from a mobile device.

Is this an issue that anyone else has experienced since converting your courses?

Thanks in advance,

Chris

6 Replies
Ashley Terwilliger-Pollard

Hi Chris,

What type of Javascript functions were you using? Since Storyline 3 (and Storyline 360) involved a rewrite of our HTML5 output and publishing engine, some of the custom/community workarounds to access player variables will no longer work. 

If there is a specific variable or function you're looking for, we'd love hear more about what you would like to see regarding this if you're up for logging a feature request.

In the meantime, you can also find our best practices on using Javascript with Storyline 3 here. 

Zsolt Olah

If you post an example, we can take a look.

One thing I've run into when moving from SL 2 to SL 3 is that for some reason the user.js file that used to be loaded at the bottom of the index.html is now loading earlier. What that means sometimes is the if you use a GetPlayer() function in your JavaScript, the player is not ready yet. This breaks everything else after in JS.

Again, without seeing the error you're getting (turn on the developer window), it's hard to tell.

Chris Leversha

Hey Guys, 

Thanks for your responses, and apologies that it has taken a short while to respond.

After having a look, I suspect this is likely a similar problem that Adam Trosper reported in the thread linked above

I'm embarrassed to admit that I'm not entirely sure how to implement the solutions mentioned in the aforementioned thread, into our JavaScript (I'm not really a developer, so much of this stuff goes waaay over my head).

Attached is a Storyline (3) file which has all of our troublesome JavaScript compiled onto a single slide. 

I've included a brief description of what each snippet of JS is supposed to do in the file. - Any assistance in getting this stuff SL3-ready is extremely appreciated! :)

Thanks Guys (and Gals!)

Zsolt Olah

Hi Chris,

The layer that has the date function is working (as long as what you're trying to do is create a date string like 2019123 and then make a number out of this 2019123 and store it in the DateValue variable. It's not running now because the condition of DateExpire or whatever variable is false. If you turn it to, it works.

As far as the lsm goes, I'm not sure what this is, I've never seen SCORM_objAPI or methods/functions like csSetValue. 

lmsAPI.SCORM_objAPI.csSetValue(param1,varInput)

This discussion is closed. You can start a new discussion or contact Articulate Support.