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
Community Member
This is really weird.
It doesn't work when I try to build it from scratch, even copy-pasting your slides, or objets and scripts (I do pay attention to the webObjectURL value that changes for each project).
If I take your example but recreate the webOject to point to my version of the .js file, it still works.
If I then remove the 2nd slide of your example, and then paste two of my slides, it doesn't work anymore, the .js file isn't downloaded anymore, I get no more console.log messages. But my 2 slides appear after your "firstSlide", so I don't understand why suddenly their presence would prevent the .js from being loaded.
MathNotermans-9
9 months agoCommunity Member
Either share your file so i can check it, or record the steps your takin so i might see what you doing differently....