Hallo, i am trying to make a BorderContainer focusable.. I mean that, in my tab sequence, i want a BorderContainer can receive focus so that my Custom component can repond to keyboard event like buttons, textInput etc.. I did my BorderContainer with this code:
<s:BorderContainer width="100" height="20" backgroundColor="#CCCCCC" borderWeight="2" tabEnabled="true" buttonMode="true" tabFocusEnabled="true" tabIndex="1"/>
The problem is that this code does not work... What can i try???
Thx to all
Have you tried the property Stage.focus (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/display/Stage.html#focus)? If you set it to your BorderContainer object, that object will be the one receiving all keyboard events. Just make sure you set this property after your object has been added to stage or you'll get a null object reference error. One way to ensure this would be to listen to the Event.ADDED_TO_STAGE event.