2019-9-5 zhulinan Flash
public function Main() { stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; stage.scaleMode = StageScaleMode.EXACT_FIT; addEventListener(Event.ADDED_TO_STAGE, addedHandle); } private function addedHandle(e:Event):void { removeEventListener(Event.ADDED_TO_STAGE, addedHandle); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandle); } private function keyDownHandle(e:KeyboardEvent) { if(e.keyCode == 27) { e.preventDefault(); } }
如果使用了ComBoBox组件,则需在其Event.CHANGE事件中加入下面一行代码: