I had a problem with a text field, I wanted to click on it, have something happen, and be able to continue typing straight away, but it kept losing focus after the first letter.
So I added a trace statement to find out what was happening, and then it would lose focus after it was clicked.
The reason was the trace statement was causing the whole swf to lose focus. So I am sending a trace statement in the frame, so that the initial focus is dealt with. The losing of focus doesn't occur after the first trace statement.
P.S. To set focus using action script:
stage.focus = textfield_txt;
textfield_txt.setSelection(textfield_txt.length,textfield_txt.length);
No comments:
Post a Comment
Please enter your message here...