JS Difference between Flash and HTML5
I spent some time tracking down a weird issue but it came down to this:
This code adds the Storyline variables (m1,m2,m3,m4,m5) together and stores it in the
sumit JS variable.
The result in Flash is correct. It's the sum of the values.
In HTML5, the result is the "text" like 734859 (if the variables were m1=7, m2=3, m3=4, etc.) So instead of adding number together, it sticks the digits together like text. I had to modify the code to:
To make sure it treats the value as a number.
But why is it the value received as a number in Flash (correctly) but as a text in HTML5? (All Storyline variables are declared as numbers.)