I have a project that has been working fine since I inherited it months ago, which uses the Flex184.108.40.2067 sdk.
Previously, the modules that it loads were not being optimized for the parent application. I changed that setting with no noticiable repercussions a month ago.
Yesterday, the text suddently began disappearing from modules. When I test in debug mode, the text reappears (because the modules are not optimized when testing), but as soon as I clean the project and grab the optimized modules, the text disappears.
I understand that there's some issue with the embedded fonts (that are declared in a global css file in the assets folder), but I am stumped how to fix it and even more why it suddenly started happening.
Also, returning to a previous git commit, from a month ago or more, does not seem to change the behavior, suggesting that it has nothing to do with any recent changes I've made but is being caused by something within flash builder or the flash player.
Any suggestions welcome!
The application and the modules come from the same domain, but typically a different domain from the html wrapper page.
Would security rules allow the modules to be loaded but not the fonts?
I can verify the fonts are being loaded into the main application, but only appear in the modules when I uncheck the "optimized for..." box.
Also, I should note that the fonts are being loaded through a swf in the assets/global.css file, with the following line:
fontFamily: "Font name";
I assume that adds the fonts at compile time, so the "Fonts.swf" file doesn't need to be on the server. True?
It wasn’t clear whether these were font-only modules or whether they were UI modules. If you are using custom text components, make sure you are handling the text widgets correctly. See the post on embedded fonts on my blog.
Flex SDK Team
Adobe Systems, Inc.
There were a confluence of issues/bugs crashing together to cause the issues. I'll try to sort them out here.
1) The primary bug was being caused by a static variable in one of my subclasses that I was typing with the name of the application. The only noticeable effect of the error was that the fonts no longer loaded, though I'm not sure why. I fixed this issue by removing the type declaration on the variable and leaving it blank. I'm setting that variable in the main application, which simply references itself (ie Subclass.app = this). Other suggestions on how to do that within a class whose static methods are called without instantiation would be appreciated (meaning, I need to reference the parent app from within a static method in that subclass).
2) Returning to a previous git commit for the project was unreliable because of an apparent flash builder bug that required me to open and close flash builder 2x to get it to correctly complile the application. Before switching to a previous commit, I would close flash builder. Upon reverting the codebase and re-opening flash builder, the application would still not compile correctly. However, if I closed and reopend flash builder a 2nd time, the application would work. I'm guessing that it has to do with how flash builder (or eclipse) save settings when exiting the program, so that I had to exit the correct code base after reverting to a previous version and then reopen to get the correct settings.
I hope this helps someone in the future. Too many hours spent on something that should have been straightforward.
Europe, Middle East and Africa