Flash - 标点符号对齐错误
在我的 Flash 应用程序中,我使用打字机效果,使文本看起来像是即时写入的。当我这样做时,我的标点符号(问号、点等)会对齐到错误的方向(向右)。我用希伯来语写作(从右到左)。有什么办法可以解决这个问题?
In my flash application I am using a typewriter effect, to make it seem as if text is written on the fly. When I do so, my punctuation marks (question mark, dot, ect.) get aligned to the wrong direction (to the right). I am writing in Hebrew (right-to-left). What could be a solution to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,三个小时后我就带着解决方案来了。我希望它能为其他人节省时间。
Flash cs5 内置了对 RTL 语言的支持。您需要启用它:
1. 将项目发布设置更改为 Flash Player 10(仅支持)
2. 进入编辑-->偏好 -->文字-->显示从右到左的文本选项
2.将文本字段的类型更改为tlftext(这是突然显示的新选项)
3. 设置对齐方式
现在,如果您只想静态设置文本,那没问题,但如果您想使用某些 as3 代码设置文本,您还需要执行以下操作:
创建一个新的文本格式,为其提供以下设置并将其应用到您的文本字段:
就是这样。祝大家好运。
Ok, so three hours later I am here with a solution. I hope it saves time for other people.
Flash cs5 has got a built in support for rtl languages. You need to enable it:
1. Change your project publish settings to flash player 10 (only supported there)
2. Go to edit --> preferences --> text --> show right-to-left text options
2. Change your textfield's type to tlftext (it's a new option that suddenly shows)
3. Set your alignment
Now, if you just want to set text statically your fine, but if you want to set text using some as3 code you need to do the following as wel:
Create a new text format, give it the following settings and apply it to your text field:
And that's it. Good luck to you all.