Forum Discussion
Reset multiple variables to default values
Steve Gannon said:
Thanks for the clarification, Chris. In that case, you could execute some JavaScript via the Execute JavaScript trigger to reset the variables, such as in the code between the dashed lines below:
---------
var player = GetPlayer();
player.SetVar("variable1", "John");
player.SetVar("variable2", "Doe");----------
You would replace "variable1" and "variable2" with the variable names just as they're spelled in your Storyline file. The text in quotes after the variable names represent the values you want to reset the variables to. Remember you'll need to publish your file before you can test the JavaScript. And remember it won't work in the AMP app on the iPad.
Hi Steve,
Thanks for your support. I tried the code:
---------
var player = GetPlayer();
player.SetVar("variable1", "John");
player.SetVar("variable2", "Doe");
----------
It's working fine in almost all the browsers except IE7. Is that code is not compatible for IE7 browsers? Please provide me some solution, how can we use this code in Internet Explorer 7 browser.
Awaiting for your helpful response.
Thanks,
Uday
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago