Forum Discussion
MathNotermans-9
3 years agoCommunity Member
Global scope for Javascript variables in Storyline
As Storyline publishes all code and variables to separate functions in the user.js file the scope for individual variables is local. The solution i show here creates a global scope for functions and...
EmmanuelNdlec
8 months agoCommunity Member
Hi Math,
I'm having hard trying to to make this work, I don't get the console.log messages with my work, while it does appear with your example.
How do you figure the value of webObjectURL ? Do you publish a first time to see the name of the folder the publication process creates, and then rewrite it in the first javascript executed in the first slide, or is there any other way to get that name ?
- MathNotermans-98 months agoCommunity Member
Yes. Publish when webObject is added. Open up published folder and copy the name of the folder... and use that in your script. It will only change when deleting and readding your webObject.