Checking for the LMS API

Feb 15, 2019

Hello Storyline people,
I am trying to write some JS code that will check to see if the LMS API is still present(AKA Parent/Launching window) on each timeline start. If the API has been closed or navigated away from I want to pop an alert msg.

There has to be a variable in one of the .js somewhere I can check.

Looking in LMS.JS line 29.

if (lmsAPI && lmsAPI.IsLmsPresent)
{
 g_bAPIPresent = true;
 g_bLMSPresent = lmsAPI.IsLmsPresent();
}

In Storyline I can grab these two variables and read them out. I get true on both of them. So I write a quick if statement  VARS != true alert(msg);. As long as the API is open I will get my two true statements. If I close my API window. I get nothing. My error if statement will not fire.

Any help?

Thanks
B
p.s. No need to post the best practices default thread. This is way beyond that.

Be the first to reply

This discussion is closed. You can start a new discussion or contact Articulate Support.