在Android的Flash 10.1打开软键盘键盘、Android、Flash

2023-09-08 13:50:10 作者:沒有下一次

我正在开发移动Flash应用程序(而不是AIR应用程序)在浏览器中运行。据到Adobe:

I'm developing a mobile Flash application (not an AIR app) running in the browser. According to Adobe:

Flash Player 10.1的提供支持   使用本机设备虚拟键盘   与文本字段的支持,如果没有物理   键盘被检测。虚拟   键盘会自动提高,   响应于焦点改变降低   在文本字段时,在编辑文本   支持虚拟移动设备   键盘启用通畅和   直观的文本编辑。聚焦   文本字段居中在可见   页面的区域并适当地   缩放/滚动,以确保它是不   由虚拟键盘遮蔽。经   屏幕旋转,来电,或   其它系统事件,任何已   现有的文本输入被保留。该   与文本字段虚拟键盘的工作原理   但目前不与工作   文本布局框架或其它Flash   文本引擎的文本。

Flash Player 10.1 provides support for use of native device virtual keyboards with TextField support if no physical keyboard is detected. A virtual keyboard is automatically raised and lowered in response to focus changes on text fields when editing text on mobile devices supporting a virtual keyboard to enable unobstructed and intuitive text editing. The focused text field is centered in the visible region of the page and appropriately zoomed/scrolled to ensure it is not obscured by the virtual keyboard. Upon screen rotation, incoming calls, or other system events, any already existing text input is retained. The virtual keyboard works with TextField but does not currently work with the Text Layout Framework or other Flash Text Engine text.

我在听一个水龙头事件(其中工程),设置 stage.focus =输入; 这也工作正常。但是,虚拟键盘未被触发。

I'm listening for a tap event (which works) that sets stage.focus = input; which also is working. However, the virtual keyboard is not triggered.

我正在测试上HTC的Evo。

I am testing on an HTC Evo.

推荐答案

您可以尝试做一个隐藏的文本字段。然后派遣一个连到它。也许,对内部闪存播放器听文本字段的事件(我怀疑它,但它是值得一试)。你也可以强制Flash Player来获得焦点在文​​本框。

You could try to make a hidden TextField. Then dispatch an even to it. Maybe the internal Flash Player is listening to a event of the TextField(I doubt it but it is worth a try). You could also force the Flash Player to get focus on a textfield.

则dispatchEvent(新FocusEvent(FocusEvent.FOCUS_IN,真,假));

您也可以尝试在它触发一个click事件,如果这是行不通的。

You can also try to fire a click event on it if this isn't working.

对不起,我不能测试自己。目前,我没有测试手机或模拟器。

Sorry that I can't test myself. At the moment I don't have a test phone or emulator.