Getting root URL for a resource

Feb 27, 2018

I am trying to control what happens when our learners click to download a pdf from SL resources. This is easy to do in HTML by using the "download" attribute. We had been using the PDF viewer from the elearning Bros tutorial. They are using this:

var slp = window.parent.GetPlayer();
var slPDFPathPreset = "../../external_files/";
var DEFAULT_URL = (slPDFPathPreset + slp.GetVar('storylinePDF'));

There must be more to the code because I am not getting this to work. Anybody found a way to do this? The only part I am missing is the dynamic path. 

Be the first to reply

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