Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

setting text focus?

how to set focus on a text field?



3:03 am on Oct 31, 2007 (gmt 0)

10+ Year Member

I have a flash chat app written in Flash MX. I'd like for the chat to always have focus on the text input field (named "chatMessage"). I added this to the actionscript in frame 1:


However, it never works. Is there a way I can fix it so that when the user starts typing, the focus *always* goes to the text input box and their text appears there? Right now the user has to actually click in the input box to start typing... and if they switch to a different browser window and then click back into the chat window, they have to click again into the text input. It's really a hassle. I want to make it more user-friendly, but can't seem to get the setFocus thing to work.



Featured Threads

Hot Threads This Week

Hot Threads This Month