variables
7 TopicsVariable not changing button state
I've got a pretty complicated situation. I am creating a compliance course that a user must be in each module for 30 minutes. There are 9 modules. When the course begins, they can't leave the course, open another browser tab, click on a different monitor screen, etc. Also, if they do any of these, their time stops and resumes when they return to the course and a popup layer tells them that they need to resume and that their time has stopped. Everything works great except that I've got a variable, %correctedElapsedTime%, that shows the actual time that they've been in the course. Essentially, it subtracts the time away from the built in %Project.ElapsedTime% and shows a running timer in the corner of the slide the whole time. I want a button to change states to normal when %correctedElapsedTime% has been met. Right now, I can only get the button to change when it is triggered by %Project.ElapsedTime%. %correctedElapsedTime% is a text variable with a value of MM:SS and %Project.ElapsedTime% is a number variable with a value of 0. I think this is where the problem may be. It also may be that my timer is somehow skipping over the 18000000 ms to meet the 30 min time constraint. Any thoughts? Slide triggers Master slide javascript and triggers Javascript var player = GetPlayer(); var elapsedTime = 0; var timer = null; var isTabActive = true; var isFocused = true; var inactivityTime = 0; var inactivityLimit = 120; var inactivityTimer = null; // Load saved elapsed time if (player.GetVar("correctedElapsedTime")) { var savedTime = player.GetVar("correctedElapsedTime").split(":"); elapsedTime = parseInt(savedTime[0]) * 60 + parseInt(savedTime[1]); } // Update elapsed time function updateElapsedTime() { if (isTabActive && isFocused) { elapsedTime++; var minutes = Math.floor(elapsedTime / 60); var seconds = elapsedTime % 60; var formattedTime = minutes + ":" + (seconds < 10 ? "0" : "") + seconds; player.SetVar("correctedElapsedTime", formattedTime); } } // Start elapsed time counter function startTimer() { if (timer === null) { timer = setInterval(updateElapsedTime, 1000); } } // Stop elapsed time counter function stopTimer() { if (timer !== null) { clearInterval(timer); timer = null; } } // **Inactivity Timer Functions** function resetInactivityTimer() { inactivityTime = 0; // Reset inactivity timer player.SetVar("showPopUpLayer", false); // Hide pop-up if user is active } function trackInactivity() { inactivityTime++; if (inactivityTime >= inactivityLimit) { player.SetVar("showPopUpLayer", true); stopTimer(); } } // **Event Listeners to Reset Inactivity Timer** document.addEventListener("mousemove", resetInactivityTimer); document.addEventListener("keydown", resetInactivityTimer); document.addEventListener("touchstart", resetInactivityTimer); // **Start inactivity tracker** function startInactivityTimer() { if (inactivityTimer === null) { inactivityTimer = setInterval(trackInactivity, 1000); } } // **Detect window focus loss** window.addEventListener("blur", function() { isFocused = false; player.SetVar("isFocused", false); player.SetVar("showPopUpLayer", true); // Show pop-up when window is blurred stopTimer(); }); // **Detect window focus gain** window.addEventListener("focus", function() { isFocused = true; player.SetVar("isFocused", true); player.SetVar("showPopUpLayer", false); startTimer(); }); // **Detect when tab visibility changes** document.addEventListener("visibilitychange", function() { if (document.hidden) { isTabActive = false; player.SetVar("isTabActive", false); setTimeout(function() { player.SetVar("showPopUpLayer", true); // Ensure pop-up layer appears }, 500); // Delay helps trigger the layer reliably stopTimer(); } else { isTabActive = true; player.SetVar("isTabActive", true); player.SetVar("showPopUpLayer", false); startTimer(); } }); // **Start timers** startTimer(); startInactivityTimer();45Views0likes5CommentsAdjust text variables Storyline 360
Hi everyone, I have a project that required translation (into Japanese in this particular case), and I couldn't come across a solution to edit the text for the variable's text itself. This is the variable: This is the text displaying in the Review, and as an example, I would need to move up the dot, or move down some characters (as per legibility purposes). Is there a way to add some line breaks to this feedback text? It is not possible to edit it from the Usage for variable ... windows. I'm using the latest update available for Windows 10, x64 Thank you!114Views0likes8CommentsDealing with the naming of variables
Hello Storyline developers, I wonder how you deal with the following situation: I have made an e-learning with +/- 80 slides and to prevent errors I have created new variables for every slide (because Storyline doesn't have the concept of slide variables: variables attached to one slide). My variables have now the following naming convention: slide[scene and slide number]_[description of variabele]. For example: slide414_moveSidebarUp. The problem with this naming convention is that if I want to add a new slide before slide 4.14, I have the change the names of all the variables on slide 4.14 (now slide 4.15) and all the slides thereafter (in that scene). The solution would be to create a short hash for every slide, but I'm too late for that now. Does anybody have another kind of solution? Thanks in advance!Solved225Views0likes9CommentsNeed Help - Using Variables to Select Slides from a "Bank" Using Multiple Criteria Checks
Good morning! I'm starting to work (for the first time) on an historically challenging project at my company. My boss wants me to solve our past issues, so I'm reaching out to the experts from the get-go. Every year we distribute a training that highlights all of the significant changes to our policy and procedure documentation. It's like a shortcut "table of contents" so they know what has been updated without having to read through ALL of the policies and procedures and hope they recognize the change. In the past, learners logged in and chose a "business area" that relates to their job role (there are 12). Sometimes they need to select more than one. I like to think of these "business areas" like metatags on the sea of documentation we are working with. For example, a procedure might related to only one of these "business areas" -- or it could related to five of them. Bottom line is that I would love for a learner to click all of the business areas that related to their job role, and then go on a customized slide journey of all the relevant documentation. Keep in mind, some of these "business areas" might over overlap in the documentation. There is also a "view all" option. There are also links to policy and procedure docs that need to be embedded. I am new to variables and more than a little intimidated. I can see it working in my head, but I don't know where to start. Any and all help, advice, etc. would be GREATLY appreciated. I am just starting the project and trying to storyboard it out. Thank you!98Views0likes7CommentsExpor data to google sheet and pdf
Hello, excellent idea to focus knowledge. Can you help me with two issues that I have been trying to solve for some time and surely for you it is very easy. I consider that exporting the information of the variables that we create in storyline to google, sheets, pdf, word, etc, for users is important to document the experiences and information for further consultation and decision making, create custom boards, but more powerful as an example: https://miro.com/. Considering the above: 1. How do I export the data of two, three, four, n.. storyline variables to the google shets columns? 2. ¿How do I generate a pdf with the data of two, three, four, n.. storyline variables and control the properties of the pdf, letter, legal, tabloid, etc.. and can I customize a background for that pdf. ? Thanks, Julio Cesar Bonilla Pardo165Views2likes2Comments