Welcome to WebmasterWorld Guest from 54.196.232.162

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)

New User

10+ Year Member

joined:Oct 9, 2004
posts:11
votes: 0


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:

_root.gotoAndStop("Chat");
Selection.setFocus(_root.chatMessage);

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.

Thanks!

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members