Need a fresh pair of eyes on some JavaScript code
May 03, 2017
The JavaScript code in the attached story file works perfectly when the project runs in Flash but not in html5. When you tab to the next field in the html version the totals increment by some crazy values.
I have attached a flash version and an html5 version so that you can see the difference.
html5 output: https://360.articulate.com/review/content/4f158dc1-2476-4243-ad10-d6fc471db6f6/review
Falsh output: https://360.articulate.com/review/content/25ab0d95-fdc4-4511-85aa-e87540278bb0/review
I have been looking at the code for so long now that I think I need some fresh eyes on it. I have attached the story 2 file if anyone wants to take a look and help me out.
4 Replies
Hello Nancy
just declare var newP as number at all instances.
var newP = Number(player.GetVar("miscPercent"));
good work!
yes, let me know the result.
Thank you so much Pankaj, it now works perfectly.
Thanks for taking the time to look at the code. I really appreciate it.
This discussion is closed. You can start a new discussion or contact Articulate Support.