闪存输入掩码 (AS3)

发布于 2024-07-29 12:28:55 字数 39 浏览 2 评论 0原文

有谁知道如何实现 Flash 文本字段的输入掩码? (AS3)

Does anybody know how to implement input masks for flash textfields? (AS3)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

九命猫 2024-08-05 12:28:55

查看 TextField 限制 属性

不作为作为真正的输入掩码很迷人,但可以完成限制输入的工作

Check out the TextField restrict property

Not as glamorous as a true input mask, but gets the job done on restricting input

聊慰 2024-08-05 12:28:55

Flash 的 TextField 类不支持输入掩码(但 flex TextInput 类支持)。

您可能需要做的是创建一个正则表达式 进行验证

您可以监听 TextField 的 Event.CHANGE 并运行一些代码,尝试将字符串与正则表达式进行匹配。 如果匹配则有效,如果不匹配则以某种方式通知用户。

Flash's TextField class doesn't support input masks (the flex TextInput class does however).

What you probably need to do is create a regular expression to validate against

You could listen to the Event.CHANGE of the TextField and run some code that trys to match the string against your regular expression. If it matches it's valid, if it doesn't you notify the user somehow.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文