Groups | Blog | Home
all groups > flash (macromedia) > june 2006 >

flash (macromedia) : focus rectangle


Im out of ideas
6/29/2006 8:09:15 PM
Can someone tell me how to make a focus rectangle visible without tabbing.
i.e. via code something like that below:

I know its possible because I've done it before and can't remember how I did
it.

Thanks in advance.


my_txt.onSetFocus = function () {
my_txt._focusrect._visible = true;
}
Im out of ideas
6/29/2006 8:13:23 PM
I read through my post and thought it wasn't very clear what I was asking.
Basically I've created code before that would show a focus rectangle if a user
clicked in that field with the mouse. Now I'm trying to do that again and
can't remember how I did it.
Wolf van Ween
6/29/2006 8:42:47 PM
Aha, maybe you're looking for the _focusrect property of MovieClips and Buttons?
Im out of ideas
6/29/2006 8:49:58 PM
Im out of ideas
6/29/2006 9:02:34 PM
Ok, I figured it out. Say you have a text input component with an instance
name of MY_TXT. If you wanted the focus rectangle to appear whenever the user
clicked on the component (i.e. set the focus) then use the code below.

Regards


MY_TXT.onSetFocus = function () {
this.drawFocus(true);
}
Wolf van Ween
6/29/2006 9:24:18 PM
Im out of ideas
6/29/2006 9:42:32 PM
AddThis Social Bookmark Button