开发者

font in swf loaded in a swf loaded in swf !!! the text disappear

I've been 开发者_如何转开发looking on the net for a response to my problem without success .

I've made a swf containing a font in the library the class name of my font is "MVerdana".

this swf is loaded in another swf which display a textfield. the swf is loaded by a Loader. in the complete event, I'm getting the font class using

var loaderInfo:LoaderInfo = event.currentTarget as LoaderInfo;
 var app:ApplicationDomain = loaderInfo.applicationDomain;
 fontClass =  app.getDefinition("MVerdana") as Class;
 Font.registerFont(fontClass);

it's working well

but... when I load this swf (the one loading the font and displaying a textfield) using a new ApplicationDomain in the context loader, the textfield doesn't show , and I can see that the font is registered when I use Font.enumerateFonts()

It's working if I load the swf in the currentDomain, but it's not what I want.

I really don't understand what's is going on !!! can someone help me ?


If I understand correctly you are running into the following bug:

https://bugs.adobe.com/jira/browse/FP-2026?page=com.atlassian.streams.streams-jira-plugin:activity-stream-issue-tab

I know about this because I did run into the same bug with an application we built while back. We had different SWFs that were loading into a master SWF and each of them would contain a copy of the font. Everything was fine. Then we decided to move the font to the master container and then everything broke.

The main issue to note here is that if the Child SWF has a textfield on the timeline with the same name as the font that is being embeded in the master SWF then this causes the issue. We didn't run into this before because most of our applications do not rely on the timeline but rather create the textfields dynamically. So if you are able to create your textfields dynamically that could be your answer. If you have to use the same Font and you have textfields on the timeline the it is going to be a tough one to break until Flash fixes it of course.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜