问题描述
对于像MENU或BACK按钮这样的按钮,您可以为KeyboardEvent添加一个侦听器,并检查事件keyCode是否为Keyboard.BACK或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 Keyboard.BACK or Keyboard.MENU.
我没有看到任何知道手机的音量按钮被按下的情况。
However I don't see anything for knowing if the phone's volume buttons were pressed.
有没有办法在AIR中侦听音量增大和音量减小的keyUp / keyDown事件ActionScript 3)?
Is there a way to listen for volume up and volume down keyUp/keyDown events in AIR (ActionScript 3)?
推荐答案
不。没有任何支持检测音量按钮。 (在AIR 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.)
这篇关于如何使用Adobe AIR(ActionScript 3)为Android手机的音量按钮定义自定义行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!