Flash 动态 HTMLText 在 TextField 中显示不规则

发布于 2024-09-11 17:17:07 字数 658 浏览 5 评论 0原文

HTMLText 显示得很奇怪。我正在显示一个带有通过 XML 提供的 htmlText 的文本字段,在这个项目符号列表中,它将在一行上显示第一行,继续超出文本区域大小的末尾(即不执行多行),直到最后一个单词项目符号,然后将该词放在下一行的开头。无论您的项目符号项目有多长,它都会将最后一个单词放在下一行。

例如。

myField.htmlText = "<li>Seek the input of experts</li>;

会输出

的意见

“寻求专家

”我已经检查过这个线程 类似,但是我删除了所有补间来测试,但没有任何效果。

对此有何想法?我已经尝试过这些无济于事:

myField.htmlText = myString;
myField.autoSize = TextFieldAutoSize.LEFT;
myField.wordWrap = true;

肯定有更多的人遇到过这个问题 - 有什么想法吗?谢谢大家。

HTMLText is displaying really strangely. I'm displaying a textField with htmlText provided through XML, and in this bulleted list it'll display the first line all on one line, keep going off the end of the textareas size (ie. not do multiline) until the last word of the bullet, then put that word at the start of the next line. And it'll put the last word on the next line no matter how long your bullet item is.

eg.

myField.htmlText = "<li>Seek the input of experts</li>;

Would output

'seek the input of

experts'

I've checked and this thread was similar however I've removed all my tweens to test and it hasn't had any effect.

Any ideas on what to do about this? I've tried these to no avail:

myField.htmlText = myString;
myField.autoSize = TextFieldAutoSize.LEFT;
myField.wordWrap = true;

Surely more people have had this problem - any ideas? Thanks heaps.

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

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

发布评论

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

评论(2

执着的年纪 2024-09-18 17:17:07

autoSize 似乎只会“缩小”文本框边界,因此请尝试使文本框大于所需大小,然后应用 autoSize。

要测试文本框边界是否存在问题,请尝试对其应用边框。

myField.border = true;
myField.borderColor = 0xFF0000;

autoSize seems to only "shrink" your textbox boundary, so try making your text box bigger than it needs to be, then applying the autoSize.

To test if it is an issue with the textbox boundary, try applying the border to it.

myField.border = true;
myField.borderColor = 0xFF0000;
万劫不复 2024-09-18 17:17:07

在 Flash CS4 中解决了这个问题。一定是Flash的bug!做了几件事并对其进行了排序,不确定是哪一个起作用了。

  1. 保存了我的文件的新版本
  2. 通过嵌入将文本字段“使用设备字体”而不是“可读性的反别名”。
  3. 发布文件,项目符号显示良好。
  4. 将抗锯齿更改回抗锯齿以提高可读性,然后 Flash 弹出提示“您需要嵌入这些字体”(就像以前一样......) - 所以我通过字段重新嵌入它们(并且它们已经在库中导出为动作脚本)

无论它是什么,似乎已经修复了它。

Solved this, in Flash CS4. Must be a Flash bug! Did a couple of things and it sorted it, not sure which did the trick.

  1. Saved a new version of my file
  2. Made the text field 'use device fonts' instead of the 'anti-alias for readability' with embedding.
  3. Published the file, the bullets displayed fine.
  4. Changed the anti-alias back to anti-alias for readability, flash then busted a prompt saying 'you need to embed these fonts' (just like they were before...) - so I re-embedded them through the field (and they were already exported for actionscript in the library)

Whatever it was, seems to have fixed it.

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