Forum Discussion
Get Built-in variable (Slide.Id) when following storyline course
Hi,
As mentioned in the title, I like to know whether I can get the value of a built-in variable when executing JavaScript triggers. Specially Slide.Id variable when publishing a storyline in xApi format. I like to get the current slide when someone follows the articulate course. I want to get it as any output (variable, json, object) and use it outside of the package (in my project). How can I achieve something like this? I tried this way. But I couldn't get the value of the Slide.Id properly.
var player = GetPlayer();
player.SetVar("CurrentSlide", Slide.Id);
var getSlideId = player.GetVar("CurrentSlide");
alert("SlideID from variable: " + getSlideId );
This is my JavaScript code. I tried using "Slide.Id", "%Slide.Id%", %Slide.Id% as well. But nothing seems to work. Any help regarding this would be much appreciated.