Getting Custom Variable using player.GetVar in SL 360

For years I have been getting a custom variable in SL2, but now I am trying this in SL360 and it is not working.

The javascript is:

var player = GetPlayer();
var myQuestionID = player.GetVar("myQuestionID");

I have seen a lot of discussion around the GetPlayer and LMS object in SL360, but this article seems to suggest that it is working as shown above. I have also tried some suggestions I have seen like window.GetPlayer(), parent.GetPlayer(), etc., but those threads are old and have a lot of different opinions.

Is there a definitive answer to this now? Should I be able to retrieve my custom variable using the javascript trigger above?

Thanks.

8 Replies
renee barber

Hey, this is my experience as well. After many hours of troubleshooting, we discovered that the quotation marks matter. I copied code from another place and pasted it into my javascript. These were different than the ones that I typed. One I retyped the quotes in storyline javascript area, my code worked. This would be a nice enhancement for Storyline to recognize all quotation marks.