Hello all, I'm at the end of my rope here... Trying to simply have a default button on my login form that gets clicked when a user presses the 'Enter' key. According the the documentation, the following code should work:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" focusEnabled="true" defaultButton="{this.button1}" > <mx:Button id="button1" x="28" y="19" focusEnabled="true"/> <mx:Button id="button2" x="28" y="49" focusEnabled="true"/> <mx:Button id="button3" x="28" y="79" focusEnabled="true"/> </mx:Application> But I'm not getting anywhere with this. The button doesn't show up with any default highlight, and doesn't respond to key presses. If I set the FocusManager.defaultButton directly, I can see a default highlight on the button, but it still doesn't respond to key presses. Finally, I decided I would just capture the keystroke, and perform the click programmatically in ActionScript, but there's not even a way to do that! Absolutely stumped. Anybody? Thanks--- Yarin
