如何使用Adobe AIR(ActionScript 3)为Android手机的音量按钮定义自定义行为? [英] How do you define custom behaviours for the Android phone's volume buttons using Adobe AIR (ActionScript 3)?

查看:181
本文介绍了如何使用Adobe AIR(ActionScript 3)为Android手机的音量按钮定义自定义行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于像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手机的音量按钮定义自定义行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆