Flash AS3,是否可以通过代码更改静态文本的抗锯齿设置?

发布于 2024-10-06 12:16:44 字数 144 浏览 12 评论 0原文

我正在使用 InDesign CS5 生成的 swf,它显然只会将文本导出为 staticText 对象。是否可以更改 staticText 的抗锯齿?我想让它具有可读性,但它默认为动画,没有明显的更改方式。我最近获得了有关文本字段的帮助,但我似乎无法让它在静态文本上工作。

I'm working with swf's generated by InDesign CS5, which will apparently only export text as staticText objects. Is it possible to alter the anti-alias of staticText? I want to make it for readability, but it defaults to animation with no apparent way of changing it. I recently got help for textFields, but I can't seem to get it to work on staticText.

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

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

发布评论

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

评论(2

十秒萌定你 2024-10-13 12:16:44

静态文本无法在运行时读取或更改。这真的连文字都算不上。它是由 Flash IDE 编写的形状,恰好向查看者表示文本,但就 Flash 而言,它只是更多的形状。

要在运行时读取/编辑/修改/任何文本,您需要使用文本字段。我不确定是否有任何方法可以让 InDesign 输出带有文本字段而不是静态文本的 swf。

static text cannot be read or changed at run time. It's really not even text. It's shapes written out by the Flash IDE that happen to represent text to the viewer, but as far as Flash is concerned, it's just more shapes.

To read/edit/modify/whatever text at run time you need to use a text field. I'm not sure if there's any way to get InDesign to output swfs with text fields instead of static text.

撞了怀 2024-10-13 12:16:44

不,无法更改别名。只能检测静态文本字段并通过代码获取其文本。

for (var i:int= 0;i < this.numChildren; i++)
{
 if (getChildAt(i) is StaticText)
 {
   trace("Found a StaticText in ", this , "with text:", StaticText(getChildAt(i)).text)
 }
} 

No, it is not possible to change aliassing. It is only possible to detect a static textfield and get its text trough code.

for (var i:int= 0;i < this.numChildren; i++)
{
 if (getChildAt(i) is StaticText)
 {
   trace("Found a StaticText in ", this , "with text:", StaticText(getChildAt(i)).text)
 }
} 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文