动态文本不接受数字

发布于 2024-10-07 03:09:50 字数 672 浏览 2 评论 0原文

我不久前编写了一个 Flash 游戏(CS3),它曾经可以工作,但是当尝试在 CS5 中编译相同的 FLA 文件时,它不起作用。

我有一个名为 tScore 的动态文本字段,

 tScore.text = Score; 

用于将用户分数的当前整数值应用到文本框。它不再这样做了。 (它看起来是空的)

通过简单的调试:

 tScore.text = Score.toString; // no value shown
 tScore.text = String(Score); // no value shown
 tScore.text = "A"; // sets the field to the value A
 tScore.text = "123"; // no value shown
 tScore.text = "C123"; // value "C" shown
 tScore.text = "A12A"; // value "AA" shown
 tScore.text = "000"; // value "000" shown
 tScore.text = "01"; // value "0" shown

我知道闪存中发生奇怪的事情已经很长时间了 - 但是 - 这对我来说没有意义。

有人遇到过不接受数字的文本字段吗?

I wrote a flash game a while back (CS3) and it used to work but when trying to compile the same FLA file in CS5 does not work.

I've got a dynamic text field called tScore

 tScore.text = Score; 

Used to apply the current integer value of the user's score to the text box. It no longer does that. (It appear empty)

By way of simple debugging:

 tScore.text = Score.toString; // no value shown
 tScore.text = String(Score); // no value shown
 tScore.text = "A"; // sets the field to the value A
 tScore.text = "123"; // no value shown
 tScore.text = "C123"; // value "C" shown
 tScore.text = "A12A"; // value "AA" shown
 tScore.text = "000"; // value "000" shown
 tScore.text = "01"; // value "0" shown

I know it's been a long time for weird stuff to happen in flash - but - this makes no sense to me.

Has anyone experienced a text field that doesn't accept digits?

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

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

发布评论

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

评论(3

七婞 2024-10-14 03:09:51

听起来这可能是字体嵌入问题,它在 CS3 和 CS5 之间发生了一些变化。因此,您可以进入“字体嵌入”面板并确保所使用的字体包含“数字”。

Sounds like it could be a font embedding issue, it has changed somewhat between CS3 and CS5. So you could go into the "Font Embeding" panel and make sure "Numerals" are included for the font used.

只是偏爱你 2024-10-14 03:09:51

我解决了将动态文本的属性抗锯齿更改为使用设备字体(而不是默认的“抗锯齿以提高可读性”)的问题。

当然,文字看起来很丑,但对我来说是可以接受的。

I solved the issue changing the property Anti-alias of the dynamic text to Use device fonts (instead of default "Anti-alias for readability").

Sure, the text looks ugly but it's acceptable in my case.

愛上了 2024-10-14 03:09:51

我以前没有经历过类似的事情。
我建议您使用跟踪来确定文本框是否存在以及它是否包含任何内容。

还要检查文本框的属性是否仍然有效(也许 CS5 对其进行了奇怪处理,并将其设为静态或输入)

I haven't experienced anything like that before.
I suggest you use traces to determine whether the textbox even exists and whether it holds anything at all.

Also check if the properties of the textbox are still valid (maybe CS5 weirded it up and make it static or input for all you know)

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