如何在 AS3 中的空文本字段中设置焦点并插入插入符号

发布于 2024-08-26 05:46:14 字数 78 浏览 4 评论 0原文

stage.focus = 文本字段;

textField.setSelection(0,0);

不适合我。

stage.focus = textField;

textField.setSelection(0,0);

is not working for me.

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

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

发布评论

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

评论(2

多孤肩上扛 2024-09-02 05:46:14

如果使用 stage.focus = textField; 后插入符号未显示在文本字段中

只需尝试发布您的电影,而不是使用 CTRL+Enter 命令进行测试。

在我发布它之前它对我不起作用。

-干杯

If the caret is not showing in your text field after using stage.focus = textField;

Simply try publishing your movie instead of testing it with the CTRL+Enter command.

It didn't work for me until I published it.

-Cheers

将军与妓 2024-09-02 05:46:14

“textField”是库影片剪辑的子项吗?如果是这样,您必须通过父级访问它。

stage.focus = someMovieStageName.textField

Is "textField" the child of a library movieclip? If so, you have to access it through the parent.

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