lundi 22 juin 2015

Why is it impossible to use key combination Ctrl + Enter in AS3 Flash?

I did a little test that would black out the screen if key combination Ctrl + Enter was pressed:

private function onKeyDown(e:KeyboardEvent):void {
    if (e.ctrlKey == true && e.keyCode == Keyboard.ENTER) {
        ColorTransformer.transformColor(screen, new Color(Color.Black));
    }
}

Combinations of Ctrl and other keys work well.

UPDATE

My IDE is FlashDevelop 5.0.0. And the project works well in browser. I also ran it in the Flash Player (15 Debugger) and it didn't work so I think it's because of the Flash Player.

Aucun commentaire:

Enregistrer un commentaire