Surely there is a way to do this. I can create a trigger for each state of the variable. But this requires creating a trigger for each variable state on every slide that requires it. It would be muc...
Nathan. thanks for your input. But I can't seem to retrieve any built-in variables whatsoever. I can retrieve project variables using GetVar. All built-in variables return NULL values.
var player = GetPlayer(); var anyVariable = player.GetVar("Slide.Id"); alert( anyVariable );
The built-in variable for the slide ID is "Slide.Id" that returns NULL. I have tried other built-in variables and all return NULL.
If I use a project variable, it works correctly. Any idea why I can't retrieve built-in variables with JavaScript? I can retrieve those variables slides by typing %Slide.Id%
I don't think you can (or I don't know how) in JavaScript. To read or assign a built-in variable, you need to do it via a trigger in Storyline. That's why I suggested creating new variable slideID in SL. Set it equal to Slide.Id in a trigger, or set the value manually. You can also manually set up an array of text values in JavaScript and set it there.
See this example. Slides 1 and 3 do as you described above. Also includes some buttons and JavaScript on the Master slide as an example of jumping from an array list of IDs.