Hello. I'm a developer and I'm evaluating the Storyline product for one of my clients as a solution to our project. Assuming we could use storyline to meet our needs Is there a rudimentary way of communicating with the flash/html5 player? I am just now learning about SCORM and the various API's that are out there. we only require a small portion of what is represented in SCORM functionality. Thanks for your help.
You can communicate between the browser and the player for both Flash and HTML5 outputs using GetVar and SetVar.
var player=GetPlayer();
var jsTemp=player.GetVar("aStorylineVariable");
player.SetVar("aStorylineVariable","A Value "+ aVariable);
There are a few other things you can do in HTML5 but this is the only API connection that allows you to communicate TO Storyline. You can use a JavaScript trigger to communicate OUT, but retrieving and setting values still requires the GetVar and SetVar methods.
Hi Cory - none of the player system variables are exposed, unfortunately. There's an object that you can use to access quiz responses but it's not documented or straight forward. Looking at the print results output provides a few clues.
The GetPlayer method only sets and gets variables defined by authors.
6 Replies
You can communicate between the browser and the player for both Flash and HTML5 outputs using GetVar and SetVar.
var player=GetPlayer();
var jsTemp=player.GetVar("aStorylineVariable");
player.SetVar("aStorylineVariable","A Value "+ aVariable);
There are a few other things you can do in HTML5 but this is the only API connection that allows you to communicate TO Storyline. You can use a JavaScript trigger to communicate OUT, but retrieving and setting values still requires the GetVar and SetVar methods.
Steve,
thank you for your quick reply! I also found that triggers can launch javascript procedures. This information is very helpful!
One lingering question : is this limited to user-defined variables? if not, is there a basic list somewhere that lists them?
Thanks again for your help on this.
Cory
clarification from last message: I am inquiring about non-user defined variables : quiz responses, current slide, etc.
Thanks again!
Hi Cory - none of the player system variables are exposed, unfortunately. There's an object that you can use to access quiz responses but it's not documented or straight forward. Looking at the print results output provides a few clues.
The GetPlayer method only sets and gets variables defined by authors.
HI Cory,
Welcome to Heroes!
I'm happy Steve was able to assist you here, but let us know if you need anything else!
Steve and Ashley. Thank you for our help in answering my questions. Very Helpful!
This discussion is closed. You can start a new discussion or contact Articulate Support.