Forum Discussion
A Solution to rounding in Storyline – without using Javascript
I have a similar issue, but I am not using a results slide. I am creating a conversion for Fahrenheit to Celsius and the math gives me a decimal. I have tried to incorporate the math above, but it still gives me the decimal. Does it only work on the results slide?
- DavidPrice-D16 years agoCommunity Member
I am having a similar problem as Terry. I am actually trying to show a percentage on a progress indicator and I need to strip off the 2 decimal places. I don't need to round it (but it would be handy), I just dont want a progress indicator showing x.xx%
I have been right through this thread and tried the different solutions to no avail :(
- TerryArthur16 years agoCommunity Member
David…
I finally had to use the Java solution and it works great…
2 days ago
Hello! This is what I use to round - add a trigger to execute this Java.
I usually have a variable that contains the answer, then I pass it to another variable, then run it though this script. NumberYearCalc is my answer that was passed. And RNDofNumberYearCalc is my new variable that the rounded number will be passed to.
var player = GetPlayer();
var JSRounded=Math.round(player.GetVar("NumberYearCalc"));
player.SetVar("RNDofNumberYearCalc",JSRounded);Thank you,
Terry Arthur
Training Development Analyst
Rinnai America Corporation
103 International Drive
Peachtree City, GA 30269
Phone: 800.621.9419 x4361
Direct Dial: 770.632.4361
Email: tarthur@rinnai.us
Web site: www.rinnai.us
Training site: www.trainingevents.rinnai.us
twitter: www.twitter.com/rinnai
facebook: www.facebook.com/rinnaiamerica
Rinnai America Corporation
Why Rinnai?- AllisonLaMotte6 years agoStaff
Hi Terry,
Just wanted to jump in here because I noticed that your email signature came through when you replied via email. You can remove that if you would like by clicking Edit beneath your response. Here’s a quick Peek video if you need help.