I'm trying to trap the "TAB" key so that it only changes the focus of input text boxes in my movie. I have used the following code. The code works however, the event bubbles up and objects in the movie change focus as the "TAB" key is pressed.

I have tried returning both "true" and "false" in my listener and it makes no difference.

Any help would be appreciated.


Code:

Code:
//Tab Key handler
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
	if(Key.isDown(Key.TAB))
	{
		if(Key.isDown(Key.SHIFT))
		{
			_root.voucher.prev_text_box();

		}else
		{
			_root.voucher.next_text_box();
		}
	}
};
Key.addListener(keyListener);