Archive

Archive for September, 2009

Using [Embed] with fonts in Flex / Flash Builder Actionscript projects includes SDK specific core Flex classes

September 3rd, 2009 markledford 1 comment

Have you gotten this error when upgrading a Flex project to Flex 4?

1044: Interface method allowDomain in namespace mx.core:IFlexModuleFactory not implemented by class _Main_mx_managers_SystemManager.
1044: Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _Main_mx_managers_SystemManager.

Looking at the error its clear that Flex 3.4’s IFlexModuleFactory got compiled in and referenced by Flex 4’s SystemManager (which no longer has these methods) but how?

If you’re in my boat you have a central Actionscript-only Flex Library Project repository where you keep all your reusable Actionscript classes. This project is compiled with an older Flex SDK (3.4 in this instance) as it targets Flash Player 9 and other Flash 9 / Actionscript Only projects reference it. Your library  may also includes metatags even though the compiler adds some basic mx.core classes to do the embedding. This normally wouldn’t be an issue but you’ll find your boat will capsize if you’ve included any fonts embedded this way as the compiler includes some SDK specific classes, namely IFlexModuleFactory via FontAsset. You can verify this by including “-link-report linkreport.xml” compiler argument to this project.

Solution: Export the fonts separately, perhaps in a separate swc that isn’t referenced directly in your updated Flex 4 projects.

Categories: flex Tags: