Guys I am a beginner and have landed into trouble cause of
it.. I know the basics but a typical situation has arrived.. I want
to take user entered number and display it back!!!! but here I get
two types of error 1. NaN i guess which means not a number and the
other 2. which Says undefined... The code iam writing is
var number = txt_box.text; //txt_box is the name I have
assigned to the text box cause i read how to do it somewhere!
num_out.text = number; // num_out is another dynamic box
I have tried using the string instead of text.... Found in
another place... Then used a function Number() which as read could
change a string to a number and also I used a function called
parseInt().. Which also dint help.. But it would be a grrrrrrrrreat
help if someone could give me a simple code to this prob and
explain what was the actual problem.. Is that I was Dumb or it was
first of all ..
using number as a variable name is wrong as Number is a valid
class in flash.
instead of using Number to typecast use parseInt(String) to
var num:Number = parseInt(this._parent.txt_box.text);
//txt_box is the name I have assigned to the text box cause i read
how to do it somewhere!
this._parent.num_out.text = num; // num_out is another
dynamic box name....