I noticed that too- and Alex outlines how to get the same result when the focus is on non-textfield controls in this post: http://tech.groups.yahoo.com/group/flexcoders/message/79912
Thanks Brian, Alex for your help -- > Hi Yarin, > So, this works for me but... it didnt until I added a textInput and > then clicked in it to get focus in the app... but once some control > in the app had focus, a return would cause the alert sent by the > default button. > > i hope this helps. > Brian > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute" > focusEnabled="true" > defaultButton="{this.button1}" > > <mx:Script> > <![CDATA[ > > import mx.controls.Alert; > private function testClick(event:Event):void { > Alert.show("got a click from an enter"); > } > > ]]> > </mx:Script> > > <mx:VBox> > <mx:TextInput /> > <mx:Button id="button1" label="b1" x="28" y="19" > click="testClick(event)" /> > <mx:Button id="button2" label="b2" x="28" y="49" /> > <mx:Button id="button3" label="b3" x="28" y="79" /> > <mx:TextInput /> > </mx:VBox> > </mx:Application> >
