I added the following javascript to an 'Execute Javascript' Trigger when the first slide timeline starts.
var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.src = 'story_content/spl.js'; script.type = 'text/javascript'; head.appendChild(script)
Then placed the file spl.js into the published "story_content" folder with the following JavaScript:
var SP_Assess_Included = 0; var player = GetPlayer(); player.SetVar("assmnt",SP_Assess_Included);
Then i was able to alter the value of SP_Assess_Included after the lesson was published and the value could then be passed into the STORYLINE file at runtime, and most importantly altered without having to republish the storyline file.
1 Reply
OK so i figured out how to do this thanks to Niels van Drimmelen
https://community.articulate.com/discussions/articulate-storyline/loading-an-external-javascript-library-per-slide
I added the following javascript to an 'Execute Javascript' Trigger when the first slide timeline starts.
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.src = 'story_content/spl.js';
script.type = 'text/javascript';
head.appendChild(script)
Then placed the file spl.js into the published "story_content" folder with the following JavaScript:
var SP_Assess_Included = 0;
var player = GetPlayer();
player.SetVar("assmnt",SP_Assess_Included);
Then i was able to alter the value of SP_Assess_Included after the lesson was published and the value could then be passed into the STORYLINE file at runtime, and most importantly altered without having to republish the storyline file.
This discussion is closed. You can start a new discussion or contact Articulate Support.