开发者

How do you define custom behaviours for the Android phone's volume buttons using Adobe AIR (ActionScript 3)?

开发者 https://www.devze.com 2023-03-29 02:48 出处:网络
For buttons like the MENU or BACK button you can just add a listener for KeyboardEvent and check if the event keyCode is Keybo开发者_高级运维ard.BACK or Keyboard.MENU.

For buttons like the MENU or BACK button you can just add a listener for KeyboardEvent and check if the event keyCode is Keybo开发者_高级运维ard.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)?


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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消