Hi
Although ive been learning flash+actionscript for some time now , this is a total newbie question , i came across this error in a a fla i was doing and just cant unserstand it.
I have 2 input text boxes , 1st one has variable a ,2nd has variable b.
I have a dynamic text box , variable is c.
I have a button with the following code:
on (release) {
c=a+b;
}
when i run the movie , if i put something like 1 in the first input and 2 in the secont ,instead of 1+2=3 i get 1+2 = 12.
It is working as the variables were strings.Why?
But , if i change the "+" with "-" or "*" or "/" it will work perfectly and treat the variables as numbers , it just wont do that with the "+".
Ive attached the fla file so you can see it better.
I hope some of you can help me please
Thanks.





.
Bookmarks