Forum Discussion
How to display 2-decimal places in variable calculations?
Holly, I rewrote your JavaScript. Plus, I moved a few triggers around (you were hiding layers before they completed all their triggers). I think the JavaScript is now providing the number format you're seeking but I'm not sure if the whole activity is working the way you want it; I'd need to understand it a bit more.
I added a couple of triggers to initialize two variables when the slide starts. The latter will be important if the user is able to come back to the slide. You'll want to consider resetting the sliders to 0 and adjust the other associated variables to their default values when the timeline starts if users will be able to revisit this slide.
Steve,
Thank you so so much! I was able to get it all working with your help. I just provided a small sample from the prototype I developed a while back since it is client work. For the main file, I did reset all of the variables when the timeline restarts because the learner does have the option to "play again." Really appreciate you taking the time to help with this!!! :)
- SteveGannon2 years agoCommunity Member
I'm glad that worked for you, Holly. Good luck with the project!