Flash超链接似乎会截断周围的空间 [英] Flash hyperlinks seem to truncate surrounding space

查看:97
本文介绍了Flash超链接似乎会截断周围的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个涉及Flash文本和超链接的怪异错误,带有<a>标签的TextField中的htmlText似乎会截断周围的空间:

I have a weird bug involving Flash text and hyperlinks, htmlText in a TextField with <a> tags seem to truncate surrounding space:

一旦我将光标放在文本上,它就会修复"自身:

Once I place my cursor over the text, it "fixes" itself:

这是textField中的HTML:

Here is the HTML in the textField:

<p>The speeches at both the <a href="http://www.demconvention.com/speeches/" target="_blank">Democratic National Convention</a> last week and the <a href="http://www.gopconvention2008.com/videos" target="_blank">Republican National Convention</a> this week, have been, for me at least, must see TV.</p>

当我禁用附加到它的styleSheet时,效果仍然会发生,但是将鼠标放在它上面并不能固定间距.我正在使用抗锯齿以提高可读性",并且嵌入了所有大写字母,小写字母,数字和标点符号.我还将指出,如果将渲染设置更改为使用设备字体",该错误将消失.

When I disable the styleSheet attached to it, the effect still occurs, but placing my mouse over it does not fix the spacing. I am using "Anti-alias for readability", and have embedded the all Uppercase, Lowercase, Numerals, and Punctuation. I will also point out that if I change the rendering setting to "Use Device fonts" the bug goes away.

有什么想法吗?

推荐答案

确保您的styleSheet声明了它对锚点的作用.很明显,如果您使用CSS时就使用htmlText,则它会看到<在"a href"前面,它立即寻找a的CSS类定义,当找不到该类时,结果是您看到的外观不同的文本.

Make sure you styleSheet declares what it is supposed to do with Anchors. You are obviously using htmlText if your using CSS so soon as it sees < in front of "a href" it immedietly looks for the CSS class definition for a and when it doesn't find one, the result is the different looking text you see.

在CSS中添加以下内容,并确保其样式,宽度和大小与文本的常规样式具有相同的设置.唯一应该不同的是颜色.

Add the following to your CSS and make sure that it has the same settings as the regular style of your text as far as style, wieght, and size. The only thing that should differ is the color.


a:link
{
   font-family: sameAsReg;
   font-size: 12px; //Note flash omits things like px and pt.
   color:#FF0000; //Red
}

确保要嵌入的字体在库中并且已实例化到代码中.当您只需要在运行时从库中加载字体然后在任何地方使用它时,通过UI嵌入每个文本字段都是很愚蠢的.

Be sure that the fonts you are embedding are in the library and being instantiated into your code. Embedding each textfield through the UI is silly when you can merely load the font from the library at runtime and then you can use it anywhere.

您还可以在编译时导入多种字体,并使用<在同一文本字段中使用它们. class span ="someCSSClass">某些文本</span>< class span ="someOtherCSSClass">某些其他文本</span>

You can also import multiple fonts at compile time and use them in the same textfield with the use of < class span="someCSSClass">Some Text < /span>< class span="someOtherCSSClass">Some Other Text < /span>

祝你好运,希望对你有帮助.

Good luck and I hope this helps.

这篇关于Flash超链接似乎会截断周围的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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