Troubles with keyboardEvent.shiftKey in Chrome
I'd met a very strange problem. Take a look at the following code:
Lib.current.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPressed);
...
private static function onKeyPressed(e: KeyboardEvent) {
trace(e.shiftKey);
}
if you press any key (except SHIFT) false
is outputed. Press SHIFT+ALT (first press SHIFT and then ALT). Then after pressing of any key true
is outputed. Note that if I press SHIFT, press of any key will output false
again.
you may download swf containing code listed above from here.
I开发者_如何学运维MPORTANT: I have this issue only on Chrome, e.g. on Firefox everything is ok.
Note: If that's important, I'm working with Haxe languge, not with AS3.
Any thoughts will be appreciated. Thank you in advance!!
Go into chrome://plugins/
in a new tab. Check and see if under the flash section you have more than 1 flash plugins installed for Chrome. If so, disable the older version(s) and then try your test again.
That's a known bug. It should work fine in tomorrow's canary build (16.0.890.0) and will be fixed on stable in a week or two.
Absolutely do not disable the built-in Flash. It will leave you with an outdated and unsandboxed version of Flash.
精彩评论