I have a problem which I had no idea would be a problem and I can't find the solution anywhere: I have a form asking for the user to input 2 separate numbers Each number is assigned to a different variable. When I click the button to add the two numbers 1 + 1 = 11 7+7+77 When I do something like: var a:Number = 2 var b:Numer = 4 I can get a + b to = 6 But when the numbers are coming from a form I would get 24 This is driving me crazy..... How do I make 1 + 1 = 2 Thank You I will addd rep points for any good answer
seems like your variables are trying to concatenate the variables as strings vs. integer. (Flash uses + for string merging and the arithmetic functions as well). Do a Cast function to force the variable to be a number instead of a string pass in varNameA and varNameB variables. var a:Number; a = int(varNameA); var b:Numer; b = int(varNameB);