Forum Discussion
Javascript That Works - Throwing Errors & Failing?
My guess is the javascript scoping and dependencies are mixed up, with multiple instances of global variables. You are welcome to PM if you can provide the published .zip file so I can take a crack at the embedded javascript. For the record, "actionator" isn't a standard javascript object, so you are using some element of custom javascript already
- MathNotermans-95 years agoCommunity Member
As Brian states...its probably scope related. All triggers in Storyline have their own scope. Being all variables and functions in it only work on that particular slide. So if you call function A from another slide without taking care of that...by either creating global variables to pass values or by adding the functions to a more global spot from where they are overall reachable...well then your scripts will fail and a message like above will be shown.
Using the console ( CTRL+SHIFT+I or F12 ) when testing you can figure out what function is out of scope and fix it. If all functions and scripts are out of scope... you best copy all out of your triggers, create some general script thats on the index page...and in the triggers only call the function.Gladly help... but do need the Story for that.. i guess its not just a single function out of scope but a lot.