Get Rid of Yellow Focus Rect
November 10, 2009Danwize 6 Comments »Are you tired of seeing the yellow focus rectangle in your Flex applications? It’s really easy to get rid of it. All you have to do is this:
stage.setFocusRect = false;
It’s really that easy. See more info about this property here: http://livedocs.adobe.com/flex/3/langref/flash/display/Stage.html#stageFocusRect
Tags: flex, focus rectangle, focusRect, yellow rectangle
Posted on November 16th, 2009 at 4:02 pm
Awesome and simple! That yellow box really is annoying!
Posted on November 26th, 2009 at 5:19 am
I liked your website , it’s full with lot of information. You just got one constant visitor and a fan of this blog.
Posted on November 29th, 2009 at 6:41 am
Interesting, I`ll quote it on my site later.
Thanks
Edwas
Posted on December 2nd, 2009 at 3:27 am
works for me
Posted on March 3rd, 2010 at 12:31 pm
statge.setFocusRect property not available in Flex Builder sdk 3.4
I tried stage.stageFocusRect = false; and I get
TypeError: Error #1009: Cannot access a property or method of a null object reference.
Posted on March 3rd, 2010 at 2:04 pm
I’ll bet if you debug, you’ll see that the entire stage is null at that point in the program. Stage will not be active until after the applicationComplete event is fired. Try something like this:
<code>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” applicationComplete=”init()”>
<mx:Script>
private function init():void
{
stage.stageFocusRect = false;
}
</mx:Script>
</code>
That should solve this problem and a whole lot of others. Lemme know if that helps