OK - ignore the second part of that, I found out why it's not working -
you need this instead:
this.addEventListener(FocusEvent.FOCUS_IN, onFocusIn);
private function onFocusIn(event:FocusEvent):void
{
this.focusManager.hideFocus();
}
Thanks!
Mark
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: 24 May 2007 10:25
To: [email protected]
Subject: RE: [flexcoders] Stopping blue focus rect being drawn
Hi, thanks!
this.setStyle("focusAlpha", 0);
That worked well in my TextArea (the blue rectangle is no longer shown).
However, I tried Alex Harui's approach too:
focusManager.showFocusIndicator = false;
(In both the application and the TextArea creationComplete event) and
that didn't work! I don't know if I was calling it in the wrong place,
but switching the focus indicator off seems like a better idea compared
with just making it invisible.
Thanks,
Mark
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Baird
Sent: 23 May 2007 01:21
To: [email protected]
Subject: Re: [flexcoders] Stopping blue focus rect being drawn
If it's just that you don't want the user to see the blue focus
rectangle, you can just set the focusAlpha style to zero globally, and
the user won't see the rectangle.
-p
On 5/22/07 12:46 PM, "Alex Harui" <[EMAIL PROTECTED]> wrote:
It is drawn by the focus manager and not the stage. It isn't the
player's default focus look.
focusManager.showFocusIndicator = false;
showFocusIndicator is set back to true by TextInput and TextArea so you
may need to catch that and set it back to false. Subclassing and
overriding focusInHandler might be one way
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> On Behalf Of Mark Ingram
Sent: Tuesday, May 22, 2007 9:15 AM
To: [email protected]
Subject: [flexcoders] Stopping blue focus rect being drawn
Hi, how can I stop the blue focus rectangle from being drawn? I've tried
the following code in my main application file:
private function onCreationComplete(event:Event):void
{
//this.stage.stageFocusRect = false;
systemManager.stage.stageFocusRect = false;
}
But neither line works!
Thanks,
Mark