在符号中加载TLF文本



我得到了一个放置了TLF文本的符号,我需要检索该文本的信息并使用它。问题是,每次这种文本出现在舞台上时,我都会得到一个奇怪的结果,在加载结果的currentTarget的内容中,而不是movieclip的子项中,我得到了MainTimeline__Preloader<-这是什么?,为什么TLF文本破坏了我的符号?。

你们知道怎么做吗?。

谢谢。

(经典文本有效,但我没有从中获得信息,我想了解一些信息,如使用的字体、样式等,我认为TLF文本可以用于此,如果我错了,请纠正我)。

坦率地说,TLF文本是一个可怕的野兽,如果使用不完全正确,会把你的swf搞砸。

幸运的是,您可以通过使用getTextFormat方法获得经典文本中使用的格式的详细信息,如下所示:

var textField:TextField;
var textFormat:TextFormat;
textFormat = textField.getTextFormat(0,0); //replace these numbers with where in the text you want to read the formatting
trace(textFormat.color)
trace(textFormat.font)
trace(textFormat.bold)
trace(textFormat.italic) //etc

最新更新