Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScript

Simple question - how to get focus?

 
Jump to:  
 
Angyl
PostPosted: Thu Jul 10, 2008 10:44 pm    Post subject: Simple question - how to get focus?
       
I've checked the help files and searched on this board. There's plenty about
focus problems but nothing gave me the single, easiest line I'm looking for:

How do I set focus on an object like an input textfield?

I'm making a form and when the user tabs into a field, the cursor is hard (or
impossible) to see so you don't know where you are. I want to be able to code
something like:

my_textField.onGetFocus(){
this.glowTo(0xFF0000);
}

Thanks!
 

 
SuperJAG
PostPosted: Thu Jul 10, 2008 11:37 pm    Post subject: Re: Simple question - how to get focus?
       
Try this.

// Choose a color for the border:
my_textField.borderColor = 0xFF0000;

// When the text field is focused, show the border:
my_textField.onSetFocus = function () {

this.border = true;

}

// When the text field is unfocused, hide the border:
my_textField.onKillFocus = function () {

this.border = false;

}
 

 
Angyl
PostPosted: Thu Jul 10, 2008 11:57 pm    Post subject: Re: Simple question - how to get focus?
       
onSetFocus...that's what I needed, thanks.
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

wymiana linkami pobieranie linkow wymiana linkow trwa pobierania linkow system wymiany linkow