Hu4ley
04-21-2008, 10:11 AM
Hi Guys,
Hopefully someone can help?
I have an input text box which captures user input and displays it into a dynamic textbox in another movieclip. It works but I have a slight problem.
It doesn't seem to capture the last character.
If i input, "hello", it displays "hell" and not the "o", unless i key another charachter in or press space bar, then it updates it.
Here is the code....
////////////////////////////////////////////////////////////////////////
myTextBox.text = myText;
function CaptureUserInput()
{
captureText();
}
function captureText():void
{
myTextBox.text = myText;
myTextBox.addEventListener(TextEvent.TEXT_INPUT, textInputCapture);
}
function textInputCapture(event:TextEvent):void
{
var str:String = myTextBox.text;
createOutputBox(str);
//trace(root.myText.myOutputBox.text.length);
}
function createOutputBox(str:String):void
{
root.myText.myOutputBox.text = str;
}
captureText();
////////////////////////////////////////////////////////////////////////
Any ideas on how to update the text box so all characters are displayed when entered?
Thanks for yout time!
Hurley
Hopefully someone can help?
I have an input text box which captures user input and displays it into a dynamic textbox in another movieclip. It works but I have a slight problem.
It doesn't seem to capture the last character.
If i input, "hello", it displays "hell" and not the "o", unless i key another charachter in or press space bar, then it updates it.
Here is the code....
////////////////////////////////////////////////////////////////////////
myTextBox.text = myText;
function CaptureUserInput()
{
captureText();
}
function captureText():void
{
myTextBox.text = myText;
myTextBox.addEventListener(TextEvent.TEXT_INPUT, textInputCapture);
}
function textInputCapture(event:TextEvent):void
{
var str:String = myTextBox.text;
createOutputBox(str);
//trace(root.myText.myOutputBox.text.length);
}
function createOutputBox(str:String):void
{
root.myText.myOutputBox.text = str;
}
captureText();
////////////////////////////////////////////////////////////////////////
Any ideas on how to update the text box so all characters are displayed when entered?
Thanks for yout time!
Hurley