How do you define custom behaviours for the Androi

2019-03-03 02:22发布

For buttons like the MENU or BACK button you can just add a listener for KeyboardEvent and check if the event keyCode is Keyboard.BACK or Keyboard.MENU.

However I don't see anything for knowing if the phone's volume buttons were pressed.

Is there a way to listen for volume up and volume down keyUp/keyDown events in AIR (ActionScript 3)?

1条回答
劳资没心,怎么记你
2楼-- · 2019-03-03 02:53

Nope. There isn't any support for detecting the volume buttons. (In AIR 3, you can write a native extension to access native features that aren't otherwise supported.)

查看更多
登录 后发表回答