Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INPUT Textfield typeof problem 1

Status
Not open for further replies.

mike722

MIS
Sep 8, 2001
65
BR
I have an input textfield. User types a number to be stored as a variable.

i want to convert the datatype (of this variable)to a number(it is string by default).

Everything I try doesnt change the datatype to a number.
I have tried using
Number(variablename)
but when I trace the typeof variable it is still a string.
I am new to flash so I am probably missing something. Can anyone help?

thanks

Mike
 
my_new_var = Number(my_inputText.text);

trace(my_new_var);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top