Hi list...

I have a TextArea component used for inputting text.  Also, the stage has a key 
listener where something happens if the user keys "i". 

The issue arises when the user starts inputting text into the TextArea.  If she 
types "i", the stage event fires.  I don't want that to happen if the user's 
focus is in the TextArea.  I've tried to take the event off the button when the 
focus is in the TextArea, but that seems buggy.  Also, I tried 
stopImmediatePropagation, priority and useCapture on the TextEvent, all to no 
avail.  Can anyone offer a strategy? 

- Michael M.
myTextArea.addEventListener(TextEvent.TEXT_INPUT, block, true, 100);

private function block(t:TextEvent):void{
        if(t.text == "i" || t.text == "I"){
                // gets here, but doesn't stop the "i" from firing the stage 
listener's keyboard event

Flashcoders mailing list

Reply via email to