闪存CS4< B>用的htmlText标签中 [英] Flash CS4 <b> tag in with htmlText

查看:149
本文介绍了闪存CS4< B>用的htmlText标签中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哇,这个人是很奇怪的。

Wow, this one is really weird.

我有以下设置:

两个文本框在舞台上用宋体正常和宋体加粗,包括嵌入。然后我还有一个文本框,我正在设置像这样:

Two textfields on the stage with Arial normal and Arial bold, both embedded. I then have another textfield which I am setting like so:

tb.htmlText = "Test <b>Test</b>";

由于某些原因,大胆的文字显示不大胆,但是作为普通的重量。我试图在库中嵌入字体,使用[嵌入]元标签,甚至诉诸使用CSS来强制fontFamily中。古怪,我可以使用Font.enumurateFonts看到两种字体嵌入,但文本框拒绝使用粗体版本内的&lt; b>标签内。

For some reason, the bold text is not displaying as bold, but as regular weight. I have tried embedding the fonts in the library, using the [Embed] meta tag and even resorted to using CSS to force the fontFamily. Weirdly, I can use Font.enumurateFonts and see both fonts are embedded, but the textfield refused to use the bold version inside the < b > tags.

有人告诉我这是用Flash CS4在Mac上一个问题,它将工作在PC上。我不相信是这样,但是。当然,Adobe在迄今为止已解决了这个问题?

I've been told this is a problem with Flash CS4 on a mac and that it will work on PC. I refuse to believe this is the case, however. Surely Adobe would have fixed this by now?

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

您的宝贝在字体列表(embbed在相同或其他文本框)的'大胆'的字体:

You've gotta have the 'bold' font in the Font list ( embbed in the same or in other textfield ) :

var fonts:Array =  ( Font.enumerateFonts() );
for each( var fo in fonts ){
   trace ( fo.fontName ,":", fo.fontStyle )
}

我认为,如果你有fontstyle的返回大胆它可能应该与没有概率。 这里有一个解决办法:

I think that if you had the fontstyle returning as bold it probably should work with no prob. Here's a solution:

var css:StyleSheet = new StyleSheet()
css.setStyle( "bold" , { fontFamily:"Myriad Pro Bold" } ) // you can catch the fontname in the list that was printed by the code above...
txtfield.styleSheet = css;
txtfield.htmlText = "regular or<bold>bold font</bold>."

这篇关于闪存CS4&LT; B&GT;用的htmlText标签中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆