Creating a Pop Up Message for Inactivity

Nov 04, 2022

Hi,

Does anyone know how to create a Javascript to display a pop up message or an alert when a learner is inactive beyond 10 minutes?

 

 

1 Reply
Daniel Canaveral

Hi Ngoc. I'm sure one of the many JavaScript experts in the community will come in and provide a much simpler solution...but in the meantime, you could set up a timer (off-screen) in SL that counts down when the user does not interact with the main components (in the attached project file, the user is expected to interact with the map). Once it reaches zero, the layer containing the pop-up message appears. Clicking the button on that layer will reset the timer on the base layer and hide the layer.

Triggers can be set up so that the time resets every time the user interacts with one of the main components. I have the timer placed off the stage at the moment. If you'd like to see how the timer resets, you can drag it on-screen temporarily.