使用 Flash 捕获 iOS 文本字段上的文本事件
我正在使用 flash cs5.5,并且有以下文本字段代码
txt.addEventListener(KeyboardEvent.KEY_UP , key_up); txt.addEventListener(KeyboardEvent.KEY_DOWN , key_down); txt.addEventListener(TextEvent.TEXT_INPUT, key_input);
我正在为 iOS 构建(使用 AIR),但这些事件都不会在 iPhone 上触发。在模拟器上运行正常。 如何在 iOS 上捕获这些事件?我已经尝试过文本字段和 TLFTextField。
I am using flash cs5.5 and have the following code for a textfield
txt.addEventListener(KeyboardEvent.KEY_UP , key_up);
txt.addEventListener(KeyboardEvent.KEY_DOWN , key_down);
txt.addEventListener(TextEvent.TEXT_INPUT , key_input);
I am building for iOS (using AIR) but none of these events fire up on the iPhone. On the simulator it works ok.
How can I capture these events on iOS? I have tried both with textfield and TLFTextField.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您考虑过使用 StageText 吗?除了列出的事件之外,您还可以获得:
其他一些好处:
缺点是 StageText 比其他文本字段类型更难使用。然而,Adobe 员工 Christian Cantrell 创建了一个名为 NativeText 的 StageText 包装类,旨在简化事情。它目前位于 GitHub 上,可与 Flash CS 配合使用,并且已经分叉了几次以修复一些错误并添加缺失的功能:
NativeText在 GitHub 上
Have you considered using StageText? In addition to the events you listed, you get:
Some of the other benefits:
The downside is that StageText is more difficult to work with than the other textfield types. However, an Adobe employee – Christian Cantrell – created a wrapper class for StageText called NativeText which is designed to simplify things. It's currently on GitHub, works with Flash CS, and has been forked a few times to fix some bugs and add missing features:
NativeText on GitHub