try adding
mouseChildren = false; (in the class that extends MovieClip)
It should stop the textfield from being mouse enabled.
Since you list a "FocusEvent" in your example, I will focus on Flex solutions. That is not a Flash AS3 class.
I will wager that Flex is trying to manage the focus by itself and that is screwing with your attempts to set it. There are, however, a number of ways around this.
Is Flex trying to work against you?
First, you may want to either use FocusManager class or the UIComponent setFocus method (this depends on what you specifically need to do, I believe the FocusManager allows you to have multiple objects targeted, while the setFocus method is a good deal simpler) instead of stage.focus. This has the benefit of working natively within the Flex component system.
Are you listening to the right event?
Failing that, try making sure that the target of the FocusEvent you're looking for is neither your textfield nor a child of your textfield. (Just for sanity's sake). If that does not work, make sure you are only getting the event dispatched once.Next, I would try using MouseEvent.CLICK instead of a FocusEvent.
Has everything else failed?
Unfortunately, Flex is often far from perfect. I find that sometimes I have to use setTimeout to get around the fact that it does not fire events in the "right order" -- you resize something, but "RESIZE" is dispatched before it has re-rendered, you change the font, and a TextArea's TextWidth property doesn't return the right number. The workaround
private function myListener( event:FocusEvent ):null
{
setTimeout( function(){ editfield.setFocus(); }, 35 );
}
Best Answer
I've seen a similar problem in the past, but I don't remember how to duplicate it. It no longer appears in the project I first saw it in, so the two things which I know have happened since then are below. Of course, there could be some other variable, but the project is working now...
I suspect that the field is still editable. That would be my first guess. The first thing I would try then:
If that does not work, try nesting the TextField in something with a MouseEvent.ROLL_OVER listener and useHandCursor set to False. eg: