Forum Discussion
GSAP Articulate Storyline 360 Restart Issue
Hello Nathan,
Thanks for your response. Unfortunately, the progress bar being persistent is intentional. That is not our issue. The progress bar as it is in the Story file is what we want it to be.
The only issue is when reaching the last slide, you hit the "Restart Course" button. And it should also reinitialize or restart the progress bar, which it does(given our efforts on the code) but it won't function anymore(check console logs) after the course is restarted. We want the progress bar to function again when the course is restarted.
Let me know your thoughts on the matter. Thanks!
OK. I played with your 6 slide example. Consider these...
- Your SL_currentslide variable is set to SlidesViewed instead of SlideNumber, so it never goes below the max. Because of this, the progress bar is not shown on restart because it is being reset on each new slide vist (as indicated in the inspector). Changing it to Project.SlideNumber makes the progress bar work after restart.
- Your call to gsap.revert()
- I believe revert() is only a function for an instance of a timeline, not just gsap in general. This is causing an error. I tried commenting it out.
- You try to set SL_currentProgress in the resetProgressBar function. There is no such variable. I tried commenting it out.
- You call for the progress bar reset on slide 6, but in your slide structure, 6 is the second to last slide (5 is the last). As such, the second to last slide has no progress bar shown since it is being reset. Chaging the check to slide 5 shows the bar on the second to last slide (6), but moves the progress bar to position 6. You may need to reorder/restructure your slides to be in numeric order.
I tried these changes in your 6 slide example and it seemed to work, with the caveats described. These may be of some help.
- Azalenth3 months agoCommunity Member
Hello again Nathan!
Glad to let you know that this fixed the issue with the progress bar not resetting properly on restart course.
I understand why we needed to use SlideNumber instead of SlidesViewed.
But the main module we're working on requires us to use SlidesViewed (as we track their progress via the progress bar based on all slides viewed).
So returning it back to SlideNumber would void all our progress thus far. Can you suggest a solution we could work around that would make it so we can use SlidesViewed and have the progress bar also functional on restart? Or maybe an alternative?
Thank you again for your time and patience.- Nathan_Hilliard3 months agoCommunity Member
Perhaps add another variable for SlideNumber that can be used by the reset function, allowing the other variable to remain as SlidesViewed.