I worked pretty well, but it's giving me a dilemma problem.. I can't define the event-type (in the function) to evt:Event, because the keyCode then becomes an "undefined property". However if I change the event-type to evt:KeyboardEvent - keyCodeworks, but then the MouseEvent "on the other side" don't.
No compiler errors occur though, just in the output tab it says Error #1034, cannot convert MouseEvent to KeyboardEvent - every time I try to hit the sumbitBtn on the stage.
Note: I want to upload the code, but it's on a work-computer without internet nor the possibility to connect a usb-stick or anything...
cast it:
function handler(event:Event){
if((event is KeyboarEvent && KeyboardEvent(event).charCode == 13) || event.currentTarget == submitBtn)
{}
}