servalman
06-12-2004, 04:36 PM
Hello everyone
.
Here is my problem :
1 In an XML file i an attributte called price that as a numeric value (price="10").
2 I Load my MXL file an cycle trought it with a for loop
3 in my for loop i do this :`
// begining of for loop
var my_var:Number = the attribute value
// then if i try this
my_var = my_var + my_var
// i get "1010" as a result of the trace of my_var
// then if i do this
my_var = my_var * my_var
// i get "100" as a result of the trace of my_var
// end of for loop
my question is:
I tought that strict typing was defining the variable as a number in :
var my_var:Number = the attribute value.
I think i did not get something. :confused:
.
Here is my problem :
1 In an XML file i an attributte called price that as a numeric value (price="10").
2 I Load my MXL file an cycle trought it with a for loop
3 in my for loop i do this :`
// begining of for loop
var my_var:Number = the attribute value
// then if i try this
my_var = my_var + my_var
// i get "1010" as a result of the trace of my_var
// then if i do this
my_var = my_var * my_var
// i get "100" as a result of the trace of my_var
// end of for loop
my question is:
I tought that strict typing was defining the variable as a number in :
var my_var:Number = the attribute value.
I think i did not get something. :confused: