homepage Welcome to WebmasterWorld Guest from 54.198.46.115
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
setting text focus?
how to set focus on a text field?
cgikira




msg:3492168
 3:03 am on Oct 31, 2007 (gmt 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!

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved