Hi,
This is a very basic tutorial on the use of ParseInt(variable) to convert a variable to integer. (to convert TEXT to number)
make 2 inputboxes called A and B make 1 dynamic box called C
connect varA and VarB to boxes A and B. So of course varA to box A and varB to box B. (checkmark the target)

Now add this as script behind your movie :

And this should be your result :

But what is doing that parseInt() with my variables ?
Well, if you just use varC=varA+varB and let us say you give for input varA=2 and varB=3 then you will receive varC=23. This because swishmax is seeing those variables as TEXT (string) variables and not as integers !
The parseInt() function is converting those TEXT variables to string variables so the result will be varA=2,varB=3, varC=5
Got it ?
It's easy once you know it
|
|
|