Reading input string

How to read a string from keyboard ,using AS3.0? Is there any standard input operator like cin in C++ ?

you need to give the user an Input field in order to let him put in some text.

If you want to read what the user writes without an Input field you could use an event listener on your stage, which listens to keyDown events and writes the pressed keys in an array or something.

or on change Event

It’s easy


my_text.addEventListener(Event.CHANGE,t_func);
function t_func(Event)
{
my_text_1.text=my_text.text;	
}

my_text_1.addEventListener(Event.CHANGE,t_1_func);
function t_1_func(Event)
{
my_text.text=my_text_1.text;	
}

http://murmadillo.tut.su/fla/input-text.swf
http://murmadillo.tut.su/fla/input-text.zip

thanks!