i do think Storyline treats variables always as strings...so internally a Number will be converted to a string anyway...
How to do that yourself ?
So how to use strings for your input... and then convert them as Numbers..well thats easy...
to convert any string to a Number Javascript has an standard function called parseInt()
parseInt(input);
this will return a Number...
samples:
===========================
var input = "12";
var myNum = parseInt(input);
console.log(myNum);
=====================
var input = "05";
var myNum = parseInt(input);
console.log(myNum);
===========================
Note: If the first character cannot be converted to a number, parseInt() returns NaN.
So if using a space or non-numeric character you get NaN as return... so you have to check that too... buildin function isNaN( ) can handle that...
var input = "";
var myNum = parseInt(input);
if(isNaN(test){
console.log("this :"+myNum+": aint a number, NaN");
}else{
console.log(myNum);
}
===========================
Hope this helps a bit :-)