Use variable values in story.html from variables JavaScript created in Storyline2

May 16, 2015

Hello,
I figured out how to create variables in storyline 2 and give their value to variables in JavaScript.
I understand also the reverse passage, from a variable javascript to storyline 2.
Now I would like to use the value of variables in JavaScript file story.html.
I also created an external library with a function to post the values, i modified story.html, but the values do not flow from the storyline on story.html.

You have any useful tip?
Thanks

var player = GetPlayer();
var nomeJ = player.GetVar("nome");
var cognomeJ = player.GetVar("cognome");
var nome_file = player.GetVar("file");
var nominativoJ = nomeJ + " - " + cognomeJ;
alert("Nome: " + nomeJ + " -  Cognome: " + cognomeJ +  " -  Nome File: " + nome_file +  " -  Nominativo: " + nominativoJ);
player.SetVar("nominativo",nominativoJ);

1 Reply

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